From 7907f52563d1323ea8172fec083aa8429e5f1837 Mon Sep 17 00:00:00 2001 From: OCI DEX Release Bot Automation Date: Tue, 29 Jul 2025 06:25:45 +0000 Subject: [PATCH] Releasing version 2.157.0 Co-authored-by: Harsh Kumar --- CHANGELOG.rst | 24 + docs/api/api_platform.rst | 36 + .../oci.api_platform.ApiPlatformClient.rst | 8 + ...m.ApiPlatformClientCompositeOperations.rst | 8 + ...pi_platform.models.ApiPlatformInstance.rst | 11 + ...m.models.ApiPlatformInstanceCollection.rst | 11 + ...form.models.ApiPlatformInstanceSummary.rst | 11 + ...eApiPlatformInstanceCompartmentDetails.rst | 11 + ...odels.CreateApiPlatformInstanceDetails.rst | 11 + .../oci.api_platform.models.IdcsApp.rst | 11 + ...odels.UpdateApiPlatformInstanceDetails.rst | 11 + .../models/oci.api_platform.models.Uris.rst | 11 + .../oci.api_platform.models.WorkRequest.rst | 11 + ...i.api_platform.models.WorkRequestError.rst | 11 + ...form.models.WorkRequestErrorCollection.rst | 11 + ...pi_platform.models.WorkRequestLogEntry.rst | 11 + ...m.models.WorkRequestLogEntryCollection.rst | 11 + ...pi_platform.models.WorkRequestResource.rst | 11 + ...api_platform.models.WorkRequestSummary.rst | 11 + ...rm.models.WorkRequestSummaryCollection.rst | 11 + docs/api/apigateway.rst | 3 + ...igateway.models.AddResourceLockDetails.rst | 11 + ...teway.models.RemoveResourceLockDetails.rst | 11 + .../oci.apigateway.models.ResourceLock.rst | 11 + docs/api/apm_config.rst | 14 + .../oci.apm_config.models.AgentConfig.rst | 11 + .../oci.apm_config.models.AgentConfigFile.rst | 11 + .../oci.apm_config.models.AgentConfigMap.rst | 11 + ....apm_config.models.AgentConfigOverride.rst | 11 + ...apm_config.models.AgentConfigOverrides.rst | 11 + ...i.apm_config.models.AgentConfigSummary.rst | 11 + ...config.models.CreateAgentConfigDetails.rst | 11 + ...g.models.CreateMacsApmExtensionDetails.rst | 11 + ...oci.apm_config.models.MacsApmExtension.rst | 11 + ..._config.models.MacsApmExtensionSummary.rst | 11 + ...fig.models.MatchAgentsWithAttributeKey.rst | 11 + ...config.models.UpdateAgentConfigDetails.rst | 11 + ...g.models.UpdateMacsApmExtensionDetails.rst | 11 + ...dateMatchAgentsWithAttributeKeyDetails.rst | 11 + docs/api/data_science.rst | 37 + ...els.ChangeModelGroupCompartmentDetails.rst | 11 + ...lGroupVersionHistoryCompartmentDetails.rst | 11 + ...odels.CloneCreateFromModelGroupDetails.rst | 11 + ...ateFromModelGroupVersionHistoryDetails.rst | 11 + ..._science.models.CloneModelGroupDetails.rst | 11 + ...nce.models.CreateBaseModelGroupDetails.rst | 11 + ...science.models.CreateModelGroupDetails.rst | 11 + ....CreateModelGroupVersionHistoryDetails.rst | 11 + ...oci.data_science.models.CustomMetadata.rst | 11 + ....models.HeterogeneousModelGroupDetails.rst | 11 + ...ce.models.HomogeneousModelGroupDetails.rst | 11 + ...els.InfrastructureConfigurationDetails.rst | 11 + ...PoolInfrastructureConfigurationDetails.rst | 11 + ...data_science.models.MemberModelDetails.rst | 11 + ...data_science.models.MemberModelEntries.rst | 11 + ...odels.ModelDeploymentModelStateSummary.rst | 11 + .../oci.data_science.models.ModelGroup.rst | 11 + ...ce.models.ModelGroupCloneSourceDetails.rst | 11 + ....models.ModelGroupConfigurationDetails.rst | 11 + ...delGroupDeploymentConfigurationDetails.rst | 11 + ....data_science.models.ModelGroupDetails.rst | 11 + ..._science.models.ModelGroupModelSummary.rst | 11 + ....data_science.models.ModelGroupSummary.rst | 11 + ...cience.models.ModelGroupVersionHistory.rst | 11 + ...models.ModelGroupVersionHistorySummary.rst | 11 + ...science.models.ModifyModelGroupDetails.rst | 11 + ...ence.models.PatchInsertNewMemberModels.rst | 11 + ...i.data_science.models.PatchInstruction.rst | 11 + ...dels.PatchModelGroupMemberModelDetails.rst | 11 + ...science.models.PatchRemoveMemberModels.rst | 11 + ...cience.models.StackedModelGroupDetails.rst | 11 + ...dateInfrastructureConfigurationDetails.rst | 11 + ...PoolInfrastructureConfigurationDetails.rst | 11 + ...s.UpdateModelGroupConfigurationDetails.rst | 11 + ...delGroupDeploymentConfigurationDetails.rst | 11 + ...science.models.UpdateModelGroupDetails.rst | 11 + ....UpdateModelGroupVersionHistoryDetails.rst | 11 + docs/api/landing.rst | 2 + docs/api/vault.rst | 3 + .../oci.vault.models.ReplicationConfig.rst | 11 + .../oci.vault.models.ReplicationTarget.rst | 11 + ...i.vault.models.SourceRegionInformation.rst | 11 + examples/adk/multi-turn/sql_multi_turns.py | 57 + .../single-agent-multi-tools/rag_sql_agent.py | 65 + .../_sql.database_schema.sql | 51 + .../adk/single-agent-single-tool/sql_agent.py | 89 + src/oci/__init__.py | 4 +- src/oci/addons/adk/agent.py | 89 +- src/oci/addons/adk/agent_client.py | 117 +- src/oci/addons/adk/run/types.py | 41 + .../adk/tool/prebuilt/agentic_sql_tool.py | 99 + src/oci/addons/adk/tool/utils.py | 30 +- src/oci/addons/adk/util.py | 22 + src/oci/ai_speech/ai_service_speech_client.py | 7 +- .../models/customization_model_details.py | 6 +- .../models/tts_oracle_speech_settings.py | 4 +- .../tts_oracle_tts2_natural_model_details.py | 53 +- src/oci/ai_speech/models/voice_summary.py | 12 - src/oci/api_platform/__init__.py | 14 + src/oci/api_platform/api_platform_client.py | 1432 ++++ ...pi_platform_client_composite_operations.py | 161 + src/oci/api_platform/models/__init__.py | 44 + .../models/api_platform_instance.py | 498 ++ .../api_platform_instance_collection.py | 70 + .../models/api_platform_instance_summary.py | 381 + ...i_platform_instance_compartment_details.py | 74 + .../create_api_platform_instance_details.py | 202 + src/oci/api_platform/models/idcs_app.py | 70 + .../update_api_platform_instance_details.py | 136 + src/oci/api_platform/models/uris.py | 101 + src/oci/api_platform/models/work_request.py | 449 ++ .../api_platform/models/work_request_error.py | 144 + .../models/work_request_error_collection.py | 70 + .../models/work_request_log_entry.py | 107 + .../work_request_log_entry_collection.py | 70 + .../models/work_request_resource.py | 236 + .../models/work_request_summary.py | 447 ++ .../models/work_request_summary_collection.py | 70 + src/oci/apigateway/api_gateway_client.py | 1934 +++-- ...api_gateway_client_composite_operations.py | 270 + src/oci/apigateway/deployment_client.py | 257 +- .../deployment_client_composite_operations.py | 90 + src/oci/apigateway/gateway_client.py | 257 +- .../gateway_client_composite_operations.py | 90 + src/oci/apigateway/models/__init__.py | 6 + .../models/add_resource_lock_details.py | 122 + src/oci/apigateway/models/api.py | 68 +- src/oci/apigateway/models/api_summary.py | 68 +- src/oci/apigateway/models/certificate.py | 68 +- .../apigateway/models/certificate_summary.py | 68 +- .../apigateway/models/create_api_details.py | 31 + .../models/create_certificate_details.py | 35 +- .../models/create_deployment_details.py | 31 + .../models/create_gateway_details.py | 37 +- .../apigateway/models/create_sdk_details.py | 31 + .../models/create_subscriber_details.py | 31 + .../models/create_usage_plan_details.py | 31 + src/oci/apigateway/models/deployment.py | 68 +- .../apigateway/models/deployment_summary.py | 68 +- src/oci/apigateway/models/gateway.py | 64 + src/oci/apigateway/models/gateway_summary.py | 68 +- .../header_validation_request_policy.py | 4 + src/oci/apigateway/models/http_backend.py | 4 + .../models/o_auth2_logout_backend.py | 4 + ...ery_parameter_validation_request_policy.py | 4 + .../models/remove_resource_lock_details.py | 89 + src/oci/apigateway/models/resource_lock.py | 183 + src/oci/apigateway/models/sdk.py | 64 + src/oci/apigateway/models/sdk_summary.py | 68 +- src/oci/apigateway/models/subscriber.py | 68 +- .../apigateway/models/subscriber_summary.py | 68 +- .../models/update_gateway_details.py | 6 +- src/oci/apigateway/models/usage_plan.py | 68 +- .../apigateway/models/usage_plan_summary.py | 68 +- src/oci/apigateway/subscribers_client.py | 257 +- ...subscribers_client_composite_operations.py | 90 + src/oci/apigateway/usage_plans_client.py | 257 +- ...usage_plans_client_composite_operations.py | 90 + src/oci/apm_config/config_client.py | 195 +- src/oci/apm_config/models/__init__.py | 28 + src/oci/apm_config/models/agent_config.py | 229 + .../apm_config/models/agent_config_file.py | 101 + src/oci/apm_config/models/agent_config_map.py | 81 + .../models/agent_config_override.py | 107 + .../models/agent_config_overrides.py | 66 + .../apm_config/models/agent_config_summary.py | 236 + src/oci/apm_config/models/apdex_rules.py | 2 +- .../apm_config/models/apdex_rules_summary.py | 2 +- src/oci/apm_config/models/config.py | 22 +- src/oci/apm_config/models/config_summary.py | 22 +- .../models/create_agent_config_details.py | 152 + .../models/create_apdex_rules_details.py | 2 +- .../models/create_config_details.py | 22 +- .../create_macs_apm_extension_details.py | 286 + .../models/create_metric_group_details.py | 2 +- .../models/create_options_details.py | 2 +- .../models/create_span_filter_details.py | 2 +- .../export_import_apdex_rules_summary.py | 2 +- .../models/export_import_config_summary.py | 14 +- .../export_import_metric_group_summary.py | 2 +- .../models/export_import_options_summary.py | 2 +- .../export_import_span_filter_summary.py | 2 +- ...mport_configuration_failed_item_summary.py | 14 +- .../apm_config/models/macs_apm_extension.py | 328 + .../models/macs_apm_extension_summary.py | 335 + .../models/match_agents_with_attribute_key.py | 70 + src/oci/apm_config/models/metric_group.py | 2 +- .../apm_config/models/metric_group_summary.py | 2 +- src/oci/apm_config/models/options.py | 2 +- src/oci/apm_config/models/options_summary.py | 2 +- src/oci/apm_config/models/span_filter.py | 2 +- .../models/span_filter_reference.py | 14 +- .../apm_config/models/span_filter_summary.py | 2 +- .../models/update_agent_config_details.py | 117 + .../models/update_apdex_rules_details.py | 2 +- .../models/update_config_details.py | 22 +- .../update_macs_apm_extension_details.py | 251 + ...match_agents_with_attribute_key_details.py | 70 + .../models/update_metric_group_details.py | 2 +- .../models/update_options_details.py | 2 +- .../models/update_span_filter_details.py | 2 +- src/oci/data_science/data_science_client.py | 6206 ++++++++++++----- ...ata_science_client_composite_operations.py | 361 + src/oci/data_science/models/__init__.py | 74 + .../change_model_group_compartment_details.py | 74 + ...oup_version_history_compartment_details.py | 74 + .../clone_create_from_model_group_details.py | 138 + ...rom_model_group_version_history_details.py | 138 + .../models/clone_model_group_details.py | 90 + .../models/create_base_model_group_details.py | 177 + .../models/create_model_group_details.py | 321 + ...ate_model_group_version_history_details.py | 282 + .../data_science/models/custom_metadata.py | 163 + .../heterogeneous_model_group_details.py | 56 + .../models/homogeneous_model_group_details.py | 56 + .../infrastructure_configuration_details.py | 99 + .../models/instance_configuration.py | 2 +- ...ol_infrastructure_configuration_details.py | 165 + .../models/job_shape_config_details.py | 63 +- .../models/member_model_details.py | 105 + .../models/member_model_entries.py | 70 + .../model_deployment_configuration_details.py | 14 +- .../model_deployment_model_state_summary.py | 329 + src/oci/data_science/models/model_group.py | 764 ++ .../model_group_clone_source_details.py | 107 + .../model_group_configuration_details.py | 74 + ..._group_deployment_configuration_details.py | 130 + .../models/model_group_details.py | 146 + .../models/model_group_model_summary.py | 590 ++ .../models/model_group_summary.py | 640 ++ .../models/model_group_version_history.py | 543 ++ .../model_group_version_history_summary.py | 512 ++ .../models/modify_model_group_details.py | 270 + .../notebook_session_shape_config_details.py | 63 +- .../models/patch_insert_new_member_models.py | 80 + .../data_science/models/patch_instruction.py | 107 + .../patch_model_group_member_model_details.py | 70 + .../models/patch_remove_member_models.py | 80 + .../models/pipeline_shape_config_details.py | 63 +- ..._model_deployment_configuration_details.py | 2 +- .../models/stacked_model_group_details.py | 91 + ...te_infrastructure_configuration_details.py | 99 + ...ol_infrastructure_configuration_details.py | 165 + ..._model_deployment_configuration_details.py | 14 +- ...pdate_model_group_configuration_details.py | 74 + ..._group_deployment_configuration_details.py | 177 + .../models/update_model_group_details.py | 243 + ...ate_model_group_version_history_details.py | 206 + ..._model_deployment_configuration_details.py | 2 +- src/oci/data_science/models/work_request.py | 22 +- .../models/work_request_summary.py | 22 +- .../management_dashboard/dashx_apis_client.py | 46 +- .../models/management_dashboard.py | 37 +- .../models/management_dashboard_summary.py | 37 +- .../models/management_saved_search.py | 37 +- .../models/management_saved_search_summary.py | 37 +- src/oci/psql/models/backup_source_details.py | 3 +- src/oci/psql/models/configuration.py | 68 +- src/oci/psql/models/configuration_summary.py | 68 +- .../models/create_configuration_details.py | 39 +- src/oci/psql/models/default_configuration.py | 37 +- .../models/default_configuration_summary.py | 41 +- src/oci/psql/models/source_details.py | 2 +- .../models/update_configuration_details.py | 35 +- src/oci/psql/postgresql_client.py | 26 +- src/oci/vault/models/__init__.py | 6 + src/oci/vault/models/create_secret_details.py | 27 + src/oci/vault/models/replication_config.py | 101 + src/oci/vault/models/replication_target.py | 132 + src/oci/vault/models/secret.py | 85 + src/oci/vault/models/secret_summary.py | 85 + .../vault/models/source_region_information.py | 132 + src/oci/vault/models/update_secret_details.py | 27 + src/oci/version.py | 2 +- 274 files changed, 27327 insertions(+), 2663 deletions(-) create mode 100644 docs/api/api_platform.rst create mode 100644 docs/api/api_platform/client/oci.api_platform.ApiPlatformClient.rst create mode 100644 docs/api/api_platform/client/oci.api_platform.ApiPlatformClientCompositeOperations.rst create mode 100644 docs/api/api_platform/models/oci.api_platform.models.ApiPlatformInstance.rst create mode 100644 docs/api/api_platform/models/oci.api_platform.models.ApiPlatformInstanceCollection.rst create mode 100644 docs/api/api_platform/models/oci.api_platform.models.ApiPlatformInstanceSummary.rst create mode 100644 docs/api/api_platform/models/oci.api_platform.models.ChangeApiPlatformInstanceCompartmentDetails.rst create mode 100644 docs/api/api_platform/models/oci.api_platform.models.CreateApiPlatformInstanceDetails.rst create mode 100644 docs/api/api_platform/models/oci.api_platform.models.IdcsApp.rst create mode 100644 docs/api/api_platform/models/oci.api_platform.models.UpdateApiPlatformInstanceDetails.rst create mode 100644 docs/api/api_platform/models/oci.api_platform.models.Uris.rst create mode 100644 docs/api/api_platform/models/oci.api_platform.models.WorkRequest.rst create mode 100644 docs/api/api_platform/models/oci.api_platform.models.WorkRequestError.rst create mode 100644 docs/api/api_platform/models/oci.api_platform.models.WorkRequestErrorCollection.rst create mode 100644 docs/api/api_platform/models/oci.api_platform.models.WorkRequestLogEntry.rst create mode 100644 docs/api/api_platform/models/oci.api_platform.models.WorkRequestLogEntryCollection.rst create mode 100644 docs/api/api_platform/models/oci.api_platform.models.WorkRequestResource.rst create mode 100644 docs/api/api_platform/models/oci.api_platform.models.WorkRequestSummary.rst create mode 100644 docs/api/api_platform/models/oci.api_platform.models.WorkRequestSummaryCollection.rst create mode 100644 docs/api/apigateway/models/oci.apigateway.models.AddResourceLockDetails.rst create mode 100644 docs/api/apigateway/models/oci.apigateway.models.RemoveResourceLockDetails.rst create mode 100644 docs/api/apigateway/models/oci.apigateway.models.ResourceLock.rst create mode 100644 docs/api/apm_config/models/oci.apm_config.models.AgentConfig.rst create mode 100644 docs/api/apm_config/models/oci.apm_config.models.AgentConfigFile.rst create mode 100644 docs/api/apm_config/models/oci.apm_config.models.AgentConfigMap.rst create mode 100644 docs/api/apm_config/models/oci.apm_config.models.AgentConfigOverride.rst create mode 100644 docs/api/apm_config/models/oci.apm_config.models.AgentConfigOverrides.rst create mode 100644 docs/api/apm_config/models/oci.apm_config.models.AgentConfigSummary.rst create mode 100644 docs/api/apm_config/models/oci.apm_config.models.CreateAgentConfigDetails.rst create mode 100644 docs/api/apm_config/models/oci.apm_config.models.CreateMacsApmExtensionDetails.rst create mode 100644 docs/api/apm_config/models/oci.apm_config.models.MacsApmExtension.rst create mode 100644 docs/api/apm_config/models/oci.apm_config.models.MacsApmExtensionSummary.rst create mode 100644 docs/api/apm_config/models/oci.apm_config.models.MatchAgentsWithAttributeKey.rst create mode 100644 docs/api/apm_config/models/oci.apm_config.models.UpdateAgentConfigDetails.rst create mode 100644 docs/api/apm_config/models/oci.apm_config.models.UpdateMacsApmExtensionDetails.rst create mode 100644 docs/api/apm_config/models/oci.apm_config.models.UpdateMatchAgentsWithAttributeKeyDetails.rst create mode 100644 docs/api/data_science/models/oci.data_science.models.ChangeModelGroupCompartmentDetails.rst create mode 100644 docs/api/data_science/models/oci.data_science.models.ChangeModelGroupVersionHistoryCompartmentDetails.rst create mode 100644 docs/api/data_science/models/oci.data_science.models.CloneCreateFromModelGroupDetails.rst create mode 100644 docs/api/data_science/models/oci.data_science.models.CloneCreateFromModelGroupVersionHistoryDetails.rst create mode 100644 docs/api/data_science/models/oci.data_science.models.CloneModelGroupDetails.rst create mode 100644 docs/api/data_science/models/oci.data_science.models.CreateBaseModelGroupDetails.rst create mode 100644 docs/api/data_science/models/oci.data_science.models.CreateModelGroupDetails.rst create mode 100644 docs/api/data_science/models/oci.data_science.models.CreateModelGroupVersionHistoryDetails.rst create mode 100644 docs/api/data_science/models/oci.data_science.models.CustomMetadata.rst create mode 100644 docs/api/data_science/models/oci.data_science.models.HeterogeneousModelGroupDetails.rst create mode 100644 docs/api/data_science/models/oci.data_science.models.HomogeneousModelGroupDetails.rst create mode 100644 docs/api/data_science/models/oci.data_science.models.InfrastructureConfigurationDetails.rst create mode 100644 docs/api/data_science/models/oci.data_science.models.InstancePoolInfrastructureConfigurationDetails.rst create mode 100644 docs/api/data_science/models/oci.data_science.models.MemberModelDetails.rst create mode 100644 docs/api/data_science/models/oci.data_science.models.MemberModelEntries.rst create mode 100644 docs/api/data_science/models/oci.data_science.models.ModelDeploymentModelStateSummary.rst create mode 100644 docs/api/data_science/models/oci.data_science.models.ModelGroup.rst create mode 100644 docs/api/data_science/models/oci.data_science.models.ModelGroupCloneSourceDetails.rst create mode 100644 docs/api/data_science/models/oci.data_science.models.ModelGroupConfigurationDetails.rst create mode 100644 docs/api/data_science/models/oci.data_science.models.ModelGroupDeploymentConfigurationDetails.rst create mode 100644 docs/api/data_science/models/oci.data_science.models.ModelGroupDetails.rst create mode 100644 docs/api/data_science/models/oci.data_science.models.ModelGroupModelSummary.rst create mode 100644 docs/api/data_science/models/oci.data_science.models.ModelGroupSummary.rst create mode 100644 docs/api/data_science/models/oci.data_science.models.ModelGroupVersionHistory.rst create mode 100644 docs/api/data_science/models/oci.data_science.models.ModelGroupVersionHistorySummary.rst create mode 100644 docs/api/data_science/models/oci.data_science.models.ModifyModelGroupDetails.rst create mode 100644 docs/api/data_science/models/oci.data_science.models.PatchInsertNewMemberModels.rst create mode 100644 docs/api/data_science/models/oci.data_science.models.PatchInstruction.rst create mode 100644 docs/api/data_science/models/oci.data_science.models.PatchModelGroupMemberModelDetails.rst create mode 100644 docs/api/data_science/models/oci.data_science.models.PatchRemoveMemberModels.rst create mode 100644 docs/api/data_science/models/oci.data_science.models.StackedModelGroupDetails.rst create mode 100644 docs/api/data_science/models/oci.data_science.models.UpdateInfrastructureConfigurationDetails.rst create mode 100644 docs/api/data_science/models/oci.data_science.models.UpdateInstancePoolInfrastructureConfigurationDetails.rst create mode 100644 docs/api/data_science/models/oci.data_science.models.UpdateModelGroupConfigurationDetails.rst create mode 100644 docs/api/data_science/models/oci.data_science.models.UpdateModelGroupDeploymentConfigurationDetails.rst create mode 100644 docs/api/data_science/models/oci.data_science.models.UpdateModelGroupDetails.rst create mode 100644 docs/api/data_science/models/oci.data_science.models.UpdateModelGroupVersionHistoryDetails.rst create mode 100644 docs/api/vault/models/oci.vault.models.ReplicationConfig.rst create mode 100644 docs/api/vault/models/oci.vault.models.ReplicationTarget.rst create mode 100644 docs/api/vault/models/oci.vault.models.SourceRegionInformation.rst create mode 100644 examples/adk/multi-turn/sql_multi_turns.py create mode 100644 examples/adk/single-agent-multi-tools/rag_sql_agent.py create mode 100644 examples/adk/single-agent-single-tool/_sql.database_schema.sql create mode 100644 examples/adk/single-agent-single-tool/sql_agent.py create mode 100644 src/oci/addons/adk/tool/prebuilt/agentic_sql_tool.py create mode 100644 src/oci/api_platform/__init__.py create mode 100644 src/oci/api_platform/api_platform_client.py create mode 100644 src/oci/api_platform/api_platform_client_composite_operations.py create mode 100644 src/oci/api_platform/models/__init__.py create mode 100644 src/oci/api_platform/models/api_platform_instance.py create mode 100644 src/oci/api_platform/models/api_platform_instance_collection.py create mode 100644 src/oci/api_platform/models/api_platform_instance_summary.py create mode 100644 src/oci/api_platform/models/change_api_platform_instance_compartment_details.py create mode 100644 src/oci/api_platform/models/create_api_platform_instance_details.py create mode 100644 src/oci/api_platform/models/idcs_app.py create mode 100644 src/oci/api_platform/models/update_api_platform_instance_details.py create mode 100644 src/oci/api_platform/models/uris.py create mode 100644 src/oci/api_platform/models/work_request.py create mode 100644 src/oci/api_platform/models/work_request_error.py create mode 100644 src/oci/api_platform/models/work_request_error_collection.py create mode 100644 src/oci/api_platform/models/work_request_log_entry.py create mode 100644 src/oci/api_platform/models/work_request_log_entry_collection.py create mode 100644 src/oci/api_platform/models/work_request_resource.py create mode 100644 src/oci/api_platform/models/work_request_summary.py create mode 100644 src/oci/api_platform/models/work_request_summary_collection.py create mode 100644 src/oci/apigateway/models/add_resource_lock_details.py create mode 100644 src/oci/apigateway/models/remove_resource_lock_details.py create mode 100644 src/oci/apigateway/models/resource_lock.py create mode 100644 src/oci/apm_config/models/agent_config.py create mode 100644 src/oci/apm_config/models/agent_config_file.py create mode 100644 src/oci/apm_config/models/agent_config_map.py create mode 100644 src/oci/apm_config/models/agent_config_override.py create mode 100644 src/oci/apm_config/models/agent_config_overrides.py create mode 100644 src/oci/apm_config/models/agent_config_summary.py create mode 100644 src/oci/apm_config/models/create_agent_config_details.py create mode 100644 src/oci/apm_config/models/create_macs_apm_extension_details.py create mode 100644 src/oci/apm_config/models/macs_apm_extension.py create mode 100644 src/oci/apm_config/models/macs_apm_extension_summary.py create mode 100644 src/oci/apm_config/models/match_agents_with_attribute_key.py create mode 100644 src/oci/apm_config/models/update_agent_config_details.py create mode 100644 src/oci/apm_config/models/update_macs_apm_extension_details.py create mode 100644 src/oci/apm_config/models/update_match_agents_with_attribute_key_details.py create mode 100644 src/oci/data_science/models/change_model_group_compartment_details.py create mode 100644 src/oci/data_science/models/change_model_group_version_history_compartment_details.py create mode 100644 src/oci/data_science/models/clone_create_from_model_group_details.py create mode 100644 src/oci/data_science/models/clone_create_from_model_group_version_history_details.py create mode 100644 src/oci/data_science/models/clone_model_group_details.py create mode 100644 src/oci/data_science/models/create_base_model_group_details.py create mode 100644 src/oci/data_science/models/create_model_group_details.py create mode 100644 src/oci/data_science/models/create_model_group_version_history_details.py create mode 100644 src/oci/data_science/models/custom_metadata.py create mode 100644 src/oci/data_science/models/heterogeneous_model_group_details.py create mode 100644 src/oci/data_science/models/homogeneous_model_group_details.py create mode 100644 src/oci/data_science/models/infrastructure_configuration_details.py create mode 100644 src/oci/data_science/models/instance_pool_infrastructure_configuration_details.py create mode 100644 src/oci/data_science/models/member_model_details.py create mode 100644 src/oci/data_science/models/member_model_entries.py create mode 100644 src/oci/data_science/models/model_deployment_model_state_summary.py create mode 100644 src/oci/data_science/models/model_group.py create mode 100644 src/oci/data_science/models/model_group_clone_source_details.py create mode 100644 src/oci/data_science/models/model_group_configuration_details.py create mode 100644 src/oci/data_science/models/model_group_deployment_configuration_details.py create mode 100644 src/oci/data_science/models/model_group_details.py create mode 100644 src/oci/data_science/models/model_group_model_summary.py create mode 100644 src/oci/data_science/models/model_group_summary.py create mode 100644 src/oci/data_science/models/model_group_version_history.py create mode 100644 src/oci/data_science/models/model_group_version_history_summary.py create mode 100644 src/oci/data_science/models/modify_model_group_details.py create mode 100644 src/oci/data_science/models/patch_insert_new_member_models.py create mode 100644 src/oci/data_science/models/patch_instruction.py create mode 100644 src/oci/data_science/models/patch_model_group_member_model_details.py create mode 100644 src/oci/data_science/models/patch_remove_member_models.py create mode 100644 src/oci/data_science/models/stacked_model_group_details.py create mode 100644 src/oci/data_science/models/update_infrastructure_configuration_details.py create mode 100644 src/oci/data_science/models/update_instance_pool_infrastructure_configuration_details.py create mode 100644 src/oci/data_science/models/update_model_group_configuration_details.py create mode 100644 src/oci/data_science/models/update_model_group_deployment_configuration_details.py create mode 100644 src/oci/data_science/models/update_model_group_details.py create mode 100644 src/oci/data_science/models/update_model_group_version_history_details.py create mode 100644 src/oci/vault/models/replication_config.py create mode 100644 src/oci/vault/models/replication_target.py create mode 100644 src/oci/vault/models/source_region_information.py diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 21f62016a7..55c7879355 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,6 +4,30 @@ All notable changes to this project will be documented in this file. The format is based on `Keep a Changelog `_. +==================== +2.157.0 - 2025-07-29 +==================== + +Added +----- +* Support for the APIP Platform service +* Support for resource locking for all resources in the API Gateway service +* Support for optional parameters in the import and export dashboard APIs in the Management Dashboard service +* Support for agent configurations and MACS extension configurations in the Application Performance Monitoring service +* Support for specifying replication configuration when creating or updating a secret in the Vault service +* Support for CPU architecture agnostic configurations in the PostgreSQL service +* Support for creating, deploying, cloning, getting, listing, activating and deactivating model groups in the Data Science service +* Support for creating, updating, getting, listing and deleting model group version history in the Data Science service +* Support for uploading and downloading model group artifacts in the Data Science service +* Support for listing the state of the deployed models associated with a model group in the Data Science service +* Support for updating model group deployments in the Data Science service +* Support for burstable shapes in data science notebooks, machine learning jobs and machine learning pipelines in the Data Science service +* Support for multilingual text to speech for 8 more languages in the AI Speech service + +Breaking +-------- +* Property `language_code` in model `VoiceSummary` will no longer support `UNKNOWN_ENUM_VALUE` + ==================== 2.156.0 - 2025-07-22 ==================== diff --git a/docs/api/api_platform.rst b/docs/api/api_platform.rst new file mode 100644 index 0000000000..7eee6e3d8c --- /dev/null +++ b/docs/api/api_platform.rst @@ -0,0 +1,36 @@ +Api Platform +============ + +.. autosummary:: + :toctree: api_platform/client + :nosignatures: + :template: autosummary/service_client.rst + + oci.api_platform.ApiPlatformClient + oci.api_platform.ApiPlatformClientCompositeOperations + +-------- + Models +-------- + +.. autosummary:: + :toctree: api_platform/models + :nosignatures: + :template: autosummary/model_class.rst + + oci.api_platform.models.ApiPlatformInstance + oci.api_platform.models.ApiPlatformInstanceCollection + oci.api_platform.models.ApiPlatformInstanceSummary + oci.api_platform.models.ChangeApiPlatformInstanceCompartmentDetails + oci.api_platform.models.CreateApiPlatformInstanceDetails + oci.api_platform.models.IdcsApp + oci.api_platform.models.UpdateApiPlatformInstanceDetails + oci.api_platform.models.Uris + oci.api_platform.models.WorkRequest + oci.api_platform.models.WorkRequestError + oci.api_platform.models.WorkRequestErrorCollection + oci.api_platform.models.WorkRequestLogEntry + oci.api_platform.models.WorkRequestLogEntryCollection + oci.api_platform.models.WorkRequestResource + oci.api_platform.models.WorkRequestSummary + oci.api_platform.models.WorkRequestSummaryCollection diff --git a/docs/api/api_platform/client/oci.api_platform.ApiPlatformClient.rst b/docs/api/api_platform/client/oci.api_platform.ApiPlatformClient.rst new file mode 100644 index 0000000000..e7f33213f6 --- /dev/null +++ b/docs/api/api_platform/client/oci.api_platform.ApiPlatformClient.rst @@ -0,0 +1,8 @@ +ApiPlatformClient +================= + +.. currentmodule:: oci.api_platform + +.. autoclass:: ApiPlatformClient + :special-members: __init__ + :members: \ No newline at end of file diff --git a/docs/api/api_platform/client/oci.api_platform.ApiPlatformClientCompositeOperations.rst b/docs/api/api_platform/client/oci.api_platform.ApiPlatformClientCompositeOperations.rst new file mode 100644 index 0000000000..bbfb7aa36c --- /dev/null +++ b/docs/api/api_platform/client/oci.api_platform.ApiPlatformClientCompositeOperations.rst @@ -0,0 +1,8 @@ +ApiPlatformClientCompositeOperations +==================================== + +.. currentmodule:: oci.api_platform + +.. autoclass:: ApiPlatformClientCompositeOperations + :special-members: __init__ + :members: \ No newline at end of file diff --git a/docs/api/api_platform/models/oci.api_platform.models.ApiPlatformInstance.rst b/docs/api/api_platform/models/oci.api_platform.models.ApiPlatformInstance.rst new file mode 100644 index 0000000000..edf4172a1b --- /dev/null +++ b/docs/api/api_platform/models/oci.api_platform.models.ApiPlatformInstance.rst @@ -0,0 +1,11 @@ +ApiPlatformInstance +=================== + +.. currentmodule:: oci.api_platform.models + +.. autoclass:: ApiPlatformInstance + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/api_platform/models/oci.api_platform.models.ApiPlatformInstanceCollection.rst b/docs/api/api_platform/models/oci.api_platform.models.ApiPlatformInstanceCollection.rst new file mode 100644 index 0000000000..915f04397b --- /dev/null +++ b/docs/api/api_platform/models/oci.api_platform.models.ApiPlatformInstanceCollection.rst @@ -0,0 +1,11 @@ +ApiPlatformInstanceCollection +============================= + +.. currentmodule:: oci.api_platform.models + +.. autoclass:: ApiPlatformInstanceCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/api_platform/models/oci.api_platform.models.ApiPlatformInstanceSummary.rst b/docs/api/api_platform/models/oci.api_platform.models.ApiPlatformInstanceSummary.rst new file mode 100644 index 0000000000..6fc588df67 --- /dev/null +++ b/docs/api/api_platform/models/oci.api_platform.models.ApiPlatformInstanceSummary.rst @@ -0,0 +1,11 @@ +ApiPlatformInstanceSummary +========================== + +.. currentmodule:: oci.api_platform.models + +.. autoclass:: ApiPlatformInstanceSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/api_platform/models/oci.api_platform.models.ChangeApiPlatformInstanceCompartmentDetails.rst b/docs/api/api_platform/models/oci.api_platform.models.ChangeApiPlatformInstanceCompartmentDetails.rst new file mode 100644 index 0000000000..a6256affc0 --- /dev/null +++ b/docs/api/api_platform/models/oci.api_platform.models.ChangeApiPlatformInstanceCompartmentDetails.rst @@ -0,0 +1,11 @@ +ChangeApiPlatformInstanceCompartmentDetails +=========================================== + +.. currentmodule:: oci.api_platform.models + +.. autoclass:: ChangeApiPlatformInstanceCompartmentDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/api_platform/models/oci.api_platform.models.CreateApiPlatformInstanceDetails.rst b/docs/api/api_platform/models/oci.api_platform.models.CreateApiPlatformInstanceDetails.rst new file mode 100644 index 0000000000..abbb39fbe7 --- /dev/null +++ b/docs/api/api_platform/models/oci.api_platform.models.CreateApiPlatformInstanceDetails.rst @@ -0,0 +1,11 @@ +CreateApiPlatformInstanceDetails +================================ + +.. currentmodule:: oci.api_platform.models + +.. autoclass:: CreateApiPlatformInstanceDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/api_platform/models/oci.api_platform.models.IdcsApp.rst b/docs/api/api_platform/models/oci.api_platform.models.IdcsApp.rst new file mode 100644 index 0000000000..43ef1e91c2 --- /dev/null +++ b/docs/api/api_platform/models/oci.api_platform.models.IdcsApp.rst @@ -0,0 +1,11 @@ +IdcsApp +======= + +.. currentmodule:: oci.api_platform.models + +.. autoclass:: IdcsApp + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/api_platform/models/oci.api_platform.models.UpdateApiPlatformInstanceDetails.rst b/docs/api/api_platform/models/oci.api_platform.models.UpdateApiPlatformInstanceDetails.rst new file mode 100644 index 0000000000..8edb668f5c --- /dev/null +++ b/docs/api/api_platform/models/oci.api_platform.models.UpdateApiPlatformInstanceDetails.rst @@ -0,0 +1,11 @@ +UpdateApiPlatformInstanceDetails +================================ + +.. currentmodule:: oci.api_platform.models + +.. autoclass:: UpdateApiPlatformInstanceDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/api_platform/models/oci.api_platform.models.Uris.rst b/docs/api/api_platform/models/oci.api_platform.models.Uris.rst new file mode 100644 index 0000000000..bd998efc7b --- /dev/null +++ b/docs/api/api_platform/models/oci.api_platform.models.Uris.rst @@ -0,0 +1,11 @@ +Uris +==== + +.. currentmodule:: oci.api_platform.models + +.. autoclass:: Uris + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/api_platform/models/oci.api_platform.models.WorkRequest.rst b/docs/api/api_platform/models/oci.api_platform.models.WorkRequest.rst new file mode 100644 index 0000000000..240082a5aa --- /dev/null +++ b/docs/api/api_platform/models/oci.api_platform.models.WorkRequest.rst @@ -0,0 +1,11 @@ +WorkRequest +=========== + +.. currentmodule:: oci.api_platform.models + +.. autoclass:: WorkRequest + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/api_platform/models/oci.api_platform.models.WorkRequestError.rst b/docs/api/api_platform/models/oci.api_platform.models.WorkRequestError.rst new file mode 100644 index 0000000000..1608180403 --- /dev/null +++ b/docs/api/api_platform/models/oci.api_platform.models.WorkRequestError.rst @@ -0,0 +1,11 @@ +WorkRequestError +================ + +.. currentmodule:: oci.api_platform.models + +.. autoclass:: WorkRequestError + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/api_platform/models/oci.api_platform.models.WorkRequestErrorCollection.rst b/docs/api/api_platform/models/oci.api_platform.models.WorkRequestErrorCollection.rst new file mode 100644 index 0000000000..97c3e785c5 --- /dev/null +++ b/docs/api/api_platform/models/oci.api_platform.models.WorkRequestErrorCollection.rst @@ -0,0 +1,11 @@ +WorkRequestErrorCollection +========================== + +.. currentmodule:: oci.api_platform.models + +.. autoclass:: WorkRequestErrorCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/api_platform/models/oci.api_platform.models.WorkRequestLogEntry.rst b/docs/api/api_platform/models/oci.api_platform.models.WorkRequestLogEntry.rst new file mode 100644 index 0000000000..86703226e8 --- /dev/null +++ b/docs/api/api_platform/models/oci.api_platform.models.WorkRequestLogEntry.rst @@ -0,0 +1,11 @@ +WorkRequestLogEntry +=================== + +.. currentmodule:: oci.api_platform.models + +.. autoclass:: WorkRequestLogEntry + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/api_platform/models/oci.api_platform.models.WorkRequestLogEntryCollection.rst b/docs/api/api_platform/models/oci.api_platform.models.WorkRequestLogEntryCollection.rst new file mode 100644 index 0000000000..077728caf5 --- /dev/null +++ b/docs/api/api_platform/models/oci.api_platform.models.WorkRequestLogEntryCollection.rst @@ -0,0 +1,11 @@ +WorkRequestLogEntryCollection +============================= + +.. currentmodule:: oci.api_platform.models + +.. autoclass:: WorkRequestLogEntryCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/api_platform/models/oci.api_platform.models.WorkRequestResource.rst b/docs/api/api_platform/models/oci.api_platform.models.WorkRequestResource.rst new file mode 100644 index 0000000000..c65a8aac79 --- /dev/null +++ b/docs/api/api_platform/models/oci.api_platform.models.WorkRequestResource.rst @@ -0,0 +1,11 @@ +WorkRequestResource +=================== + +.. currentmodule:: oci.api_platform.models + +.. autoclass:: WorkRequestResource + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/api_platform/models/oci.api_platform.models.WorkRequestSummary.rst b/docs/api/api_platform/models/oci.api_platform.models.WorkRequestSummary.rst new file mode 100644 index 0000000000..dfbd8079f9 --- /dev/null +++ b/docs/api/api_platform/models/oci.api_platform.models.WorkRequestSummary.rst @@ -0,0 +1,11 @@ +WorkRequestSummary +================== + +.. currentmodule:: oci.api_platform.models + +.. autoclass:: WorkRequestSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/api_platform/models/oci.api_platform.models.WorkRequestSummaryCollection.rst b/docs/api/api_platform/models/oci.api_platform.models.WorkRequestSummaryCollection.rst new file mode 100644 index 0000000000..dd44f2acb3 --- /dev/null +++ b/docs/api/api_platform/models/oci.api_platform.models.WorkRequestSummaryCollection.rst @@ -0,0 +1,11 @@ +WorkRequestSummaryCollection +============================ + +.. currentmodule:: oci.api_platform.models + +.. autoclass:: WorkRequestSummaryCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/apigateway.rst b/docs/api/apigateway.rst index ac30d8a637..98509fce4f 100644 --- a/docs/api/apigateway.rst +++ b/docs/api/apigateway.rst @@ -29,6 +29,7 @@ Apigateway :template: autosummary/model_class.rst oci.apigateway.models.AccessLogPolicy + oci.apigateway.models.AddResourceLockDetails oci.apigateway.models.AdditionalValidationPolicy oci.apigateway.models.AnonymousRouteAuthorizationPolicy oci.apigateway.models.AnyOfRouteAuthorizationPolicy @@ -123,11 +124,13 @@ Apigateway oci.apigateway.models.RateLimit oci.apigateway.models.RateLimitingPolicy oci.apigateway.models.RemoteJsonWebKeySet + oci.apigateway.models.RemoveResourceLockDetails oci.apigateway.models.RenameHeaderPolicy oci.apigateway.models.RenameHeaderPolicyItem oci.apigateway.models.RenameQueryParameterPolicy oci.apigateway.models.RenameQueryParameterPolicyItem oci.apigateway.models.RequestParameterValidation + oci.apigateway.models.ResourceLock oci.apigateway.models.ResponseCacheDetails oci.apigateway.models.ResponseCacheLookupPolicy oci.apigateway.models.ResponseCacheRespServer diff --git a/docs/api/apigateway/models/oci.apigateway.models.AddResourceLockDetails.rst b/docs/api/apigateway/models/oci.apigateway.models.AddResourceLockDetails.rst new file mode 100644 index 0000000000..585ac6bee9 --- /dev/null +++ b/docs/api/apigateway/models/oci.apigateway.models.AddResourceLockDetails.rst @@ -0,0 +1,11 @@ +AddResourceLockDetails +====================== + +.. currentmodule:: oci.apigateway.models + +.. autoclass:: AddResourceLockDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/apigateway/models/oci.apigateway.models.RemoveResourceLockDetails.rst b/docs/api/apigateway/models/oci.apigateway.models.RemoveResourceLockDetails.rst new file mode 100644 index 0000000000..36292c4132 --- /dev/null +++ b/docs/api/apigateway/models/oci.apigateway.models.RemoveResourceLockDetails.rst @@ -0,0 +1,11 @@ +RemoveResourceLockDetails +========================= + +.. currentmodule:: oci.apigateway.models + +.. autoclass:: RemoveResourceLockDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/apigateway/models/oci.apigateway.models.ResourceLock.rst b/docs/api/apigateway/models/oci.apigateway.models.ResourceLock.rst new file mode 100644 index 0000000000..b6b49880dc --- /dev/null +++ b/docs/api/apigateway/models/oci.apigateway.models.ResourceLock.rst @@ -0,0 +1,11 @@ +ResourceLock +============ + +.. currentmodule:: oci.apigateway.models + +.. autoclass:: ResourceLock + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/apm_config.rst b/docs/api/apm_config.rst index 16045c5571..6c8978762a 100644 --- a/docs/api/apm_config.rst +++ b/docs/api/apm_config.rst @@ -18,6 +18,12 @@ Apm Config :nosignatures: :template: autosummary/model_class.rst + oci.apm_config.models.AgentConfig + oci.apm_config.models.AgentConfigFile + oci.apm_config.models.AgentConfigMap + oci.apm_config.models.AgentConfigOverride + oci.apm_config.models.AgentConfigOverrides + oci.apm_config.models.AgentConfigSummary oci.apm_config.models.Apdex oci.apm_config.models.ApdexRules oci.apm_config.models.ApdexRulesSummary @@ -25,8 +31,10 @@ Apm Config oci.apm_config.models.ConfigCollection oci.apm_config.models.ConfigSummary oci.apm_config.models.CopyConfigurationDetails + oci.apm_config.models.CreateAgentConfigDetails oci.apm_config.models.CreateApdexRulesDetails oci.apm_config.models.CreateConfigDetails + oci.apm_config.models.CreateMacsApmExtensionDetails oci.apm_config.models.CreateMetricGroupDetails oci.apm_config.models.CreateOptionsDetails oci.apm_config.models.CreateSpanFilterDetails @@ -42,6 +50,9 @@ Apm Config oci.apm_config.models.ImportConfigurationDetails oci.apm_config.models.ImportConfigurationFailedItemSummary oci.apm_config.models.ImportConfigurationFailedItemsCollection + oci.apm_config.models.MacsApmExtension + oci.apm_config.models.MacsApmExtensionSummary + oci.apm_config.models.MatchAgentsWithAttributeKey oci.apm_config.models.Metric oci.apm_config.models.MetricGroup oci.apm_config.models.MetricGroupSummary @@ -59,8 +70,11 @@ Apm Config oci.apm_config.models.TestOutput oci.apm_config.models.TestSpanEnrichmentDetails oci.apm_config.models.TestSpanEnrichmentOutput + oci.apm_config.models.UpdateAgentConfigDetails oci.apm_config.models.UpdateApdexRulesDetails oci.apm_config.models.UpdateConfigDetails + oci.apm_config.models.UpdateMacsApmExtensionDetails + oci.apm_config.models.UpdateMatchAgentsWithAttributeKeyDetails oci.apm_config.models.UpdateMetricGroupDetails oci.apm_config.models.UpdateOptionsDetails oci.apm_config.models.UpdateSpanFilterDetails diff --git a/docs/api/apm_config/models/oci.apm_config.models.AgentConfig.rst b/docs/api/apm_config/models/oci.apm_config.models.AgentConfig.rst new file mode 100644 index 0000000000..cedec6ff71 --- /dev/null +++ b/docs/api/apm_config/models/oci.apm_config.models.AgentConfig.rst @@ -0,0 +1,11 @@ +AgentConfig +=========== + +.. currentmodule:: oci.apm_config.models + +.. autoclass:: AgentConfig + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/apm_config/models/oci.apm_config.models.AgentConfigFile.rst b/docs/api/apm_config/models/oci.apm_config.models.AgentConfigFile.rst new file mode 100644 index 0000000000..f1387220be --- /dev/null +++ b/docs/api/apm_config/models/oci.apm_config.models.AgentConfigFile.rst @@ -0,0 +1,11 @@ +AgentConfigFile +=============== + +.. currentmodule:: oci.apm_config.models + +.. autoclass:: AgentConfigFile + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/apm_config/models/oci.apm_config.models.AgentConfigMap.rst b/docs/api/apm_config/models/oci.apm_config.models.AgentConfigMap.rst new file mode 100644 index 0000000000..c81d7811b6 --- /dev/null +++ b/docs/api/apm_config/models/oci.apm_config.models.AgentConfigMap.rst @@ -0,0 +1,11 @@ +AgentConfigMap +============== + +.. currentmodule:: oci.apm_config.models + +.. autoclass:: AgentConfigMap + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/apm_config/models/oci.apm_config.models.AgentConfigOverride.rst b/docs/api/apm_config/models/oci.apm_config.models.AgentConfigOverride.rst new file mode 100644 index 0000000000..d359bbd083 --- /dev/null +++ b/docs/api/apm_config/models/oci.apm_config.models.AgentConfigOverride.rst @@ -0,0 +1,11 @@ +AgentConfigOverride +=================== + +.. currentmodule:: oci.apm_config.models + +.. autoclass:: AgentConfigOverride + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/apm_config/models/oci.apm_config.models.AgentConfigOverrides.rst b/docs/api/apm_config/models/oci.apm_config.models.AgentConfigOverrides.rst new file mode 100644 index 0000000000..cae903386e --- /dev/null +++ b/docs/api/apm_config/models/oci.apm_config.models.AgentConfigOverrides.rst @@ -0,0 +1,11 @@ +AgentConfigOverrides +==================== + +.. currentmodule:: oci.apm_config.models + +.. autoclass:: AgentConfigOverrides + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/apm_config/models/oci.apm_config.models.AgentConfigSummary.rst b/docs/api/apm_config/models/oci.apm_config.models.AgentConfigSummary.rst new file mode 100644 index 0000000000..572febbd8f --- /dev/null +++ b/docs/api/apm_config/models/oci.apm_config.models.AgentConfigSummary.rst @@ -0,0 +1,11 @@ +AgentConfigSummary +================== + +.. currentmodule:: oci.apm_config.models + +.. autoclass:: AgentConfigSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/apm_config/models/oci.apm_config.models.CreateAgentConfigDetails.rst b/docs/api/apm_config/models/oci.apm_config.models.CreateAgentConfigDetails.rst new file mode 100644 index 0000000000..8069b2aa49 --- /dev/null +++ b/docs/api/apm_config/models/oci.apm_config.models.CreateAgentConfigDetails.rst @@ -0,0 +1,11 @@ +CreateAgentConfigDetails +======================== + +.. currentmodule:: oci.apm_config.models + +.. autoclass:: CreateAgentConfigDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/apm_config/models/oci.apm_config.models.CreateMacsApmExtensionDetails.rst b/docs/api/apm_config/models/oci.apm_config.models.CreateMacsApmExtensionDetails.rst new file mode 100644 index 0000000000..c629b2efe5 --- /dev/null +++ b/docs/api/apm_config/models/oci.apm_config.models.CreateMacsApmExtensionDetails.rst @@ -0,0 +1,11 @@ +CreateMacsApmExtensionDetails +============================= + +.. currentmodule:: oci.apm_config.models + +.. autoclass:: CreateMacsApmExtensionDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/apm_config/models/oci.apm_config.models.MacsApmExtension.rst b/docs/api/apm_config/models/oci.apm_config.models.MacsApmExtension.rst new file mode 100644 index 0000000000..20d799f118 --- /dev/null +++ b/docs/api/apm_config/models/oci.apm_config.models.MacsApmExtension.rst @@ -0,0 +1,11 @@ +MacsApmExtension +================ + +.. currentmodule:: oci.apm_config.models + +.. autoclass:: MacsApmExtension + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/apm_config/models/oci.apm_config.models.MacsApmExtensionSummary.rst b/docs/api/apm_config/models/oci.apm_config.models.MacsApmExtensionSummary.rst new file mode 100644 index 0000000000..da1c2d1bba --- /dev/null +++ b/docs/api/apm_config/models/oci.apm_config.models.MacsApmExtensionSummary.rst @@ -0,0 +1,11 @@ +MacsApmExtensionSummary +======================= + +.. currentmodule:: oci.apm_config.models + +.. autoclass:: MacsApmExtensionSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/apm_config/models/oci.apm_config.models.MatchAgentsWithAttributeKey.rst b/docs/api/apm_config/models/oci.apm_config.models.MatchAgentsWithAttributeKey.rst new file mode 100644 index 0000000000..cdb3743c7e --- /dev/null +++ b/docs/api/apm_config/models/oci.apm_config.models.MatchAgentsWithAttributeKey.rst @@ -0,0 +1,11 @@ +MatchAgentsWithAttributeKey +=========================== + +.. currentmodule:: oci.apm_config.models + +.. autoclass:: MatchAgentsWithAttributeKey + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/apm_config/models/oci.apm_config.models.UpdateAgentConfigDetails.rst b/docs/api/apm_config/models/oci.apm_config.models.UpdateAgentConfigDetails.rst new file mode 100644 index 0000000000..e995cc880f --- /dev/null +++ b/docs/api/apm_config/models/oci.apm_config.models.UpdateAgentConfigDetails.rst @@ -0,0 +1,11 @@ +UpdateAgentConfigDetails +======================== + +.. currentmodule:: oci.apm_config.models + +.. autoclass:: UpdateAgentConfigDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/apm_config/models/oci.apm_config.models.UpdateMacsApmExtensionDetails.rst b/docs/api/apm_config/models/oci.apm_config.models.UpdateMacsApmExtensionDetails.rst new file mode 100644 index 0000000000..46e0213c06 --- /dev/null +++ b/docs/api/apm_config/models/oci.apm_config.models.UpdateMacsApmExtensionDetails.rst @@ -0,0 +1,11 @@ +UpdateMacsApmExtensionDetails +============================= + +.. currentmodule:: oci.apm_config.models + +.. autoclass:: UpdateMacsApmExtensionDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/apm_config/models/oci.apm_config.models.UpdateMatchAgentsWithAttributeKeyDetails.rst b/docs/api/apm_config/models/oci.apm_config.models.UpdateMatchAgentsWithAttributeKeyDetails.rst new file mode 100644 index 0000000000..202d5ee6b3 --- /dev/null +++ b/docs/api/apm_config/models/oci.apm_config.models.UpdateMatchAgentsWithAttributeKeyDetails.rst @@ -0,0 +1,11 @@ +UpdateMatchAgentsWithAttributeKeyDetails +======================================== + +.. currentmodule:: oci.apm_config.models + +.. autoclass:: UpdateMatchAgentsWithAttributeKeyDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_science.rst b/docs/api/data_science.rst index 740efd4348..4ea51928e9 100644 --- a/docs/api/data_science.rst +++ b/docs/api/data_science.rst @@ -38,16 +38,22 @@ Data Science oci.data_science.models.ChangeMlApplicationInstanceViewCompartmentDetails oci.data_science.models.ChangeModelCompartmentDetails oci.data_science.models.ChangeModelDeploymentCompartmentDetails + oci.data_science.models.ChangeModelGroupCompartmentDetails + oci.data_science.models.ChangeModelGroupVersionHistoryCompartmentDetails oci.data_science.models.ChangeModelVersionSetCompartmentDetails oci.data_science.models.ChangeNotebookSessionCompartmentDetails oci.data_science.models.ChangePipelineCompartmentDetails oci.data_science.models.ChangePipelineRunCompartmentDetails oci.data_science.models.ChangeProjectCompartmentDetails oci.data_science.models.ChangeScheduleCompartmentDetails + oci.data_science.models.CloneCreateFromModelGroupDetails + oci.data_science.models.CloneCreateFromModelGroupVersionHistoryDetails + oci.data_science.models.CloneModelGroupDetails oci.data_science.models.ConfigurationProperty oci.data_science.models.ConfigurationPropertySchema oci.data_science.models.ContainerSummary oci.data_science.models.CreateAuthConfigurationDetails + oci.data_science.models.CreateBaseModelGroupDetails oci.data_science.models.CreateDataSciencePrivateEndpointDetails oci.data_science.models.CreateIamAuthConfigurationCreateDetails oci.data_science.models.CreateIdcsAuthConfigurationDetails @@ -60,6 +66,8 @@ Data Science oci.data_science.models.CreateMlApplicationInstanceDetails oci.data_science.models.CreateModelDeploymentDetails oci.data_science.models.CreateModelDetails + oci.data_science.models.CreateModelGroupDetails + oci.data_science.models.CreateModelGroupVersionHistoryDetails oci.data_science.models.CreateModelProvenanceDetails oci.data_science.models.CreateModelVersionSetDetails oci.data_science.models.CreateNotebookSessionDetails @@ -69,6 +77,7 @@ Data Science oci.data_science.models.CreateProjectDetails oci.data_science.models.CreateScheduleDetails oci.data_science.models.CustomExpressionQueryScalingConfiguration + oci.data_science.models.CustomMetadata oci.data_science.models.CustomMetricExpressionRule oci.data_science.models.DataFlowApplicationApplicationComponent oci.data_science.models.DataScienceJobApplicationComponent @@ -89,14 +98,18 @@ Data Science oci.data_science.models.GenericJobRunUseCaseConfigurationDetails oci.data_science.models.GenericOciResourceApplicationComponent oci.data_science.models.GenericOciResourceInstanceComponent + oci.data_science.models.HeterogeneousModelGroupDetails + oci.data_science.models.HomogeneousModelGroupDetails oci.data_science.models.IamAuthConfiguration oci.data_science.models.IdcsAuthConfiguration oci.data_science.models.IdcsCustomServiceAuthConfiguration oci.data_science.models.ImplementationLogDetails oci.data_science.models.ImplementationLogging oci.data_science.models.ImportModelArtifactDetails + oci.data_science.models.InfrastructureConfigurationDetails oci.data_science.models.InstanceComponent oci.data_science.models.InstanceConfiguration + oci.data_science.models.InstancePoolInfrastructureConfigurationDetails oci.data_science.models.InstancePoolModelDeploymentSystemData oci.data_science.models.InvokeMlApplicationProviderTriggerScheduleActionDetails oci.data_science.models.Job @@ -114,6 +127,8 @@ Data Science oci.data_science.models.JobSummary oci.data_science.models.LogDetails oci.data_science.models.ManagedEgressStandaloneJobInfrastructureConfigurationDetails + oci.data_science.models.MemberModelDetails + oci.data_science.models.MemberModelEntries oci.data_science.models.Metadata oci.data_science.models.MetricExpressionRule oci.data_science.models.MlApplication @@ -142,13 +157,24 @@ Data Science oci.data_science.models.ModelDeploymentConfigurationDetails oci.data_science.models.ModelDeploymentEnvironmentConfigurationDetails oci.data_science.models.ModelDeploymentInstanceShapeConfigDetails + oci.data_science.models.ModelDeploymentModelStateSummary oci.data_science.models.ModelDeploymentShapeSummary oci.data_science.models.ModelDeploymentSummary oci.data_science.models.ModelDeploymentSystemData + oci.data_science.models.ModelGroup + oci.data_science.models.ModelGroupCloneSourceDetails + oci.data_science.models.ModelGroupConfigurationDetails + oci.data_science.models.ModelGroupDeploymentConfigurationDetails + oci.data_science.models.ModelGroupDetails + oci.data_science.models.ModelGroupModelSummary + oci.data_science.models.ModelGroupSummary + oci.data_science.models.ModelGroupVersionHistory + oci.data_science.models.ModelGroupVersionHistorySummary oci.data_science.models.ModelProvenance oci.data_science.models.ModelSummary oci.data_science.models.ModelVersionSet oci.data_science.models.ModelVersionSetSummary + oci.data_science.models.ModifyModelGroupDetails oci.data_science.models.NotebookSession oci.data_science.models.NotebookSessionConfigDetails oci.data_science.models.NotebookSessionConfigurationDetails @@ -164,6 +190,10 @@ Data Science oci.data_science.models.ObjectStorageObjectInstanceComponent oci.data_science.models.OcirContainerJobEnvironmentConfigurationDetails oci.data_science.models.OcirModelDeploymentEnvironmentConfigurationDetails + oci.data_science.models.PatchInsertNewMemberModels + oci.data_science.models.PatchInstruction + oci.data_science.models.PatchModelGroupMemberModelDetails + oci.data_science.models.PatchRemoveMemberModels oci.data_science.models.Pipeline oci.data_science.models.PipelineConfigurationDetails oci.data_science.models.PipelineContainerConfigurationDetails @@ -216,6 +246,7 @@ Data Science oci.data_science.models.ScheduleSummary oci.data_science.models.ScheduleTrigger oci.data_science.models.SingleModelDeploymentConfigurationDetails + oci.data_science.models.StackedModelGroupDetails oci.data_science.models.StandaloneJobInfrastructureConfigurationDetails oci.data_science.models.StorageMountConfigurationDetails oci.data_science.models.TagConfiguration @@ -226,6 +257,8 @@ Data Science oci.data_science.models.UpdateCategoryLogDetails oci.data_science.models.UpdateDataSciencePrivateEndpointDetails oci.data_science.models.UpdateDefaultModelDeploymentEnvironmentConfigurationDetails + oci.data_science.models.UpdateInfrastructureConfigurationDetails + oci.data_science.models.UpdateInstancePoolInfrastructureConfigurationDetails oci.data_science.models.UpdateJobDetails oci.data_science.models.UpdateJobRunDetails oci.data_science.models.UpdateMlApplicationDetails @@ -238,6 +271,10 @@ Data Science oci.data_science.models.UpdateModelDeploymentDetails oci.data_science.models.UpdateModelDeploymentEnvironmentConfigurationDetails oci.data_science.models.UpdateModelDetails + oci.data_science.models.UpdateModelGroupConfigurationDetails + oci.data_science.models.UpdateModelGroupDeploymentConfigurationDetails + oci.data_science.models.UpdateModelGroupDetails + oci.data_science.models.UpdateModelGroupVersionHistoryDetails oci.data_science.models.UpdateModelProvenanceDetails oci.data_science.models.UpdateModelVersionSetDetails oci.data_science.models.UpdateNotebookSessionDetails diff --git a/docs/api/data_science/models/oci.data_science.models.ChangeModelGroupCompartmentDetails.rst b/docs/api/data_science/models/oci.data_science.models.ChangeModelGroupCompartmentDetails.rst new file mode 100644 index 0000000000..30275e682b --- /dev/null +++ b/docs/api/data_science/models/oci.data_science.models.ChangeModelGroupCompartmentDetails.rst @@ -0,0 +1,11 @@ +ChangeModelGroupCompartmentDetails +================================== + +.. currentmodule:: oci.data_science.models + +.. autoclass:: ChangeModelGroupCompartmentDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_science/models/oci.data_science.models.ChangeModelGroupVersionHistoryCompartmentDetails.rst b/docs/api/data_science/models/oci.data_science.models.ChangeModelGroupVersionHistoryCompartmentDetails.rst new file mode 100644 index 0000000000..247664380d --- /dev/null +++ b/docs/api/data_science/models/oci.data_science.models.ChangeModelGroupVersionHistoryCompartmentDetails.rst @@ -0,0 +1,11 @@ +ChangeModelGroupVersionHistoryCompartmentDetails +================================================ + +.. currentmodule:: oci.data_science.models + +.. autoclass:: ChangeModelGroupVersionHistoryCompartmentDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_science/models/oci.data_science.models.CloneCreateFromModelGroupDetails.rst b/docs/api/data_science/models/oci.data_science.models.CloneCreateFromModelGroupDetails.rst new file mode 100644 index 0000000000..50915ca8a7 --- /dev/null +++ b/docs/api/data_science/models/oci.data_science.models.CloneCreateFromModelGroupDetails.rst @@ -0,0 +1,11 @@ +CloneCreateFromModelGroupDetails +================================ + +.. currentmodule:: oci.data_science.models + +.. autoclass:: CloneCreateFromModelGroupDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_science/models/oci.data_science.models.CloneCreateFromModelGroupVersionHistoryDetails.rst b/docs/api/data_science/models/oci.data_science.models.CloneCreateFromModelGroupVersionHistoryDetails.rst new file mode 100644 index 0000000000..e12eedf0bd --- /dev/null +++ b/docs/api/data_science/models/oci.data_science.models.CloneCreateFromModelGroupVersionHistoryDetails.rst @@ -0,0 +1,11 @@ +CloneCreateFromModelGroupVersionHistoryDetails +============================================== + +.. currentmodule:: oci.data_science.models + +.. autoclass:: CloneCreateFromModelGroupVersionHistoryDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_science/models/oci.data_science.models.CloneModelGroupDetails.rst b/docs/api/data_science/models/oci.data_science.models.CloneModelGroupDetails.rst new file mode 100644 index 0000000000..29de71c285 --- /dev/null +++ b/docs/api/data_science/models/oci.data_science.models.CloneModelGroupDetails.rst @@ -0,0 +1,11 @@ +CloneModelGroupDetails +====================== + +.. currentmodule:: oci.data_science.models + +.. autoclass:: CloneModelGroupDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_science/models/oci.data_science.models.CreateBaseModelGroupDetails.rst b/docs/api/data_science/models/oci.data_science.models.CreateBaseModelGroupDetails.rst new file mode 100644 index 0000000000..b0ce44a808 --- /dev/null +++ b/docs/api/data_science/models/oci.data_science.models.CreateBaseModelGroupDetails.rst @@ -0,0 +1,11 @@ +CreateBaseModelGroupDetails +=========================== + +.. currentmodule:: oci.data_science.models + +.. autoclass:: CreateBaseModelGroupDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_science/models/oci.data_science.models.CreateModelGroupDetails.rst b/docs/api/data_science/models/oci.data_science.models.CreateModelGroupDetails.rst new file mode 100644 index 0000000000..688885df93 --- /dev/null +++ b/docs/api/data_science/models/oci.data_science.models.CreateModelGroupDetails.rst @@ -0,0 +1,11 @@ +CreateModelGroupDetails +======================= + +.. currentmodule:: oci.data_science.models + +.. autoclass:: CreateModelGroupDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_science/models/oci.data_science.models.CreateModelGroupVersionHistoryDetails.rst b/docs/api/data_science/models/oci.data_science.models.CreateModelGroupVersionHistoryDetails.rst new file mode 100644 index 0000000000..e2c47c4c62 --- /dev/null +++ b/docs/api/data_science/models/oci.data_science.models.CreateModelGroupVersionHistoryDetails.rst @@ -0,0 +1,11 @@ +CreateModelGroupVersionHistoryDetails +===================================== + +.. currentmodule:: oci.data_science.models + +.. autoclass:: CreateModelGroupVersionHistoryDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_science/models/oci.data_science.models.CustomMetadata.rst b/docs/api/data_science/models/oci.data_science.models.CustomMetadata.rst new file mode 100644 index 0000000000..c289148b7a --- /dev/null +++ b/docs/api/data_science/models/oci.data_science.models.CustomMetadata.rst @@ -0,0 +1,11 @@ +CustomMetadata +============== + +.. currentmodule:: oci.data_science.models + +.. autoclass:: CustomMetadata + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_science/models/oci.data_science.models.HeterogeneousModelGroupDetails.rst b/docs/api/data_science/models/oci.data_science.models.HeterogeneousModelGroupDetails.rst new file mode 100644 index 0000000000..ff110a32c6 --- /dev/null +++ b/docs/api/data_science/models/oci.data_science.models.HeterogeneousModelGroupDetails.rst @@ -0,0 +1,11 @@ +HeterogeneousModelGroupDetails +============================== + +.. currentmodule:: oci.data_science.models + +.. autoclass:: HeterogeneousModelGroupDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_science/models/oci.data_science.models.HomogeneousModelGroupDetails.rst b/docs/api/data_science/models/oci.data_science.models.HomogeneousModelGroupDetails.rst new file mode 100644 index 0000000000..a631d02ea8 --- /dev/null +++ b/docs/api/data_science/models/oci.data_science.models.HomogeneousModelGroupDetails.rst @@ -0,0 +1,11 @@ +HomogeneousModelGroupDetails +============================ + +.. currentmodule:: oci.data_science.models + +.. autoclass:: HomogeneousModelGroupDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_science/models/oci.data_science.models.InfrastructureConfigurationDetails.rst b/docs/api/data_science/models/oci.data_science.models.InfrastructureConfigurationDetails.rst new file mode 100644 index 0000000000..f328dc8eef --- /dev/null +++ b/docs/api/data_science/models/oci.data_science.models.InfrastructureConfigurationDetails.rst @@ -0,0 +1,11 @@ +InfrastructureConfigurationDetails +================================== + +.. currentmodule:: oci.data_science.models + +.. autoclass:: InfrastructureConfigurationDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_science/models/oci.data_science.models.InstancePoolInfrastructureConfigurationDetails.rst b/docs/api/data_science/models/oci.data_science.models.InstancePoolInfrastructureConfigurationDetails.rst new file mode 100644 index 0000000000..4de25518c6 --- /dev/null +++ b/docs/api/data_science/models/oci.data_science.models.InstancePoolInfrastructureConfigurationDetails.rst @@ -0,0 +1,11 @@ +InstancePoolInfrastructureConfigurationDetails +============================================== + +.. currentmodule:: oci.data_science.models + +.. autoclass:: InstancePoolInfrastructureConfigurationDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_science/models/oci.data_science.models.MemberModelDetails.rst b/docs/api/data_science/models/oci.data_science.models.MemberModelDetails.rst new file mode 100644 index 0000000000..6a8cff477b --- /dev/null +++ b/docs/api/data_science/models/oci.data_science.models.MemberModelDetails.rst @@ -0,0 +1,11 @@ +MemberModelDetails +================== + +.. currentmodule:: oci.data_science.models + +.. autoclass:: MemberModelDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_science/models/oci.data_science.models.MemberModelEntries.rst b/docs/api/data_science/models/oci.data_science.models.MemberModelEntries.rst new file mode 100644 index 0000000000..37741245a8 --- /dev/null +++ b/docs/api/data_science/models/oci.data_science.models.MemberModelEntries.rst @@ -0,0 +1,11 @@ +MemberModelEntries +================== + +.. currentmodule:: oci.data_science.models + +.. autoclass:: MemberModelEntries + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_science/models/oci.data_science.models.ModelDeploymentModelStateSummary.rst b/docs/api/data_science/models/oci.data_science.models.ModelDeploymentModelStateSummary.rst new file mode 100644 index 0000000000..c1ac5efcfa --- /dev/null +++ b/docs/api/data_science/models/oci.data_science.models.ModelDeploymentModelStateSummary.rst @@ -0,0 +1,11 @@ +ModelDeploymentModelStateSummary +================================ + +.. currentmodule:: oci.data_science.models + +.. autoclass:: ModelDeploymentModelStateSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_science/models/oci.data_science.models.ModelGroup.rst b/docs/api/data_science/models/oci.data_science.models.ModelGroup.rst new file mode 100644 index 0000000000..3faebdf003 --- /dev/null +++ b/docs/api/data_science/models/oci.data_science.models.ModelGroup.rst @@ -0,0 +1,11 @@ +ModelGroup +========== + +.. currentmodule:: oci.data_science.models + +.. autoclass:: ModelGroup + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_science/models/oci.data_science.models.ModelGroupCloneSourceDetails.rst b/docs/api/data_science/models/oci.data_science.models.ModelGroupCloneSourceDetails.rst new file mode 100644 index 0000000000..80ca95ace7 --- /dev/null +++ b/docs/api/data_science/models/oci.data_science.models.ModelGroupCloneSourceDetails.rst @@ -0,0 +1,11 @@ +ModelGroupCloneSourceDetails +============================ + +.. currentmodule:: oci.data_science.models + +.. autoclass:: ModelGroupCloneSourceDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_science/models/oci.data_science.models.ModelGroupConfigurationDetails.rst b/docs/api/data_science/models/oci.data_science.models.ModelGroupConfigurationDetails.rst new file mode 100644 index 0000000000..909c089972 --- /dev/null +++ b/docs/api/data_science/models/oci.data_science.models.ModelGroupConfigurationDetails.rst @@ -0,0 +1,11 @@ +ModelGroupConfigurationDetails +============================== + +.. currentmodule:: oci.data_science.models + +.. autoclass:: ModelGroupConfigurationDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_science/models/oci.data_science.models.ModelGroupDeploymentConfigurationDetails.rst b/docs/api/data_science/models/oci.data_science.models.ModelGroupDeploymentConfigurationDetails.rst new file mode 100644 index 0000000000..0763270190 --- /dev/null +++ b/docs/api/data_science/models/oci.data_science.models.ModelGroupDeploymentConfigurationDetails.rst @@ -0,0 +1,11 @@ +ModelGroupDeploymentConfigurationDetails +======================================== + +.. currentmodule:: oci.data_science.models + +.. autoclass:: ModelGroupDeploymentConfigurationDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_science/models/oci.data_science.models.ModelGroupDetails.rst b/docs/api/data_science/models/oci.data_science.models.ModelGroupDetails.rst new file mode 100644 index 0000000000..0aa3a7bf4b --- /dev/null +++ b/docs/api/data_science/models/oci.data_science.models.ModelGroupDetails.rst @@ -0,0 +1,11 @@ +ModelGroupDetails +================= + +.. currentmodule:: oci.data_science.models + +.. autoclass:: ModelGroupDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_science/models/oci.data_science.models.ModelGroupModelSummary.rst b/docs/api/data_science/models/oci.data_science.models.ModelGroupModelSummary.rst new file mode 100644 index 0000000000..6d4a2cc43b --- /dev/null +++ b/docs/api/data_science/models/oci.data_science.models.ModelGroupModelSummary.rst @@ -0,0 +1,11 @@ +ModelGroupModelSummary +====================== + +.. currentmodule:: oci.data_science.models + +.. autoclass:: ModelGroupModelSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_science/models/oci.data_science.models.ModelGroupSummary.rst b/docs/api/data_science/models/oci.data_science.models.ModelGroupSummary.rst new file mode 100644 index 0000000000..48e91cab41 --- /dev/null +++ b/docs/api/data_science/models/oci.data_science.models.ModelGroupSummary.rst @@ -0,0 +1,11 @@ +ModelGroupSummary +================= + +.. currentmodule:: oci.data_science.models + +.. autoclass:: ModelGroupSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_science/models/oci.data_science.models.ModelGroupVersionHistory.rst b/docs/api/data_science/models/oci.data_science.models.ModelGroupVersionHistory.rst new file mode 100644 index 0000000000..7d6ecc243e --- /dev/null +++ b/docs/api/data_science/models/oci.data_science.models.ModelGroupVersionHistory.rst @@ -0,0 +1,11 @@ +ModelGroupVersionHistory +======================== + +.. currentmodule:: oci.data_science.models + +.. autoclass:: ModelGroupVersionHistory + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_science/models/oci.data_science.models.ModelGroupVersionHistorySummary.rst b/docs/api/data_science/models/oci.data_science.models.ModelGroupVersionHistorySummary.rst new file mode 100644 index 0000000000..7b54308192 --- /dev/null +++ b/docs/api/data_science/models/oci.data_science.models.ModelGroupVersionHistorySummary.rst @@ -0,0 +1,11 @@ +ModelGroupVersionHistorySummary +=============================== + +.. currentmodule:: oci.data_science.models + +.. autoclass:: ModelGroupVersionHistorySummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_science/models/oci.data_science.models.ModifyModelGroupDetails.rst b/docs/api/data_science/models/oci.data_science.models.ModifyModelGroupDetails.rst new file mode 100644 index 0000000000..3522609e20 --- /dev/null +++ b/docs/api/data_science/models/oci.data_science.models.ModifyModelGroupDetails.rst @@ -0,0 +1,11 @@ +ModifyModelGroupDetails +======================= + +.. currentmodule:: oci.data_science.models + +.. autoclass:: ModifyModelGroupDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_science/models/oci.data_science.models.PatchInsertNewMemberModels.rst b/docs/api/data_science/models/oci.data_science.models.PatchInsertNewMemberModels.rst new file mode 100644 index 0000000000..d6935c64ff --- /dev/null +++ b/docs/api/data_science/models/oci.data_science.models.PatchInsertNewMemberModels.rst @@ -0,0 +1,11 @@ +PatchInsertNewMemberModels +========================== + +.. currentmodule:: oci.data_science.models + +.. autoclass:: PatchInsertNewMemberModels + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_science/models/oci.data_science.models.PatchInstruction.rst b/docs/api/data_science/models/oci.data_science.models.PatchInstruction.rst new file mode 100644 index 0000000000..0d4036b37b --- /dev/null +++ b/docs/api/data_science/models/oci.data_science.models.PatchInstruction.rst @@ -0,0 +1,11 @@ +PatchInstruction +================ + +.. currentmodule:: oci.data_science.models + +.. autoclass:: PatchInstruction + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_science/models/oci.data_science.models.PatchModelGroupMemberModelDetails.rst b/docs/api/data_science/models/oci.data_science.models.PatchModelGroupMemberModelDetails.rst new file mode 100644 index 0000000000..b837c66467 --- /dev/null +++ b/docs/api/data_science/models/oci.data_science.models.PatchModelGroupMemberModelDetails.rst @@ -0,0 +1,11 @@ +PatchModelGroupMemberModelDetails +================================= + +.. currentmodule:: oci.data_science.models + +.. autoclass:: PatchModelGroupMemberModelDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_science/models/oci.data_science.models.PatchRemoveMemberModels.rst b/docs/api/data_science/models/oci.data_science.models.PatchRemoveMemberModels.rst new file mode 100644 index 0000000000..5cf14d6b03 --- /dev/null +++ b/docs/api/data_science/models/oci.data_science.models.PatchRemoveMemberModels.rst @@ -0,0 +1,11 @@ +PatchRemoveMemberModels +======================= + +.. currentmodule:: oci.data_science.models + +.. autoclass:: PatchRemoveMemberModels + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_science/models/oci.data_science.models.StackedModelGroupDetails.rst b/docs/api/data_science/models/oci.data_science.models.StackedModelGroupDetails.rst new file mode 100644 index 0000000000..571db12fc0 --- /dev/null +++ b/docs/api/data_science/models/oci.data_science.models.StackedModelGroupDetails.rst @@ -0,0 +1,11 @@ +StackedModelGroupDetails +======================== + +.. currentmodule:: oci.data_science.models + +.. autoclass:: StackedModelGroupDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_science/models/oci.data_science.models.UpdateInfrastructureConfigurationDetails.rst b/docs/api/data_science/models/oci.data_science.models.UpdateInfrastructureConfigurationDetails.rst new file mode 100644 index 0000000000..2a5169eed0 --- /dev/null +++ b/docs/api/data_science/models/oci.data_science.models.UpdateInfrastructureConfigurationDetails.rst @@ -0,0 +1,11 @@ +UpdateInfrastructureConfigurationDetails +======================================== + +.. currentmodule:: oci.data_science.models + +.. autoclass:: UpdateInfrastructureConfigurationDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_science/models/oci.data_science.models.UpdateInstancePoolInfrastructureConfigurationDetails.rst b/docs/api/data_science/models/oci.data_science.models.UpdateInstancePoolInfrastructureConfigurationDetails.rst new file mode 100644 index 0000000000..0e424adbcc --- /dev/null +++ b/docs/api/data_science/models/oci.data_science.models.UpdateInstancePoolInfrastructureConfigurationDetails.rst @@ -0,0 +1,11 @@ +UpdateInstancePoolInfrastructureConfigurationDetails +==================================================== + +.. currentmodule:: oci.data_science.models + +.. autoclass:: UpdateInstancePoolInfrastructureConfigurationDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_science/models/oci.data_science.models.UpdateModelGroupConfigurationDetails.rst b/docs/api/data_science/models/oci.data_science.models.UpdateModelGroupConfigurationDetails.rst new file mode 100644 index 0000000000..9b1f1687c7 --- /dev/null +++ b/docs/api/data_science/models/oci.data_science.models.UpdateModelGroupConfigurationDetails.rst @@ -0,0 +1,11 @@ +UpdateModelGroupConfigurationDetails +==================================== + +.. currentmodule:: oci.data_science.models + +.. autoclass:: UpdateModelGroupConfigurationDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_science/models/oci.data_science.models.UpdateModelGroupDeploymentConfigurationDetails.rst b/docs/api/data_science/models/oci.data_science.models.UpdateModelGroupDeploymentConfigurationDetails.rst new file mode 100644 index 0000000000..bb881d6e17 --- /dev/null +++ b/docs/api/data_science/models/oci.data_science.models.UpdateModelGroupDeploymentConfigurationDetails.rst @@ -0,0 +1,11 @@ +UpdateModelGroupDeploymentConfigurationDetails +============================================== + +.. currentmodule:: oci.data_science.models + +.. autoclass:: UpdateModelGroupDeploymentConfigurationDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_science/models/oci.data_science.models.UpdateModelGroupDetails.rst b/docs/api/data_science/models/oci.data_science.models.UpdateModelGroupDetails.rst new file mode 100644 index 0000000000..164ed3a006 --- /dev/null +++ b/docs/api/data_science/models/oci.data_science.models.UpdateModelGroupDetails.rst @@ -0,0 +1,11 @@ +UpdateModelGroupDetails +======================= + +.. currentmodule:: oci.data_science.models + +.. autoclass:: UpdateModelGroupDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_science/models/oci.data_science.models.UpdateModelGroupVersionHistoryDetails.rst b/docs/api/data_science/models/oci.data_science.models.UpdateModelGroupVersionHistoryDetails.rst new file mode 100644 index 0000000000..cc0bd67ff7 --- /dev/null +++ b/docs/api/data_science/models/oci.data_science.models.UpdateModelGroupVersionHistoryDetails.rst @@ -0,0 +1,11 @@ +UpdateModelGroupVersionHistoryDetails +===================================== + +.. currentmodule:: oci.data_science.models + +.. autoclass:: UpdateModelGroupVersionHistoryDetails + :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 5e9f4cec09..32d7c8e74e 100644 --- a/docs/api/landing.rst +++ b/docs/api/landing.rst @@ -19,6 +19,7 @@ API Reference * :doc:`Anomaly Detection ` * :doc:`Api Gateway ` * :doc:`Api Metadata ` +* :doc:`Api Platform ` * :doc:`Apm Domain ` * :doc:`Apm Synthetic ` * :doc:`Appliance Export Job ` @@ -312,6 +313,7 @@ API Reference ai_vision analytics announcements_service + api_platform apiaccesscontrol apigateway apm_config diff --git a/docs/api/vault.rst b/docs/api/vault.rst index 02fd33fb0c..626fd7ae30 100644 --- a/docs/api/vault.rst +++ b/docs/api/vault.rst @@ -25,6 +25,8 @@ Vault oci.vault.models.CreateSecretDetails oci.vault.models.FunctionTargetSystemDetails oci.vault.models.PassphraseGenerationContext + oci.vault.models.ReplicationConfig + oci.vault.models.ReplicationTarget oci.vault.models.RotationConfig oci.vault.models.ScheduleSecretDeletionDetails oci.vault.models.ScheduleSecretVersionDeletionDetails @@ -37,6 +39,7 @@ Vault oci.vault.models.SecretSummary oci.vault.models.SecretVersion oci.vault.models.SecretVersionSummary + oci.vault.models.SourceRegionInformation oci.vault.models.SshKeyGenerationContext oci.vault.models.TargetSystemDetails oci.vault.models.UpdateSecretDetails diff --git a/docs/api/vault/models/oci.vault.models.ReplicationConfig.rst b/docs/api/vault/models/oci.vault.models.ReplicationConfig.rst new file mode 100644 index 0000000000..cb3021eb22 --- /dev/null +++ b/docs/api/vault/models/oci.vault.models.ReplicationConfig.rst @@ -0,0 +1,11 @@ +ReplicationConfig +================= + +.. currentmodule:: oci.vault.models + +.. autoclass:: ReplicationConfig + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/vault/models/oci.vault.models.ReplicationTarget.rst b/docs/api/vault/models/oci.vault.models.ReplicationTarget.rst new file mode 100644 index 0000000000..312130a4c8 --- /dev/null +++ b/docs/api/vault/models/oci.vault.models.ReplicationTarget.rst @@ -0,0 +1,11 @@ +ReplicationTarget +================= + +.. currentmodule:: oci.vault.models + +.. autoclass:: ReplicationTarget + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/vault/models/oci.vault.models.SourceRegionInformation.rst b/docs/api/vault/models/oci.vault.models.SourceRegionInformation.rst new file mode 100644 index 0000000000..4addbdd9d7 --- /dev/null +++ b/docs/api/vault/models/oci.vault.models.SourceRegionInformation.rst @@ -0,0 +1,11 @@ +SourceRegionInformation +======================= + +.. currentmodule:: oci.vault.models + +.. autoclass:: SourceRegionInformation + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/examples/adk/multi-turn/sql_multi_turns.py b/examples/adk/multi-turn/sql_multi_turns.py new file mode 100644 index 0000000000..ea1e64bdd4 --- /dev/null +++ b/examples/adk/multi-turn/sql_multi_turns.py @@ -0,0 +1,57 @@ +# coding: utf-8 +# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +""" +This example shows how multi-turn works with a SQL Tool Agent. +""" + +from oci.addons import AgentClient, Agent +from oci.addons.adk.run.types import ObjectStorageInputLocation +from oci.addons.adk.tool.prebuilt.agentic_sql_tool import AgenticSqlTool, SqlDialect, ModelSize + + +def main(): + # Use a custom agent client for custom profile and endpoints settings + client = AgentClient( + auth_type="security_token", + profile="DEFAULT", + region="us-chicago-1", + ) + + # Instantiate a SQL Tool + sql_tool = AgenticSqlTool( + name="HR Manager SQL Tool", + description="A NL2SQL tool that translates natural language queries into SQL to retrieve insights from employee, job, and recruitment data.", + database_schema=ObjectStorageInputLocation(namespace_name="sql-namespace", bucket_name="sql-bucket", prefox="_sql.schema.sql"), + model_size=ModelSize.LARGE, + dialect=SqlDialect.ORACLE_SQL, + db_tool_connection_id="ocid1.databasetoolsconnection.oc1.us-chicago-1.amaaaaaax7756ra...", + enable_sql_execution=True, + enable_self_correction=True + ) + + # Instantiate the local agent object, with a SQL Tool + agent = Agent( + name="HR Assistant Agent", + client=client, + agent_endpoint_id="ocid1.genaiagentendpoint.oc1.us-chicago-1.amaaaaaax7...", + tools=[sql_tool] + ) + + # Set up the agent once (which pushes local instructions and tools to the remote agent resource) + agent.setup() + + # Run the agent to list all employees + input = "List all employees with their job titles." + response = agent.run(input) + response.pretty_print() + + # second turn, add session_id to maintain context + input = "Can you show me only the top 5?" + response = agent.run(input, session_id=response.session_id) + response.pretty_print() + + +if __name__ == "__main__": + main() diff --git a/examples/adk/single-agent-multi-tools/rag_sql_agent.py b/examples/adk/single-agent-multi-tools/rag_sql_agent.py new file mode 100644 index 0000000000..296fe37645 --- /dev/null +++ b/examples/adk/single-agent-multi-tools/rag_sql_agent.py @@ -0,0 +1,65 @@ +# coding: utf-8 +# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +""" +This example shows how an agent with RAG and SQL Tool work. +""" + +from oci.addons import AgentClient, Agent +from oci.addons.adk.run.types import ObjectStorageInputLocation +from oci.addons.adk.tool.prebuilt import AgenticRagTool +from oci.addons.adk.tool.prebuilt.agentic_sql_tool import AgenticSqlTool, ModelSize, SqlDialect + + +def main(): + # Use a custom agent client for custom profile and endpoints settings + client = AgentClient( + auth_type="security_token", + profile="DEFAULT", + region="us-chicago-1", + ) + + # Instantiate a SQL Tool + sql_tool = AgenticSqlTool( + name="HR Manager SQL Tool", + description="A NL2SQL tool that translates natural language queries into SQL to retrieve insights from employee, job, and recruitment data.", + database_schema=ObjectStorageInputLocation(namespace_name="sql-namespace", bucket_name="sql-bucket", + prefox="_sql.schema.sql"), + model_size=ModelSize.LARGE, + dialect=SqlDialect.ORACLE_SQL, + db_tool_connection_id="ocid1.databasetoolsconnection.oc1.us-chicago-1.amaaaaaax7756...", + enable_sql_execution=True, + enable_self_correction=True + ) + + # Instantiate a RAG Tool + rag_tool = AgenticRagTool( + name="HR Manager RAG Tool", + description="A RAG tool to retrieve HR content such as HR policies, job policies, and job descriptions.", + knowledge_base_ids=[ + "ocid1.genaiagentknowledgebasedev.oc1.us-chicago-1.amaaaaaax7756ra...", + ] + ) + + # Instantiate the local agent object, with SQLTool and AgenticRagTool + agent = Agent( + name="HR Assistant Multi-Tool Agent", + description="An integrated agent that uses an SQL tool to query structured HR data (e.g., jobs, applications, employees) and a RAG tool to retrieve HR content (e.g., job descriptions, policies).", + client=client, + agent_endpoint_id="ocid1.genaiagentendpoint.oc1.us-chicago-1.amaaaaaax7756raa7cyp...", + tools=[sql_tool, rag_tool] + ) + + # Set up the agent once (which pushes local instructions and tools to the remote agent resource) + agent.setup() + + # Run the agent with a user message + input = ("First, use the RAG tool to list all job titles from the system. " + "Then, use the SQL tool to retrieve corresponding job descriptions for each title.") + response = agent.run(input) + response.pretty_print() + + +if __name__ == "__main__": + main() diff --git a/examples/adk/single-agent-single-tool/_sql.database_schema.sql b/examples/adk/single-agent-single-tool/_sql.database_schema.sql new file mode 100644 index 0000000000..a0c510f534 --- /dev/null +++ b/examples/adk/single-agent-single-tool/_sql.database_schema.sql @@ -0,0 +1,51 @@ +CREATE TABLE Departments ( + department_id INT PRIMARY KEY, + department_name VARCHAR(100) +); + +CREATE TABLE Jobs ( + job_id INT PRIMARY KEY, + job_title VARCHAR(100), + min_salary DECIMAL(10, 2), + max_salary DECIMAL(10, 2), + department_id INT, + FOREIGN KEY (department_id) REFERENCES Departments(department_id) +); + +CREATE TABLE Employees ( + employee_id INT PRIMARY KEY, + first_name VARCHAR(50), + last_name VARCHAR(50), + job_id INT, + hire_date DATE, + salary DECIMAL(10, 2), + manager_id INT, + FOREIGN KEY (job_id) REFERENCES Jobs(job_id), + FOREIGN KEY (manager_id) REFERENCES Employees(employee_id) +); + +CREATE TABLE Job_Postings ( + posting_id INT PRIMARY KEY, + job_id INT, + posted_date DATE, + closing_date DATE, + status VARCHAR(20), + FOREIGN KEY (job_id) REFERENCES Jobs(job_id) +); + +CREATE TABLE Applications ( + application_id INT PRIMARY KEY, + posting_id INT, + applicant_name VARCHAR(100), + application_date DATE, + status VARCHAR(20), + FOREIGN KEY (posting_id) REFERENCES Job_Postings(posting_id) +); + +CREATE TABLE Hiring_Processes ( + process_id INT PRIMARY KEY, + application_id INT, + interview_date DATE, + decision VARCHAR(20), + FOREIGN KEY (application_id) REFERENCES Applications(application_id) +); diff --git a/examples/adk/single-agent-single-tool/sql_agent.py b/examples/adk/single-agent-single-tool/sql_agent.py new file mode 100644 index 0000000000..ba25b02f89 --- /dev/null +++ b/examples/adk/single-agent-single-tool/sql_agent.py @@ -0,0 +1,89 @@ +# coding: utf-8 +# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +# SQL Tool Guidelines: https://docs.oracle.com/en-us/iaas/Content/generative-ai-agents/sqltool-guidelines.htm + +""" +This example shows an agent with a single SQL tool. +""" + +from oci.addons.adk import Agent, AgentClient +from oci.addons.adk.run.types import InlineInputLocation, ObjectStorageInputLocation +from oci.addons.adk.tool.prebuilt.agentic_sql_tool import AgenticSqlTool, SqlDialect, ModelSize + + +INLINE_DATABASE_SCHEMA = "CREATE TABLE Departments (department_id INT PRIMARY KEY, department_name VARCHAR(100)); \ +CREATE TABLE Jobs (job_id INT PRIMARY KEY, job_title VARCHAR(100), min_salary DECIMAL(10,2), max_salary DECIMAL(10,2), department_id INT, FOREIGN KEY (department_id) REFERENCES Departments(department_id)); \ +CREATE TABLE Employees (employee_id INT PRIMARY KEY, first_name VARCHAR(50), last_name VARCHAR(50), job_id INT, hire_date DATE, salary DECIMAL(10,2), manager_id INT, FOREIGN KEY (job_id) REFERENCES Jobs(job_id), FOREIGN KEY (manager_id) REFERENCES Employees(employee_id)); \ +CREATE TABLE Job_Postings (posting_id INT PRIMARY KEY, job_id INT, posted_date DATE, closing_date DATE, status VARCHAR(20), FOREIGN KEY (job_id) REFERENCES Jobs(job_id)); \ +CREATE TABLE Applications (application_id INT PRIMARY KEY, posting_id INT, applicant_name VARCHAR(100), application_date DATE, status VARCHAR(20), FOREIGN KEY (posting_id) REFERENCES Job_Postings(posting_id)); \ +CREATE TABLE Hiring_Processes (process_id INT PRIMARY KEY, application_id INT, interview_date DATE, decision VARCHAR(20), FOREIGN KEY (application_id) REFERENCES Applications(application_id));" + + +def main(): + # Use a custom agent client for custom profile and endpoints settings + client = AgentClient( + auth_type="security_token", + profile="DEFAULT", + region="us-chicago-1" + ) + + # Instantiate a SQL Tool + sql_tool_with_inline_schema = AgenticSqlTool( + name="HR Manager SQL Tool - Inline Schema", + description="A NL2SQL tool that translates natural language queries into SQL to retrieve insights from employee, job, and recruitment data.", + database_schema=InlineInputLocation(content=INLINE_DATABASE_SCHEMA), + model_size=ModelSize.LARGE, + dialect=SqlDialect.ORACLE_SQL, + db_tool_connection_id="ocid1.databasetoolsconnection.oc1.us-chicago-1.amaaaaaax7756raa7...", + enable_sql_execution=True, + enable_self_correction=True, + icl_examples=ObjectStorageInputLocation(namespace_name="namespace", bucket_name="bucket", prefix="_sql.icl_examples.txt"), + table_and_column_description=ObjectStorageInputLocation(namespace_name="namespace", bucket_name="bucket", prefix="_sql.table_col_desc.pdf"), + custom_instructions="instruction" + ) + + sql_tool_with_file_schema = AgenticSqlTool( # noqa + name="HR Manager SQL Tool - File Based schema", + description="A NL2SQL tool that translates natural language queries into SQL to retrieve insights from employee, job, and recruitment data.", + database_schema=InlineInputLocation(content=open("_sql.database_schema.sql").read()), + model_size=ModelSize.LARGE, + dialect=SqlDialect.ORACLE_SQL, + db_tool_connection_id="ocid1.databasetoolsconnection.oc1.us-chicago-1.amaaaaa...", + enable_sql_execution=True, + enable_self_correction=True + ) + + sql_tool_with_object_storage_schema = AgenticSqlTool( # noqa + name="HR Manager SQL Tool - Object Storage schema", + description="A NL2SQL tool that translates natural language queries into SQL to retrieve insights from employee, job, and recruitment data.", + database_schema=ObjectStorageInputLocation(namespace_name="namespace", bucket_name="bucket", prefix="_sql.schema.sql"), + model_size=ModelSize.LARGE, + dialect=SqlDialect.ORACLE_SQL, + db_tool_connection_id="ocid1.databasetoolsconnection.oc1.us-chicago-1.amaaaaaax...", + enable_sql_execution=True, + enable_self_correction=True + ) + + # Instantiate the local agent object, with SQL Tool + agent = Agent( + name="HR Assistant Agent", + client=client, + agent_endpoint_id="ocid1.genaiagentendpoint.oc1.us-chicago-1.amaaaaaax7756raard4...", + tools=[sql_tool_with_inline_schema] + ) + + # Set up the agent once (which pushes local instructions and tools to the remote agent resource) + agent.setup() + + # Run the agent with a user message + input = "List all employees with their job titles." + response = agent.run(input) + response.pretty_print() + + # Print Response Traces + response.pretty_print_traces() + + +if __name__ == "__main__": + main() diff --git a/src/oci/__init__.py b/src/oci/__init__.py index f201eabc96..772a1eb842 100644 --- a/src/oci/__init__.py +++ b/src/oci/__init__.py @@ -19,7 +19,7 @@ else: __all__ = [ "BaseClient", "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", "apiaccesscontrol", "apigateway", "apm_config", "apm_control_plane", "apm_synthetics", "apm_traces", "appmgmt_control", "artifacts", "audit", "autoscaling", "bastion", "bds", "blockchain", "budget", "capacity_management", "certificates", "certificates_management", "cims", "cloud_bridge", "cloud_guard", "cloud_migrations", "cluster_placement_groups", "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", "dblm", "dbmulticloud", "delegate_access_control", "demand_signal", "desktops", "devops", "disaster_recovery", "distributed_database", "dns", "dts", "em_warehouse", "email", "email_data_plane", "events", "file_storage", "fleet_apps_management", "fleet_software_update", "functions", "fusion_apps", "generative_ai", "generative_ai_agent", "generative_ai_agent_runtime", "generative_ai_inference", "generic_artifacts_content", "globally_distributed_database", "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", "lustre_file_storage", "management_agent", "management_dashboard", "marketplace", "marketplace_private_offer", "marketplace_publisher", "media_services", "mngdmac", "model_deployment", "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_scheduler", "resource_search", "rover", "sch", "secrets", "security_attribute", "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", "wlms", "work_requests", "zpr" + "access_governance_cp", "adm", "ai_anomaly_detection", "ai_document", "ai_language", "ai_speech", "ai_vision", "analytics", "announcements_service", "api_platform", "apiaccesscontrol", "apigateway", "apm_config", "apm_control_plane", "apm_synthetics", "apm_traces", "appmgmt_control", "artifacts", "audit", "autoscaling", "bastion", "bds", "blockchain", "budget", "capacity_management", "certificates", "certificates_management", "cims", "cloud_bridge", "cloud_guard", "cloud_migrations", "cluster_placement_groups", "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", "dblm", "dbmulticloud", "delegate_access_control", "demand_signal", "desktops", "devops", "disaster_recovery", "distributed_database", "dns", "dts", "em_warehouse", "email", "email_data_plane", "events", "file_storage", "fleet_apps_management", "fleet_software_update", "functions", "fusion_apps", "generative_ai", "generative_ai_agent", "generative_ai_agent_runtime", "generative_ai_inference", "generic_artifacts_content", "globally_distributed_database", "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", "lustre_file_storage", "management_agent", "management_dashboard", "marketplace", "marketplace_private_offer", "marketplace_publisher", "media_services", "mngdmac", "model_deployment", "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_scheduler", "resource_search", "rover", "sch", "secrets", "security_attribute", "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", "wlms", "work_requests", "zpr" ] 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, apiaccesscontrol, apigateway, apm_config, apm_control_plane, apm_synthetics, apm_traces, appmgmt_control, artifacts, audit, autoscaling, bastion, bds, blockchain, budget, capacity_management, certificates, certificates_management, cims, cloud_bridge, cloud_guard, cloud_migrations, cluster_placement_groups, 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, dblm, dbmulticloud, delegate_access_control, demand_signal, desktops, devops, disaster_recovery, distributed_database, dns, dts, em_warehouse, email, email_data_plane, events, file_storage, fleet_apps_management, fleet_software_update, functions, fusion_apps, generative_ai, generative_ai_agent, generative_ai_agent_runtime, generative_ai_inference, generic_artifacts_content, globally_distributed_database, 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, lustre_file_storage, management_agent, management_dashboard, marketplace, marketplace_private_offer, marketplace_publisher, media_services, mngdmac, model_deployment, 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_scheduler, resource_search, rover, sch, secrets, security_attribute, 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, wlms, work_requests, zpr + from . import access_governance_cp, adm, ai_anomaly_detection, ai_document, ai_language, ai_speech, ai_vision, analytics, announcements_service, api_platform, apiaccesscontrol, apigateway, apm_config, apm_control_plane, apm_synthetics, apm_traces, appmgmt_control, artifacts, audit, autoscaling, bastion, bds, blockchain, budget, capacity_management, certificates, certificates_management, cims, cloud_bridge, cloud_guard, cloud_migrations, cluster_placement_groups, 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, dblm, dbmulticloud, delegate_access_control, demand_signal, desktops, devops, disaster_recovery, distributed_database, dns, dts, em_warehouse, email, email_data_plane, events, file_storage, fleet_apps_management, fleet_software_update, functions, fusion_apps, generative_ai, generative_ai_agent, generative_ai_agent_runtime, generative_ai_inference, generic_artifacts_content, globally_distributed_database, 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, lustre_file_storage, management_agent, management_dashboard, marketplace, marketplace_private_offer, marketplace_publisher, media_services, mngdmac, model_deployment, 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_scheduler, resource_search, rover, sch, secrets, security_attribute, 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, wlms, work_requests, zpr diff --git a/src/oci/addons/adk/agent.py b/src/oci/addons/adk/agent.py index 7cbdc1f77f..a976a6d611 100644 --- a/src/oci/addons/adk/agent.py +++ b/src/oci/addons/adk/agent.py @@ -18,6 +18,7 @@ from oci.addons.adk.run.response import RunResponse from oci.addons.adk.run.types import FunctionCall, PerformedAction, RequiredAction, RawResponse from oci.addons.adk.tool import FunctionTool, Toolkit, tool +from oci.addons.adk.tool.prebuilt.agentic_sql_tool import AgenticSqlTool from oci.addons.adk.tool.utils import dedupe_tools_list, diff_local_and_remote_tool from oci.addons.adk.tool.prebuilt import AgenticRagTool @@ -41,7 +42,7 @@ class Agent: # List of tools the agent can use tools: Optional[ - List[Union[Callable, FunctionTool, Toolkit, "Agent", AgenticRagTool]] + List[Union[Callable, FunctionTool, Toolkit, "Agent", AgenticRagTool, AgenticSqlTool]] ] = None # Optional name for the agent @@ -56,7 +57,7 @@ def __init__( client: Optional[AgentClient] = None, instructions: str = "You are a helpful assistant", tools: Optional[ - List[Callable | FunctionTool | Toolkit | "Agent" | AgenticRagTool] + List[Callable | FunctionTool | Toolkit | "Agent" | AgenticRagTool | AgenticSqlTool] ] = None, name: Optional[str] = None, description: Optional[str] = None, @@ -81,7 +82,7 @@ def __init__( self.name = name self.description = description - # varibles not set up user + # variables not set up user self._agent_details: Dict[str, Any] = {} self._local_handler_functions: List[FunctionTool] = ( self._process_function_tools() @@ -90,6 +91,10 @@ def __init__( self._process_agentic_rag_tools() ) + self._local_sql_tools: List[AgenticSqlTool] = ( + self._process_sql_tools() + ) + # initialization self._init_client() @@ -127,11 +132,13 @@ def setup(self) -> None: 2. synchronizing agent to remote, 3. synchronizing local and remote function tools. 4. synchronizing local and remote rag tools. + 5. synchronizing local and remote sql tools. """ self._check_agent_details_integrity() self._sync_agent_to_remote() self._sync_function_tools_to_remote() self._sync_rag_tools_to_remote() + self._sync_sql_tools_to_remote() def run( self, @@ -599,9 +606,33 @@ def _sync_rag_tools_to_remote(self) -> None: self._sync_local_and_remote_tools(local_rag_tools, remote_rag_tools) return + def _sync_sql_tools_to_remote(self) -> None: + """ + Synchronize local and remote SQL tools. + """ + logger.info("Checking synchronization of local and remote SQL tools...") + local_sql_tools = self._local_sql_tools + # Get existing remote SQL tools + remote_sql_tools = self.client.find_tools( + compartment_id=self.agent_details["compartment_id"], + agent_id=self.agent_details["agent_id"], + ) + # Filter for active SQL tools with ADK tags + remote_sql_tools = [ + tool + for tool in remote_sql_tools + if (tool.get("lifecycle_state") == "ACTIVE" and + set(FREEFORM_TAGS.keys()).issubset(tool.get("freeform_tags", {}).keys()) and + tool.get("tool_config", {}).get("tool_config_type") == "SQL_TOOL_CONFIG" + ) + ] + self._log_sql_tool_counts(local_sql_tools, remote_sql_tools) + self._sync_local_and_remote_tools(local_sql_tools, remote_sql_tools) + return + def _sync_local_and_remote_tools( self, - local_tools: List[FunctionTool] | List[AgenticRagTool], + local_tools: List[FunctionTool] | List[AgenticRagTool] | List[AgenticSqlTool], remote_tools: List[Dict[str, Any]] ) -> None: """ @@ -612,7 +643,7 @@ def _sync_local_and_remote_tools( Args: local_tools: The local tools - types: List[FunctionTool] | List[AgenticRagTool] + types: List[FunctionTool] | List[AgenticRagTool] | List[AgenticSqlTool] remote_tools: The remote tools types: List[Dict[str, Any]] """ @@ -644,6 +675,12 @@ def _sync_local_and_remote_tools( compartment_id=self.agent_details["compartment_id"], agent_id=self.agent_details["agent_id"], ) + elif isinstance(local_tool, AgenticSqlTool): + new_tool = self.client.add_sql_tool( + local_tool, + compartment_id=self.agent_details["compartment_id"], + agent_id=self.agent_details["agent_id"], + ) new_tool_id = new_tool.get("id", "") self.wait_tool_active(new_tool_id) return @@ -689,6 +726,23 @@ def _process_agentic_rag_tools(self) -> List[AgenticRagTool]: # de-duplicate tools return dedupe_tools_list(available_agentic_rag_tools) + def _process_sql_tools(self) -> List[AgenticSqlTool]: + """ + Filter SQL Tools from local tools + and de-duplicate tools + + Returns: + List of processed AgenticSqlTool objects + """ + available_sql_tools: List[AgenticSqlTool] = [] + + if self.tools is not None: + for local_tool in self.tools: + if isinstance(local_tool, AgenticSqlTool): + available_sql_tools.append(local_tool) + + return dedupe_tools_list(available_sql_tools) + @staticmethod def _has_required_actions(response: Dict[str, Any]) -> bool: """Check if the response contains required actions.""" @@ -903,3 +957,28 @@ def _log_tool_counts( border_style="blue", expand=False, ) + + def _log_sql_tool_counts( + self, local_tools: List[AgenticSqlTool], + remote_tools: List[Dict[str, Any]] + ) -> None: + """ + Log the number of local and remote sql tools found. + + Args: + local_tools: List of local sql tool objects + remote_tools: List of remote sql tool dictionaries + """ + message_text = ( + f"Local SQL tools ({len(local_tools) if local_tools else 0}):\n" + f"[bold green]{sorted([tool.name for tool in local_tools])}[/bold green]\n\n" # noqa: E501 + f"Remote SQL tools ({len(remote_tools) if remote_tools else 0}):\n" + f"[bold cyan]{sorted([tool['display_name'] for tool in remote_tools])}[/bold cyan]" # noqa: E501 + # noqa: E501 + ) + logger.print( + message_text, + title="Local and remote SQL tools found", + border_style="blue", + expand=False, + ) diff --git a/src/oci/addons/adk/agent_client.py b/src/oci/addons/adk/agent_client.py index 56e1132b57..3ed58084b3 100644 --- a/src/oci/addons/adk/agent_client.py +++ b/src/oci/addons/adk/agent_client.py @@ -22,6 +22,8 @@ RagToolConfig, UpdateAgentDetails, UpdateToolDetails, + SqlToolConfig, + DatabaseToolConnection, ) from oci.generative_ai_agent_runtime import GenerativeAiAgentRuntimeClient from oci.generative_ai_agent_runtime.models import ( @@ -47,7 +49,8 @@ from oci.addons.adk.run.types import PerformedAction from oci.addons.adk.tool import FunctionTool from oci.addons.adk.tool.prebuilt import AgenticRagTool -from oci.addons.adk.util import build_custom_function_params, get_region_endpoint +from oci.addons.adk.tool.prebuilt.agentic_sql_tool import AgenticSqlTool +from oci.addons.adk.util import build_custom_function_params, get_region_endpoint, create_input_location class AgentClient: @@ -444,6 +447,67 @@ def add_rag_tool( return to_dict(add_tool_response.data) + def add_sql_tool( + self, + sql_tool: AgenticSqlTool, + compartment_id: str, + agent_id: str, + ) -> Dict[str, Any]: + """ + Add an SQL tool to the agent. + + Args: + sql_tool: The SQL tool to add + compartment_id: The compartment ID + agent_id: The agent ID + + Returns: + Dict[str, Any]: The added tool as a dict with its attributes + + Raises: + AgentError: If adding the tool fails + """ + + tool_config = SqlToolConfig( + database_schema=create_input_location(sql_tool.database_schema.dict()), + + database_connection=DatabaseToolConnection(connection_id=sql_tool.db_tool_connection_id) + if sql_tool.db_tool_connection_id else None, + + should_enable_sql_execution=sql_tool.enable_sql_execution, + should_enable_self_correction=sql_tool.enable_self_correction, + dialect=sql_tool.dialect.value, + model_size=sql_tool.model_size.value, + + icl_examples=create_input_location(sql_tool.icl_examples.dict()) + if sql_tool.icl_examples else None, + + table_and_column_description=create_input_location(sql_tool.table_and_column_description.dict()) + if sql_tool.table_and_column_description else None, + + generation_llm_customization=LlmCustomization(instruction=sql_tool.custom_instructions) + if sql_tool.custom_instructions else None, + ) + + create_tool_details = CreateToolDetails( + compartment_id=compartment_id, + agent_id=agent_id, + display_name=sql_tool.name, + description=sql_tool.description, + tool_config=tool_config, + freeform_tags=FREEFORM_TAGS, + ) + + add_tool_response: Response = self._invoke( + method=self._mgmt_client.create_tool, + success_message="Add sql tool successful", + error_message="Failed to add sql tool", + debug=self.debug, + create_tool_details=create_tool_details, + ) + + return to_dict(add_tool_response.data) + def update_function_tool( self, tool_id: str, @@ -525,6 +589,57 @@ def update_rag_tool( update_tool_details=update_tool_details, ) + def update_sql_tool( + self, + tool_id: str, + sql_tool: AgenticSqlTool, + ) -> None: + """ + Update a sql tool by ID. + Args: + tool_id: The ID of the tool to update + sql_tool: The sql tool to update + Returns: + None + Raises: + AgentError: If updating the tool fails + """ + tool_config = SqlToolConfig( + database_schema=create_input_location(sql_tool.database_schema.dict()), + + database_connection=DatabaseToolConnection(connection_id=sql_tool.db_tool_connection_id) + if sql_tool.db_tool_connection_id else None, + + should_enable_sql_execution=sql_tool.enable_sql_execution, + should_enable_self_correction=sql_tool.enable_self_correction, + dialect=sql_tool.dialect.value, + model_size=sql_tool.model_size.value, + + icl_examples=create_input_location(sql_tool.icl_examples.dict()) + if sql_tool.icl_examples else None, + + table_and_column_description=create_input_location(sql_tool.table_and_column_description.dict()) + if sql_tool.table_and_column_description else None, + + generation_llm_customization=LlmCustomization(instruction=sql_tool.custom_instructions) + if sql_tool.custom_instructions else None, + ) + + update_tool_details = UpdateToolDetails( + tool_config=tool_config, + display_name=sql_tool.name, + description=sql_tool.description, + freeform_tags=FREEFORM_TAGS, + ) + self._invoke( + method=self._mgmt_client.update_tool, + success_message="Update sql tool successful", + error_message="Failed to update sql tool", + debug=self.debug, + tool_id=tool_id, + update_tool_details=update_tool_details, + ) + def get_agent(self, agent_id: str) -> Dict[str, Any]: """ Get the agent details. diff --git a/src/oci/addons/adk/run/types.py b/src/oci/addons/adk/run/types.py index 49c456a343..fe91c32535 100644 --- a/src/oci/addons/adk/run/types.py +++ b/src/oci/addons/adk/run/types.py @@ -6,6 +6,7 @@ ADK Run action models """ import json +from enum import Enum from typing import Any, Dict, List, Optional from pydantic import BaseModel, Field @@ -127,3 +128,43 @@ def get_nested_text(self) -> str | None: return self.raw_data["message"]["content"]["text"] except (KeyError, TypeError, AgentError): return None + + +class InputLocationType(str, Enum): + """Represents teh type of input location.""" + + INLINE = "INLINE" + OBJECT_STORAGE_PREFIX = "OBJECT_STORAGE_PREFIX" + + def get_class(self): + return { + InputLocationType.INLINE: InlineInputLocation, + InputLocationType.OBJECT_STORAGE_PREFIX: ObjectStorageInputLocation + }.get(self) + + +class InputLocation(BaseModel): + """Represents Input Location.""" + + input_location_type: InputLocationType + + def to_dict(self): + data = self.model_dump() + data["input_location_type"] = self.input_location_type.value + return data + + +class InlineInputLocation(InputLocation): + """Represents an input location where data is provided directly as inline content.""" + + input_location_type: InputLocationType = Field(default=InputLocationType.INLINE) + content: str + + +class ObjectStorageInputLocation(InputLocation): + """Represents an input location where data is stored in an object storage service.""" + + input_location_type: InputLocationType = Field(default=InputLocationType.OBJECT_STORAGE_PREFIX) + namespace_name: str + bucket_name: str + prefix: str diff --git a/src/oci/addons/adk/tool/prebuilt/agentic_sql_tool.py b/src/oci/addons/adk/tool/prebuilt/agentic_sql_tool.py new file mode 100644 index 0000000000..e1777b8007 --- /dev/null +++ b/src/oci/addons/adk/tool/prebuilt/agentic_sql_tool.py @@ -0,0 +1,99 @@ +# coding: utf-8 +# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +""" +A prebuilt SQL Tool +""" + +from enum import Enum +from typing import Optional +from pydantic import BaseModel, Field, model_validator +from oci.addons.adk.run.types import InputLocation + + +class SqlDialect(str, Enum): + """Represents SQL Dialect""" + ORACLE_SQL = "ORACLE_SQL" + SQLITE = "SQLITE" + + +class ModelSize(str, Enum): + """Represents Model Size""" + SMALL = "SMALL" + LARGE = "LARGE" + + +class AgenticSqlTool(BaseModel): + """A server-side tool that converts natural language queries into SQL""" + + name: str = Field( + default="SQL Tool", + description="The name of the tool, used for identification and invocation." + ) + + description: str = Field( + default="", + description="A human-readable summary of the tool's purpose and usage." + ) + + database_schema: InputLocation = Field( + ..., + description=( + "The database schema definition, either provided inline or referenced from OCI Object Storage." + ) + ) + + db_tool_connection_id: Optional[str] = Field( + default=None, + description="OCI Database Tools connection OCID used for executing queries against the target database." + ) + + dialect: SqlDialect = Field( + default=SqlDialect.ORACLE_SQL, + description="The SQL dialect used for query generation, ORACLE_SQL or SQLITE." + ) + + model_size: ModelSize = Field( + default=ModelSize.SMALL, + description=( + "Specifies the model used for SQL generation. " + "'SMALL' provides faster response times, while 'LARGE' improves output quality." + ) + ) + + enable_sql_execution: bool = Field( + default=False, + description="If True, enables SQL query execution using the provided database connection." + ) + + enable_self_correction: bool = Field( + default=False, + description="If True, allows the tool to automatically correct SQL errors using additional attempts." + ) + + icl_examples: Optional[InputLocation] = Field( + default=None, + description=( + "In-context learning examples for enhancing SQL query generation. " + ) + ) + + table_and_column_description: Optional[InputLocation] = Field( + default=None, + description=( + "Detailed metadata describing table and column semantics. " + "This helps improve the quality and accuracy of generated SQL queries." + ) + ) + + custom_instructions: Optional[str] = Field( + default=None, + description="User-provided instructions to customize SQL generation behavior." + ) + + @model_validator(mode="after") + def validate_db_tool_connection_id_required_when_execution_or_correction(self) -> "AgenticSqlTool": + if (self.enable_sql_execution or self.enable_self_correction) and not self.db_tool_connection_id: + raise ValueError("`db_tool_connection_id` must be provided when SQL execution or self-correction is enabled.") + return self diff --git a/src/oci/addons/adk/tool/utils.py b/src/oci/addons/adk/tool/utils.py index 516987ce2c..4bbe7db923 100644 --- a/src/oci/addons/adk/tool/utils.py +++ b/src/oci/addons/adk/tool/utils.py @@ -4,14 +4,15 @@ from typing import Dict, Any, List, TypeVar +from oci.addons.adk.logger import default_logger as logger from oci.addons.adk.tool.function_tool import FunctionTool from oci.addons.adk.tool.prebuilt.agentic_rag_tool import AgenticRagTool -from oci.addons.adk.logger import default_logger as logger +from oci.addons.adk.tool.prebuilt.agentic_sql_tool import AgenticSqlTool from oci.addons.adk.util import build_custom_function_params def diff_local_and_remote_tool( - local_tool: FunctionTool | AgenticRagTool, + local_tool: FunctionTool | AgenticRagTool | AgenticSqlTool, remote_tool: Dict[str, Any], ) -> bool: """ @@ -61,6 +62,29 @@ def diff_local_and_remote_tool( ) } + elif isinstance(local_tool, AgenticSqlTool): + local_tool_json_spec = { + "name": local_tool.name, + "description": local_tool.description, + "database_schema": local_tool.database_schema.to_dict(), + "db_tool_connection_id": local_tool.db_tool_connection_id, + "dialect": local_tool.dialect.value, + "model_size": local_tool.model_size.value, + "should_enable_sql_execution": local_tool.enable_sql_execution, + "should_enable_self_correction": local_tool.enable_self_correction + } + remote_tool_config = remote_tool.get("tool_config", {}) + remote_tool_json_spec = { + "name": remote_tool.get("display_name", ""), + "description": remote_tool.get("description", ""), + "database_schema": remote_tool_config.get("database_schema", {}), + "db_tool_connection_id": (remote_tool_config.get("database_connection") or {}).get("connection_id"), + "dialect": remote_tool_config.get("dialect", ""), + "model_size": remote_tool_config.get("model_size", ""), + "should_enable_sql_execution": remote_tool_config.get("should_enable_sql_execution"), + "should_enable_self_correction": remote_tool_config.get("should_enable_self_correction") + } + logger.debug(f"Local tool JSON spec: {local_tool_json_spec}") logger.debug(f"Remote tool JSON spec: {remote_tool_json_spec}") @@ -68,7 +92,7 @@ def diff_local_and_remote_tool( def compare_local_and_remote_tools( - local_tools: List[FunctionTool] | List[AgenticRagTool], + local_tools: List[FunctionTool] | List[AgenticRagTool] | List[AgenticSqlTool], remote_tools: List[Dict[str, Any]], ) -> bool: """ diff --git a/src/oci/addons/adk/util.py b/src/oci/addons/adk/util.py index 629760cbc4..75b237f7a2 100644 --- a/src/oci/addons/adk/util.py +++ b/src/oci/addons/adk/util.py @@ -9,6 +9,9 @@ from docstring_parser import parse from oci import regions +from oci.addons.adk.agent_error import AgentError +from oci.addons.adk.logger import default_logger as logger +from oci.generative_ai_agent.models import InputLocation, InlineInputLocation, ObjectStorageInputLocation class DocstringParser: @@ -318,3 +321,22 @@ def get_region_endpoint( region=region, service_endpoint_template=service_endpoint_template, ) + + +def create_input_location(data: dict) -> InputLocation: + try: + input_location_type = data.get('input_location_type') + subtype_name = InputLocation.get_subtype({'inputLocationType': input_location_type}) + + if subtype_name == "InlineInputLocation": + return InlineInputLocation(**data) + elif subtype_name == "ObjectStorageInputLocation": + return ObjectStorageInputLocation(**data) + else: + return InputLocation(**data) + + except (KeyError, TypeError, AttributeError) as e: + logger.debug(f"Failed to create InputLocation from: {data}, Error: {str(e)}") + raise AgentError( + message=f"Failed to create InputLocation from: {data}" + ) from e diff --git a/src/oci/ai_speech/ai_service_speech_client.py b/src/oci/ai_speech/ai_service_speech_client.py index 23d5e0fddf..f23165c9a5 100644 --- a/src/oci/ai_speech/ai_service_speech_client.py +++ b/src/oci/ai_speech/ai_service_speech_client.py @@ -1869,10 +1869,13 @@ def list_voices(self, **kwargs): The ID of the compartment in which to list resources. :param str model_name: (optional) - The model the user wants to run the inference on. + The model name to filter voices for given model name. Allowed values are: "TTS_1_STANDARD", "TTS_2_NATURAL" + :param str language_code: (optional) + The Code or Id of the language to filter voices for given language code. + :param str display_name: (optional) The name of the speaker voice in which the user wants tts inference to be. @@ -1910,6 +1913,7 @@ def list_voices(self, **kwargs): "retry_strategy", "compartment_id", "model_name", + "language_code", "display_name", "opc_request_id" ] @@ -1928,6 +1932,7 @@ def list_voices(self, **kwargs): query_params = { "compartmentId": kwargs.get("compartment_id", missing), "modelName": kwargs.get("model_name", missing), + "languageCode": kwargs.get("language_code", 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} diff --git a/src/oci/ai_speech/models/customization_model_details.py b/src/oci/ai_speech/models/customization_model_details.py index a5550665f9..9c31523006 100644 --- a/src/oci/ai_speech/models/customization_model_details.py +++ b/src/oci/ai_speech/models/customization_model_details.py @@ -12,7 +12,7 @@ @init_model_state_from_kwargs class CustomizationModelDetails(object): """ - Customization details. + Details of the base ASR model to train a Customization for. """ #: A constant which can be used with the domain property of a CustomizationModelDetails. @@ -54,7 +54,7 @@ def __init__(self, **kwargs): def domain(self): """ Gets the domain of this CustomizationModelDetails. - Customization Domain + Domain of the ASR model Allowed values for this property are: "GENERIC", "MEDICAL", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -69,7 +69,7 @@ def domain(self): def domain(self, domain): """ Sets the domain of this CustomizationModelDetails. - Customization Domain + Domain of the ASR model :param domain: The domain of this CustomizationModelDetails. diff --git a/src/oci/ai_speech/models/tts_oracle_speech_settings.py b/src/oci/ai_speech/models/tts_oracle_speech_settings.py index e108450e42..16e21725fc 100644 --- a/src/oci/ai_speech/models/tts_oracle_speech_settings.py +++ b/src/oci/ai_speech/models/tts_oracle_speech_settings.py @@ -95,7 +95,7 @@ def text_type(self): Gets the text_type of this TtsOracleSpeechSettings. The format in which the input text has been supplied i.e., Text or SSML. The supported text types are: - TEXT - - SSML + - SSML : This is only supported for en-US language. Allowed values for this property are: "TEXT", "SSML" @@ -111,7 +111,7 @@ def text_type(self, text_type): Sets the text_type of this TtsOracleSpeechSettings. The format in which the input text has been supplied i.e., Text or SSML. The supported text types are: - TEXT - - SSML + - SSML : This is only supported for en-US language. :param text_type: The text_type of this TtsOracleSpeechSettings. diff --git a/src/oci/ai_speech/models/tts_oracle_tts2_natural_model_details.py b/src/oci/ai_speech/models/tts_oracle_tts2_natural_model_details.py index 105e48007e..d5f5b3069a 100644 --- a/src/oci/ai_speech/models/tts_oracle_tts2_natural_model_details.py +++ b/src/oci/ai_speech/models/tts_oracle_tts2_natural_model_details.py @@ -30,17 +30,24 @@ def __init__(self, **kwargs): The value to assign to the voice_id property of this TtsOracleTts2NaturalModelDetails. :type voice_id: str + :param language_code: + The value to assign to the language_code property of this TtsOracleTts2NaturalModelDetails. + :type language_code: str + """ self.swagger_types = { 'model_name': 'str', - 'voice_id': 'str' + 'voice_id': 'str', + 'language_code': 'str' } self.attribute_map = { 'model_name': 'modelName', - 'voice_id': 'voiceId' + 'voice_id': 'voiceId', + 'language_code': 'languageCode' } self._model_name = None self._voice_id = None + self._language_code = None self._model_name = 'TTS_2_NATURAL' @property @@ -69,6 +76,48 @@ def voice_id(self, voice_id): """ self._voice_id = voice_id + @property + def language_code(self): + """ + Gets the language_code of this TtsOracleTts2NaturalModelDetails. + Locale value as per given in [https://datatracker.ietf.org/doc/html/rfc5646]. Default en-US + - en-US: English - United States + - en-GB: English - Great Britain + - es-ES: Spanish - Spain + - pt-BR: Portuguese - Brazil + - hi-IN: Hindi - India + - fr-FR: French - France + - it-IT: Italian - Italy + - ja-JP: Japanese - Japan + - zh-CN: Mandarin - China + + + :return: The language_code of this TtsOracleTts2NaturalModelDetails. + :rtype: str + """ + return self._language_code + + @language_code.setter + def language_code(self, language_code): + """ + Sets the language_code of this TtsOracleTts2NaturalModelDetails. + Locale value as per given in [https://datatracker.ietf.org/doc/html/rfc5646]. Default en-US + - en-US: English - United States + - en-GB: English - Great Britain + - es-ES: Spanish - Spain + - pt-BR: Portuguese - Brazil + - hi-IN: Hindi - India + - fr-FR: French - France + - it-IT: Italian - Italy + - ja-JP: Japanese - Japan + - zh-CN: Mandarin - China + + + :param language_code: The language_code of this TtsOracleTts2NaturalModelDetails. + :type: str + """ + self._language_code = language_code + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/ai_speech/models/voice_summary.py b/src/oci/ai_speech/models/voice_summary.py index 788dbf465e..1a828ae341 100644 --- a/src/oci/ai_speech/models/voice_summary.py +++ b/src/oci/ai_speech/models/voice_summary.py @@ -23,10 +23,6 @@ class VoiceSummary(object): #: This constant has a value of "FEMALE" GENDER_FEMALE = "FEMALE" - #: A constant which can be used with the language_code property of a VoiceSummary. - #: This constant has a value of "en-US" - LANGUAGE_CODE_EN_US = "en-US" - def __init__(self, **kwargs): """ Initializes a new VoiceSummary object with values from keyword arguments. @@ -56,8 +52,6 @@ def __init__(self, **kwargs): :param language_code: The value to assign to the language_code property of this VoiceSummary. - Allowed values for this property are: "en-US", 'UNKNOWN_ENUM_VALUE'. - Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type language_code: str :param language_description: @@ -244,9 +238,6 @@ def language_code(self): Gets the language_code of this VoiceSummary. An abbreviated notation of region to which the language and accent of the speaker belongs to. - Allowed values for this property are: "en-US", 'UNKNOWN_ENUM_VALUE'. - Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. - :return: The language_code of this VoiceSummary. :rtype: str @@ -263,9 +254,6 @@ def language_code(self, language_code): :param language_code: The language_code of this VoiceSummary. :type: str """ - allowed_values = ["en-US"] - if not value_allowed_none_or_none_sentinel(language_code, allowed_values): - language_code = 'UNKNOWN_ENUM_VALUE' self._language_code = language_code @property diff --git a/src/oci/api_platform/__init__.py b/src/oci/api_platform/__init__.py new file mode 100644 index 0000000000..f236a39d6c --- /dev/null +++ b/src/oci/api_platform/__init__.py @@ -0,0 +1,14 @@ +# coding: utf-8 +# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20240829 + +from __future__ import absolute_import + + +from .api_platform_client import ApiPlatformClient +from .api_platform_client_composite_operations import ApiPlatformClientCompositeOperations +from . import models + +__all__ = ["ApiPlatformClient", "ApiPlatformClientCompositeOperations", "models"] diff --git a/src/oci/api_platform/api_platform_client.py b/src/oci/api_platform/api_platform_client.py new file mode 100644 index 0000000000..4ba5e28266 --- /dev/null +++ b/src/oci/api_platform/api_platform_client.py @@ -0,0 +1,1432 @@ +# coding: utf-8 +# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20240829 + +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 api_platform_type_mapping +missing = Sentinel("Missing") + + +class ApiPlatformClient(object): + """ + Control Plane designed to manage lifecycle of APIP Instances + """ + + 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("api_platform"): + 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': '/20240829', + 'service_endpoint_template': 'https://apip.{region}.ocp.{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("api_platform", config, signer, api_platform_type_mapping, **base_client_init_kwargs) + self.retry_strategy = kwargs.get('retry_strategy') + self.circuit_breaker_callback = kwargs.get('circuit_breaker_callback') + + def change_api_platform_instance_compartment(self, api_platform_instance_id, change_api_platform_instance_compartment_details, **kwargs): + """ + Moves an API Platform Instance 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 api_platform_instance_id: (required) + The `OCID`__ of the instance + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param oci.api_platform.models.ChangeApiPlatformInstanceCompartmentDetails change_api_platform_instance_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_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 None + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use change_api_platform_instance_compartment API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['apiPlatformInstanceId'] + resource_path = "/apiPlatformInstances/{apiPlatformInstanceId}/actions/changeCompartment" + method = "POST" + operation_name = "change_api_platform_instance_compartment" + api_reference_link = "" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "if_match", + "opc_retry_token", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + f"change_api_platform_instance_compartment got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "apiPlatformInstanceId": api_platform_instance_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "opc-retry-token": kwargs.get("opc_retry_token", missing), + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + if retry_strategy is None: + retry_strategy = retry.DEFAULT_RETRY_STRATEGY + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=change_api_platform_instance_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_api_platform_instance_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_api_platform_instance(self, create_api_platform_instance_details, **kwargs): + """ + Creates an API Platform Instance + + + :param oci.api_platform.models.CreateApiPlatformInstanceDetails create_api_platform_instance_details: (required) + Details for the new API Platform Instance + + :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.api_platform.models.ApiPlatformInstance` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use create_api_platform_instance API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = [] + resource_path = "/apiPlatformInstances" + method = "POST" + operation_name = "create_api_platform_instance" + 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_api_platform_instance 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_api_platform_instance_details, + response_type="ApiPlatformInstance", + 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_api_platform_instance_details, + response_type="ApiPlatformInstance", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + + def delete_api_platform_instance(self, api_platform_instance_id, **kwargs): + """ + Deletes an API Platform Instance + + + :param str api_platform_instance_id: (required) + The `OCID`__ of the instance + + __ 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_api_platform_instance API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['apiPlatformInstanceId'] + resource_path = "/apiPlatformInstances/{apiPlatformInstanceId}" + method = "DELETE" + operation_name = "delete_api_platform_instance" + 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_api_platform_instance got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "apiPlatformInstanceId": api_platform_instance_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_api_platform_instance(self, api_platform_instance_id, **kwargs): + """ + Gets information about an API Platform Instance + + + :param str api_platform_instance_id: (required) + The `OCID`__ of the instance + + __ 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.api_platform.models.ApiPlatformInstance` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_api_platform_instance API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['apiPlatformInstanceId'] + resource_path = "/apiPlatformInstances/{apiPlatformInstanceId}" + method = "GET" + operation_name = "get_api_platform_instance" + 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_api_platform_instance got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "apiPlatformInstanceId": api_platform_instance_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="ApiPlatformInstance", + 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="ApiPlatformInstance", + 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.api_platform.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_api_platform_instances(self, **kwargs): + """ + Gets a list of API Platform Instances + + + :param str compartment_id: (optional) + 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 match the given lifecycle state. The + state value is case-insensitive. + + Allowed values are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED" + + :param str name: (optional) + A filter to return only resources that match the given name exactly + + :param str id: (optional) + The `OCID`__ of the instance + + __ 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 ascending (`ASC`) or descending (`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 `name` is ascending. + + Allowed values are: "name", "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.api_platform.models.ApiPlatformInstanceCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_api_platform_instances API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = [] + resource_path = "/apiPlatformInstances" + method = "GET" + operation_name = "list_api_platform_instances" + api_reference_link = "" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "compartment_id", + "lifecycle_state", + "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_api_platform_instances got unknown kwargs: {extra_kwargs!r}") + + if 'lifecycle_state' in kwargs: + lifecycle_state_allowed_values = ["CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED"] + if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: + raise ValueError( + f"Invalid value for `lifecycle_state`, must be one of { lifecycle_state_allowed_values }" + ) + + 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 = ["name", "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": kwargs.get("compartment_id", missing), + "lifecycleState": kwargs.get("lifecycle_state", missing), + "name": kwargs.get("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="ApiPlatformInstanceCollection", + 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="ApiPlatformInstanceCollection", + 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 ascending (`ASC`) or descending (`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.api_platform.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 ascending (`ASC`) or descending (`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.api_platform.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, **kwargs): + """ + Lists the work requests in a compartment. + + + :param str compartment_id: (optional) + 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", "NEEDS_ATTENTION", "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 ascending (`ASC`) or descending (`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.api_platform.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 = [] + 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", + "compartment_id", + "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", "NEEDS_ATTENTION", "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": kwargs.get("compartment_id", missing), + "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_api_platform_instance(self, api_platform_instance_id, update_api_platform_instance_details, **kwargs): + """ + Updates an API Platform Instance + + + :param str api_platform_instance_id: (required) + The `OCID`__ of the instance + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param oci.api_platform.models.UpdateApiPlatformInstanceDetails update_api_platform_instance_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.api_platform.models.ApiPlatformInstance` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use update_api_platform_instance API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['apiPlatformInstanceId'] + resource_path = "/apiPlatformInstances/{apiPlatformInstanceId}" + method = "PUT" + operation_name = "update_api_platform_instance" + 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_api_platform_instance got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "apiPlatformInstanceId": api_platform_instance_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_api_platform_instance_details, + response_type="ApiPlatformInstance", + 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_api_platform_instance_details, + response_type="ApiPlatformInstance", + 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/api_platform/api_platform_client_composite_operations.py b/src/oci/api_platform/api_platform_client_composite_operations.py new file mode 100644 index 0000000000..7b55c8bd7e --- /dev/null +++ b/src/oci/api_platform/api_platform_client_composite_operations.py @@ -0,0 +1,161 @@ +# coding: utf-8 +# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20240829 + +import oci # noqa: F401 +from oci.util import WAIT_RESOURCE_NOT_FOUND # noqa: F401 + + +class ApiPlatformClientCompositeOperations(object): + """ + This class provides a wrapper around :py:class:`~oci.api_platform.ApiPlatformClient` 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 ApiPlatformClientCompositeOperations object + + :param ApiPlatformClient client: + The service client which will be wrapped by this object + """ + self.client = client + + def create_api_platform_instance_and_wait_for_state(self, create_api_platform_instance_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.api_platform.ApiPlatformClient.create_api_platform_instance` and waits for the :py:class:`~oci.api_platform.models.WorkRequest` + to enter the given state(s). + + :param oci.api_platform.models.CreateApiPlatformInstanceDetails create_api_platform_instance_details: (required) + Details for the new API Platform Instance + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.api_platform.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.api_platform.ApiPlatformClient.create_api_platform_instance` + + :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_api_platform_instance(create_api_platform_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: + 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_api_platform_instance_and_wait_for_state(self, api_platform_instance_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.api_platform.ApiPlatformClient.delete_api_platform_instance` and waits for the :py:class:`~oci.api_platform.models.WorkRequest` + to enter the given state(s). + + :param str api_platform_instance_id: (required) + The `OCID`__ of the instance + + __ 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.api_platform.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.api_platform.ApiPlatformClient.delete_api_platform_instance` + + :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_api_platform_instance(api_platform_instance_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_api_platform_instance_and_wait_for_state(self, api_platform_instance_id, update_api_platform_instance_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.api_platform.ApiPlatformClient.update_api_platform_instance` and waits for the :py:class:`~oci.api_platform.models.ApiPlatformInstance` acted upon + to enter the given state(s). + + :param str api_platform_instance_id: (required) + The `OCID`__ of the instance + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param oci.api_platform.models.UpdateApiPlatformInstanceDetails update_api_platform_instance_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.api_platform.models.ApiPlatformInstance.lifecycle_state` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.api_platform.ApiPlatformClient.update_api_platform_instance` + + :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_api_platform_instance(api_platform_instance_id, update_api_platform_instance_details, **operation_kwargs) + if not wait_for_states: + return operation_result + lowered_wait_for_states = [w.lower() for w in wait_for_states] + api_platform_instance_id = operation_result.data.id + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_api_platform_instance(api_platform_instance_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/api_platform/models/__init__.py b/src/oci/api_platform/models/__init__.py new file mode 100644 index 0000000000..918f09f32c --- /dev/null +++ b/src/oci/api_platform/models/__init__.py @@ -0,0 +1,44 @@ +# coding: utf-8 +# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20240829 + +from __future__ import absolute_import + +from .api_platform_instance import ApiPlatformInstance +from .api_platform_instance_collection import ApiPlatformInstanceCollection +from .api_platform_instance_summary import ApiPlatformInstanceSummary +from .change_api_platform_instance_compartment_details import ChangeApiPlatformInstanceCompartmentDetails +from .create_api_platform_instance_details import CreateApiPlatformInstanceDetails +from .idcs_app import IdcsApp +from .update_api_platform_instance_details import UpdateApiPlatformInstanceDetails +from .uris import Uris +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 api_platform services. +api_platform_type_mapping = { + "ApiPlatformInstance": ApiPlatformInstance, + "ApiPlatformInstanceCollection": ApiPlatformInstanceCollection, + "ApiPlatformInstanceSummary": ApiPlatformInstanceSummary, + "ChangeApiPlatformInstanceCompartmentDetails": ChangeApiPlatformInstanceCompartmentDetails, + "CreateApiPlatformInstanceDetails": CreateApiPlatformInstanceDetails, + "IdcsApp": IdcsApp, + "UpdateApiPlatformInstanceDetails": UpdateApiPlatformInstanceDetails, + "Uris": Uris, + "WorkRequest": WorkRequest, + "WorkRequestError": WorkRequestError, + "WorkRequestErrorCollection": WorkRequestErrorCollection, + "WorkRequestLogEntry": WorkRequestLogEntry, + "WorkRequestLogEntryCollection": WorkRequestLogEntryCollection, + "WorkRequestResource": WorkRequestResource, + "WorkRequestSummary": WorkRequestSummary, + "WorkRequestSummaryCollection": WorkRequestSummaryCollection +} diff --git a/src/oci/api_platform/models/api_platform_instance.py b/src/oci/api_platform/models/api_platform_instance.py new file mode 100644 index 0000000000..a8ed8179f0 --- /dev/null +++ b/src/oci/api_platform/models/api_platform_instance.py @@ -0,0 +1,498 @@ +# coding: utf-8 +# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20240829 + + +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 ApiPlatformInstance(object): + """ + A Logical Entity that can be used to create, manage, secure, and advertise APIs to connect to new or existing services + """ + + #: A constant which can be used with the lifecycle_state property of a ApiPlatformInstance. + #: This constant has a value of "CREATING" + LIFECYCLE_STATE_CREATING = "CREATING" + + #: A constant which can be used with the lifecycle_state property of a ApiPlatformInstance. + #: This constant has a value of "UPDATING" + LIFECYCLE_STATE_UPDATING = "UPDATING" + + #: A constant which can be used with the lifecycle_state property of a ApiPlatformInstance. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a ApiPlatformInstance. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + #: A constant which can be used with the lifecycle_state property of a ApiPlatformInstance. + #: This constant has a value of "DELETED" + LIFECYCLE_STATE_DELETED = "DELETED" + + #: A constant which can be used with the lifecycle_state property of a ApiPlatformInstance. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + def __init__(self, **kwargs): + """ + Initializes a new ApiPlatformInstance 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 ApiPlatformInstance. + :type id: str + + :param description: + The value to assign to the description property of this ApiPlatformInstance. + :type description: str + + :param name: + The value to assign to the name property of this ApiPlatformInstance. + :type name: str + + :param compartment_id: + The value to assign to the compartment_id property of this ApiPlatformInstance. + :type compartment_id: str + + :param idcs_app: + The value to assign to the idcs_app property of this ApiPlatformInstance. + :type idcs_app: oci.api_platform.models.IdcsApp + + :param uris: + The value to assign to the uris property of this ApiPlatformInstance. + :type uris: oci.api_platform.models.Uris + + :param time_created: + The value to assign to the time_created property of this ApiPlatformInstance. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this ApiPlatformInstance. + :type time_updated: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this ApiPlatformInstance. + 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 lifecycle_details: + The value to assign to the lifecycle_details property of this ApiPlatformInstance. + :type lifecycle_details: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this ApiPlatformInstance. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this ApiPlatformInstance. + :type defined_tags: dict(str, dict(str, object)) + + :param system_tags: + The value to assign to the system_tags property of this ApiPlatformInstance. + :type system_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'id': 'str', + 'description': 'str', + 'name': 'str', + 'compartment_id': 'str', + 'idcs_app': 'IdcsApp', + 'uris': 'Uris', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'lifecycle_state': 'str', + 'lifecycle_details': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))' + } + self.attribute_map = { + 'id': 'id', + 'description': 'description', + 'name': 'name', + 'compartment_id': 'compartmentId', + 'idcs_app': 'idcsApp', + 'uris': 'uris', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags' + } + self._id = None + self._description = None + self._name = None + self._compartment_id = None + self._idcs_app = None + self._uris = None + self._time_created = None + self._time_updated = None + self._lifecycle_state = None + self._lifecycle_details = None + self._freeform_tags = None + self._defined_tags = None + self._system_tags = None + + @property + def id(self): + """ + **[Required]** Gets the id of this ApiPlatformInstance. + The `OCID`__ of the instance + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The id of this ApiPlatformInstance. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this ApiPlatformInstance. + The `OCID`__ of the instance + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param id: The id of this ApiPlatformInstance. + :type: str + """ + self._id = id + + @property + def description(self): + """ + Gets the description of this ApiPlatformInstance. + User-provided changeable and non-unique description of the instance + + + :return: The description of this ApiPlatformInstance. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this ApiPlatformInstance. + User-provided changeable and non-unique description of the instance + + + :param description: The description of this ApiPlatformInstance. + :type: str + """ + self._description = description + + @property + def name(self): + """ + **[Required]** Gets the name of this ApiPlatformInstance. + A regionally unique, non-changeable instance name provided by the user during instance creation + + + :return: The name of this ApiPlatformInstance. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this ApiPlatformInstance. + A regionally unique, non-changeable instance name provided by the user during instance creation + + + :param name: The name of this ApiPlatformInstance. + :type: str + """ + self._name = name + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this ApiPlatformInstance. + The `OCID`__ of the compartment + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The compartment_id of this ApiPlatformInstance. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this ApiPlatformInstance. + The `OCID`__ of the compartment + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param compartment_id: The compartment_id of this ApiPlatformInstance. + :type: str + """ + self._compartment_id = compartment_id + + @property + def idcs_app(self): + """ + Gets the idcs_app of this ApiPlatformInstance. + + :return: The idcs_app of this ApiPlatformInstance. + :rtype: oci.api_platform.models.IdcsApp + """ + return self._idcs_app + + @idcs_app.setter + def idcs_app(self, idcs_app): + """ + Sets the idcs_app of this ApiPlatformInstance. + + :param idcs_app: The idcs_app of this ApiPlatformInstance. + :type: oci.api_platform.models.IdcsApp + """ + self._idcs_app = idcs_app + + @property + def uris(self): + """ + Gets the uris of this ApiPlatformInstance. + + :return: The uris of this ApiPlatformInstance. + :rtype: oci.api_platform.models.Uris + """ + return self._uris + + @uris.setter + def uris(self, uris): + """ + Sets the uris of this ApiPlatformInstance. + + :param uris: The uris of this ApiPlatformInstance. + :type: oci.api_platform.models.Uris + """ + self._uris = uris + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this ApiPlatformInstance. + The date and time the instance was created, in the format defined by `RFC 3339`__ + + Example: `2016-08-25T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_created of this ApiPlatformInstance. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this ApiPlatformInstance. + The date and time the instance was created, in the format defined by `RFC 3339`__ + + Example: `2016-08-25T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_created: The time_created of this ApiPlatformInstance. + :type: datetime + """ + self._time_created = time_created + + @property + def time_updated(self): + """ + Gets the time_updated of this ApiPlatformInstance. + The date and time the instance was updated, in the format defined by `RFC 3339`__ + + Example: `2016-08-25T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_updated of this ApiPlatformInstance. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this ApiPlatformInstance. + The date and time the instance was updated, in the format defined by `RFC 3339`__ + + Example: `2016-08-25T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_updated: The time_updated of this ApiPlatformInstance. + :type: datetime + """ + self._time_updated = time_updated + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this ApiPlatformInstance. + The current state of the instance + + 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 ApiPlatformInstance. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this ApiPlatformInstance. + The current state of the instance + + + :param lifecycle_state: The lifecycle_state of this ApiPlatformInstance. + :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 lifecycle_details(self): + """ + Gets the lifecycle_details of this ApiPlatformInstance. + A message that describes the current state of the instance in more detail. For example, + can be used to provide actionable information for a resource in the Failed state + + + :return: The lifecycle_details of this ApiPlatformInstance. + :rtype: str + """ + return self._lifecycle_details + + @lifecycle_details.setter + def lifecycle_details(self, lifecycle_details): + """ + Sets the lifecycle_details of this ApiPlatformInstance. + A message that describes the current state of the instance in more detail. For example, + can be used to provide actionable information for a resource in the Failed state + + + :param lifecycle_details: The lifecycle_details of this ApiPlatformInstance. + :type: str + """ + self._lifecycle_details = lifecycle_details + + @property + def freeform_tags(self): + """ + **[Required]** Gets the freeform_tags of this ApiPlatformInstance. + 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 ApiPlatformInstance. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this ApiPlatformInstance. + 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 ApiPlatformInstance. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + **[Required]** Gets the defined_tags of this ApiPlatformInstance. + 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 ApiPlatformInstance. + :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 ApiPlatformInstance. + 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 ApiPlatformInstance. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def system_tags(self): + """ + Gets the system_tags of this ApiPlatformInstance. + 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 ApiPlatformInstance. + :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 ApiPlatformInstance. + 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 ApiPlatformInstance. + :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/api_platform/models/api_platform_instance_collection.py b/src/oci/api_platform/models/api_platform_instance_collection.py new file mode 100644 index 0000000000..a273e8f83f --- /dev/null +++ b/src/oci/api_platform/models/api_platform_instance_collection.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20240829 + + +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 ApiPlatformInstanceCollection(object): + """ + Results of a search. Contains both InstanceSummary items and other information, such as metadata. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ApiPlatformInstanceCollection 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 ApiPlatformInstanceCollection. + :type items: list[oci.api_platform.models.ApiPlatformInstanceSummary] + + """ + self.swagger_types = { + 'items': 'list[ApiPlatformInstanceSummary]' + } + self.attribute_map = { + 'items': 'items' + } + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this ApiPlatformInstanceCollection. + List of APIP instances + + + :return: The items of this ApiPlatformInstanceCollection. + :rtype: list[oci.api_platform.models.ApiPlatformInstanceSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this ApiPlatformInstanceCollection. + List of APIP instances + + + :param items: The items of this ApiPlatformInstanceCollection. + :type: list[oci.api_platform.models.ApiPlatformInstanceSummary] + """ + 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/api_platform/models/api_platform_instance_summary.py b/src/oci/api_platform/models/api_platform_instance_summary.py new file mode 100644 index 0000000000..90a72bda08 --- /dev/null +++ b/src/oci/api_platform/models/api_platform_instance_summary.py @@ -0,0 +1,381 @@ +# coding: utf-8 +# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20240829 + + +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 ApiPlatformInstanceSummary(object): + """ + Summary information about an instance + """ + + def __init__(self, **kwargs): + """ + Initializes a new ApiPlatformInstanceSummary 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 ApiPlatformInstanceSummary. + :type id: str + + :param name: + The value to assign to the name property of this ApiPlatformInstanceSummary. + :type name: str + + :param compartment_id: + The value to assign to the compartment_id property of this ApiPlatformInstanceSummary. + :type compartment_id: str + + :param time_created: + The value to assign to the time_created property of this ApiPlatformInstanceSummary. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this ApiPlatformInstanceSummary. + :type time_updated: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this ApiPlatformInstanceSummary. + :type lifecycle_state: str + + :param lifecycle_details: + The value to assign to the lifecycle_details property of this ApiPlatformInstanceSummary. + :type lifecycle_details: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this ApiPlatformInstanceSummary. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this ApiPlatformInstanceSummary. + :type defined_tags: dict(str, dict(str, object)) + + :param system_tags: + The value to assign to the system_tags property of this ApiPlatformInstanceSummary. + :type system_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'id': 'str', + 'name': 'str', + 'compartment_id': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'lifecycle_state': 'str', + 'lifecycle_details': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))' + } + self.attribute_map = { + 'id': 'id', + 'name': 'name', + 'compartment_id': 'compartmentId', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags' + } + self._id = None + self._name = None + self._compartment_id = None + self._time_created = None + self._time_updated = None + self._lifecycle_state = None + self._lifecycle_details = None + self._freeform_tags = None + self._defined_tags = None + self._system_tags = None + + @property + def id(self): + """ + **[Required]** Gets the id of this ApiPlatformInstanceSummary. + The `OCID`__ of the instance + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The id of this ApiPlatformInstanceSummary. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this ApiPlatformInstanceSummary. + The `OCID`__ of the instance + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param id: The id of this ApiPlatformInstanceSummary. + :type: str + """ + self._id = id + + @property + def name(self): + """ + **[Required]** Gets the name of this ApiPlatformInstanceSummary. + A regionally unique, non-changeable instance name provided by the user during creation + + + :return: The name of this ApiPlatformInstanceSummary. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this ApiPlatformInstanceSummary. + A regionally unique, non-changeable instance name provided by the user during creation + + + :param name: The name of this ApiPlatformInstanceSummary. + :type: str + """ + self._name = name + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this ApiPlatformInstanceSummary. + The `OCID`__ of the compartment + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The compartment_id of this ApiPlatformInstanceSummary. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this ApiPlatformInstanceSummary. + The `OCID`__ of the compartment + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param compartment_id: The compartment_id of this ApiPlatformInstanceSummary. + :type: str + """ + self._compartment_id = compartment_id + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this ApiPlatformInstanceSummary. + The date and time the instance was created, in the format defined by `RFC 3339`__. + + Example: `2016-08-25T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_created of this ApiPlatformInstanceSummary. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this ApiPlatformInstanceSummary. + The date and time the instance was created, in the format defined by `RFC 3339`__. + + Example: `2016-08-25T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_created: The time_created of this ApiPlatformInstanceSummary. + :type: datetime + """ + self._time_created = time_created + + @property + def time_updated(self): + """ + Gets the time_updated of this ApiPlatformInstanceSummary. + The date and time the instance was updated, in the format defined by `RFC 3339`__ + + Example: `2016-08-25T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_updated of this ApiPlatformInstanceSummary. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this ApiPlatformInstanceSummary. + The date and time the instance was updated, in the format defined by `RFC 3339`__ + + Example: `2016-08-25T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_updated: The time_updated of this ApiPlatformInstanceSummary. + :type: datetime + """ + self._time_updated = time_updated + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this ApiPlatformInstanceSummary. + The current state of the instance + + + :return: The lifecycle_state of this ApiPlatformInstanceSummary. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this ApiPlatformInstanceSummary. + The current state of the instance + + + :param lifecycle_state: The lifecycle_state of this ApiPlatformInstanceSummary. + :type: str + """ + self._lifecycle_state = lifecycle_state + + @property + def lifecycle_details(self): + """ + Gets the lifecycle_details of this ApiPlatformInstanceSummary. + A message that describes the current state of the Instance in more detail. For example, + can be used to provide actionable information for a resource in the Failed state. + + + :return: The lifecycle_details of this ApiPlatformInstanceSummary. + :rtype: str + """ + return self._lifecycle_details + + @lifecycle_details.setter + def lifecycle_details(self, lifecycle_details): + """ + Sets the lifecycle_details of this ApiPlatformInstanceSummary. + A message that describes the current state of the Instance in more detail. For example, + can be used to provide actionable information for a resource in the Failed state. + + + :param lifecycle_details: The lifecycle_details of this ApiPlatformInstanceSummary. + :type: str + """ + self._lifecycle_details = lifecycle_details + + @property + def freeform_tags(self): + """ + **[Required]** Gets the freeform_tags of this ApiPlatformInstanceSummary. + 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 ApiPlatformInstanceSummary. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this ApiPlatformInstanceSummary. + 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 ApiPlatformInstanceSummary. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + **[Required]** Gets the defined_tags of this ApiPlatformInstanceSummary. + 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 ApiPlatformInstanceSummary. + :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 ApiPlatformInstanceSummary. + 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 ApiPlatformInstanceSummary. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def system_tags(self): + """ + Gets the system_tags of this ApiPlatformInstanceSummary. + 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 ApiPlatformInstanceSummary. + :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 ApiPlatformInstanceSummary. + 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 ApiPlatformInstanceSummary. + :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/api_platform/models/change_api_platform_instance_compartment_details.py b/src/oci/api_platform/models/change_api_platform_instance_compartment_details.py new file mode 100644 index 0000000000..f142bd7931 --- /dev/null +++ b/src/oci/api_platform/models/change_api_platform_instance_compartment_details.py @@ -0,0 +1,74 @@ +# coding: utf-8 +# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20240829 + + +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 ChangeApiPlatformInstanceCompartmentDetails(object): + """ + The configuration details for the move operation + """ + + def __init__(self, **kwargs): + """ + Initializes a new ChangeApiPlatformInstanceCompartmentDetails 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 ChangeApiPlatformInstanceCompartmentDetails. + :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 ChangeApiPlatformInstanceCompartmentDetails. + The `OCID`__ of the compartment to move the instance to. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The compartment_id of this ChangeApiPlatformInstanceCompartmentDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this ChangeApiPlatformInstanceCompartmentDetails. + The `OCID`__ of the compartment to move the instance to. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param compartment_id: The compartment_id of this ChangeApiPlatformInstanceCompartmentDetails. + :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/api_platform/models/create_api_platform_instance_details.py b/src/oci/api_platform/models/create_api_platform_instance_details.py new file mode 100644 index 0000000000..4967d46165 --- /dev/null +++ b/src/oci/api_platform/models/create_api_platform_instance_details.py @@ -0,0 +1,202 @@ +# coding: utf-8 +# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20240829 + + +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 CreateApiPlatformInstanceDetails(object): + """ + The data to create an instance + """ + + def __init__(self, **kwargs): + """ + Initializes a new CreateApiPlatformInstanceDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param name: + The value to assign to the name property of this CreateApiPlatformInstanceDetails. + :type name: str + + :param description: + The value to assign to the description property of this CreateApiPlatformInstanceDetails. + :type description: str + + :param compartment_id: + The value to assign to the compartment_id property of this CreateApiPlatformInstanceDetails. + :type compartment_id: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this CreateApiPlatformInstanceDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this CreateApiPlatformInstanceDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'name': 'str', + 'description': 'str', + 'compartment_id': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + self.attribute_map = { + 'name': 'name', + 'description': 'description', + 'compartment_id': 'compartmentId', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + self._name = None + self._description = None + self._compartment_id = None + self._freeform_tags = None + self._defined_tags = None + + @property + def name(self): + """ + **[Required]** Gets the name of this CreateApiPlatformInstanceDetails. + A regionally unique, non-changeable instance name provided by the user during creation + + + :return: The name of this CreateApiPlatformInstanceDetails. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this CreateApiPlatformInstanceDetails. + A regionally unique, non-changeable instance name provided by the user during creation + + + :param name: The name of this CreateApiPlatformInstanceDetails. + :type: str + """ + self._name = name + + @property + def description(self): + """ + Gets the description of this CreateApiPlatformInstanceDetails. + User-provided changeable and non-unique description of the instance + + + :return: The description of this CreateApiPlatformInstanceDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this CreateApiPlatformInstanceDetails. + User-provided changeable and non-unique description of the instance + + + :param description: The description of this CreateApiPlatformInstanceDetails. + :type: str + """ + self._description = description + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this CreateApiPlatformInstanceDetails. + The `OCID`__ of the compartment to create the instance in. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The compartment_id of this CreateApiPlatformInstanceDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this CreateApiPlatformInstanceDetails. + The `OCID`__ of the compartment to create the instance in. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param compartment_id: The compartment_id of this CreateApiPlatformInstanceDetails. + :type: str + """ + self._compartment_id = compartment_id + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this CreateApiPlatformInstanceDetails. + 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 CreateApiPlatformInstanceDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this CreateApiPlatformInstanceDetails. + 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 CreateApiPlatformInstanceDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this CreateApiPlatformInstanceDetails. + 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 CreateApiPlatformInstanceDetails. + :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 CreateApiPlatformInstanceDetails. + 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 CreateApiPlatformInstanceDetails. + :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/api_platform/models/idcs_app.py b/src/oci/api_platform/models/idcs_app.py new file mode 100644 index 0000000000..57a7b509f4 --- /dev/null +++ b/src/oci/api_platform/models/idcs_app.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20240829 + + +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 IdcsApp(object): + """ + IDCS app associated with the instance, that can be used to manage the roles of the users + """ + + def __init__(self, **kwargs): + """ + Initializes a new IdcsApp object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param url: + The value to assign to the url property of this IdcsApp. + :type url: str + + """ + self.swagger_types = { + 'url': 'str' + } + self.attribute_map = { + 'url': 'url' + } + self._url = None + + @property + def url(self): + """ + **[Required]** Gets the url of this IdcsApp. + IDCS URL of the app + + + :return: The url of this IdcsApp. + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """ + Sets the url of this IdcsApp. + IDCS URL of the app + + + :param url: The url of this IdcsApp. + :type: str + """ + self._url = url + + 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/api_platform/models/update_api_platform_instance_details.py b/src/oci/api_platform/models/update_api_platform_instance_details.py new file mode 100644 index 0000000000..1ba74b314e --- /dev/null +++ b/src/oci/api_platform/models/update_api_platform_instance_details.py @@ -0,0 +1,136 @@ +# coding: utf-8 +# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20240829 + + +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 UpdateApiPlatformInstanceDetails(object): + """ + The data to update an instance + """ + + def __init__(self, **kwargs): + """ + Initializes a new UpdateApiPlatformInstanceDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param description: + The value to assign to the description property of this UpdateApiPlatformInstanceDetails. + :type description: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this UpdateApiPlatformInstanceDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this UpdateApiPlatformInstanceDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'description': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + self.attribute_map = { + 'description': 'description', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + self._description = None + self._freeform_tags = None + self._defined_tags = None + + @property + def description(self): + """ + Gets the description of this UpdateApiPlatformInstanceDetails. + User-provided changeable and non-unique description of the instance + + + :return: The description of this UpdateApiPlatformInstanceDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this UpdateApiPlatformInstanceDetails. + User-provided changeable and non-unique description of the instance + + + :param description: The description of this UpdateApiPlatformInstanceDetails. + :type: str + """ + self._description = description + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this UpdateApiPlatformInstanceDetails. + 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 UpdateApiPlatformInstanceDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this UpdateApiPlatformInstanceDetails. + 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 UpdateApiPlatformInstanceDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this UpdateApiPlatformInstanceDetails. + 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 UpdateApiPlatformInstanceDetails. + :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 UpdateApiPlatformInstanceDetails. + 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 UpdateApiPlatformInstanceDetails. + :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/api_platform/models/uris.py b/src/oci/api_platform/models/uris.py new file mode 100644 index 0000000000..54280704e0 --- /dev/null +++ b/src/oci/api_platform/models/uris.py @@ -0,0 +1,101 @@ +# coding: utf-8 +# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20240829 + + +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 Uris(object): + """ + Service URIs pertaining to the instance + """ + + def __init__(self, **kwargs): + """ + Initializes a new Uris object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param management_portal_uri: + The value to assign to the management_portal_uri property of this Uris. + :type management_portal_uri: str + + :param developers_portal_uri: + The value to assign to the developers_portal_uri property of this Uris. + :type developers_portal_uri: str + + """ + self.swagger_types = { + 'management_portal_uri': 'str', + 'developers_portal_uri': 'str' + } + self.attribute_map = { + 'management_portal_uri': 'managementPortalUri', + 'developers_portal_uri': 'developersPortalUri' + } + self._management_portal_uri = None + self._developers_portal_uri = None + + @property + def management_portal_uri(self): + """ + **[Required]** Gets the management_portal_uri of this Uris. + Management Portal URI of the instance (/apiplatform) + + + :return: The management_portal_uri of this Uris. + :rtype: str + """ + return self._management_portal_uri + + @management_portal_uri.setter + def management_portal_uri(self, management_portal_uri): + """ + Sets the management_portal_uri of this Uris. + Management Portal URI of the instance (/apiplatform) + + + :param management_portal_uri: The management_portal_uri of this Uris. + :type: str + """ + self._management_portal_uri = management_portal_uri + + @property + def developers_portal_uri(self): + """ + **[Required]** Gets the developers_portal_uri of this Uris. + Developer's Portal URI of the instance (/developers) + + + :return: The developers_portal_uri of this Uris. + :rtype: str + """ + return self._developers_portal_uri + + @developers_portal_uri.setter + def developers_portal_uri(self, developers_portal_uri): + """ + Sets the developers_portal_uri of this Uris. + Developer's Portal URI of the instance (/developers) + + + :param developers_portal_uri: The developers_portal_uri of this Uris. + :type: str + """ + self._developers_portal_uri = developers_portal_uri + + 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/api_platform/models/work_request.py b/src/oci/api_platform/models/work_request.py new file mode 100644 index 0000000000..45d8efd13f --- /dev/null +++ b/src/oci/api_platform/models/work_request.py @@ -0,0 +1,449 @@ +# coding: utf-8 +# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20240829 + + +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. Work requests help you monitor long-running operations. When you start a long-running operation, + the service creates a work request. A work request is an activity log that lets you track each step in the operation's + progress. Each work request has an OCID that lets you interact with it programmatically and use it for automation. + """ + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "CREATE_APIP_INSTANCE" + OPERATION_TYPE_CREATE_APIP_INSTANCE = "CREATE_APIP_INSTANCE" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "UPDATE_APIP_INSTANCE" + OPERATION_TYPE_UPDATE_APIP_INSTANCE = "UPDATE_APIP_INSTANCE" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "DELETE_APIP_INSTANCE" + OPERATION_TYPE_DELETE_APIP_INSTANCE = "DELETE_APIP_INSTANCE" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "MOVE_APIP_INSTANCE" + OPERATION_TYPE_MOVE_APIP_INSTANCE = "MOVE_APIP_INSTANCE" + + #: 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 "NEEDS_ATTENTION" + STATUS_NEEDS_ATTENTION = "NEEDS_ATTENTION" + + #: 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_APIP_INSTANCE", "UPDATE_APIP_INSTANCE", "DELETE_APIP_INSTANCE", "MOVE_APIP_INSTANCE", '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", "NEEDS_ATTENTION", "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.api_platform.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 + + :param time_updated: + The value to assign to the time_updated property of this WorkRequest. + :type time_updated: 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', + 'time_updated': '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', + 'time_updated': 'timeUpdated' + } + 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 + self._time_updated = 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_APIP_INSTANCE", "UPDATE_APIP_INSTANCE", "DELETE_APIP_INSTANCE", "MOVE_APIP_INSTANCE", '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_APIP_INSTANCE", "UPDATE_APIP_INSTANCE", "DELETE_APIP_INSTANCE", "MOVE_APIP_INSTANCE"] + 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", "NEEDS_ATTENTION", "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", "NEEDS_ATTENTION", "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.api_platform.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.api_platform.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 + + @property + def time_updated(self): + """ + Gets the time_updated of this WorkRequest. + The date and time the work request was updated, in the format defined by + `RFC 3339`__. + + __ https://tools.ietf.org/rfc/rfc3339 + + + :return: The time_updated of this WorkRequest. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this WorkRequest. + The date and time the work request was updated, in the format defined by + `RFC 3339`__. + + __ https://tools.ietf.org/rfc/rfc3339 + + + :param time_updated: The time_updated of this WorkRequest. + :type: datetime + """ + self._time_updated = time_updated + + 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/api_platform/models/work_request_error.py b/src/oci/api_platform/models/work_request_error.py new file mode 100644 index 0000000000..e92d274103 --- /dev/null +++ b/src/oci/api_platform/models/work_request_error.py @@ -0,0 +1,144 @@ +# coding: utf-8 +# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20240829 + + +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 a 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 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 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/api_platform/models/work_request_error_collection.py b/src/oci/api_platform/models/work_request_error_collection.py new file mode 100644 index 0000000000..926d8c4e17 --- /dev/null +++ b/src/oci/api_platform/models/work_request_error_collection.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20240829 + + +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 both 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.api_platform.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.api_platform.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.api_platform.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/api_platform/models/work_request_log_entry.py b/src/oci/api_platform/models/work_request_log_entry.py new file mode 100644 index 0000000000..1c5f346c47 --- /dev/null +++ b/src/oci/api_platform/models/work_request_log_entry.py @@ -0,0 +1,107 @@ +# coding: utf-8 +# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20240829 + + +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): + """ + A log message from performing an operation that is tracked by a 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/api_platform/models/work_request_log_entry_collection.py b/src/oci/api_platform/models/work_request_log_entry_collection.py new file mode 100644 index 0000000000..24afa37d19 --- /dev/null +++ b/src/oci/api_platform/models/work_request_log_entry_collection.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20240829 + + +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 both 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.api_platform.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.api_platform.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.api_platform.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/api_platform/models/work_request_resource.py b/src/oci/api_platform/models/work_request_resource.py new file mode 100644 index 0000000000..1a7293423a --- /dev/null +++ b/src/oci/api_platform/models/work_request_resource.py @@ -0,0 +1,236 @@ +# coding: utf-8 +# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20240829 + + +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): + """ + A 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/api_platform/models/work_request_summary.py b/src/oci/api_platform/models/work_request_summary.py new file mode 100644 index 0000000000..f9adc51982 --- /dev/null +++ b/src/oci/api_platform/models/work_request_summary.py @@ -0,0 +1,447 @@ +# coding: utf-8 +# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20240829 + + +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_APIP_INSTANCE" + OPERATION_TYPE_CREATE_APIP_INSTANCE = "CREATE_APIP_INSTANCE" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "UPDATE_APIP_INSTANCE" + OPERATION_TYPE_UPDATE_APIP_INSTANCE = "UPDATE_APIP_INSTANCE" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "DELETE_APIP_INSTANCE" + OPERATION_TYPE_DELETE_APIP_INSTANCE = "DELETE_APIP_INSTANCE" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "MOVE_APIP_INSTANCE" + OPERATION_TYPE_MOVE_APIP_INSTANCE = "MOVE_APIP_INSTANCE" + + #: 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 "NEEDS_ATTENTION" + STATUS_NEEDS_ATTENTION = "NEEDS_ATTENTION" + + #: 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_APIP_INSTANCE", "UPDATE_APIP_INSTANCE", "DELETE_APIP_INSTANCE", "MOVE_APIP_INSTANCE", '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", "NEEDS_ATTENTION", "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.api_platform.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 + + :param time_updated: + The value to assign to the time_updated property of this WorkRequestSummary. + :type time_updated: 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', + 'time_updated': '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', + 'time_updated': 'timeUpdated' + } + 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 + self._time_updated = 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_APIP_INSTANCE", "UPDATE_APIP_INSTANCE", "DELETE_APIP_INSTANCE", "MOVE_APIP_INSTANCE", '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_APIP_INSTANCE", "UPDATE_APIP_INSTANCE", "DELETE_APIP_INSTANCE", "MOVE_APIP_INSTANCE"] + 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", "NEEDS_ATTENTION", "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", "NEEDS_ATTENTION", "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.api_platform.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.api_platform.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 + + @property + def time_updated(self): + """ + Gets the time_updated of this WorkRequestSummary. + The date and time the work request was updated, in the format defined by + `RFC 3339`__. + + __ https://tools.ietf.org/rfc/rfc3339 + + + :return: The time_updated of this WorkRequestSummary. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this WorkRequestSummary. + The date and time the work request was updated, in the format defined by + `RFC 3339`__. + + __ https://tools.ietf.org/rfc/rfc3339 + + + :param time_updated: The time_updated of this WorkRequestSummary. + :type: datetime + """ + self._time_updated = time_updated + + 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/api_platform/models/work_request_summary_collection.py b/src/oci/api_platform/models/work_request_summary_collection.py new file mode 100644 index 0000000000..fafd68a148 --- /dev/null +++ b/src/oci/api_platform/models/work_request_summary_collection.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20240829 + + +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 both 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.api_platform.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.api_platform.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.api_platform.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/apigateway/api_gateway_client.py b/src/oci/apigateway/api_gateway_client.py index 8584b1581d..390fb55cb0 100644 --- a/src/oci/apigateway/api_gateway_client.py +++ b/src/oci/apigateway/api_gateway_client.py @@ -118,33 +118,25 @@ def __init__(self, config, **kwargs): self.retry_strategy = kwargs.get('retry_strategy') self.circuit_breaker_callback = kwargs.get('circuit_breaker_callback') - def change_api_compartment(self, api_id, change_api_compartment_details, **kwargs): + def add_api_lock(self, api_id, add_resource_lock_details, **kwargs): """ - Changes the API compartment. + Adds a lock to a Api resource. :param str api_id: (required) The ocid of the API. - :param oci.apigateway.models.ChangeApiCompartmentDetails change_api_compartment_details: (required) - Details of the target compartment. + :param oci.apigateway.models.AddResourceLockDetails add_resource_lock_details: (required) + AddResourceLockDetails body parameter - :param str opc_retry_token: (optional) - A token that uniquely identifies a request so it can be retried in case of a timeout or - server error without risk of executing that same action again. Retry tokens expire after 24 - hours, but can be invalidated before then due to conflicting operations. For example, if a resource - has been deleted and purged from the system, then a retry of the original creation request - might be rejected. + :param str opc_request_id: (optional) + Unique identifier for the request. + If you need to contact Oracle about a particular request, please provide the request ID. :param str if_match: (optional) - For optimistic concurrency control. In the PUT or DELETE call - for a resource, set the `if-match` parameter to the value of the - etag from a previous GET or POST response for that resource. - The resource will be updated or deleted only if the etag you - provide matches the resource's current etag value. - - :param str opc_request_id: (optional) - The client request id for tracing. + 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. @@ -158,31 +150,30 @@ def change_api_compartment(self, api_id, change_api_compartment_details, **kwarg allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type None + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.apigateway.models.Api` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use change_api_compartment API. + Click `here `__ to see an example of how to use add_api_lock API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. required_arguments = ['apiId'] - resource_path = "/apis/{apiId}/actions/changeCompartment" + resource_path = "/apis/{apiId}/actions/addLock" method = "POST" - operation_name = "change_api_compartment" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/api-gateway/20190501/Api/ChangeApiCompartment" + operation_name = "add_api_lock" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/api-gateway/20190501/Api/AddApiLock" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "opc_retry_token", - "if_match", - "opc_request_id" + "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"change_api_compartment got unknown kwargs: {extra_kwargs!r}") + f"add_api_lock got unknown kwargs: {extra_kwargs!r}") path_params = { "apiId": api_id @@ -197,9 +188,8 @@ def change_api_compartment(self, api_id, change_api_compartment_details, **kwarg header_params = { "accept": "application/json", "content-type": "application/json", - "opc-retry-token": kwargs.get("opc_retry_token", missing), - "if-match": kwargs.get("if_match", missing), - "opc-request-id": kwargs.get("opc_request_id", missing) + "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} @@ -210,7 +200,6 @@ def change_api_compartment(self, api_id, change_api_compartment_details, **kwarg 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( @@ -219,7 +208,8 @@ def change_api_compartment(self, api_id, change_api_compartment_details, **kwarg method=method, path_params=path_params, header_params=header_params, - body=change_api_compartment_details, + body=add_resource_lock_details, + response_type="Api", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -230,39 +220,32 @@ def change_api_compartment(self, api_id, change_api_compartment_details, **kwarg method=method, path_params=path_params, header_params=header_params, - body=change_api_compartment_details, + body=add_resource_lock_details, + response_type="Api", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def change_certificate_compartment(self, certificate_id, change_certificate_compartment_details, **kwargs): + def add_certificate_lock(self, certificate_id, add_resource_lock_details, **kwargs): """ - Changes the certificate compartment. + Adds a lock to a Certificate resource. :param str certificate_id: (required) The ocid of the certificate. - :param oci.apigateway.models.ChangeCertificateCompartmentDetails change_certificate_compartment_details: (required) - Details of the target compartment. + :param oci.apigateway.models.AddResourceLockDetails add_resource_lock_details: (required) + AddResourceLockDetails body parameter - :param str opc_retry_token: (optional) - A token that uniquely identifies a request so it can be retried in case of a timeout or - server error without risk of executing that same action again. Retry tokens expire after 24 - hours, but can be invalidated before then due to conflicting operations. For example, if a resource - has been deleted and purged from the system, then a retry of the original creation request - might be rejected. + :param str opc_request_id: (optional) + Unique identifier for the request. + If you need to contact Oracle about a particular request, please provide the request ID. :param str if_match: (optional) - For optimistic concurrency control. In the PUT or DELETE call - for a resource, set the `if-match` parameter to the value of the - etag from a previous GET or POST response for that resource. - The resource will be updated or deleted only if the etag you - provide matches the resource's current etag value. - - :param str opc_request_id: (optional) - The client request id for tracing. + 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. @@ -276,31 +259,30 @@ def change_certificate_compartment(self, certificate_id, change_certificate_comp allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type None + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.apigateway.models.Certificate` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use change_certificate_compartment API. + Click `here `__ to see an example of how to use add_certificate_lock API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. required_arguments = ['certificateId'] - resource_path = "/certificates/{certificateId}/actions/changeCompartment" + resource_path = "/certificates/{certificateId}/actions/addLock" method = "POST" - operation_name = "change_certificate_compartment" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/api-gateway/20190501/Certificate/ChangeCertificateCompartment" + operation_name = "add_certificate_lock" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/api-gateway/20190501/Certificate/AddCertificateLock" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "opc_retry_token", - "if_match", - "opc_request_id" + "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"change_certificate_compartment got unknown kwargs: {extra_kwargs!r}") + f"add_certificate_lock got unknown kwargs: {extra_kwargs!r}") path_params = { "certificateId": certificate_id @@ -315,9 +297,8 @@ def change_certificate_compartment(self, certificate_id, change_certificate_comp header_params = { "accept": "application/json", "content-type": "application/json", - "opc-retry-token": kwargs.get("opc_retry_token", missing), - "if-match": kwargs.get("if_match", missing), - "opc-request-id": kwargs.get("opc_request_id", missing) + "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} @@ -328,7 +309,6 @@ def change_certificate_compartment(self, certificate_id, change_certificate_comp 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( @@ -337,7 +317,8 @@ def change_certificate_compartment(self, certificate_id, change_certificate_comp method=method, path_params=path_params, header_params=header_params, - body=change_certificate_compartment_details, + body=add_resource_lock_details, + response_type="Certificate", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -348,34 +329,37 @@ def change_certificate_compartment(self, certificate_id, change_certificate_comp method=method, path_params=path_params, header_params=header_params, - body=change_certificate_compartment_details, + body=add_resource_lock_details, + response_type="Certificate", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def create_api(self, create_api_details, **kwargs): + def add_sdk_lock(self, sdk_id, add_resource_lock_details, **kwargs): """ - Creates a new API. + Adds a lock to a Sdk resource. - :param oci.apigateway.models.CreateApiDetails create_api_details: (required) - Details for the new API. + :param str sdk_id: (required) + The ocid of the SDK. - :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 oci.apigateway.models.AddResourceLockDetails add_resource_lock_details: (required) + AddResourceLockDetails body parameter :param str opc_request_id: (optional) - The client request id for tracing. + Unique identifier for the request. + If you need to contact Oracle about a particular request, please provide the request ID. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + parameter to the value of the etag from a previous GET or POST response for that resource. The resource + will be updated or deleted only if the etag you provide matches the resource's current etag value. :param 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. + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here `__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. @@ -384,36 +368,46 @@ def create_api(self, create_api_details, **kwargs): allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.apigateway.models.Api` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.apigateway.models.Sdk` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use create_api API. + Click `here `__ to see an example of how to use add_sdk_lock API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = [] - resource_path = "/apis" + required_arguments = ['sdkId'] + resource_path = "/sdks/{sdkId}/actions/addLock" method = "POST" - operation_name = "create_api" - api_reference_link = "" + operation_name = "add_sdk_lock" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/api-gateway/20190501/Sdk/AddSdkLock" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "opc_retry_token", - "opc_request_id" + "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"create_api got unknown kwargs: {extra_kwargs!r}") + f"add_sdk_lock got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "sdkId": sdk_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') header_params = { "accept": "application/json", "content-type": "application/json", - "opc-retry-token": kwargs.get("opc_retry_token", missing), - "opc-request-id": kwargs.get("opc_request_id", missing) + "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} @@ -421,21 +415,19 @@ def create_api(self, create_api_details, **kwargs): operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) - if retry_strategy is None: - retry_strategy = retry.DEFAULT_RETRY_STRATEGY if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): - self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, + path_params=path_params, header_params=header_params, - body=create_api_details, - response_type="Api", + body=add_resource_lock_details, + response_type="Sdk", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -444,21 +436,25 @@ def create_api(self, create_api_details, **kwargs): return self.base_client.call_api( resource_path=resource_path, method=method, + path_params=path_params, header_params=header_params, - body=create_api_details, - response_type="Api", + body=add_resource_lock_details, + response_type="Sdk", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def create_certificate(self, create_certificate_details, **kwargs): + def change_api_compartment(self, api_id, change_api_compartment_details, **kwargs): """ - Creates a new Certificate. + Changes the API compartment. - :param oci.apigateway.models.CreateCertificateDetails create_certificate_details: (required) - Details for the new certificate + :param str api_id: (required) + The ocid of the API. + + :param oci.apigateway.models.ChangeApiCompartmentDetails change_api_compartment_details: (required) + Details of the target compartment. :param str opc_retry_token: (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or @@ -467,13 +463,23 @@ def create_certificate(self, create_certificate_details, **kwargs): has been deleted and purged from the system, then a retry of the original creation request might be rejected. + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the `if-match` parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. + :param str opc_request_id: (optional) The client request id for tracing. + :param bool is_lock_override: (optional) + Whether to override locks (if any exist). + :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. + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here `__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. @@ -482,35 +488,53 @@ def create_certificate(self, create_certificate_details, **kwargs): allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.apigateway.models.Certificate` + :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use create_certificate API. + Click `here `__ to see an example of how to use change_api_compartment API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = [] - resource_path = "/certificates" + required_arguments = ['apiId'] + resource_path = "/apis/{apiId}/actions/changeCompartment" method = "POST" - operation_name = "create_certificate" - api_reference_link = "" + operation_name = "change_api_compartment" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/api-gateway/20190501/Api/ChangeApiCompartment" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "opc_retry_token", - "opc_request_id" + "if_match", + "opc_request_id", + "is_lock_override" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"create_certificate got unknown kwargs: {extra_kwargs!r}") + f"change_api_compartment got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "apiId": api_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') + + query_params = { + "isLockOverride": kwargs.get("is_lock_override", 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-retry-token": kwargs.get("opc_retry_token", missing), + "if-match": kwargs.get("if_match", missing), "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} @@ -519,8 +543,6 @@ def create_certificate(self, create_certificate_details, **kwargs): 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): @@ -531,9 +553,10 @@ def create_certificate(self, create_certificate_details, **kwargs): self.base_client.call_api, resource_path=resource_path, method=method, + path_params=path_params, + query_params=query_params, header_params=header_params, - body=create_certificate_details, - response_type="Certificate", + body=change_api_compartment_details, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -542,21 +565,25 @@ def create_certificate(self, create_certificate_details, **kwargs): return self.base_client.call_api( resource_path=resource_path, method=method, + path_params=path_params, + query_params=query_params, header_params=header_params, - body=create_certificate_details, - response_type="Certificate", + body=change_api_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_sdk(self, create_sdk_details, **kwargs): + def change_certificate_compartment(self, certificate_id, change_certificate_compartment_details, **kwargs): """ - Creates a new SDK. + Changes the certificate compartment. - :param oci.apigateway.models.CreateSdkDetails create_sdk_details: (required) - Details for the new SDK. + :param str certificate_id: (required) + The ocid of the certificate. + + :param oci.apigateway.models.ChangeCertificateCompartmentDetails change_certificate_compartment_details: (required) + Details of the target compartment. :param str opc_retry_token: (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or @@ -565,13 +592,23 @@ def create_sdk(self, create_sdk_details, **kwargs): has been deleted and purged from the system, then a retry of the original creation request might be rejected. + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the `if-match` parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. + :param str opc_request_id: (optional) The client request id for tracing. + :param bool is_lock_override: (optional) + Whether to override locks (if any exist). + :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. + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here `__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. @@ -580,35 +617,53 @@ def create_sdk(self, create_sdk_details, **kwargs): allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.apigateway.models.Sdk` + :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use create_sdk API. + Click `here `__ to see an example of how to use change_certificate_compartment API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = [] - resource_path = "/sdks" + required_arguments = ['certificateId'] + resource_path = "/certificates/{certificateId}/actions/changeCompartment" method = "POST" - operation_name = "create_sdk" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/api-gateway/20190501/Sdk/CreateSdk" + operation_name = "change_certificate_compartment" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/api-gateway/20190501/Certificate/ChangeCertificateCompartment" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "opc_retry_token", - "opc_request_id" + "if_match", + "opc_request_id", + "is_lock_override" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"create_sdk got unknown kwargs: {extra_kwargs!r}") + f"change_certificate_compartment got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "certificateId": certificate_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') + + query_params = { + "isLockOverride": kwargs.get("is_lock_override", 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-retry-token": kwargs.get("opc_retry_token", missing), + "if-match": kwargs.get("if_match", missing), "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} @@ -617,8 +672,6 @@ def create_sdk(self, create_sdk_details, **kwargs): 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): @@ -629,9 +682,10 @@ def create_sdk(self, create_sdk_details, **kwargs): self.base_client.call_api, resource_path=resource_path, method=method, + path_params=path_params, + query_params=query_params, header_params=header_params, - body=create_sdk_details, - response_type="Sdk", + body=change_certificate_compartment_details, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -640,28 +694,29 @@ def create_sdk(self, create_sdk_details, **kwargs): return self.base_client.call_api( resource_path=resource_path, method=method, + path_params=path_params, + query_params=query_params, header_params=header_params, - body=create_sdk_details, - response_type="Sdk", + body=change_certificate_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 delete_api(self, api_id, **kwargs): + def create_api(self, create_api_details, **kwargs): """ - Deletes the API with the given identifier. + Creates a new API. - :param str api_id: (required) - The ocid of the API. + :param oci.apigateway.models.CreateApiDetails create_api_details: (required) + Details for the new API. - :param str if_match: (optional) - For optimistic concurrency control. In the PUT or DELETE call - for a resource, set the `if-match` parameter to the value of the - etag from a previous GET or POST response for that resource. - The resource will be updated or deleted only if the etag you - provide matches the resource's current etag value. + :param str opc_retry_token: (optional) + A token that uniquely identifies a request so it can be retried in case of a timeout or + server error without risk of executing that same action again. Retry tokens expire after 24 + hours, but can be invalidated before then due to conflicting operations. For example, if a resource + has been deleted and purged from the system, then a retry of the original creation request + might be rejected. :param str opc_request_id: (optional) The client request id for tracing. @@ -669,7 +724,7 @@ def delete_api(self, api_id, **kwargs): :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. - This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + 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`. @@ -678,45 +733,35 @@ def delete_api(self, api_id, **kwargs): allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type None + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.apigateway.models.Api` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use delete_api API. + Click `here `__ to see an example of how to use create_api API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['apiId'] - resource_path = "/apis/{apiId}" - method = "DELETE" - operation_name = "delete_api" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/api-gateway/20190501/Api/DeleteApi" + required_arguments = [] + resource_path = "/apis" + method = "POST" + operation_name = "create_api" + api_reference_link = "" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "if_match", + "opc_retry_token", "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"delete_api got unknown kwargs: {extra_kwargs!r}") - - path_params = { - "apiId": api_id - } - - path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} - - for (k, v) in six.iteritems(path_params): - if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): - raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + f"create_api got unknown kwargs: {extra_kwargs!r}") header_params = { "accept": "application/json", "content-type": "application/json", - "if-match": kwargs.get("if_match", missing), + "opc-retry-token": kwargs.get("opc_retry_token", missing), "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} @@ -725,17 +770,21 @@ def delete_api(self, api_id, **kwargs): operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) + if retry_strategy is None: + retry_strategy = retry.DEFAULT_RETRY_STRATEGY if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, - path_params=path_params, header_params=header_params, + body=create_api_details, + response_type="Api", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -744,27 +793,28 @@ def delete_api(self, api_id, **kwargs): return self.base_client.call_api( resource_path=resource_path, method=method, - path_params=path_params, header_params=header_params, + body=create_api_details, + response_type="Api", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def delete_certificate(self, certificate_id, **kwargs): + def create_certificate(self, create_certificate_details, **kwargs): """ - Deletes the certificate with the given identifier. + Creates a new Certificate. - :param str certificate_id: (required) - The ocid of the certificate. + :param oci.apigateway.models.CreateCertificateDetails create_certificate_details: (required) + Details for the new certificate - :param str if_match: (optional) - For optimistic concurrency control. In the PUT or DELETE call - for a resource, set the `if-match` parameter to the value of the - etag from a previous GET or POST response for that resource. - The resource will be updated or deleted only if the etag you - provide matches the resource's current etag value. + :param str opc_retry_token: (optional) + A token that uniquely identifies a request so it can be retried in case of a timeout or + server error without risk of executing that same action again. Retry tokens expire after 24 + hours, but can be invalidated before then due to conflicting operations. For example, if a resource + has been deleted and purged from the system, then a retry of the original creation request + might be rejected. :param str opc_request_id: (optional) The client request id for tracing. @@ -772,7 +822,7 @@ def delete_certificate(self, certificate_id, **kwargs): :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. - This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + 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`. @@ -781,45 +831,35 @@ def delete_certificate(self, certificate_id, **kwargs): allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type None + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.apigateway.models.Certificate` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use delete_certificate API. + Click `here `__ to see an example of how to use create_certificate API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['certificateId'] - resource_path = "/certificates/{certificateId}" - method = "DELETE" - operation_name = "delete_certificate" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/api-gateway/20190501/Certificate/DeleteCertificate" + required_arguments = [] + resource_path = "/certificates" + method = "POST" + operation_name = "create_certificate" + api_reference_link = "" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "if_match", + "opc_retry_token", "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"delete_certificate got unknown kwargs: {extra_kwargs!r}") - - path_params = { - "certificateId": certificate_id - } - - path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} - - for (k, v) in six.iteritems(path_params): - if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): - raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + f"create_certificate got unknown kwargs: {extra_kwargs!r}") header_params = { "accept": "application/json", "content-type": "application/json", - "if-match": kwargs.get("if_match", missing), + "opc-retry-token": kwargs.get("opc_retry_token", missing), "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} @@ -828,17 +868,21 @@ def delete_certificate(self, certificate_id, **kwargs): operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) + if retry_strategy is None: + retry_strategy = retry.DEFAULT_RETRY_STRATEGY if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, - path_params=path_params, header_params=header_params, + body=create_certificate_details, + response_type="Certificate", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -847,35 +891,36 @@ def delete_certificate(self, certificate_id, **kwargs): return self.base_client.call_api( resource_path=resource_path, method=method, - path_params=path_params, header_params=header_params, + body=create_certificate_details, + response_type="Certificate", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def delete_sdk(self, sdk_id, **kwargs): + def create_sdk(self, create_sdk_details, **kwargs): """ - Deletes provided SDK. + Creates a new SDK. - :param str sdk_id: (required) - The ocid of the SDK. + :param oci.apigateway.models.CreateSdkDetails create_sdk_details: (required) + Details for the new SDK. + + :param str opc_retry_token: (optional) + A token that uniquely identifies a request so it can be retried in case of a timeout or + server error without risk of executing that same action again. Retry tokens expire after 24 + hours, but can be invalidated before then due to conflicting operations. For example, if a resource + has been deleted and purged from the system, then a retry of the original creation request + might be rejected. :param str opc_request_id: (optional) The client request id for tracing. - :param str if_match: (optional) - For optimistic concurrency control. In the PUT or DELETE call - for a resource, set the `if-match` parameter to the value of the - etag from a previous GET or POST response for that resource. - The resource will be updated or deleted only if the etag you - provide matches the resource's current etag value. - :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. - This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + 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`. @@ -884,46 +929,36 @@ def delete_sdk(self, sdk_id, **kwargs): allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type None + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.apigateway.models.Sdk` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use delete_sdk API. + Click `here `__ to see an example of how to use create_sdk API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['sdkId'] - resource_path = "/sdks/{sdkId}" - method = "DELETE" - operation_name = "delete_sdk" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/api-gateway/20190501/Sdk/DeleteSdk" + required_arguments = [] + resource_path = "/sdks" + method = "POST" + operation_name = "create_sdk" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/api-gateway/20190501/Sdk/CreateSdk" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "opc_request_id", - "if_match" + "opc_retry_token", + "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"delete_sdk got unknown kwargs: {extra_kwargs!r}") - - path_params = { - "sdkId": sdk_id - } - - path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} - - for (k, v) in six.iteritems(path_params): - if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): - raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + f"create_sdk got unknown kwargs: {extra_kwargs!r}") header_params = { "accept": "application/json", "content-type": "application/json", - "opc-request-id": kwargs.get("opc_request_id", missing), - "if-match": kwargs.get("if_match", missing) + "opc-retry-token": kwargs.get("opc_retry_token", missing), + "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} @@ -931,17 +966,21 @@ def delete_sdk(self, sdk_id, **kwargs): operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) + if retry_strategy is None: + retry_strategy = retry.DEFAULT_RETRY_STRATEGY if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, - path_params=path_params, header_params=header_params, + body=create_sdk_details, + response_type="Sdk", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -950,28 +989,39 @@ def delete_sdk(self, sdk_id, **kwargs): return self.base_client.call_api( resource_path=resource_path, method=method, - path_params=path_params, header_params=header_params, + body=create_sdk_details, + response_type="Sdk", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def get_api(self, api_id, **kwargs): + def delete_api(self, api_id, **kwargs): """ - Gets an API by identifier. + Deletes the API with the given identifier. :param str api_id: (required) The ocid of the API. + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the `if-match` parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. + :param str opc_request_id: (optional) The client request id for tracing. + :param bool is_lock_override: (optional) + Whether to override locks (if any exist). + :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. + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here `__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. @@ -980,29 +1030,31 @@ def get_api(self, api_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.apigateway.models.Api` + :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use get_api API. + Click `here `__ to see an example of how to use delete_api API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. required_arguments = ['apiId'] resource_path = "/apis/{apiId}" - method = "GET" - operation_name = "get_api" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/api-gateway/20190501/Api/GetApi" + method = "DELETE" + operation_name = "delete_api" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/api-gateway/20190501/Api/DeleteApi" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "opc_request_id" + "if_match", + "opc_request_id", + "is_lock_override" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"get_api got unknown kwargs: {extra_kwargs!r}") + f"delete_api got unknown kwargs: {extra_kwargs!r}") path_params = { "apiId": api_id @@ -1014,9 +1066,15 @@ def get_api(self, api_id, **kwargs): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + query_params = { + "isLockOverride": kwargs.get("is_lock_override", 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", + "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} @@ -1025,8 +1083,6 @@ def get_api(self, api_id, **kwargs): 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): @@ -1037,8 +1093,8 @@ def get_api(self, api_id, **kwargs): resource_path=resource_path, method=method, path_params=path_params, + query_params=query_params, header_params=header_params, - response_type="Api", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -1048,23 +1104,20 @@ def get_api(self, api_id, **kwargs): resource_path=resource_path, method=method, path_params=path_params, + query_params=query_params, header_params=header_params, - response_type="Api", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def get_api_content(self, api_id, **kwargs): + def delete_certificate(self, certificate_id, **kwargs): """ - Get the raw API content. - + Deletes the certificate with the given identifier. - :param str api_id: (required) - The ocid of the API. - :param str opc_request_id: (optional) - The client request id for tracing. + :param str certificate_id: (required) + The ocid of the certificate. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call @@ -1073,17 +1126,16 @@ def get_api_content(self, api_id, **kwargs): The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. - :param str range: (optional) - The Range HTTP request header indicates the part of a document that the - server should return. `RFC 7233`__. - Note that only a single range of bytes is supported. - - __ https://tools.ietf.org/html/rfc7233#section-3.1 + :param str opc_request_id: (optional) + The client request id for tracing. + + :param bool is_lock_override: (optional) + Whether to override locks (if any exist). :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. + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here `__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. @@ -1092,34 +1144,34 @@ def get_api_content(self, api_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 stream + :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use get_api_content API. + Click `here `__ to see an example of how to use delete_certificate API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['apiId'] - resource_path = "/apis/{apiId}/content" - method = "GET" - operation_name = "get_api_content" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/api-gateway/20190501/Api/GetApiContent" + required_arguments = ['certificateId'] + resource_path = "/certificates/{certificateId}" + method = "DELETE" + operation_name = "delete_certificate" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/api-gateway/20190501/Certificate/DeleteCertificate" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "opc_request_id", "if_match", - "range" + "opc_request_id", + "is_lock_override" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"get_api_content got unknown kwargs: {extra_kwargs!r}") + f"delete_certificate got unknown kwargs: {extra_kwargs!r}") path_params = { - "apiId": api_id + "certificateId": certificate_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -1128,12 +1180,16 @@ def get_api_content(self, api_id, **kwargs): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + query_params = { + "isLockOverride": kwargs.get("is_lock_override", 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), "if-match": kwargs.get("if_match", missing), - "range": kwargs.get("range", 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} @@ -1141,8 +1197,6 @@ def get_api_content(self, api_id, **kwargs): 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): @@ -1153,8 +1207,8 @@ def get_api_content(self, api_id, **kwargs): resource_path=resource_path, method=method, path_params=path_params, + query_params=query_params, header_params=header_params, - response_type="stream", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -1164,20 +1218,20 @@ def get_api_content(self, api_id, **kwargs): resource_path=resource_path, method=method, path_params=path_params, + query_params=query_params, header_params=header_params, - response_type="stream", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def get_api_deployment_specification(self, api_id, **kwargs): + def delete_sdk(self, sdk_id, **kwargs): """ - Gets an API Deployment specification by identifier. + Deletes provided SDK. - :param str api_id: (required) - The ocid of the API. + :param str sdk_id: (required) + The ocid of the SDK. :param str opc_request_id: (optional) The client request id for tracing. @@ -1189,10 +1243,13 @@ def get_api_deployment_specification(self, api_id, **kwargs): The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + :param bool is_lock_override: (optional) + Whether to override locks (if any exist). + :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. + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here `__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. @@ -1201,33 +1258,34 @@ def get_api_deployment_specification(self, api_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.apigateway.models.ApiSpecification` + :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use get_api_deployment_specification API. + Click `here `__ to see an example of how to use delete_sdk API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['apiId'] - resource_path = "/apis/{apiId}/deploymentSpecification" - method = "GET" - operation_name = "get_api_deployment_specification" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/api-gateway/20190501/ApiSpecification/GetApiDeploymentSpecification" + required_arguments = ['sdkId'] + resource_path = "/sdks/{sdkId}" + method = "DELETE" + operation_name = "delete_sdk" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/api-gateway/20190501/Sdk/DeleteSdk" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "opc_request_id", - "if_match" + "if_match", + "is_lock_override" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"get_api_deployment_specification got unknown kwargs: {extra_kwargs!r}") + f"delete_sdk got unknown kwargs: {extra_kwargs!r}") path_params = { - "apiId": api_id + "sdkId": sdk_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -1236,6 +1294,11 @@ def get_api_deployment_specification(self, api_id, **kwargs): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + query_params = { + "isLockOverride": kwargs.get("is_lock_override", 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", @@ -1248,8 +1311,6 @@ def get_api_deployment_specification(self, api_id, **kwargs): 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): @@ -1260,8 +1321,8 @@ def get_api_deployment_specification(self, api_id, **kwargs): resource_path=resource_path, method=method, path_params=path_params, + query_params=query_params, header_params=header_params, - response_type="ApiSpecification", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -1271,16 +1332,16 @@ def get_api_deployment_specification(self, api_id, **kwargs): resource_path=resource_path, method=method, path_params=path_params, + query_params=query_params, header_params=header_params, - response_type="ApiSpecification", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def get_api_validations(self, api_id, **kwargs): + def get_api(self, api_id, **kwargs): """ - Gets the API validation results. + Gets an API by identifier. :param str api_id: (required) @@ -1289,13 +1350,6 @@ def get_api_validations(self, api_id, **kwargs): :param str opc_request_id: (optional) The client request id for tracing. - :param str if_match: (optional) - For optimistic concurrency control. In the PUT or DELETE call - for a resource, set the `if-match` parameter to the value of the - etag from a previous GET or POST response for that resource. - The resource will be updated or deleted only if the etag you - provide matches the resource's current etag value. - :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. @@ -1308,30 +1362,29 @@ def get_api_validations(self, api_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.apigateway.models.ApiValidations` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.apigateway.models.Api` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use get_api_validations API. + Click `here `__ to see an example of how to use get_api API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. required_arguments = ['apiId'] - resource_path = "/apis/{apiId}/validations" + resource_path = "/apis/{apiId}" method = "GET" - operation_name = "get_api_validations" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/api-gateway/20190501/ApiValidations/GetApiValidations" + operation_name = "get_api" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/api-gateway/20190501/Api/GetApi" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "opc_request_id", - "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"get_api_validations got unknown kwargs: {extra_kwargs!r}") + f"get_api got unknown kwargs: {extra_kwargs!r}") path_params = { "apiId": api_id @@ -1346,8 +1399,7 @@ def get_api_validations(self, api_id, **kwargs): header_params = { "accept": "application/json", "content-type": "application/json", - "opc-request-id": kwargs.get("opc_request_id", missing), - "if-match": kwargs.get("if_match", missing) + "opc-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} @@ -1368,7 +1420,7 @@ def get_api_validations(self, api_id, **kwargs): method=method, path_params=path_params, header_params=header_params, - response_type="ApiValidations", + response_type="Api", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -1379,23 +1431,37 @@ def get_api_validations(self, api_id, **kwargs): method=method, path_params=path_params, header_params=header_params, - response_type="ApiValidations", + response_type="Api", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def get_certificate(self, certificate_id, **kwargs): + def get_api_content(self, api_id, **kwargs): """ - Gets a certificate by identifier. + Get the raw API content. - :param str certificate_id: (required) - The ocid of the certificate. + :param str api_id: (required) + The ocid of the API. :param str opc_request_id: (optional) The client request id for tracing. + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the `if-match` parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. + + :param str range: (optional) + The Range HTTP request header indicates the part of a document that the + server should return. `RFC 7233`__. + Note that only a single range of bytes is supported. + + __ https://tools.ietf.org/html/rfc7233#section-3.1 + :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. @@ -1408,32 +1474,34 @@ def get_certificate(self, certificate_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.apigateway.models.Certificate` + :return: A :class:`~oci.response.Response` object with data of type stream :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use get_certificate API. + Click `here `__ to see an example of how to use get_api_content API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['certificateId'] - resource_path = "/certificates/{certificateId}" + required_arguments = ['apiId'] + resource_path = "/apis/{apiId}/content" method = "GET" - operation_name = "get_certificate" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/api-gateway/20190501/Certificate/GetCertificate" + operation_name = "get_api_content" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/api-gateway/20190501/Api/GetApiContent" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "opc_request_id" + "opc_request_id", + "if_match", + "range" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"get_certificate got unknown kwargs: {extra_kwargs!r}") + f"get_api_content got unknown kwargs: {extra_kwargs!r}") path_params = { - "certificateId": certificate_id + "apiId": api_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -1445,7 +1513,9 @@ def get_certificate(self, certificate_id, **kwargs): header_params = { "accept": "application/json", "content-type": "application/json", - "opc-request-id": kwargs.get("opc_request_id", missing) + "opc-request-id": kwargs.get("opc_request_id", missing), + "if-match": kwargs.get("if_match", missing), + "range": kwargs.get("range", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} @@ -1466,7 +1536,7 @@ def get_certificate(self, certificate_id, **kwargs): method=method, path_params=path_params, header_params=header_params, - response_type="Certificate", + response_type="stream", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -1477,23 +1547,30 @@ def get_certificate(self, certificate_id, **kwargs): method=method, path_params=path_params, header_params=header_params, - response_type="Certificate", + response_type="stream", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def get_sdk(self, sdk_id, **kwargs): + def get_api_deployment_specification(self, api_id, **kwargs): """ - Return object store downloadable URL and metadata. + Gets an API Deployment specification by identifier. - :param str sdk_id: (required) - The ocid of the SDK. + :param str api_id: (required) + The ocid of the API. :param str opc_request_id: (optional) The client request id for tracing. + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the `if-match` parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. + :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. @@ -1506,32 +1583,33 @@ def get_sdk(self, sdk_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.apigateway.models.Sdk` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.apigateway.models.ApiSpecification` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use get_sdk API. + Click `here `__ to see an example of how to use get_api_deployment_specification API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['sdkId'] - resource_path = "/sdks/{sdkId}" + required_arguments = ['apiId'] + resource_path = "/apis/{apiId}/deploymentSpecification" method = "GET" - operation_name = "get_sdk" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/api-gateway/20190501/Sdk/GetSdk" + operation_name = "get_api_deployment_specification" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/api-gateway/20190501/ApiSpecification/GetApiDeploymentSpecification" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "opc_request_id" + "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"get_sdk got unknown kwargs: {extra_kwargs!r}") + f"get_api_deployment_specification got unknown kwargs: {extra_kwargs!r}") path_params = { - "sdkId": sdk_id + "apiId": api_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -1543,7 +1621,8 @@ def get_sdk(self, sdk_id, **kwargs): header_params = { "accept": "application/json", "content-type": "application/json", - "opc-request-id": kwargs.get("opc_request_id", missing) + "opc-request-id": kwargs.get("opc_request_id", missing), + "if-match": kwargs.get("if_match", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} @@ -1564,7 +1643,7 @@ def get_sdk(self, sdk_id, **kwargs): method=method, path_params=path_params, header_params=header_params, - response_type="Sdk", + response_type="ApiSpecification", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -1575,54 +1654,30 @@ def get_sdk(self, sdk_id, **kwargs): method=method, path_params=path_params, header_params=header_params, - response_type="Sdk", + response_type="ApiSpecification", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def list_apis(self, compartment_id, **kwargs): + def get_api_validations(self, api_id, **kwargs): """ - Returns a list of APIs. - - - :param str compartment_id: (required) - The ocid of the compartment in which to list resources. - - :param str display_name: (optional) - A user-friendly name. Does not have to be unique, and it's changeable. - - Example: `My new resource` - - :param str lifecycle_state: (optional) - A filter to return only resources that match the given lifecycle state. - - Example: `ACTIVE` - - Allowed values are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED" - - :param int limit: (optional) - The maximum number of items to return. - - :param str page: (optional) - The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. - - :param str sort_order: (optional) - The sort order to use, either 'asc' or 'desc'. The default order depends on the sortBy value. - - Allowed values are: "ASC", "DESC" + Gets the API validation results. - :param str sort_by: (optional) - The field to sort by. You can provide one sort order (`sortOrder`). - Default order for `timeCreated` is descending. Default order for - `displayName` is ascending. The `displayName` sort order is case - sensitive. - Allowed values are: "timeCreated", "displayName" + :param str api_id: (required) + The ocid of the API. :param str opc_request_id: (optional) The client request id for tracing. + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the `if-match` parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. + :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. @@ -1635,25 +1690,658 @@ def list_apis(self, compartment_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.apigateway.models.ApiCollection` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.apigateway.models.ApiValidations` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use list_apis API. + Click `here `__ to see an example of how to use get_api_validations API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['compartmentId'] + required_arguments = ['apiId'] + resource_path = "/apis/{apiId}/validations" + method = "GET" + operation_name = "get_api_validations" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/api-gateway/20190501/ApiValidations/GetApiValidations" + + # 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"get_api_validations got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "apiId": api_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, + response_type="ApiValidations", + 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="ApiValidations", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + + def get_certificate(self, certificate_id, **kwargs): + """ + Gets a certificate by identifier. + + + :param str certificate_id: (required) + The ocid of the certificate. + + :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.apigateway.models.Certificate` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_certificate API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['certificateId'] + resource_path = "/certificates/{certificateId}" + method = "GET" + operation_name = "get_certificate" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/api-gateway/20190501/Certificate/GetCertificate" + + # 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_certificate got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "certificateId": certificate_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="Certificate", + 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="Certificate", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + + def get_sdk(self, sdk_id, **kwargs): + """ + Return object store downloadable URL and metadata. + + + :param str sdk_id: (required) + The ocid of the SDK. + + :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.apigateway.models.Sdk` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_sdk API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['sdkId'] + resource_path = "/sdks/{sdkId}" + method = "GET" + operation_name = "get_sdk" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/api-gateway/20190501/Sdk/GetSdk" + + # 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_sdk got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "sdkId": sdk_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="Sdk", + 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="Sdk", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + + def list_apis(self, compartment_id, **kwargs): + """ + Returns a list of APIs. + + + :param str compartment_id: (required) + The ocid of the compartment in which to list resources. + + :param str display_name: (optional) + A user-friendly name. Does not have to be unique, and it's changeable. + + Example: `My new resource` + + :param str lifecycle_state: (optional) + A filter to return only resources that match the given lifecycle state. + + Example: `ACTIVE` + + Allowed values are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED" + + :param int limit: (optional) + The maximum number of items to return. + + :param str page: (optional) + The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + + :param str sort_order: (optional) + The sort order to use, either 'asc' or 'desc'. The default order depends on the sortBy value. + + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + The field to sort by. You can provide one sort order (`sortOrder`). + Default order for `timeCreated` is descending. Default order for + `displayName` is ascending. The `displayName` sort order is case + sensitive. + + Allowed values are: "timeCreated", "displayName" + + :param str opc_request_id: (optional) + The client request id for tracing. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation 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.apigateway.models.ApiCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_apis API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['compartmentId'] resource_path = "/apis" method = "GET" - operation_name = "list_apis" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/api-gateway/20190501/Api/ListApis" + operation_name = "list_apis" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/api-gateway/20190501/Api/ListApis" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "display_name", + "lifecycle_state", + "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_apis got unknown kwargs: {extra_kwargs!r}") + + if 'lifecycle_state' in kwargs: + lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "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 = ["timeCreated", "displayName"] + if kwargs['sort_by'] not in sort_by_allowed_values: + raise ValueError( + f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }" + ) + + query_params = { + "compartmentId": compartment_id, + "displayName": kwargs.get("display_name", missing), + "lifecycleState": kwargs.get("lifecycle_state", 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="ApiCollection", + 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="ApiCollection", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + + def list_certificates(self, compartment_id, **kwargs): + """ + Returns a list of certificates. + + + :param str compartment_id: (required) + The ocid of the compartment in which to list resources. + + :param str display_name: (optional) + A user-friendly name. Does not have to be unique, and it's changeable. + + Example: `My new resource` + + :param str lifecycle_state: (optional) + A filter to return only resources that match the given lifecycle state. + + Example: `ACTIVE` or `DELETED` + + Allowed values are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED" + + :param int limit: (optional) + The maximum number of items to return. + + :param str page: (optional) + The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + + :param str sort_order: (optional) + The sort order to use, either 'asc' or 'desc'. The default order depends on the sortBy value. + + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + The field to sort by. You can provide one sort order (`sortOrder`). + Default order for `timeCreated` is descending. Default order for + `displayName` is ascending. The `displayName` sort order is case + sensitive. + + Allowed values are: "timeCreated", "displayName" + + :param str opc_request_id: (optional) + The client request id for tracing. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation 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.apigateway.models.CertificateCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_certificates API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['compartmentId'] + resource_path = "/certificates" + method = "GET" + operation_name = "list_certificates" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/api-gateway/20190501/Certificate/ListCertificates" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "display_name", + "lifecycle_state", + "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_certificates got unknown kwargs: {extra_kwargs!r}") + + if 'lifecycle_state' in kwargs: + lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "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 = ["timeCreated", "displayName"] + if kwargs['sort_by'] not in sort_by_allowed_values: + raise ValueError( + f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }" + ) + + query_params = { + "compartmentId": compartment_id, + "displayName": kwargs.get("display_name", missing), + "lifecycleState": kwargs.get("lifecycle_state", 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="CertificateCollection", + 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="CertificateCollection", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + + def list_sdk_language_types(self, compartment_id, **kwargs): + """ + Lists programming languages in which SDK can be generated. + + + :param str compartment_id: (required) + The ocid of the compartment in which to list resources. + + :param str display_name: (optional) + A user-friendly name. Does not have to be unique, and it's changeable. + + Example: `My new resource` + + :param int limit: (optional) + The maximum number of items to return. + + :param str page: (optional) + The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + + :param str sort_order: (optional) + The sort order to use, either 'asc' or 'desc'. The default order depends on the sortBy value. + + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + The field to sort by. You can provide one sort order (`sortOrder`). + Default order for `timeCreated` is descending. Default order for + `displayName` is ascending. The `displayName` sort order is case + sensitive. + + Allowed values are: "timeCreated", "displayName" + + :param str opc_request_id: (optional) + The client request id for tracing. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation 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.apigateway.models.SdkLanguageTypeCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_sdk_language_types API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['compartmentId'] + resource_path = "/sdkLanguageTypes" + method = "GET" + operation_name = "list_sdk_language_types" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/api-gateway/20190501/SdkLanguageTypeSummary/ListSdkLanguageTypes" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "display_name", - "lifecycle_state", "limit", "page", "sort_order", @@ -1663,14 +2351,7 @@ def list_apis(self, compartment_id, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"list_apis got unknown kwargs: {extra_kwargs!r}") - - if 'lifecycle_state' in kwargs: - lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "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 }" - ) + f"list_sdk_language_types got unknown kwargs: {extra_kwargs!r}") if 'sort_order' in kwargs: sort_order_allowed_values = ["ASC", "DESC"] @@ -1687,13 +2368,12 @@ def list_apis(self, compartment_id, **kwargs): ) query_params = { - "compartmentId": compartment_id, "displayName": kwargs.get("display_name", missing), - "lifecycleState": kwargs.get("lifecycle_state", missing), "limit": kwargs.get("limit", missing), "page": kwargs.get("page", missing), "sortOrder": kwargs.get("sort_order", missing), - "sortBy": kwargs.get("sort_by", missing) + "sortBy": kwargs.get("sort_by", missing), + "compartmentId": compartment_id } query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} @@ -1721,7 +2401,7 @@ def list_apis(self, compartment_id, **kwargs): method=method, query_params=query_params, header_params=header_params, - response_type="ApiCollection", + response_type="SdkLanguageTypeCollection", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -1732,19 +2412,19 @@ def list_apis(self, compartment_id, **kwargs): method=method, query_params=query_params, header_params=header_params, - response_type="ApiCollection", + response_type="SdkLanguageTypeCollection", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def list_certificates(self, compartment_id, **kwargs): + def list_sdks(self, **kwargs): """ - Returns a list of certificates. + Returns list of generated SDKs. - :param str compartment_id: (required) - The ocid of the compartment in which to list resources. + :param str sdk_id: (optional) + The ocid of the SDK. This value must be present unless apiId is present. :param str display_name: (optional) A user-friendly name. Does not have to be unique, and it's changeable. @@ -1756,7 +2436,7 @@ def list_certificates(self, compartment_id, **kwargs): Example: `ACTIVE` or `DELETED` - Allowed values are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED" + Allowed values are: "CREATING", "ACTIVE", "FAILED", "DELETING", "DELETED" :param int limit: (optional) The maximum number of items to return. @@ -1777,6 +2457,9 @@ def list_certificates(self, compartment_id, **kwargs): Allowed values are: "timeCreated", "displayName" + :param str api_id: (optional) + The ocid of the API. This value must be present unless sdkId is present. + :param str opc_request_id: (optional) The client request id for tracing. @@ -1792,38 +2475,40 @@ def list_certificates(self, compartment_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.apigateway.models.CertificateCollection` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.apigateway.models.SdkCollection` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use list_certificates API. + Click `here `__ to see an example of how to use list_sdks API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['compartmentId'] - resource_path = "/certificates" + required_arguments = [] + resource_path = "/sdks" method = "GET" - operation_name = "list_certificates" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/api-gateway/20190501/Certificate/ListCertificates" + operation_name = "list_sdks" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/api-gateway/20190501/Sdk/ListSdks" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", + "sdk_id", "display_name", "lifecycle_state", "limit", "page", "sort_order", "sort_by", + "api_id", "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_certificates got unknown kwargs: {extra_kwargs!r}") + f"list_sdks got unknown kwargs: {extra_kwargs!r}") if 'lifecycle_state' in kwargs: - lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED"] + lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "FAILED", "DELETING", "DELETED"] 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 }" @@ -1844,20 +2529,130 @@ def list_certificates(self, compartment_id, **kwargs): ) query_params = { - "compartmentId": compartment_id, + "sdkId": kwargs.get("sdk_id", missing), "displayName": kwargs.get("display_name", missing), "lifecycleState": kwargs.get("lifecycle_state", missing), "limit": kwargs.get("limit", missing), "page": kwargs.get("page", missing), "sortOrder": kwargs.get("sort_order", missing), - "sortBy": kwargs.get("sort_by", missing) + "sortBy": kwargs.get("sort_by", missing), + "apiId": kwargs.get("api_id", 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="SdkCollection", + 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="SdkCollection", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + + def remove_api_lock(self, api_id, remove_resource_lock_details, **kwargs): + """ + Removes a lock from a Api resource. + + + :param str api_id: (required) + The ocid of the API. + + :param oci.apigateway.models.RemoveResourceLockDetails remove_resource_lock_details: (required) + RemoveResourceLockDetails body parameter + + :param str opc_request_id: (optional) + Unique identifier for the request. + If you need to contact Oracle about a particular request, please provide the request ID. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + parameter to the value of the etag from a previous GET or POST response for that resource. The resource + will be updated or deleted only if the etag you provide matches the resource's current etag value. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.apigateway.models.Api` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use remove_api_lock API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['apiId'] + resource_path = "/apis/{apiId}/actions/removeLock" + method = "POST" + operation_name = "remove_api_lock" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/api-gateway/20190501/Api/RemoveApiLock" + + # 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"remove_api_lock got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "apiId": api_id } - query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') header_params = { "accept": "application/json", "content-type": "application/json", - "opc-request-id": kwargs.get("opc_request_id", missing) + "opc-request-id": kwargs.get("opc_request_id", missing), + "if-match": kwargs.get("if_match", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} @@ -1865,8 +2660,6 @@ def list_certificates(self, compartment_id, **kwargs): 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): @@ -1876,9 +2669,10 @@ def list_certificates(self, compartment_id, **kwargs): self.base_client.call_api, resource_path=resource_path, method=method, - query_params=query_params, + path_params=path_params, header_params=header_params, - response_type="CertificateCollection", + body=remove_resource_lock_details, + response_type="Api", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -1887,53 +2681,39 @@ def list_certificates(self, compartment_id, **kwargs): return self.base_client.call_api( resource_path=resource_path, method=method, - query_params=query_params, + path_params=path_params, header_params=header_params, - response_type="CertificateCollection", + body=remove_resource_lock_details, + response_type="Api", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def list_sdk_language_types(self, compartment_id, **kwargs): + def remove_certificate_lock(self, certificate_id, remove_resource_lock_details, **kwargs): """ - Lists programming languages in which SDK can be generated. - - - :param str compartment_id: (required) - The ocid of the compartment in which to list resources. - - :param str display_name: (optional) - A user-friendly name. Does not have to be unique, and it's changeable. - - Example: `My new resource` + Removes a lock from a Certificate resource. - :param int limit: (optional) - The maximum number of items to return. - - :param str page: (optional) - The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. - - :param str sort_order: (optional) - The sort order to use, either 'asc' or 'desc'. The default order depends on the sortBy value. - Allowed values are: "ASC", "DESC" - - :param str sort_by: (optional) - The field to sort by. You can provide one sort order (`sortOrder`). - Default order for `timeCreated` is descending. Default order for - `displayName` is ascending. The `displayName` sort order is case - sensitive. + :param str certificate_id: (required) + The ocid of the certificate. - Allowed values are: "timeCreated", "displayName" + :param oci.apigateway.models.RemoveResourceLockDetails remove_resource_lock_details: (required) + RemoveResourceLockDetails body parameter :param str opc_request_id: (optional) - The client request id for tracing. + Unique identifier for the request. + If you need to contact Oracle about a particular request, please provide the request ID. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + parameter to the value of the etag from a previous GET or POST response for that resource. The resource + will be updated or deleted only if the etag you provide matches the resource's current etag value. :param 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. + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here `__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. @@ -1942,63 +2722,46 @@ def list_sdk_language_types(self, compartment_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.apigateway.models.SdkLanguageTypeCollection` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.apigateway.models.Certificate` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use list_sdk_language_types API. + Click `here `__ to see an example of how to use remove_certificate_lock API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['compartmentId'] - resource_path = "/sdkLanguageTypes" - method = "GET" - operation_name = "list_sdk_language_types" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/api-gateway/20190501/SdkLanguageTypeSummary/ListSdkLanguageTypes" + required_arguments = ['certificateId'] + resource_path = "/certificates/{certificateId}/actions/removeLock" + method = "POST" + operation_name = "remove_certificate_lock" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/api-gateway/20190501/Certificate/RemoveCertificateLock" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "display_name", - "limit", - "page", - "sort_order", - "sort_by", - "opc_request_id" + "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"list_sdk_language_types got unknown kwargs: {extra_kwargs!r}") + f"remove_certificate_lock 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 }" - ) + path_params = { + "certificateId": certificate_id + } - if 'sort_by' in kwargs: - sort_by_allowed_values = ["timeCreated", "displayName"] - if kwargs['sort_by'] not in sort_by_allowed_values: - raise ValueError( - f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }" - ) + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} - query_params = { - "displayName": kwargs.get("display_name", missing), - "limit": kwargs.get("limit", missing), - "page": kwargs.get("page", missing), - "sortOrder": kwargs.get("sort_order", missing), - "sortBy": kwargs.get("sort_by", missing), - "compartmentId": compartment_id - } - query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + 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) + "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} @@ -2006,8 +2769,6 @@ def list_sdk_language_types(self, compartment_id, **kwargs): 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): @@ -2017,9 +2778,10 @@ def list_sdk_language_types(self, compartment_id, **kwargs): self.base_client.call_api, resource_path=resource_path, method=method, - query_params=query_params, + path_params=path_params, header_params=header_params, - response_type="SdkLanguageTypeCollection", + body=remove_resource_lock_details, + response_type="Certificate", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -2028,63 +2790,39 @@ def list_sdk_language_types(self, compartment_id, **kwargs): return self.base_client.call_api( resource_path=resource_path, method=method, - query_params=query_params, + path_params=path_params, header_params=header_params, - response_type="SdkLanguageTypeCollection", + body=remove_resource_lock_details, + response_type="Certificate", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def list_sdks(self, **kwargs): + def remove_sdk_lock(self, sdk_id, remove_resource_lock_details, **kwargs): """ - Returns list of generated SDKs. + Removes a lock from a Sdk resource. - :param str sdk_id: (optional) + :param str sdk_id: (required) The ocid of the SDK. - :param str display_name: (optional) - A user-friendly name. Does not have to be unique, and it's changeable. - - Example: `My new resource` - - :param str lifecycle_state: (optional) - A filter to return only resources that match the given lifecycle state. - - Example: `ACTIVE` or `DELETED` - - Allowed values are: "CREATING", "ACTIVE", "FAILED", "DELETING", "DELETED" - - :param int limit: (optional) - The maximum number of items to return. - - :param str page: (optional) - The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. - - :param str sort_order: (optional) - The sort order to use, either 'asc' or 'desc'. The default order depends on the sortBy value. - - Allowed values are: "ASC", "DESC" - - :param str sort_by: (optional) - The field to sort by. You can provide one sort order (`sortOrder`). - Default order for `timeCreated` is descending. Default order for - `displayName` is ascending. The `displayName` sort order is case - sensitive. - - Allowed values are: "timeCreated", "displayName" - - :param str api_id: (optional) - The ocid of the API. + :param oci.apigateway.models.RemoveResourceLockDetails remove_resource_lock_details: (required) + RemoveResourceLockDetails body parameter :param str opc_request_id: (optional) - The client request id for tracing. + Unique identifier for the request. + If you need to contact Oracle about a particular request, please provide the request ID. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + parameter to the value of the etag from a previous GET or POST response for that resource. The resource + will be updated or deleted only if the etag you provide matches the resource's current etag value. :param 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. + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here `__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. @@ -2093,75 +2831,46 @@ def list_sdks(self, **kwargs): allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.apigateway.models.SdkCollection` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.apigateway.models.Sdk` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use list_sdks API. + Click `here `__ to see an example of how to use remove_sdk_lock API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = [] - resource_path = "/sdks" - method = "GET" - operation_name = "list_sdks" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/api-gateway/20190501/Sdk/ListSdks" + required_arguments = ['sdkId'] + resource_path = "/sdks/{sdkId}/actions/removeLock" + method = "POST" + operation_name = "remove_sdk_lock" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/api-gateway/20190501/Sdk/RemoveSdkLock" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "sdk_id", - "display_name", - "lifecycle_state", - "limit", - "page", - "sort_order", - "sort_by", - "api_id", - "opc_request_id" + "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"list_sdks got unknown kwargs: {extra_kwargs!r}") - - if 'lifecycle_state' in kwargs: - lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "FAILED", "DELETING", "DELETED"] - 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 }" - ) + f"remove_sdk_lock 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 }" - ) + path_params = { + "sdkId": sdk_id + } - if 'sort_by' in kwargs: - sort_by_allowed_values = ["timeCreated", "displayName"] - if kwargs['sort_by'] not in sort_by_allowed_values: - raise ValueError( - f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }" - ) + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} - query_params = { - "sdkId": kwargs.get("sdk_id", missing), - "displayName": kwargs.get("display_name", missing), - "lifecycleState": kwargs.get("lifecycle_state", missing), - "limit": kwargs.get("limit", missing), - "page": kwargs.get("page", missing), - "sortOrder": kwargs.get("sort_order", missing), - "sortBy": kwargs.get("sort_by", missing), - "apiId": kwargs.get("api_id", missing) - } - query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + 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) + "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} @@ -2169,8 +2878,6 @@ def list_sdks(self, **kwargs): 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): @@ -2180,9 +2887,10 @@ def list_sdks(self, **kwargs): self.base_client.call_api, resource_path=resource_path, method=method, - query_params=query_params, + path_params=path_params, header_params=header_params, - response_type="SdkCollection", + body=remove_resource_lock_details, + response_type="Sdk", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -2191,9 +2899,10 @@ def list_sdks(self, **kwargs): return self.base_client.call_api( resource_path=resource_path, method=method, - query_params=query_params, + path_params=path_params, header_params=header_params, - response_type="SdkCollection", + body=remove_resource_lock_details, + response_type="Sdk", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -2220,6 +2929,9 @@ def update_api(self, api_id, update_api_details, **kwargs): :param str opc_request_id: (optional) The client request id for tracing. + :param bool is_lock_override: (optional) + Whether to override locks (if any exist). + :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. @@ -2250,7 +2962,8 @@ def update_api(self, api_id, update_api_details, **kwargs): "allow_control_chars", "retry_strategy", "if_match", - "opc_request_id" + "opc_request_id", + "is_lock_override" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: @@ -2267,6 +2980,11 @@ def update_api(self, api_id, update_api_details, **kwargs): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + query_params = { + "isLockOverride": kwargs.get("is_lock_override", 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", @@ -2289,6 +3007,7 @@ def update_api(self, api_id, update_api_details, **kwargs): resource_path=resource_path, method=method, path_params=path_params, + query_params=query_params, header_params=header_params, body=update_api_details, allow_control_chars=kwargs.get('allow_control_chars'), @@ -2300,6 +3019,7 @@ def update_api(self, api_id, update_api_details, **kwargs): resource_path=resource_path, method=method, path_params=path_params, + query_params=query_params, header_params=header_params, body=update_api_details, allow_control_chars=kwargs.get('allow_control_chars'), @@ -2328,6 +3048,9 @@ def update_certificate(self, certificate_id, update_certificate_details, **kwarg :param str opc_request_id: (optional) The client request id for tracing. + :param bool is_lock_override: (optional) + Whether to override locks (if any exist). + :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. @@ -2358,7 +3081,8 @@ def update_certificate(self, certificate_id, update_certificate_details, **kwarg "allow_control_chars", "retry_strategy", "if_match", - "opc_request_id" + "opc_request_id", + "is_lock_override" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: @@ -2375,6 +3099,11 @@ def update_certificate(self, certificate_id, update_certificate_details, **kwarg 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') + query_params = { + "isLockOverride": kwargs.get("is_lock_override", 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", @@ -2397,6 +3126,7 @@ def update_certificate(self, certificate_id, update_certificate_details, **kwarg resource_path=resource_path, method=method, path_params=path_params, + query_params=query_params, header_params=header_params, body=update_certificate_details, allow_control_chars=kwargs.get('allow_control_chars'), @@ -2408,6 +3138,7 @@ def update_certificate(self, certificate_id, update_certificate_details, **kwarg resource_path=resource_path, method=method, path_params=path_params, + query_params=query_params, header_params=header_params, body=update_certificate_details, allow_control_chars=kwargs.get('allow_control_chars'), @@ -2436,6 +3167,9 @@ def update_sdk(self, sdk_id, update_sdk_details, **kwargs): :param str opc_request_id: (optional) The client request id for tracing. + :param bool is_lock_override: (optional) + Whether to override locks (if any exist). + :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. @@ -2466,7 +3200,8 @@ def update_sdk(self, sdk_id, update_sdk_details, **kwargs): "allow_control_chars", "retry_strategy", "if_match", - "opc_request_id" + "opc_request_id", + "is_lock_override" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: @@ -2483,6 +3218,11 @@ def update_sdk(self, sdk_id, update_sdk_details, **kwargs): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + query_params = { + "isLockOverride": kwargs.get("is_lock_override", 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", @@ -2505,6 +3245,7 @@ def update_sdk(self, sdk_id, update_sdk_details, **kwargs): resource_path=resource_path, method=method, path_params=path_params, + query_params=query_params, header_params=header_params, body=update_sdk_details, allow_control_chars=kwargs.get('allow_control_chars'), @@ -2516,6 +3257,7 @@ def update_sdk(self, sdk_id, update_sdk_details, **kwargs): resource_path=resource_path, method=method, path_params=path_params, + query_params=query_params, header_params=header_params, body=update_sdk_details, allow_control_chars=kwargs.get('allow_control_chars'), diff --git a/src/oci/apigateway/api_gateway_client_composite_operations.py b/src/oci/apigateway/api_gateway_client_composite_operations.py index 350563c897..4665877f64 100644 --- a/src/oci/apigateway/api_gateway_client_composite_operations.py +++ b/src/oci/apigateway/api_gateway_client_composite_operations.py @@ -25,6 +25,141 @@ def __init__(self, client, **kwargs): """ self.client = client + def add_api_lock_and_wait_for_state(self, api_id, add_resource_lock_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.apigateway.ApiGatewayClient.add_api_lock` and waits for the :py:class:`~oci.apigateway.models.Api` acted upon + to enter the given state(s). + + :param str api_id: (required) + The ocid of the API. + + :param oci.apigateway.models.AddResourceLockDetails add_resource_lock_details: (required) + AddResourceLockDetails body parameter + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.apigateway.models.Api.lifecycle_state` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.apigateway.ApiGatewayClient.add_api_lock` + + :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.add_api_lock(api_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] + api_id = operation_result.data.id + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_api(api_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 add_certificate_lock_and_wait_for_state(self, certificate_id, add_resource_lock_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.apigateway.ApiGatewayClient.add_certificate_lock` and waits for the :py:class:`~oci.apigateway.models.Certificate` acted upon + to enter the given state(s). + + :param str certificate_id: (required) + The ocid of the certificate. + + :param oci.apigateway.models.AddResourceLockDetails add_resource_lock_details: (required) + AddResourceLockDetails body parameter + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.apigateway.models.Certificate.lifecycle_state` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.apigateway.ApiGatewayClient.add_certificate_lock` + + :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.add_certificate_lock(certificate_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] + certificate_id = operation_result.data.id + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_certificate(certificate_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 add_sdk_lock_and_wait_for_state(self, sdk_id, add_resource_lock_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.apigateway.ApiGatewayClient.add_sdk_lock` and waits for the :py:class:`~oci.apigateway.models.Sdk` acted upon + to enter the given state(s). + + :param str sdk_id: (required) + The ocid of the SDK. + + :param oci.apigateway.models.AddResourceLockDetails add_resource_lock_details: (required) + AddResourceLockDetails body parameter + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.apigateway.models.Sdk.lifecycle_state` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.apigateway.ApiGatewayClient.add_sdk_lock` + + :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.add_sdk_lock(sdk_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] + sdk_id = operation_result.data.id + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_sdk(sdk_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 change_api_compartment_and_wait_for_state(self, api_id, change_api_compartment_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ Calls :py:func:`~oci.apigateway.ApiGatewayClient.change_api_compartment` and waits for the :py:class:`~oci.apigateway.models.WorkRequest` @@ -325,6 +460,141 @@ def delete_sdk_and_wait_for_state(self, sdk_id, wait_for_states=[], operation_kw except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def remove_api_lock_and_wait_for_state(self, api_id, remove_resource_lock_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.apigateway.ApiGatewayClient.remove_api_lock` and waits for the :py:class:`~oci.apigateway.models.Api` acted upon + to enter the given state(s). + + :param str api_id: (required) + The ocid of the API. + + :param oci.apigateway.models.RemoveResourceLockDetails remove_resource_lock_details: (required) + RemoveResourceLockDetails body parameter + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.apigateway.models.Api.lifecycle_state` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.apigateway.ApiGatewayClient.remove_api_lock` + + :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.remove_api_lock(api_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] + api_id = operation_result.data.id + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_api(api_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 remove_certificate_lock_and_wait_for_state(self, certificate_id, remove_resource_lock_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.apigateway.ApiGatewayClient.remove_certificate_lock` and waits for the :py:class:`~oci.apigateway.models.Certificate` acted upon + to enter the given state(s). + + :param str certificate_id: (required) + The ocid of the certificate. + + :param oci.apigateway.models.RemoveResourceLockDetails remove_resource_lock_details: (required) + RemoveResourceLockDetails body parameter + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.apigateway.models.Certificate.lifecycle_state` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.apigateway.ApiGatewayClient.remove_certificate_lock` + + :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.remove_certificate_lock(certificate_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] + certificate_id = operation_result.data.id + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_certificate(certificate_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 remove_sdk_lock_and_wait_for_state(self, sdk_id, remove_resource_lock_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.apigateway.ApiGatewayClient.remove_sdk_lock` and waits for the :py:class:`~oci.apigateway.models.Sdk` acted upon + to enter the given state(s). + + :param str sdk_id: (required) + The ocid of the SDK. + + :param oci.apigateway.models.RemoveResourceLockDetails remove_resource_lock_details: (required) + RemoveResourceLockDetails body parameter + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.apigateway.models.Sdk.lifecycle_state` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.apigateway.ApiGatewayClient.remove_sdk_lock` + + :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.remove_sdk_lock(sdk_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] + sdk_id = operation_result.data.id + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_sdk(sdk_id), # noqa: F821 + evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except (NameError, TypeError) as e: + if not e.args: + e.args = ('',) + e.args = e.args + ('This composite operation is currently not supported in the SDK. Please use the operation from the service client and use waiters as an alternative. For more information on waiters, visit: "https://docs.oracle.com/en-us/iaas/tools/python/latest/api/waiters.html"', ) + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def update_api_and_wait_for_state(self, api_id, update_api_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ Calls :py:func:`~oci.apigateway.ApiGatewayClient.update_api` and waits for the :py:class:`~oci.apigateway.models.WorkRequest` diff --git a/src/oci/apigateway/deployment_client.py b/src/oci/apigateway/deployment_client.py index 251b417d29..b3cba318f7 100644 --- a/src/oci/apigateway/deployment_client.py +++ b/src/oci/apigateway/deployment_client.py @@ -118,6 +118,115 @@ def __init__(self, config, **kwargs): self.retry_strategy = kwargs.get('retry_strategy') self.circuit_breaker_callback = kwargs.get('circuit_breaker_callback') + def add_deployment_lock(self, deployment_id, add_resource_lock_details, **kwargs): + """ + Adds a lock to a Deployment resource. + + + :param str deployment_id: (required) + The ocid of the deployment. + + :param oci.apigateway.models.AddResourceLockDetails add_resource_lock_details: (required) + AddResourceLockDetails body parameter + + :param str opc_request_id: (optional) + Unique identifier for the request. + If you need to contact Oracle about a particular request, please provide the request ID. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + parameter to the value of the etag from a previous GET or POST response for that resource. The resource + will be updated or deleted only if the etag you provide matches the resource's current etag value. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.apigateway.models.Deployment` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use add_deployment_lock API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['deploymentId'] + resource_path = "/deployments/{deploymentId}/actions/addLock" + method = "POST" + operation_name = "add_deployment_lock" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/api-gateway/20190501/Deployment/AddDeploymentLock" + + # 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"add_deployment_lock got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "deploymentId": deployment_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: + 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=add_resource_lock_details, + response_type="Deployment", + 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=add_resource_lock_details, + response_type="Deployment", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + def change_deployment_compartment(self, deployment_id, change_deployment_compartment_details, **kwargs): """ Changes the deployment compartment. @@ -146,6 +255,9 @@ def change_deployment_compartment(self, deployment_id, change_deployment_compart :param str opc_request_id: (optional) The client request id for tracing. + :param bool is_lock_override: (optional) + Whether to override locks (if any exist). + :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. @@ -177,7 +289,8 @@ def change_deployment_compartment(self, deployment_id, change_deployment_compart "retry_strategy", "opc_retry_token", "if_match", - "opc_request_id" + "opc_request_id", + "is_lock_override" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: @@ -194,6 +307,11 @@ def change_deployment_compartment(self, deployment_id, change_deployment_compart 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') + query_params = { + "isLockOverride": kwargs.get("is_lock_override", 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", @@ -218,6 +336,7 @@ def change_deployment_compartment(self, deployment_id, change_deployment_compart resource_path=resource_path, method=method, path_params=path_params, + query_params=query_params, header_params=header_params, body=change_deployment_compartment_details, allow_control_chars=kwargs.get('allow_control_chars'), @@ -229,6 +348,7 @@ def change_deployment_compartment(self, deployment_id, change_deployment_compart resource_path=resource_path, method=method, path_params=path_params, + query_params=query_params, header_params=header_params, body=change_deployment_compartment_details, allow_control_chars=kwargs.get('allow_control_chars'), @@ -352,6 +472,9 @@ def delete_deployment(self, deployment_id, **kwargs): :param str opc_request_id: (optional) The client request id for tracing. + :param bool is_lock_override: (optional) + Whether to override locks (if any exist). + :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. @@ -382,7 +505,8 @@ def delete_deployment(self, deployment_id, **kwargs): "allow_control_chars", "retry_strategy", "if_match", - "opc_request_id" + "opc_request_id", + "is_lock_override" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: @@ -399,6 +523,11 @@ def delete_deployment(self, deployment_id, **kwargs): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + query_params = { + "isLockOverride": kwargs.get("is_lock_override", 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", @@ -421,6 +550,7 @@ def delete_deployment(self, deployment_id, **kwargs): resource_path=resource_path, method=method, path_params=path_params, + query_params=query_params, header_params=header_params, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, @@ -431,6 +561,7 @@ def delete_deployment(self, deployment_id, **kwargs): resource_path=resource_path, method=method, path_params=path_params, + query_params=query_params, header_params=header_params, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, @@ -697,6 +828,115 @@ def list_deployments(self, compartment_id, **kwargs): api_reference_link=api_reference_link, required_arguments=required_arguments) + def remove_deployment_lock(self, deployment_id, remove_resource_lock_details, **kwargs): + """ + Removes a lock from a Deployment resource. + + + :param str deployment_id: (required) + The ocid of the deployment. + + :param oci.apigateway.models.RemoveResourceLockDetails remove_resource_lock_details: (required) + RemoveResourceLockDetails body parameter + + :param str opc_request_id: (optional) + Unique identifier for the request. + If you need to contact Oracle about a particular request, please provide the request ID. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + parameter to the value of the etag from a previous GET or POST response for that resource. The resource + will be updated or deleted only if the etag you provide matches the resource's current etag value. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.apigateway.models.Deployment` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use remove_deployment_lock API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['deploymentId'] + resource_path = "/deployments/{deploymentId}/actions/removeLock" + method = "POST" + operation_name = "remove_deployment_lock" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/api-gateway/20190501/Deployment/RemoveDeploymentLock" + + # 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"remove_deployment_lock got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "deploymentId": deployment_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: + 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=remove_resource_lock_details, + response_type="Deployment", + 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=remove_resource_lock_details, + response_type="Deployment", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + def update_deployment(self, deployment_id, update_deployment_details, **kwargs): """ Updates the deployment with the given identifier. @@ -718,6 +958,9 @@ def update_deployment(self, deployment_id, update_deployment_details, **kwargs): :param str opc_request_id: (optional) The client request id for tracing. + :param bool is_lock_override: (optional) + Whether to override locks (if any exist). + :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. @@ -748,7 +991,8 @@ def update_deployment(self, deployment_id, update_deployment_details, **kwargs): "allow_control_chars", "retry_strategy", "if_match", - "opc_request_id" + "opc_request_id", + "is_lock_override" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: @@ -765,6 +1009,11 @@ def update_deployment(self, deployment_id, update_deployment_details, **kwargs): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + query_params = { + "isLockOverride": kwargs.get("is_lock_override", 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", @@ -787,6 +1036,7 @@ def update_deployment(self, deployment_id, update_deployment_details, **kwargs): resource_path=resource_path, method=method, path_params=path_params, + query_params=query_params, header_params=header_params, body=update_deployment_details, allow_control_chars=kwargs.get('allow_control_chars'), @@ -798,6 +1048,7 @@ def update_deployment(self, deployment_id, update_deployment_details, **kwargs): resource_path=resource_path, method=method, path_params=path_params, + query_params=query_params, header_params=header_params, body=update_deployment_details, allow_control_chars=kwargs.get('allow_control_chars'), diff --git a/src/oci/apigateway/deployment_client_composite_operations.py b/src/oci/apigateway/deployment_client_composite_operations.py index 53b0e0fc8b..96add34661 100644 --- a/src/oci/apigateway/deployment_client_composite_operations.py +++ b/src/oci/apigateway/deployment_client_composite_operations.py @@ -25,6 +25,51 @@ def __init__(self, client, **kwargs): """ self.client = client + def add_deployment_lock_and_wait_for_state(self, deployment_id, add_resource_lock_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.apigateway.DeploymentClient.add_deployment_lock` and waits for the :py:class:`~oci.apigateway.models.Deployment` acted upon + to enter the given state(s). + + :param str deployment_id: (required) + The ocid of the deployment. + + :param oci.apigateway.models.AddResourceLockDetails add_resource_lock_details: (required) + AddResourceLockDetails body parameter + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.apigateway.models.Deployment.lifecycle_state` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.apigateway.DeploymentClient.add_deployment_lock` + + :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.add_deployment_lock(deployment_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] + deployment_id = operation_result.data.id + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_deployment(deployment_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 change_deployment_compartment_and_wait_for_state(self, deployment_id, change_deployment_compartment_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ Calls :py:func:`~oci.apigateway.DeploymentClient.change_deployment_compartment` and waits for the :py:class:`~oci.apigateway.models.WorkRequest` @@ -153,6 +198,51 @@ def delete_deployment_and_wait_for_state(self, deployment_id, wait_for_states=[] except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def remove_deployment_lock_and_wait_for_state(self, deployment_id, remove_resource_lock_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.apigateway.DeploymentClient.remove_deployment_lock` and waits for the :py:class:`~oci.apigateway.models.Deployment` acted upon + to enter the given state(s). + + :param str deployment_id: (required) + The ocid of the deployment. + + :param oci.apigateway.models.RemoveResourceLockDetails remove_resource_lock_details: (required) + RemoveResourceLockDetails body parameter + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.apigateway.models.Deployment.lifecycle_state` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.apigateway.DeploymentClient.remove_deployment_lock` + + :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.remove_deployment_lock(deployment_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] + deployment_id = operation_result.data.id + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_deployment(deployment_id), # noqa: F821 + evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except (NameError, TypeError) as e: + if not e.args: + e.args = ('',) + e.args = e.args + ('This composite operation is currently not supported in the SDK. Please use the operation from the service client and use waiters as an alternative. For more information on waiters, visit: "https://docs.oracle.com/en-us/iaas/tools/python/latest/api/waiters.html"', ) + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def update_deployment_and_wait_for_state(self, deployment_id, update_deployment_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ Calls :py:func:`~oci.apigateway.DeploymentClient.update_deployment` and waits for the :py:class:`~oci.apigateway.models.WorkRequest` diff --git a/src/oci/apigateway/gateway_client.py b/src/oci/apigateway/gateway_client.py index ac1e23d06c..aa21ff5ea1 100644 --- a/src/oci/apigateway/gateway_client.py +++ b/src/oci/apigateway/gateway_client.py @@ -118,6 +118,115 @@ def __init__(self, config, **kwargs): self.retry_strategy = kwargs.get('retry_strategy') self.circuit_breaker_callback = kwargs.get('circuit_breaker_callback') + def add_gateway_lock(self, gateway_id, add_resource_lock_details, **kwargs): + """ + Adds a lock to a Gateway resource. + + + :param str gateway_id: (required) + The ocid of the gateway. + + :param oci.apigateway.models.AddResourceLockDetails add_resource_lock_details: (required) + AddResourceLockDetails body parameter + + :param str opc_request_id: (optional) + Unique identifier for the request. + If you need to contact Oracle about a particular request, please provide the request ID. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + parameter to the value of the etag from a previous GET or POST response for that resource. The resource + will be updated or deleted only if the etag you provide matches the resource's current etag value. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.apigateway.models.Gateway` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use add_gateway_lock API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['gatewayId'] + resource_path = "/gateways/{gatewayId}/actions/addLock" + method = "POST" + operation_name = "add_gateway_lock" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/api-gateway/20190501/Gateway/AddGatewayLock" + + # 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"add_gateway_lock got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "gatewayId": gateway_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: + 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=add_resource_lock_details, + response_type="Gateway", + 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=add_resource_lock_details, + response_type="Gateway", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + def change_gateway_compartment(self, gateway_id, change_gateway_compartment_details, **kwargs): """ Changes the gateway compartment. @@ -146,6 +255,9 @@ def change_gateway_compartment(self, gateway_id, change_gateway_compartment_deta :param str opc_request_id: (optional) The client request id for tracing. + :param bool is_lock_override: (optional) + Whether to override locks (if any exist). + :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. @@ -177,7 +289,8 @@ def change_gateway_compartment(self, gateway_id, change_gateway_compartment_deta "retry_strategy", "opc_retry_token", "if_match", - "opc_request_id" + "opc_request_id", + "is_lock_override" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: @@ -194,6 +307,11 @@ def change_gateway_compartment(self, gateway_id, change_gateway_compartment_deta 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') + query_params = { + "isLockOverride": kwargs.get("is_lock_override", 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", @@ -218,6 +336,7 @@ def change_gateway_compartment(self, gateway_id, change_gateway_compartment_deta resource_path=resource_path, method=method, path_params=path_params, + query_params=query_params, header_params=header_params, body=change_gateway_compartment_details, allow_control_chars=kwargs.get('allow_control_chars'), @@ -229,6 +348,7 @@ def change_gateway_compartment(self, gateway_id, change_gateway_compartment_deta resource_path=resource_path, method=method, path_params=path_params, + query_params=query_params, header_params=header_params, body=change_gateway_compartment_details, allow_control_chars=kwargs.get('allow_control_chars'), @@ -352,6 +472,9 @@ def delete_gateway(self, gateway_id, **kwargs): :param str opc_request_id: (optional) The client request id for tracing. + :param bool is_lock_override: (optional) + Whether to override locks (if any exist). + :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. @@ -382,7 +505,8 @@ def delete_gateway(self, gateway_id, **kwargs): "allow_control_chars", "retry_strategy", "if_match", - "opc_request_id" + "opc_request_id", + "is_lock_override" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: @@ -399,6 +523,11 @@ def delete_gateway(self, gateway_id, **kwargs): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + query_params = { + "isLockOverride": kwargs.get("is_lock_override", 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", @@ -421,6 +550,7 @@ def delete_gateway(self, gateway_id, **kwargs): resource_path=resource_path, method=method, path_params=path_params, + query_params=query_params, header_params=header_params, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, @@ -431,6 +561,7 @@ def delete_gateway(self, gateway_id, **kwargs): resource_path=resource_path, method=method, path_params=path_params, + query_params=query_params, header_params=header_params, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, @@ -697,6 +828,115 @@ def list_gateways(self, compartment_id, **kwargs): api_reference_link=api_reference_link, required_arguments=required_arguments) + def remove_gateway_lock(self, gateway_id, remove_resource_lock_details, **kwargs): + """ + Removes a lock from a Gateway resource. + + + :param str gateway_id: (required) + The ocid of the gateway. + + :param oci.apigateway.models.RemoveResourceLockDetails remove_resource_lock_details: (required) + RemoveResourceLockDetails body parameter + + :param str opc_request_id: (optional) + Unique identifier for the request. + If you need to contact Oracle about a particular request, please provide the request ID. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + parameter to the value of the etag from a previous GET or POST response for that resource. The resource + will be updated or deleted only if the etag you provide matches the resource's current etag value. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.apigateway.models.Gateway` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use remove_gateway_lock API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['gatewayId'] + resource_path = "/gateways/{gatewayId}/actions/removeLock" + method = "POST" + operation_name = "remove_gateway_lock" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/api-gateway/20190501/Gateway/RemoveGatewayLock" + + # 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"remove_gateway_lock got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "gatewayId": gateway_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: + 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=remove_resource_lock_details, + response_type="Gateway", + 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=remove_resource_lock_details, + response_type="Gateway", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + def update_gateway(self, gateway_id, update_gateway_details, **kwargs): """ Updates the gateway with the given identifier. @@ -718,6 +958,9 @@ def update_gateway(self, gateway_id, update_gateway_details, **kwargs): :param str opc_request_id: (optional) The client request id for tracing. + :param bool is_lock_override: (optional) + Whether to override locks (if any exist). + :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. @@ -748,7 +991,8 @@ def update_gateway(self, gateway_id, update_gateway_details, **kwargs): "allow_control_chars", "retry_strategy", "if_match", - "opc_request_id" + "opc_request_id", + "is_lock_override" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: @@ -765,6 +1009,11 @@ def update_gateway(self, gateway_id, update_gateway_details, **kwargs): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + query_params = { + "isLockOverride": kwargs.get("is_lock_override", 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", @@ -787,6 +1036,7 @@ def update_gateway(self, gateway_id, update_gateway_details, **kwargs): resource_path=resource_path, method=method, path_params=path_params, + query_params=query_params, header_params=header_params, body=update_gateway_details, allow_control_chars=kwargs.get('allow_control_chars'), @@ -798,6 +1048,7 @@ def update_gateway(self, gateway_id, update_gateway_details, **kwargs): resource_path=resource_path, method=method, path_params=path_params, + query_params=query_params, header_params=header_params, body=update_gateway_details, allow_control_chars=kwargs.get('allow_control_chars'), diff --git a/src/oci/apigateway/gateway_client_composite_operations.py b/src/oci/apigateway/gateway_client_composite_operations.py index 34cab5ae2a..c85007ce96 100644 --- a/src/oci/apigateway/gateway_client_composite_operations.py +++ b/src/oci/apigateway/gateway_client_composite_operations.py @@ -25,6 +25,51 @@ def __init__(self, client, **kwargs): """ self.client = client + def add_gateway_lock_and_wait_for_state(self, gateway_id, add_resource_lock_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.apigateway.GatewayClient.add_gateway_lock` and waits for the :py:class:`~oci.apigateway.models.Gateway` acted upon + to enter the given state(s). + + :param str gateway_id: (required) + The ocid of the gateway. + + :param oci.apigateway.models.AddResourceLockDetails add_resource_lock_details: (required) + AddResourceLockDetails body parameter + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.apigateway.models.Gateway.lifecycle_state` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.apigateway.GatewayClient.add_gateway_lock` + + :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.add_gateway_lock(gateway_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] + gateway_id = operation_result.data.id + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_gateway(gateway_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 change_gateway_compartment_and_wait_for_state(self, gateway_id, change_gateway_compartment_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ Calls :py:func:`~oci.apigateway.GatewayClient.change_gateway_compartment` and waits for the :py:class:`~oci.apigateway.models.WorkRequest` @@ -153,6 +198,51 @@ def delete_gateway_and_wait_for_state(self, gateway_id, wait_for_states=[], oper except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def remove_gateway_lock_and_wait_for_state(self, gateway_id, remove_resource_lock_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.apigateway.GatewayClient.remove_gateway_lock` and waits for the :py:class:`~oci.apigateway.models.Gateway` acted upon + to enter the given state(s). + + :param str gateway_id: (required) + The ocid of the gateway. + + :param oci.apigateway.models.RemoveResourceLockDetails remove_resource_lock_details: (required) + RemoveResourceLockDetails body parameter + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.apigateway.models.Gateway.lifecycle_state` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.apigateway.GatewayClient.remove_gateway_lock` + + :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.remove_gateway_lock(gateway_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] + gateway_id = operation_result.data.id + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_gateway(gateway_id), # noqa: F821 + evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except (NameError, TypeError) as e: + if not e.args: + e.args = ('',) + e.args = e.args + ('This composite operation is currently not supported in the SDK. Please use the operation from the service client and use waiters as an alternative. For more information on waiters, visit: "https://docs.oracle.com/en-us/iaas/tools/python/latest/api/waiters.html"', ) + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def update_gateway_and_wait_for_state(self, gateway_id, update_gateway_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ Calls :py:func:`~oci.apigateway.GatewayClient.update_gateway` and waits for the :py:class:`~oci.apigateway.models.WorkRequest` diff --git a/src/oci/apigateway/models/__init__.py b/src/oci/apigateway/models/__init__.py index fa8c2c8f38..aa05f7173a 100644 --- a/src/oci/apigateway/models/__init__.py +++ b/src/oci/apigateway/models/__init__.py @@ -7,6 +7,7 @@ from __future__ import absolute_import from .access_log_policy import AccessLogPolicy +from .add_resource_lock_details import AddResourceLockDetails from .additional_validation_policy import AdditionalValidationPolicy from .anonymous_route_authorization_policy import AnonymousRouteAuthorizationPolicy from .any_of_route_authorization_policy import AnyOfRouteAuthorizationPolicy @@ -101,11 +102,13 @@ from .rate_limit import RateLimit from .rate_limiting_policy import RateLimitingPolicy from .remote_json_web_key_set import RemoteJsonWebKeySet +from .remove_resource_lock_details import RemoveResourceLockDetails from .rename_header_policy import RenameHeaderPolicy from .rename_header_policy_item import RenameHeaderPolicyItem from .rename_query_parameter_policy import RenameQueryParameterPolicy from .rename_query_parameter_policy_item import RenameQueryParameterPolicyItem from .request_parameter_validation import RequestParameterValidation +from .resource_lock import ResourceLock from .response_cache_details import ResponseCacheDetails from .response_cache_lookup_policy import ResponseCacheLookupPolicy from .response_cache_resp_server import ResponseCacheRespServer @@ -166,6 +169,7 @@ # Maps type names to classes for apigateway services. apigateway_type_mapping = { "AccessLogPolicy": AccessLogPolicy, + "AddResourceLockDetails": AddResourceLockDetails, "AdditionalValidationPolicy": AdditionalValidationPolicy, "AnonymousRouteAuthorizationPolicy": AnonymousRouteAuthorizationPolicy, "AnyOfRouteAuthorizationPolicy": AnyOfRouteAuthorizationPolicy, @@ -260,11 +264,13 @@ "RateLimit": RateLimit, "RateLimitingPolicy": RateLimitingPolicy, "RemoteJsonWebKeySet": RemoteJsonWebKeySet, + "RemoveResourceLockDetails": RemoveResourceLockDetails, "RenameHeaderPolicy": RenameHeaderPolicy, "RenameHeaderPolicyItem": RenameHeaderPolicyItem, "RenameQueryParameterPolicy": RenameQueryParameterPolicy, "RenameQueryParameterPolicyItem": RenameQueryParameterPolicyItem, "RequestParameterValidation": RequestParameterValidation, + "ResourceLock": ResourceLock, "ResponseCacheDetails": ResponseCacheDetails, "ResponseCacheLookupPolicy": ResponseCacheLookupPolicy, "ResponseCacheRespServer": ResponseCacheRespServer, diff --git a/src/oci/apigateway/models/add_resource_lock_details.py b/src/oci/apigateway/models/add_resource_lock_details.py new file mode 100644 index 0000000000..59ed8da640 --- /dev/null +++ b/src/oci/apigateway/models/add_resource_lock_details.py @@ -0,0 +1,122 @@ +# coding: utf-8 +# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20190501 + + +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 AddResourceLockDetails(object): + """ + Used to add a resource lock. + Resource locks are used to prevent certain APIs from being called for the resource. + A full lock prevents both updating the resource and deleting the resource. A delete + lock prevents deleting the resource. + """ + + #: A constant which can be used with the type property of a AddResourceLockDetails. + #: This constant has a value of "FULL" + TYPE_FULL = "FULL" + + #: A constant which can be used with the type property of a AddResourceLockDetails. + #: This constant has a value of "DELETE" + TYPE_DELETE = "DELETE" + + def __init__(self, **kwargs): + """ + Initializes a new AddResourceLockDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param type: + The value to assign to the type property of this AddResourceLockDetails. + Allowed values for this property are: "FULL", "DELETE" + :type type: str + + :param message: + The value to assign to the message property of this AddResourceLockDetails. + :type message: str + + """ + self.swagger_types = { + 'type': 'str', + 'message': 'str' + } + self.attribute_map = { + 'type': 'type', + 'message': 'message' + } + self._type = None + self._message = None + + @property + def type(self): + """ + **[Required]** Gets the type of this AddResourceLockDetails. + Type of the lock. + + Allowed values for this property are: "FULL", "DELETE" + + + :return: The type of this AddResourceLockDetails. + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """ + Sets the type of this AddResourceLockDetails. + Type of the lock. + + + :param type: The type of this AddResourceLockDetails. + :type: str + """ + allowed_values = ["FULL", "DELETE"] + if not value_allowed_none_or_none_sentinel(type, allowed_values): + raise ValueError( + f"Invalid value for `type`, must be None or one of {allowed_values}" + ) + self._type = type + + @property + def message(self): + """ + Gets the message of this AddResourceLockDetails. + A message added by the creator of the lock. This is typically used to give an + indication of why the resource is locked. + + + :return: The message of this AddResourceLockDetails. + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """ + Sets the message of this AddResourceLockDetails. + A message added by the creator of the lock. This is typically used to give an + indication of why the resource is locked. + + + :param message: The message of this AddResourceLockDetails. + :type: str + """ + self._message = message + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/apigateway/models/api.py b/src/oci/apigateway/models/api.py index ac3f1f1ee0..5905228c2a 100644 --- a/src/oci/apigateway/models/api.py +++ b/src/oci/apigateway/models/api.py @@ -66,6 +66,10 @@ def __init__(self, **kwargs): The value to assign to the time_updated property of this Api. :type time_updated: datetime + :param locks: + The value to assign to the locks property of this Api. + :type locks: list[oci.apigateway.models.ResourceLock] + :param lifecycle_state: The value to assign to the lifecycle_state property of this Api. Allowed values for this property are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'. @@ -92,6 +96,10 @@ def __init__(self, **kwargs): The value to assign to the defined_tags property of this Api. :type defined_tags: dict(str, dict(str, object)) + :param system_tags: + The value to assign to the system_tags property of this Api. + :type system_tags: dict(str, dict(str, object)) + """ self.swagger_types = { 'id': 'str', @@ -99,12 +107,14 @@ def __init__(self, **kwargs): 'compartment_id': 'str', 'time_created': 'datetime', 'time_updated': 'datetime', + 'locks': 'list[ResourceLock]', 'lifecycle_state': 'str', 'lifecycle_details': 'str', 'specification_type': 'str', 'validation_results': 'list[ApiValidationResult]', 'freeform_tags': 'dict(str, str)', - 'defined_tags': 'dict(str, dict(str, object))' + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))' } self.attribute_map = { 'id': 'id', @@ -112,24 +122,28 @@ def __init__(self, **kwargs): 'compartment_id': 'compartmentId', 'time_created': 'timeCreated', 'time_updated': 'timeUpdated', + 'locks': 'locks', 'lifecycle_state': 'lifecycleState', 'lifecycle_details': 'lifecycleDetails', 'specification_type': 'specificationType', 'validation_results': 'validationResults', 'freeform_tags': 'freeformTags', - 'defined_tags': 'definedTags' + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags' } self._id = None self._display_name = None self._compartment_id = None self._time_created = None self._time_updated = None + self._locks = None self._lifecycle_state = None self._lifecycle_details = None self._specification_type = None self._validation_results = None self._freeform_tags = None self._defined_tags = None + self._system_tags = None @property def id(self): @@ -267,6 +281,30 @@ def time_updated(self, time_updated): """ self._time_updated = time_updated + @property + def locks(self): + """ + Gets the locks of this Api. + Locks associated with this resource. + + + :return: The locks of this Api. + :rtype: list[oci.apigateway.models.ResourceLock] + """ + return self._locks + + @locks.setter + def locks(self, locks): + """ + Sets the locks of this Api. + Locks associated with this resource. + + + :param locks: The locks of this Api. + :type: list[oci.apigateway.models.ResourceLock] + """ + self._locks = locks + @property def lifecycle_state(self): """ @@ -461,6 +499,32 @@ def defined_tags(self, defined_tags): """ self._defined_tags = defined_tags + @property + def system_tags(self): + """ + Gets the system_tags of this Api. + 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 Api. + :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 Api. + 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 Api. + :type: dict(str, dict(str, object)) + """ + self._system_tags = system_tags + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/apigateway/models/api_summary.py b/src/oci/apigateway/models/api_summary.py index 7552a6e4eb..e3e20ca396 100644 --- a/src/oci/apigateway/models/api_summary.py +++ b/src/oci/apigateway/models/api_summary.py @@ -64,6 +64,10 @@ def __init__(self, **kwargs): The value to assign to the time_updated property of this ApiSummary. :type time_updated: datetime + :param locks: + The value to assign to the locks property of this ApiSummary. + :type locks: list[oci.apigateway.models.ResourceLock] + :param lifecycle_state: The value to assign to the lifecycle_state property of this ApiSummary. Allowed values for this property are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'. @@ -90,6 +94,10 @@ def __init__(self, **kwargs): The value to assign to the defined_tags property of this ApiSummary. :type defined_tags: dict(str, dict(str, object)) + :param system_tags: + The value to assign to the system_tags property of this ApiSummary. + :type system_tags: dict(str, dict(str, object)) + """ self.swagger_types = { 'id': 'str', @@ -97,12 +105,14 @@ def __init__(self, **kwargs): 'compartment_id': 'str', 'time_created': 'datetime', 'time_updated': 'datetime', + 'locks': 'list[ResourceLock]', 'lifecycle_state': 'str', 'lifecycle_details': 'str', 'specification_type': 'str', 'validation_results': 'list[ApiValidationResult]', 'freeform_tags': 'dict(str, str)', - 'defined_tags': 'dict(str, dict(str, object))' + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))' } self.attribute_map = { 'id': 'id', @@ -110,24 +120,28 @@ def __init__(self, **kwargs): 'compartment_id': 'compartmentId', 'time_created': 'timeCreated', 'time_updated': 'timeUpdated', + 'locks': 'locks', 'lifecycle_state': 'lifecycleState', 'lifecycle_details': 'lifecycleDetails', 'specification_type': 'specificationType', 'validation_results': 'validationResults', 'freeform_tags': 'freeformTags', - 'defined_tags': 'definedTags' + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags' } self._id = None self._display_name = None self._compartment_id = None self._time_created = None self._time_updated = None + self._locks = None self._lifecycle_state = None self._lifecycle_details = None self._specification_type = None self._validation_results = None self._freeform_tags = None self._defined_tags = None + self._system_tags = None @property def id(self): @@ -265,6 +279,30 @@ def time_updated(self, time_updated): """ self._time_updated = time_updated + @property + def locks(self): + """ + Gets the locks of this ApiSummary. + Locks associated with this resource. + + + :return: The locks of this ApiSummary. + :rtype: list[oci.apigateway.models.ResourceLock] + """ + return self._locks + + @locks.setter + def locks(self, locks): + """ + Sets the locks of this ApiSummary. + Locks associated with this resource. + + + :param locks: The locks of this ApiSummary. + :type: list[oci.apigateway.models.ResourceLock] + """ + self._locks = locks + @property def lifecycle_state(self): """ @@ -459,6 +497,32 @@ def defined_tags(self, defined_tags): """ self._defined_tags = defined_tags + @property + def system_tags(self): + """ + Gets the system_tags of this ApiSummary. + 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 ApiSummary. + :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 ApiSummary. + 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 ApiSummary. + :type: dict(str, dict(str, object)) + """ + self._system_tags = system_tags + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/apigateway/models/certificate.py b/src/oci/apigateway/models/certificate.py index c26edff815..ab779fa258 100644 --- a/src/oci/apigateway/models/certificate.py +++ b/src/oci/apigateway/models/certificate.py @@ -85,6 +85,10 @@ def __init__(self, **kwargs): The value to assign to the time_updated property of this Certificate. :type time_updated: datetime + :param locks: + The value to assign to the locks property of this Certificate. + :type locks: list[oci.apigateway.models.ResourceLock] + :param lifecycle_state: The value to assign to the lifecycle_state property of this Certificate. Allowed values for this property are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'. @@ -103,6 +107,10 @@ def __init__(self, **kwargs): The value to assign to the defined_tags property of this Certificate. :type defined_tags: dict(str, dict(str, object)) + :param system_tags: + The value to assign to the system_tags property of this Certificate. + :type system_tags: dict(str, dict(str, object)) + """ self.swagger_types = { 'id': 'str', @@ -114,10 +122,12 @@ def __init__(self, **kwargs): 'intermediate_certificates': 'str', 'time_created': 'datetime', 'time_updated': 'datetime', + 'locks': 'list[ResourceLock]', 'lifecycle_state': 'str', 'lifecycle_details': 'str', 'freeform_tags': 'dict(str, str)', - 'defined_tags': 'dict(str, dict(str, object))' + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))' } self.attribute_map = { 'id': 'id', @@ -129,10 +139,12 @@ def __init__(self, **kwargs): 'intermediate_certificates': 'intermediateCertificates', 'time_created': 'timeCreated', 'time_updated': 'timeUpdated', + 'locks': 'locks', 'lifecycle_state': 'lifecycleState', 'lifecycle_details': 'lifecycleDetails', 'freeform_tags': 'freeformTags', - 'defined_tags': 'definedTags' + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags' } self._id = None self._display_name = None @@ -143,10 +155,12 @@ def __init__(self, **kwargs): self._intermediate_certificates = None self._time_created = None self._time_updated = None + self._locks = None self._lifecycle_state = None self._lifecycle_details = None self._freeform_tags = None self._defined_tags = None + self._system_tags = None @property def id(self): @@ -380,6 +394,30 @@ def time_updated(self, time_updated): """ self._time_updated = time_updated + @property + def locks(self): + """ + Gets the locks of this Certificate. + Locks associated with this resource. + + + :return: The locks of this Certificate. + :rtype: list[oci.apigateway.models.ResourceLock] + """ + return self._locks + + @locks.setter + def locks(self, locks): + """ + Sets the locks of this Certificate. + Locks associated with this resource. + + + :param locks: The locks of this Certificate. + :type: list[oci.apigateway.models.ResourceLock] + """ + self._locks = locks + @property def lifecycle_state(self): """ @@ -510,6 +548,32 @@ def defined_tags(self, defined_tags): """ self._defined_tags = defined_tags + @property + def system_tags(self): + """ + Gets the system_tags of this Certificate. + 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 Certificate. + :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 Certificate. + 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 Certificate. + :type: dict(str, dict(str, object)) + """ + self._system_tags = system_tags + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/apigateway/models/certificate_summary.py b/src/oci/apigateway/models/certificate_summary.py index d7434f4981..cdbedd1a46 100644 --- a/src/oci/apigateway/models/certificate_summary.py +++ b/src/oci/apigateway/models/certificate_summary.py @@ -48,6 +48,10 @@ def __init__(self, **kwargs): The value to assign to the time_updated property of this CertificateSummary. :type time_updated: datetime + :param locks: + The value to assign to the locks property of this CertificateSummary. + :type locks: list[oci.apigateway.models.ResourceLock] + :param lifecycle_state: The value to assign to the lifecycle_state property of this CertificateSummary. :type lifecycle_state: str @@ -64,6 +68,10 @@ def __init__(self, **kwargs): The value to assign to the defined_tags property of this CertificateSummary. :type defined_tags: dict(str, dict(str, object)) + :param system_tags: + The value to assign to the system_tags property of this CertificateSummary. + :type system_tags: dict(str, dict(str, object)) + """ self.swagger_types = { 'id': 'str', @@ -73,10 +81,12 @@ def __init__(self, **kwargs): 'time_not_valid_after': 'datetime', 'time_created': 'datetime', 'time_updated': 'datetime', + 'locks': 'list[ResourceLock]', 'lifecycle_state': 'str', 'lifecycle_details': 'str', 'freeform_tags': 'dict(str, str)', - 'defined_tags': 'dict(str, dict(str, object))' + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))' } self.attribute_map = { 'id': 'id', @@ -86,10 +96,12 @@ def __init__(self, **kwargs): 'time_not_valid_after': 'timeNotValidAfter', 'time_created': 'timeCreated', 'time_updated': 'timeUpdated', + 'locks': 'locks', 'lifecycle_state': 'lifecycleState', 'lifecycle_details': 'lifecycleDetails', 'freeform_tags': 'freeformTags', - 'defined_tags': 'definedTags' + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags' } self._id = None self._display_name = None @@ -98,10 +110,12 @@ def __init__(self, **kwargs): self._time_not_valid_after = None self._time_created = None self._time_updated = None + self._locks = None self._lifecycle_state = None self._lifecycle_details = None self._freeform_tags = None self._defined_tags = None + self._system_tags = None @property def id(self): @@ -287,6 +301,30 @@ def time_updated(self, time_updated): """ self._time_updated = time_updated + @property + def locks(self): + """ + Gets the locks of this CertificateSummary. + Locks associated with this resource. + + + :return: The locks of this CertificateSummary. + :rtype: list[oci.apigateway.models.ResourceLock] + """ + return self._locks + + @locks.setter + def locks(self, locks): + """ + Sets the locks of this CertificateSummary. + Locks associated with this resource. + + + :param locks: The locks of this CertificateSummary. + :type: list[oci.apigateway.models.ResourceLock] + """ + self._locks = locks + @property def lifecycle_state(self): """ @@ -411,6 +449,32 @@ def defined_tags(self, defined_tags): """ self._defined_tags = defined_tags + @property + def system_tags(self): + """ + Gets the system_tags of this CertificateSummary. + 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 CertificateSummary. + :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 CertificateSummary. + 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 CertificateSummary. + :type: dict(str, dict(str, object)) + """ + self._system_tags = system_tags + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/apigateway/models/create_api_details.py b/src/oci/apigateway/models/create_api_details.py index 566ac8ef06..c2a4a876f7 100644 --- a/src/oci/apigateway/models/create_api_details.py +++ b/src/oci/apigateway/models/create_api_details.py @@ -36,6 +36,10 @@ def __init__(self, **kwargs): The value to assign to the defined_tags property of this CreateApiDetails. :type defined_tags: dict(str, dict(str, object)) + :param locks: + The value to assign to the locks property of this CreateApiDetails. + :type locks: list[oci.apigateway.models.AddResourceLockDetails] + :param content: The value to assign to the content property of this CreateApiDetails. :type content: str @@ -46,6 +50,7 @@ def __init__(self, **kwargs): 'compartment_id': 'str', 'freeform_tags': 'dict(str, str)', 'defined_tags': 'dict(str, dict(str, object))', + 'locks': 'list[AddResourceLockDetails]', 'content': 'str' } self.attribute_map = { @@ -53,12 +58,14 @@ def __init__(self, **kwargs): 'compartment_id': 'compartmentId', 'freeform_tags': 'freeformTags', 'defined_tags': 'definedTags', + 'locks': 'locks', 'content': 'content' } self._display_name = None self._compartment_id = None self._freeform_tags = None self._defined_tags = None + self._locks = None self._content = None @property @@ -193,6 +200,30 @@ def defined_tags(self, defined_tags): """ self._defined_tags = defined_tags + @property + def locks(self): + """ + Gets the locks of this CreateApiDetails. + Locks associated with this resource. + + + :return: The locks of this CreateApiDetails. + :rtype: list[oci.apigateway.models.AddResourceLockDetails] + """ + return self._locks + + @locks.setter + def locks(self, locks): + """ + Sets the locks of this CreateApiDetails. + Locks associated with this resource. + + + :param locks: The locks of this CreateApiDetails. + :type: list[oci.apigateway.models.AddResourceLockDetails] + """ + self._locks = locks + @property def content(self): """ diff --git a/src/oci/apigateway/models/create_certificate_details.py b/src/oci/apigateway/models/create_certificate_details.py index fd0f3d2ec3..8757e82321 100644 --- a/src/oci/apigateway/models/create_certificate_details.py +++ b/src/oci/apigateway/models/create_certificate_details.py @@ -48,6 +48,10 @@ def __init__(self, **kwargs): The value to assign to the defined_tags property of this CreateCertificateDetails. :type defined_tags: dict(str, dict(str, object)) + :param locks: + The value to assign to the locks property of this CreateCertificateDetails. + :type locks: list[oci.apigateway.models.AddResourceLockDetails] + """ self.swagger_types = { 'display_name': 'str', @@ -56,7 +60,8 @@ def __init__(self, **kwargs): 'certificate': 'str', 'intermediate_certificates': 'str', 'freeform_tags': 'dict(str, str)', - 'defined_tags': 'dict(str, dict(str, object))' + 'defined_tags': 'dict(str, dict(str, object))', + 'locks': 'list[AddResourceLockDetails]' } self.attribute_map = { 'display_name': 'displayName', @@ -65,7 +70,8 @@ def __init__(self, **kwargs): 'certificate': 'certificate', 'intermediate_certificates': 'intermediateCertificates', 'freeform_tags': 'freeformTags', - 'defined_tags': 'definedTags' + 'defined_tags': 'definedTags', + 'locks': 'locks' } self._display_name = None self._compartment_id = None @@ -74,6 +80,7 @@ def __init__(self, **kwargs): self._intermediate_certificates = None self._freeform_tags = None self._defined_tags = None + self._locks = None @property def display_name(self): @@ -279,6 +286,30 @@ def defined_tags(self, defined_tags): """ self._defined_tags = defined_tags + @property + def locks(self): + """ + Gets the locks of this CreateCertificateDetails. + Locks associated with this resource. + + + :return: The locks of this CreateCertificateDetails. + :rtype: list[oci.apigateway.models.AddResourceLockDetails] + """ + return self._locks + + @locks.setter + def locks(self, locks): + """ + Sets the locks of this CreateCertificateDetails. + Locks associated with this resource. + + + :param locks: The locks of this CreateCertificateDetails. + :type: list[oci.apigateway.models.AddResourceLockDetails] + """ + self._locks = locks + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/apigateway/models/create_deployment_details.py b/src/oci/apigateway/models/create_deployment_details.py index 52a2d80c89..79be8a7cd8 100644 --- a/src/oci/apigateway/models/create_deployment_details.py +++ b/src/oci/apigateway/models/create_deployment_details.py @@ -40,6 +40,10 @@ def __init__(self, **kwargs): The value to assign to the specification property of this CreateDeploymentDetails. :type specification: oci.apigateway.models.ApiSpecification + :param locks: + The value to assign to the locks property of this CreateDeploymentDetails. + :type locks: list[oci.apigateway.models.AddResourceLockDetails] + :param freeform_tags: The value to assign to the freeform_tags property of this CreateDeploymentDetails. :type freeform_tags: dict(str, str) @@ -55,6 +59,7 @@ def __init__(self, **kwargs): 'compartment_id': 'str', 'path_prefix': 'str', 'specification': 'ApiSpecification', + 'locks': 'list[AddResourceLockDetails]', 'freeform_tags': 'dict(str, str)', 'defined_tags': 'dict(str, dict(str, object))' } @@ -64,6 +69,7 @@ def __init__(self, **kwargs): 'compartment_id': 'compartmentId', 'path_prefix': 'pathPrefix', 'specification': 'specification', + 'locks': 'locks', 'freeform_tags': 'freeformTags', 'defined_tags': 'definedTags' } @@ -72,6 +78,7 @@ def __init__(self, **kwargs): self._compartment_id = None self._path_prefix = None self._specification = None + self._locks = None self._freeform_tags = None self._defined_tags = None @@ -217,6 +224,30 @@ def specification(self, specification): """ self._specification = specification + @property + def locks(self): + """ + Gets the locks of this CreateDeploymentDetails. + Locks associated with this resource. + + + :return: The locks of this CreateDeploymentDetails. + :rtype: list[oci.apigateway.models.AddResourceLockDetails] + """ + return self._locks + + @locks.setter + def locks(self, locks): + """ + Sets the locks of this CreateDeploymentDetails. + Locks associated with this resource. + + + :param locks: The locks of this CreateDeploymentDetails. + :type: list[oci.apigateway.models.AddResourceLockDetails] + """ + self._locks = locks + @property def freeform_tags(self): """ diff --git a/src/oci/apigateway/models/create_gateway_details.py b/src/oci/apigateway/models/create_gateway_details.py index cb7fa1279a..d6b3b48f2a 100644 --- a/src/oci/apigateway/models/create_gateway_details.py +++ b/src/oci/apigateway/models/create_gateway_details.py @@ -48,6 +48,10 @@ def __init__(self, **kwargs): The value to assign to the response_cache_details property of this CreateGatewayDetails. :type response_cache_details: oci.apigateway.models.ResponseCacheDetails + :param locks: + The value to assign to the locks property of this CreateGatewayDetails. + :type locks: list[oci.apigateway.models.AddResourceLockDetails] + :param freeform_tags: The value to assign to the freeform_tags property of this CreateGatewayDetails. :type freeform_tags: dict(str, str) @@ -69,6 +73,7 @@ def __init__(self, **kwargs): 'network_security_group_ids': 'list[str]', 'certificate_id': 'str', 'response_cache_details': 'ResponseCacheDetails', + 'locks': 'list[AddResourceLockDetails]', 'freeform_tags': 'dict(str, str)', 'defined_tags': 'dict(str, dict(str, object))', 'ca_bundles': 'list[CaBundle]' @@ -81,6 +86,7 @@ def __init__(self, **kwargs): 'network_security_group_ids': 'networkSecurityGroupIds', 'certificate_id': 'certificateId', 'response_cache_details': 'responseCacheDetails', + 'locks': 'locks', 'freeform_tags': 'freeformTags', 'defined_tags': 'definedTags', 'ca_bundles': 'caBundles' @@ -92,6 +98,7 @@ def __init__(self, **kwargs): self._network_security_group_ids = None self._certificate_id = None self._response_cache_details = None + self._locks = None self._freeform_tags = None self._defined_tags = None self._ca_bundles = None @@ -244,7 +251,8 @@ def network_security_group_ids(self, network_security_group_ids): def certificate_id(self): """ Gets the certificate_id of this CreateGatewayDetails. - The `OCID`__ of the resource. + The `OCID`__ of the resource which can be + empty string. __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm @@ -258,7 +266,8 @@ def certificate_id(self): def certificate_id(self, certificate_id): """ Sets the certificate_id of this CreateGatewayDetails. - The `OCID`__ of the resource. + The `OCID`__ of the resource which can be + empty string. __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm @@ -288,6 +297,30 @@ def response_cache_details(self, response_cache_details): """ self._response_cache_details = response_cache_details + @property + def locks(self): + """ + Gets the locks of this CreateGatewayDetails. + Locks associated with this resource. + + + :return: The locks of this CreateGatewayDetails. + :rtype: list[oci.apigateway.models.AddResourceLockDetails] + """ + return self._locks + + @locks.setter + def locks(self, locks): + """ + Sets the locks of this CreateGatewayDetails. + Locks associated with this resource. + + + :param locks: The locks of this CreateGatewayDetails. + :type: list[oci.apigateway.models.AddResourceLockDetails] + """ + self._locks = locks + @property def freeform_tags(self): """ diff --git a/src/oci/apigateway/models/create_sdk_details.py b/src/oci/apigateway/models/create_sdk_details.py index 15265c7dc5..485697efcf 100644 --- a/src/oci/apigateway/models/create_sdk_details.py +++ b/src/oci/apigateway/models/create_sdk_details.py @@ -32,6 +32,10 @@ def __init__(self, **kwargs): The value to assign to the api_id property of this CreateSdkDetails. :type api_id: str + :param locks: + The value to assign to the locks property of this CreateSdkDetails. + :type locks: list[oci.apigateway.models.AddResourceLockDetails] + :param freeform_tags: The value to assign to the freeform_tags property of this CreateSdkDetails. :type freeform_tags: dict(str, str) @@ -49,6 +53,7 @@ def __init__(self, **kwargs): 'display_name': 'str', 'target_language': 'str', 'api_id': 'str', + 'locks': 'list[AddResourceLockDetails]', 'freeform_tags': 'dict(str, str)', 'defined_tags': 'dict(str, dict(str, object))', 'parameters': 'dict(str, str)' @@ -57,6 +62,7 @@ def __init__(self, **kwargs): 'display_name': 'displayName', 'target_language': 'targetLanguage', 'api_id': 'apiId', + 'locks': 'locks', 'freeform_tags': 'freeformTags', 'defined_tags': 'definedTags', 'parameters': 'parameters' @@ -64,6 +70,7 @@ def __init__(self, **kwargs): self._display_name = None self._target_language = None self._api_id = None + self._locks = None self._freeform_tags = None self._defined_tags = None self._parameters = None @@ -150,6 +157,30 @@ def api_id(self, api_id): """ self._api_id = api_id + @property + def locks(self): + """ + Gets the locks of this CreateSdkDetails. + Locks associated with this resource. + + + :return: The locks of this CreateSdkDetails. + :rtype: list[oci.apigateway.models.AddResourceLockDetails] + """ + return self._locks + + @locks.setter + def locks(self, locks): + """ + Sets the locks of this CreateSdkDetails. + Locks associated with this resource. + + + :param locks: The locks of this CreateSdkDetails. + :type: list[oci.apigateway.models.AddResourceLockDetails] + """ + self._locks = locks + @property def freeform_tags(self): """ diff --git a/src/oci/apigateway/models/create_subscriber_details.py b/src/oci/apigateway/models/create_subscriber_details.py index 2a56387954..6bc3df8bec 100644 --- a/src/oci/apigateway/models/create_subscriber_details.py +++ b/src/oci/apigateway/models/create_subscriber_details.py @@ -36,6 +36,10 @@ def __init__(self, **kwargs): The value to assign to the usage_plans property of this CreateSubscriberDetails. :type usage_plans: list[str] + :param locks: + The value to assign to the locks property of this CreateSubscriberDetails. + :type locks: list[oci.apigateway.models.AddResourceLockDetails] + :param freeform_tags: The value to assign to the freeform_tags property of this CreateSubscriberDetails. :type freeform_tags: dict(str, str) @@ -50,6 +54,7 @@ def __init__(self, **kwargs): 'compartment_id': 'str', 'clients': 'list[Client]', 'usage_plans': 'list[str]', + 'locks': 'list[AddResourceLockDetails]', 'freeform_tags': 'dict(str, str)', 'defined_tags': 'dict(str, dict(str, object))' } @@ -58,6 +63,7 @@ def __init__(self, **kwargs): 'compartment_id': 'compartmentId', 'clients': 'clients', 'usage_plans': 'usagePlans', + 'locks': 'locks', 'freeform_tags': 'freeformTags', 'defined_tags': 'definedTags' } @@ -65,6 +71,7 @@ def __init__(self, **kwargs): self._compartment_id = None self._clients = None self._usage_plans = None + self._locks = None self._freeform_tags = None self._defined_tags = None @@ -182,6 +189,30 @@ def usage_plans(self, usage_plans): """ self._usage_plans = usage_plans + @property + def locks(self): + """ + Gets the locks of this CreateSubscriberDetails. + Locks associated with this resource. + + + :return: The locks of this CreateSubscriberDetails. + :rtype: list[oci.apigateway.models.AddResourceLockDetails] + """ + return self._locks + + @locks.setter + def locks(self, locks): + """ + Sets the locks of this CreateSubscriberDetails. + Locks associated with this resource. + + + :param locks: The locks of this CreateSubscriberDetails. + :type: list[oci.apigateway.models.AddResourceLockDetails] + """ + self._locks = locks + @property def freeform_tags(self): """ diff --git a/src/oci/apigateway/models/create_usage_plan_details.py b/src/oci/apigateway/models/create_usage_plan_details.py index b8e27baa20..160ad0d443 100644 --- a/src/oci/apigateway/models/create_usage_plan_details.py +++ b/src/oci/apigateway/models/create_usage_plan_details.py @@ -32,6 +32,10 @@ def __init__(self, **kwargs): The value to assign to the compartment_id property of this CreateUsagePlanDetails. :type compartment_id: str + :param locks: + The value to assign to the locks property of this CreateUsagePlanDetails. + :type locks: list[oci.apigateway.models.AddResourceLockDetails] + :param freeform_tags: The value to assign to the freeform_tags property of this CreateUsagePlanDetails. :type freeform_tags: dict(str, str) @@ -45,6 +49,7 @@ def __init__(self, **kwargs): 'display_name': 'str', 'entitlements': 'list[Entitlement]', 'compartment_id': 'str', + 'locks': 'list[AddResourceLockDetails]', 'freeform_tags': 'dict(str, str)', 'defined_tags': 'dict(str, dict(str, object))' } @@ -52,12 +57,14 @@ def __init__(self, **kwargs): 'display_name': 'displayName', 'entitlements': 'entitlements', 'compartment_id': 'compartmentId', + 'locks': 'locks', 'freeform_tags': 'freeformTags', 'defined_tags': 'definedTags' } self._display_name = None self._entitlements = None self._compartment_id = None + self._locks = None self._freeform_tags = None self._defined_tags = None @@ -145,6 +152,30 @@ def compartment_id(self, compartment_id): """ self._compartment_id = compartment_id + @property + def locks(self): + """ + Gets the locks of this CreateUsagePlanDetails. + Locks associated with this resource. + + + :return: The locks of this CreateUsagePlanDetails. + :rtype: list[oci.apigateway.models.AddResourceLockDetails] + """ + return self._locks + + @locks.setter + def locks(self, locks): + """ + Sets the locks of this CreateUsagePlanDetails. + Locks associated with this resource. + + + :param locks: The locks of this CreateUsagePlanDetails. + :type: list[oci.apigateway.models.AddResourceLockDetails] + """ + self._locks = locks + @property def freeform_tags(self): """ diff --git a/src/oci/apigateway/models/deployment.py b/src/oci/apigateway/models/deployment.py index fffb93e788..0ae550ee69 100644 --- a/src/oci/apigateway/models/deployment.py +++ b/src/oci/apigateway/models/deployment.py @@ -94,6 +94,10 @@ def __init__(self, **kwargs): The value to assign to the lifecycle_details property of this Deployment. :type lifecycle_details: str + :param locks: + The value to assign to the locks property of this Deployment. + :type locks: list[oci.apigateway.models.ResourceLock] + :param freeform_tags: The value to assign to the freeform_tags property of this Deployment. :type freeform_tags: dict(str, str) @@ -102,6 +106,10 @@ def __init__(self, **kwargs): The value to assign to the defined_tags property of this Deployment. :type defined_tags: dict(str, dict(str, object)) + :param system_tags: + The value to assign to the system_tags property of this Deployment. + :type system_tags: dict(str, dict(str, object)) + """ self.swagger_types = { 'id': 'str', @@ -115,8 +123,10 @@ def __init__(self, **kwargs): 'time_updated': 'datetime', 'lifecycle_state': 'str', 'lifecycle_details': 'str', + 'locks': 'list[ResourceLock]', 'freeform_tags': 'dict(str, str)', - 'defined_tags': 'dict(str, dict(str, object))' + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))' } self.attribute_map = { 'id': 'id', @@ -130,8 +140,10 @@ def __init__(self, **kwargs): 'time_updated': 'timeUpdated', 'lifecycle_state': 'lifecycleState', 'lifecycle_details': 'lifecycleDetails', + 'locks': 'locks', 'freeform_tags': 'freeformTags', - 'defined_tags': 'definedTags' + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags' } self._id = None self._gateway_id = None @@ -144,8 +156,10 @@ def __init__(self, **kwargs): self._time_updated = None self._lifecycle_state = None self._lifecycle_details = None + self._locks = None self._freeform_tags = None self._defined_tags = None + self._system_tags = None @property def id(self): @@ -447,6 +461,30 @@ def lifecycle_details(self, lifecycle_details): """ self._lifecycle_details = lifecycle_details + @property + def locks(self): + """ + Gets the locks of this Deployment. + Locks associated with this resource. + + + :return: The locks of this Deployment. + :rtype: list[oci.apigateway.models.ResourceLock] + """ + return self._locks + + @locks.setter + def locks(self, locks): + """ + Sets the locks of this Deployment. + Locks associated with this resource. + + + :param locks: The locks of this Deployment. + :type: list[oci.apigateway.models.ResourceLock] + """ + self._locks = locks + @property def freeform_tags(self): """ @@ -519,6 +557,32 @@ def defined_tags(self, defined_tags): """ self._defined_tags = defined_tags + @property + def system_tags(self): + """ + Gets the system_tags of this Deployment. + 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 Deployment. + :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 Deployment. + 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 Deployment. + :type: dict(str, dict(str, object)) + """ + self._system_tags = system_tags + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/apigateway/models/deployment_summary.py b/src/oci/apigateway/models/deployment_summary.py index 508302cc2c..01171813de 100644 --- a/src/oci/apigateway/models/deployment_summary.py +++ b/src/oci/apigateway/models/deployment_summary.py @@ -60,6 +60,10 @@ def __init__(self, **kwargs): The value to assign to the lifecycle_details property of this DeploymentSummary. :type lifecycle_details: str + :param locks: + The value to assign to the locks property of this DeploymentSummary. + :type locks: list[oci.apigateway.models.ResourceLock] + :param freeform_tags: The value to assign to the freeform_tags property of this DeploymentSummary. :type freeform_tags: dict(str, str) @@ -68,6 +72,10 @@ def __init__(self, **kwargs): The value to assign to the defined_tags property of this DeploymentSummary. :type defined_tags: dict(str, dict(str, object)) + :param system_tags: + The value to assign to the system_tags property of this DeploymentSummary. + :type system_tags: dict(str, dict(str, object)) + """ self.swagger_types = { 'id': 'str', @@ -80,8 +88,10 @@ def __init__(self, **kwargs): 'time_updated': 'datetime', 'lifecycle_state': 'str', 'lifecycle_details': 'str', + 'locks': 'list[ResourceLock]', 'freeform_tags': 'dict(str, str)', - 'defined_tags': 'dict(str, dict(str, object))' + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))' } self.attribute_map = { 'id': 'id', @@ -94,8 +104,10 @@ def __init__(self, **kwargs): 'time_updated': 'timeUpdated', 'lifecycle_state': 'lifecycleState', 'lifecycle_details': 'lifecycleDetails', + 'locks': 'locks', 'freeform_tags': 'freeformTags', - 'defined_tags': 'definedTags' + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags' } self._id = None self._gateway_id = None @@ -107,8 +119,10 @@ def __init__(self, **kwargs): self._time_updated = None self._lifecycle_state = None self._lifecycle_details = None + self._locks = None self._freeform_tags = None self._defined_tags = None + self._system_tags = None @property def id(self): @@ -384,6 +398,30 @@ def lifecycle_details(self, lifecycle_details): """ self._lifecycle_details = lifecycle_details + @property + def locks(self): + """ + Gets the locks of this DeploymentSummary. + Locks associated with this resource. + + + :return: The locks of this DeploymentSummary. + :rtype: list[oci.apigateway.models.ResourceLock] + """ + return self._locks + + @locks.setter + def locks(self, locks): + """ + Sets the locks of this DeploymentSummary. + Locks associated with this resource. + + + :param locks: The locks of this DeploymentSummary. + :type: list[oci.apigateway.models.ResourceLock] + """ + self._locks = locks + @property def freeform_tags(self): """ @@ -456,6 +494,32 @@ def defined_tags(self, defined_tags): """ self._defined_tags = defined_tags + @property + def system_tags(self): + """ + Gets the system_tags of this DeploymentSummary. + 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 DeploymentSummary. + :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 DeploymentSummary. + 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 DeploymentSummary. + :type: dict(str, dict(str, object)) + """ + self._system_tags = system_tags + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/apigateway/models/gateway.py b/src/oci/apigateway/models/gateway.py index bad2d3d608..5761f4e1ea 100644 --- a/src/oci/apigateway/models/gateway.py +++ b/src/oci/apigateway/models/gateway.py @@ -99,6 +99,10 @@ def __init__(self, **kwargs): The value to assign to the lifecycle_details property of this Gateway. :type lifecycle_details: str + :param locks: + The value to assign to the locks property of this Gateway. + :type locks: list[oci.apigateway.models.ResourceLock] + :param hostname: The value to assign to the hostname property of this Gateway. :type hostname: str @@ -123,6 +127,10 @@ def __init__(self, **kwargs): The value to assign to the defined_tags property of this Gateway. :type defined_tags: dict(str, dict(str, object)) + :param system_tags: + The value to assign to the system_tags property of this Gateway. + :type system_tags: dict(str, dict(str, object)) + :param ca_bundles: The value to assign to the ca_bundles property of this Gateway. :type ca_bundles: list[oci.apigateway.models.CaBundle] @@ -139,12 +147,14 @@ def __init__(self, **kwargs): 'time_updated': 'datetime', 'lifecycle_state': 'str', 'lifecycle_details': 'str', + 'locks': 'list[ResourceLock]', 'hostname': 'str', 'certificate_id': 'str', 'ip_addresses': 'list[IpAddress]', 'response_cache_details': 'ResponseCacheDetails', 'freeform_tags': 'dict(str, str)', 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))', 'ca_bundles': 'list[CaBundle]' } self.attribute_map = { @@ -158,12 +168,14 @@ def __init__(self, **kwargs): 'time_updated': 'timeUpdated', 'lifecycle_state': 'lifecycleState', 'lifecycle_details': 'lifecycleDetails', + 'locks': 'locks', 'hostname': 'hostname', 'certificate_id': 'certificateId', 'ip_addresses': 'ipAddresses', 'response_cache_details': 'responseCacheDetails', 'freeform_tags': 'freeformTags', 'defined_tags': 'definedTags', + 'system_tags': 'systemTags', 'ca_bundles': 'caBundles' } self._id = None @@ -176,12 +188,14 @@ def __init__(self, **kwargs): self._time_updated = None self._lifecycle_state = None self._lifecycle_details = None + self._locks = None self._hostname = None self._certificate_id = None self._ip_addresses = None self._response_cache_details = None self._freeform_tags = None self._defined_tags = None + self._system_tags = None self._ca_bundles = None @property @@ -468,6 +482,30 @@ def lifecycle_details(self, lifecycle_details): """ self._lifecycle_details = lifecycle_details + @property + def locks(self): + """ + Gets the locks of this Gateway. + Locks associated with this resource. + + + :return: The locks of this Gateway. + :rtype: list[oci.apigateway.models.ResourceLock] + """ + return self._locks + + @locks.setter + def locks(self, locks): + """ + Sets the locks of this Gateway. + Locks associated with this resource. + + + :param locks: The locks of this Gateway. + :type: list[oci.apigateway.models.ResourceLock] + """ + self._locks = locks + @property def hostname(self): """ @@ -636,6 +674,32 @@ def defined_tags(self, defined_tags): """ self._defined_tags = defined_tags + @property + def system_tags(self): + """ + Gets the system_tags of this Gateway. + 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 Gateway. + :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 Gateway. + 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 Gateway. + :type: dict(str, dict(str, object)) + """ + self._system_tags = system_tags + @property def ca_bundles(self): """ diff --git a/src/oci/apigateway/models/gateway_summary.py b/src/oci/apigateway/models/gateway_summary.py index 6fd086b7a7..a3fb8b3047 100644 --- a/src/oci/apigateway/models/gateway_summary.py +++ b/src/oci/apigateway/models/gateway_summary.py @@ -60,6 +60,10 @@ def __init__(self, **kwargs): The value to assign to the lifecycle_details property of this GatewaySummary. :type lifecycle_details: str + :param locks: + The value to assign to the locks property of this GatewaySummary. + :type locks: list[oci.apigateway.models.ResourceLock] + :param hostname: The value to assign to the hostname property of this GatewaySummary. :type hostname: str @@ -76,6 +80,10 @@ def __init__(self, **kwargs): The value to assign to the defined_tags property of this GatewaySummary. :type defined_tags: dict(str, dict(str, object)) + :param system_tags: + The value to assign to the system_tags property of this GatewaySummary. + :type system_tags: dict(str, dict(str, object)) + """ self.swagger_types = { 'id': 'str', @@ -88,10 +96,12 @@ def __init__(self, **kwargs): 'time_updated': 'datetime', 'lifecycle_state': 'str', 'lifecycle_details': 'str', + 'locks': 'list[ResourceLock]', 'hostname': 'str', 'certificate_id': 'str', 'freeform_tags': 'dict(str, str)', - 'defined_tags': 'dict(str, dict(str, object))' + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))' } self.attribute_map = { 'id': 'id', @@ -104,10 +114,12 @@ def __init__(self, **kwargs): 'time_updated': 'timeUpdated', 'lifecycle_state': 'lifecycleState', 'lifecycle_details': 'lifecycleDetails', + 'locks': 'locks', 'hostname': 'hostname', 'certificate_id': 'certificateId', 'freeform_tags': 'freeformTags', - 'defined_tags': 'definedTags' + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags' } self._id = None self._display_name = None @@ -119,10 +131,12 @@ def __init__(self, **kwargs): self._time_updated = None self._lifecycle_state = None self._lifecycle_details = None + self._locks = None self._hostname = None self._certificate_id = None self._freeform_tags = None self._defined_tags = None + self._system_tags = None @property def id(self): @@ -396,6 +410,30 @@ def lifecycle_details(self, lifecycle_details): """ self._lifecycle_details = lifecycle_details + @property + def locks(self): + """ + Gets the locks of this GatewaySummary. + Locks associated with this resource. + + + :return: The locks of this GatewaySummary. + :rtype: list[oci.apigateway.models.ResourceLock] + """ + return self._locks + + @locks.setter + def locks(self, locks): + """ + Sets the locks of this GatewaySummary. + Locks associated with this resource. + + + :param locks: The locks of this GatewaySummary. + :type: list[oci.apigateway.models.ResourceLock] + """ + self._locks = locks + @property def hostname(self): """ @@ -520,6 +558,32 @@ def defined_tags(self, defined_tags): """ self._defined_tags = defined_tags + @property + def system_tags(self): + """ + Gets the system_tags of this GatewaySummary. + 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 GatewaySummary. + :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 GatewaySummary. + 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 GatewaySummary. + :type: dict(str, dict(str, object)) + """ + self._system_tags = system_tags + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/apigateway/models/header_validation_request_policy.py b/src/oci/apigateway/models/header_validation_request_policy.py index 0fc9b9cc03..b36d31dee5 100644 --- a/src/oci/apigateway/models/header_validation_request_policy.py +++ b/src/oci/apigateway/models/header_validation_request_policy.py @@ -58,6 +58,8 @@ def __init__(self, **kwargs): def headers(self): """ Gets the headers of this HeaderValidationRequestPolicy. + The List of Headers + :return: The headers of this HeaderValidationRequestPolicy. :rtype: list[oci.apigateway.models.HeaderValidationItem] @@ -68,6 +70,8 @@ def headers(self): def headers(self, headers): """ Sets the headers of this HeaderValidationRequestPolicy. + The List of Headers + :param headers: The headers of this HeaderValidationRequestPolicy. :type: list[oci.apigateway.models.HeaderValidationItem] diff --git a/src/oci/apigateway/models/http_backend.py b/src/oci/apigateway/models/http_backend.py index 9390c668b4..b4f44faf07 100644 --- a/src/oci/apigateway/models/http_backend.py +++ b/src/oci/apigateway/models/http_backend.py @@ -75,6 +75,8 @@ def __init__(self, **kwargs): def url(self): """ **[Required]** Gets the url of this HTTPBackend. + The url of the HTTP Backend + :return: The url of this HTTPBackend. :rtype: str @@ -85,6 +87,8 @@ def url(self): def url(self, url): """ Sets the url of this HTTPBackend. + The url of the HTTP Backend + :param url: The url of this HTTPBackend. :type: str diff --git a/src/oci/apigateway/models/o_auth2_logout_backend.py b/src/oci/apigateway/models/o_auth2_logout_backend.py index fc87e28ccb..35d0174e7c 100644 --- a/src/oci/apigateway/models/o_auth2_logout_backend.py +++ b/src/oci/apigateway/models/o_auth2_logout_backend.py @@ -54,6 +54,8 @@ def __init__(self, **kwargs): def allowed_post_logout_uris(self): """ Gets the allowed_post_logout_uris of this OAuth2LogoutBackend. + A list of allowed post-logout URLs to which a request can be redirected after revoke access + :return: The allowed_post_logout_uris of this OAuth2LogoutBackend. :rtype: list[str] @@ -64,6 +66,8 @@ def allowed_post_logout_uris(self): def allowed_post_logout_uris(self, allowed_post_logout_uris): """ Sets the allowed_post_logout_uris of this OAuth2LogoutBackend. + A list of allowed post-logout URLs to which a request can be redirected after revoke access + :param allowed_post_logout_uris: The allowed_post_logout_uris of this OAuth2LogoutBackend. :type: list[str] diff --git a/src/oci/apigateway/models/query_parameter_validation_request_policy.py b/src/oci/apigateway/models/query_parameter_validation_request_policy.py index cb425402d6..51f626cabf 100644 --- a/src/oci/apigateway/models/query_parameter_validation_request_policy.py +++ b/src/oci/apigateway/models/query_parameter_validation_request_policy.py @@ -58,6 +58,8 @@ def __init__(self, **kwargs): def parameters(self): """ Gets the parameters of this QueryParameterValidationRequestPolicy. + The List of Query Parameters + :return: The parameters of this QueryParameterValidationRequestPolicy. :rtype: list[oci.apigateway.models.QueryParameterValidationItem] @@ -68,6 +70,8 @@ def parameters(self): def parameters(self, parameters): """ Sets the parameters of this QueryParameterValidationRequestPolicy. + The List of Query Parameters + :param parameters: The parameters of this QueryParameterValidationRequestPolicy. :type: list[oci.apigateway.models.QueryParameterValidationItem] diff --git a/src/oci/apigateway/models/remove_resource_lock_details.py b/src/oci/apigateway/models/remove_resource_lock_details.py new file mode 100644 index 0000000000..780c5cd338 --- /dev/null +++ b/src/oci/apigateway/models/remove_resource_lock_details.py @@ -0,0 +1,89 @@ +# coding: utf-8 +# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20190501 + + +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 RemoveResourceLockDetails(object): + """ + Used to remove a resource lock. + Resource locks are used to prevent certain APIs from being called for the resource. + A full lock prevents both updating the resource and deleting the resource. A delete + lock prevents deleting the resource. + """ + + #: A constant which can be used with the type property of a RemoveResourceLockDetails. + #: This constant has a value of "FULL" + TYPE_FULL = "FULL" + + #: A constant which can be used with the type property of a RemoveResourceLockDetails. + #: This constant has a value of "DELETE" + TYPE_DELETE = "DELETE" + + def __init__(self, **kwargs): + """ + Initializes a new RemoveResourceLockDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param type: + The value to assign to the type property of this RemoveResourceLockDetails. + Allowed values for this property are: "FULL", "DELETE" + :type type: str + + """ + self.swagger_types = { + 'type': 'str' + } + self.attribute_map = { + 'type': 'type' + } + self._type = None + + @property + def type(self): + """ + **[Required]** Gets the type of this RemoveResourceLockDetails. + Type of the lock. + + Allowed values for this property are: "FULL", "DELETE" + + + :return: The type of this RemoveResourceLockDetails. + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """ + Sets the type of this RemoveResourceLockDetails. + Type of the lock. + + + :param type: The type of this RemoveResourceLockDetails. + :type: str + """ + allowed_values = ["FULL", "DELETE"] + if not value_allowed_none_or_none_sentinel(type, allowed_values): + raise ValueError( + f"Invalid value for `type`, must be None or one of {allowed_values}" + ) + self._type = type + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/apigateway/models/resource_lock.py b/src/oci/apigateway/models/resource_lock.py new file mode 100644 index 0000000000..354abf599a --- /dev/null +++ b/src/oci/apigateway/models/resource_lock.py @@ -0,0 +1,183 @@ +# coding: utf-8 +# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20190501 + + +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 ResourceLock(object): + """ + Resource locks are used to prevent certain APIs from being called for the resource. + A full lock prevents both updating the resource and deleting the resource. A delete + lock prevents deleting the resource. + """ + + #: A constant which can be used with the type property of a ResourceLock. + #: This constant has a value of "FULL" + TYPE_FULL = "FULL" + + #: A constant which can be used with the type property of a ResourceLock. + #: This constant has a value of "DELETE" + TYPE_DELETE = "DELETE" + + def __init__(self, **kwargs): + """ + Initializes a new ResourceLock object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param type: + The value to assign to the type property of this ResourceLock. + Allowed values for this property are: "FULL", "DELETE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type type: str + + :param related_resource_id: + The value to assign to the related_resource_id property of this ResourceLock. + :type related_resource_id: str + + :param message: + The value to assign to the message property of this ResourceLock. + :type message: str + + :param time_created: + The value to assign to the time_created property of this ResourceLock. + :type time_created: datetime + + """ + self.swagger_types = { + 'type': 'str', + 'related_resource_id': 'str', + 'message': 'str', + 'time_created': 'datetime' + } + self.attribute_map = { + 'type': 'type', + 'related_resource_id': 'relatedResourceId', + 'message': 'message', + 'time_created': 'timeCreated' + } + self._type = None + self._related_resource_id = None + self._message = None + self._time_created = None + + @property + def type(self): + """ + **[Required]** Gets the type of this ResourceLock. + Type of the lock. + + Allowed values for this property are: "FULL", "DELETE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The type of this ResourceLock. + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """ + Sets the type of this ResourceLock. + Type of the lock. + + + :param type: The type of this ResourceLock. + :type: str + """ + allowed_values = ["FULL", "DELETE"] + if not value_allowed_none_or_none_sentinel(type, allowed_values): + type = 'UNKNOWN_ENUM_VALUE' + self._type = type + + @property + def related_resource_id(self): + """ + Gets the related_resource_id of this ResourceLock. + The id of the resource that is locking this resource. Indicates that deleting this resource will remove the lock. + + + :return: The related_resource_id of this ResourceLock. + :rtype: str + """ + return self._related_resource_id + + @related_resource_id.setter + def related_resource_id(self, related_resource_id): + """ + Sets the related_resource_id of this ResourceLock. + The id of the resource that is locking this resource. Indicates that deleting this resource will remove the lock. + + + :param related_resource_id: The related_resource_id of this ResourceLock. + :type: str + """ + self._related_resource_id = related_resource_id + + @property + def message(self): + """ + Gets the message of this ResourceLock. + A message added by the creator of the lock. This is typically used to give an + indication of why the resource is locked. + + + :return: The message of this ResourceLock. + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """ + Sets the message of this ResourceLock. + A message added by the creator of the lock. This is typically used to give an + indication of why the resource is locked. + + + :param message: The message of this ResourceLock. + :type: str + """ + self._message = message + + @property + def time_created(self): + """ + Gets the time_created of this ResourceLock. + When the lock was created. + + + :return: The time_created of this ResourceLock. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this ResourceLock. + When the lock was created. + + + :param time_created: The time_created of this ResourceLock. + :type: datetime + """ + self._time_created = time_created + + 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/apigateway/models/sdk.py b/src/oci/apigateway/models/sdk.py index 953fa2e1b7..d812741210 100644 --- a/src/oci/apigateway/models/sdk.py +++ b/src/oci/apigateway/models/sdk.py @@ -86,6 +86,10 @@ def __init__(self, **kwargs): The value to assign to the lifecycle_details property of this Sdk. :type lifecycle_details: str + :param locks: + The value to assign to the locks property of this Sdk. + :type locks: list[oci.apigateway.models.ResourceLock] + :param freeform_tags: The value to assign to the freeform_tags property of this Sdk. :type freeform_tags: dict(str, str) @@ -94,6 +98,10 @@ def __init__(self, **kwargs): The value to assign to the defined_tags property of this Sdk. :type defined_tags: dict(str, dict(str, object)) + :param system_tags: + The value to assign to the system_tags property of this Sdk. + :type system_tags: dict(str, dict(str, object)) + :param parameters: The value to assign to the parameters property of this Sdk. :type parameters: dict(str, str) @@ -111,8 +119,10 @@ def __init__(self, **kwargs): 'time_artifact_url_expires_at': 'datetime', 'lifecycle_state': 'str', 'lifecycle_details': 'str', + 'locks': 'list[ResourceLock]', 'freeform_tags': 'dict(str, str)', 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))', 'parameters': 'dict(str, str)' } self.attribute_map = { @@ -127,8 +137,10 @@ def __init__(self, **kwargs): 'time_artifact_url_expires_at': 'timeArtifactUrlExpiresAt', 'lifecycle_state': 'lifecycleState', 'lifecycle_details': 'lifecycleDetails', + 'locks': 'locks', 'freeform_tags': 'freeformTags', 'defined_tags': 'definedTags', + 'system_tags': 'systemTags', 'parameters': 'parameters' } self._id = None @@ -142,8 +154,10 @@ def __init__(self, **kwargs): self._time_artifact_url_expires_at = None self._lifecycle_state = None self._lifecycle_details = None + self._locks = None self._freeform_tags = None self._defined_tags = None + self._system_tags = None self._parameters = None @property @@ -450,6 +464,30 @@ def lifecycle_details(self, lifecycle_details): """ self._lifecycle_details = lifecycle_details + @property + def locks(self): + """ + Gets the locks of this Sdk. + Locks associated with this resource. + + + :return: The locks of this Sdk. + :rtype: list[oci.apigateway.models.ResourceLock] + """ + return self._locks + + @locks.setter + def locks(self, locks): + """ + Sets the locks of this Sdk. + Locks associated with this resource. + + + :param locks: The locks of this Sdk. + :type: list[oci.apigateway.models.ResourceLock] + """ + self._locks = locks + @property def freeform_tags(self): """ @@ -522,6 +560,32 @@ def defined_tags(self, defined_tags): """ self._defined_tags = defined_tags + @property + def system_tags(self): + """ + Gets the system_tags of this Sdk. + 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 Sdk. + :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 Sdk. + 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 Sdk. + :type: dict(str, dict(str, object)) + """ + self._system_tags = system_tags + @property def parameters(self): """ diff --git a/src/oci/apigateway/models/sdk_summary.py b/src/oci/apigateway/models/sdk_summary.py index 35f6c5b7fa..f43a8c8ac4 100644 --- a/src/oci/apigateway/models/sdk_summary.py +++ b/src/oci/apigateway/models/sdk_summary.py @@ -48,6 +48,10 @@ def __init__(self, **kwargs): The value to assign to the lifecycle_state property of this SdkSummary. :type lifecycle_state: str + :param locks: + The value to assign to the locks property of this SdkSummary. + :type locks: list[oci.apigateway.models.ResourceLock] + :param freeform_tags: The value to assign to the freeform_tags property of this SdkSummary. :type freeform_tags: dict(str, str) @@ -56,6 +60,10 @@ def __init__(self, **kwargs): The value to assign to the defined_tags property of this SdkSummary. :type defined_tags: dict(str, dict(str, object)) + :param system_tags: + The value to assign to the system_tags property of this SdkSummary. + :type system_tags: dict(str, dict(str, object)) + """ self.swagger_types = { 'id': 'str', @@ -65,8 +73,10 @@ def __init__(self, **kwargs): 'display_name': 'str', 'target_language': 'str', 'lifecycle_state': 'str', + 'locks': 'list[ResourceLock]', 'freeform_tags': 'dict(str, str)', - 'defined_tags': 'dict(str, dict(str, object))' + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))' } self.attribute_map = { 'id': 'id', @@ -76,8 +86,10 @@ def __init__(self, **kwargs): 'display_name': 'displayName', 'target_language': 'targetLanguage', 'lifecycle_state': 'lifecycleState', + 'locks': 'locks', 'freeform_tags': 'freeformTags', - 'defined_tags': 'definedTags' + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags' } self._id = None self._compartment_id = None @@ -86,8 +98,10 @@ def __init__(self, **kwargs): self._display_name = None self._target_language = None self._lifecycle_state = None + self._locks = None self._freeform_tags = None self._defined_tags = None + self._system_tags = None @property def id(self): @@ -273,6 +287,30 @@ def lifecycle_state(self, lifecycle_state): """ self._lifecycle_state = lifecycle_state + @property + def locks(self): + """ + Gets the locks of this SdkSummary. + Locks associated with this resource. + + + :return: The locks of this SdkSummary. + :rtype: list[oci.apigateway.models.ResourceLock] + """ + return self._locks + + @locks.setter + def locks(self, locks): + """ + Sets the locks of this SdkSummary. + Locks associated with this resource. + + + :param locks: The locks of this SdkSummary. + :type: list[oci.apigateway.models.ResourceLock] + """ + self._locks = locks + @property def freeform_tags(self): """ @@ -345,6 +383,32 @@ def defined_tags(self, defined_tags): """ self._defined_tags = defined_tags + @property + def system_tags(self): + """ + Gets the system_tags of this SdkSummary. + 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 SdkSummary. + :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 SdkSummary. + 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 SdkSummary. + :type: dict(str, dict(str, object)) + """ + self._system_tags = system_tags + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/apigateway/models/subscriber.py b/src/oci/apigateway/models/subscriber.py index c309c37574..00ca2a839c 100644 --- a/src/oci/apigateway/models/subscriber.py +++ b/src/oci/apigateway/models/subscriber.py @@ -82,6 +82,10 @@ def __init__(self, **kwargs): The value to assign to the lifecycle_details property of this Subscriber. :type lifecycle_details: str + :param locks: + The value to assign to the locks property of this Subscriber. + :type locks: list[oci.apigateway.models.ResourceLock] + :param freeform_tags: The value to assign to the freeform_tags property of this Subscriber. :type freeform_tags: dict(str, str) @@ -90,6 +94,10 @@ def __init__(self, **kwargs): The value to assign to the defined_tags property of this Subscriber. :type defined_tags: dict(str, dict(str, object)) + :param system_tags: + The value to assign to the system_tags property of this Subscriber. + :type system_tags: dict(str, dict(str, object)) + """ self.swagger_types = { 'id': 'str', @@ -101,8 +109,10 @@ def __init__(self, **kwargs): 'time_updated': 'datetime', 'lifecycle_state': 'str', 'lifecycle_details': 'str', + 'locks': 'list[ResourceLock]', 'freeform_tags': 'dict(str, str)', - 'defined_tags': 'dict(str, dict(str, object))' + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))' } self.attribute_map = { 'id': 'id', @@ -114,8 +124,10 @@ def __init__(self, **kwargs): 'time_updated': 'timeUpdated', 'lifecycle_state': 'lifecycleState', 'lifecycle_details': 'lifecycleDetails', + 'locks': 'locks', 'freeform_tags': 'freeformTags', - 'defined_tags': 'definedTags' + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags' } self._id = None self._compartment_id = None @@ -126,8 +138,10 @@ def __init__(self, **kwargs): self._time_updated = None self._lifecycle_state = None self._lifecycle_details = None + self._locks = None self._freeform_tags = None self._defined_tags = None + self._system_tags = None @property def id(self): @@ -377,6 +391,30 @@ def lifecycle_details(self, lifecycle_details): """ self._lifecycle_details = lifecycle_details + @property + def locks(self): + """ + Gets the locks of this Subscriber. + Locks associated with this resource. + + + :return: The locks of this Subscriber. + :rtype: list[oci.apigateway.models.ResourceLock] + """ + return self._locks + + @locks.setter + def locks(self, locks): + """ + Sets the locks of this Subscriber. + Locks associated with this resource. + + + :param locks: The locks of this Subscriber. + :type: list[oci.apigateway.models.ResourceLock] + """ + self._locks = locks + @property def freeform_tags(self): """ @@ -449,6 +487,32 @@ def defined_tags(self, defined_tags): """ self._defined_tags = defined_tags + @property + def system_tags(self): + """ + Gets the system_tags of this Subscriber. + 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 Subscriber. + :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 Subscriber. + 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 Subscriber. + :type: dict(str, dict(str, object)) + """ + self._system_tags = system_tags + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/apigateway/models/subscriber_summary.py b/src/oci/apigateway/models/subscriber_summary.py index 309d61ca3b..dc2aa93be4 100644 --- a/src/oci/apigateway/models/subscriber_summary.py +++ b/src/oci/apigateway/models/subscriber_summary.py @@ -56,6 +56,10 @@ def __init__(self, **kwargs): The value to assign to the lifecycle_details property of this SubscriberSummary. :type lifecycle_details: str + :param locks: + The value to assign to the locks property of this SubscriberSummary. + :type locks: list[oci.apigateway.models.ResourceLock] + :param freeform_tags: The value to assign to the freeform_tags property of this SubscriberSummary. :type freeform_tags: dict(str, str) @@ -64,6 +68,10 @@ def __init__(self, **kwargs): The value to assign to the defined_tags property of this SubscriberSummary. :type defined_tags: dict(str, dict(str, object)) + :param system_tags: + The value to assign to the system_tags property of this SubscriberSummary. + :type system_tags: dict(str, dict(str, object)) + """ self.swagger_types = { 'id': 'str', @@ -75,8 +83,10 @@ def __init__(self, **kwargs): 'time_updated': 'datetime', 'lifecycle_state': 'str', 'lifecycle_details': 'str', + 'locks': 'list[ResourceLock]', 'freeform_tags': 'dict(str, str)', - 'defined_tags': 'dict(str, dict(str, object))' + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))' } self.attribute_map = { 'id': 'id', @@ -88,8 +98,10 @@ def __init__(self, **kwargs): 'time_updated': 'timeUpdated', 'lifecycle_state': 'lifecycleState', 'lifecycle_details': 'lifecycleDetails', + 'locks': 'locks', 'freeform_tags': 'freeformTags', - 'defined_tags': 'definedTags' + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags' } self._id = None self._compartment_id = None @@ -100,8 +112,10 @@ def __init__(self, **kwargs): self._time_updated = None self._lifecycle_state = None self._lifecycle_details = None + self._locks = None self._freeform_tags = None self._defined_tags = None + self._system_tags = None @property def id(self): @@ -345,6 +359,30 @@ def lifecycle_details(self, lifecycle_details): """ self._lifecycle_details = lifecycle_details + @property + def locks(self): + """ + Gets the locks of this SubscriberSummary. + Locks associated with this resource. + + + :return: The locks of this SubscriberSummary. + :rtype: list[oci.apigateway.models.ResourceLock] + """ + return self._locks + + @locks.setter + def locks(self, locks): + """ + Sets the locks of this SubscriberSummary. + Locks associated with this resource. + + + :param locks: The locks of this SubscriberSummary. + :type: list[oci.apigateway.models.ResourceLock] + """ + self._locks = locks + @property def freeform_tags(self): """ @@ -417,6 +455,32 @@ def defined_tags(self, defined_tags): """ self._defined_tags = defined_tags + @property + def system_tags(self): + """ + Gets the system_tags of this SubscriberSummary. + 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 SubscriberSummary. + :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 SubscriberSummary. + 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 SubscriberSummary. + :type: dict(str, dict(str, object)) + """ + self._system_tags = system_tags + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/apigateway/models/update_gateway_details.py b/src/oci/apigateway/models/update_gateway_details.py index 37963b20ac..56464167c9 100644 --- a/src/oci/apigateway/models/update_gateway_details.py +++ b/src/oci/apigateway/models/update_gateway_details.py @@ -133,7 +133,8 @@ def network_security_group_ids(self, network_security_group_ids): def certificate_id(self): """ Gets the certificate_id of this UpdateGatewayDetails. - The `OCID`__ of the resource. + The `OCID`__ of the resource which can be + empty string. __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm @@ -147,7 +148,8 @@ def certificate_id(self): def certificate_id(self, certificate_id): """ Sets the certificate_id of this UpdateGatewayDetails. - The `OCID`__ of the resource. + The `OCID`__ of the resource which can be + empty string. __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm diff --git a/src/oci/apigateway/models/usage_plan.py b/src/oci/apigateway/models/usage_plan.py index e1c183a1c6..f51ab866ba 100644 --- a/src/oci/apigateway/models/usage_plan.py +++ b/src/oci/apigateway/models/usage_plan.py @@ -78,6 +78,10 @@ def __init__(self, **kwargs): The value to assign to the lifecycle_details property of this UsagePlan. :type lifecycle_details: str + :param locks: + The value to assign to the locks property of this UsagePlan. + :type locks: list[oci.apigateway.models.ResourceLock] + :param freeform_tags: The value to assign to the freeform_tags property of this UsagePlan. :type freeform_tags: dict(str, str) @@ -86,6 +90,10 @@ def __init__(self, **kwargs): The value to assign to the defined_tags property of this UsagePlan. :type defined_tags: dict(str, dict(str, object)) + :param system_tags: + The value to assign to the system_tags property of this UsagePlan. + :type system_tags: dict(str, dict(str, object)) + """ self.swagger_types = { 'id': 'str', @@ -96,8 +104,10 @@ def __init__(self, **kwargs): 'time_updated': 'datetime', 'lifecycle_state': 'str', 'lifecycle_details': 'str', + 'locks': 'list[ResourceLock]', 'freeform_tags': 'dict(str, str)', - 'defined_tags': 'dict(str, dict(str, object))' + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))' } self.attribute_map = { 'id': 'id', @@ -108,8 +118,10 @@ def __init__(self, **kwargs): 'time_updated': 'timeUpdated', 'lifecycle_state': 'lifecycleState', 'lifecycle_details': 'lifecycleDetails', + 'locks': 'locks', 'freeform_tags': 'freeformTags', - 'defined_tags': 'definedTags' + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags' } self._id = None self._display_name = None @@ -119,8 +131,10 @@ def __init__(self, **kwargs): self._time_updated = None self._lifecycle_state = None self._lifecycle_details = None + self._locks = None self._freeform_tags = None self._defined_tags = None + self._system_tags = None @property def id(self): @@ -340,6 +354,30 @@ def lifecycle_details(self, lifecycle_details): """ self._lifecycle_details = lifecycle_details + @property + def locks(self): + """ + Gets the locks of this UsagePlan. + Locks associated with this resource. + + + :return: The locks of this UsagePlan. + :rtype: list[oci.apigateway.models.ResourceLock] + """ + return self._locks + + @locks.setter + def locks(self, locks): + """ + Sets the locks of this UsagePlan. + Locks associated with this resource. + + + :param locks: The locks of this UsagePlan. + :type: list[oci.apigateway.models.ResourceLock] + """ + self._locks = locks + @property def freeform_tags(self): """ @@ -412,6 +450,32 @@ def defined_tags(self, defined_tags): """ self._defined_tags = defined_tags + @property + def system_tags(self): + """ + Gets the system_tags of this UsagePlan. + 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 UsagePlan. + :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 UsagePlan. + 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 UsagePlan. + :type: dict(str, dict(str, object)) + """ + self._system_tags = system_tags + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/apigateway/models/usage_plan_summary.py b/src/oci/apigateway/models/usage_plan_summary.py index 267d3f77d7..d4dfea06ac 100644 --- a/src/oci/apigateway/models/usage_plan_summary.py +++ b/src/oci/apigateway/models/usage_plan_summary.py @@ -52,6 +52,10 @@ def __init__(self, **kwargs): The value to assign to the lifecycle_details property of this UsagePlanSummary. :type lifecycle_details: str + :param locks: + The value to assign to the locks property of this UsagePlanSummary. + :type locks: list[oci.apigateway.models.ResourceLock] + :param freeform_tags: The value to assign to the freeform_tags property of this UsagePlanSummary. :type freeform_tags: dict(str, str) @@ -60,6 +64,10 @@ def __init__(self, **kwargs): The value to assign to the defined_tags property of this UsagePlanSummary. :type defined_tags: dict(str, dict(str, object)) + :param system_tags: + The value to assign to the system_tags property of this UsagePlanSummary. + :type system_tags: dict(str, dict(str, object)) + """ self.swagger_types = { 'id': 'str', @@ -70,8 +78,10 @@ def __init__(self, **kwargs): 'time_updated': 'datetime', 'lifecycle_state': 'str', 'lifecycle_details': 'str', + 'locks': 'list[ResourceLock]', 'freeform_tags': 'dict(str, str)', - 'defined_tags': 'dict(str, dict(str, object))' + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))' } self.attribute_map = { 'id': 'id', @@ -82,8 +92,10 @@ def __init__(self, **kwargs): 'time_updated': 'timeUpdated', 'lifecycle_state': 'lifecycleState', 'lifecycle_details': 'lifecycleDetails', + 'locks': 'locks', 'freeform_tags': 'freeformTags', - 'defined_tags': 'definedTags' + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags' } self._id = None self._display_name = None @@ -93,8 +105,10 @@ def __init__(self, **kwargs): self._time_updated = None self._lifecycle_state = None self._lifecycle_details = None + self._locks = None self._freeform_tags = None self._defined_tags = None + self._system_tags = None @property def id(self): @@ -308,6 +322,30 @@ def lifecycle_details(self, lifecycle_details): """ self._lifecycle_details = lifecycle_details + @property + def locks(self): + """ + Gets the locks of this UsagePlanSummary. + Locks associated with this resource. + + + :return: The locks of this UsagePlanSummary. + :rtype: list[oci.apigateway.models.ResourceLock] + """ + return self._locks + + @locks.setter + def locks(self, locks): + """ + Sets the locks of this UsagePlanSummary. + Locks associated with this resource. + + + :param locks: The locks of this UsagePlanSummary. + :type: list[oci.apigateway.models.ResourceLock] + """ + self._locks = locks + @property def freeform_tags(self): """ @@ -380,6 +418,32 @@ def defined_tags(self, defined_tags): """ self._defined_tags = defined_tags + @property + def system_tags(self): + """ + Gets the system_tags of this UsagePlanSummary. + 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 UsagePlanSummary. + :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 UsagePlanSummary. + 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 UsagePlanSummary. + :type: dict(str, dict(str, object)) + """ + self._system_tags = system_tags + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/apigateway/subscribers_client.py b/src/oci/apigateway/subscribers_client.py index 5d1a8d066a..0a8d8fac0c 100644 --- a/src/oci/apigateway/subscribers_client.py +++ b/src/oci/apigateway/subscribers_client.py @@ -118,6 +118,115 @@ def __init__(self, config, **kwargs): self.retry_strategy = kwargs.get('retry_strategy') self.circuit_breaker_callback = kwargs.get('circuit_breaker_callback') + def add_subscriber_lock(self, subscriber_id, add_resource_lock_details, **kwargs): + """ + Adds a lock to a Subscriber resource. + + + :param str subscriber_id: (required) + The ocid of the subscriber. + + :param oci.apigateway.models.AddResourceLockDetails add_resource_lock_details: (required) + AddResourceLockDetails body parameter + + :param str opc_request_id: (optional) + Unique identifier for the request. + If you need to contact Oracle about a particular request, please provide the request ID. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + parameter to the value of the etag from a previous GET or POST response for that resource. The resource + will be updated or deleted only if the etag you provide matches the resource's current etag value. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.apigateway.models.Subscriber` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use add_subscriber_lock API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['subscriberId'] + resource_path = "/subscribers/{subscriberId}/actions/addLock" + method = "POST" + operation_name = "add_subscriber_lock" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/api-gateway/20190501/Subscriber/AddSubscriberLock" + + # 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"add_subscriber_lock got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "subscriberId": subscriber_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: + 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=add_resource_lock_details, + response_type="Subscriber", + 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=add_resource_lock_details, + response_type="Subscriber", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + def change_subscriber_compartment(self, subscriber_id, change_subscriber_compartment_details, **kwargs): """ Changes the subscriber compartment. @@ -146,6 +255,9 @@ def change_subscriber_compartment(self, subscriber_id, change_subscriber_compart :param str opc_request_id: (optional) The client request id for tracing. + :param bool is_lock_override: (optional) + Whether to override locks (if any exist). + :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. @@ -177,7 +289,8 @@ def change_subscriber_compartment(self, subscriber_id, change_subscriber_compart "retry_strategy", "opc_retry_token", "if_match", - "opc_request_id" + "opc_request_id", + "is_lock_override" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: @@ -194,6 +307,11 @@ def change_subscriber_compartment(self, subscriber_id, change_subscriber_compart 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') + query_params = { + "isLockOverride": kwargs.get("is_lock_override", 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", @@ -218,6 +336,7 @@ def change_subscriber_compartment(self, subscriber_id, change_subscriber_compart resource_path=resource_path, method=method, path_params=path_params, + query_params=query_params, header_params=header_params, body=change_subscriber_compartment_details, allow_control_chars=kwargs.get('allow_control_chars'), @@ -229,6 +348,7 @@ def change_subscriber_compartment(self, subscriber_id, change_subscriber_compart resource_path=resource_path, method=method, path_params=path_params, + query_params=query_params, header_params=header_params, body=change_subscriber_compartment_details, allow_control_chars=kwargs.get('allow_control_chars'), @@ -352,6 +472,9 @@ def delete_subscriber(self, subscriber_id, **kwargs): :param str opc_request_id: (optional) The client request id for tracing. + :param bool is_lock_override: (optional) + Whether to override locks (if any exist). + :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. @@ -382,7 +505,8 @@ def delete_subscriber(self, subscriber_id, **kwargs): "allow_control_chars", "retry_strategy", "if_match", - "opc_request_id" + "opc_request_id", + "is_lock_override" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: @@ -399,6 +523,11 @@ def delete_subscriber(self, subscriber_id, **kwargs): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + query_params = { + "isLockOverride": kwargs.get("is_lock_override", 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", @@ -421,6 +550,7 @@ def delete_subscriber(self, subscriber_id, **kwargs): resource_path=resource_path, method=method, path_params=path_params, + query_params=query_params, header_params=header_params, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, @@ -431,6 +561,7 @@ def delete_subscriber(self, subscriber_id, **kwargs): resource_path=resource_path, method=method, path_params=path_params, + query_params=query_params, header_params=header_params, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, @@ -691,6 +822,115 @@ def list_subscribers(self, compartment_id, **kwargs): api_reference_link=api_reference_link, required_arguments=required_arguments) + def remove_subscriber_lock(self, subscriber_id, remove_resource_lock_details, **kwargs): + """ + Removes a lock from a Subscriber resource. + + + :param str subscriber_id: (required) + The ocid of the subscriber. + + :param oci.apigateway.models.RemoveResourceLockDetails remove_resource_lock_details: (required) + RemoveResourceLockDetails body parameter + + :param str opc_request_id: (optional) + Unique identifier for the request. + If you need to contact Oracle about a particular request, please provide the request ID. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + parameter to the value of the etag from a previous GET or POST response for that resource. The resource + will be updated or deleted only if the etag you provide matches the resource's current etag value. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.apigateway.models.Subscriber` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use remove_subscriber_lock API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['subscriberId'] + resource_path = "/subscribers/{subscriberId}/actions/removeLock" + method = "POST" + operation_name = "remove_subscriber_lock" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/api-gateway/20190501/Subscriber/RemoveSubscriberLock" + + # 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"remove_subscriber_lock got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "subscriberId": subscriber_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: + 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=remove_resource_lock_details, + response_type="Subscriber", + 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=remove_resource_lock_details, + response_type="Subscriber", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + def update_subscriber(self, subscriber_id, update_subscriber_details, **kwargs): """ Updates the subscriber with the given identifier. @@ -712,6 +952,9 @@ def update_subscriber(self, subscriber_id, update_subscriber_details, **kwargs): :param str opc_request_id: (optional) The client request id for tracing. + :param bool is_lock_override: (optional) + Whether to override locks (if any exist). + :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. @@ -742,7 +985,8 @@ def update_subscriber(self, subscriber_id, update_subscriber_details, **kwargs): "allow_control_chars", "retry_strategy", "if_match", - "opc_request_id" + "opc_request_id", + "is_lock_override" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: @@ -759,6 +1003,11 @@ def update_subscriber(self, subscriber_id, update_subscriber_details, **kwargs): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + query_params = { + "isLockOverride": kwargs.get("is_lock_override", 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", @@ -781,6 +1030,7 @@ def update_subscriber(self, subscriber_id, update_subscriber_details, **kwargs): resource_path=resource_path, method=method, path_params=path_params, + query_params=query_params, header_params=header_params, body=update_subscriber_details, allow_control_chars=kwargs.get('allow_control_chars'), @@ -792,6 +1042,7 @@ def update_subscriber(self, subscriber_id, update_subscriber_details, **kwargs): resource_path=resource_path, method=method, path_params=path_params, + query_params=query_params, header_params=header_params, body=update_subscriber_details, allow_control_chars=kwargs.get('allow_control_chars'), diff --git a/src/oci/apigateway/subscribers_client_composite_operations.py b/src/oci/apigateway/subscribers_client_composite_operations.py index 4e0fe1a343..98e1667aca 100644 --- a/src/oci/apigateway/subscribers_client_composite_operations.py +++ b/src/oci/apigateway/subscribers_client_composite_operations.py @@ -25,6 +25,51 @@ def __init__(self, client, **kwargs): """ self.client = client + def add_subscriber_lock_and_wait_for_state(self, subscriber_id, add_resource_lock_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.apigateway.SubscribersClient.add_subscriber_lock` and waits for the :py:class:`~oci.apigateway.models.Subscriber` acted upon + to enter the given state(s). + + :param str subscriber_id: (required) + The ocid of the subscriber. + + :param oci.apigateway.models.AddResourceLockDetails add_resource_lock_details: (required) + AddResourceLockDetails body parameter + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.apigateway.models.Subscriber.lifecycle_state` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.apigateway.SubscribersClient.add_subscriber_lock` + + :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.add_subscriber_lock(subscriber_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] + subscriber_id = operation_result.data.id + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_subscriber(subscriber_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 change_subscriber_compartment_and_wait_for_state(self, subscriber_id, change_subscriber_compartment_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ Calls :py:func:`~oci.apigateway.SubscribersClient.change_subscriber_compartment` and waits for the :py:class:`~oci.apigateway.models.WorkRequest` @@ -153,6 +198,51 @@ def delete_subscriber_and_wait_for_state(self, subscriber_id, wait_for_states=[] except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def remove_subscriber_lock_and_wait_for_state(self, subscriber_id, remove_resource_lock_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.apigateway.SubscribersClient.remove_subscriber_lock` and waits for the :py:class:`~oci.apigateway.models.Subscriber` acted upon + to enter the given state(s). + + :param str subscriber_id: (required) + The ocid of the subscriber. + + :param oci.apigateway.models.RemoveResourceLockDetails remove_resource_lock_details: (required) + RemoveResourceLockDetails body parameter + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.apigateway.models.Subscriber.lifecycle_state` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.apigateway.SubscribersClient.remove_subscriber_lock` + + :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.remove_subscriber_lock(subscriber_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] + subscriber_id = operation_result.data.id + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_subscriber(subscriber_id), # noqa: F821 + evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except (NameError, TypeError) as e: + if not e.args: + e.args = ('',) + e.args = e.args + ('This composite operation is currently not supported in the SDK. Please use the operation from the service client and use waiters as an alternative. For more information on waiters, visit: "https://docs.oracle.com/en-us/iaas/tools/python/latest/api/waiters.html"', ) + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def update_subscriber_and_wait_for_state(self, subscriber_id, update_subscriber_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ Calls :py:func:`~oci.apigateway.SubscribersClient.update_subscriber` and waits for the :py:class:`~oci.apigateway.models.WorkRequest` diff --git a/src/oci/apigateway/usage_plans_client.py b/src/oci/apigateway/usage_plans_client.py index 8e30688e02..677f48294e 100644 --- a/src/oci/apigateway/usage_plans_client.py +++ b/src/oci/apigateway/usage_plans_client.py @@ -118,6 +118,115 @@ def __init__(self, config, **kwargs): self.retry_strategy = kwargs.get('retry_strategy') self.circuit_breaker_callback = kwargs.get('circuit_breaker_callback') + def add_usage_plan_lock(self, usage_plan_id, add_resource_lock_details, **kwargs): + """ + Adds a lock to a UsagePlan resource. + + + :param str usage_plan_id: (required) + The ocid of the usage plan. + + :param oci.apigateway.models.AddResourceLockDetails add_resource_lock_details: (required) + AddResourceLockDetails body parameter + + :param str opc_request_id: (optional) + Unique identifier for the request. + If you need to contact Oracle about a particular request, please provide the request ID. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + parameter to the value of the etag from a previous GET or POST response for that resource. The resource + will be updated or deleted only if the etag you provide matches the resource's current etag value. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.apigateway.models.UsagePlan` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use add_usage_plan_lock API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['usagePlanId'] + resource_path = "/usagePlans/{usagePlanId}/actions/addLock" + method = "POST" + operation_name = "add_usage_plan_lock" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/api-gateway/20190501/UsagePlan/AddUsagePlanLock" + + # 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"add_usage_plan_lock got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "usagePlanId": usage_plan_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: + 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=add_resource_lock_details, + response_type="UsagePlan", + 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=add_resource_lock_details, + response_type="UsagePlan", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + def change_usage_plan_compartment(self, usage_plan_id, change_usage_plan_compartment_details, **kwargs): """ Changes the usage plan compartment. @@ -146,6 +255,9 @@ def change_usage_plan_compartment(self, usage_plan_id, change_usage_plan_compart :param str opc_request_id: (optional) The client request id for tracing. + :param bool is_lock_override: (optional) + Whether to override locks (if any exist). + :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. @@ -177,7 +289,8 @@ def change_usage_plan_compartment(self, usage_plan_id, change_usage_plan_compart "retry_strategy", "opc_retry_token", "if_match", - "opc_request_id" + "opc_request_id", + "is_lock_override" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: @@ -194,6 +307,11 @@ def change_usage_plan_compartment(self, usage_plan_id, change_usage_plan_compart 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') + query_params = { + "isLockOverride": kwargs.get("is_lock_override", 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", @@ -218,6 +336,7 @@ def change_usage_plan_compartment(self, usage_plan_id, change_usage_plan_compart resource_path=resource_path, method=method, path_params=path_params, + query_params=query_params, header_params=header_params, body=change_usage_plan_compartment_details, allow_control_chars=kwargs.get('allow_control_chars'), @@ -229,6 +348,7 @@ def change_usage_plan_compartment(self, usage_plan_id, change_usage_plan_compart resource_path=resource_path, method=method, path_params=path_params, + query_params=query_params, header_params=header_params, body=change_usage_plan_compartment_details, allow_control_chars=kwargs.get('allow_control_chars'), @@ -352,6 +472,9 @@ def delete_usage_plan(self, usage_plan_id, **kwargs): :param str opc_request_id: (optional) The client request id for tracing. + :param bool is_lock_override: (optional) + Whether to override locks (if any exist). + :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. @@ -382,7 +505,8 @@ def delete_usage_plan(self, usage_plan_id, **kwargs): "allow_control_chars", "retry_strategy", "if_match", - "opc_request_id" + "opc_request_id", + "is_lock_override" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: @@ -399,6 +523,11 @@ def delete_usage_plan(self, usage_plan_id, **kwargs): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + query_params = { + "isLockOverride": kwargs.get("is_lock_override", 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", @@ -421,6 +550,7 @@ def delete_usage_plan(self, usage_plan_id, **kwargs): resource_path=resource_path, method=method, path_params=path_params, + query_params=query_params, header_params=header_params, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, @@ -431,6 +561,7 @@ def delete_usage_plan(self, usage_plan_id, **kwargs): resource_path=resource_path, method=method, path_params=path_params, + query_params=query_params, header_params=header_params, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, @@ -691,6 +822,115 @@ def list_usage_plans(self, compartment_id, **kwargs): api_reference_link=api_reference_link, required_arguments=required_arguments) + def remove_usage_plan_lock(self, usage_plan_id, remove_resource_lock_details, **kwargs): + """ + Removes a lock from a UsagePlan resource. + + + :param str usage_plan_id: (required) + The ocid of the usage plan. + + :param oci.apigateway.models.RemoveResourceLockDetails remove_resource_lock_details: (required) + RemoveResourceLockDetails body parameter + + :param str opc_request_id: (optional) + Unique identifier for the request. + If you need to contact Oracle about a particular request, please provide the request ID. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + parameter to the value of the etag from a previous GET or POST response for that resource. The resource + will be updated or deleted only if the etag you provide matches the resource's current etag value. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.apigateway.models.UsagePlan` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use remove_usage_plan_lock API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['usagePlanId'] + resource_path = "/usagePlans/{usagePlanId}/actions/removeLock" + method = "POST" + operation_name = "remove_usage_plan_lock" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/api-gateway/20190501/UsagePlan/RemoveUsagePlanLock" + + # 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"remove_usage_plan_lock got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "usagePlanId": usage_plan_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: + 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=remove_resource_lock_details, + response_type="UsagePlan", + 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=remove_resource_lock_details, + response_type="UsagePlan", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + def update_usage_plan(self, usage_plan_id, update_usage_plan_details, **kwargs): """ Updates the usage plan with the given identifier. @@ -712,6 +952,9 @@ def update_usage_plan(self, usage_plan_id, update_usage_plan_details, **kwargs): :param str opc_request_id: (optional) The client request id for tracing. + :param bool is_lock_override: (optional) + Whether to override locks (if any exist). + :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. @@ -742,7 +985,8 @@ def update_usage_plan(self, usage_plan_id, update_usage_plan_details, **kwargs): "allow_control_chars", "retry_strategy", "if_match", - "opc_request_id" + "opc_request_id", + "is_lock_override" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: @@ -759,6 +1003,11 @@ def update_usage_plan(self, usage_plan_id, update_usage_plan_details, **kwargs): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + query_params = { + "isLockOverride": kwargs.get("is_lock_override", 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", @@ -781,6 +1030,7 @@ def update_usage_plan(self, usage_plan_id, update_usage_plan_details, **kwargs): resource_path=resource_path, method=method, path_params=path_params, + query_params=query_params, header_params=header_params, body=update_usage_plan_details, allow_control_chars=kwargs.get('allow_control_chars'), @@ -792,6 +1042,7 @@ def update_usage_plan(self, usage_plan_id, update_usage_plan_details, **kwargs): resource_path=resource_path, method=method, path_params=path_params, + query_params=query_params, header_params=header_params, body=update_usage_plan_details, allow_control_chars=kwargs.get('allow_control_chars'), diff --git a/src/oci/apigateway/usage_plans_client_composite_operations.py b/src/oci/apigateway/usage_plans_client_composite_operations.py index b09180d4e5..5e63c7616e 100644 --- a/src/oci/apigateway/usage_plans_client_composite_operations.py +++ b/src/oci/apigateway/usage_plans_client_composite_operations.py @@ -25,6 +25,51 @@ def __init__(self, client, **kwargs): """ self.client = client + def add_usage_plan_lock_and_wait_for_state(self, usage_plan_id, add_resource_lock_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.apigateway.UsagePlansClient.add_usage_plan_lock` and waits for the :py:class:`~oci.apigateway.models.UsagePlan` acted upon + to enter the given state(s). + + :param str usage_plan_id: (required) + The ocid of the usage plan. + + :param oci.apigateway.models.AddResourceLockDetails add_resource_lock_details: (required) + AddResourceLockDetails body parameter + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.apigateway.models.UsagePlan.lifecycle_state` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.apigateway.UsagePlansClient.add_usage_plan_lock` + + :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.add_usage_plan_lock(usage_plan_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] + usage_plan_id = operation_result.data.id + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_usage_plan(usage_plan_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 change_usage_plan_compartment_and_wait_for_state(self, usage_plan_id, change_usage_plan_compartment_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ Calls :py:func:`~oci.apigateway.UsagePlansClient.change_usage_plan_compartment` and waits for the :py:class:`~oci.apigateway.models.WorkRequest` @@ -153,6 +198,51 @@ def delete_usage_plan_and_wait_for_state(self, usage_plan_id, wait_for_states=[] except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def remove_usage_plan_lock_and_wait_for_state(self, usage_plan_id, remove_resource_lock_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.apigateway.UsagePlansClient.remove_usage_plan_lock` and waits for the :py:class:`~oci.apigateway.models.UsagePlan` acted upon + to enter the given state(s). + + :param str usage_plan_id: (required) + The ocid of the usage plan. + + :param oci.apigateway.models.RemoveResourceLockDetails remove_resource_lock_details: (required) + RemoveResourceLockDetails body parameter + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.apigateway.models.UsagePlan.lifecycle_state` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.apigateway.UsagePlansClient.remove_usage_plan_lock` + + :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.remove_usage_plan_lock(usage_plan_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] + usage_plan_id = operation_result.data.id + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_usage_plan(usage_plan_id), # noqa: F821 + evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except (NameError, TypeError) as e: + if not e.args: + e.args = ('',) + e.args = e.args + ('This composite operation is currently not supported in the SDK. Please use the operation from the service client and use waiters as an alternative. For more information on waiters, visit: "https://docs.oracle.com/en-us/iaas/tools/python/latest/api/waiters.html"', ) + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def update_usage_plan_and_wait_for_state(self, usage_plan_id, update_usage_plan_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ Calls :py:func:`~oci.apigateway.UsagePlansClient.update_usage_plan` and waits for the :py:class:`~oci.apigateway.models.WorkRequest` diff --git a/src/oci/apm_config/config_client.py b/src/oci/apm_config/config_client.py index 89cb979a4e..860c59ad8e 100644 --- a/src/oci/apm_config/config_client.py +++ b/src/oci/apm_config/config_client.py @@ -683,6 +683,100 @@ def get_config(self, apm_domain_id, config_id, **kwargs): api_reference_link=api_reference_link, required_arguments=required_arguments) + def get_match_agents_with_attribute_key(self, apm_domain_id, **kwargs): + """ + The domain-wide agents matching attribute key. + + + :param str apm_domain_id: (required) + The APM Domain ID the request is intended for. + + :param str opc_request_id: (optional) + Unique identifier for the request. + If you need to contact Oracle about a particular request, please provide the request ID. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation 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.apm_config.models.MatchAgentsWithAttributeKey` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_match_agents_with_attribute_key API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['apmDomainId'] + resource_path = "/actions/matchAgentsWithAttributeKey" + method = "GET" + operation_name = "get_match_agents_with_attribute_key" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/apm-config/20210201/MatchAgentsWithAttributeKey/GetMatchAgentsWithAttributeKey" + + # 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_match_agents_with_attribute_key got unknown kwargs: {extra_kwargs!r}") + + query_params = { + "apmDomainId": apm_domain_id + } + 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="MatchAgentsWithAttributeKey", + 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="MatchAgentsWithAttributeKey", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + def import_configuration(self, import_configuration_details, apm_domain_id, **kwargs): """ Import configurations Item(s) with its dependencies into a destination domain. @@ -806,7 +900,7 @@ def list_configs(self, apm_domain_id, **kwargs): :param str config_type: (optional) A filter to match configuration items of a given type. - Supported values are SPAN_FILTER, METRIC_GROUP, and APDEX. + Supported values are SPAN_FILTER, METRIC_GROUP, APDEX, AGENT and MACS_APM_EXTENSION. :param str display_name: (optional) A filter to return resources that match the given display name. @@ -1403,6 +1497,105 @@ def update_config(self, apm_domain_id, config_id, update_config_details, **kwarg api_reference_link=api_reference_link, required_arguments=required_arguments) + def update_match_agents_with_attribute_key(self, apm_domain_id, update_match_agents_with_attribute_key_details, **kwargs): + """ + Updates the agent matching attribute key for the APM Domain. + + + :param str apm_domain_id: (required) + The APM Domain ID the request is intended for. + + :param oci.apm_config.models.UpdateMatchAgentsWithAttributeKeyDetails update_match_agents_with_attribute_key_details: (required) + The list of values to be updated. + + :param str opc_request_id: (optional) + Unique identifier for the request. + If you need to contact Oracle about a particular request, please provide the request ID. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation 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.apm_config.models.MatchAgentsWithAttributeKey` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use update_match_agents_with_attribute_key API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['apmDomainId'] + resource_path = "/actions/matchAgentsWithAttributeKey" + method = "PUT" + operation_name = "update_match_agents_with_attribute_key" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/apm-config/20210201/MatchAgentsWithAttributeKey/UpdateMatchAgentsWithAttributeKey" + + # 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"update_match_agents_with_attribute_key got unknown kwargs: {extra_kwargs!r}") + + query_params = { + "apmDomainId": apm_domain_id + } + 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, + body=update_match_agents_with_attribute_key_details, + response_type="MatchAgentsWithAttributeKey", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + body=update_match_agents_with_attribute_key_details, + response_type="MatchAgentsWithAttributeKey", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + def validate_span_filter_pattern(self, apm_domain_id, validate_span_filter_pattern_details, **kwargs): """ Validates the Span Filter pattern (filterText) for syntactic correctness. diff --git a/src/oci/apm_config/models/__init__.py b/src/oci/apm_config/models/__init__.py index fa440ba2dc..451b1e9343 100644 --- a/src/oci/apm_config/models/__init__.py +++ b/src/oci/apm_config/models/__init__.py @@ -6,6 +6,12 @@ from __future__ import absolute_import +from .agent_config import AgentConfig +from .agent_config_file import AgentConfigFile +from .agent_config_map import AgentConfigMap +from .agent_config_override import AgentConfigOverride +from .agent_config_overrides import AgentConfigOverrides +from .agent_config_summary import AgentConfigSummary from .apdex import Apdex from .apdex_rules import ApdexRules from .apdex_rules_summary import ApdexRulesSummary @@ -13,8 +19,10 @@ from .config_collection import ConfigCollection from .config_summary import ConfigSummary from .copy_configuration_details import CopyConfigurationDetails +from .create_agent_config_details import CreateAgentConfigDetails from .create_apdex_rules_details import CreateApdexRulesDetails from .create_config_details import CreateConfigDetails +from .create_macs_apm_extension_details import CreateMacsApmExtensionDetails from .create_metric_group_details import CreateMetricGroupDetails from .create_options_details import CreateOptionsDetails from .create_span_filter_details import CreateSpanFilterDetails @@ -30,6 +38,9 @@ from .import_configuration_details import ImportConfigurationDetails from .import_configuration_failed_item_summary import ImportConfigurationFailedItemSummary from .import_configuration_failed_items_collection import ImportConfigurationFailedItemsCollection +from .macs_apm_extension import MacsApmExtension +from .macs_apm_extension_summary import MacsApmExtensionSummary +from .match_agents_with_attribute_key import MatchAgentsWithAttributeKey from .metric import Metric from .metric_group import MetricGroup from .metric_group_summary import MetricGroupSummary @@ -47,8 +58,11 @@ from .test_output import TestOutput from .test_span_enrichment_details import TestSpanEnrichmentDetails from .test_span_enrichment_output import TestSpanEnrichmentOutput +from .update_agent_config_details import UpdateAgentConfigDetails from .update_apdex_rules_details import UpdateApdexRulesDetails from .update_config_details import UpdateConfigDetails +from .update_macs_apm_extension_details import UpdateMacsApmExtensionDetails +from .update_match_agents_with_attribute_key_details import UpdateMatchAgentsWithAttributeKeyDetails from .update_metric_group_details import UpdateMetricGroupDetails from .update_options_details import UpdateOptionsDetails from .update_span_filter_details import UpdateSpanFilterDetails @@ -56,6 +70,12 @@ # Maps type names to classes for apm_config services. apm_config_type_mapping = { + "AgentConfig": AgentConfig, + "AgentConfigFile": AgentConfigFile, + "AgentConfigMap": AgentConfigMap, + "AgentConfigOverride": AgentConfigOverride, + "AgentConfigOverrides": AgentConfigOverrides, + "AgentConfigSummary": AgentConfigSummary, "Apdex": Apdex, "ApdexRules": ApdexRules, "ApdexRulesSummary": ApdexRulesSummary, @@ -63,8 +83,10 @@ "ConfigCollection": ConfigCollection, "ConfigSummary": ConfigSummary, "CopyConfigurationDetails": CopyConfigurationDetails, + "CreateAgentConfigDetails": CreateAgentConfigDetails, "CreateApdexRulesDetails": CreateApdexRulesDetails, "CreateConfigDetails": CreateConfigDetails, + "CreateMacsApmExtensionDetails": CreateMacsApmExtensionDetails, "CreateMetricGroupDetails": CreateMetricGroupDetails, "CreateOptionsDetails": CreateOptionsDetails, "CreateSpanFilterDetails": CreateSpanFilterDetails, @@ -80,6 +102,9 @@ "ImportConfigurationDetails": ImportConfigurationDetails, "ImportConfigurationFailedItemSummary": ImportConfigurationFailedItemSummary, "ImportConfigurationFailedItemsCollection": ImportConfigurationFailedItemsCollection, + "MacsApmExtension": MacsApmExtension, + "MacsApmExtensionSummary": MacsApmExtensionSummary, + "MatchAgentsWithAttributeKey": MatchAgentsWithAttributeKey, "Metric": Metric, "MetricGroup": MetricGroup, "MetricGroupSummary": MetricGroupSummary, @@ -97,8 +122,11 @@ "TestOutput": TestOutput, "TestSpanEnrichmentDetails": TestSpanEnrichmentDetails, "TestSpanEnrichmentOutput": TestSpanEnrichmentOutput, + "UpdateAgentConfigDetails": UpdateAgentConfigDetails, "UpdateApdexRulesDetails": UpdateApdexRulesDetails, "UpdateConfigDetails": UpdateConfigDetails, + "UpdateMacsApmExtensionDetails": UpdateMacsApmExtensionDetails, + "UpdateMatchAgentsWithAttributeKeyDetails": UpdateMatchAgentsWithAttributeKeyDetails, "UpdateMetricGroupDetails": UpdateMetricGroupDetails, "UpdateOptionsDetails": UpdateOptionsDetails, "UpdateSpanFilterDetails": UpdateSpanFilterDetails, diff --git a/src/oci/apm_config/models/agent_config.py b/src/oci/apm_config/models/agent_config.py new file mode 100644 index 0000000000..8e4665e197 --- /dev/null +++ b/src/oci/apm_config/models/agent_config.py @@ -0,0 +1,229 @@ +# coding: utf-8 +# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20210201 + +from .config import Config +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 AgentConfig(Config): + """ + Agent configuration for any Agent complying with the OpAMP specification. + """ + + def __init__(self, **kwargs): + """ + Initializes a new AgentConfig object with values from keyword arguments. The default value of the :py:attr:`~oci.apm_config.models.AgentConfig.config_type` attribute + of this class is ``AGENT`` and it should not be changed. + 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 AgentConfig. + :type id: str + + :param config_type: + The value to assign to the config_type property of this AgentConfig. + Allowed values for this property are: "SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS", "AGENT", "MACS_APM_EXTENSION" + :type config_type: str + + :param time_created: + The value to assign to the time_created property of this AgentConfig. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this AgentConfig. + :type time_updated: datetime + + :param created_by: + The value to assign to the created_by property of this AgentConfig. + :type created_by: str + + :param updated_by: + The value to assign to the updated_by property of this AgentConfig. + :type updated_by: str + + :param etag: + The value to assign to the etag property of this AgentConfig. + :type etag: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this AgentConfig. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this AgentConfig. + :type defined_tags: dict(str, dict(str, object)) + + :param match_agents_with_attribute_key: + The value to assign to the match_agents_with_attribute_key property of this AgentConfig. + :type match_agents_with_attribute_key: list[str] + + :param match_agents_with_attribute_value: + The value to assign to the match_agents_with_attribute_value property of this AgentConfig. + :type match_agents_with_attribute_value: str + + :param config: + The value to assign to the config property of this AgentConfig. + :type config: oci.apm_config.models.AgentConfigMap + + :param overrides: + The value to assign to the overrides property of this AgentConfig. + :type overrides: oci.apm_config.models.AgentConfigOverrides + + """ + self.swagger_types = { + 'id': 'str', + 'config_type': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'created_by': 'str', + 'updated_by': 'str', + 'etag': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'match_agents_with_attribute_key': 'list[str]', + 'match_agents_with_attribute_value': 'str', + 'config': 'AgentConfigMap', + 'overrides': 'AgentConfigOverrides' + } + self.attribute_map = { + 'id': 'id', + 'config_type': 'configType', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'created_by': 'createdBy', + 'updated_by': 'updatedBy', + 'etag': 'etag', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'match_agents_with_attribute_key': 'matchAgentsWithAttributeKey', + 'match_agents_with_attribute_value': 'matchAgentsWithAttributeValue', + 'config': 'config', + 'overrides': 'overrides' + } + self._id = None + self._config_type = None + self._time_created = None + self._time_updated = None + self._created_by = None + self._updated_by = None + self._etag = None + self._freeform_tags = None + self._defined_tags = None + self._match_agents_with_attribute_key = None + self._match_agents_with_attribute_value = None + self._config = None + self._overrides = None + self._config_type = 'AGENT' + + @property + def match_agents_with_attribute_key(self): + """ + Gets the match_agents_with_attribute_key of this AgentConfig. + The agent attribute KEY by which an Agent configuration is matched to an agent. + All agent configuration objects share the same key. It is [ServiceName, service.name] by default. + The attribute VALUE corresponding to this KEY is in the matchAgentsWithAttributeValue field. + + + :return: The match_agents_with_attribute_key of this AgentConfig. + :rtype: list[str] + """ + return self._match_agents_with_attribute_key + + @match_agents_with_attribute_key.setter + def match_agents_with_attribute_key(self, match_agents_with_attribute_key): + """ + Sets the match_agents_with_attribute_key of this AgentConfig. + The agent attribute KEY by which an Agent configuration is matched to an agent. + All agent configuration objects share the same key. It is [ServiceName, service.name] by default. + The attribute VALUE corresponding to this KEY is in the matchAgentsWithAttributeValue field. + + + :param match_agents_with_attribute_key: The match_agents_with_attribute_key of this AgentConfig. + :type: list[str] + """ + self._match_agents_with_attribute_key = match_agents_with_attribute_key + + @property + def match_agents_with_attribute_value(self): + """ + Gets the match_agents_with_attribute_value of this AgentConfig. + The agent attribute VALUE by which an agent configuration is matched to an agent. + Each agent configuration object must specify a different value. + The attribute KEY corresponding to this VALUE is in the matchAgentsWithAttributeKey field. + + + :return: The match_agents_with_attribute_value of this AgentConfig. + :rtype: str + """ + return self._match_agents_with_attribute_value + + @match_agents_with_attribute_value.setter + def match_agents_with_attribute_value(self, match_agents_with_attribute_value): + """ + Sets the match_agents_with_attribute_value of this AgentConfig. + The agent attribute VALUE by which an agent configuration is matched to an agent. + Each agent configuration object must specify a different value. + The attribute KEY corresponding to this VALUE is in the matchAgentsWithAttributeKey field. + + + :param match_agents_with_attribute_value: The match_agents_with_attribute_value of this AgentConfig. + :type: str + """ + self._match_agents_with_attribute_value = match_agents_with_attribute_value + + @property + def config(self): + """ + Gets the config of this AgentConfig. + + :return: The config of this AgentConfig. + :rtype: oci.apm_config.models.AgentConfigMap + """ + return self._config + + @config.setter + def config(self, config): + """ + Sets the config of this AgentConfig. + + :param config: The config of this AgentConfig. + :type: oci.apm_config.models.AgentConfigMap + """ + self._config = config + + @property + def overrides(self): + """ + Gets the overrides of this AgentConfig. + + :return: The overrides of this AgentConfig. + :rtype: oci.apm_config.models.AgentConfigOverrides + """ + return self._overrides + + @overrides.setter + def overrides(self, overrides): + """ + Sets the overrides of this AgentConfig. + + :param overrides: The overrides of this AgentConfig. + :type: oci.apm_config.models.AgentConfigOverrides + """ + self._overrides = overrides + + 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/apm_config/models/agent_config_file.py b/src/oci/apm_config/models/agent_config_file.py new file mode 100644 index 0000000000..dae359f6c2 --- /dev/null +++ b/src/oci/apm_config/models/agent_config_file.py @@ -0,0 +1,101 @@ +# coding: utf-8 +# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20210201 + + +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 AgentConfigFile(object): + """ + An agent configuration file. + """ + + def __init__(self, **kwargs): + """ + Initializes a new AgentConfigFile object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param content_type: + The value to assign to the content_type property of this AgentConfigFile. + :type content_type: str + + :param body: + The value to assign to the body property of this AgentConfigFile. + :type body: str + + """ + self.swagger_types = { + 'content_type': 'str', + 'body': 'str' + } + self.attribute_map = { + 'content_type': 'contentType', + 'body': 'body' + } + self._content_type = None + self._body = None + + @property + def content_type(self): + """ + Gets the content_type of this AgentConfigFile. + The MIME Content-Type that describes the content of the body field, for example, text/yaml or text/yaml; charset=utf-8 + + + :return: The content_type of this AgentConfigFile. + :rtype: str + """ + return self._content_type + + @content_type.setter + def content_type(self, content_type): + """ + Sets the content_type of this AgentConfigFile. + The MIME Content-Type that describes the content of the body field, for example, text/yaml or text/yaml; charset=utf-8 + + + :param content_type: The content_type of this AgentConfigFile. + :type: str + """ + self._content_type = content_type + + @property + def body(self): + """ + Gets the body of this AgentConfigFile. + The Base64 encoded agent configuration file. + + + :return: The body of this AgentConfigFile. + :rtype: str + """ + return self._body + + @body.setter + def body(self, body): + """ + Sets the body of this AgentConfigFile. + The Base64 encoded agent configuration file. + + + :param body: The body of this AgentConfigFile. + :type: str + """ + self._body = body + + 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/apm_config/models/agent_config_map.py b/src/oci/apm_config/models/agent_config_map.py new file mode 100644 index 0000000000..4973438385 --- /dev/null +++ b/src/oci/apm_config/models/agent_config_map.py @@ -0,0 +1,81 @@ +# coding: utf-8 +# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20210201 + + +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 AgentConfigMap(object): + """ + Collection of agent configuration files. + For agents that use a single configuration file, this SHOULD contain a single entry and the key MAY be an empty string. + To apply a different configuration in a subset of the agents, put this block anywhere in the body of the configuration and edit and + {{ | default }} + Example: + com.oracle.apm.agent.tracer.enable.jfr = {{ isJfrEnabled | default false }} + Then, in the configuration's overrides, specify a different value for along with the desired agent filter. + Example: + \"agentFilter\": \"ApplicationType='Tomcat'\" + \"overrideMap\": { + \"isJfrEnabled\": true + } + """ + + def __init__(self, **kwargs): + """ + Initializes a new AgentConfigMap object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param config_map: + The value to assign to the config_map property of this AgentConfigMap. + :type config_map: dict(str, AgentConfigFile) + + """ + self.swagger_types = { + 'config_map': 'dict(str, AgentConfigFile)' + } + self.attribute_map = { + 'config_map': 'configMap' + } + self._config_map = None + + @property + def config_map(self): + """ + Gets the config_map of this AgentConfigMap. + Map of agent configuration files, where keys are file names. + + + :return: The config_map of this AgentConfigMap. + :rtype: dict(str, AgentConfigFile) + """ + return self._config_map + + @config_map.setter + def config_map(self, config_map): + """ + Sets the config_map of this AgentConfigMap. + Map of agent configuration files, where keys are file names. + + + :param config_map: The config_map of this AgentConfigMap. + :type: dict(str, AgentConfigFile) + """ + self._config_map = config_map + + 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/apm_config/models/agent_config_override.py b/src/oci/apm_config/models/agent_config_override.py new file mode 100644 index 0000000000..6fc7f08f79 --- /dev/null +++ b/src/oci/apm_config/models/agent_config_override.py @@ -0,0 +1,107 @@ +# coding: utf-8 +# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20210201 + + +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 AgentConfigOverride(object): + """ + Agent configuration overrides that should apply to a subset of the agents associated with an Agent Config object. + """ + + def __init__(self, **kwargs): + """ + Initializes a new AgentConfigOverride object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param agent_filter: + The value to assign to the agent_filter property of this AgentConfigOverride. + :type agent_filter: str + + :param override_map: + The value to assign to the override_map property of this AgentConfigOverride. + :type override_map: dict(str, str) + + """ + self.swagger_types = { + 'agent_filter': 'str', + 'override_map': 'dict(str, str)' + } + self.attribute_map = { + 'agent_filter': 'agentFilter', + 'override_map': 'overrideMap' + } + self._agent_filter = None + self._override_map = None + + @property + def agent_filter(self): + """ + Gets the agent_filter of this AgentConfigOverride. + The string that defines the Agent Filter expression. + + + :return: The agent_filter of this AgentConfigOverride. + :rtype: str + """ + return self._agent_filter + + @agent_filter.setter + def agent_filter(self, agent_filter): + """ + Sets the agent_filter of this AgentConfigOverride. + The string that defines the Agent Filter expression. + + + :param agent_filter: The agent_filter of this AgentConfigOverride. + :type: str + """ + self._agent_filter = agent_filter + + @property + def override_map(self): + """ + Gets the override_map of this AgentConfigOverride. + A map whose key is a substitution variable specified within the configuration's body. For example, if below was specified in the configuration's body + {{ isJfrEnabled | default false }} + Then a valid map key would be \"isJfrEnabled\". The value is typically different than the default specified in the configuration's body. + Thus, in this example, the map entry could be \"isJfrEnabled\": true + + + :return: The override_map of this AgentConfigOverride. + :rtype: dict(str, str) + """ + return self._override_map + + @override_map.setter + def override_map(self, override_map): + """ + Sets the override_map of this AgentConfigOverride. + A map whose key is a substitution variable specified within the configuration's body. For example, if below was specified in the configuration's body + {{ isJfrEnabled | default false }} + Then a valid map key would be \"isJfrEnabled\". The value is typically different than the default specified in the configuration's body. + Thus, in this example, the map entry could be \"isJfrEnabled\": true + + + :param override_map: The override_map of this AgentConfigOverride. + :type: dict(str, str) + """ + self._override_map = override_map + + 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/apm_config/models/agent_config_overrides.py b/src/oci/apm_config/models/agent_config_overrides.py new file mode 100644 index 0000000000..d860c5334c --- /dev/null +++ b/src/oci/apm_config/models/agent_config_overrides.py @@ -0,0 +1,66 @@ +# coding: utf-8 +# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20210201 + + +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 AgentConfigOverrides(object): + """ + Agent configuration overrides that should apply to a subset of the agents associated with an Agent Config object. + """ + + def __init__(self, **kwargs): + """ + Initializes a new AgentConfigOverrides object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param override_list: + The value to assign to the override_list property of this AgentConfigOverrides. + :type override_list: list[oci.apm_config.models.AgentConfigOverride] + + """ + self.swagger_types = { + 'override_list': 'list[AgentConfigOverride]' + } + self.attribute_map = { + 'override_list': 'overrideList' + } + self._override_list = None + + @property + def override_list(self): + """ + Gets the override_list of this AgentConfigOverrides. + + :return: The override_list of this AgentConfigOverrides. + :rtype: list[oci.apm_config.models.AgentConfigOverride] + """ + return self._override_list + + @override_list.setter + def override_list(self, override_list): + """ + Sets the override_list of this AgentConfigOverrides. + + :param override_list: The override_list of this AgentConfigOverrides. + :type: list[oci.apm_config.models.AgentConfigOverride] + """ + self._override_list = override_list + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/apm_config/models/agent_config_summary.py b/src/oci/apm_config/models/agent_config_summary.py new file mode 100644 index 0000000000..c896b565f5 --- /dev/null +++ b/src/oci/apm_config/models/agent_config_summary.py @@ -0,0 +1,236 @@ +# coding: utf-8 +# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20210201 + +from .config_summary import ConfigSummary +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 AgentConfigSummary(ConfigSummary): + """ + Agent configuration for any Agent complying with the OpAMP specification. + """ + + def __init__(self, **kwargs): + """ + Initializes a new AgentConfigSummary object with values from keyword arguments. The default value of the :py:attr:`~oci.apm_config.models.AgentConfigSummary.config_type` attribute + of this class is ``AGENT`` and it should not be changed. + 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 AgentConfigSummary. + :type id: str + + :param config_type: + The value to assign to the config_type property of this AgentConfigSummary. + Allowed values for this property are: "SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS", "AGENT", "MACS_APM_EXTENSION" + :type config_type: str + + :param time_created: + The value to assign to the time_created property of this AgentConfigSummary. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this AgentConfigSummary. + :type time_updated: datetime + + :param created_by: + The value to assign to the created_by property of this AgentConfigSummary. + :type created_by: str + + :param updated_by: + The value to assign to the updated_by property of this AgentConfigSummary. + :type updated_by: str + + :param etag: + The value to assign to the etag property of this AgentConfigSummary. + :type etag: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this AgentConfigSummary. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this AgentConfigSummary. + :type defined_tags: dict(str, dict(str, object)) + + :param system_tags: + The value to assign to the system_tags property of this AgentConfigSummary. + :type system_tags: dict(str, dict(str, object)) + + :param match_agents_with_attribute_key: + The value to assign to the match_agents_with_attribute_key property of this AgentConfigSummary. + :type match_agents_with_attribute_key: list[str] + + :param match_agents_with_attribute_value: + The value to assign to the match_agents_with_attribute_value property of this AgentConfigSummary. + :type match_agents_with_attribute_value: str + + :param config: + The value to assign to the config property of this AgentConfigSummary. + :type config: oci.apm_config.models.AgentConfigMap + + :param overrides: + The value to assign to the overrides property of this AgentConfigSummary. + :type overrides: oci.apm_config.models.AgentConfigOverrides + + """ + self.swagger_types = { + 'id': 'str', + 'config_type': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'created_by': 'str', + 'updated_by': 'str', + 'etag': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))', + 'match_agents_with_attribute_key': 'list[str]', + 'match_agents_with_attribute_value': 'str', + 'config': 'AgentConfigMap', + 'overrides': 'AgentConfigOverrides' + } + self.attribute_map = { + 'id': 'id', + 'config_type': 'configType', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'created_by': 'createdBy', + 'updated_by': 'updatedBy', + 'etag': 'etag', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags', + 'match_agents_with_attribute_key': 'matchAgentsWithAttributeKey', + 'match_agents_with_attribute_value': 'matchAgentsWithAttributeValue', + 'config': 'config', + 'overrides': 'overrides' + } + self._id = None + self._config_type = None + self._time_created = None + self._time_updated = None + self._created_by = None + self._updated_by = None + self._etag = None + self._freeform_tags = None + self._defined_tags = None + self._system_tags = None + self._match_agents_with_attribute_key = None + self._match_agents_with_attribute_value = None + self._config = None + self._overrides = None + self._config_type = 'AGENT' + + @property + def match_agents_with_attribute_key(self): + """ + Gets the match_agents_with_attribute_key of this AgentConfigSummary. + The agent attribute KEY by which an Agent configuration is matched to an agent. + All agent configuration objects share the same key. It is [ServiceName, service.name] by default. + The attribute VALUE corresponding to this KEY is in the matchAgentsWithAttributeValue field. + + + :return: The match_agents_with_attribute_key of this AgentConfigSummary. + :rtype: list[str] + """ + return self._match_agents_with_attribute_key + + @match_agents_with_attribute_key.setter + def match_agents_with_attribute_key(self, match_agents_with_attribute_key): + """ + Sets the match_agents_with_attribute_key of this AgentConfigSummary. + The agent attribute KEY by which an Agent configuration is matched to an agent. + All agent configuration objects share the same key. It is [ServiceName, service.name] by default. + The attribute VALUE corresponding to this KEY is in the matchAgentsWithAttributeValue field. + + + :param match_agents_with_attribute_key: The match_agents_with_attribute_key of this AgentConfigSummary. + :type: list[str] + """ + self._match_agents_with_attribute_key = match_agents_with_attribute_key + + @property + def match_agents_with_attribute_value(self): + """ + Gets the match_agents_with_attribute_value of this AgentConfigSummary. + The agent attribute VALUE by which an agent configuration is matched to an agent. + Each agent configuration object must specify a different value. + The attribute KEY corresponding to this VALUE is in the matchAgentsWithAttributeKey field. + + + :return: The match_agents_with_attribute_value of this AgentConfigSummary. + :rtype: str + """ + return self._match_agents_with_attribute_value + + @match_agents_with_attribute_value.setter + def match_agents_with_attribute_value(self, match_agents_with_attribute_value): + """ + Sets the match_agents_with_attribute_value of this AgentConfigSummary. + The agent attribute VALUE by which an agent configuration is matched to an agent. + Each agent configuration object must specify a different value. + The attribute KEY corresponding to this VALUE is in the matchAgentsWithAttributeKey field. + + + :param match_agents_with_attribute_value: The match_agents_with_attribute_value of this AgentConfigSummary. + :type: str + """ + self._match_agents_with_attribute_value = match_agents_with_attribute_value + + @property + def config(self): + """ + Gets the config of this AgentConfigSummary. + + :return: The config of this AgentConfigSummary. + :rtype: oci.apm_config.models.AgentConfigMap + """ + return self._config + + @config.setter + def config(self, config): + """ + Sets the config of this AgentConfigSummary. + + :param config: The config of this AgentConfigSummary. + :type: oci.apm_config.models.AgentConfigMap + """ + self._config = config + + @property + def overrides(self): + """ + Gets the overrides of this AgentConfigSummary. + + :return: The overrides of this AgentConfigSummary. + :rtype: oci.apm_config.models.AgentConfigOverrides + """ + return self._overrides + + @overrides.setter + def overrides(self, overrides): + """ + Sets the overrides of this AgentConfigSummary. + + :param overrides: The overrides of this AgentConfigSummary. + :type: oci.apm_config.models.AgentConfigOverrides + """ + self._overrides = overrides + + 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/apm_config/models/apdex_rules.py b/src/oci/apm_config/models/apdex_rules.py index 80f5a52b9c..81f41253ac 100644 --- a/src/oci/apm_config/models/apdex_rules.py +++ b/src/oci/apm_config/models/apdex_rules.py @@ -28,7 +28,7 @@ def __init__(self, **kwargs): :param config_type: The value to assign to the config_type property of this ApdexRules. - Allowed values for this property are: "SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS" + Allowed values for this property are: "SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS", "AGENT", "MACS_APM_EXTENSION" :type config_type: str :param time_created: diff --git a/src/oci/apm_config/models/apdex_rules_summary.py b/src/oci/apm_config/models/apdex_rules_summary.py index b9b9efcc33..e6b96e584c 100644 --- a/src/oci/apm_config/models/apdex_rules_summary.py +++ b/src/oci/apm_config/models/apdex_rules_summary.py @@ -27,7 +27,7 @@ def __init__(self, **kwargs): :param config_type: The value to assign to the config_type property of this ApdexRulesSummary. - Allowed values for this property are: "SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS" + Allowed values for this property are: "SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS", "AGENT", "MACS_APM_EXTENSION" :type config_type: str :param time_created: diff --git a/src/oci/apm_config/models/config.py b/src/oci/apm_config/models/config.py index d35a979c12..dc195a82e2 100644 --- a/src/oci/apm_config/models/config.py +++ b/src/oci/apm_config/models/config.py @@ -32,12 +32,22 @@ class Config(object): #: This constant has a value of "OPTIONS" CONFIG_TYPE_OPTIONS = "OPTIONS" + #: A constant which can be used with the config_type property of a Config. + #: This constant has a value of "AGENT" + CONFIG_TYPE_AGENT = "AGENT" + + #: A constant which can be used with the config_type property of a Config. + #: This constant has a value of "MACS_APM_EXTENSION" + CONFIG_TYPE_MACS_APM_EXTENSION = "MACS_APM_EXTENSION" + def __init__(self, **kwargs): """ Initializes a new Config 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.apm_config.models.AgentConfig` * :class:`~oci.apm_config.models.Options` + * :class:`~oci.apm_config.models.MacsApmExtension` * :class:`~oci.apm_config.models.MetricGroup` * :class:`~oci.apm_config.models.ApdexRules` * :class:`~oci.apm_config.models.SpanFilter` @@ -50,7 +60,7 @@ def __init__(self, **kwargs): :param config_type: The value to assign to the config_type property of this Config. - Allowed values for this property are: "SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS", "AGENT", "MACS_APM_EXTENSION", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type config_type: str @@ -123,9 +133,15 @@ def get_subtype(object_dictionary): """ type = object_dictionary['configType'] + if type == 'AGENT': + return 'AgentConfig' + if type == 'OPTIONS': return 'Options' + if type == 'MACS_APM_EXTENSION': + return 'MacsApmExtension' + if type == 'METRIC_GROUP': return 'MetricGroup' @@ -173,7 +189,7 @@ def config_type(self): **[Required]** Gets the config_type of this Config. The type of configuration item. - Allowed values for this property are: "SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS", "AGENT", "MACS_APM_EXTENSION", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -192,7 +208,7 @@ def config_type(self, config_type): :param config_type: The config_type of this Config. :type: str """ - allowed_values = ["SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS"] + allowed_values = ["SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS", "AGENT", "MACS_APM_EXTENSION"] if not value_allowed_none_or_none_sentinel(config_type, allowed_values): config_type = 'UNKNOWN_ENUM_VALUE' self._config_type = config_type diff --git a/src/oci/apm_config/models/config_summary.py b/src/oci/apm_config/models/config_summary.py index 7242490e62..7fa49d11d9 100644 --- a/src/oci/apm_config/models/config_summary.py +++ b/src/oci/apm_config/models/config_summary.py @@ -31,13 +31,23 @@ class ConfigSummary(object): #: This constant has a value of "OPTIONS" CONFIG_TYPE_OPTIONS = "OPTIONS" + #: A constant which can be used with the config_type property of a ConfigSummary. + #: This constant has a value of "AGENT" + CONFIG_TYPE_AGENT = "AGENT" + + #: A constant which can be used with the config_type property of a ConfigSummary. + #: This constant has a value of "MACS_APM_EXTENSION" + CONFIG_TYPE_MACS_APM_EXTENSION = "MACS_APM_EXTENSION" + def __init__(self, **kwargs): """ Initializes a new ConfigSummary 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.apm_config.models.MacsApmExtensionSummary` * :class:`~oci.apm_config.models.MetricGroupSummary` * :class:`~oci.apm_config.models.ApdexRulesSummary` + * :class:`~oci.apm_config.models.AgentConfigSummary` * :class:`~oci.apm_config.models.SpanFilterSummary` * :class:`~oci.apm_config.models.OptionsSummary` @@ -49,7 +59,7 @@ def __init__(self, **kwargs): :param config_type: The value to assign to the config_type property of this ConfigSummary. - Allowed values for this property are: "SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS", "AGENT", "MACS_APM_EXTENSION", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type config_type: str @@ -129,12 +139,18 @@ def get_subtype(object_dictionary): """ type = object_dictionary['configType'] + if type == 'MACS_APM_EXTENSION': + return 'MacsApmExtensionSummary' + if type == 'METRIC_GROUP': return 'MetricGroupSummary' if type == 'APDEX': return 'ApdexRulesSummary' + if type == 'AGENT': + return 'AgentConfigSummary' + if type == 'SPAN_FILTER': return 'SpanFilterSummary' @@ -179,7 +195,7 @@ def config_type(self): **[Required]** Gets the config_type of this ConfigSummary. The type of configuration item. - Allowed values for this property are: "SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS", "AGENT", "MACS_APM_EXTENSION", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -198,7 +214,7 @@ def config_type(self, config_type): :param config_type: The config_type of this ConfigSummary. :type: str """ - allowed_values = ["SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS"] + allowed_values = ["SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS", "AGENT", "MACS_APM_EXTENSION"] if not value_allowed_none_or_none_sentinel(config_type, allowed_values): config_type = 'UNKNOWN_ENUM_VALUE' self._config_type = config_type diff --git a/src/oci/apm_config/models/create_agent_config_details.py b/src/oci/apm_config/models/create_agent_config_details.py new file mode 100644 index 0000000000..1452ed62d4 --- /dev/null +++ b/src/oci/apm_config/models/create_agent_config_details.py @@ -0,0 +1,152 @@ +# coding: utf-8 +# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20210201 + +from .create_config_details import CreateConfigDetails +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 CreateAgentConfigDetails(CreateConfigDetails): + """ + Agent configuration for any Agent complying with the OpAMP specification. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CreateAgentConfigDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.apm_config.models.CreateAgentConfigDetails.config_type` attribute + of this class is ``AGENT`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param config_type: + The value to assign to the config_type property of this CreateAgentConfigDetails. + Allowed values for this property are: "SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS", "AGENT", "MACS_APM_EXTENSION" + :type config_type: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this CreateAgentConfigDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this CreateAgentConfigDetails. + :type defined_tags: dict(str, dict(str, object)) + + :param match_agents_with_attribute_value: + The value to assign to the match_agents_with_attribute_value property of this CreateAgentConfigDetails. + :type match_agents_with_attribute_value: str + + :param config: + The value to assign to the config property of this CreateAgentConfigDetails. + :type config: oci.apm_config.models.AgentConfigMap + + :param overrides: + The value to assign to the overrides property of this CreateAgentConfigDetails. + :type overrides: oci.apm_config.models.AgentConfigOverrides + + """ + self.swagger_types = { + 'config_type': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'match_agents_with_attribute_value': 'str', + 'config': 'AgentConfigMap', + 'overrides': 'AgentConfigOverrides' + } + self.attribute_map = { + 'config_type': 'configType', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'match_agents_with_attribute_value': 'matchAgentsWithAttributeValue', + 'config': 'config', + 'overrides': 'overrides' + } + self._config_type = None + self._freeform_tags = None + self._defined_tags = None + self._match_agents_with_attribute_value = None + self._config = None + self._overrides = None + self._config_type = 'AGENT' + + @property + def match_agents_with_attribute_value(self): + """ + **[Required]** Gets the match_agents_with_attribute_value of this CreateAgentConfigDetails. + The agent attribute VALUE by which an agent configuration is matched to an agent. + Each agent configuration object must specify a different value. + The attribute KEY corresponding to this VALUE is in the matchAgentsWithAttributeKey field. + + + :return: The match_agents_with_attribute_value of this CreateAgentConfigDetails. + :rtype: str + """ + return self._match_agents_with_attribute_value + + @match_agents_with_attribute_value.setter + def match_agents_with_attribute_value(self, match_agents_with_attribute_value): + """ + Sets the match_agents_with_attribute_value of this CreateAgentConfigDetails. + The agent attribute VALUE by which an agent configuration is matched to an agent. + Each agent configuration object must specify a different value. + The attribute KEY corresponding to this VALUE is in the matchAgentsWithAttributeKey field. + + + :param match_agents_with_attribute_value: The match_agents_with_attribute_value of this CreateAgentConfigDetails. + :type: str + """ + self._match_agents_with_attribute_value = match_agents_with_attribute_value + + @property + def config(self): + """ + Gets the config of this CreateAgentConfigDetails. + + :return: The config of this CreateAgentConfigDetails. + :rtype: oci.apm_config.models.AgentConfigMap + """ + return self._config + + @config.setter + def config(self, config): + """ + Sets the config of this CreateAgentConfigDetails. + + :param config: The config of this CreateAgentConfigDetails. + :type: oci.apm_config.models.AgentConfigMap + """ + self._config = config + + @property + def overrides(self): + """ + Gets the overrides of this CreateAgentConfigDetails. + + :return: The overrides of this CreateAgentConfigDetails. + :rtype: oci.apm_config.models.AgentConfigOverrides + """ + return self._overrides + + @overrides.setter + def overrides(self, overrides): + """ + Sets the overrides of this CreateAgentConfigDetails. + + :param overrides: The overrides of this CreateAgentConfigDetails. + :type: oci.apm_config.models.AgentConfigOverrides + """ + self._overrides = overrides + + 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/apm_config/models/create_apdex_rules_details.py b/src/oci/apm_config/models/create_apdex_rules_details.py index 6e38a42df2..c77491c82b 100644 --- a/src/oci/apm_config/models/create_apdex_rules_details.py +++ b/src/oci/apm_config/models/create_apdex_rules_details.py @@ -24,7 +24,7 @@ def __init__(self, **kwargs): :param config_type: The value to assign to the config_type property of this CreateApdexRulesDetails. - Allowed values for this property are: "SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS" + Allowed values for this property are: "SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS", "AGENT", "MACS_APM_EXTENSION" :type config_type: str :param freeform_tags: diff --git a/src/oci/apm_config/models/create_config_details.py b/src/oci/apm_config/models/create_config_details.py index 44938c0075..3ad848cf63 100644 --- a/src/oci/apm_config/models/create_config_details.py +++ b/src/oci/apm_config/models/create_config_details.py @@ -32,6 +32,14 @@ class CreateConfigDetails(object): #: This constant has a value of "OPTIONS" CONFIG_TYPE_OPTIONS = "OPTIONS" + #: A constant which can be used with the config_type property of a CreateConfigDetails. + #: This constant has a value of "AGENT" + CONFIG_TYPE_AGENT = "AGENT" + + #: A constant which can be used with the config_type property of a CreateConfigDetails. + #: This constant has a value of "MACS_APM_EXTENSION" + CONFIG_TYPE_MACS_APM_EXTENSION = "MACS_APM_EXTENSION" + def __init__(self, **kwargs): """ Initializes a new CreateConfigDetails object with values from keyword arguments. This class has the following subclasses and if you are using this class as input @@ -39,14 +47,16 @@ def __init__(self, **kwargs): * :class:`~oci.apm_config.models.CreateSpanFilterDetails` * :class:`~oci.apm_config.models.CreateMetricGroupDetails` + * :class:`~oci.apm_config.models.CreateAgentConfigDetails` * :class:`~oci.apm_config.models.CreateOptionsDetails` + * :class:`~oci.apm_config.models.CreateMacsApmExtensionDetails` * :class:`~oci.apm_config.models.CreateApdexRulesDetails` The following keyword arguments are supported (corresponding to the getters/setters of this class): :param config_type: The value to assign to the config_type property of this CreateConfigDetails. - Allowed values for this property are: "SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS" + Allowed values for this property are: "SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS", "AGENT", "MACS_APM_EXTENSION" :type config_type: str :param freeform_tags: @@ -86,9 +96,15 @@ def get_subtype(object_dictionary): if type == 'METRIC_GROUP': return 'CreateMetricGroupDetails' + if type == 'AGENT': + return 'CreateAgentConfigDetails' + if type == 'OPTIONS': return 'CreateOptionsDetails' + if type == 'MACS_APM_EXTENSION': + return 'CreateMacsApmExtensionDetails' + if type == 'APDEX': return 'CreateApdexRulesDetails' else: @@ -100,7 +116,7 @@ def config_type(self): **[Required]** Gets the config_type of this CreateConfigDetails. The type of configuration item. - Allowed values for this property are: "SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS" + Allowed values for this property are: "SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS", "AGENT", "MACS_APM_EXTENSION" :return: The config_type of this CreateConfigDetails. @@ -118,7 +134,7 @@ def config_type(self, config_type): :param config_type: The config_type of this CreateConfigDetails. :type: str """ - allowed_values = ["SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS"] + allowed_values = ["SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS", "AGENT", "MACS_APM_EXTENSION"] if not value_allowed_none_or_none_sentinel(config_type, allowed_values): raise ValueError( f"Invalid value for `config_type`, must be None or one of {allowed_values}" diff --git a/src/oci/apm_config/models/create_macs_apm_extension_details.py b/src/oci/apm_config/models/create_macs_apm_extension_details.py new file mode 100644 index 0000000000..c04c4efb0c --- /dev/null +++ b/src/oci/apm_config/models/create_macs_apm_extension_details.py @@ -0,0 +1,286 @@ +# coding: utf-8 +# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20210201 + +from .create_config_details import CreateConfigDetails +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 CreateMacsApmExtensionDetails(CreateConfigDetails): + """ + An object that represents APM Agent provisioning via a Management Agent. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CreateMacsApmExtensionDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.apm_config.models.CreateMacsApmExtensionDetails.config_type` attribute + of this class is ``MACS_APM_EXTENSION`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param config_type: + The value to assign to the config_type property of this CreateMacsApmExtensionDetails. + Allowed values for this property are: "SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS", "AGENT", "MACS_APM_EXTENSION" + :type config_type: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this CreateMacsApmExtensionDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this CreateMacsApmExtensionDetails. + :type defined_tags: dict(str, dict(str, object)) + + :param display_name: + The value to assign to the display_name property of this CreateMacsApmExtensionDetails. + :type display_name: str + + :param management_agent_id: + The value to assign to the management_agent_id property of this CreateMacsApmExtensionDetails. + :type management_agent_id: str + + :param process_filter: + The value to assign to the process_filter property of this CreateMacsApmExtensionDetails. + :type process_filter: list[str] + + :param run_as_user: + The value to assign to the run_as_user property of this CreateMacsApmExtensionDetails. + :type run_as_user: str + + :param service_name: + The value to assign to the service_name property of this CreateMacsApmExtensionDetails. + :type service_name: str + + :param agent_version: + The value to assign to the agent_version property of this CreateMacsApmExtensionDetails. + :type agent_version: str + + :param attach_install_dir: + The value to assign to the attach_install_dir property of this CreateMacsApmExtensionDetails. + :type attach_install_dir: str + + """ + self.swagger_types = { + 'config_type': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'display_name': 'str', + 'management_agent_id': 'str', + 'process_filter': 'list[str]', + 'run_as_user': 'str', + 'service_name': 'str', + 'agent_version': 'str', + 'attach_install_dir': 'str' + } + self.attribute_map = { + 'config_type': 'configType', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'display_name': 'displayName', + 'management_agent_id': 'managementAgentId', + 'process_filter': 'processFilter', + 'run_as_user': 'runAsUser', + 'service_name': 'serviceName', + 'agent_version': 'agentVersion', + 'attach_install_dir': 'attachInstallDir' + } + self._config_type = None + self._freeform_tags = None + self._defined_tags = None + self._display_name = None + self._management_agent_id = None + self._process_filter = None + self._run_as_user = None + self._service_name = None + self._agent_version = None + self._attach_install_dir = None + self._config_type = 'MACS_APM_EXTENSION' + + @property + def display_name(self): + """ + Gets the display_name of this CreateMacsApmExtensionDetails. + The name by which a configuration entity is displayed to the end user. + + + :return: The display_name of this CreateMacsApmExtensionDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this CreateMacsApmExtensionDetails. + The name by which a configuration entity is displayed to the end user. + + + :param display_name: The display_name of this CreateMacsApmExtensionDetails. + :type: str + """ + self._display_name = display_name + + @property + def management_agent_id(self): + """ + **[Required]** Gets the management_agent_id of this CreateMacsApmExtensionDetails. + The `OCID`__ of the Management Agent that will provision the APM Agent. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :return: The management_agent_id of this CreateMacsApmExtensionDetails. + :rtype: str + """ + return self._management_agent_id + + @management_agent_id.setter + def management_agent_id(self, management_agent_id): + """ + Sets the management_agent_id of this CreateMacsApmExtensionDetails. + The `OCID`__ of the Management Agent that will provision the APM Agent. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :param management_agent_id: The management_agent_id of this CreateMacsApmExtensionDetails. + :type: str + """ + self._management_agent_id = management_agent_id + + @property + def process_filter(self): + """ + **[Required]** Gets the process_filter of this CreateMacsApmExtensionDetails. + Filter patterns used to discover active Java processes for provisioning the APM Agent. + + + :return: The process_filter of this CreateMacsApmExtensionDetails. + :rtype: list[str] + """ + return self._process_filter + + @process_filter.setter + def process_filter(self, process_filter): + """ + Sets the process_filter of this CreateMacsApmExtensionDetails. + Filter patterns used to discover active Java processes for provisioning the APM Agent. + + + :param process_filter: The process_filter of this CreateMacsApmExtensionDetails. + :type: list[str] + """ + self._process_filter = process_filter + + @property + def run_as_user(self): + """ + **[Required]** Gets the run_as_user of this CreateMacsApmExtensionDetails. + The OS user that should be used to discover Java processes. + + + :return: The run_as_user of this CreateMacsApmExtensionDetails. + :rtype: str + """ + return self._run_as_user + + @run_as_user.setter + def run_as_user(self, run_as_user): + """ + Sets the run_as_user of this CreateMacsApmExtensionDetails. + The OS user that should be used to discover Java processes. + + + :param run_as_user: The run_as_user of this CreateMacsApmExtensionDetails. + :type: str + """ + self._run_as_user = run_as_user + + @property + def service_name(self): + """ + **[Required]** Gets the service_name of this CreateMacsApmExtensionDetails. + The name of the service being monitored. This argument enables you to filter by + service and view traces and other signals in the APM Explorer user interface. + + + :return: The service_name of this CreateMacsApmExtensionDetails. + :rtype: str + """ + return self._service_name + + @service_name.setter + def service_name(self, service_name): + """ + Sets the service_name of this CreateMacsApmExtensionDetails. + The name of the service being monitored. This argument enables you to filter by + service and view traces and other signals in the APM Explorer user interface. + + + :param service_name: The service_name of this CreateMacsApmExtensionDetails. + :type: str + """ + self._service_name = service_name + + @property + def agent_version(self): + """ + **[Required]** Gets the agent_version of this CreateMacsApmExtensionDetails. + The version of the referenced agent bundle. + + + :return: The agent_version of this CreateMacsApmExtensionDetails. + :rtype: str + """ + return self._agent_version + + @agent_version.setter + def agent_version(self, agent_version): + """ + Sets the agent_version of this CreateMacsApmExtensionDetails. + The version of the referenced agent bundle. + + + :param agent_version: The agent_version of this CreateMacsApmExtensionDetails. + :type: str + """ + self._agent_version = agent_version + + @property + def attach_install_dir(self): + """ + **[Required]** Gets the attach_install_dir of this CreateMacsApmExtensionDetails. + The directory owned by runAsUser. + + + :return: The attach_install_dir of this CreateMacsApmExtensionDetails. + :rtype: str + """ + return self._attach_install_dir + + @attach_install_dir.setter + def attach_install_dir(self, attach_install_dir): + """ + Sets the attach_install_dir of this CreateMacsApmExtensionDetails. + The directory owned by runAsUser. + + + :param attach_install_dir: The attach_install_dir of this CreateMacsApmExtensionDetails. + :type: str + """ + self._attach_install_dir = attach_install_dir + + 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/apm_config/models/create_metric_group_details.py b/src/oci/apm_config/models/create_metric_group_details.py index 7355ec1a93..f5bf656aae 100644 --- a/src/oci/apm_config/models/create_metric_group_details.py +++ b/src/oci/apm_config/models/create_metric_group_details.py @@ -24,7 +24,7 @@ def __init__(self, **kwargs): :param config_type: The value to assign to the config_type property of this CreateMetricGroupDetails. - Allowed values for this property are: "SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS" + Allowed values for this property are: "SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS", "AGENT", "MACS_APM_EXTENSION" :type config_type: str :param freeform_tags: diff --git a/src/oci/apm_config/models/create_options_details.py b/src/oci/apm_config/models/create_options_details.py index 9d7506eca8..b2d26b656b 100644 --- a/src/oci/apm_config/models/create_options_details.py +++ b/src/oci/apm_config/models/create_options_details.py @@ -23,7 +23,7 @@ def __init__(self, **kwargs): :param config_type: The value to assign to the config_type property of this CreateOptionsDetails. - Allowed values for this property are: "SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS" + Allowed values for this property are: "SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS", "AGENT", "MACS_APM_EXTENSION" :type config_type: str :param freeform_tags: diff --git a/src/oci/apm_config/models/create_span_filter_details.py b/src/oci/apm_config/models/create_span_filter_details.py index 7b8ce41efe..ce3b42d885 100644 --- a/src/oci/apm_config/models/create_span_filter_details.py +++ b/src/oci/apm_config/models/create_span_filter_details.py @@ -23,7 +23,7 @@ def __init__(self, **kwargs): :param config_type: The value to assign to the config_type property of this CreateSpanFilterDetails. - Allowed values for this property are: "SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS" + Allowed values for this property are: "SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS", "AGENT", "MACS_APM_EXTENSION" :type config_type: str :param freeform_tags: diff --git a/src/oci/apm_config/models/export_import_apdex_rules_summary.py b/src/oci/apm_config/models/export_import_apdex_rules_summary.py index 2ee442113d..5228837e4e 100644 --- a/src/oci/apm_config/models/export_import_apdex_rules_summary.py +++ b/src/oci/apm_config/models/export_import_apdex_rules_summary.py @@ -27,7 +27,7 @@ def __init__(self, **kwargs): :param config_type: The value to assign to the config_type property of this ExportImportApdexRulesSummary. - Allowed values for this property are: "SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS" + Allowed values for this property are: "SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS", "AGENT", "MACS_APM_EXTENSION" :type config_type: str :param freeform_tags: diff --git a/src/oci/apm_config/models/export_import_config_summary.py b/src/oci/apm_config/models/export_import_config_summary.py index 03b6e7b486..c47bce6c05 100644 --- a/src/oci/apm_config/models/export_import_config_summary.py +++ b/src/oci/apm_config/models/export_import_config_summary.py @@ -31,6 +31,14 @@ class ExportImportConfigSummary(object): #: This constant has a value of "OPTIONS" CONFIG_TYPE_OPTIONS = "OPTIONS" + #: A constant which can be used with the config_type property of a ExportImportConfigSummary. + #: This constant has a value of "AGENT" + CONFIG_TYPE_AGENT = "AGENT" + + #: A constant which can be used with the config_type property of a ExportImportConfigSummary. + #: This constant has a value of "MACS_APM_EXTENSION" + CONFIG_TYPE_MACS_APM_EXTENSION = "MACS_APM_EXTENSION" + def __init__(self, **kwargs): """ Initializes a new ExportImportConfigSummary object with values from keyword arguments. This class has the following subclasses and if you are using this class as input @@ -49,7 +57,7 @@ def __init__(self, **kwargs): :param config_type: The value to assign to the config_type property of this ExportImportConfigSummary. - Allowed values for this property are: "SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS", "AGENT", "MACS_APM_EXTENSION", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type config_type: str @@ -137,7 +145,7 @@ def config_type(self): **[Required]** Gets the config_type of this ExportImportConfigSummary. The type of configuration item. - Allowed values for this property are: "SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS", "AGENT", "MACS_APM_EXTENSION", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -156,7 +164,7 @@ def config_type(self, config_type): :param config_type: The config_type of this ExportImportConfigSummary. :type: str """ - allowed_values = ["SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS"] + allowed_values = ["SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS", "AGENT", "MACS_APM_EXTENSION"] if not value_allowed_none_or_none_sentinel(config_type, allowed_values): config_type = 'UNKNOWN_ENUM_VALUE' self._config_type = config_type diff --git a/src/oci/apm_config/models/export_import_metric_group_summary.py b/src/oci/apm_config/models/export_import_metric_group_summary.py index 20b403af89..8f52bd31c5 100644 --- a/src/oci/apm_config/models/export_import_metric_group_summary.py +++ b/src/oci/apm_config/models/export_import_metric_group_summary.py @@ -28,7 +28,7 @@ def __init__(self, **kwargs): :param config_type: The value to assign to the config_type property of this ExportImportMetricGroupSummary. - Allowed values for this property are: "SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS" + Allowed values for this property are: "SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS", "AGENT", "MACS_APM_EXTENSION" :type config_type: str :param freeform_tags: diff --git a/src/oci/apm_config/models/export_import_options_summary.py b/src/oci/apm_config/models/export_import_options_summary.py index 5ca121b717..2577575eaf 100644 --- a/src/oci/apm_config/models/export_import_options_summary.py +++ b/src/oci/apm_config/models/export_import_options_summary.py @@ -27,7 +27,7 @@ def __init__(self, **kwargs): :param config_type: The value to assign to the config_type property of this ExportImportOptionsSummary. - Allowed values for this property are: "SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS" + Allowed values for this property are: "SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS", "AGENT", "MACS_APM_EXTENSION" :type config_type: str :param freeform_tags: diff --git a/src/oci/apm_config/models/export_import_span_filter_summary.py b/src/oci/apm_config/models/export_import_span_filter_summary.py index 1cd5bd2890..b1e1d9a097 100644 --- a/src/oci/apm_config/models/export_import_span_filter_summary.py +++ b/src/oci/apm_config/models/export_import_span_filter_summary.py @@ -27,7 +27,7 @@ def __init__(self, **kwargs): :param config_type: The value to assign to the config_type property of this ExportImportSpanFilterSummary. - Allowed values for this property are: "SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS" + Allowed values for this property are: "SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS", "AGENT", "MACS_APM_EXTENSION" :type config_type: str :param freeform_tags: diff --git a/src/oci/apm_config/models/import_configuration_failed_item_summary.py b/src/oci/apm_config/models/import_configuration_failed_item_summary.py index 5fecc9a25c..c27557e0d6 100644 --- a/src/oci/apm_config/models/import_configuration_failed_item_summary.py +++ b/src/oci/apm_config/models/import_configuration_failed_item_summary.py @@ -31,6 +31,14 @@ class ImportConfigurationFailedItemSummary(object): #: This constant has a value of "OPTIONS" CONFIG_TYPE_OPTIONS = "OPTIONS" + #: A constant which can be used with the config_type property of a ImportConfigurationFailedItemSummary. + #: This constant has a value of "AGENT" + CONFIG_TYPE_AGENT = "AGENT" + + #: A constant which can be used with the config_type property of a ImportConfigurationFailedItemSummary. + #: This constant has a value of "MACS_APM_EXTENSION" + CONFIG_TYPE_MACS_APM_EXTENSION = "MACS_APM_EXTENSION" + def __init__(self, **kwargs): """ Initializes a new ImportConfigurationFailedItemSummary object with values from keyword arguments. @@ -50,7 +58,7 @@ def __init__(self, **kwargs): :param config_type: The value to assign to the config_type property of this ImportConfigurationFailedItemSummary. - Allowed values for this property are: "SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS", "AGENT", "MACS_APM_EXTENSION", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type config_type: str @@ -156,7 +164,7 @@ def config_type(self): Gets the config_type of this ImportConfigurationFailedItemSummary. The type of configuration item. - Allowed values for this property are: "SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS", "AGENT", "MACS_APM_EXTENSION", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -175,7 +183,7 @@ def config_type(self, config_type): :param config_type: The config_type of this ImportConfigurationFailedItemSummary. :type: str """ - allowed_values = ["SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS"] + allowed_values = ["SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS", "AGENT", "MACS_APM_EXTENSION"] if not value_allowed_none_or_none_sentinel(config_type, allowed_values): config_type = 'UNKNOWN_ENUM_VALUE' self._config_type = config_type diff --git a/src/oci/apm_config/models/macs_apm_extension.py b/src/oci/apm_config/models/macs_apm_extension.py new file mode 100644 index 0000000000..df5004bc36 --- /dev/null +++ b/src/oci/apm_config/models/macs_apm_extension.py @@ -0,0 +1,328 @@ +# coding: utf-8 +# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20210201 + +from .config import Config +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 MacsApmExtension(Config): + """ + An object that represents APM Agent provisioning via a Management Agent. + """ + + def __init__(self, **kwargs): + """ + Initializes a new MacsApmExtension object with values from keyword arguments. The default value of the :py:attr:`~oci.apm_config.models.MacsApmExtension.config_type` attribute + of this class is ``MACS_APM_EXTENSION`` and it should not be changed. + 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 MacsApmExtension. + :type id: str + + :param config_type: + The value to assign to the config_type property of this MacsApmExtension. + Allowed values for this property are: "SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS", "AGENT", "MACS_APM_EXTENSION" + :type config_type: str + + :param time_created: + The value to assign to the time_created property of this MacsApmExtension. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this MacsApmExtension. + :type time_updated: datetime + + :param created_by: + The value to assign to the created_by property of this MacsApmExtension. + :type created_by: str + + :param updated_by: + The value to assign to the updated_by property of this MacsApmExtension. + :type updated_by: str + + :param etag: + The value to assign to the etag property of this MacsApmExtension. + :type etag: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this MacsApmExtension. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this MacsApmExtension. + :type defined_tags: dict(str, dict(str, object)) + + :param display_name: + The value to assign to the display_name property of this MacsApmExtension. + :type display_name: str + + :param management_agent_id: + The value to assign to the management_agent_id property of this MacsApmExtension. + :type management_agent_id: str + + :param process_filter: + The value to assign to the process_filter property of this MacsApmExtension. + :type process_filter: list[str] + + :param run_as_user: + The value to assign to the run_as_user property of this MacsApmExtension. + :type run_as_user: str + + :param service_name: + The value to assign to the service_name property of this MacsApmExtension. + :type service_name: str + + :param agent_version: + The value to assign to the agent_version property of this MacsApmExtension. + :type agent_version: str + + :param attach_install_dir: + The value to assign to the attach_install_dir property of this MacsApmExtension. + :type attach_install_dir: str + + """ + self.swagger_types = { + 'id': 'str', + 'config_type': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'created_by': 'str', + 'updated_by': 'str', + 'etag': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'display_name': 'str', + 'management_agent_id': 'str', + 'process_filter': 'list[str]', + 'run_as_user': 'str', + 'service_name': 'str', + 'agent_version': 'str', + 'attach_install_dir': 'str' + } + self.attribute_map = { + 'id': 'id', + 'config_type': 'configType', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'created_by': 'createdBy', + 'updated_by': 'updatedBy', + 'etag': 'etag', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'display_name': 'displayName', + 'management_agent_id': 'managementAgentId', + 'process_filter': 'processFilter', + 'run_as_user': 'runAsUser', + 'service_name': 'serviceName', + 'agent_version': 'agentVersion', + 'attach_install_dir': 'attachInstallDir' + } + self._id = None + self._config_type = None + self._time_created = None + self._time_updated = None + self._created_by = None + self._updated_by = None + self._etag = None + self._freeform_tags = None + self._defined_tags = None + self._display_name = None + self._management_agent_id = None + self._process_filter = None + self._run_as_user = None + self._service_name = None + self._agent_version = None + self._attach_install_dir = None + self._config_type = 'MACS_APM_EXTENSION' + + @property + def display_name(self): + """ + Gets the display_name of this MacsApmExtension. + The name by which a configuration entity is displayed to the end user. + + + :return: The display_name of this MacsApmExtension. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this MacsApmExtension. + The name by which a configuration entity is displayed to the end user. + + + :param display_name: The display_name of this MacsApmExtension. + :type: str + """ + self._display_name = display_name + + @property + def management_agent_id(self): + """ + Gets the management_agent_id of this MacsApmExtension. + The `OCID`__ of the Management Agent that will provision the APM Agent. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :return: The management_agent_id of this MacsApmExtension. + :rtype: str + """ + return self._management_agent_id + + @management_agent_id.setter + def management_agent_id(self, management_agent_id): + """ + Sets the management_agent_id of this MacsApmExtension. + The `OCID`__ of the Management Agent that will provision the APM Agent. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :param management_agent_id: The management_agent_id of this MacsApmExtension. + :type: str + """ + self._management_agent_id = management_agent_id + + @property + def process_filter(self): + """ + Gets the process_filter of this MacsApmExtension. + Filter patterns used to discover active Java processes for provisioning the APM Agent. + + + :return: The process_filter of this MacsApmExtension. + :rtype: list[str] + """ + return self._process_filter + + @process_filter.setter + def process_filter(self, process_filter): + """ + Sets the process_filter of this MacsApmExtension. + Filter patterns used to discover active Java processes for provisioning the APM Agent. + + + :param process_filter: The process_filter of this MacsApmExtension. + :type: list[str] + """ + self._process_filter = process_filter + + @property + def run_as_user(self): + """ + Gets the run_as_user of this MacsApmExtension. + The OS user that should be used to discover Java processes. + + + :return: The run_as_user of this MacsApmExtension. + :rtype: str + """ + return self._run_as_user + + @run_as_user.setter + def run_as_user(self, run_as_user): + """ + Sets the run_as_user of this MacsApmExtension. + The OS user that should be used to discover Java processes. + + + :param run_as_user: The run_as_user of this MacsApmExtension. + :type: str + """ + self._run_as_user = run_as_user + + @property + def service_name(self): + """ + Gets the service_name of this MacsApmExtension. + The name of the service being monitored. This argument enables you to filter by + service and view traces and other signals in the APM Explorer user interface. + + + :return: The service_name of this MacsApmExtension. + :rtype: str + """ + return self._service_name + + @service_name.setter + def service_name(self, service_name): + """ + Sets the service_name of this MacsApmExtension. + The name of the service being monitored. This argument enables you to filter by + service and view traces and other signals in the APM Explorer user interface. + + + :param service_name: The service_name of this MacsApmExtension. + :type: str + """ + self._service_name = service_name + + @property + def agent_version(self): + """ + Gets the agent_version of this MacsApmExtension. + The version of the referenced agent bundle. + + + :return: The agent_version of this MacsApmExtension. + :rtype: str + """ + return self._agent_version + + @agent_version.setter + def agent_version(self, agent_version): + """ + Sets the agent_version of this MacsApmExtension. + The version of the referenced agent bundle. + + + :param agent_version: The agent_version of this MacsApmExtension. + :type: str + """ + self._agent_version = agent_version + + @property + def attach_install_dir(self): + """ + Gets the attach_install_dir of this MacsApmExtension. + The directory owned by runAsUser. + + + :return: The attach_install_dir of this MacsApmExtension. + :rtype: str + """ + return self._attach_install_dir + + @attach_install_dir.setter + def attach_install_dir(self, attach_install_dir): + """ + Sets the attach_install_dir of this MacsApmExtension. + The directory owned by runAsUser. + + + :param attach_install_dir: The attach_install_dir of this MacsApmExtension. + :type: str + """ + self._attach_install_dir = attach_install_dir + + 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/apm_config/models/macs_apm_extension_summary.py b/src/oci/apm_config/models/macs_apm_extension_summary.py new file mode 100644 index 0000000000..166ce44985 --- /dev/null +++ b/src/oci/apm_config/models/macs_apm_extension_summary.py @@ -0,0 +1,335 @@ +# coding: utf-8 +# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20210201 + +from .config_summary import ConfigSummary +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 MacsApmExtensionSummary(ConfigSummary): + """ + An object that represents APM Agent provisioning via a Management Agent. + """ + + def __init__(self, **kwargs): + """ + Initializes a new MacsApmExtensionSummary object with values from keyword arguments. The default value of the :py:attr:`~oci.apm_config.models.MacsApmExtensionSummary.config_type` attribute + of this class is ``MACS_APM_EXTENSION`` and it should not be changed. + 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 MacsApmExtensionSummary. + :type id: str + + :param config_type: + The value to assign to the config_type property of this MacsApmExtensionSummary. + Allowed values for this property are: "SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS", "AGENT", "MACS_APM_EXTENSION" + :type config_type: str + + :param time_created: + The value to assign to the time_created property of this MacsApmExtensionSummary. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this MacsApmExtensionSummary. + :type time_updated: datetime + + :param created_by: + The value to assign to the created_by property of this MacsApmExtensionSummary. + :type created_by: str + + :param updated_by: + The value to assign to the updated_by property of this MacsApmExtensionSummary. + :type updated_by: str + + :param etag: + The value to assign to the etag property of this MacsApmExtensionSummary. + :type etag: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this MacsApmExtensionSummary. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this MacsApmExtensionSummary. + :type defined_tags: dict(str, dict(str, object)) + + :param system_tags: + The value to assign to the system_tags property of this MacsApmExtensionSummary. + :type system_tags: dict(str, dict(str, object)) + + :param display_name: + The value to assign to the display_name property of this MacsApmExtensionSummary. + :type display_name: str + + :param management_agent_id: + The value to assign to the management_agent_id property of this MacsApmExtensionSummary. + :type management_agent_id: str + + :param process_filter: + The value to assign to the process_filter property of this MacsApmExtensionSummary. + :type process_filter: list[str] + + :param run_as_user: + The value to assign to the run_as_user property of this MacsApmExtensionSummary. + :type run_as_user: str + + :param service_name: + The value to assign to the service_name property of this MacsApmExtensionSummary. + :type service_name: str + + :param agent_version: + The value to assign to the agent_version property of this MacsApmExtensionSummary. + :type agent_version: str + + :param attach_install_dir: + The value to assign to the attach_install_dir property of this MacsApmExtensionSummary. + :type attach_install_dir: str + + """ + self.swagger_types = { + 'id': 'str', + 'config_type': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'created_by': 'str', + 'updated_by': 'str', + 'etag': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))', + 'display_name': 'str', + 'management_agent_id': 'str', + 'process_filter': 'list[str]', + 'run_as_user': 'str', + 'service_name': 'str', + 'agent_version': 'str', + 'attach_install_dir': 'str' + } + self.attribute_map = { + 'id': 'id', + 'config_type': 'configType', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'created_by': 'createdBy', + 'updated_by': 'updatedBy', + 'etag': 'etag', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags', + 'display_name': 'displayName', + 'management_agent_id': 'managementAgentId', + 'process_filter': 'processFilter', + 'run_as_user': 'runAsUser', + 'service_name': 'serviceName', + 'agent_version': 'agentVersion', + 'attach_install_dir': 'attachInstallDir' + } + self._id = None + self._config_type = None + self._time_created = None + self._time_updated = None + self._created_by = None + self._updated_by = None + self._etag = None + self._freeform_tags = None + self._defined_tags = None + self._system_tags = None + self._display_name = None + self._management_agent_id = None + self._process_filter = None + self._run_as_user = None + self._service_name = None + self._agent_version = None + self._attach_install_dir = None + self._config_type = 'MACS_APM_EXTENSION' + + @property + def display_name(self): + """ + Gets the display_name of this MacsApmExtensionSummary. + The name by which a configuration entity is displayed to the end user. + + + :return: The display_name of this MacsApmExtensionSummary. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this MacsApmExtensionSummary. + The name by which a configuration entity is displayed to the end user. + + + :param display_name: The display_name of this MacsApmExtensionSummary. + :type: str + """ + self._display_name = display_name + + @property + def management_agent_id(self): + """ + Gets the management_agent_id of this MacsApmExtensionSummary. + The `OCID`__ of the Management Agent that will provision the APM Agent. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :return: The management_agent_id of this MacsApmExtensionSummary. + :rtype: str + """ + return self._management_agent_id + + @management_agent_id.setter + def management_agent_id(self, management_agent_id): + """ + Sets the management_agent_id of this MacsApmExtensionSummary. + The `OCID`__ of the Management Agent that will provision the APM Agent. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :param management_agent_id: The management_agent_id of this MacsApmExtensionSummary. + :type: str + """ + self._management_agent_id = management_agent_id + + @property + def process_filter(self): + """ + Gets the process_filter of this MacsApmExtensionSummary. + Filter patterns used to discover active Java processes for provisioning the APM Agent. + + + :return: The process_filter of this MacsApmExtensionSummary. + :rtype: list[str] + """ + return self._process_filter + + @process_filter.setter + def process_filter(self, process_filter): + """ + Sets the process_filter of this MacsApmExtensionSummary. + Filter patterns used to discover active Java processes for provisioning the APM Agent. + + + :param process_filter: The process_filter of this MacsApmExtensionSummary. + :type: list[str] + """ + self._process_filter = process_filter + + @property + def run_as_user(self): + """ + Gets the run_as_user of this MacsApmExtensionSummary. + The OS user that should be used to discover Java processes. + + + :return: The run_as_user of this MacsApmExtensionSummary. + :rtype: str + """ + return self._run_as_user + + @run_as_user.setter + def run_as_user(self, run_as_user): + """ + Sets the run_as_user of this MacsApmExtensionSummary. + The OS user that should be used to discover Java processes. + + + :param run_as_user: The run_as_user of this MacsApmExtensionSummary. + :type: str + """ + self._run_as_user = run_as_user + + @property + def service_name(self): + """ + Gets the service_name of this MacsApmExtensionSummary. + The name of the service being monitored. This argument enables you to filter by + service and view traces and other signals in the APM Explorer user interface. + + + :return: The service_name of this MacsApmExtensionSummary. + :rtype: str + """ + return self._service_name + + @service_name.setter + def service_name(self, service_name): + """ + Sets the service_name of this MacsApmExtensionSummary. + The name of the service being monitored. This argument enables you to filter by + service and view traces and other signals in the APM Explorer user interface. + + + :param service_name: The service_name of this MacsApmExtensionSummary. + :type: str + """ + self._service_name = service_name + + @property + def agent_version(self): + """ + Gets the agent_version of this MacsApmExtensionSummary. + The version of the referenced agent bundle. + + + :return: The agent_version of this MacsApmExtensionSummary. + :rtype: str + """ + return self._agent_version + + @agent_version.setter + def agent_version(self, agent_version): + """ + Sets the agent_version of this MacsApmExtensionSummary. + The version of the referenced agent bundle. + + + :param agent_version: The agent_version of this MacsApmExtensionSummary. + :type: str + """ + self._agent_version = agent_version + + @property + def attach_install_dir(self): + """ + Gets the attach_install_dir of this MacsApmExtensionSummary. + The directory owned by runAsUser. + + + :return: The attach_install_dir of this MacsApmExtensionSummary. + :rtype: str + """ + return self._attach_install_dir + + @attach_install_dir.setter + def attach_install_dir(self, attach_install_dir): + """ + Sets the attach_install_dir of this MacsApmExtensionSummary. + The directory owned by runAsUser. + + + :param attach_install_dir: The attach_install_dir of this MacsApmExtensionSummary. + :type: str + """ + self._attach_install_dir = attach_install_dir + + 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/apm_config/models/match_agents_with_attribute_key.py b/src/oci/apm_config/models/match_agents_with_attribute_key.py new file mode 100644 index 0000000000..ec451c51d4 --- /dev/null +++ b/src/oci/apm_config/models/match_agents_with_attribute_key.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20210201 + + +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 MatchAgentsWithAttributeKey(object): + """ + The object representing the agent matching attribute keys. + """ + + def __init__(self, **kwargs): + """ + Initializes a new MatchAgentsWithAttributeKey object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param agent_attribute_keys: + The value to assign to the agent_attribute_keys property of this MatchAgentsWithAttributeKey. + :type agent_attribute_keys: list[str] + + """ + self.swagger_types = { + 'agent_attribute_keys': 'list[str]' + } + self.attribute_map = { + 'agent_attribute_keys': 'agentAttributeKeys' + } + self._agent_attribute_keys = None + + @property + def agent_attribute_keys(self): + """ + **[Required]** Gets the agent_attribute_keys of this MatchAgentsWithAttributeKey. + The list of agent matching attribute keys to be updated. + + + :return: The agent_attribute_keys of this MatchAgentsWithAttributeKey. + :rtype: list[str] + """ + return self._agent_attribute_keys + + @agent_attribute_keys.setter + def agent_attribute_keys(self, agent_attribute_keys): + """ + Sets the agent_attribute_keys of this MatchAgentsWithAttributeKey. + The list of agent matching attribute keys to be updated. + + + :param agent_attribute_keys: The agent_attribute_keys of this MatchAgentsWithAttributeKey. + :type: list[str] + """ + self._agent_attribute_keys = agent_attribute_keys + + 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/apm_config/models/metric_group.py b/src/oci/apm_config/models/metric_group.py index 39c1865f64..425368f831 100644 --- a/src/oci/apm_config/models/metric_group.py +++ b/src/oci/apm_config/models/metric_group.py @@ -28,7 +28,7 @@ def __init__(self, **kwargs): :param config_type: The value to assign to the config_type property of this MetricGroup. - Allowed values for this property are: "SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS" + Allowed values for this property are: "SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS", "AGENT", "MACS_APM_EXTENSION" :type config_type: str :param time_created: diff --git a/src/oci/apm_config/models/metric_group_summary.py b/src/oci/apm_config/models/metric_group_summary.py index f05644f9c7..2b87d8651b 100644 --- a/src/oci/apm_config/models/metric_group_summary.py +++ b/src/oci/apm_config/models/metric_group_summary.py @@ -28,7 +28,7 @@ def __init__(self, **kwargs): :param config_type: The value to assign to the config_type property of this MetricGroupSummary. - Allowed values for this property are: "SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS" + Allowed values for this property are: "SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS", "AGENT", "MACS_APM_EXTENSION" :type config_type: str :param time_created: diff --git a/src/oci/apm_config/models/options.py b/src/oci/apm_config/models/options.py index cef0fe90e3..63c20df4be 100644 --- a/src/oci/apm_config/models/options.py +++ b/src/oci/apm_config/models/options.py @@ -27,7 +27,7 @@ def __init__(self, **kwargs): :param config_type: The value to assign to the config_type property of this Options. - Allowed values for this property are: "SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS" + Allowed values for this property are: "SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS", "AGENT", "MACS_APM_EXTENSION" :type config_type: str :param time_created: diff --git a/src/oci/apm_config/models/options_summary.py b/src/oci/apm_config/models/options_summary.py index a324b9151b..10ced83cb8 100644 --- a/src/oci/apm_config/models/options_summary.py +++ b/src/oci/apm_config/models/options_summary.py @@ -27,7 +27,7 @@ def __init__(self, **kwargs): :param config_type: The value to assign to the config_type property of this OptionsSummary. - Allowed values for this property are: "SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS" + Allowed values for this property are: "SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS", "AGENT", "MACS_APM_EXTENSION" :type config_type: str :param time_created: diff --git a/src/oci/apm_config/models/span_filter.py b/src/oci/apm_config/models/span_filter.py index 18d34cb048..26564278dc 100644 --- a/src/oci/apm_config/models/span_filter.py +++ b/src/oci/apm_config/models/span_filter.py @@ -27,7 +27,7 @@ def __init__(self, **kwargs): :param config_type: The value to assign to the config_type property of this SpanFilter. - Allowed values for this property are: "SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS" + Allowed values for this property are: "SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS", "AGENT", "MACS_APM_EXTENSION" :type config_type: str :param time_created: diff --git a/src/oci/apm_config/models/span_filter_reference.py b/src/oci/apm_config/models/span_filter_reference.py index 0c4688aa93..19ff7f114e 100644 --- a/src/oci/apm_config/models/span_filter_reference.py +++ b/src/oci/apm_config/models/span_filter_reference.py @@ -31,6 +31,14 @@ class SpanFilterReference(object): #: This constant has a value of "OPTIONS" CONFIG_TYPE_OPTIONS = "OPTIONS" + #: A constant which can be used with the config_type property of a SpanFilterReference. + #: This constant has a value of "AGENT" + CONFIG_TYPE_AGENT = "AGENT" + + #: A constant which can be used with the config_type property of a SpanFilterReference. + #: This constant has a value of "MACS_APM_EXTENSION" + CONFIG_TYPE_MACS_APM_EXTENSION = "MACS_APM_EXTENSION" + def __init__(self, **kwargs): """ Initializes a new SpanFilterReference object with values from keyword arguments. @@ -42,7 +50,7 @@ def __init__(self, **kwargs): :param config_type: The value to assign to the config_type property of this SpanFilterReference. - Allowed values for this property are: "SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS", "AGENT", "MACS_APM_EXTENSION", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type config_type: str @@ -108,7 +116,7 @@ def config_type(self): Gets the config_type of this SpanFilterReference. The type of configuration item. - Allowed values for this property are: "SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS", "AGENT", "MACS_APM_EXTENSION", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -127,7 +135,7 @@ def config_type(self, config_type): :param config_type: The config_type of this SpanFilterReference. :type: str """ - allowed_values = ["SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS"] + allowed_values = ["SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS", "AGENT", "MACS_APM_EXTENSION"] if not value_allowed_none_or_none_sentinel(config_type, allowed_values): config_type = 'UNKNOWN_ENUM_VALUE' self._config_type = config_type diff --git a/src/oci/apm_config/models/span_filter_summary.py b/src/oci/apm_config/models/span_filter_summary.py index c73098477a..15da7fe527 100644 --- a/src/oci/apm_config/models/span_filter_summary.py +++ b/src/oci/apm_config/models/span_filter_summary.py @@ -27,7 +27,7 @@ def __init__(self, **kwargs): :param config_type: The value to assign to the config_type property of this SpanFilterSummary. - Allowed values for this property are: "SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS" + Allowed values for this property are: "SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS", "AGENT", "MACS_APM_EXTENSION" :type config_type: str :param time_created: diff --git a/src/oci/apm_config/models/update_agent_config_details.py b/src/oci/apm_config/models/update_agent_config_details.py new file mode 100644 index 0000000000..9f5d5a2320 --- /dev/null +++ b/src/oci/apm_config/models/update_agent_config_details.py @@ -0,0 +1,117 @@ +# coding: utf-8 +# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20210201 + +from .update_config_details import UpdateConfigDetails +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 UpdateAgentConfigDetails(UpdateConfigDetails): + """ + Agent configuration for any Agent complying with the OpAMP specification. + """ + + def __init__(self, **kwargs): + """ + Initializes a new UpdateAgentConfigDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.apm_config.models.UpdateAgentConfigDetails.config_type` attribute + of this class is ``AGENT`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param config_type: + The value to assign to the config_type property of this UpdateAgentConfigDetails. + Allowed values for this property are: "SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS", "AGENT", "MACS_APM_EXTENSION" + :type config_type: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this UpdateAgentConfigDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this UpdateAgentConfigDetails. + :type defined_tags: dict(str, dict(str, object)) + + :param config: + The value to assign to the config property of this UpdateAgentConfigDetails. + :type config: oci.apm_config.models.AgentConfigMap + + :param overrides: + The value to assign to the overrides property of this UpdateAgentConfigDetails. + :type overrides: oci.apm_config.models.AgentConfigOverrides + + """ + self.swagger_types = { + 'config_type': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'config': 'AgentConfigMap', + 'overrides': 'AgentConfigOverrides' + } + self.attribute_map = { + 'config_type': 'configType', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'config': 'config', + 'overrides': 'overrides' + } + self._config_type = None + self._freeform_tags = None + self._defined_tags = None + self._config = None + self._overrides = None + self._config_type = 'AGENT' + + @property + def config(self): + """ + Gets the config of this UpdateAgentConfigDetails. + + :return: The config of this UpdateAgentConfigDetails. + :rtype: oci.apm_config.models.AgentConfigMap + """ + return self._config + + @config.setter + def config(self, config): + """ + Sets the config of this UpdateAgentConfigDetails. + + :param config: The config of this UpdateAgentConfigDetails. + :type: oci.apm_config.models.AgentConfigMap + """ + self._config = config + + @property + def overrides(self): + """ + Gets the overrides of this UpdateAgentConfigDetails. + + :return: The overrides of this UpdateAgentConfigDetails. + :rtype: oci.apm_config.models.AgentConfigOverrides + """ + return self._overrides + + @overrides.setter + def overrides(self, overrides): + """ + Sets the overrides of this UpdateAgentConfigDetails. + + :param overrides: The overrides of this UpdateAgentConfigDetails. + :type: oci.apm_config.models.AgentConfigOverrides + """ + self._overrides = overrides + + 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/apm_config/models/update_apdex_rules_details.py b/src/oci/apm_config/models/update_apdex_rules_details.py index b46dea46d4..9bbc5a72a8 100644 --- a/src/oci/apm_config/models/update_apdex_rules_details.py +++ b/src/oci/apm_config/models/update_apdex_rules_details.py @@ -23,7 +23,7 @@ def __init__(self, **kwargs): :param config_type: The value to assign to the config_type property of this UpdateApdexRulesDetails. - Allowed values for this property are: "SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS" + Allowed values for this property are: "SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS", "AGENT", "MACS_APM_EXTENSION" :type config_type: str :param freeform_tags: diff --git a/src/oci/apm_config/models/update_config_details.py b/src/oci/apm_config/models/update_config_details.py index 27c2526126..d9852d24dc 100644 --- a/src/oci/apm_config/models/update_config_details.py +++ b/src/oci/apm_config/models/update_config_details.py @@ -31,12 +31,22 @@ class UpdateConfigDetails(object): #: This constant has a value of "OPTIONS" CONFIG_TYPE_OPTIONS = "OPTIONS" + #: A constant which can be used with the config_type property of a UpdateConfigDetails. + #: This constant has a value of "AGENT" + CONFIG_TYPE_AGENT = "AGENT" + + #: A constant which can be used with the config_type property of a UpdateConfigDetails. + #: This constant has a value of "MACS_APM_EXTENSION" + CONFIG_TYPE_MACS_APM_EXTENSION = "MACS_APM_EXTENSION" + def __init__(self, **kwargs): """ Initializes a new UpdateConfigDetails 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.apm_config.models.UpdateMetricGroupDetails` + * :class:`~oci.apm_config.models.UpdateAgentConfigDetails` + * :class:`~oci.apm_config.models.UpdateMacsApmExtensionDetails` * :class:`~oci.apm_config.models.UpdateApdexRulesDetails` * :class:`~oci.apm_config.models.UpdateSpanFilterDetails` * :class:`~oci.apm_config.models.UpdateOptionsDetails` @@ -45,7 +55,7 @@ def __init__(self, **kwargs): :param config_type: The value to assign to the config_type property of this UpdateConfigDetails. - Allowed values for this property are: "SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS" + Allowed values for this property are: "SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS", "AGENT", "MACS_APM_EXTENSION" :type config_type: str :param freeform_tags: @@ -82,6 +92,12 @@ def get_subtype(object_dictionary): if type == 'METRIC_GROUP': return 'UpdateMetricGroupDetails' + if type == 'AGENT': + return 'UpdateAgentConfigDetails' + + if type == 'MACS_APM_EXTENSION': + return 'UpdateMacsApmExtensionDetails' + if type == 'APDEX': return 'UpdateApdexRulesDetails' @@ -99,7 +115,7 @@ def config_type(self): **[Required]** Gets the config_type of this UpdateConfigDetails. The type of configuration item. - Allowed values for this property are: "SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS" + Allowed values for this property are: "SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS", "AGENT", "MACS_APM_EXTENSION" :return: The config_type of this UpdateConfigDetails. @@ -117,7 +133,7 @@ def config_type(self, config_type): :param config_type: The config_type of this UpdateConfigDetails. :type: str """ - allowed_values = ["SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS"] + allowed_values = ["SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS", "AGENT", "MACS_APM_EXTENSION"] if not value_allowed_none_or_none_sentinel(config_type, allowed_values): raise ValueError( f"Invalid value for `config_type`, must be None or one of {allowed_values}" diff --git a/src/oci/apm_config/models/update_macs_apm_extension_details.py b/src/oci/apm_config/models/update_macs_apm_extension_details.py new file mode 100644 index 0000000000..e4d133a622 --- /dev/null +++ b/src/oci/apm_config/models/update_macs_apm_extension_details.py @@ -0,0 +1,251 @@ +# coding: utf-8 +# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20210201 + +from .update_config_details import UpdateConfigDetails +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 UpdateMacsApmExtensionDetails(UpdateConfigDetails): + """ + An object that represents APM Agent provisioning via a Management Agent. + """ + + def __init__(self, **kwargs): + """ + Initializes a new UpdateMacsApmExtensionDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.apm_config.models.UpdateMacsApmExtensionDetails.config_type` attribute + of this class is ``MACS_APM_EXTENSION`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param config_type: + The value to assign to the config_type property of this UpdateMacsApmExtensionDetails. + Allowed values for this property are: "SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS", "AGENT", "MACS_APM_EXTENSION" + :type config_type: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this UpdateMacsApmExtensionDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this UpdateMacsApmExtensionDetails. + :type defined_tags: dict(str, dict(str, object)) + + :param display_name: + The value to assign to the display_name property of this UpdateMacsApmExtensionDetails. + :type display_name: str + + :param process_filter: + The value to assign to the process_filter property of this UpdateMacsApmExtensionDetails. + :type process_filter: list[str] + + :param run_as_user: + The value to assign to the run_as_user property of this UpdateMacsApmExtensionDetails. + :type run_as_user: str + + :param service_name: + The value to assign to the service_name property of this UpdateMacsApmExtensionDetails. + :type service_name: str + + :param agent_version: + The value to assign to the agent_version property of this UpdateMacsApmExtensionDetails. + :type agent_version: str + + :param attach_install_dir: + The value to assign to the attach_install_dir property of this UpdateMacsApmExtensionDetails. + :type attach_install_dir: str + + """ + self.swagger_types = { + 'config_type': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'display_name': 'str', + 'process_filter': 'list[str]', + 'run_as_user': 'str', + 'service_name': 'str', + 'agent_version': 'str', + 'attach_install_dir': 'str' + } + self.attribute_map = { + 'config_type': 'configType', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'display_name': 'displayName', + 'process_filter': 'processFilter', + 'run_as_user': 'runAsUser', + 'service_name': 'serviceName', + 'agent_version': 'agentVersion', + 'attach_install_dir': 'attachInstallDir' + } + self._config_type = None + self._freeform_tags = None + self._defined_tags = None + self._display_name = None + self._process_filter = None + self._run_as_user = None + self._service_name = None + self._agent_version = None + self._attach_install_dir = None + self._config_type = 'MACS_APM_EXTENSION' + + @property + def display_name(self): + """ + Gets the display_name of this UpdateMacsApmExtensionDetails. + The name by which a configuration entity is displayed to the end user. + + + :return: The display_name of this UpdateMacsApmExtensionDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this UpdateMacsApmExtensionDetails. + The name by which a configuration entity is displayed to the end user. + + + :param display_name: The display_name of this UpdateMacsApmExtensionDetails. + :type: str + """ + self._display_name = display_name + + @property + def process_filter(self): + """ + Gets the process_filter of this UpdateMacsApmExtensionDetails. + Filter patterns used to discover active Java processes for provisioning the APM Agent. + + + :return: The process_filter of this UpdateMacsApmExtensionDetails. + :rtype: list[str] + """ + return self._process_filter + + @process_filter.setter + def process_filter(self, process_filter): + """ + Sets the process_filter of this UpdateMacsApmExtensionDetails. + Filter patterns used to discover active Java processes for provisioning the APM Agent. + + + :param process_filter: The process_filter of this UpdateMacsApmExtensionDetails. + :type: list[str] + """ + self._process_filter = process_filter + + @property + def run_as_user(self): + """ + Gets the run_as_user of this UpdateMacsApmExtensionDetails. + The OS user that should be used to discover Java processes. + + + :return: The run_as_user of this UpdateMacsApmExtensionDetails. + :rtype: str + """ + return self._run_as_user + + @run_as_user.setter + def run_as_user(self, run_as_user): + """ + Sets the run_as_user of this UpdateMacsApmExtensionDetails. + The OS user that should be used to discover Java processes. + + + :param run_as_user: The run_as_user of this UpdateMacsApmExtensionDetails. + :type: str + """ + self._run_as_user = run_as_user + + @property + def service_name(self): + """ + Gets the service_name of this UpdateMacsApmExtensionDetails. + The name of the service being monitored. This argument enables you to filter by + service and view traces and other signals in the APM Explorer user interface. + + + :return: The service_name of this UpdateMacsApmExtensionDetails. + :rtype: str + """ + return self._service_name + + @service_name.setter + def service_name(self, service_name): + """ + Sets the service_name of this UpdateMacsApmExtensionDetails. + The name of the service being monitored. This argument enables you to filter by + service and view traces and other signals in the APM Explorer user interface. + + + :param service_name: The service_name of this UpdateMacsApmExtensionDetails. + :type: str + """ + self._service_name = service_name + + @property + def agent_version(self): + """ + Gets the agent_version of this UpdateMacsApmExtensionDetails. + The version of the referenced agent bundle. + + + :return: The agent_version of this UpdateMacsApmExtensionDetails. + :rtype: str + """ + return self._agent_version + + @agent_version.setter + def agent_version(self, agent_version): + """ + Sets the agent_version of this UpdateMacsApmExtensionDetails. + The version of the referenced agent bundle. + + + :param agent_version: The agent_version of this UpdateMacsApmExtensionDetails. + :type: str + """ + self._agent_version = agent_version + + @property + def attach_install_dir(self): + """ + Gets the attach_install_dir of this UpdateMacsApmExtensionDetails. + The directory owned by runAsUser. + + + :return: The attach_install_dir of this UpdateMacsApmExtensionDetails. + :rtype: str + """ + return self._attach_install_dir + + @attach_install_dir.setter + def attach_install_dir(self, attach_install_dir): + """ + Sets the attach_install_dir of this UpdateMacsApmExtensionDetails. + The directory owned by runAsUser. + + + :param attach_install_dir: The attach_install_dir of this UpdateMacsApmExtensionDetails. + :type: str + """ + self._attach_install_dir = attach_install_dir + + 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/apm_config/models/update_match_agents_with_attribute_key_details.py b/src/oci/apm_config/models/update_match_agents_with_attribute_key_details.py new file mode 100644 index 0000000000..a45c26e811 --- /dev/null +++ b/src/oci/apm_config/models/update_match_agents_with_attribute_key_details.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20210201 + + +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 UpdateMatchAgentsWithAttributeKeyDetails(object): + """ + The object representing the agent matching attribute keys. + """ + + def __init__(self, **kwargs): + """ + Initializes a new UpdateMatchAgentsWithAttributeKeyDetails 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 UpdateMatchAgentsWithAttributeKeyDetails. + :type items: list[str] + + """ + self.swagger_types = { + 'items': 'list[str]' + } + self.attribute_map = { + 'items': 'items' + } + self._items = None + + @property + def items(self): + """ + Gets the items of this UpdateMatchAgentsWithAttributeKeyDetails. + The list of agent matching attribute keys to be updated. + + + :return: The items of this UpdateMatchAgentsWithAttributeKeyDetails. + :rtype: list[str] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this UpdateMatchAgentsWithAttributeKeyDetails. + The list of agent matching attribute keys to be updated. + + + :param items: The items of this UpdateMatchAgentsWithAttributeKeyDetails. + :type: list[str] + """ + 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/apm_config/models/update_metric_group_details.py b/src/oci/apm_config/models/update_metric_group_details.py index 472b456fa8..11bd7b669d 100644 --- a/src/oci/apm_config/models/update_metric_group_details.py +++ b/src/oci/apm_config/models/update_metric_group_details.py @@ -24,7 +24,7 @@ def __init__(self, **kwargs): :param config_type: The value to assign to the config_type property of this UpdateMetricGroupDetails. - Allowed values for this property are: "SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS" + Allowed values for this property are: "SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS", "AGENT", "MACS_APM_EXTENSION" :type config_type: str :param freeform_tags: diff --git a/src/oci/apm_config/models/update_options_details.py b/src/oci/apm_config/models/update_options_details.py index f3670f473b..8aeb70fb18 100644 --- a/src/oci/apm_config/models/update_options_details.py +++ b/src/oci/apm_config/models/update_options_details.py @@ -23,7 +23,7 @@ def __init__(self, **kwargs): :param config_type: The value to assign to the config_type property of this UpdateOptionsDetails. - Allowed values for this property are: "SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS" + Allowed values for this property are: "SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS", "AGENT", "MACS_APM_EXTENSION" :type config_type: str :param freeform_tags: diff --git a/src/oci/apm_config/models/update_span_filter_details.py b/src/oci/apm_config/models/update_span_filter_details.py index fd517c2d16..aa1c431566 100644 --- a/src/oci/apm_config/models/update_span_filter_details.py +++ b/src/oci/apm_config/models/update_span_filter_details.py @@ -23,7 +23,7 @@ def __init__(self, **kwargs): :param config_type: The value to assign to the config_type property of this UpdateSpanFilterDetails. - Allowed values for this property are: "SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS" + Allowed values for this property are: "SPAN_FILTER", "METRIC_GROUP", "APDEX", "OPTIONS", "AGENT", "MACS_APM_EXTENSION" :type config_type: str :param freeform_tags: diff --git a/src/oci/data_science/data_science_client.py b/src/oci/data_science/data_science_client.py index 1cd0afa993..a7f6883bd9 100644 --- a/src/oci/data_science/data_science_client.py +++ b/src/oci/data_science/data_science_client.py @@ -331,6 +331,115 @@ def activate_model_deployment(self, model_deployment_id, **kwargs): api_reference_link=api_reference_link, required_arguments=required_arguments) + def activate_model_group(self, model_group_id, **kwargs): + """ + Activates the model group. + + + :param str model_group_id: (required) + The `OCID`__ of the modelGroup. + + __ 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 is 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, then 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.data_science.models.ModelGroup` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use activate_model_group API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['modelGroupId'] + resource_path = "/modelGroups/{modelGroupId}/actions/activate" + method = "POST" + operation_name = "activate_model_group" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/ModelGroup/ActivateModelGroup" + + # 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"activate_model_group got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "modelGroupId": model_group_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + + 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, + response_type="ModelGroup", + 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="ModelGroup", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + def activate_notebook_session(self, notebook_session_id, **kwargs): """ Activates the notebook session. @@ -1915,18 +2024,18 @@ def change_model_deployment_compartment(self, model_deployment_id, change_model_ api_reference_link=api_reference_link, required_arguments=required_arguments) - def change_model_version_set_compartment(self, model_version_set_id, change_model_version_set_compartment_details, **kwargs): + def change_model_group_compartment(self, model_group_id, change_model_group_compartment_details, **kwargs): """ - Moves a modelVersionSet resource into a different compartment. + Moves a model group resource into a different compartment. - :param str model_version_set_id: (required) - The `OCID`__ of the model version set. + :param str model_group_id: (required) + The `OCID`__ of the modelGroup. __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm - :param oci.data_science.models.ChangeModelVersionSetCompartmentDetails change_model_version_set_compartment_details: (required) - Details for changing the compartment of a model version set. + :param oci.data_science.models.ChangeModelGroupCompartmentDetails change_model_group_compartment_details: (required) + Details for changing the compartment of a model group. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call @@ -1944,7 +2053,7 @@ def change_model_version_set_compartment(self, model_version_set_id, change_mode :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. - This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + 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`. @@ -1957,14 +2066,14 @@ def change_model_version_set_compartment(self, model_version_set_id, change_mode :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use change_model_version_set_compartment API. + Click `here `__ to see an example of how to use change_model_group_compartment API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['modelVersionSetId'] - resource_path = "/modelVersionSets/{modelVersionSetId}/actions/changeCompartment" + required_arguments = ['modelGroupId'] + resource_path = "/modelGroups/{modelGroupId}/actions/changeCompartment" method = "POST" - operation_name = "change_model_version_set_compartment" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/ModelVersionSet/ChangeModelVersionSetCompartment" + operation_name = "change_model_group_compartment" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/ModelGroup/ChangeModelGroupCompartment" # Don't accept unknown kwargs expected_kwargs = [ @@ -1977,10 +2086,10 @@ def change_model_version_set_compartment(self, model_version_set_id, change_mode extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"change_model_version_set_compartment got unknown kwargs: {extra_kwargs!r}") + f"change_model_group_compartment got unknown kwargs: {extra_kwargs!r}") path_params = { - "modelVersionSetId": model_version_set_id + "modelGroupId": model_group_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -2002,6 +2111,8 @@ def change_model_version_set_compartment(self, model_version_set_id, change_mode 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): @@ -2014,7 +2125,7 @@ def change_model_version_set_compartment(self, model_version_set_id, change_mode method=method, path_params=path_params, header_params=header_params, - body=change_model_version_set_compartment_details, + body=change_model_group_compartment_details, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -2025,24 +2136,24 @@ def change_model_version_set_compartment(self, model_version_set_id, change_mode method=method, path_params=path_params, header_params=header_params, - body=change_model_version_set_compartment_details, + body=change_model_group_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_notebook_session_compartment(self, notebook_session_id, change_notebook_session_compartment_details, **kwargs): + def change_model_group_version_history_compartment(self, model_group_version_history_id, change_model_group_version_history_compartment_details, **kwargs): """ - Moves a notebook session resource into a different compartment. + Moves a model Group Version History resource into a different compartment. - :param str notebook_session_id: (required) - The `OCID`__ of the notebook session. + :param str model_group_version_history_id: (required) + The `OCID`__ of the modelGroupVersionHistory. __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm - :param oci.data_science.models.ChangeNotebookSessionCompartmentDetails change_notebook_session_compartment_details: (required) - Details for changing the compartment of a notebook session. + :param oci.data_science.models.ChangeModelGroupVersionHistoryCompartmentDetails change_model_group_version_history_compartment_details: (required) + Details for changing the compartment of a Model Group Version History. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call @@ -2060,7 +2171,7 @@ def change_notebook_session_compartment(self, notebook_session_id, change_notebo :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. - This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + 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`. @@ -2073,14 +2184,14 @@ def change_notebook_session_compartment(self, notebook_session_id, change_notebo :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use change_notebook_session_compartment API. + Click `here `__ to see an example of how to use change_model_group_version_history_compartment API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['notebookSessionId'] - resource_path = "/notebookSessions/{notebookSessionId}/actions/changeCompartment" + required_arguments = ['modelGroupVersionHistoryId'] + resource_path = "/modelGroupVersionHistory/{modelGroupVersionHistoryId}/actions/changeCompartment" method = "POST" - operation_name = "change_notebook_session_compartment" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/NotebookSession/ChangeNotebookSessionCompartment" + operation_name = "change_model_group_version_history_compartment" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/ModelGroupVersionHistory/ChangeModelGroupVersionHistoryCompartment" # Don't accept unknown kwargs expected_kwargs = [ @@ -2093,10 +2204,10 @@ def change_notebook_session_compartment(self, notebook_session_id, change_notebo extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"change_notebook_session_compartment got unknown kwargs: {extra_kwargs!r}") + f"change_model_group_version_history_compartment got unknown kwargs: {extra_kwargs!r}") path_params = { - "notebookSessionId": notebook_session_id + "modelGroupVersionHistoryId": model_group_version_history_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -2118,6 +2229,8 @@ def change_notebook_session_compartment(self, notebook_session_id, change_notebo 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): @@ -2130,7 +2243,7 @@ def change_notebook_session_compartment(self, notebook_session_id, change_notebo method=method, path_params=path_params, header_params=header_params, - body=change_notebook_session_compartment_details, + body=change_model_group_version_history_compartment_details, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -2141,27 +2254,24 @@ def change_notebook_session_compartment(self, notebook_session_id, change_notebo method=method, path_params=path_params, header_params=header_params, - body=change_notebook_session_compartment_details, + body=change_model_group_version_history_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_pipeline_compartment(self, pipeline_id, change_pipeline_compartment_details, **kwargs): + def change_model_version_set_compartment(self, model_version_set_id, change_model_version_set_compartment_details, **kwargs): """ - Moves a resource into a different compartment. When provided, If-Match is checked against ETag values of the resource. + Moves a modelVersionSet resource into a different compartment. - :param str pipeline_id: (required) - The `OCID`__ of the pipeline. + :param str model_version_set_id: (required) + The `OCID`__ of the model version set. __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm - :param oci.data_science.models.ChangePipelineCompartmentDetails change_pipeline_compartment_details: (required) - Details for the compartment move. - - :param str opc_request_id: (optional) - Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID. + :param oci.data_science.models.ChangeModelVersionSetCompartmentDetails change_model_version_set_compartment_details: (required) + Details for changing the compartment of a model version set. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call @@ -2170,6 +2280,12 @@ def change_pipeline_compartment(self, pipeline_id, change_pipeline_compartment_d The resource is 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, then 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. @@ -2186,29 +2302,30 @@ def change_pipeline_compartment(self, pipeline_id, change_pipeline_compartment_d :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use change_pipeline_compartment API. + Click `here `__ to see an example of how to use change_model_version_set_compartment API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['pipelineId'] - resource_path = "/pipelines/{pipelineId}/actions/changeCompartment" + required_arguments = ['modelVersionSetId'] + resource_path = "/modelVersionSets/{modelVersionSetId}/actions/changeCompartment" method = "POST" - operation_name = "change_pipeline_compartment" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Pipeline/ChangePipelineCompartment" + operation_name = "change_model_version_set_compartment" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/ModelVersionSet/ChangeModelVersionSetCompartment" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", + "if_match", "opc_request_id", - "if_match" + "opc_retry_token" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"change_pipeline_compartment got unknown kwargs: {extra_kwargs!r}") + f"change_model_version_set_compartment got unknown kwargs: {extra_kwargs!r}") path_params = { - "pipelineId": pipeline_id + "modelVersionSetId": model_version_set_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -2220,8 +2337,9 @@ def change_pipeline_compartment(self, pipeline_id, change_pipeline_compartment_d 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), - "if-match": kwargs.get("if_match", missing) + "opc-retry-token": kwargs.get("opc_retry_token", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} @@ -2232,6 +2350,7 @@ def change_pipeline_compartment(self, pipeline_id, change_pipeline_compartment_d 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( @@ -2240,7 +2359,7 @@ def change_pipeline_compartment(self, pipeline_id, change_pipeline_compartment_d method=method, path_params=path_params, header_params=header_params, - body=change_pipeline_compartment_details, + body=change_model_version_set_compartment_details, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -2251,27 +2370,24 @@ def change_pipeline_compartment(self, pipeline_id, change_pipeline_compartment_d method=method, path_params=path_params, header_params=header_params, - body=change_pipeline_compartment_details, + body=change_model_version_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 change_pipeline_run_compartment(self, pipeline_run_id, change_pipeline_run_compartment_details, **kwargs): + def change_notebook_session_compartment(self, notebook_session_id, change_notebook_session_compartment_details, **kwargs): """ - Moves a resource into a different compartment. When provided, If-Match is checked against ETag values of the resource. + Moves a notebook session resource into a different compartment. - :param str pipeline_run_id: (required) - The `OCID`__ of the pipeline run. + :param str notebook_session_id: (required) + The `OCID`__ of the notebook session. __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm - :param oci.data_science.models.ChangePipelineRunCompartmentDetails change_pipeline_run_compartment_details: (required) - Details for the compartment move. - - :param str opc_request_id: (optional) - Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID. + :param oci.data_science.models.ChangeNotebookSessionCompartmentDetails change_notebook_session_compartment_details: (required) + Details for changing the compartment of a notebook session. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call @@ -2280,6 +2396,12 @@ def change_pipeline_run_compartment(self, pipeline_run_id, change_pipeline_run_c The resource is 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, then 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. @@ -2296,29 +2418,30 @@ def change_pipeline_run_compartment(self, pipeline_run_id, change_pipeline_run_c :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use change_pipeline_run_compartment API. + Click `here `__ to see an example of how to use change_notebook_session_compartment API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['pipelineRunId'] - resource_path = "/pipelineRuns/{pipelineRunId}/actions/changeCompartment" + required_arguments = ['notebookSessionId'] + resource_path = "/notebookSessions/{notebookSessionId}/actions/changeCompartment" method = "POST" - operation_name = "change_pipeline_run_compartment" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/PipelineRun/ChangePipelineRunCompartment" + operation_name = "change_notebook_session_compartment" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/NotebookSession/ChangeNotebookSessionCompartment" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", + "if_match", "opc_request_id", - "if_match" + "opc_retry_token" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"change_pipeline_run_compartment got unknown kwargs: {extra_kwargs!r}") + f"change_notebook_session_compartment got unknown kwargs: {extra_kwargs!r}") path_params = { - "pipelineRunId": pipeline_run_id + "notebookSessionId": notebook_session_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -2330,8 +2453,9 @@ def change_pipeline_run_compartment(self, pipeline_run_id, change_pipeline_run_c 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), - "if-match": kwargs.get("if_match", missing) + "opc-retry-token": kwargs.get("opc_retry_token", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} @@ -2342,6 +2466,7 @@ def change_pipeline_run_compartment(self, pipeline_run_id, change_pipeline_run_c 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( @@ -2350,7 +2475,7 @@ def change_pipeline_run_compartment(self, pipeline_run_id, change_pipeline_run_c method=method, path_params=path_params, header_params=header_params, - body=change_pipeline_run_compartment_details, + body=change_notebook_session_compartment_details, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -2361,24 +2486,27 @@ def change_pipeline_run_compartment(self, pipeline_run_id, change_pipeline_run_c method=method, path_params=path_params, header_params=header_params, - body=change_pipeline_run_compartment_details, + body=change_notebook_session_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_project_compartment(self, project_id, change_project_compartment_details, **kwargs): + def change_pipeline_compartment(self, pipeline_id, change_pipeline_compartment_details, **kwargs): """ - Moves a project resource into a different compartment. + Moves a resource into a different compartment. When provided, If-Match is checked against ETag values of the resource. - :param str project_id: (required) - The `OCID`__ of the project. + :param str pipeline_id: (required) + The `OCID`__ of the pipeline. __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm - :param oci.data_science.models.ChangeProjectCompartmentDetails change_project_compartment_details: (required) - Details for changing the compartment of a project. + :param oci.data_science.models.ChangePipelineCompartmentDetails change_pipeline_compartment_details: (required) + Details for the compartment move. + + :param str opc_request_id: (optional) + Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call @@ -2387,12 +2515,6 @@ def change_project_compartment(self, project_id, change_project_compartment_deta The resource is 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, then 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. @@ -2409,14 +2531,237 @@ def change_project_compartment(self, project_id, change_project_compartment_deta :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use change_project_compartment API. + Click `here `__ to see an example of how to use change_pipeline_compartment API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['projectId'] - resource_path = "/projects/{projectId}/actions/changeCompartment" + required_arguments = ['pipelineId'] + resource_path = "/pipelines/{pipelineId}/actions/changeCompartment" method = "POST" - operation_name = "change_project_compartment" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Project/ChangeProjectCompartment" + operation_name = "change_pipeline_compartment" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Pipeline/ChangePipelineCompartment" + + # 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"change_pipeline_compartment got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "pipelineId": pipeline_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: + 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=change_pipeline_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_pipeline_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_pipeline_run_compartment(self, pipeline_run_id, change_pipeline_run_compartment_details, **kwargs): + """ + Moves a resource into a different compartment. When provided, If-Match is checked against ETag values of the resource. + + + :param str pipeline_run_id: (required) + The `OCID`__ of the pipeline run. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param oci.data_science.models.ChangePipelineRunCompartmentDetails change_pipeline_run_compartment_details: (required) + Details for the compartment move. + + :param str opc_request_id: (optional) + Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then 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 is 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 will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type None + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use change_pipeline_run_compartment API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['pipelineRunId'] + resource_path = "/pipelineRuns/{pipelineRunId}/actions/changeCompartment" + method = "POST" + operation_name = "change_pipeline_run_compartment" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/PipelineRun/ChangePipelineRunCompartment" + + # 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"change_pipeline_run_compartment got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "pipelineRunId": pipeline_run_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: + 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=change_pipeline_run_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_pipeline_run_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_project_compartment(self, project_id, change_project_compartment_details, **kwargs): + """ + Moves a project resource into a different compartment. + + + :param str project_id: (required) + The `OCID`__ of the project. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param oci.data_science.models.ChangeProjectCompartmentDetails change_project_compartment_details: (required) + Details for changing the compartment of a project. + + :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 is 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, then 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 will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type None + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use change_project_compartment API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['projectId'] + resource_path = "/projects/{projectId}/actions/changeCompartment" + method = "POST" + operation_name = "change_project_compartment" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Project/ChangeProjectCompartment" # Don't accept unknown kwargs expected_kwargs = [ @@ -3993,18 +4338,13 @@ def create_model_deployment(self, create_model_deployment_details, **kwargs): api_reference_link=api_reference_link, required_arguments=required_arguments) - def create_model_provenance(self, model_id, create_model_provenance_details, **kwargs): + def create_model_group(self, create_base_model_group_details, **kwargs): """ - Creates provenance information for the specified model. - - - :param str model_id: (required) - The `OCID`__ of the model. + Create a new Model Group resource. - __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm - :param oci.data_science.models.CreateModelProvenanceDetails create_model_provenance_details: (required) - Provenance information for specified model. + :param oci.data_science.models.CreateBaseModelGroupDetails create_base_model_group_details: (required) + Details for creating a new model group. :param str opc_request_id: (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID. @@ -4024,18 +4364,18 @@ def create_model_provenance(self, model_id, create_model_provenance_details, **k allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_science.models.ModelProvenance` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_science.models.ModelGroup` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use create_model_provenance API. + Click `here `__ to see an example of how to use create_model_group API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['modelId'] - resource_path = "/models/{modelId}/provenance" + required_arguments = [] + resource_path = "/modelGroups" method = "POST" - operation_name = "create_model_provenance" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Model/CreateModelProvenance" + operation_name = "create_model_group" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/ModelGroup/CreateModelGroup" # Don't accept unknown kwargs expected_kwargs = [ @@ -4047,17 +4387,7 @@ def create_model_provenance(self, model_id, create_model_provenance_details, **k extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"create_model_provenance 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') + f"create_model_group got unknown kwargs: {extra_kwargs!r}") header_params = { "accept": "application/json", @@ -4083,10 +4413,9 @@ def create_model_provenance(self, model_id, create_model_provenance_details, **k self.base_client.call_api, resource_path=resource_path, method=method, - path_params=path_params, header_params=header_params, - body=create_model_provenance_details, - response_type="ModelProvenance", + body=create_base_model_group_details, + response_type="ModelGroup", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -4095,22 +4424,29 @@ def create_model_provenance(self, model_id, create_model_provenance_details, **k return self.base_client.call_api( resource_path=resource_path, method=method, - path_params=path_params, header_params=header_params, - body=create_model_provenance_details, - response_type="ModelProvenance", + body=create_base_model_group_details, + response_type="ModelGroup", 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_version_set(self, create_model_version_set_details, **kwargs): + def create_model_group_artifact(self, model_group_id, model_group_artifact, **kwargs): """ - Creates a new modelVersionSet. + Creates artifact for the Model Group. - :param oci.data_science.models.CreateModelVersionSetDetails create_model_version_set_details: (required) - Details for creating a new modelVersionSet. + :param str model_group_id: (required) + The `OCID`__ of the modelGroup. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param stream model_group_artifact: (required) + The model group artifact to upload. + + :param int content_length: (optional) + The content length of the body. :param str opc_request_id: (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID. @@ -4118,6 +4454,22 @@ def create_model_version_set(self, create_model_version_set_details, **kwargs): :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 content_disposition: (optional) + This header allows you to specify a filename during upload. This file name is used to dispose of the file contents + while downloading the file. If this optional field is not populated in the request, then the OCID of the model is used for the file + name when downloading. + Example: `{\"Content-Disposition\": \"attachment\" + \"filename\"=\"model.tar.gz\" + \"Content-Length\": \"2347\" + \"Content-Type\": \"application/gzip\"}` + + :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 is 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. @@ -4129,40 +4481,84 @@ def create_model_version_set(self, create_model_version_set_details, **kwargs): :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings + :param int buffer_limit: (optional) + A buffer limit for the stream to be buffered. buffer_limit is used to set the buffer size capacity. Streams will be read until the size of the buffer reaches the buffer_limit. + If the stream size is greater than the buffer_limit, a BufferError exception will be thrown. - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_science.models.ModelVersionSet` + The buffer_limit parameter is used when the stream object does not have a `seek`, `tell`, or `fileno` property for the Python Request library to calculate out the content length. + If buffer_limit is not passed, then the buffer_limit will be defaulted to 100MB. + Large streams can cause the process to freeze, consider passing in content-length for large streams instead. + + :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use create_model_version_set API. + Click `here `__ to see an example of how to use create_model_group_artifact API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = [] - resource_path = "/modelVersionSets" + required_arguments = ['modelGroupId'] + resource_path = "/modelGroups/{modelGroupId}/artifact" method = "POST" - operation_name = "create_model_version_set" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/ModelVersionSet/CreateModelVersionSet" + operation_name = "create_model_group_artifact" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/ModelGroup/CreateModelGroupArtifact" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", + "buffer_limit", + "content_length", "opc_request_id", - "opc_retry_token" + "opc_retry_token", + "content_disposition", + "if_match" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"create_model_version_set got unknown kwargs: {extra_kwargs!r}") + f"create_model_group_artifact got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "modelGroupId": model_group_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') 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) + "opc-retry-token": kwargs.get("opc_retry_token", missing), + "content-length": kwargs.get("content_length", missing), + "content-disposition": kwargs.get("content_disposition", missing), + "if-match": kwargs.get("if_match", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + # If the body parameter is optional we need to assign it to a variable so additional type checking can be performed. + try: + model_group_artifact + except NameError: + model_group_artifact = kwargs.get("model_group_artifact", missing) + + if model_group_artifact is not missing and model_group_artifact is not None: + if (not isinstance(model_group_artifact, (six.binary_type, six.string_types)) and + not hasattr(model_group_artifact, "read")): + raise TypeError('The body must be a string, bytes, or provide a read() method.') + + if hasattr(model_group_artifact, 'fileno') and hasattr(model_group_artifact, 'name') and model_group_artifact.name != '': + if requests.utils.super_len(model_group_artifact) == 0: + header_params['Content-Length'] = '0' + + # If content length is not given and stream object have no 'fileno' and is not a string or bytes, try to calculate content length + elif 'Content-Length' not in header_params and not is_content_length_calculable_by_req_util(model_group_artifact): + calculated_obj = back_up_body_calculate_stream_content_length(model_group_artifact, kwargs.get("buffer_limit")) + header_params['Content-Length'] = calculated_obj["content_length"] + model_group_artifact = calculated_obj["byte_content"] + retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy @@ -4179,9 +4575,10 @@ def create_model_version_set(self, create_model_version_set_details, **kwargs): self.base_client.call_api, resource_path=resource_path, method=method, + path_params=path_params, header_params=header_params, - body=create_model_version_set_details, - response_type="ModelVersionSet", + body=model_group_artifact, + enforce_content_headers=False, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -4190,21 +4587,22 @@ def create_model_version_set(self, create_model_version_set_details, **kwargs): return self.base_client.call_api( resource_path=resource_path, method=method, + path_params=path_params, header_params=header_params, - body=create_model_version_set_details, - response_type="ModelVersionSet", + body=model_group_artifact, + enforce_content_headers=False, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def create_notebook_session(self, create_notebook_session_details, **kwargs): + def create_model_group_version_history(self, create_model_group_version_history_details, **kwargs): """ - Creates a new notebook session. + Creates a new modelGroupVersionHistory. - :param oci.data_science.models.CreateNotebookSessionDetails create_notebook_session_details: (required) - Details for creating a new notebook session. + :param oci.data_science.models.CreateModelGroupVersionHistoryDetails create_model_group_version_history_details: (required) + Details for creating a new model group version History. :param str opc_request_id: (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID. @@ -4224,18 +4622,18 @@ def create_notebook_session(self, create_notebook_session_details, **kwargs): allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_science.models.NotebookSession` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_science.models.ModelGroupVersionHistory` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use create_notebook_session API. + Click `here `__ to see an example of how to use create_model_group_version_history API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. required_arguments = [] - resource_path = "/notebookSessions" + resource_path = "/modelGroupVersionHistory" method = "POST" - operation_name = "create_notebook_session" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/NotebookSession/CreateNotebookSession" + operation_name = "create_model_group_version_history" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/ModelGroupVersionHistory/CreateModelGroupVersionHistory" # Don't accept unknown kwargs expected_kwargs = [ @@ -4247,7 +4645,7 @@ def create_notebook_session(self, create_notebook_session_details, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"create_notebook_session got unknown kwargs: {extra_kwargs!r}") + f"create_model_group_version_history got unknown kwargs: {extra_kwargs!r}") header_params = { "accept": "application/json", @@ -4274,8 +4672,8 @@ def create_notebook_session(self, create_notebook_session_details, **kwargs): resource_path=resource_path, method=method, header_params=header_params, - body=create_notebook_session_details, - response_type="NotebookSession", + body=create_model_group_version_history_details, + response_type="ModelGroupVersionHistory", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -4285,27 +4683,32 @@ def create_notebook_session(self, create_notebook_session_details, **kwargs): resource_path=resource_path, method=method, header_params=header_params, - body=create_notebook_session_details, - response_type="NotebookSession", + body=create_model_group_version_history_details, + response_type="ModelGroupVersionHistory", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def create_pipeline(self, create_pipeline_details, **kwargs): + def create_model_provenance(self, model_id, create_model_provenance_details, **kwargs): """ - Creates a new Pipeline. + Creates provenance information for the specified model. - :param oci.data_science.models.CreatePipelineDetails create_pipeline_details: (required) - Details for the new Pipeline. + :param str model_id: (required) + The `OCID`__ of the 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 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. + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param oci.data_science.models.CreateModelProvenanceDetails create_model_provenance_details: (required) + Provenance information for specified model. :param str opc_request_id: (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then 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. @@ -4318,36 +4721,46 @@ def create_pipeline(self, create_pipeline_details, **kwargs): allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_science.models.Pipeline` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_science.models.ModelProvenance` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use create_pipeline API. + Click `here `__ to see an example of how to use create_model_provenance API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = [] - resource_path = "/pipelines" + required_arguments = ['modelId'] + resource_path = "/models/{modelId}/provenance" method = "POST" - operation_name = "create_pipeline" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Pipeline/CreatePipeline" + operation_name = "create_model_provenance" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Model/CreateModelProvenance" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "opc_retry_token", - "opc_request_id" + "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_pipeline got unknown kwargs: {extra_kwargs!r}") + f"create_model_provenance 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-retry-token": kwargs.get("opc_retry_token", missing), - "opc-request-id": kwargs.get("opc_request_id", missing) + "opc-request-id": kwargs.get("opc_request_id", missing), + "opc-retry-token": kwargs.get("opc_retry_token", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} @@ -4367,9 +4780,10 @@ def create_pipeline(self, create_pipeline_details, **kwargs): self.base_client.call_api, resource_path=resource_path, method=method, + path_params=path_params, header_params=header_params, - body=create_pipeline_details, - response_type="Pipeline", + body=create_model_provenance_details, + response_type="ModelProvenance", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -4378,30 +4792,28 @@ def create_pipeline(self, create_pipeline_details, **kwargs): return self.base_client.call_api( resource_path=resource_path, method=method, + path_params=path_params, header_params=header_params, - body=create_pipeline_details, - response_type="Pipeline", + body=create_model_provenance_details, + response_type="ModelProvenance", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def create_pipeline_run(self, create_pipeline_run_details, **kwargs): + def create_model_version_set(self, create_model_version_set_details, **kwargs): """ - Creates a new PipelineRun. - + Creates a new modelVersionSet. - :param oci.data_science.models.CreatePipelineRunDetails create_pipeline_run_details: (required) - Details for the new PipelineRun. - :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 oci.data_science.models.CreateModelVersionSetDetails create_model_version_set_details: (required) + Details for creating a new modelVersionSet. :param str opc_request_id: (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID. - :param str opc_parent_rpt_url: (optional) - URL to fetch the Resource Principal Token from the parent resource. + :param str opc_retry_token: (optional) + A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. :param 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. @@ -4415,38 +4827,36 @@ def create_pipeline_run(self, create_pipeline_run_details, **kwargs): allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_science.models.PipelineRun` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_science.models.ModelVersionSet` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use create_pipeline_run API. + Click `here `__ to see an example of how to use create_model_version_set API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. required_arguments = [] - resource_path = "/pipelineRuns" + resource_path = "/modelVersionSets" method = "POST" - operation_name = "create_pipeline_run" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/PipelineRun/CreatePipelineRun" + operation_name = "create_model_version_set" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/ModelVersionSet/CreateModelVersionSet" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "opc_retry_token", "opc_request_id", - "opc_parent_rpt_url" + "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_pipeline_run got unknown kwargs: {extra_kwargs!r}") + f"create_model_version_set 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), - "opc-parent-rpt-url": kwargs.get("opc_parent_rpt_url", 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} @@ -4467,8 +4877,8 @@ def create_pipeline_run(self, create_pipeline_run_details, **kwargs): resource_path=resource_path, method=method, header_params=header_params, - body=create_pipeline_run_details, - response_type="PipelineRun", + body=create_model_version_set_details, + response_type="ModelVersionSet", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -4478,20 +4888,20 @@ def create_pipeline_run(self, create_pipeline_run_details, **kwargs): resource_path=resource_path, method=method, header_params=header_params, - body=create_pipeline_run_details, - response_type="PipelineRun", + body=create_model_version_set_details, + response_type="ModelVersionSet", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def create_project(self, create_project_details, **kwargs): + def create_notebook_session(self, create_notebook_session_details, **kwargs): """ - Creates a new project. + Creates a new notebook session. - :param oci.data_science.models.CreateProjectDetails create_project_details: (required) - Details for creating a new project. + :param oci.data_science.models.CreateNotebookSessionDetails create_notebook_session_details: (required) + Details for creating a new notebook session. :param str opc_request_id: (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID. @@ -4511,18 +4921,18 @@ def create_project(self, create_project_details, **kwargs): allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_science.models.Project` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_science.models.NotebookSession` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use create_project API. + Click `here `__ to see an example of how to use create_notebook_session API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. required_arguments = [] - resource_path = "/projects" + resource_path = "/notebookSessions" method = "POST" - operation_name = "create_project" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Project/CreateProject" + operation_name = "create_notebook_session" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/NotebookSession/CreateNotebookSession" # Don't accept unknown kwargs expected_kwargs = [ @@ -4534,7 +4944,7 @@ def create_project(self, create_project_details, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"create_project got unknown kwargs: {extra_kwargs!r}") + f"create_notebook_session got unknown kwargs: {extra_kwargs!r}") header_params = { "accept": "application/json", @@ -4561,8 +4971,8 @@ def create_project(self, create_project_details, **kwargs): resource_path=resource_path, method=method, header_params=header_params, - body=create_project_details, - response_type="Project", + body=create_notebook_session_details, + response_type="NotebookSession", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -4572,20 +4982,20 @@ def create_project(self, create_project_details, **kwargs): resource_path=resource_path, method=method, header_params=header_params, - body=create_project_details, - response_type="Project", + body=create_notebook_session_details, + response_type="NotebookSession", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def create_schedule(self, create_schedule_details, **kwargs): + def create_pipeline(self, create_pipeline_details, **kwargs): """ - Creates a new Schedule. + Creates a new Pipeline. - :param oci.data_science.models.CreateScheduleDetails create_schedule_details: (required) - Details for the new Schedule. + :param oci.data_science.models.CreatePipelineDetails create_pipeline_details: (required) + Details for the new Pipeline. :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. @@ -4605,18 +5015,18 @@ def create_schedule(self, create_schedule_details, **kwargs): allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_science.models.Schedule` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_science.models.Pipeline` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use create_schedule API. + Click `here `__ to see an example of how to use create_pipeline API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. required_arguments = [] - resource_path = "/schedules" + resource_path = "/pipelines" method = "POST" - operation_name = "create_schedule" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Schedule/CreateSchedule" + operation_name = "create_pipeline" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Pipeline/CreatePipeline" # Don't accept unknown kwargs expected_kwargs = [ @@ -4628,7 +5038,7 @@ def create_schedule(self, create_schedule_details, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"create_schedule got unknown kwargs: {extra_kwargs!r}") + f"create_pipeline got unknown kwargs: {extra_kwargs!r}") header_params = { "accept": "application/json", @@ -4655,8 +5065,8 @@ def create_schedule(self, create_schedule_details, **kwargs): resource_path=resource_path, method=method, header_params=header_params, - body=create_schedule_details, - response_type="Schedule", + body=create_pipeline_details, + response_type="Pipeline", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -4666,51 +5076,34 @@ def create_schedule(self, create_schedule_details, **kwargs): resource_path=resource_path, method=method, header_params=header_params, - body=create_schedule_details, - response_type="Schedule", + body=create_pipeline_details, + response_type="Pipeline", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def create_step_artifact(self, pipeline_id, step_name, step_artifact, **kwargs): + def create_pipeline_run(self, create_pipeline_run_details, **kwargs): """ - Upload the artifact for a step in the pipeline. + Creates a new PipelineRun. - :param str pipeline_id: (required) - The `OCID`__ of the pipeline. - - __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm - - :param str step_name: (required) - Unique Step identifier in a pipeline. - - :param stream step_artifact: (required) - The step artifact to upload. + :param oci.data_science.models.CreatePipelineRunDetails create_pipeline_run_details: (required) + Details for the new PipelineRun. - :param int content_length: (optional) - The content length of the body. + :param str opc_retry_token: (optional) + A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. :param str opc_request_id: (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then 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 str content_disposition: (optional) - This header allows you to specify a filename during upload. This file name is used to dispose of the file contents - while downloading the file. If this optional field is not populated in the request, then the OCID of the model is used for the file - name when downloading. - Example: `{\"Content-Disposition\": \"attachment\" - \"filename\"=\"model.tar.gz\" - \"Content-Length\": \"2347\" - \"Content-Type\": \"application/gzip\"}` + :param str opc_parent_rpt_url: (optional) + URL to fetch the Resource Principal Token from the parent resource. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. - This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + 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`. @@ -4718,87 +5111,48 @@ def create_step_artifact(self, pipeline_id, step_name, step_artifact, **kwargs): :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :param int buffer_limit: (optional) - A buffer limit for the stream to be buffered. buffer_limit is used to set the buffer size capacity. Streams will be read until the size of the buffer reaches the buffer_limit. - If the stream size is greater than the buffer_limit, a BufferError exception will be thrown. - - The buffer_limit parameter is used when the stream object does not have a `seek`, `tell`, or `fileno` property for the Python Request library to calculate out the content length. - If buffer_limit is not passed, then the buffer_limit will be defaulted to 100MB. - Large streams can cause the process to freeze, consider passing in content-length for large streams instead. - :return: A :class:`~oci.response.Response` object with data of type None + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_science.models.PipelineRun` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use create_step_artifact API. + Click `here `__ to see an example of how to use create_pipeline_run API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['pipelineId', 'stepName'] - resource_path = "/pipelines/{pipelineId}/steps/{stepName}/artifact" + required_arguments = [] + resource_path = "/pipelineRuns" method = "POST" - operation_name = "create_step_artifact" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Pipeline/CreateStepArtifact" + operation_name = "create_pipeline_run" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/PipelineRun/CreatePipelineRun" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "buffer_limit", - "content_length", - "opc_request_id", "opc_retry_token", - "content_disposition" + "opc_request_id", + "opc_parent_rpt_url" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"create_step_artifact got unknown kwargs: {extra_kwargs!r}") - - path_params = { - "pipelineId": pipeline_id, - "stepName": step_name - } - - path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} - - for (k, v) in six.iteritems(path_params): - if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): - raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + f"create_pipeline_run got unknown kwargs: {extra_kwargs!r}") header_params = { "accept": "application/json", - "opc-request-id": kwargs.get("opc_request_id", missing), + "content-type": "application/json", "opc-retry-token": kwargs.get("opc_retry_token", missing), - "content-length": kwargs.get("content_length", missing), - "content-disposition": kwargs.get("content_disposition", missing) + "opc-request-id": kwargs.get("opc_request_id", missing), + "opc-parent-rpt-url": kwargs.get("opc_parent_rpt_url", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} - # If the body parameter is optional we need to assign it to a variable so additional type checking can be performed. - try: - step_artifact - except NameError: - step_artifact = kwargs.get("step_artifact", missing) - - if step_artifact is not missing and step_artifact is not None: - if (not isinstance(step_artifact, (six.binary_type, six.string_types)) and - not hasattr(step_artifact, "read")): - raise TypeError('The body must be a string, bytes, or provide a read() method.') - - if hasattr(step_artifact, 'fileno') and hasattr(step_artifact, 'name') and step_artifact.name != '': - if requests.utils.super_len(step_artifact) == 0: - header_params['Content-Length'] = '0' - - # If content length is not given and stream object have no 'fileno' and is not a string or bytes, try to calculate content length - elif 'Content-Length' not in header_params and not is_content_length_calculable_by_req_util(step_artifact): - calculated_obj = back_up_body_calculate_stream_content_length(step_artifact, kwargs.get("buffer_limit")) - header_params['Content-Length'] = calculated_obj["content_length"] - step_artifact = calculated_obj["byte_content"] - retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) + if retry_strategy is None: + retry_strategy = retry.DEFAULT_RETRY_STRATEGY if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): @@ -4809,10 +5163,9 @@ def create_step_artifact(self, pipeline_id, step_name, step_artifact, **kwargs): self.base_client.call_api, resource_path=resource_path, method=method, - path_params=path_params, header_params=header_params, - body=step_artifact, - enforce_content_headers=False, + body=create_pipeline_run_details, + response_type="PipelineRun", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -4821,35 +5174,28 @@ def create_step_artifact(self, pipeline_id, step_name, step_artifact, **kwargs): return self.base_client.call_api( resource_path=resource_path, method=method, - path_params=path_params, header_params=header_params, - body=step_artifact, - enforce_content_headers=False, + body=create_pipeline_run_details, + response_type="PipelineRun", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def deactivate_model(self, model_id, **kwargs): + def create_project(self, create_project_details, **kwargs): """ - Deactivates the model. - - - :param str model_id: (required) - The `OCID`__ of the model. + Creates a new project. - __ 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 is updated or deleted only if the `etag` you - provide matches the resource's current `etag` value. + :param oci.data_science.models.CreateProjectDetails create_project_details: (required) + Details for creating a new project. :param str opc_request_id: (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then 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. @@ -4862,46 +5208,36 @@ def deactivate_model(self, model_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.data_science.models.Model` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_science.models.Project` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use deactivate_model API. + Click `here `__ to see an example of how to use create_project API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['modelId'] - resource_path = "/models/{modelId}/actions/deactivate" + required_arguments = [] + resource_path = "/projects" method = "POST" - operation_name = "deactivate_model" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Model/DeactivateModel" + operation_name = "create_project" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Project/CreateProject" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "if_match", - "opc_request_id" + "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"deactivate_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') + f"create_project got unknown kwargs: {extra_kwargs!r}") 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-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} @@ -4914,15 +5250,16 @@ def deactivate_model(self, model_id, **kwargs): if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, - path_params=path_params, header_params=header_params, - response_type="Model", + body=create_project_details, + response_type="Project", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -4931,30 +5268,24 @@ def deactivate_model(self, model_id, **kwargs): return self.base_client.call_api( resource_path=resource_path, method=method, - path_params=path_params, header_params=header_params, - response_type="Model", + body=create_project_details, + response_type="Project", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def deactivate_model_deployment(self, model_deployment_id, **kwargs): + def create_schedule(self, create_schedule_details, **kwargs): """ - Deactivates the model deployment. - + Creates a new Schedule. - :param str model_deployment_id: (required) - The `OCID`__ of the model deployment. - __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + :param oci.data_science.models.CreateScheduleDetails create_schedule_details: (required) + Details for the new Schedule. - :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 is updated or deleted only if the `etag` you - provide matches the resource's current `etag` value. + :param str opc_retry_token: (optional) + A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. :param str opc_request_id: (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID. @@ -4962,7 +5293,7 @@ def deactivate_model_deployment(self, model_deployment_id, **kwargs): :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. - This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + 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`. @@ -4971,45 +5302,35 @@ def deactivate_model_deployment(self, model_deployment_id, **kwargs): allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type None + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_science.models.Schedule` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use deactivate_model_deployment API. + Click `here `__ to see an example of how to use create_schedule API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['modelDeploymentId'] - resource_path = "/modelDeployments/{modelDeploymentId}/actions/deactivate" + required_arguments = [] + resource_path = "/schedules" method = "POST" - operation_name = "deactivate_model_deployment" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/ModelDeployment/DeactivateModelDeployment" + operation_name = "create_schedule" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Schedule/CreateSchedule" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "if_match", + "opc_retry_token", "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"deactivate_model_deployment got unknown kwargs: {extra_kwargs!r}") - - path_params = { - "modelDeploymentId": model_deployment_id - } - - path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} - - for (k, v) in six.iteritems(path_params): - if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): - raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + f"create_schedule got unknown kwargs: {extra_kwargs!r}") header_params = { "accept": "application/json", "content-type": "application/json", - "if-match": kwargs.get("if_match", missing), + "opc-retry-token": kwargs.get("opc_retry_token", missing), "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} @@ -5018,17 +5339,21 @@ def deactivate_model_deployment(self, model_deployment_id, **kwargs): operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy ) + if retry_strategy is None: + retry_strategy = retry.DEFAULT_RETRY_STRATEGY if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, - path_params=path_params, header_params=header_params, + body=create_schedule_details, + response_type="Schedule", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -5037,72 +5362,98 @@ def deactivate_model_deployment(self, model_deployment_id, **kwargs): return self.base_client.call_api( resource_path=resource_path, method=method, - path_params=path_params, header_params=header_params, + body=create_schedule_details, + response_type="Schedule", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def deactivate_notebook_session(self, notebook_session_id, **kwargs): + def create_step_artifact(self, pipeline_id, step_name, step_artifact, **kwargs): """ - Deactivates the notebook session. + Upload the artifact for a step in the pipeline. - :param str notebook_session_id: (required) - The `OCID`__ of the notebook session. + :param str pipeline_id: (required) + The `OCID`__ of the pipeline. __ 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 is updated or deleted only if the `etag` you - provide matches the resource's current `etag` value. + :param str step_name: (required) + Unique Step identifier in a pipeline. - :param str opc_request_id: (optional) - Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID. + :param stream step_artifact: (required) + The step artifact to upload. - :param obj retry_strategy: (optional) - A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + :param int content_length: (optional) + The content length of the body. - This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. - The specifics of the default retry strategy are described `here `__. + :param str opc_request_id: (optional) + Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID. - To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + :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 content_disposition: (optional) + This header allows you to specify a filename during upload. This file name is used to dispose of the file contents + while downloading the file. If this optional field is not populated in the request, then the OCID of the model is used for the file + name when downloading. + Example: `{\"Content-Disposition\": \"attachment\" + \"filename\"=\"model.tar.gz\" + \"Content-Length\": \"2347\" + \"Content-Type\": \"application/gzip\"}` + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings + :param int buffer_limit: (optional) + A buffer limit for the stream to be buffered. buffer_limit is used to set the buffer size capacity. Streams will be read until the size of the buffer reaches the buffer_limit. + If the stream size is greater than the buffer_limit, a BufferError exception will be thrown. + + The buffer_limit parameter is used when the stream object does not have a `seek`, `tell`, or `fileno` property for the Python Request library to calculate out the content length. + If buffer_limit is not passed, then the buffer_limit will be defaulted to 100MB. + Large streams can cause the process to freeze, consider passing in content-length for large streams instead. :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use deactivate_notebook_session API. + Click `here `__ to see an example of how to use create_step_artifact API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['notebookSessionId'] - resource_path = "/notebookSessions/{notebookSessionId}/actions/deactivate" + required_arguments = ['pipelineId', 'stepName'] + resource_path = "/pipelines/{pipelineId}/steps/{stepName}/artifact" method = "POST" - operation_name = "deactivate_notebook_session" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/NotebookSession/DeactivateNotebookSession" + operation_name = "create_step_artifact" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Pipeline/CreateStepArtifact" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "if_match", - "opc_request_id" + "buffer_limit", + "content_length", + "opc_request_id", + "opc_retry_token", + "content_disposition" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"deactivate_notebook_session got unknown kwargs: {extra_kwargs!r}") + f"create_step_artifact got unknown kwargs: {extra_kwargs!r}") path_params = { - "notebookSessionId": notebook_session_id + "pipelineId": pipeline_id, + "stepName": step_name } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -5113,12 +5464,34 @@ def deactivate_notebook_session(self, notebook_session_id, **kwargs): header_params = { "accept": "application/json", - "content-type": "application/json", - "if-match": kwargs.get("if_match", missing), - "opc-request-id": kwargs.get("opc_request_id", missing) + "opc-request-id": kwargs.get("opc_request_id", missing), + "opc-retry-token": kwargs.get("opc_retry_token", missing), + "content-length": kwargs.get("content_length", missing), + "content-disposition": kwargs.get("content_disposition", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + # If the body parameter is optional we need to assign it to a variable so additional type checking can be performed. + try: + step_artifact + except NameError: + step_artifact = kwargs.get("step_artifact", missing) + + if step_artifact is not missing and step_artifact is not None: + if (not isinstance(step_artifact, (six.binary_type, six.string_types)) and + not hasattr(step_artifact, "read")): + raise TypeError('The body must be a string, bytes, or provide a read() method.') + + if hasattr(step_artifact, 'fileno') and hasattr(step_artifact, 'name') and step_artifact.name != '': + if requests.utils.super_len(step_artifact) == 0: + header_params['Content-Length'] = '0' + + # If content length is not given and stream object have no 'fileno' and is not a string or bytes, try to calculate content length + elif 'Content-Length' not in header_params and not is_content_length_calculable_by_req_util(step_artifact): + calculated_obj = back_up_body_calculate_stream_content_length(step_artifact, kwargs.get("buffer_limit")) + header_params['Content-Length'] = calculated_obj["content_length"] + step_artifact = calculated_obj["byte_content"] + retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy @@ -5126,6 +5499,7 @@ def deactivate_notebook_session(self, notebook_session_id, **kwargs): if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( @@ -5134,6 +5508,8 @@ def deactivate_notebook_session(self, notebook_session_id, **kwargs): method=method, path_params=path_params, header_params=header_params, + body=step_artifact, + enforce_content_headers=False, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -5144,21 +5520,22 @@ def deactivate_notebook_session(self, notebook_session_id, **kwargs): method=method, path_params=path_params, header_params=header_params, + body=step_artifact, + enforce_content_headers=False, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def deactivate_schedule(self, schedule_id, **kwargs): + def deactivate_model(self, model_id, **kwargs): """ - Deactivate schedule. + Deactivates the model. - :param str schedule_id: (required) - unique Schedule identifier + :param str model_id: (required) + The `OCID`__ of the model. - :param str opc_request_id: (optional) - Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID. + __ 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 @@ -5167,8 +5544,8 @@ def deactivate_schedule(self, schedule_id, **kwargs): The resource is updated or deleted only if the `etag` you provide matches the resource's current `etag` value. - :param str opc_retry_token: (optional) - A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. + :param str opc_request_id: (optional) + Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then 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. @@ -5182,34 +5559,33 @@ def deactivate_schedule(self, schedule_id, **kwargs): allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type None + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_science.models.Model` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use deactivate_schedule API. + Click `here `__ to see an example of how to use deactivate_model API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['scheduleId'] - resource_path = "/schedules/{scheduleId}/actions/deactivate" + required_arguments = ['modelId'] + resource_path = "/models/{modelId}/actions/deactivate" method = "POST" - operation_name = "deactivate_schedule" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Schedule/DeactivateSchedule" + operation_name = "deactivate_model" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Model/DeactivateModel" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "opc_request_id", "if_match", - "opc_retry_token" + "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"deactivate_schedule got unknown kwargs: {extra_kwargs!r}") + f"deactivate_model got unknown kwargs: {extra_kwargs!r}") path_params = { - "scheduleId": schedule_id + "modelId": model_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -5221,9 +5597,8 @@ def deactivate_schedule(self, schedule_id, **kwargs): header_params = { "accept": "application/json", "content-type": "application/json", - "opc-request-id": kwargs.get("opc_request_id", missing), "if-match": kwargs.get("if_match", missing), - "opc-retry-token": kwargs.get("opc_retry_token", missing) + "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} @@ -5236,7 +5611,6 @@ def deactivate_schedule(self, schedule_id, **kwargs): if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): - self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( @@ -5245,6 +5619,7 @@ def deactivate_schedule(self, schedule_id, **kwargs): 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, @@ -5255,21 +5630,21 @@ def deactivate_schedule(self, schedule_id, **kwargs): 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 delete_data_science_private_endpoint(self, data_science_private_endpoint_id, **kwargs): + def deactivate_model_deployment(self, model_deployment_id, **kwargs): """ - Deletes a private endpoint using `privateEndpointId`. + Deactivates the model deployment. - :param str data_science_private_endpoint_id: (required) - The unique ID for a Data Science private endpoint. + :param str model_deployment_id: (required) + The `OCID`__ of the model deployment. - :param str opc_request_id: (optional) - Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID. + __ 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 @@ -5278,6 +5653,9 @@ def delete_data_science_private_endpoint(self, data_science_private_endpoint_id, The resource is 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, then 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. @@ -5294,29 +5672,29 @@ def delete_data_science_private_endpoint(self, data_science_private_endpoint_id, :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use delete_data_science_private_endpoint API. + Click `here `__ to see an example of how to use deactivate_model_deployment API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['dataSciencePrivateEndpointId'] - resource_path = "/dataSciencePrivateEndpoints/{dataSciencePrivateEndpointId}" - method = "DELETE" - operation_name = "delete_data_science_private_endpoint" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/DataSciencePrivateEndpoint/DeleteDataSciencePrivateEndpoint" + required_arguments = ['modelDeploymentId'] + resource_path = "/modelDeployments/{modelDeploymentId}/actions/deactivate" + method = "POST" + operation_name = "deactivate_model_deployment" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/ModelDeployment/DeactivateModelDeployment" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "opc_request_id", - "if_match" + "if_match", + "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"delete_data_science_private_endpoint got unknown kwargs: {extra_kwargs!r}") + f"deactivate_model_deployment got unknown kwargs: {extra_kwargs!r}") path_params = { - "dataSciencePrivateEndpointId": data_science_private_endpoint_id + "modelDeploymentId": model_deployment_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -5328,8 +5706,8 @@ def delete_data_science_private_endpoint(self, data_science_private_endpoint_id, 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) + "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} @@ -5363,13 +5741,13 @@ def delete_data_science_private_endpoint(self, data_science_private_endpoint_id, api_reference_link=api_reference_link, required_arguments=required_arguments) - def delete_job(self, job_id, **kwargs): + def deactivate_model_group(self, model_group_id, **kwargs): """ - Deletes a job. + Deactivates the model group. - :param str job_id: (required) - The `OCID`__ of the job. + :param str model_group_id: (required) + The `OCID`__ of the modelGroup. __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm @@ -5383,9 +5761,6 @@ def delete_job(self, job_id, **kwargs): :param str opc_request_id: (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID. - :param bool delete_related_job_runs: (optional) - Delete all JobRuns associated with this job. - :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. @@ -5398,34 +5773,33 @@ def delete_job(self, job_id, **kwargs): allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type None + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_science.models.ModelGroup` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use delete_job API. + Click `here `__ to see an example of how to use deactivate_model_group API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['jobId'] - resource_path = "/jobs/{jobId}" - method = "DELETE" - operation_name = "delete_job" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Job/DeleteJob" + required_arguments = ['modelGroupId'] + resource_path = "/modelGroups/{modelGroupId}/actions/deactivate" + method = "POST" + operation_name = "deactivate_model_group" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/ModelGroup/DeactivateModelGroup" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "if_match", - "opc_request_id", - "delete_related_job_runs" + "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_job got unknown kwargs: {extra_kwargs!r}") + f"deactivate_model_group got unknown kwargs: {extra_kwargs!r}") path_params = { - "jobId": job_id + "modelGroupId": model_group_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -5434,11 +5808,6 @@ def delete_job(self, job_id, **kwargs): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') - query_params = { - "deleteRelatedJobRuns": kwargs.get("delete_related_job_runs", 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", @@ -5463,8 +5832,8 @@ def delete_job(self, job_id, **kwargs): resource_path=resource_path, method=method, path_params=path_params, - query_params=query_params, header_params=header_params, + response_type="ModelGroup", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -5474,20 +5843,20 @@ def delete_job(self, job_id, **kwargs): resource_path=resource_path, method=method, path_params=path_params, - query_params=query_params, header_params=header_params, + response_type="ModelGroup", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def delete_job_run(self, job_run_id, **kwargs): + def deactivate_notebook_session(self, notebook_session_id, **kwargs): """ - Deletes a job run. + Deactivates the notebook session. - :param str job_run_id: (required) - The `OCID`__ of the job run. + :param str notebook_session_id: (required) + The `OCID`__ of the notebook session. __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm @@ -5504,7 +5873,7 @@ def delete_job_run(self, job_run_id, **kwargs): :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. + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here `__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. @@ -5517,14 +5886,14 @@ def delete_job_run(self, job_run_id, **kwargs): :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use delete_job_run API. + Click `here `__ to see an example of how to use deactivate_notebook_session API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['jobRunId'] - resource_path = "/jobRuns/{jobRunId}" - method = "DELETE" - operation_name = "delete_job_run" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/JobRun/DeleteJobRun" + required_arguments = ['notebookSessionId'] + resource_path = "/notebookSessions/{notebookSessionId}/actions/deactivate" + method = "POST" + operation_name = "deactivate_notebook_session" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/NotebookSession/DeactivateNotebookSession" # Don't accept unknown kwargs expected_kwargs = [ @@ -5536,10 +5905,10 @@ def delete_job_run(self, job_run_id, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"delete_job_run got unknown kwargs: {extra_kwargs!r}") + f"deactivate_notebook_session got unknown kwargs: {extra_kwargs!r}") path_params = { - "jobRunId": job_run_id + "notebookSessionId": notebook_session_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -5560,8 +5929,6 @@ def delete_job_run(self, job_run_id, **kwargs): 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): @@ -5588,13 +5955,16 @@ def delete_job_run(self, job_run_id, **kwargs): api_reference_link=api_reference_link, required_arguments=required_arguments) - def delete_ml_application(self, ml_application_id, **kwargs): + def deactivate_schedule(self, schedule_id, **kwargs): """ - Deletes a MlApplication resource by identifier + Deactivate schedule. - :param str ml_application_id: (required) - unique MlApplication identifier + :param str schedule_id: (required) + unique Schedule identifier + + :param str opc_request_id: (optional) + Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call @@ -5603,8 +5973,8 @@ def delete_ml_application(self, ml_application_id, **kwargs): The resource is 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, then 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. @@ -5622,29 +5992,30 @@ def delete_ml_application(self, ml_application_id, **kwargs): :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use delete_ml_application API. + Click `here `__ to see an example of how to use deactivate_schedule API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['mlApplicationId'] - resource_path = "/mlApplications/{mlApplicationId}" - method = "DELETE" - operation_name = "delete_ml_application" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/MlApplication/DeleteMlApplication" + required_arguments = ['scheduleId'] + resource_path = "/schedules/{scheduleId}/actions/deactivate" + method = "POST" + operation_name = "deactivate_schedule" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Schedule/DeactivateSchedule" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", + "opc_request_id", "if_match", - "opc_request_id" + "opc_retry_token" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"delete_ml_application got unknown kwargs: {extra_kwargs!r}") + f"deactivate_schedule got unknown kwargs: {extra_kwargs!r}") path_params = { - "mlApplicationId": ml_application_id + "scheduleId": schedule_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -5656,8 +6027,9 @@ def delete_ml_application(self, ml_application_id, **kwargs): header_params = { "accept": "application/json", "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing), "if-match": kwargs.get("if_match", missing), - "opc-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} @@ -5670,6 +6042,7 @@ def delete_ml_application(self, ml_application_id, **kwargs): if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( @@ -5693,13 +6066,16 @@ def delete_ml_application(self, ml_application_id, **kwargs): api_reference_link=api_reference_link, required_arguments=required_arguments) - def delete_ml_application_implementation(self, ml_application_implementation_id, **kwargs): + def delete_data_science_private_endpoint(self, data_science_private_endpoint_id, **kwargs): """ - Deletes a MlApplicationImplementation resource by identifier + Deletes a private endpoint using `privateEndpointId`. - :param str ml_application_implementation_id: (required) - unique MlApplicationImplementation identifier + :param str data_science_private_endpoint_id: (required) + The unique ID for a Data Science private endpoint. + + :param str opc_request_id: (optional) + Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call @@ -5708,13 +6084,10 @@ def delete_ml_application_implementation(self, ml_application_implementation_id, The resource is 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, then 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. + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here `__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. @@ -5727,29 +6100,29 @@ def delete_ml_application_implementation(self, ml_application_implementation_id, :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use delete_ml_application_implementation API. + Click `here `__ to see an example of how to use delete_data_science_private_endpoint API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['mlApplicationImplementationId'] - resource_path = "/mlApplicationImplementations/{mlApplicationImplementationId}" + required_arguments = ['dataSciencePrivateEndpointId'] + resource_path = "/dataSciencePrivateEndpoints/{dataSciencePrivateEndpointId}" method = "DELETE" - operation_name = "delete_ml_application_implementation" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/MlApplicationImplementation/DeleteMlApplicationImplementation" + operation_name = "delete_data_science_private_endpoint" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/DataSciencePrivateEndpoint/DeleteDataSciencePrivateEndpoint" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "if_match", - "opc_request_id" + "opc_request_id", + "if_match" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"delete_ml_application_implementation got unknown kwargs: {extra_kwargs!r}") + f"delete_data_science_private_endpoint got unknown kwargs: {extra_kwargs!r}") path_params = { - "mlApplicationImplementationId": ml_application_implementation_id + "dataSciencePrivateEndpointId": data_science_private_endpoint_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -5761,8 +6134,8 @@ def delete_ml_application_implementation(self, ml_application_implementation_id, 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-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} @@ -5770,8 +6143,6 @@ def delete_ml_application_implementation(self, ml_application_implementation_id, 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): @@ -5798,13 +6169,15 @@ def delete_ml_application_implementation(self, ml_application_implementation_id, api_reference_link=api_reference_link, required_arguments=required_arguments) - def delete_ml_application_instance(self, ml_application_instance_id, **kwargs): + def delete_job(self, job_id, **kwargs): """ - Deletes a MlApplicationInstance resource by identifier + Deletes a job. - :param str ml_application_instance_id: (required) - unique MlApplicationInstance identifier + :param str job_id: (required) + The `OCID`__ of the job. + + __ 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 @@ -5816,6 +6189,9 @@ def delete_ml_application_instance(self, ml_application_instance_id, **kwargs): :param str opc_request_id: (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID. + :param bool delete_related_job_runs: (optional) + Delete all JobRuns associated with this job. + :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. @@ -5832,29 +6208,30 @@ def delete_ml_application_instance(self, ml_application_instance_id, **kwargs): :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use delete_ml_application_instance API. + Click `here `__ to see an example of how to use delete_job API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['mlApplicationInstanceId'] - resource_path = "/mlApplicationInstances/{mlApplicationInstanceId}" + required_arguments = ['jobId'] + resource_path = "/jobs/{jobId}" method = "DELETE" - operation_name = "delete_ml_application_instance" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/MlApplicationInstance/DeleteMlApplicationInstance" + operation_name = "delete_job" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Job/DeleteJob" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "if_match", - "opc_request_id" + "opc_request_id", + "delete_related_job_runs" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"delete_ml_application_instance got unknown kwargs: {extra_kwargs!r}") + f"delete_job got unknown kwargs: {extra_kwargs!r}") path_params = { - "mlApplicationInstanceId": ml_application_instance_id + "jobId": job_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -5863,6 +6240,11 @@ def delete_ml_application_instance(self, ml_application_instance_id, **kwargs): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + query_params = { + "deleteRelatedJobRuns": kwargs.get("delete_related_job_runs", 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", @@ -5887,6 +6269,7 @@ def delete_ml_application_instance(self, ml_application_instance_id, **kwargs): resource_path=resource_path, method=method, path_params=path_params, + query_params=query_params, header_params=header_params, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, @@ -5897,19 +6280,20 @@ def delete_ml_application_instance(self, ml_application_instance_id, **kwargs): resource_path=resource_path, method=method, path_params=path_params, + query_params=query_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): + def delete_job_run(self, job_run_id, **kwargs): """ - Deletes the specified model. + Deletes a job run. - :param str model_id: (required) - The `OCID`__ of the model. + :param str job_run_id: (required) + The `OCID`__ of the job run. __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm @@ -5939,14 +6323,14 @@ def delete_model(self, model_id, **kwargs): :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use delete_model API. + Click `here `__ to see an example of how to use delete_job_run API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['modelId'] - resource_path = "/models/{modelId}" + required_arguments = ['jobRunId'] + resource_path = "/jobRuns/{jobRunId}" method = "DELETE" - operation_name = "delete_model" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Model/DeleteModel" + operation_name = "delete_job_run" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/JobRun/DeleteJobRun" # Don't accept unknown kwargs expected_kwargs = [ @@ -5958,10 +6342,10 @@ def delete_model(self, model_id, **kwargs): 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}") + f"delete_job_run got unknown kwargs: {extra_kwargs!r}") path_params = { - "modelId": model_id + "jobRunId": job_run_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -6010,21 +6394,13 @@ def delete_model(self, model_id, **kwargs): api_reference_link=api_reference_link, required_arguments=required_arguments) - def delete_model_custom_metadatum_artifact(self, model_id, metadatum_key_name, **kwargs): + def delete_ml_application(self, ml_application_id, **kwargs): """ - Deletes model custom metadata artifact for specified model metadata key. - - - :param str model_id: (required) - The `OCID`__ of the model. - - __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + Deletes a MlApplication resource by identifier - :param str metadatum_key_name: (required) - The name of the model metadatum in the metadata. - :param str opc_request_id: (optional) - Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID. + :param str ml_application_id: (required) + unique MlApplication identifier :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call @@ -6033,6 +6409,9 @@ def delete_model_custom_metadatum_artifact(self, model_id, metadatum_key_name, * The resource is 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, then 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. @@ -6049,30 +6428,29 @@ def delete_model_custom_metadatum_artifact(self, model_id, metadatum_key_name, * :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use delete_model_custom_metadatum_artifact API. + Click `here `__ to see an example of how to use delete_ml_application API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['modelId', 'metadatumKeyName'] - resource_path = "/models/{modelId}/customMetadata/{metadatumKeyName}/artifact" + required_arguments = ['mlApplicationId'] + resource_path = "/mlApplications/{mlApplicationId}" method = "DELETE" - operation_name = "delete_model_custom_metadatum_artifact" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Model/DeleteModelCustomMetadatumArtifact" + operation_name = "delete_ml_application" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/MlApplication/DeleteMlApplication" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "opc_request_id", - "if_match" + "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_custom_metadatum_artifact got unknown kwargs: {extra_kwargs!r}") + f"delete_ml_application got unknown kwargs: {extra_kwargs!r}") path_params = { - "modelId": model_id, - "metadatumKeyName": metadatum_key_name + "mlApplicationId": ml_application_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -6084,8 +6462,8 @@ def delete_model_custom_metadatum_artifact(self, model_id, metadatum_key_name, * 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) + "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} @@ -6121,21 +6499,13 @@ def delete_model_custom_metadatum_artifact(self, model_id, metadatum_key_name, * api_reference_link=api_reference_link, required_arguments=required_arguments) - def delete_model_defined_metadatum_artifact(self, model_id, metadatum_key_name, **kwargs): + def delete_ml_application_implementation(self, ml_application_implementation_id, **kwargs): """ - Deletes model defined metadata artifact for specified model metadata key. - - - :param str model_id: (required) - The `OCID`__ of the model. - - __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + Deletes a MlApplicationImplementation resource by identifier - :param str metadatum_key_name: (required) - The name of the model metadatum in the metadata. - :param str opc_request_id: (optional) - Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID. + :param str ml_application_implementation_id: (required) + unique MlApplicationImplementation identifier :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call @@ -6144,6 +6514,9 @@ def delete_model_defined_metadatum_artifact(self, model_id, metadatum_key_name, The resource is 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, then 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. @@ -6160,30 +6533,29 @@ def delete_model_defined_metadatum_artifact(self, model_id, metadatum_key_name, :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use delete_model_defined_metadatum_artifact API. + Click `here `__ to see an example of how to use delete_ml_application_implementation API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['modelId', 'metadatumKeyName'] - resource_path = "/models/{modelId}/definedMetadata/{metadatumKeyName}/artifact" + required_arguments = ['mlApplicationImplementationId'] + resource_path = "/mlApplicationImplementations/{mlApplicationImplementationId}" method = "DELETE" - operation_name = "delete_model_defined_metadatum_artifact" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Model/DeleteModelDefinedMetadatumArtifact" + operation_name = "delete_ml_application_implementation" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/MlApplicationImplementation/DeleteMlApplicationImplementation" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "opc_request_id", - "if_match" + "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_defined_metadatum_artifact got unknown kwargs: {extra_kwargs!r}") + f"delete_ml_application_implementation got unknown kwargs: {extra_kwargs!r}") path_params = { - "modelId": model_id, - "metadatumKeyName": metadatum_key_name + "mlApplicationImplementationId": ml_application_implementation_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -6195,8 +6567,8 @@ def delete_model_defined_metadatum_artifact(self, model_id, metadatum_key_name, 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) + "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} @@ -6232,15 +6604,13 @@ def delete_model_defined_metadatum_artifact(self, model_id, metadatum_key_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def delete_model_deployment(self, model_deployment_id, **kwargs): + def delete_ml_application_instance(self, ml_application_instance_id, **kwargs): """ - Deletes the specified model deployment. Any unsaved work in this model deployment is lost. - + Deletes a MlApplicationInstance resource by identifier - :param str model_deployment_id: (required) - The `OCID`__ of the model deployment. - __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + :param str ml_application_instance_id: (required) + unique MlApplicationInstance identifier :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call @@ -6268,14 +6638,14 @@ def delete_model_deployment(self, model_deployment_id, **kwargs): :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use delete_model_deployment API. + Click `here `__ to see an example of how to use delete_ml_application_instance API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['modelDeploymentId'] - resource_path = "/modelDeployments/{modelDeploymentId}" + required_arguments = ['mlApplicationInstanceId'] + resource_path = "/mlApplicationInstances/{mlApplicationInstanceId}" method = "DELETE" - operation_name = "delete_model_deployment" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/ModelDeployment/DeleteModelDeployment" + operation_name = "delete_ml_application_instance" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/MlApplicationInstance/DeleteMlApplicationInstance" # Don't accept unknown kwargs expected_kwargs = [ @@ -6287,10 +6657,10 @@ def delete_model_deployment(self, model_deployment_id, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"delete_model_deployment got unknown kwargs: {extra_kwargs!r}") + f"delete_ml_application_instance got unknown kwargs: {extra_kwargs!r}") path_params = { - "modelDeploymentId": model_deployment_id + "mlApplicationInstanceId": ml_application_instance_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -6339,20 +6709,16 @@ def delete_model_deployment(self, model_deployment_id, **kwargs): api_reference_link=api_reference_link, required_arguments=required_arguments) - def delete_model_version_set(self, model_version_set_id, **kwargs): + def delete_model(self, model_id, **kwargs): """ - Deletes the specified modelVersionSet. + Deletes the specified model. - :param str model_version_set_id: (required) - The `OCID`__ of the model version set. + :param str model_id: (required) + The `OCID`__ of the model. __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm - :param bool is_delete_related_models: (optional) - By default, this parameter is false. A model version set can only be deleted if all the models associate with it are already in the DELETED state. - You can optionally specify the deleteRelatedModels boolean query parameters to true, which deletes all associated models for you. - :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 @@ -6379,30 +6745,29 @@ def delete_model_version_set(self, model_version_set_id, **kwargs): :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use delete_model_version_set API. + 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 = ['modelVersionSetId'] - resource_path = "/modelVersionSets/{modelVersionSetId}" + required_arguments = ['modelId'] + resource_path = "/models/{modelId}" method = "DELETE" - operation_name = "delete_model_version_set" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/ModelVersionSet/DeleteModelVersionSet" + operation_name = "delete_model" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Model/DeleteModel" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "is_delete_related_models", "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_version_set got unknown kwargs: {extra_kwargs!r}") + f"delete_model got unknown kwargs: {extra_kwargs!r}") path_params = { - "modelVersionSetId": model_version_set_id + "modelId": model_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -6411,11 +6776,6 @@ def delete_model_version_set(self, model_version_set_id, **kwargs): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') - query_params = { - "isDeleteRelatedModels": kwargs.get("is_delete_related_models", 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", @@ -6440,7 +6800,6 @@ def delete_model_version_set(self, model_version_set_id, **kwargs): resource_path=resource_path, method=method, path_params=path_params, - query_params=query_params, header_params=header_params, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, @@ -6451,23 +6810,28 @@ def delete_model_version_set(self, model_version_set_id, **kwargs): resource_path=resource_path, method=method, path_params=path_params, - query_params=query_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_notebook_session(self, notebook_session_id, **kwargs): + def delete_model_custom_metadatum_artifact(self, model_id, metadatum_key_name, **kwargs): """ - Deletes the specified notebook session. Any unsaved work in this notebook session are lost. + Deletes model custom metadata artifact for specified model metadata key. - :param str notebook_session_id: (required) - The `OCID`__ of the notebook session. + :param str model_id: (required) + The `OCID`__ of the model. __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + :param str metadatum_key_name: (required) + The name of the model metadatum in the metadata. + + :param str opc_request_id: (optional) + Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then 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 @@ -6475,9 +6839,6 @@ def delete_notebook_session(self, notebook_session_id, **kwargs): The resource is 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, then 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. @@ -6494,29 +6855,30 @@ def delete_notebook_session(self, notebook_session_id, **kwargs): :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use delete_notebook_session API. + Click `here `__ to see an example of how to use delete_model_custom_metadatum_artifact API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['notebookSessionId'] - resource_path = "/notebookSessions/{notebookSessionId}" + required_arguments = ['modelId', 'metadatumKeyName'] + resource_path = "/models/{modelId}/customMetadata/{metadatumKeyName}/artifact" method = "DELETE" - operation_name = "delete_notebook_session" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/NotebookSession/DeleteNotebookSession" + operation_name = "delete_model_custom_metadatum_artifact" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Model/DeleteModelCustomMetadatumArtifact" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "if_match", - "opc_request_id" + "opc_request_id", + "if_match" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"delete_notebook_session got unknown kwargs: {extra_kwargs!r}") + f"delete_model_custom_metadatum_artifact got unknown kwargs: {extra_kwargs!r}") path_params = { - "notebookSessionId": notebook_session_id + "modelId": model_id, + "metadatumKeyName": metadatum_key_name } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -6528,8 +6890,8 @@ def delete_notebook_session(self, notebook_session_id, **kwargs): header_params = { "accept": "application/json", "content-type": "application/json", - "if-match": kwargs.get("if_match", missing), - "opc-request-id": kwargs.get("opc_request_id", missing) + "opc-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} @@ -6565,21 +6927,21 @@ def delete_notebook_session(self, notebook_session_id, **kwargs): api_reference_link=api_reference_link, required_arguments=required_arguments) - def delete_pipeline(self, pipeline_id, **kwargs): + def delete_model_defined_metadatum_artifact(self, model_id, metadatum_key_name, **kwargs): """ - Deletes a Pipeline resource by identifier. + Deletes model defined metadata artifact for specified model metadata key. - :param str pipeline_id: (required) - The `OCID`__ of the pipeline. + :param str model_id: (required) + The `OCID`__ of the model. __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm - :param bool delete_related_pipeline_runs: (optional) - A boolean value to specify whether to delete related PipelineRuns or not. + :param str metadatum_key_name: (required) + The name of the model metadatum in the metadata. - :param bool delete_related_job_runs: (optional) - A boolean value to specify whether to delete related jobRuns or not. + :param str opc_request_id: (optional) + Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call @@ -6588,13 +6950,10 @@ def delete_pipeline(self, pipeline_id, **kwargs): The resource is 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, then provide the request ID. - :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. - This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + 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`. @@ -6607,31 +6966,30 @@ def delete_pipeline(self, pipeline_id, **kwargs): :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use delete_pipeline API. + Click `here `__ to see an example of how to use delete_model_defined_metadatum_artifact API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['pipelineId'] - resource_path = "/pipelines/{pipelineId}" + required_arguments = ['modelId', 'metadatumKeyName'] + resource_path = "/models/{modelId}/definedMetadata/{metadatumKeyName}/artifact" method = "DELETE" - operation_name = "delete_pipeline" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Pipeline/DeletePipeline" + operation_name = "delete_model_defined_metadatum_artifact" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Model/DeleteModelDefinedMetadatumArtifact" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "delete_related_pipeline_runs", - "delete_related_job_runs", - "if_match", - "opc_request_id" + "opc_request_id", + "if_match" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"delete_pipeline got unknown kwargs: {extra_kwargs!r}") + f"delete_model_defined_metadatum_artifact got unknown kwargs: {extra_kwargs!r}") path_params = { - "pipelineId": pipeline_id + "modelId": model_id, + "metadatumKeyName": metadatum_key_name } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -6640,17 +6998,11 @@ def delete_pipeline(self, pipeline_id, **kwargs): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') - query_params = { - "deleteRelatedPipelineRuns": kwargs.get("delete_related_pipeline_runs", missing), - "deleteRelatedJobRuns": kwargs.get("delete_related_job_runs", 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", - "if-match": kwargs.get("if_match", missing), - "opc-request-id": kwargs.get("opc_request_id", missing) + "opc-request-id": kwargs.get("opc_request_id", missing), + "if-match": kwargs.get("if_match", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} @@ -6658,6 +7010,8 @@ def delete_pipeline(self, pipeline_id, **kwargs): 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): @@ -6668,7 +7022,6 @@ def delete_pipeline(self, pipeline_id, **kwargs): resource_path=resource_path, method=method, path_params=path_params, - query_params=query_params, header_params=header_params, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, @@ -6679,26 +7032,22 @@ def delete_pipeline(self, pipeline_id, **kwargs): resource_path=resource_path, method=method, path_params=path_params, - query_params=query_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_pipeline_run(self, pipeline_run_id, **kwargs): + def delete_model_deployment(self, model_deployment_id, **kwargs): """ - Deletes a PipelineRun resource by identifier. + Deletes the specified model deployment. Any unsaved work in this model deployment is lost. - :param str pipeline_run_id: (required) - The `OCID`__ of the pipeline run. + :param str model_deployment_id: (required) + The `OCID`__ of the model deployment. __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm - :param bool delete_related_job_runs: (optional) - A boolean value to specify whether to delete related jobRuns or not. - :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 @@ -6712,7 +7061,7 @@ def delete_pipeline_run(self, pipeline_run_id, **kwargs): :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. - This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + 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`. @@ -6725,30 +7074,29 @@ def delete_pipeline_run(self, pipeline_run_id, **kwargs): :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use delete_pipeline_run API. + Click `here `__ to see an example of how to use delete_model_deployment API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['pipelineRunId'] - resource_path = "/pipelineRuns/{pipelineRunId}" + required_arguments = ['modelDeploymentId'] + resource_path = "/modelDeployments/{modelDeploymentId}" method = "DELETE" - operation_name = "delete_pipeline_run" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/PipelineRun/DeletePipelineRun" + operation_name = "delete_model_deployment" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/ModelDeployment/DeleteModelDeployment" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "delete_related_job_runs", "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_pipeline_run got unknown kwargs: {extra_kwargs!r}") + f"delete_model_deployment got unknown kwargs: {extra_kwargs!r}") path_params = { - "pipelineRunId": pipeline_run_id + "modelDeploymentId": model_deployment_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -6757,11 +7105,6 @@ def delete_pipeline_run(self, pipeline_run_id, **kwargs): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') - query_params = { - "deleteRelatedJobRuns": kwargs.get("delete_related_job_runs", 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", @@ -6774,6 +7117,8 @@ def delete_pipeline_run(self, pipeline_run_id, **kwargs): 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): @@ -6784,7 +7129,6 @@ def delete_pipeline_run(self, pipeline_run_id, **kwargs): resource_path=resource_path, method=method, path_params=path_params, - query_params=query_params, header_params=header_params, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, @@ -6795,23 +7139,25 @@ def delete_pipeline_run(self, pipeline_run_id, **kwargs): resource_path=resource_path, method=method, path_params=path_params, - query_params=query_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_project(self, project_id, **kwargs): + def delete_model_group(self, model_group_id, **kwargs): """ - Deletes the specified project. This operation fails unless all associated resources (notebook sessions or models) are in a DELETED state. You must delete all associated resources before deleting a project. + Deletes the specified Model Group. - :param str project_id: (required) - The `OCID`__ of the project. + :param str model_group_id: (required) + The `OCID`__ of the modelGroup. __ 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, then 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 @@ -6819,13 +7165,10 @@ def delete_project(self, project_id, **kwargs): The resource is 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, then 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. + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here `__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. @@ -6838,29 +7181,29 @@ def delete_project(self, project_id, **kwargs): :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use delete_project API. + Click `here `__ to see an example of how to use delete_model_group API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['projectId'] - resource_path = "/projects/{projectId}" + required_arguments = ['modelGroupId'] + resource_path = "/modelGroups/{modelGroupId}" method = "DELETE" - operation_name = "delete_project" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Project/DeleteProject" + operation_name = "delete_model_group" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/ModelGroup/DeleteModelGroup" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "if_match", - "opc_request_id" + "opc_request_id", + "if_match" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"delete_project got unknown kwargs: {extra_kwargs!r}") + f"delete_model_group got unknown kwargs: {extra_kwargs!r}") path_params = { - "projectId": project_id + "modelGroupId": model_group_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -6872,8 +7215,8 @@ def delete_project(self, project_id, **kwargs): header_params = { "accept": "application/json", "content-type": "application/json", - "if-match": kwargs.get("if_match", missing), - "opc-request-id": kwargs.get("opc_request_id", missing) + "opc-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} @@ -6881,8 +7224,6 @@ def delete_project(self, project_id, **kwargs): 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): @@ -6909,13 +7250,18 @@ def delete_project(self, project_id, **kwargs): api_reference_link=api_reference_link, required_arguments=required_arguments) - def delete_schedule(self, schedule_id, **kwargs): + def delete_model_group_version_history(self, model_group_version_history_id, **kwargs): """ - Deletes a Schedule resource by identifier + Deletes the specified modelGroupVersionHistory. - :param str schedule_id: (required) - unique Schedule identifier + :param str model_group_version_history_id: (required) + The `OCID`__ of the modelGroupVersionHistory. + + __ 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, then provide the request ID. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call @@ -6924,9 +7270,6 @@ def delete_schedule(self, schedule_id, **kwargs): The resource is 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, then 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. @@ -6943,29 +7286,29 @@ def delete_schedule(self, schedule_id, **kwargs): :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use delete_schedule API. + Click `here `__ to see an example of how to use delete_model_group_version_history API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['scheduleId'] - resource_path = "/schedules/{scheduleId}" + required_arguments = ['modelGroupVersionHistoryId'] + resource_path = "/modelGroupVersionHistory/{modelGroupVersionHistoryId}" method = "DELETE" - operation_name = "delete_schedule" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Schedule/DeleteSchedule" + operation_name = "delete_model_group_version_history" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/ModelGroupVersionHistory/DeleteModelGroupVersionHistory" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "if_match", - "opc_request_id" + "opc_request_id", + "if_match" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"delete_schedule got unknown kwargs: {extra_kwargs!r}") + f"delete_model_group_version_history got unknown kwargs: {extra_kwargs!r}") path_params = { - "scheduleId": schedule_id + "modelGroupVersionHistoryId": model_group_version_history_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -6977,8 +7320,8 @@ def delete_schedule(self, schedule_id, **kwargs): header_params = { "accept": "application/json", "content-type": "application/json", - "if-match": kwargs.get("if_match", missing), - "opc-request-id": kwargs.get("opc_request_id", missing) + "opc-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} @@ -7012,16 +7355,19 @@ def delete_schedule(self, schedule_id, **kwargs): api_reference_link=api_reference_link, required_arguments=required_arguments) - def disable_ml_application_instance_view_trigger(self, disable_ml_application_instance_view_trigger_details, ml_application_instance_view_id, **kwargs): + def delete_model_version_set(self, model_version_set_id, **kwargs): """ - Disable trigger of given name for given ML Application Instance View flow + Deletes the specified modelVersionSet. - :param oci.data_science.models.DisableMlApplicationInstanceViewTriggerDetails disable_ml_application_instance_view_trigger_details: (required) - Details for disable trigger request. + :param str model_version_set_id: (required) + The `OCID`__ of the model version set. - :param str ml_application_instance_view_id: (required) - unique MlApplicationInstanceView identifier + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param bool is_delete_related_models: (optional) + By default, this parameter is false. A model version set can only be deleted if all the models associate with it are already in the DELETED state. + You can optionally specify the deleteRelatedModels boolean query parameters to true, which deletes all associated models for you. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call @@ -7033,9 +7379,6 @@ def disable_ml_application_instance_view_trigger(self, disable_ml_application_in :param str opc_request_id: (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then 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. @@ -7048,34 +7391,34 @@ def disable_ml_application_instance_view_trigger(self, disable_ml_application_in allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_science.models.MlApplicationInstanceView` + :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 disable_ml_application_instance_view_trigger API. + Click `here `__ to see an example of how to use delete_model_version_set API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['mlApplicationInstanceViewId'] - resource_path = "/mlApplicationInstanceViews/{mlApplicationInstanceViewId}/actions/disableTrigger" - method = "POST" - operation_name = "disable_ml_application_instance_view_trigger" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/MlApplicationInstanceView/DisableMlApplicationInstanceViewTrigger" + required_arguments = ['modelVersionSetId'] + resource_path = "/modelVersionSets/{modelVersionSetId}" + method = "DELETE" + operation_name = "delete_model_version_set" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/ModelVersionSet/DeleteModelVersionSet" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", + "is_delete_related_models", "if_match", - "opc_request_id", - "opc_retry_token" + "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"disable_ml_application_instance_view_trigger got unknown kwargs: {extra_kwargs!r}") + f"delete_model_version_set got unknown kwargs: {extra_kwargs!r}") path_params = { - "mlApplicationInstanceViewId": ml_application_instance_view_id + "modelVersionSetId": model_version_set_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -7084,12 +7427,16 @@ def disable_ml_application_instance_view_trigger(self, disable_ml_application_in 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') + query_params = { + "isDeleteRelatedModels": kwargs.get("is_delete_related_models", 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", "if-match": kwargs.get("if_match", missing), - "opc-request-id": kwargs.get("opc_request_id", missing), - "opc-retry-token": kwargs.get("opc_retry_token", missing) + "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} @@ -7102,7 +7449,6 @@ def disable_ml_application_instance_view_trigger(self, disable_ml_application_in 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( @@ -7110,9 +7456,8 @@ def disable_ml_application_instance_view_trigger(self, disable_ml_application_in resource_path=resource_path, method=method, path_params=path_params, + query_params=query_params, header_params=header_params, - body=disable_ml_application_instance_view_trigger_details, - response_type="MlApplicationInstanceView", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -7122,24 +7467,22 @@ def disable_ml_application_instance_view_trigger(self, disable_ml_application_in resource_path=resource_path, method=method, path_params=path_params, + query_params=query_params, header_params=header_params, - body=disable_ml_application_instance_view_trigger_details, - response_type="MlApplicationInstanceView", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def enable_ml_application_instance_view_trigger(self, enable_ml_application_instance_view_trigger_details, ml_application_instance_view_id, **kwargs): + def delete_notebook_session(self, notebook_session_id, **kwargs): """ - Enable trigger of given name for given ML Application Instance View flow + Deletes the specified notebook session. Any unsaved work in this notebook session are lost. - :param oci.data_science.models.EnableMlApplicationInstanceViewTriggerDetails enable_ml_application_instance_view_trigger_details: (required) - Details for enable trigger request. + :param str notebook_session_id: (required) + The `OCID`__ of the notebook session. - :param str ml_application_instance_view_id: (required) - unique MlApplicationInstanceView identifier + __ 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 @@ -7151,9 +7494,6 @@ def enable_ml_application_instance_view_trigger(self, enable_ml_application_inst :param str opc_request_id: (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then 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. @@ -7166,34 +7506,33 @@ def enable_ml_application_instance_view_trigger(self, enable_ml_application_inst allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_science.models.MlApplicationInstanceView` + :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 enable_ml_application_instance_view_trigger API. + Click `here `__ to see an example of how to use delete_notebook_session API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['mlApplicationInstanceViewId'] - resource_path = "/mlApplicationInstanceViews/{mlApplicationInstanceViewId}/actions/enableTrigger" - method = "POST" - operation_name = "enable_ml_application_instance_view_trigger" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/MlApplicationInstanceView/EnableMlApplicationInstanceViewTrigger" + required_arguments = ['notebookSessionId'] + resource_path = "/notebookSessions/{notebookSessionId}" + method = "DELETE" + operation_name = "delete_notebook_session" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/NotebookSession/DeleteNotebookSession" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "if_match", - "opc_request_id", - "opc_retry_token" + "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"enable_ml_application_instance_view_trigger got unknown kwargs: {extra_kwargs!r}") + f"delete_notebook_session got unknown kwargs: {extra_kwargs!r}") path_params = { - "mlApplicationInstanceViewId": ml_application_instance_view_id + "notebookSessionId": notebook_session_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -7206,8 +7545,7 @@ def enable_ml_application_instance_view_trigger(self, enable_ml_application_inst "accept": "application/json", "content-type": "application/json", "if-match": kwargs.get("if_match", missing), - "opc-request-id": kwargs.get("opc_request_id", missing), - "opc-retry-token": kwargs.get("opc_retry_token", missing) + "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} @@ -7220,7 +7558,6 @@ def enable_ml_application_instance_view_trigger(self, enable_ml_application_inst 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( @@ -7229,8 +7566,6 @@ def enable_ml_application_instance_view_trigger(self, enable_ml_application_inst method=method, path_params=path_params, header_params=header_params, - body=enable_ml_application_instance_view_trigger_details, - response_type="MlApplicationInstanceView", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -7241,31 +7576,26 @@ def enable_ml_application_instance_view_trigger(self, enable_ml_application_inst method=method, path_params=path_params, header_params=header_params, - body=enable_ml_application_instance_view_trigger_details, - response_type="MlApplicationInstanceView", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def export_model_artifact(self, model_id, export_model_artifact_details, **kwargs): + def delete_pipeline(self, pipeline_id, **kwargs): """ - Export model artifact from source to the service bucket + Deletes a Pipeline resource by identifier. - :param str model_id: (required) - The `OCID`__ of the model. + :param str pipeline_id: (required) + The `OCID`__ of the pipeline. __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm - :param oci.data_science.models.ExportModelArtifactDetails export_model_artifact_details: (required) - Model artifact source details for exporting. - - :param str opc_request_id: (optional) - Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID. + :param bool delete_related_pipeline_runs: (optional) + A boolean value to specify whether to delete related PipelineRuns or not. - :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 bool delete_related_job_runs: (optional) + A boolean value to specify whether to delete related jobRuns or not. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call @@ -7274,10 +7604,13 @@ def export_model_artifact(self, model_id, export_model_artifact_details, **kwarg The resource is 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, then 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. + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here `__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. @@ -7290,30 +7623,31 @@ def export_model_artifact(self, model_id, export_model_artifact_details, **kwarg :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use export_model_artifact API. + Click `here `__ to see an example of how to use delete_pipeline API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['modelId'] - resource_path = "/models/{modelId}/actions/exportArtifact" - method = "POST" - operation_name = "export_model_artifact" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Model/ExportModelArtifact" + required_arguments = ['pipelineId'] + resource_path = "/pipelines/{pipelineId}" + method = "DELETE" + operation_name = "delete_pipeline" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Pipeline/DeletePipeline" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "opc_request_id", - "opc_retry_token", - "if_match" + "delete_related_pipeline_runs", + "delete_related_job_runs", + "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"export_model_artifact got unknown kwargs: {extra_kwargs!r}") + f"delete_pipeline got unknown kwargs: {extra_kwargs!r}") path_params = { - "modelId": model_id + "pipelineId": pipeline_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -7322,12 +7656,17 @@ def export_model_artifact(self, model_id, export_model_artifact_details, **kwarg 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') + query_params = { + "deleteRelatedPipelineRuns": kwargs.get("delete_related_pipeline_runs", missing), + "deleteRelatedJobRuns": kwargs.get("delete_related_job_runs", 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), - "opc-retry-token": kwargs.get("opc_retry_token", missing), - "if-match": kwargs.get("if_match", missing) + "if-match": kwargs.get("if_match", missing), + "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} @@ -7335,12 +7674,9 @@ def export_model_artifact(self, model_id, export_model_artifact_details, **kwarg 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( @@ -7348,8 +7684,8 @@ def export_model_artifact(self, model_id, export_model_artifact_details, **kwarg resource_path=resource_path, method=method, path_params=path_params, + query_params=query_params, header_params=header_params, - body=export_model_artifact_details, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -7359,20 +7695,32 @@ def export_model_artifact(self, model_id, export_model_artifact_details, **kwarg resource_path=resource_path, method=method, path_params=path_params, + query_params=query_params, header_params=header_params, - body=export_model_artifact_details, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def get_data_science_private_endpoint(self, data_science_private_endpoint_id, **kwargs): + def delete_pipeline_run(self, pipeline_run_id, **kwargs): """ - Retrieves an private endpoint using a `privateEndpointId`. + Deletes a PipelineRun resource by identifier. - :param str data_science_private_endpoint_id: (required) - The unique ID for a Data Science private endpoint. + :param str pipeline_run_id: (required) + The `OCID`__ of the pipeline run. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param bool delete_related_job_runs: (optional) + A boolean value to specify whether to delete related jobRuns or not. + + :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 is 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, then provide the request ID. @@ -7380,7 +7728,7 @@ def get_data_science_private_endpoint(self, data_science_private_endpoint_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. + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here `__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. @@ -7389,32 +7737,34 @@ def get_data_science_private_endpoint(self, data_science_private_endpoint_id, ** allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_science.models.DataSciencePrivateEndpoint` + :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use get_data_science_private_endpoint API. + Click `here `__ to see an example of how to use delete_pipeline_run API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['dataSciencePrivateEndpointId'] - resource_path = "/dataSciencePrivateEndpoints/{dataSciencePrivateEndpointId}" - method = "GET" - operation_name = "get_data_science_private_endpoint" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/DataSciencePrivateEndpoint/GetDataSciencePrivateEndpoint" + required_arguments = ['pipelineRunId'] + resource_path = "/pipelineRuns/{pipelineRunId}" + method = "DELETE" + operation_name = "delete_pipeline_run" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/PipelineRun/DeletePipelineRun" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", + "delete_related_job_runs", + "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"get_data_science_private_endpoint got unknown kwargs: {extra_kwargs!r}") + f"delete_pipeline_run got unknown kwargs: {extra_kwargs!r}") path_params = { - "dataSciencePrivateEndpointId": data_science_private_endpoint_id + "pipelineRunId": pipeline_run_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -7423,9 +7773,15 @@ def get_data_science_private_endpoint(self, data_science_private_endpoint_id, ** 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') + query_params = { + "deleteRelatedJobRuns": kwargs.get("delete_related_job_runs", 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", + "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} @@ -7434,8 +7790,6 @@ def get_data_science_private_endpoint(self, data_science_private_endpoint_id, ** 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): @@ -7446,8 +7800,8 @@ def get_data_science_private_endpoint(self, data_science_private_endpoint_id, ** resource_path=resource_path, method=method, path_params=path_params, + query_params=query_params, header_params=header_params, - response_type="DataSciencePrivateEndpoint", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -7457,23 +7811,30 @@ def get_data_science_private_endpoint(self, data_science_private_endpoint_id, ** resource_path=resource_path, method=method, path_params=path_params, + query_params=query_params, header_params=header_params, - response_type="DataSciencePrivateEndpoint", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def get_job(self, job_id, **kwargs): + def delete_project(self, project_id, **kwargs): """ - Gets a job. + Deletes the specified project. This operation fails unless all associated resources (notebook sessions or models) are in a DELETED state. You must delete all associated resources before deleting a project. - :param str job_id: (required) - The `OCID`__ of the job. + :param str project_id: (required) + The `OCID`__ of the project. __ 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 is 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, then provide the request ID. @@ -7489,32 +7850,33 @@ def get_job(self, job_id, **kwargs): allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_science.models.Job` + :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use get_job API. + Click `here `__ to see an example of how to use delete_project API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['jobId'] - resource_path = "/jobs/{jobId}" - method = "GET" - operation_name = "get_job" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Job/GetJob" + required_arguments = ['projectId'] + resource_path = "/projects/{projectId}" + method = "DELETE" + operation_name = "delete_project" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Project/DeleteProject" # 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"get_job got unknown kwargs: {extra_kwargs!r}") + f"delete_project got unknown kwargs: {extra_kwargs!r}") path_params = { - "jobId": job_id + "projectId": project_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -7526,6 +7888,7 @@ def get_job(self, job_id, **kwargs): header_params = { "accept": "application/json", "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} @@ -7547,7 +7910,6 @@ def get_job(self, job_id, **kwargs): method=method, path_params=path_params, header_params=header_params, - response_type="Job", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -7558,35 +7920,33 @@ def get_job(self, job_id, **kwargs): method=method, path_params=path_params, header_params=header_params, - response_type="Job", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def get_job_artifact_content(self, job_id, **kwargs): + def delete_schedule(self, schedule_id, **kwargs): """ - Downloads job artifact content for specified job. + Deletes a Schedule resource by identifier - :param str job_id: (required) - The `OCID`__ of the job. + :param str schedule_id: (required) + unique Schedule identifier - __ 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 is 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, then provide the request ID. - :param str range: (optional) - Optional byte range to fetch, as described in `RFC 7233`__, section 2.1. - Note that only a single range of bytes is supported. - - __ https://tools.ietf.org/html/rfc7232#section-2.1 - :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. + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. The specifics of the default retry strategy are described `here `__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. @@ -7595,33 +7955,33 @@ def get_job_artifact_content(self, job_id, **kwargs): allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type stream + :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use get_job_artifact_content API. + Click `here `__ to see an example of how to use delete_schedule API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['jobId'] - resource_path = "/jobs/{jobId}/artifact/content" - method = "GET" - operation_name = "get_job_artifact_content" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Job/GetJobArtifactContent" + required_arguments = ['scheduleId'] + resource_path = "/schedules/{scheduleId}" + method = "DELETE" + operation_name = "delete_schedule" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Schedule/DeleteSchedule" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "opc_request_id", - "range" + "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"get_job_artifact_content got unknown kwargs: {extra_kwargs!r}") + f"delete_schedule got unknown kwargs: {extra_kwargs!r}") path_params = { - "jobId": job_id + "scheduleId": schedule_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -7631,10 +7991,10 @@ def get_job_artifact_content(self, job_id, **kwargs): raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') header_params = { - "accept": "application/octet-stream", + "accept": "application/json", "content-type": "application/json", - "opc-request-id": kwargs.get("opc_request_id", missing), - "range": kwargs.get("range", missing) + "if-match": kwargs.get("if_match", missing), + "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} @@ -7642,8 +8002,6 @@ def get_job_artifact_content(self, job_id, **kwargs): 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): @@ -7655,7 +8013,6 @@ def get_job_artifact_content(self, job_id, **kwargs): method=method, path_params=path_params, header_params=header_params, - response_type="stream", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -7666,25 +8023,35 @@ def get_job_artifact_content(self, job_id, **kwargs): method=method, path_params=path_params, header_params=header_params, - response_type="stream", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def get_job_run(self, job_run_id, **kwargs): + def disable_ml_application_instance_view_trigger(self, disable_ml_application_instance_view_trigger_details, ml_application_instance_view_id, **kwargs): """ - Gets a job run. + Disable trigger of given name for given ML Application Instance View flow - :param str job_run_id: (required) - The `OCID`__ of the job run. + :param oci.data_science.models.DisableMlApplicationInstanceViewTriggerDetails disable_ml_application_instance_view_trigger_details: (required) + Details for disable trigger request. - __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + :param str ml_application_instance_view_id: (required) + unique MlApplicationInstanceView identifier + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the `if-match` parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource is 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, then 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. @@ -7697,32 +8064,34 @@ def get_job_run(self, job_run_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.data_science.models.JobRun` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_science.models.MlApplicationInstanceView` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use get_job_run API. + Click `here `__ to see an example of how to use disable_ml_application_instance_view_trigger API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['jobRunId'] - resource_path = "/jobRuns/{jobRunId}" - method = "GET" - operation_name = "get_job_run" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/JobRun/GetJobRun" + required_arguments = ['mlApplicationInstanceViewId'] + resource_path = "/mlApplicationInstanceViews/{mlApplicationInstanceViewId}/actions/disableTrigger" + method = "POST" + operation_name = "disable_ml_application_instance_view_trigger" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/MlApplicationInstanceView/DisableMlApplicationInstanceViewTrigger" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "opc_request_id" + "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"get_job_run got unknown kwargs: {extra_kwargs!r}") + f"disable_ml_application_instance_view_trigger got unknown kwargs: {extra_kwargs!r}") path_params = { - "jobRunId": job_run_id + "mlApplicationInstanceViewId": ml_application_instance_view_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -7734,7 +8103,9 @@ def get_job_run(self, job_run_id, **kwargs): header_params = { "accept": "application/json", "content-type": "application/json", - "opc-request-id": kwargs.get("opc_request_id", missing) + "if-match": kwargs.get("if_match", missing), + "opc-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} @@ -7747,6 +8118,7 @@ def get_job_run(self, job_run_id, **kwargs): if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( @@ -7755,7 +8127,8 @@ def get_job_run(self, job_run_id, **kwargs): method=method, path_params=path_params, header_params=header_params, - response_type="JobRun", + body=disable_ml_application_instance_view_trigger_details, + response_type="MlApplicationInstanceView", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -7766,23 +8139,37 @@ def get_job_run(self, job_run_id, **kwargs): method=method, path_params=path_params, header_params=header_params, - response_type="JobRun", + body=disable_ml_application_instance_view_trigger_details, + response_type="MlApplicationInstanceView", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def get_ml_application(self, ml_application_id, **kwargs): + def enable_ml_application_instance_view_trigger(self, enable_ml_application_instance_view_trigger_details, ml_application_instance_view_id, **kwargs): """ - Gets a MlApplication by identifier + Enable trigger of given name for given ML Application Instance View flow - :param str ml_application_id: (required) - unique MlApplication identifier + :param oci.data_science.models.EnableMlApplicationInstanceViewTriggerDetails enable_ml_application_instance_view_trigger_details: (required) + Details for enable trigger request. + + :param str ml_application_instance_view_id: (required) + unique MlApplicationInstanceView identifier + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the `if-match` parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource is 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, then 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. @@ -7795,32 +8182,34 @@ def get_ml_application(self, ml_application_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.data_science.models.MlApplication` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_science.models.MlApplicationInstanceView` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use get_ml_application API. + Click `here `__ to see an example of how to use enable_ml_application_instance_view_trigger API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['mlApplicationId'] - resource_path = "/mlApplications/{mlApplicationId}" - method = "GET" - operation_name = "get_ml_application" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/MlApplication/GetMlApplication" + required_arguments = ['mlApplicationInstanceViewId'] + resource_path = "/mlApplicationInstanceViews/{mlApplicationInstanceViewId}/actions/enableTrigger" + method = "POST" + operation_name = "enable_ml_application_instance_view_trigger" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/MlApplicationInstanceView/EnableMlApplicationInstanceViewTrigger" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "opc_request_id" + "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"get_ml_application got unknown kwargs: {extra_kwargs!r}") + f"enable_ml_application_instance_view_trigger got unknown kwargs: {extra_kwargs!r}") path_params = { - "mlApplicationId": ml_application_id + "mlApplicationInstanceViewId": ml_application_instance_view_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -7832,7 +8221,9 @@ def get_ml_application(self, ml_application_id, **kwargs): header_params = { "accept": "application/json", "content-type": "application/json", - "opc-request-id": kwargs.get("opc_request_id", missing) + "if-match": kwargs.get("if_match", missing), + "opc-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} @@ -7845,6 +8236,7 @@ def get_ml_application(self, ml_application_id, **kwargs): if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( @@ -7853,7 +8245,8 @@ def get_ml_application(self, ml_application_id, **kwargs): method=method, path_params=path_params, header_params=header_params, - response_type="MlApplication", + body=enable_ml_application_instance_view_trigger_details, + response_type="MlApplicationInstanceView", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -7864,23 +8257,39 @@ def get_ml_application(self, ml_application_id, **kwargs): method=method, path_params=path_params, header_params=header_params, - response_type="MlApplication", + body=enable_ml_application_instance_view_trigger_details, + response_type="MlApplicationInstanceView", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def get_ml_application_historical_package_content(self, ml_application_implementation_version_id, **kwargs): + def export_model_artifact(self, model_id, export_model_artifact_details, **kwargs): """ - Retrieves ML Application package for MlApplicationImplementationVersion with given id. + Export model artifact from source to the service bucket - :param str ml_application_implementation_version_id: (required) - unique MlApplicationImplementationVersion identifier + :param str model_id: (required) + The `OCID`__ of the model. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param oci.data_science.models.ExportModelArtifactDetails export_model_artifact_details: (required) + Model artifact source details for exporting. :param str opc_request_id: (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then 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 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 is 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. @@ -7893,32 +8302,34 @@ def get_ml_application_historical_package_content(self, ml_application_implement 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 stream + :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use get_ml_application_historical_package_content API. + Click `here `__ to see an example of how to use export_model_artifact API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['mlApplicationImplementationVersionId'] - resource_path = "/mlApplicationImplementationVersions/{mlApplicationImplementationVersionId}/mlApplicationHistoricalPackage/content" - method = "GET" - operation_name = "get_ml_application_historical_package_content" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/MlApplicationImplementationVersion/GetMlApplicationHistoricalPackageContent" + required_arguments = ['modelId'] + resource_path = "/models/{modelId}/actions/exportArtifact" + method = "POST" + operation_name = "export_model_artifact" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Model/ExportModelArtifact" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "opc_request_id" + "opc_request_id", + "opc_retry_token", + "if_match" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"get_ml_application_historical_package_content got unknown kwargs: {extra_kwargs!r}") + f"export_model_artifact got unknown kwargs: {extra_kwargs!r}") path_params = { - "mlApplicationImplementationVersionId": ml_application_implementation_version_id + "modelId": model_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -7928,9 +8339,11 @@ def get_ml_application_historical_package_content(self, ml_application_implement raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') header_params = { - "accept": "application/octet-stream", + "accept": "application/json", "content-type": "application/json", - "opc-request-id": kwargs.get("opc_request_id", missing) + "opc-request-id": kwargs.get("opc_request_id", missing), + "opc-retry-token": kwargs.get("opc_retry_token", missing), + "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} @@ -7943,6 +8356,7 @@ def get_ml_application_historical_package_content(self, ml_application_implement 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( @@ -7951,7 +8365,7 @@ def get_ml_application_historical_package_content(self, ml_application_implement method=method, path_params=path_params, header_params=header_params, - response_type="stream", + body=export_model_artifact_details, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -7962,19 +8376,19 @@ def get_ml_application_historical_package_content(self, ml_application_implement method=method, path_params=path_params, header_params=header_params, - response_type="stream", + body=export_model_artifact_details, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def get_ml_application_implementation(self, ml_application_implementation_id, **kwargs): + def get_data_science_private_endpoint(self, data_science_private_endpoint_id, **kwargs): """ - Gets a MlApplicationImplementation by identifier + Retrieves an private endpoint using a `privateEndpointId`. - :param str ml_application_implementation_id: (required) - unique MlApplicationImplementation identifier + :param str data_science_private_endpoint_id: (required) + The unique ID for a Data Science private endpoint. :param str opc_request_id: (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID. @@ -7991,18 +8405,18 @@ def get_ml_application_implementation(self, ml_application_implementation_id, ** allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_science.models.MlApplicationImplementation` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_science.models.DataSciencePrivateEndpoint` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use get_ml_application_implementation API. + Click `here `__ to see an example of how to use get_data_science_private_endpoint API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['mlApplicationImplementationId'] - resource_path = "/mlApplicationImplementations/{mlApplicationImplementationId}" + required_arguments = ['dataSciencePrivateEndpointId'] + resource_path = "/dataSciencePrivateEndpoints/{dataSciencePrivateEndpointId}" method = "GET" - operation_name = "get_ml_application_implementation" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/MlApplicationImplementation/GetMlApplicationImplementation" + operation_name = "get_data_science_private_endpoint" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/DataSciencePrivateEndpoint/GetDataSciencePrivateEndpoint" # Don't accept unknown kwargs expected_kwargs = [ @@ -8013,10 +8427,10 @@ def get_ml_application_implementation(self, ml_application_implementation_id, ** extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"get_ml_application_implementation got unknown kwargs: {extra_kwargs!r}") + f"get_data_science_private_endpoint got unknown kwargs: {extra_kwargs!r}") path_params = { - "mlApplicationImplementationId": ml_application_implementation_id + "dataSciencePrivateEndpointId": data_science_private_endpoint_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -8049,7 +8463,7 @@ def get_ml_application_implementation(self, ml_application_implementation_id, ** method=method, path_params=path_params, header_params=header_params, - response_type="MlApplicationImplementation", + response_type="DataSciencePrivateEndpoint", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -8060,19 +8474,21 @@ def get_ml_application_implementation(self, ml_application_implementation_id, ** method=method, path_params=path_params, header_params=header_params, - response_type="MlApplicationImplementation", + response_type="DataSciencePrivateEndpoint", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def get_ml_application_implementation_version(self, ml_application_implementation_version_id, **kwargs): + def get_job(self, job_id, **kwargs): """ - Gets a MlApplicationImplementationVersion by identifier + Gets a job. - :param str ml_application_implementation_version_id: (required) - unique MlApplicationImplementationVersion identifier + :param str job_id: (required) + The `OCID`__ of the job. + + __ 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, then provide the request ID. @@ -8089,18 +8505,18 @@ def get_ml_application_implementation_version(self, ml_application_implementatio allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_science.models.MlApplicationImplementationVersion` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_science.models.Job` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use get_ml_application_implementation_version API. + Click `here `__ to see an example of how to use get_job API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['mlApplicationImplementationVersionId'] - resource_path = "/mlApplicationImplementationVersions/{mlApplicationImplementationVersionId}" + required_arguments = ['jobId'] + resource_path = "/jobs/{jobId}" method = "GET" - operation_name = "get_ml_application_implementation_version" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/MlApplicationImplementationVersion/GetMlApplicationImplementationVersion" + operation_name = "get_job" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Job/GetJob" # Don't accept unknown kwargs expected_kwargs = [ @@ -8111,10 +8527,10 @@ def get_ml_application_implementation_version(self, ml_application_implementatio extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"get_ml_application_implementation_version got unknown kwargs: {extra_kwargs!r}") + f"get_job got unknown kwargs: {extra_kwargs!r}") path_params = { - "mlApplicationImplementationVersionId": ml_application_implementation_version_id + "jobId": job_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -8147,7 +8563,7 @@ def get_ml_application_implementation_version(self, ml_application_implementatio method=method, path_params=path_params, header_params=header_params, - response_type="MlApplicationImplementationVersion", + response_type="Job", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -8158,23 +8574,31 @@ def get_ml_application_implementation_version(self, ml_application_implementatio method=method, path_params=path_params, header_params=header_params, - response_type="MlApplicationImplementationVersion", + response_type="Job", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def get_ml_application_instance(self, ml_application_instance_id, **kwargs): + def get_job_artifact_content(self, job_id, **kwargs): """ - Gets a MlApplicationInstance by identifier + Downloads job artifact content for specified job. - :param str ml_application_instance_id: (required) - unique MlApplicationInstance identifier + :param str job_id: (required) + The `OCID`__ of the job. + + __ 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, then provide the request ID. + :param str range: (optional) + Optional byte range to fetch, as described in `RFC 7233`__, section 2.1. + Note that only a single range of bytes is supported. + + __ https://tools.ietf.org/html/rfc7232#section-2.1 + :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. @@ -8187,32 +8611,33 @@ def get_ml_application_instance(self, ml_application_instance_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.data_science.models.MlApplicationInstance` + :return: A :class:`~oci.response.Response` object with data of type stream :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use get_ml_application_instance API. + Click `here `__ to see an example of how to use get_job_artifact_content API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['mlApplicationInstanceId'] - resource_path = "/mlApplicationInstances/{mlApplicationInstanceId}" + required_arguments = ['jobId'] + resource_path = "/jobs/{jobId}/artifact/content" method = "GET" - operation_name = "get_ml_application_instance" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/MlApplicationInstance/GetMlApplicationInstance" + operation_name = "get_job_artifact_content" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Job/GetJobArtifactContent" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "opc_request_id" + "opc_request_id", + "range" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"get_ml_application_instance got unknown kwargs: {extra_kwargs!r}") + f"get_job_artifact_content got unknown kwargs: {extra_kwargs!r}") path_params = { - "mlApplicationInstanceId": ml_application_instance_id + "jobId": job_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -8222,9 +8647,10 @@ def get_ml_application_instance(self, ml_application_instance_id, **kwargs): raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') header_params = { - "accept": "application/json", + "accept": "application/octet-stream", "content-type": "application/json", - "opc-request-id": kwargs.get("opc_request_id", missing) + "opc-request-id": kwargs.get("opc_request_id", missing), + "range": kwargs.get("range", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} @@ -8245,7 +8671,7 @@ def get_ml_application_instance(self, ml_application_instance_id, **kwargs): method=method, path_params=path_params, header_params=header_params, - response_type="MlApplicationInstance", + response_type="stream", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -8256,19 +8682,21 @@ def get_ml_application_instance(self, ml_application_instance_id, **kwargs): method=method, path_params=path_params, header_params=header_params, - response_type="MlApplicationInstance", + response_type="stream", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def get_ml_application_instance_view(self, ml_application_instance_view_id, **kwargs): + def get_job_run(self, job_run_id, **kwargs): """ - Gets a MlApplicationInstanceView by identifier + Gets a job run. - :param str ml_application_instance_view_id: (required) - unique MlApplicationInstanceView identifier + :param str job_run_id: (required) + The `OCID`__ of the job run. + + __ 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, then provide the request ID. @@ -8285,18 +8713,18 @@ def get_ml_application_instance_view(self, ml_application_instance_view_id, **kw allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_science.models.MlApplicationInstanceView` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_science.models.JobRun` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use get_ml_application_instance_view API. + Click `here `__ to see an example of how to use get_job_run API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['mlApplicationInstanceViewId'] - resource_path = "/mlApplicationInstanceViews/{mlApplicationInstanceViewId}" + required_arguments = ['jobRunId'] + resource_path = "/jobRuns/{jobRunId}" method = "GET" - operation_name = "get_ml_application_instance_view" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/MlApplicationInstanceView/GetMlApplicationInstanceView" + operation_name = "get_job_run" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/JobRun/GetJobRun" # Don't accept unknown kwargs expected_kwargs = [ @@ -8307,10 +8735,10 @@ def get_ml_application_instance_view(self, ml_application_instance_view_id, **kw extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"get_ml_application_instance_view got unknown kwargs: {extra_kwargs!r}") + f"get_job_run got unknown kwargs: {extra_kwargs!r}") path_params = { - "mlApplicationInstanceViewId": ml_application_instance_view_id + "jobRunId": job_run_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -8343,7 +8771,7 @@ def get_ml_application_instance_view(self, ml_application_instance_view_id, **kw method=method, path_params=path_params, header_params=header_params, - response_type="MlApplicationInstanceView", + response_type="JobRun", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -8354,19 +8782,19 @@ def get_ml_application_instance_view(self, ml_application_instance_view_id, **kw method=method, path_params=path_params, header_params=header_params, - response_type="MlApplicationInstanceView", + response_type="JobRun", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def get_ml_application_package_content(self, ml_application_implementation_id, **kwargs): + def get_ml_application(self, ml_application_id, **kwargs): """ - Retrieves last ML Application package uploaded for given ML Application Implementation + Gets a MlApplication by identifier - :param str ml_application_implementation_id: (required) - unique MlApplicationImplementation identifier + :param str ml_application_id: (required) + unique MlApplication identifier :param str opc_request_id: (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID. @@ -8383,18 +8811,18 @@ def get_ml_application_package_content(self, ml_application_implementation_id, * allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type stream + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_science.models.MlApplication` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use get_ml_application_package_content API. + Click `here `__ to see an example of how to use get_ml_application API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['mlApplicationImplementationId'] - resource_path = "/mlApplicationImplementations/{mlApplicationImplementationId}/mlApplicationPackage/content" + required_arguments = ['mlApplicationId'] + resource_path = "/mlApplications/{mlApplicationId}" method = "GET" - operation_name = "get_ml_application_package_content" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/MlApplicationImplementation/GetMlApplicationPackageContent" + operation_name = "get_ml_application" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/MlApplication/GetMlApplication" # Don't accept unknown kwargs expected_kwargs = [ @@ -8405,10 +8833,10 @@ def get_ml_application_package_content(self, ml_application_implementation_id, * extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"get_ml_application_package_content got unknown kwargs: {extra_kwargs!r}") + f"get_ml_application got unknown kwargs: {extra_kwargs!r}") path_params = { - "mlApplicationImplementationId": ml_application_implementation_id + "mlApplicationId": ml_application_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -8418,7 +8846,7 @@ def get_ml_application_package_content(self, ml_application_implementation_id, * raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') header_params = { - "accept": "application/octet-stream", + "accept": "application/json", "content-type": "application/json", "opc-request-id": kwargs.get("opc_request_id", missing) } @@ -8441,7 +8869,7 @@ def get_ml_application_package_content(self, ml_application_implementation_id, * method=method, path_params=path_params, header_params=header_params, - response_type="stream", + response_type="MlApplication", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -8452,21 +8880,19 @@ def get_ml_application_package_content(self, ml_application_implementation_id, * method=method, path_params=path_params, header_params=header_params, - response_type="stream", + response_type="MlApplication", 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): + def get_ml_application_historical_package_content(self, ml_application_implementation_version_id, **kwargs): """ - Gets the specified model's information. - + Retrieves ML Application package for MlApplicationImplementationVersion with given id. - :param str model_id: (required) - The `OCID`__ of the model. - __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + :param str ml_application_implementation_version_id: (required) + unique MlApplicationImplementationVersion identifier :param str opc_request_id: (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID. @@ -8483,18 +8909,18 @@ def get_model(self, model_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.data_science.models.Model` + :return: A :class:`~oci.response.Response` object with data of type stream :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use get_model API. + Click `here `__ to see an example of how to use get_ml_application_historical_package_content API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['modelId'] - resource_path = "/models/{modelId}" + required_arguments = ['mlApplicationImplementationVersionId'] + resource_path = "/mlApplicationImplementationVersions/{mlApplicationImplementationVersionId}/mlApplicationHistoricalPackage/content" method = "GET" - operation_name = "get_model" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Model/GetModel" + operation_name = "get_ml_application_historical_package_content" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/MlApplicationImplementationVersion/GetMlApplicationHistoricalPackageContent" # Don't accept unknown kwargs expected_kwargs = [ @@ -8505,10 +8931,10 @@ def get_model(self, model_id, **kwargs): 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}") + f"get_ml_application_historical_package_content got unknown kwargs: {extra_kwargs!r}") path_params = { - "modelId": model_id + "mlApplicationImplementationVersionId": ml_application_implementation_version_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -8518,7 +8944,7 @@ def get_model(self, model_id, **kwargs): raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') header_params = { - "accept": "application/json", + "accept": "application/octet-stream", "content-type": "application/json", "opc-request-id": kwargs.get("opc_request_id", missing) } @@ -8541,7 +8967,7 @@ def get_model(self, model_id, **kwargs): method=method, path_params=path_params, header_params=header_params, - response_type="Model", + response_type="stream", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -8552,31 +8978,23 @@ def get_model(self, model_id, **kwargs): method=method, path_params=path_params, header_params=header_params, - response_type="Model", + response_type="stream", 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_artifact_content(self, model_id, **kwargs): + def get_ml_application_implementation(self, ml_application_implementation_id, **kwargs): """ - Downloads model artifact content for specified model. - + Gets a MlApplicationImplementation by identifier - :param str model_id: (required) - The `OCID`__ of the model. - __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + :param str ml_application_implementation_id: (required) + unique MlApplicationImplementation identifier :param str opc_request_id: (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID. - :param str range: (optional) - Optional byte range to fetch, as described in `RFC 7233`__, section 2.1. - Note that only a single range of bytes is supported. - - __ https://tools.ietf.org/html/rfc7232#section-2.1 - :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. @@ -8589,33 +9007,32 @@ def get_model_artifact_content(self, model_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 stream + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_science.models.MlApplicationImplementation` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use get_model_artifact_content API. + Click `here `__ to see an example of how to use get_ml_application_implementation API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['modelId'] - resource_path = "/models/{modelId}/artifact/content" + required_arguments = ['mlApplicationImplementationId'] + resource_path = "/mlApplicationImplementations/{mlApplicationImplementationId}" method = "GET" - operation_name = "get_model_artifact_content" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Model/GetModelArtifactContent" + operation_name = "get_ml_application_implementation" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/MlApplicationImplementation/GetMlApplicationImplementation" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "opc_request_id", - "range" + "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_artifact_content got unknown kwargs: {extra_kwargs!r}") + f"get_ml_application_implementation got unknown kwargs: {extra_kwargs!r}") path_params = { - "modelId": model_id + "mlApplicationImplementationId": ml_application_implementation_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -8625,10 +9042,9 @@ def get_model_artifact_content(self, model_id, **kwargs): raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') header_params = { - "accept": "application/octet-stream", + "accept": "application/json", "content-type": "application/json", - "opc-request-id": kwargs.get("opc_request_id", missing), - "range": kwargs.get("range", 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} @@ -8649,7 +9065,7 @@ def get_model_artifact_content(self, model_id, **kwargs): method=method, path_params=path_params, header_params=header_params, - response_type="stream", + response_type="MlApplicationImplementation", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -8660,34 +9076,23 @@ def get_model_artifact_content(self, model_id, **kwargs): method=method, path_params=path_params, header_params=header_params, - response_type="stream", + response_type="MlApplicationImplementation", 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_custom_metadatum_artifact_content(self, model_id, metadatum_key_name, **kwargs): + def get_ml_application_implementation_version(self, ml_application_implementation_version_id, **kwargs): """ - Downloads model custom metadata artifact content for specified model metadata key. - - - :param str model_id: (required) - The `OCID`__ of the model. + Gets a MlApplicationImplementationVersion by identifier - __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm - :param str metadatum_key_name: (required) - The name of the model metadatum in the metadata. + :param str ml_application_implementation_version_id: (required) + unique MlApplicationImplementationVersion identifier :param str opc_request_id: (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID. - :param str range: (optional) - Optional byte range to fetch, as described in `RFC 7233`__, section 2.1. - Note that only a single range of bytes is supported. - - __ https://tools.ietf.org/html/rfc7232#section-2.1 - :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. @@ -8700,34 +9105,32 @@ def get_model_custom_metadatum_artifact_content(self, model_id, metadatum_key_na 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 stream + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_science.models.MlApplicationImplementationVersion` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use get_model_custom_metadatum_artifact_content API. + Click `here `__ to see an example of how to use get_ml_application_implementation_version API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['modelId', 'metadatumKeyName'] - resource_path = "/models/{modelId}/customMetadata/{metadatumKeyName}/artifact/content" + required_arguments = ['mlApplicationImplementationVersionId'] + resource_path = "/mlApplicationImplementationVersions/{mlApplicationImplementationVersionId}" method = "GET" - operation_name = "get_model_custom_metadatum_artifact_content" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Model/GetModelCustomMetadatumArtifactContent" + operation_name = "get_ml_application_implementation_version" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/MlApplicationImplementationVersion/GetMlApplicationImplementationVersion" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "opc_request_id", - "range" + "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_custom_metadatum_artifact_content got unknown kwargs: {extra_kwargs!r}") + f"get_ml_application_implementation_version got unknown kwargs: {extra_kwargs!r}") path_params = { - "modelId": model_id, - "metadatumKeyName": metadatum_key_name + "mlApplicationImplementationVersionId": ml_application_implementation_version_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -8737,10 +9140,9 @@ def get_model_custom_metadatum_artifact_content(self, model_id, metadatum_key_na raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') header_params = { - "accept": "application/octet-stream", + "accept": "application/json", "content-type": "application/json", - "opc-request-id": kwargs.get("opc_request_id", missing), - "range": kwargs.get("range", 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} @@ -8761,7 +9163,7 @@ def get_model_custom_metadatum_artifact_content(self, model_id, metadatum_key_na method=method, path_params=path_params, header_params=header_params, - response_type="stream", + response_type="MlApplicationImplementationVersion", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -8772,34 +9174,23 @@ def get_model_custom_metadatum_artifact_content(self, model_id, metadatum_key_na method=method, path_params=path_params, header_params=header_params, - response_type="stream", + response_type="MlApplicationImplementationVersion", 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_defined_metadatum_artifact_content(self, model_id, metadatum_key_name, **kwargs): + def get_ml_application_instance(self, ml_application_instance_id, **kwargs): """ - Downloads model defined metadata artifact content for specified model metadata key. - - - :param str model_id: (required) - The `OCID`__ of the model. + Gets a MlApplicationInstance by identifier - __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm - :param str metadatum_key_name: (required) - The name of the model metadatum in the metadata. + :param str ml_application_instance_id: (required) + unique MlApplicationInstance identifier :param str opc_request_id: (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID. - :param str range: (optional) - Optional byte range to fetch, as described in `RFC 7233`__, section 2.1. - Note that only a single range of bytes is supported. - - __ https://tools.ietf.org/html/rfc7232#section-2.1 - :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. @@ -8812,34 +9203,32 @@ def get_model_defined_metadatum_artifact_content(self, model_id, metadatum_key_n 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 stream + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_science.models.MlApplicationInstance` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use get_model_defined_metadatum_artifact_content API. + Click `here `__ to see an example of how to use get_ml_application_instance API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['modelId', 'metadatumKeyName'] - resource_path = "/models/{modelId}/definedMetadata/{metadatumKeyName}/artifact/content" + required_arguments = ['mlApplicationInstanceId'] + resource_path = "/mlApplicationInstances/{mlApplicationInstanceId}" method = "GET" - operation_name = "get_model_defined_metadatum_artifact_content" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Model/GetModelDefinedMetadatumArtifactContent" + operation_name = "get_ml_application_instance" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/MlApplicationInstance/GetMlApplicationInstance" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "opc_request_id", - "range" + "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_defined_metadatum_artifact_content got unknown kwargs: {extra_kwargs!r}") + f"get_ml_application_instance got unknown kwargs: {extra_kwargs!r}") path_params = { - "modelId": model_id, - "metadatumKeyName": metadatum_key_name + "mlApplicationInstanceId": ml_application_instance_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -8849,10 +9238,9 @@ def get_model_defined_metadatum_artifact_content(self, model_id, metadatum_key_n raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') header_params = { - "accept": "application/octet-stream", + "accept": "application/json", "content-type": "application/json", - "opc-request-id": kwargs.get("opc_request_id", missing), - "range": kwargs.get("range", 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} @@ -8873,7 +9261,7 @@ def get_model_defined_metadatum_artifact_content(self, model_id, metadatum_key_n method=method, path_params=path_params, header_params=header_params, - response_type="stream", + response_type="MlApplicationInstance", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -8884,21 +9272,19 @@ def get_model_defined_metadatum_artifact_content(self, model_id, metadatum_key_n method=method, path_params=path_params, header_params=header_params, - response_type="stream", + response_type="MlApplicationInstance", 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_deployment(self, model_deployment_id, **kwargs): + def get_ml_application_instance_view(self, ml_application_instance_view_id, **kwargs): """ - Retrieves the model deployment for the specified `modelDeploymentId`. - + Gets a MlApplicationInstanceView by identifier - :param str model_deployment_id: (required) - The `OCID`__ of the model deployment. - __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + :param str ml_application_instance_view_id: (required) + unique MlApplicationInstanceView identifier :param str opc_request_id: (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID. @@ -8915,18 +9301,18 @@ def get_model_deployment(self, model_deployment_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.data_science.models.ModelDeployment` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_science.models.MlApplicationInstanceView` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use get_model_deployment API. + Click `here `__ to see an example of how to use get_ml_application_instance_view API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['modelDeploymentId'] - resource_path = "/modelDeployments/{modelDeploymentId}" + required_arguments = ['mlApplicationInstanceViewId'] + resource_path = "/mlApplicationInstanceViews/{mlApplicationInstanceViewId}" method = "GET" - operation_name = "get_model_deployment" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/ModelDeployment/GetModelDeployment" + operation_name = "get_ml_application_instance_view" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/MlApplicationInstanceView/GetMlApplicationInstanceView" # Don't accept unknown kwargs expected_kwargs = [ @@ -8937,10 +9323,10 @@ def get_model_deployment(self, model_deployment_id, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"get_model_deployment got unknown kwargs: {extra_kwargs!r}") + f"get_ml_application_instance_view got unknown kwargs: {extra_kwargs!r}") path_params = { - "modelDeploymentId": model_deployment_id + "mlApplicationInstanceViewId": ml_application_instance_view_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -8973,7 +9359,7 @@ def get_model_deployment(self, model_deployment_id, **kwargs): method=method, path_params=path_params, header_params=header_params, - response_type="ModelDeployment", + response_type="MlApplicationInstanceView", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -8984,21 +9370,19 @@ def get_model_deployment(self, model_deployment_id, **kwargs): method=method, path_params=path_params, header_params=header_params, - response_type="ModelDeployment", + response_type="MlApplicationInstanceView", 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_provenance(self, model_id, **kwargs): + def get_ml_application_package_content(self, ml_application_implementation_id, **kwargs): """ - Gets provenance information for specified model. - + Retrieves last ML Application package uploaded for given ML Application Implementation - :param str model_id: (required) - The `OCID`__ of the model. - __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + :param str ml_application_implementation_id: (required) + unique MlApplicationImplementation identifier :param str opc_request_id: (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID. @@ -9015,18 +9399,18 @@ def get_model_provenance(self, model_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.data_science.models.ModelProvenance` + :return: A :class:`~oci.response.Response` object with data of type stream :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use get_model_provenance API. + Click `here `__ to see an example of how to use get_ml_application_package_content API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['modelId'] - resource_path = "/models/{modelId}/provenance" + required_arguments = ['mlApplicationImplementationId'] + resource_path = "/mlApplicationImplementations/{mlApplicationImplementationId}/mlApplicationPackage/content" method = "GET" - operation_name = "get_model_provenance" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Model/GetModelProvenance" + operation_name = "get_ml_application_package_content" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/MlApplicationImplementation/GetMlApplicationPackageContent" # Don't accept unknown kwargs expected_kwargs = [ @@ -9037,10 +9421,10 @@ def get_model_provenance(self, model_id, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"get_model_provenance got unknown kwargs: {extra_kwargs!r}") + f"get_ml_application_package_content got unknown kwargs: {extra_kwargs!r}") path_params = { - "modelId": model_id + "mlApplicationImplementationId": ml_application_implementation_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -9050,7 +9434,7 @@ def get_model_provenance(self, model_id, **kwargs): raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') header_params = { - "accept": "application/json", + "accept": "application/octet-stream", "content-type": "application/json", "opc-request-id": kwargs.get("opc_request_id", missing) } @@ -9073,7 +9457,7 @@ def get_model_provenance(self, model_id, **kwargs): method=method, path_params=path_params, header_params=header_params, - response_type="ModelProvenance", + response_type="stream", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -9084,19 +9468,19 @@ def get_model_provenance(self, model_id, **kwargs): method=method, path_params=path_params, header_params=header_params, - response_type="ModelProvenance", + response_type="stream", 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_version_set(self, model_version_set_id, **kwargs): + def get_model(self, model_id, **kwargs): """ - Gets the specified model version set information. + Gets the specified model's information. - :param str model_version_set_id: (required) - The `OCID`__ of the model version set. + :param str model_id: (required) + The `OCID`__ of the model. __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm @@ -9115,18 +9499,18 @@ def get_model_version_set(self, model_version_set_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.data_science.models.ModelVersionSet` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_science.models.Model` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use get_model_version_set API. + 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 = ['modelVersionSetId'] - resource_path = "/modelVersionSets/{modelVersionSetId}" + required_arguments = ['modelId'] + resource_path = "/models/{modelId}" method = "GET" - operation_name = "get_model_version_set" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/ModelVersionSet/GetModelVersionSet" + operation_name = "get_model" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Model/GetModel" # Don't accept unknown kwargs expected_kwargs = [ @@ -9137,10 +9521,10 @@ def get_model_version_set(self, model_version_set_id, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"get_model_version_set got unknown kwargs: {extra_kwargs!r}") + f"get_model got unknown kwargs: {extra_kwargs!r}") path_params = { - "modelVersionSetId": model_version_set_id + "modelId": model_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -9173,7 +9557,7 @@ def get_model_version_set(self, model_version_set_id, **kwargs): method=method, path_params=path_params, header_params=header_params, - response_type="ModelVersionSet", + response_type="Model", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -9184,25 +9568,31 @@ def get_model_version_set(self, model_version_set_id, **kwargs): method=method, path_params=path_params, header_params=header_params, - response_type="ModelVersionSet", + 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_notebook_session(self, notebook_session_id, **kwargs): + def get_model_artifact_content(self, model_id, **kwargs): """ - Gets the specified notebook session's information. + Downloads model artifact content for specified model. - :param str notebook_session_id: (required) - The `OCID`__ of the notebook session. + :param str model_id: (required) + The `OCID`__ of the model. __ 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, then provide the request ID. + :param str range: (optional) + Optional byte range to fetch, as described in `RFC 7233`__, section 2.1. + Note that only a single range of bytes is supported. + + __ https://tools.ietf.org/html/rfc7232#section-2.1 + :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. @@ -9215,32 +9605,33 @@ def get_notebook_session(self, notebook_session_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.data_science.models.NotebookSession` + :return: A :class:`~oci.response.Response` object with data of type stream :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use get_notebook_session API. + Click `here `__ to see an example of how to use get_model_artifact_content API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['notebookSessionId'] - resource_path = "/notebookSessions/{notebookSessionId}" + required_arguments = ['modelId'] + resource_path = "/models/{modelId}/artifact/content" method = "GET" - operation_name = "get_notebook_session" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/NotebookSession/GetNotebookSession" + operation_name = "get_model_artifact_content" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Model/GetModelArtifactContent" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "opc_request_id" + "opc_request_id", + "range" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"get_notebook_session got unknown kwargs: {extra_kwargs!r}") + f"get_model_artifact_content got unknown kwargs: {extra_kwargs!r}") path_params = { - "notebookSessionId": notebook_session_id + "modelId": model_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -9250,9 +9641,10 @@ def get_notebook_session(self, notebook_session_id, **kwargs): raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') header_params = { - "accept": "application/json", + "accept": "application/octet-stream", "content-type": "application/json", - "opc-request-id": kwargs.get("opc_request_id", missing) + "opc-request-id": kwargs.get("opc_request_id", missing), + "range": kwargs.get("range", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} @@ -9273,7 +9665,7 @@ def get_notebook_session(self, notebook_session_id, **kwargs): method=method, path_params=path_params, header_params=header_params, - response_type="NotebookSession", + response_type="stream", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -9284,25 +9676,34 @@ def get_notebook_session(self, notebook_session_id, **kwargs): method=method, path_params=path_params, header_params=header_params, - response_type="NotebookSession", + response_type="stream", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def get_pipeline(self, pipeline_id, **kwargs): + def get_model_custom_metadatum_artifact_content(self, model_id, metadatum_key_name, **kwargs): """ - Gets a Pipeline by identifier. + Downloads model custom metadata artifact content for specified model metadata key. - :param str pipeline_id: (required) - The `OCID`__ of the pipeline. + :param str model_id: (required) + The `OCID`__ of the model. __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + :param str metadatum_key_name: (required) + The name of the model metadatum in the metadata. + :param str opc_request_id: (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID. + :param str range: (optional) + Optional byte range to fetch, as described in `RFC 7233`__, section 2.1. + Note that only a single range of bytes is supported. + + __ https://tools.ietf.org/html/rfc7232#section-2.1 + :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. @@ -9315,32 +9716,34 @@ def get_pipeline(self, pipeline_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.data_science.models.Pipeline` + :return: A :class:`~oci.response.Response` object with data of type stream :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use get_pipeline API. + Click `here `__ to see an example of how to use get_model_custom_metadatum_artifact_content API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['pipelineId'] - resource_path = "/pipelines/{pipelineId}" + required_arguments = ['modelId', 'metadatumKeyName'] + resource_path = "/models/{modelId}/customMetadata/{metadatumKeyName}/artifact/content" method = "GET" - operation_name = "get_pipeline" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Pipeline/GetPipeline" + operation_name = "get_model_custom_metadatum_artifact_content" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Model/GetModelCustomMetadatumArtifactContent" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "opc_request_id" + "opc_request_id", + "range" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"get_pipeline got unknown kwargs: {extra_kwargs!r}") + f"get_model_custom_metadatum_artifact_content got unknown kwargs: {extra_kwargs!r}") path_params = { - "pipelineId": pipeline_id + "modelId": model_id, + "metadatumKeyName": metadatum_key_name } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -9350,9 +9753,10 @@ def get_pipeline(self, pipeline_id, **kwargs): raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') header_params = { - "accept": "application/json", + "accept": "application/octet-stream", "content-type": "application/json", - "opc-request-id": kwargs.get("opc_request_id", missing) + "opc-request-id": kwargs.get("opc_request_id", missing), + "range": kwargs.get("range", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} @@ -9373,7 +9777,7 @@ def get_pipeline(self, pipeline_id, **kwargs): method=method, path_params=path_params, header_params=header_params, - response_type="Pipeline", + response_type="stream", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -9384,25 +9788,34 @@ def get_pipeline(self, pipeline_id, **kwargs): method=method, path_params=path_params, header_params=header_params, - response_type="Pipeline", + response_type="stream", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def get_pipeline_run(self, pipeline_run_id, **kwargs): + def get_model_defined_metadatum_artifact_content(self, model_id, metadatum_key_name, **kwargs): """ - Gets a PipelineRun by identifier. + Downloads model defined metadata artifact content for specified model metadata key. - :param str pipeline_run_id: (required) - The `OCID`__ of the pipeline run. + :param str model_id: (required) + The `OCID`__ of the model. __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + :param str metadatum_key_name: (required) + The name of the model metadatum in the metadata. + :param str opc_request_id: (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID. + :param str range: (optional) + Optional byte range to fetch, as described in `RFC 7233`__, section 2.1. + Note that only a single range of bytes is supported. + + __ https://tools.ietf.org/html/rfc7232#section-2.1 + :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. @@ -9415,32 +9828,34 @@ def get_pipeline_run(self, pipeline_run_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.data_science.models.PipelineRun` + :return: A :class:`~oci.response.Response` object with data of type stream :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use get_pipeline_run API. + Click `here `__ to see an example of how to use get_model_defined_metadatum_artifact_content API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['pipelineRunId'] - resource_path = "/pipelineRuns/{pipelineRunId}" + required_arguments = ['modelId', 'metadatumKeyName'] + resource_path = "/models/{modelId}/definedMetadata/{metadatumKeyName}/artifact/content" method = "GET" - operation_name = "get_pipeline_run" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/PipelineRun/GetPipelineRun" + operation_name = "get_model_defined_metadatum_artifact_content" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Model/GetModelDefinedMetadatumArtifactContent" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "opc_request_id" + "opc_request_id", + "range" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"get_pipeline_run got unknown kwargs: {extra_kwargs!r}") + f"get_model_defined_metadatum_artifact_content got unknown kwargs: {extra_kwargs!r}") path_params = { - "pipelineRunId": pipeline_run_id + "modelId": model_id, + "metadatumKeyName": metadatum_key_name } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -9450,9 +9865,10 @@ def get_pipeline_run(self, pipeline_run_id, **kwargs): raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') header_params = { - "accept": "application/json", + "accept": "application/octet-stream", "content-type": "application/json", - "opc-request-id": kwargs.get("opc_request_id", missing) + "opc-request-id": kwargs.get("opc_request_id", missing), + "range": kwargs.get("range", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} @@ -9473,7 +9889,7 @@ def get_pipeline_run(self, pipeline_run_id, **kwargs): method=method, path_params=path_params, header_params=header_params, - response_type="PipelineRun", + response_type="stream", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -9484,19 +9900,19 @@ def get_pipeline_run(self, pipeline_run_id, **kwargs): method=method, path_params=path_params, header_params=header_params, - response_type="PipelineRun", + response_type="stream", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def get_project(self, project_id, **kwargs): + def get_model_deployment(self, model_deployment_id, **kwargs): """ - Gets the specified project's information. + Retrieves the model deployment for the specified `modelDeploymentId`. - :param str project_id: (required) - The `OCID`__ of the project. + :param str model_deployment_id: (required) + The `OCID`__ of the model deployment. __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm @@ -9515,18 +9931,18 @@ def get_project(self, project_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.data_science.models.Project` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_science.models.ModelDeployment` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use get_project API. + Click `here `__ to see an example of how to use get_model_deployment API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['projectId'] - resource_path = "/projects/{projectId}" + required_arguments = ['modelDeploymentId'] + resource_path = "/modelDeployments/{modelDeploymentId}" method = "GET" - operation_name = "get_project" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Project/GetProject" + operation_name = "get_model_deployment" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/ModelDeployment/GetModelDeployment" # Don't accept unknown kwargs expected_kwargs = [ @@ -9537,10 +9953,10 @@ def get_project(self, project_id, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"get_project got unknown kwargs: {extra_kwargs!r}") + f"get_model_deployment got unknown kwargs: {extra_kwargs!r}") path_params = { - "projectId": project_id + "modelDeploymentId": model_deployment_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -9573,7 +9989,7 @@ def get_project(self, project_id, **kwargs): method=method, path_params=path_params, header_params=header_params, - response_type="Project", + response_type="ModelDeployment", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -9584,19 +10000,21 @@ def get_project(self, project_id, **kwargs): method=method, path_params=path_params, header_params=header_params, - response_type="Project", + response_type="ModelDeployment", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def get_schedule(self, schedule_id, **kwargs): + def get_model_group(self, model_group_id, **kwargs): """ - Gets a Schedule by identifier + Retrieves the Model Group resource based on the specified modelGroup id. - :param str schedule_id: (required) - unique Schedule identifier + :param str model_group_id: (required) + The `OCID`__ of the modelGroup. + + __ 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, then provide the request ID. @@ -9613,18 +10031,18 @@ def get_schedule(self, schedule_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.data_science.models.Schedule` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_science.models.ModelGroup` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use get_schedule API. + Click `here `__ to see an example of how to use get_model_group API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['scheduleId'] - resource_path = "/schedules/{scheduleId}" + required_arguments = ['modelGroupId'] + resource_path = "/modelGroups/{modelGroupId}" method = "GET" - operation_name = "get_schedule" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Schedule/GetSchedule" + operation_name = "get_model_group" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/ModelGroup/GetModelGroup" # Don't accept unknown kwargs expected_kwargs = [ @@ -9635,10 +10053,10 @@ def get_schedule(self, schedule_id, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"get_schedule got unknown kwargs: {extra_kwargs!r}") + f"get_model_group got unknown kwargs: {extra_kwargs!r}") path_params = { - "scheduleId": schedule_id + "modelGroupId": model_group_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -9671,7 +10089,7 @@ def get_schedule(self, schedule_id, **kwargs): method=method, path_params=path_params, header_params=header_params, - response_type="Schedule", + response_type="ModelGroup", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -9682,25 +10100,22 @@ def get_schedule(self, schedule_id, **kwargs): method=method, path_params=path_params, header_params=header_params, - response_type="Schedule", + response_type="ModelGroup", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def get_step_artifact_content(self, pipeline_id, step_name, **kwargs): + def get_model_group_artifact_content(self, model_group_id, **kwargs): """ - Download the artifact for a step in the pipeline. + Downloads the model artifact for the specified model group. - :param str pipeline_id: (required) - The `OCID`__ of the pipeline. + :param str model_group_id: (required) + The `OCID`__ of the modelGroup. __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm - :param str step_name: (required) - Unique Step identifier in a pipeline. - :param str opc_request_id: (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID. @@ -9726,14 +10141,14 @@ def get_step_artifact_content(self, pipeline_id, step_name, **kwargs): :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use get_step_artifact_content API. + Click `here `__ to see an example of how to use get_model_group_artifact_content API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['pipelineId', 'stepName'] - resource_path = "/pipelines/{pipelineId}/steps/{stepName}/artifact/content" + required_arguments = ['modelGroupId'] + resource_path = "/modelGroups/{modelGroupId}/artifact/content" method = "GET" - operation_name = "get_step_artifact_content" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Pipeline/GetStepArtifactContent" + operation_name = "get_model_group_artifact_content" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/ModelGroup/GetModelGroupArtifactContent" # Don't accept unknown kwargs expected_kwargs = [ @@ -9745,11 +10160,10 @@ def get_step_artifact_content(self, pipeline_id, step_name, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"get_step_artifact_content got unknown kwargs: {extra_kwargs!r}") + f"get_model_group_artifact_content got unknown kwargs: {extra_kwargs!r}") path_params = { - "pipelineId": pipeline_id, - "stepName": step_name + "modelGroupId": model_group_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -9784,7 +10198,6 @@ def get_step_artifact_content(self, pipeline_id, step_name, **kwargs): path_params=path_params, header_params=header_params, response_type="stream", - enforce_content_headers=False, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -9796,19 +10209,18 @@ def get_step_artifact_content(self, pipeline_id, step_name, **kwargs): path_params=path_params, header_params=header_params, response_type="stream", - enforce_content_headers=False, 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): + def get_model_group_version_history(self, model_group_version_history_id, **kwargs): """ - Gets the specified work request's information. + Gets the specified modelGroupVersionHistory's information. - :param str work_request_id: (required) - The `OCID`__ of the work request. + :param str model_group_version_history_id: (required) + The `OCID`__ of the modelGroupVersionHistory. __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm @@ -9827,18 +10239,18 @@ def get_work_request(self, work_request_id, **kwargs): allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_science.models.WorkRequest` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_science.models.ModelGroupVersionHistory` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use get_work_request API. + Click `here `__ to see an example of how to use get_model_group_version_history API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['workRequestId'] - resource_path = "/workRequests/{workRequestId}" + required_arguments = ['modelGroupVersionHistoryId'] + resource_path = "/modelGroupVersionHistory/{modelGroupVersionHistoryId}" method = "GET" - operation_name = "get_work_request" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/WorkRequest/GetWorkRequest" + operation_name = "get_model_group_version_history" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/ModelGroupVersionHistory/GetModelGroupVersionHistory" # Don't accept unknown kwargs expected_kwargs = [ @@ -9849,10 +10261,10 @@ def get_work_request(self, work_request_id, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"get_work_request got unknown kwargs: {extra_kwargs!r}") + f"get_model_group_version_history got unknown kwargs: {extra_kwargs!r}") path_params = { - "workRequestId": work_request_id + "modelGroupVersionHistoryId": model_group_version_history_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -9885,7 +10297,7 @@ def get_work_request(self, work_request_id, **kwargs): method=method, path_params=path_params, header_params=header_params, - response_type="WorkRequest", + response_type="ModelGroupVersionHistory", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -9896,19 +10308,19 @@ def get_work_request(self, work_request_id, **kwargs): method=method, path_params=path_params, header_params=header_params, - response_type="WorkRequest", + response_type="ModelGroupVersionHistory", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def head_job_artifact(self, job_id, **kwargs): + def get_model_provenance(self, model_id, **kwargs): """ - Gets job artifact metadata. + Gets provenance information for specified model. - :param str job_id: (required) - The `OCID`__ of the job. + :param str model_id: (required) + The `OCID`__ of the model. __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm @@ -9927,18 +10339,18 @@ def head_job_artifact(self, job_id, **kwargs): allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type None + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_science.models.ModelProvenance` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use head_job_artifact API. + Click `here `__ to see an example of how to use get_model_provenance API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['jobId'] - resource_path = "/jobs/{jobId}/artifact/content" - method = "HEAD" - operation_name = "head_job_artifact" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Job/HeadJobArtifact" + required_arguments = ['modelId'] + resource_path = "/models/{modelId}/provenance" + method = "GET" + operation_name = "get_model_provenance" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Model/GetModelProvenance" # Don't accept unknown kwargs expected_kwargs = [ @@ -9949,10 +10361,10 @@ def head_job_artifact(self, job_id, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"head_job_artifact got unknown kwargs: {extra_kwargs!r}") + f"get_model_provenance got unknown kwargs: {extra_kwargs!r}") path_params = { - "jobId": job_id + "modelId": model_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -9985,6 +10397,7 @@ def head_job_artifact(self, job_id, **kwargs): method=method, path_params=path_params, header_params=header_params, + response_type="ModelProvenance", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -9995,18 +10408,19 @@ def head_job_artifact(self, job_id, **kwargs): method=method, path_params=path_params, header_params=header_params, + response_type="ModelProvenance", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def head_model_artifact(self, model_id, **kwargs): + def get_model_version_set(self, model_version_set_id, **kwargs): """ - Gets model artifact metadata for specified model. + Gets the specified model version set information. - :param str model_id: (required) - The `OCID`__ of the model. + :param str model_version_set_id: (required) + The `OCID`__ of the model version set. __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm @@ -10025,18 +10439,18 @@ def head_model_artifact(self, model_id, **kwargs): allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type None + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_science.models.ModelVersionSet` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use head_model_artifact API. + Click `here `__ to see an example of how to use get_model_version_set API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['modelId'] - resource_path = "/models/{modelId}/artifact/content" - method = "HEAD" - operation_name = "head_model_artifact" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Model/HeadModelArtifact" + required_arguments = ['modelVersionSetId'] + resource_path = "/modelVersionSets/{modelVersionSetId}" + method = "GET" + operation_name = "get_model_version_set" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/ModelVersionSet/GetModelVersionSet" # Don't accept unknown kwargs expected_kwargs = [ @@ -10047,10 +10461,10 @@ def head_model_artifact(self, model_id, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"head_model_artifact got unknown kwargs: {extra_kwargs!r}") + f"get_model_version_set got unknown kwargs: {extra_kwargs!r}") path_params = { - "modelId": model_id + "modelVersionSetId": model_version_set_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -10083,6 +10497,7 @@ def head_model_artifact(self, model_id, **kwargs): method=method, path_params=path_params, header_params=header_params, + response_type="ModelVersionSet", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -10093,24 +10508,22 @@ def head_model_artifact(self, model_id, **kwargs): method=method, path_params=path_params, header_params=header_params, + response_type="ModelVersionSet", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def head_model_custom_metadatum_artifact(self, model_id, metadatum_key_name, **kwargs): + def get_notebook_session(self, notebook_session_id, **kwargs): """ - Gets custom metadata artifact metadata for specified model metadata key. + Gets the specified notebook session's information. - :param str model_id: (required) - The `OCID`__ of the model. + :param str notebook_session_id: (required) + The `OCID`__ of the notebook session. __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm - :param str metadatum_key_name: (required) - The name of the model metadatum in the metadata. - :param str opc_request_id: (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID. @@ -10126,18 +10539,18 @@ def head_model_custom_metadatum_artifact(self, model_id, metadatum_key_name, **k allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type None + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_science.models.NotebookSession` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use head_model_custom_metadatum_artifact API. + Click `here `__ to see an example of how to use get_notebook_session API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['modelId', 'metadatumKeyName'] - resource_path = "/models/{modelId}/customMetadata/{metadatumKeyName}/artifact/content" - method = "HEAD" - operation_name = "head_model_custom_metadatum_artifact" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Model/HeadModelCustomMetadatumArtifact" + required_arguments = ['notebookSessionId'] + resource_path = "/notebookSessions/{notebookSessionId}" + method = "GET" + operation_name = "get_notebook_session" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/NotebookSession/GetNotebookSession" # Don't accept unknown kwargs expected_kwargs = [ @@ -10148,11 +10561,10 @@ def head_model_custom_metadatum_artifact(self, model_id, metadatum_key_name, **k extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"head_model_custom_metadatum_artifact got unknown kwargs: {extra_kwargs!r}") + f"get_notebook_session got unknown kwargs: {extra_kwargs!r}") path_params = { - "modelId": model_id, - "metadatumKeyName": metadatum_key_name + "notebookSessionId": notebook_session_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -10185,6 +10597,7 @@ def head_model_custom_metadatum_artifact(self, model_id, metadatum_key_name, **k method=method, path_params=path_params, header_params=header_params, + response_type="NotebookSession", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -10195,24 +10608,22 @@ def head_model_custom_metadatum_artifact(self, model_id, metadatum_key_name, **k method=method, path_params=path_params, header_params=header_params, + response_type="NotebookSession", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def head_model_defined_metadatum_artifact(self, model_id, metadatum_key_name, **kwargs): + def get_pipeline(self, pipeline_id, **kwargs): """ - Gets defined metadata artifact metadata for specified model metadata key. + Gets a Pipeline by identifier. - :param str model_id: (required) - The `OCID`__ of the model. + :param str pipeline_id: (required) + The `OCID`__ of the pipeline. __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm - :param str metadatum_key_name: (required) - The name of the model metadatum in the metadata. - :param str opc_request_id: (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID. @@ -10228,18 +10639,18 @@ def head_model_defined_metadatum_artifact(self, model_id, metadatum_key_name, ** allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type None + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_science.models.Pipeline` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use head_model_defined_metadatum_artifact API. + Click `here `__ to see an example of how to use get_pipeline API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['modelId', 'metadatumKeyName'] - resource_path = "/models/{modelId}/definedMetadata/{metadatumKeyName}/artifact/content" - method = "HEAD" - operation_name = "head_model_defined_metadatum_artifact" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Model/HeadModelDefinedMetadatumArtifact" + required_arguments = ['pipelineId'] + resource_path = "/pipelines/{pipelineId}" + method = "GET" + operation_name = "get_pipeline" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Pipeline/GetPipeline" # Don't accept unknown kwargs expected_kwargs = [ @@ -10250,11 +10661,10 @@ def head_model_defined_metadatum_artifact(self, model_id, metadatum_key_name, ** extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"head_model_defined_metadatum_artifact got unknown kwargs: {extra_kwargs!r}") + f"get_pipeline got unknown kwargs: {extra_kwargs!r}") path_params = { - "modelId": model_id, - "metadatumKeyName": metadatum_key_name + "pipelineId": pipeline_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -10287,6 +10697,7 @@ def head_model_defined_metadatum_artifact(self, model_id, metadatum_key_name, ** method=method, path_params=path_params, header_params=header_params, + response_type="Pipeline", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -10297,24 +10708,22 @@ def head_model_defined_metadatum_artifact(self, model_id, metadatum_key_name, ** method=method, path_params=path_params, header_params=header_params, + response_type="Pipeline", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def head_step_artifact(self, pipeline_id, step_name, **kwargs): + def get_pipeline_run(self, pipeline_run_id, **kwargs): """ - Get the artifact metadata for a step in the pipeline. + Gets a PipelineRun by identifier. - :param str pipeline_id: (required) - The `OCID`__ of the pipeline. + :param str pipeline_run_id: (required) + The `OCID`__ of the pipeline run. __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm - :param str step_name: (required) - Unique Step identifier in a pipeline. - :param str opc_request_id: (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID. @@ -10330,18 +10739,18 @@ def head_step_artifact(self, pipeline_id, step_name, **kwargs): allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type None + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_science.models.PipelineRun` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use head_step_artifact API. + Click `here `__ to see an example of how to use get_pipeline_run API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['pipelineId', 'stepName'] - resource_path = "/pipelines/{pipelineId}/steps/{stepName}/artifact/content" - method = "HEAD" - operation_name = "head_step_artifact" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Pipeline/HeadStepArtifact" + required_arguments = ['pipelineRunId'] + resource_path = "/pipelineRuns/{pipelineRunId}" + method = "GET" + operation_name = "get_pipeline_run" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/PipelineRun/GetPipelineRun" # Don't accept unknown kwargs expected_kwargs = [ @@ -10352,11 +10761,10 @@ def head_step_artifact(self, pipeline_id, step_name, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"head_step_artifact got unknown kwargs: {extra_kwargs!r}") + f"get_pipeline_run got unknown kwargs: {extra_kwargs!r}") path_params = { - "pipelineId": pipeline_id, - "stepName": step_name + "pipelineRunId": pipeline_run_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -10389,6 +10797,7 @@ def head_step_artifact(self, pipeline_id, step_name, **kwargs): method=method, path_params=path_params, header_params=header_params, + response_type="PipelineRun", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -10399,38 +10808,29 @@ def head_step_artifact(self, pipeline_id, step_name, **kwargs): method=method, path_params=path_params, header_params=header_params, + response_type="PipelineRun", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def import_model_artifact(self, model_id, import_model_artifact_details, **kwargs): + def get_project(self, project_id, **kwargs): """ - Import model artifact from service bucket + Gets the specified project's information. - :param str model_id: (required) - The `OCID`__ of the model. + :param str project_id: (required) + The `OCID`__ of the project. __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm - :param oci.data_science.models.ImportModelArtifactDetails import_model_artifact_details: (required) - Model artifact source details for importing. - :param str opc_request_id: (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then 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 is 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 will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + 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`. @@ -10439,46 +10839,1731 @@ def import_model_artifact(self, model_id, import_model_artifact_details, **kwarg allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type None + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_science.models.Project` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use import_model_artifact API. + Click `here `__ to see an example of how to use get_project API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['modelId'] - resource_path = "/models/{modelId}/actions/importArtifact" - method = "POST" - operation_name = "import_model_artifact" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Model/ImportModelArtifact" + required_arguments = ['projectId'] + resource_path = "/projects/{projectId}" + method = "GET" + operation_name = "get_project" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Project/GetProject" # 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_project got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "projectId": project_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="Project", + 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="Project", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + + def get_schedule(self, schedule_id, **kwargs): + """ + Gets a Schedule by identifier + + + :param str schedule_id: (required) + unique Schedule identifier + + :param str opc_request_id: (optional) + Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then 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.data_science.models.Schedule` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_schedule API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['scheduleId'] + resource_path = "/schedules/{scheduleId}" + method = "GET" + operation_name = "get_schedule" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Schedule/GetSchedule" + + # 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_schedule got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "scheduleId": schedule_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="Schedule", + 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="Schedule", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + + def get_step_artifact_content(self, pipeline_id, step_name, **kwargs): + """ + Download the artifact for a step in the pipeline. + + + :param str pipeline_id: (required) + The `OCID`__ of the pipeline. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param str step_name: (required) + Unique Step identifier in a pipeline. + + :param str opc_request_id: (optional) + Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID. + + :param str range: (optional) + Optional byte range to fetch, as described in `RFC 7233`__, section 2.1. + Note that only a single range of bytes is supported. + + __ https://tools.ietf.org/html/rfc7232#section-2.1 + + :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 stream + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_step_artifact_content API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['pipelineId', 'stepName'] + resource_path = "/pipelines/{pipelineId}/steps/{stepName}/artifact/content" + method = "GET" + operation_name = "get_step_artifact_content" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Pipeline/GetStepArtifactContent" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "opc_request_id", + "range" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + f"get_step_artifact_content got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "pipelineId": pipeline_id, + "stepName": step_name + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + + header_params = { + "accept": "application/octet-stream", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing), + "range": kwargs.get("range", 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="stream", + enforce_content_headers=False, + 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="stream", + enforce_content_headers=False, + 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 specified work request's information. + + + :param str work_request_id: (required) + The `OCID`__ of 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, then 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.data_science.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 = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/WorkRequest/GetWorkRequest" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + f"get_work_request got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "workRequestId": work_request_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + if retry_strategy is None: + retry_strategy = retry.DEFAULT_RETRY_STRATEGY + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="WorkRequest", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="WorkRequest", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + + def head_job_artifact(self, job_id, **kwargs): + """ + Gets job artifact metadata. + + + :param str job_id: (required) + The `OCID`__ of the job. + + __ 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, then 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 head_job_artifact API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['jobId'] + resource_path = "/jobs/{jobId}/artifact/content" + method = "HEAD" + operation_name = "head_job_artifact" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Job/HeadJobArtifact" + + # 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"head_job_artifact got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "jobId": job_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "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 head_model_artifact(self, model_id, **kwargs): + """ + Gets model artifact metadata for specified model. + + + :param str model_id: (required) + The `OCID`__ of the model. + + __ 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, then 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 head_model_artifact API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['modelId'] + resource_path = "/models/{modelId}/artifact/content" + method = "HEAD" + operation_name = "head_model_artifact" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Model/HeadModelArtifact" + + # 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"head_model_artifact 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, + 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 head_model_custom_metadatum_artifact(self, model_id, metadatum_key_name, **kwargs): + """ + Gets custom metadata artifact metadata for specified model metadata key. + + + :param str model_id: (required) + The `OCID`__ of the model. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param str metadatum_key_name: (required) + The name of the model metadatum in the metadata. + + :param str opc_request_id: (optional) + Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then 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 head_model_custom_metadatum_artifact API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['modelId', 'metadatumKeyName'] + resource_path = "/models/{modelId}/customMetadata/{metadatumKeyName}/artifact/content" + method = "HEAD" + operation_name = "head_model_custom_metadatum_artifact" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Model/HeadModelCustomMetadatumArtifact" + + # 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"head_model_custom_metadatum_artifact got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "modelId": model_id, + "metadatumKeyName": metadatum_key_name + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + if retry_strategy is None: + retry_strategy = retry.DEFAULT_RETRY_STRATEGY + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + 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 head_model_defined_metadatum_artifact(self, model_id, metadatum_key_name, **kwargs): + """ + Gets defined metadata artifact metadata for specified model metadata key. + + + :param str model_id: (required) + The `OCID`__ of the model. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param str metadatum_key_name: (required) + The name of the model metadatum in the metadata. + + :param str opc_request_id: (optional) + Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then 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 head_model_defined_metadatum_artifact API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['modelId', 'metadatumKeyName'] + resource_path = "/models/{modelId}/definedMetadata/{metadatumKeyName}/artifact/content" + method = "HEAD" + operation_name = "head_model_defined_metadatum_artifact" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Model/HeadModelDefinedMetadatumArtifact" + + # 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"head_model_defined_metadatum_artifact got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "modelId": model_id, + "metadatumKeyName": metadatum_key_name + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + if retry_strategy is None: + retry_strategy = retry.DEFAULT_RETRY_STRATEGY + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + 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 head_model_group_artifact(self, model_group_id, **kwargs): + """ + Gets model group artifact metadata for a specified model group. + + + :param str model_group_id: (required) + The `OCID`__ of the modelGroup. + + __ 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, then 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 head_model_group_artifact API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['modelGroupId'] + resource_path = "/modelGroups/{modelGroupId}/artifact/content" + method = "HEAD" + operation_name = "head_model_group_artifact" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/ModelGroup/HeadModelGroupArtifact" + + # 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"head_model_group_artifact got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "modelGroupId": model_group_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + + 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, + 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 head_step_artifact(self, pipeline_id, step_name, **kwargs): + """ + Get the artifact metadata for a step in the pipeline. + + + :param str pipeline_id: (required) + The `OCID`__ of the pipeline. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param str step_name: (required) + Unique Step identifier in a pipeline. + + :param str opc_request_id: (optional) + Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then 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 head_step_artifact API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['pipelineId', 'stepName'] + resource_path = "/pipelines/{pipelineId}/steps/{stepName}/artifact/content" + method = "HEAD" + operation_name = "head_step_artifact" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Pipeline/HeadStepArtifact" + + # 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"head_step_artifact got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "pipelineId": pipeline_id, + "stepName": step_name + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + if retry_strategy is None: + retry_strategy = retry.DEFAULT_RETRY_STRATEGY + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + 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 import_model_artifact(self, model_id, import_model_artifact_details, **kwargs): + """ + Import model artifact from service bucket + + + :param str model_id: (required) + The `OCID`__ of the model. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param oci.data_science.models.ImportModelArtifactDetails import_model_artifact_details: (required) + Model artifact source details for importing. + + :param str opc_request_id: (optional) + Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then 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 is 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 will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type None + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use import_model_artifact API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['modelId'] + resource_path = "/models/{modelId}/actions/importArtifact" + method = "POST" + operation_name = "import_model_artifact" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Model/ImportModelArtifact" + + # 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"import_model_artifact 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), + "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: + 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=import_model_artifact_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=import_model_artifact_details, + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + + def list_containers(self, **kwargs): + """ + List containers. + + + :param str opc_request_id: (optional) + Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID. + + :param bool is_latest: (optional) + if true, this returns latest version of container. + + :param str display_name: (optional) + Filter results by its user-friendly name. + + :param str container_name: (optional) + Filter results by the container name. + + :param str lifecycle_state: (optional) + Filter results by the specified lifecycle state. Must be a valid + state for the resource type. + + Allowed values are: "ACTIVE", "INACTIVE" + + :param str target_workload: (optional) + Filter results by the target workload. + + Allowed values are: "MODEL_DEPLOYMENT", "JOB_RUN" + + :param str usage_query_param: (optional) + Filter results by the usage. + + Allowed values are: "INFERENCE", "FINE_TUNE", "EVALUATION", "BATCH_INFERENCE", "OTHER" + + :param str tag_query_param: (optional) + Filter results by the container version tag. + + :param int limit: (optional) + For list pagination. The maximum number of results per page, + or items to return in a paginated \"List\" call. + 1 is the minimum, 100 is the maximum. + See `List Pagination`__. + + Example: `50` + + __ https://docs.cloud.oracle.com/iaas/Content/General/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. + + See `List Pagination`__. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/usingapi.htm#nine + + :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 list of :class:`~oci.data_science.models.ContainerSummary` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_containers API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = [] + resource_path = "/containers" + method = "GET" + operation_name = "list_containers" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/ContainerSummary/ListContainers" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "opc_request_id", + "is_latest", + "display_name", + "container_name", + "lifecycle_state", + "target_workload", + "usage_query_param", + "tag_query_param", + "limit", + "page" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + f"list_containers got unknown kwargs: {extra_kwargs!r}") + + if 'lifecycle_state' in kwargs: + lifecycle_state_allowed_values = ["ACTIVE", "INACTIVE"] + 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 'target_workload' in kwargs: + target_workload_allowed_values = ["MODEL_DEPLOYMENT", "JOB_RUN"] + if kwargs['target_workload'] not in target_workload_allowed_values: + raise ValueError( + f"Invalid value for `target_workload`, must be one of { target_workload_allowed_values }" + ) + + if 'usage_query_param' in kwargs: + usage_query_param_allowed_values = ["INFERENCE", "FINE_TUNE", "EVALUATION", "BATCH_INFERENCE", "OTHER"] + if kwargs['usage_query_param'] not in usage_query_param_allowed_values: + raise ValueError( + f"Invalid value for `usage_query_param`, must be one of { usage_query_param_allowed_values }" + ) + + query_params = { + "isLatest": kwargs.get("is_latest", missing), + "displayName": kwargs.get("display_name", missing), + "containerName": kwargs.get("container_name", missing), + "lifecycleState": kwargs.get("lifecycle_state", missing), + "targetWorkload": kwargs.get("target_workload", missing), + "usageQueryParam": kwargs.get("usage_query_param", missing), + "tagQueryParam": kwargs.get("tag_query_param", missing), + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", 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="list[ContainerSummary]", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="list[ContainerSummary]", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + + def list_data_science_private_endpoints(self, compartment_id, **kwargs): + """ + Lists all Data Science private endpoints in the specified compartment. The query must include compartmentId. The query can also include one other parameter. If the query doesn't include compartmentId, or includes compartmentId with two or more other parameters, then an error is returned. + + + :param str compartment_id: (required) + Filter results by the `OCID`__ of the compartment. + + __ 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, then provide the request ID. + + :param int limit: (optional) + For list pagination. The maximum number of results per page, + or items to return in a paginated \"List\" call. + 1 is the minimum, 100 is the maximum. + See `List Pagination`__. + + Example: `50` + + __ https://docs.cloud.oracle.com/iaas/Content/General/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. + + See `List Pagination`__. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/usingapi.htm#nine + + :param str lifecycle_state: (optional) + The lifecycle state of the private endpoint. + + Allowed values are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", "NEEDS_ATTENTION" + + :param str sort_by: (optional) + The field used to sort the results. Multiple fields aren't supported. + + Allowed values are: "timeCreated" + + :param str sort_order: (optional) + Specifies sort order to use, either `ASC` (ascending) or `DESC` (descending). + + Allowed values are: "ASC", "DESC" + + :param str display_name: (optional) + Filter results by its user-friendly name. + + :param str created_by: (optional) + Filter results by the `OCID`__ of the user who created the resource. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param str data_science_resource_type: (optional) + Resource types in the Data Science service such as notebooks. + + Allowed values are: "NOTEBOOK_SESSION", "MODEL_DEPLOYMENT" + + :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 list of :class:`~oci.data_science.models.DataSciencePrivateEndpointSummary` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_data_science_private_endpoints API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['compartmentId'] + resource_path = "/dataSciencePrivateEndpoints" + method = "GET" + operation_name = "list_data_science_private_endpoints" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/DataSciencePrivateEndpoint/ListDataSciencePrivateEndpoints" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "opc_request_id", + "limit", + "page", + "lifecycle_state", + "sort_by", + "sort_order", + "display_name", + "created_by", + "data_science_resource_type" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + f"list_data_science_private_endpoints 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_by' in kwargs: + sort_by_allowed_values = ["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 }" + ) + + 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 'data_science_resource_type' in kwargs: + data_science_resource_type_allowed_values = ["NOTEBOOK_SESSION", "MODEL_DEPLOYMENT"] + if kwargs['data_science_resource_type'] not in data_science_resource_type_allowed_values: + raise ValueError( + f"Invalid value for `data_science_resource_type`, must be one of { data_science_resource_type_allowed_values }" + ) + + query_params = { + "compartmentId": compartment_id, + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", missing), + "lifecycleState": kwargs.get("lifecycle_state", missing), + "sortBy": kwargs.get("sort_by", missing), + "sortOrder": kwargs.get("sort_order", missing), + "displayName": kwargs.get("display_name", missing), + "createdBy": kwargs.get("created_by", missing), + "dataScienceResourceType": kwargs.get("data_science_resource_type", 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="list[DataSciencePrivateEndpointSummary]", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="list[DataSciencePrivateEndpointSummary]", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + + def list_fast_launch_job_configs(self, compartment_id, **kwargs): + """ + List fast launch capable job configs in the specified compartment. + + + :param str compartment_id: (required) + Filter results by the `OCID`__ of the compartment. + + __ 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, then provide the request ID. + + :param int limit: (optional) + For list pagination. The maximum number of results per page, + or items to return in a paginated \"List\" call. + 1 is the minimum, 100 is the maximum. + See `List Pagination`__. + + Example: `50` + + __ https://docs.cloud.oracle.com/iaas/Content/General/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. + + See `List Pagination`__. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/usingapi.htm#nine + + :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 list of :class:`~oci.data_science.models.FastLaunchJobConfigSummary` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_fast_launch_job_configs API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['compartmentId'] + resource_path = "/fastLaunchJobConfigs" + method = "GET" + operation_name = "list_fast_launch_job_configs" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/FastLaunchJobConfigSummary/ListFastLaunchJobConfigs" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "opc_request_id", + "limit", + "page" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + f"list_fast_launch_job_configs got unknown kwargs: {extra_kwargs!r}") + + query_params = { + "compartmentId": compartment_id, + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", 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="list[FastLaunchJobConfigSummary]", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="list[FastLaunchJobConfigSummary]", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + + def list_job_runs(self, compartment_id, **kwargs): + """ + List out job runs. + + + :param str compartment_id: (required) + Filter results by the `OCID`__ of the compartment. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param str id: (optional) + Filter results by `OCID`__. Must be an OCID of the correct type for the resource type. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param str job_id: (optional) + The `OCID`__ of the job. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param str created_by: (optional) + Filter results by the `OCID`__ of the user who created the resource. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param str display_name: (optional) + Filter results by its user-friendly name. + + :param str opc_request_id: (optional) + Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID. + + :param int limit: (optional) + For list pagination. The maximum number of results per page, + or items to return in a paginated \"List\" call. + 1 is the minimum, 100 is the maximum. + See `List Pagination`__. + + Example: `50` + + __ https://docs.cloud.oracle.com/iaas/Content/General/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. + + See `List Pagination`__. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/usingapi.htm#nine + + :param str sort_order: (optional) + Specifies sort order to use, either `ASC` (ascending) or `DESC` (descending). + + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + Specifies the field to sort by. Accepts only one field. + By default, when you sort by `timeCreated`, the results are shown + in descending order. When you sort by `displayName`, the results are + shown in ascending order. Sort order for the `displayName` field is case sensitive. + + Allowed values are: "timeCreated", "displayName" + + :param str lifecycle_state: (optional) + Filter results by the specified lifecycle state. Must be a valid + state for the resource type. + + Allowed values are: "ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", "DELETED", "NEEDS_ATTENTION" + + :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 list of :class:`~oci.data_science.models.JobRunSummary` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_job_runs API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['compartmentId'] + resource_path = "/jobRuns" + method = "GET" + operation_name = "list_job_runs" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/JobRunSummary/ListJobRuns" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "id", + "job_id", + "created_by", + "display_name", "opc_request_id", - "if_match" + "limit", + "page", + "sort_order", + "sort_by", + "lifecycle_state" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"import_model_artifact got unknown kwargs: {extra_kwargs!r}") + f"list_job_runs got unknown kwargs: {extra_kwargs!r}") - path_params = { - "modelId": model_id - } + 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 }" + ) - path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + if 'sort_by' in kwargs: + sort_by_allowed_values = ["timeCreated", "displayName"] + if kwargs['sort_by'] not in sort_by_allowed_values: + raise ValueError( + f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }" + ) - 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 'lifecycle_state' in kwargs: + lifecycle_state_allowed_values = ["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", "DELETED", "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 }" + ) + + query_params = { + "id": kwargs.get("id", missing), + "jobId": kwargs.get("job_id", missing), + "compartmentId": compartment_id, + "createdBy": kwargs.get("created_by", missing), + "displayName": kwargs.get("display_name", missing), + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", missing), + "sortOrder": kwargs.get("sort_order", missing), + "sortBy": kwargs.get("sort_by", missing), + "lifecycleState": kwargs.get("lifecycle_state", 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), - "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} @@ -10486,6 +12571,8 @@ def import_model_artifact(self, model_id, import_model_artifact_details, **kwarg 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): @@ -10495,9 +12582,9 @@ def import_model_artifact(self, model_id, import_model_artifact_details, **kwarg self.base_client.call_api, resource_path=resource_path, method=method, - path_params=path_params, + query_params=query_params, header_params=header_params, - body=import_model_artifact_details, + response_type="list[JobRunSummary]", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -10506,49 +12593,26 @@ def import_model_artifact(self, model_id, import_model_artifact_details, **kwarg return self.base_client.call_api( resource_path=resource_path, method=method, - path_params=path_params, + query_params=query_params, header_params=header_params, - body=import_model_artifact_details, + response_type="list[JobRunSummary]", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def list_containers(self, **kwargs): + def list_job_shapes(self, compartment_id, **kwargs): """ - List containers. - - - :param str opc_request_id: (optional) - Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID. - - :param bool is_latest: (optional) - if true, this returns latest version of container. - - :param str display_name: (optional) - Filter results by its user-friendly name. - - :param str container_name: (optional) - Filter results by the container name. - - :param str lifecycle_state: (optional) - Filter results by the specified lifecycle state. Must be a valid - state for the resource type. - - Allowed values are: "ACTIVE", "INACTIVE" - - :param str target_workload: (optional) - Filter results by the target workload. + List job shapes available in the specified compartment. - Allowed values are: "MODEL_DEPLOYMENT", "JOB_RUN" - :param str usage_query_param: (optional) - Filter results by the usage. + :param str compartment_id: (required) + Filter results by the `OCID`__ of the compartment. - Allowed values are: "INFERENCE", "FINE_TUNE", "EVALUATION", "BATCH_INFERENCE", "OTHER" + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm - :param str tag_query_param: (optional) - Filter results by the container version tag. + :param str opc_request_id: (optional) + Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID. :param int limit: (optional) For list pagination. The maximum number of results per page, @@ -10580,68 +12644,34 @@ def list_containers(self, **kwargs): allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.data_science.models.ContainerSummary` + :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.data_science.models.JobShapeSummary` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use list_containers API. + Click `here `__ to see an example of how to use list_job_shapes API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = [] - resource_path = "/containers" + required_arguments = ['compartmentId'] + resource_path = "/jobShapes" method = "GET" - operation_name = "list_containers" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/ContainerSummary/ListContainers" + operation_name = "list_job_shapes" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/JobShapeSummary/ListJobShapes" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "opc_request_id", - "is_latest", - "display_name", - "container_name", - "lifecycle_state", - "target_workload", - "usage_query_param", - "tag_query_param", "limit", "page" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"list_containers got unknown kwargs: {extra_kwargs!r}") - - if 'lifecycle_state' in kwargs: - lifecycle_state_allowed_values = ["ACTIVE", "INACTIVE"] - 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 'target_workload' in kwargs: - target_workload_allowed_values = ["MODEL_DEPLOYMENT", "JOB_RUN"] - if kwargs['target_workload'] not in target_workload_allowed_values: - raise ValueError( - f"Invalid value for `target_workload`, must be one of { target_workload_allowed_values }" - ) - - if 'usage_query_param' in kwargs: - usage_query_param_allowed_values = ["INFERENCE", "FINE_TUNE", "EVALUATION", "BATCH_INFERENCE", "OTHER"] - if kwargs['usage_query_param'] not in usage_query_param_allowed_values: - raise ValueError( - f"Invalid value for `usage_query_param`, must be one of { usage_query_param_allowed_values }" - ) + f"list_job_shapes got unknown kwargs: {extra_kwargs!r}") query_params = { - "isLatest": kwargs.get("is_latest", missing), - "displayName": kwargs.get("display_name", missing), - "containerName": kwargs.get("container_name", missing), - "lifecycleState": kwargs.get("lifecycle_state", missing), - "targetWorkload": kwargs.get("target_workload", missing), - "usageQueryParam": kwargs.get("usage_query_param", missing), - "tagQueryParam": kwargs.get("tag_query_param", missing), + "compartmentId": compartment_id, "limit": kwargs.get("limit", missing), "page": kwargs.get("page", missing) } @@ -10671,7 +12701,7 @@ def list_containers(self, **kwargs): method=method, query_params=query_params, header_params=header_params, - response_type="list[ContainerSummary]", + response_type="list[JobShapeSummary]", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -10682,15 +12712,15 @@ def list_containers(self, **kwargs): method=method, query_params=query_params, header_params=header_params, - response_type="list[ContainerSummary]", + response_type="list[JobShapeSummary]", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def list_data_science_private_endpoints(self, compartment_id, **kwargs): + def list_jobs(self, compartment_id, **kwargs): """ - Lists all Data Science private endpoints in the specified compartment. The query must include compartmentId. The query can also include one other parameter. If the query doesn't include compartmentId, or includes compartmentId with two or more other parameters, then an error is returned. + List jobs in the specified compartment. :param str compartment_id: (required) @@ -10698,8 +12728,29 @@ def list_data_science_private_endpoints(self, compartment_id, **kwargs): __ 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, then provide the request ID. + :param str project_id: (optional) + Filter results by the `OCID`__ of the project. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param str id: (optional) + Filter results by `OCID`__. Must be an OCID of the correct type for the resource type. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param str display_name: (optional) + Filter results by its user-friendly name. + + :param str lifecycle_state: (optional) + Filter results by the specified lifecycle state. Must be a valid + state for the resource type. + + Allowed values are: "CREATING", "ACTIVE", "DELETING", "FAILED", "DELETED" + + :param str created_by: (optional) + Filter results by the `OCID`__ of the user who created the resource. + + __ 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, @@ -10719,33 +12770,21 @@ def list_data_science_private_endpoints(self, compartment_id, **kwargs): __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/usingapi.htm#nine - :param str lifecycle_state: (optional) - The lifecycle state of the private endpoint. - - Allowed values are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", "NEEDS_ATTENTION" - - :param str sort_by: (optional) - The field used to sort the results. Multiple fields aren't supported. - - Allowed values are: "timeCreated" - :param str sort_order: (optional) Specifies sort order to use, either `ASC` (ascending) or `DESC` (descending). Allowed values are: "ASC", "DESC" - :param str display_name: (optional) - Filter results by its user-friendly name. - - :param str created_by: (optional) - Filter results by the `OCID`__ of the user who created the resource. - - __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + :param str sort_by: (optional) + Specifies the field to sort by. Accepts only one field. + By default, when you sort by `timeCreated`, the results are shown + in descending order. When you sort by `displayName`, the results are + shown in ascending order. Sort order for the `displayName` field is case sensitive. - :param str data_science_resource_type: (optional) - Resource types in the Data Science service such as notebooks. + Allowed values are: "timeCreated", "displayName" - Allowed values are: "NOTEBOOK_SESSION", "MODEL_DEPLOYMENT" + :param str opc_request_id: (optional) + Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then 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. @@ -10759,52 +12798,46 @@ def list_data_science_private_endpoints(self, compartment_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 list of :class:`~oci.data_science.models.DataSciencePrivateEndpointSummary` + :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.data_science.models.JobSummary` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use list_data_science_private_endpoints API. + Click `here `__ to see an example of how to use list_jobs API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. required_arguments = ['compartmentId'] - resource_path = "/dataSciencePrivateEndpoints" + resource_path = "/jobs" method = "GET" - operation_name = "list_data_science_private_endpoints" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/DataSciencePrivateEndpoint/ListDataSciencePrivateEndpoints" + operation_name = "list_jobs" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/JobSummary/ListJobs" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "opc_request_id", + "project_id", + "id", + "display_name", + "lifecycle_state", + "created_by", "limit", "page", - "lifecycle_state", - "sort_by", "sort_order", - "display_name", - "created_by", - "data_science_resource_type" + "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_data_science_private_endpoints got unknown kwargs: {extra_kwargs!r}") + f"list_jobs got unknown kwargs: {extra_kwargs!r}") if 'lifecycle_state' in kwargs: - lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", "NEEDS_ATTENTION"] + lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "DELETING", "FAILED", "DELETED"] if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: raise ValueError( f"Invalid value for `lifecycle_state`, must be one of { lifecycle_state_allowed_values }" ) - if 'sort_by' in kwargs: - sort_by_allowed_values = ["timeCreated"] - 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: @@ -10812,23 +12845,24 @@ def list_data_science_private_endpoints(self, compartment_id, **kwargs): f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }" ) - if 'data_science_resource_type' in kwargs: - data_science_resource_type_allowed_values = ["NOTEBOOK_SESSION", "MODEL_DEPLOYMENT"] - if kwargs['data_science_resource_type'] not in data_science_resource_type_allowed_values: + if 'sort_by' in kwargs: + sort_by_allowed_values = ["timeCreated", "displayName"] + if kwargs['sort_by'] not in sort_by_allowed_values: raise ValueError( - f"Invalid value for `data_science_resource_type`, must be one of { data_science_resource_type_allowed_values }" + f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }" ) query_params = { "compartmentId": compartment_id, + "projectId": kwargs.get("project_id", missing), + "id": kwargs.get("id", missing), + "displayName": kwargs.get("display_name", missing), + "lifecycleState": kwargs.get("lifecycle_state", missing), + "createdBy": kwargs.get("created_by", missing), "limit": kwargs.get("limit", missing), "page": kwargs.get("page", missing), - "lifecycleState": kwargs.get("lifecycle_state", missing), - "sortBy": kwargs.get("sort_by", missing), "sortOrder": kwargs.get("sort_order", missing), - "displayName": kwargs.get("display_name", missing), - "createdBy": kwargs.get("created_by", missing), - "dataScienceResourceType": kwargs.get("data_science_resource_type", 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} @@ -10856,7 +12890,7 @@ def list_data_science_private_endpoints(self, compartment_id, **kwargs): method=method, query_params=query_params, header_params=header_params, - response_type="list[DataSciencePrivateEndpointSummary]", + response_type="list[JobSummary]", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -10867,24 +12901,24 @@ def list_data_science_private_endpoints(self, compartment_id, **kwargs): method=method, query_params=query_params, header_params=header_params, - response_type="list[DataSciencePrivateEndpointSummary]", + response_type="list[JobSummary]", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def list_fast_launch_job_configs(self, compartment_id, **kwargs): + def list_ml_application_implementation_versions(self, ml_application_implementation_id, **kwargs): """ - List fast launch capable job configs in the specified compartment. + Returns a list of MlApplicationImplementationVersions. - :param str compartment_id: (required) - Filter results by the `OCID`__ of the compartment. + :param str ml_application_implementation_id: (required) + unique MlApplicationImplementation identifier - __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + :param str lifecycle_state: (optional) + A filter to return only resources matching the given lifecycleState. - :param str opc_request_id: (optional) - Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID. + Allowed values are: "CREATING", "ACTIVE", "FAILED", "DELETING" :param int limit: (optional) For list pagination. The maximum number of results per page, @@ -10904,6 +12938,19 @@ def list_fast_launch_job_configs(self, compartment_id, **kwargs): __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/usingapi.htm#nine + :param str sort_order: (optional) + Specifies sort order to use, either `ASC` (ascending) or `DESC` (descending). + + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for name is ascending. + + Allowed values are: "timeCreated", "name" + + :param str opc_request_id: (optional) + Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then 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. @@ -10916,36 +12963,63 @@ def list_fast_launch_job_configs(self, compartment_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 list of :class:`~oci.data_science.models.FastLaunchJobConfigSummary` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_science.models.MlApplicationImplementationVersionCollection` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use list_fast_launch_job_configs API. + Click `here `__ to see an example of how to use list_ml_application_implementation_versions API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['compartmentId'] - resource_path = "/fastLaunchJobConfigs" + required_arguments = ['mlApplicationImplementationId'] + resource_path = "/mlApplicationImplementationVersions" method = "GET" - operation_name = "list_fast_launch_job_configs" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/FastLaunchJobConfigSummary/ListFastLaunchJobConfigs" + operation_name = "list_ml_application_implementation_versions" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/MlApplicationImplementationVersion/ListMlApplicationImplementationVersions" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "opc_request_id", + "lifecycle_state", "limit", - "page" + "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_fast_launch_job_configs got unknown kwargs: {extra_kwargs!r}") + f"list_ml_application_implementation_versions got unknown kwargs: {extra_kwargs!r}") + + if 'lifecycle_state' in kwargs: + lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "FAILED", "DELETING"] + 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", "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, + "mlApplicationImplementationId": ml_application_implementation_id, + "lifecycleState": kwargs.get("lifecycle_state", missing), "limit": kwargs.get("limit", missing), - "page": kwargs.get("page", 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} @@ -10973,7 +13047,7 @@ def list_fast_launch_job_configs(self, compartment_id, **kwargs): method=method, query_params=query_params, header_params=header_params, - response_type="list[FastLaunchJobConfigSummary]", + response_type="MlApplicationImplementationVersionCollection", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -10984,15 +13058,15 @@ def list_fast_launch_job_configs(self, compartment_id, **kwargs): method=method, query_params=query_params, header_params=header_params, - response_type="list[FastLaunchJobConfigSummary]", + response_type="MlApplicationImplementationVersionCollection", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def list_job_runs(self, compartment_id, **kwargs): + def list_ml_application_implementations(self, compartment_id, **kwargs): """ - List out job runs. + Returns a list of MlApplicationImplementations. :param str compartment_id: (required) @@ -11000,26 +13074,22 @@ def list_job_runs(self, compartment_id, **kwargs): __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm - :param str id: (optional) - Filter results by `OCID`__. Must be an OCID of the correct type for the resource type. - - __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm - - :param str job_id: (optional) - The `OCID`__ of the job. + :param str ml_application_implementation_id: (optional) + unique MlApplicationImplementation identifier - __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + :param str name: (optional) + A filter to return only resources that match the entire name given. - :param str created_by: (optional) - Filter results by the `OCID`__ of the user who created the resource. + :param str ml_application_id: (optional) + unique MlApplication identifier - __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + :param bool compartment_id_in_subtree: (optional) + If it is true search must include all results from descendant compartments. Value true is allowed only if compartmentId refers to root compartment. - :param str display_name: (optional) - Filter results by its user-friendly name. + :param str lifecycle_state: (optional) + A filter to return only resources with lifecycleState matching the given lifecycleState. - :param str opc_request_id: (optional) - Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID. + Allowed values are: "CREATING", "ACTIVE", "NEEDS_ATTENTION", "FAILED", "DELETING", "UPDATING" :param int limit: (optional) For list pagination. The maximum number of results per page, @@ -11045,18 +13115,12 @@ def list_job_runs(self, compartment_id, **kwargs): Allowed values are: "ASC", "DESC" :param str sort_by: (optional) - Specifies the field to sort by. Accepts only one field. - By default, when you sort by `timeCreated`, the results are shown - in descending order. When you sort by `displayName`, the results are - shown in ascending order. Sort order for the `displayName` field is case sensitive. - - Allowed values are: "timeCreated", "displayName" + The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for name is ascending. - :param str lifecycle_state: (optional) - Filter results by the specified lifecycle state. Must be a valid - state for the resource type. + Allowed values are: "timeCreated", "name" - Allowed values are: "ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", "DELETED", "NEEDS_ATTENTION" + :param str opc_request_id: (optional) + Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then 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. @@ -11070,38 +13134,45 @@ def list_job_runs(self, compartment_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 list of :class:`~oci.data_science.models.JobRunSummary` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_science.models.MlApplicationImplementationCollection` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use list_job_runs API. + Click `here `__ to see an example of how to use list_ml_application_implementations API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. required_arguments = ['compartmentId'] - resource_path = "/jobRuns" + resource_path = "/mlApplicationImplementations" method = "GET" - operation_name = "list_job_runs" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/JobRunSummary/ListJobRuns" + operation_name = "list_ml_application_implementations" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/MlApplicationImplementation/ListMlApplicationImplementations" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "id", - "job_id", - "created_by", - "display_name", - "opc_request_id", + "ml_application_implementation_id", + "name", + "ml_application_id", + "compartment_id_in_subtree", + "lifecycle_state", "limit", "page", "sort_order", "sort_by", - "lifecycle_state" + "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_job_runs got unknown kwargs: {extra_kwargs!r}") + f"list_ml_application_implementations got unknown kwargs: {extra_kwargs!r}") + + if 'lifecycle_state' in kwargs: + lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "NEEDS_ATTENTION", "FAILED", "DELETING", "UPDATING"] + 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"] @@ -11111,30 +13182,23 @@ def list_job_runs(self, compartment_id, **kwargs): ) if 'sort_by' in kwargs: - sort_by_allowed_values = ["timeCreated", "displayName"] + sort_by_allowed_values = ["timeCreated", "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 }" ) - if 'lifecycle_state' in kwargs: - lifecycle_state_allowed_values = ["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", "DELETED", "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 }" - ) - query_params = { - "id": kwargs.get("id", missing), - "jobId": kwargs.get("job_id", missing), + "mlApplicationImplementationId": kwargs.get("ml_application_implementation_id", missing), + "name": kwargs.get("name", missing), + "mlApplicationId": kwargs.get("ml_application_id", missing), "compartmentId": compartment_id, - "createdBy": kwargs.get("created_by", missing), - "displayName": kwargs.get("display_name", missing), + "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing), + "lifecycleState": kwargs.get("lifecycle_state", missing), "limit": kwargs.get("limit", missing), "page": kwargs.get("page", missing), "sortOrder": kwargs.get("sort_order", missing), - "sortBy": kwargs.get("sort_by", missing), - "lifecycleState": kwargs.get("lifecycle_state", 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} @@ -11162,7 +13226,7 @@ def list_job_runs(self, compartment_id, **kwargs): method=method, query_params=query_params, header_params=header_params, - response_type="list[JobRunSummary]", + response_type="MlApplicationImplementationCollection", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -11173,15 +13237,15 @@ def list_job_runs(self, compartment_id, **kwargs): method=method, query_params=query_params, header_params=header_params, - response_type="list[JobRunSummary]", + response_type="MlApplicationImplementationCollection", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def list_job_shapes(self, compartment_id, **kwargs): + def list_ml_application_instance_views(self, compartment_id, **kwargs): """ - List job shapes available in the specified compartment. + Returns a list of MlApplicationInstanceViews. :param str compartment_id: (required) @@ -11189,8 +13253,19 @@ def list_job_shapes(self, compartment_id, **kwargs): __ 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, then provide the request ID. + :param str display_name: (optional) + Filter results by its user-friendly name. + + :param str ml_application_id: (optional) + unique MlApplication identifier + + :param str ml_application_implementation_id: (optional) + unique MlApplicationImplementation identifier + + :param str lifecycle_state: (optional) + A filter to return only resources matching the given lifecycleState. + + Allowed values are: "CREATING", "UPDATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", "NEEDS_ATTENTION", "FAILED" :param int limit: (optional) For list pagination. The maximum number of results per page, @@ -11210,6 +13285,19 @@ def list_job_shapes(self, compartment_id, **kwargs): __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/usingapi.htm#nine + :param str sort_order: (optional) + Specifies sort order to use, either `ASC` (ascending) or `DESC` (descending). + + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for name is ascending. + + Allowed values are: "timeCreated", "name" + + :param str opc_request_id: (optional) + Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then 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. @@ -11222,36 +13310,69 @@ def list_job_shapes(self, compartment_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 list of :class:`~oci.data_science.models.JobShapeSummary` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_science.models.MlApplicationInstanceViewCollection` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use list_job_shapes API. + Click `here `__ to see an example of how to use list_ml_application_instance_views API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. required_arguments = ['compartmentId'] - resource_path = "/jobShapes" + resource_path = "/mlApplicationInstanceViews" method = "GET" - operation_name = "list_job_shapes" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/JobShapeSummary/ListJobShapes" + operation_name = "list_ml_application_instance_views" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/MlApplicationInstanceView/ListMlApplicationInstanceViews" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "opc_request_id", + "display_name", + "ml_application_id", + "ml_application_implementation_id", + "lifecycle_state", "limit", - "page" + "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_job_shapes got unknown kwargs: {extra_kwargs!r}") + f"list_ml_application_instance_views got unknown kwargs: {extra_kwargs!r}") + + if 'lifecycle_state' in kwargs: + lifecycle_state_allowed_values = ["CREATING", "UPDATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", "NEEDS_ATTENTION", "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 = ["timeCreated", "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, + "displayName": kwargs.get("display_name", missing), + "mlApplicationId": kwargs.get("ml_application_id", missing), + "mlApplicationImplementationId": kwargs.get("ml_application_implementation_id", missing), + "lifecycleState": kwargs.get("lifecycle_state", missing), "limit": kwargs.get("limit", missing), - "page": kwargs.get("page", 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} @@ -11279,7 +13400,7 @@ def list_job_shapes(self, compartment_id, **kwargs): method=method, query_params=query_params, header_params=header_params, - response_type="list[JobShapeSummary]", + response_type="MlApplicationInstanceViewCollection", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -11290,15 +13411,15 @@ def list_job_shapes(self, compartment_id, **kwargs): method=method, query_params=query_params, header_params=header_params, - response_type="list[JobShapeSummary]", + response_type="MlApplicationInstanceViewCollection", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def list_jobs(self, compartment_id, **kwargs): + def list_ml_application_instances(self, compartment_id, **kwargs): """ - List jobs in the specified compartment. + Returns a list of MlApplicationsInstances. :param str compartment_id: (required) @@ -11306,29 +13427,16 @@ def list_jobs(self, compartment_id, **kwargs): __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm - :param str project_id: (optional) - Filter results by the `OCID`__ of the project. - - __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm - - :param str id: (optional) - Filter results by `OCID`__. Must be an OCID of the correct type for the resource type. - - __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm - :param str display_name: (optional) Filter results by its user-friendly name. - :param str lifecycle_state: (optional) - Filter results by the specified lifecycle state. Must be a valid - state for the resource type. - - Allowed values are: "CREATING", "ACTIVE", "DELETING", "FAILED", "DELETED" + :param str ml_application_id: (optional) + unique MlApplication identifier - :param str created_by: (optional) - Filter results by the `OCID`__ of the user who created the resource. + :param str lifecycle_state: (optional) + A filter to return only resources matching the given lifecycleState. - __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + Allowed values are: "CREATING", "UPDATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", "NEEDS_ATTENTION", "FAILED" :param int limit: (optional) For list pagination. The maximum number of results per page, @@ -11354,12 +13462,9 @@ def list_jobs(self, compartment_id, **kwargs): Allowed values are: "ASC", "DESC" :param str sort_by: (optional) - Specifies the field to sort by. Accepts only one field. - By default, when you sort by `timeCreated`, the results are shown - in descending order. When you sort by `displayName`, the results are - shown in ascending order. Sort order for the `displayName` field is case sensitive. + The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for name is ascending. - Allowed values are: "timeCreated", "displayName" + Allowed values are: "timeCreated", "name" :param str opc_request_id: (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID. @@ -11376,28 +13481,26 @@ def list_jobs(self, compartment_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 list of :class:`~oci.data_science.models.JobSummary` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_science.models.MlApplicationInstanceCollection` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use list_jobs API. + Click `here `__ to see an example of how to use list_ml_application_instances API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. required_arguments = ['compartmentId'] - resource_path = "/jobs" + resource_path = "/mlApplicationInstances" method = "GET" - operation_name = "list_jobs" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/JobSummary/ListJobs" + operation_name = "list_ml_application_instances" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/MlApplicationInstance/ListMlApplicationInstances" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "project_id", - "id", "display_name", + "ml_application_id", "lifecycle_state", - "created_by", "limit", "page", "sort_order", @@ -11407,10 +13510,10 @@ def list_jobs(self, compartment_id, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"list_jobs got unknown kwargs: {extra_kwargs!r}") + f"list_ml_application_instances got unknown kwargs: {extra_kwargs!r}") if 'lifecycle_state' in kwargs: - lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "DELETING", "FAILED", "DELETED"] + lifecycle_state_allowed_values = ["CREATING", "UPDATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", "NEEDS_ATTENTION", "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 }" @@ -11424,7 +13527,7 @@ def list_jobs(self, compartment_id, **kwargs): ) if 'sort_by' in kwargs: - sort_by_allowed_values = ["timeCreated", "displayName"] + sort_by_allowed_values = ["timeCreated", "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 }" @@ -11432,11 +13535,9 @@ def list_jobs(self, compartment_id, **kwargs): query_params = { "compartmentId": compartment_id, - "projectId": kwargs.get("project_id", missing), - "id": kwargs.get("id", missing), "displayName": kwargs.get("display_name", missing), + "mlApplicationId": kwargs.get("ml_application_id", missing), "lifecycleState": kwargs.get("lifecycle_state", missing), - "createdBy": kwargs.get("created_by", missing), "limit": kwargs.get("limit", missing), "page": kwargs.get("page", missing), "sortOrder": kwargs.get("sort_order", missing), @@ -11468,7 +13569,7 @@ def list_jobs(self, compartment_id, **kwargs): method=method, query_params=query_params, header_params=header_params, - response_type="list[JobSummary]", + response_type="MlApplicationInstanceCollection", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -11479,24 +13580,35 @@ def list_jobs(self, compartment_id, **kwargs): method=method, query_params=query_params, header_params=header_params, - response_type="list[JobSummary]", + response_type="MlApplicationInstanceCollection", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def list_ml_application_implementation_versions(self, ml_application_implementation_id, **kwargs): + def list_ml_applications(self, compartment_id, **kwargs): """ - Returns a list of MlApplicationImplementationVersions. + Returns a list of MlApplications. - :param str ml_application_implementation_id: (required) - unique MlApplicationImplementation identifier + :param str compartment_id: (required) + Filter results by the `OCID`__ of the compartment. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param str ml_application_id: (optional) + unique MlApplication identifier + + :param bool compartment_id_in_subtree: (optional) + If it is true search must include all results from descendant compartments. Value true is allowed only if compartmentId refers to root compartment. + + :param str name: (optional) + A filter to return only resources that match the entire name given. :param str lifecycle_state: (optional) - A filter to return only resources matching the given lifecycleState. + A filter to return only resources with lifecycleState matching the given lifecycleState. - Allowed values are: "CREATING", "ACTIVE", "FAILED", "DELETING" + Allowed values are: "ACTIVE", "FAILED" :param int limit: (optional) For list pagination. The maximum number of results per page, @@ -11541,23 +13653,26 @@ def list_ml_application_implementation_versions(self, ml_application_implementat allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_science.models.MlApplicationImplementationVersionCollection` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_science.models.MlApplicationCollection` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use list_ml_application_implementation_versions API. + Click `here `__ to see an example of how to use list_ml_applications API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['mlApplicationImplementationId'] - resource_path = "/mlApplicationImplementationVersions" + required_arguments = ['compartmentId'] + resource_path = "/mlApplications" method = "GET" - operation_name = "list_ml_application_implementation_versions" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/MlApplicationImplementationVersion/ListMlApplicationImplementationVersions" + operation_name = "list_ml_applications" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/MlApplication/ListMlApplications" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", + "ml_application_id", + "compartment_id_in_subtree", + "name", "lifecycle_state", "limit", "page", @@ -11568,10 +13683,10 @@ def list_ml_application_implementation_versions(self, ml_application_implementat extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"list_ml_application_implementation_versions got unknown kwargs: {extra_kwargs!r}") + f"list_ml_applications got unknown kwargs: {extra_kwargs!r}") if 'lifecycle_state' in kwargs: - lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "FAILED", "DELETING"] + lifecycle_state_allowed_values = ["ACTIVE", "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 }" @@ -11592,7 +13707,10 @@ def list_ml_application_implementation_versions(self, ml_application_implementat ) query_params = { - "mlApplicationImplementationId": ml_application_implementation_id, + "mlApplicationId": kwargs.get("ml_application_id", missing), + "compartmentId": compartment_id, + "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing), + "name": kwargs.get("name", missing), "lifecycleState": kwargs.get("lifecycle_state", missing), "limit": kwargs.get("limit", missing), "page": kwargs.get("page", missing), @@ -11625,7 +13743,7 @@ def list_ml_application_implementation_versions(self, ml_application_implementat method=method, query_params=query_params, header_params=header_params, - response_type="MlApplicationImplementationVersionCollection", + response_type="MlApplicationCollection", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -11636,38 +13754,43 @@ def list_ml_application_implementation_versions(self, ml_application_implementat method=method, query_params=query_params, header_params=header_params, - response_type="MlApplicationImplementationVersionCollection", + response_type="MlApplicationCollection", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def list_ml_application_implementations(self, compartment_id, **kwargs): + def list_model_deployment_model_states(self, model_deployment_id, compartment_id, **kwargs): """ - Returns a list of MlApplicationImplementations. + Lists the status of models in a model group deployment. + + + :param str model_deployment_id: (required) + The `OCID`__ of the model deployment. + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm :param str compartment_id: (required) Filter results by the `OCID`__ of the compartment. __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm - :param str ml_application_implementation_id: (optional) - unique MlApplicationImplementation identifier + :param str project_id: (optional) + Filter results by the `OCID`__ of the project. - :param str name: (optional) - A filter to return only resources that match the entire name given. + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm - :param str ml_application_id: (optional) - unique MlApplication identifier + :param str display_name: (optional) + Filter results by its user-friendly name. - :param bool compartment_id_in_subtree: (optional) - If it is true search must include all results from descendant compartments. Value true is allowed only if compartmentId refers to root compartment. + :param str inference_key: (optional) + Filter results by the inference key. - :param str lifecycle_state: (optional) - A filter to return only resources with lifecycleState matching the given lifecycleState. + :param str model_id: (optional) + Filter results by the model ocid. - Allowed values are: "CREATING", "ACTIVE", "NEEDS_ATTENTION", "FAILED", "DELETING", "UPDATING" + :param str opc_request_id: (optional) + Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID. :param int limit: (optional) For list pagination. The maximum number of results per page, @@ -11693,12 +13816,15 @@ def list_ml_application_implementations(self, compartment_id, **kwargs): Allowed values are: "ASC", "DESC" :param str sort_by: (optional) - The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for name is ascending. + Specifies the field to sort by. Accepts only one field. + By default, when you sort by `timeCreated`, results are shown + in descending order. When you sort by `displayName`, results are + shown in ascending order. Sort order for the `displayName` field is case sensitive. - Allowed values are: "timeCreated", "name" + Allowed values are: "timeCreated", "displayName" - :param str opc_request_id: (optional) - Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then 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. @@ -11712,45 +13838,48 @@ def list_ml_application_implementations(self, compartment_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.data_science.models.MlApplicationImplementationCollection` + :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.data_science.models.ModelDeploymentModelStateSummary` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use list_ml_application_implementations API. + Click `here `__ to see an example of how to use list_model_deployment_model_states API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['compartmentId'] - resource_path = "/mlApplicationImplementations" + required_arguments = ['modelDeploymentId', 'compartmentId'] + resource_path = "/modelDeployments/{modelDeploymentId}/models/modelState" method = "GET" - operation_name = "list_ml_application_implementations" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/MlApplicationImplementation/ListMlApplicationImplementations" + operation_name = "list_model_deployment_model_states" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/ModelDeploymentModelStateSummary/ListModelDeploymentModelStates" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "ml_application_implementation_id", - "name", - "ml_application_id", - "compartment_id_in_subtree", - "lifecycle_state", + "project_id", + "display_name", + "inference_key", + "model_id", + "opc_request_id", "limit", "page", "sort_order", "sort_by", - "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"list_ml_application_implementations got unknown kwargs: {extra_kwargs!r}") + f"list_model_deployment_model_states got unknown kwargs: {extra_kwargs!r}") - if 'lifecycle_state' in kwargs: - lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "NEEDS_ATTENTION", "FAILED", "DELETING", "UPDATING"] - 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 }" - ) + path_params = { + "modelDeploymentId": model_deployment_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') if 'sort_order' in kwargs: sort_order_allowed_values = ["ASC", "DESC"] @@ -11760,19 +13889,18 @@ def list_ml_application_implementations(self, compartment_id, **kwargs): ) if 'sort_by' in kwargs: - sort_by_allowed_values = ["timeCreated", "name"] + sort_by_allowed_values = ["timeCreated", "displayName"] if kwargs['sort_by'] not in sort_by_allowed_values: raise ValueError( f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }" ) query_params = { - "mlApplicationImplementationId": kwargs.get("ml_application_implementation_id", missing), - "name": kwargs.get("name", missing), - "mlApplicationId": kwargs.get("ml_application_id", missing), "compartmentId": compartment_id, - "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing), - "lifecycleState": kwargs.get("lifecycle_state", missing), + "projectId": kwargs.get("project_id", missing), + "displayName": kwargs.get("display_name", missing), + "inferenceKey": kwargs.get("inference_key", missing), + "modelId": kwargs.get("model_id", missing), "limit": kwargs.get("limit", missing), "page": kwargs.get("page", missing), "sortOrder": kwargs.get("sort_order", missing), @@ -11783,7 +13911,8 @@ def list_ml_application_implementations(self, compartment_id, **kwargs): header_params = { "accept": "application/json", "content-type": "application/json", - "opc-request-id": kwargs.get("opc_request_id", missing) + "opc-request-id": kwargs.get("opc_request_id", missing), + "opc-retry-token": kwargs.get("opc_retry_token", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} @@ -11796,15 +13925,17 @@ def list_ml_application_implementations(self, compartment_id, **kwargs): if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( 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="MlApplicationImplementationCollection", + response_type="list[ModelDeploymentModelStateSummary]", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -11813,17 +13944,18 @@ def list_ml_application_implementations(self, compartment_id, **kwargs): return self.base_client.call_api( resource_path=resource_path, method=method, + path_params=path_params, query_params=query_params, header_params=header_params, - response_type="MlApplicationImplementationCollection", + response_type="list[ModelDeploymentModelStateSummary]", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def list_ml_application_instance_views(self, compartment_id, **kwargs): + def list_model_deployment_shapes(self, compartment_id, **kwargs): """ - Returns a list of MlApplicationInstanceViews. + Lists the valid model deployment shapes. :param str compartment_id: (required) @@ -11831,19 +13963,8 @@ def list_ml_application_instance_views(self, compartment_id, **kwargs): __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm - :param str display_name: (optional) - Filter results by its user-friendly name. - - :param str ml_application_id: (optional) - unique MlApplication identifier - - :param str ml_application_implementation_id: (optional) - unique MlApplicationImplementation identifier - - :param str lifecycle_state: (optional) - A filter to return only resources matching the given lifecycleState. - - Allowed values are: "CREATING", "UPDATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", "NEEDS_ATTENTION", "FAILED" + :param str opc_request_id: (optional) + Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID. :param int limit: (optional) For list pagination. The maximum number of results per page, @@ -11863,19 +13984,6 @@ def list_ml_application_instance_views(self, compartment_id, **kwargs): __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/usingapi.htm#nine - :param str sort_order: (optional) - Specifies sort order to use, either `ASC` (ascending) or `DESC` (descending). - - Allowed values are: "ASC", "DESC" - - :param str sort_by: (optional) - The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for name is ascending. - - Allowed values are: "timeCreated", "name" - - :param str opc_request_id: (optional) - Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then 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. @@ -11888,69 +13996,36 @@ def list_ml_application_instance_views(self, compartment_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.data_science.models.MlApplicationInstanceViewCollection` + :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.data_science.models.ModelDeploymentShapeSummary` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use list_ml_application_instance_views API. + Click `here `__ to see an example of how to use list_model_deployment_shapes API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. required_arguments = ['compartmentId'] - resource_path = "/mlApplicationInstanceViews" + resource_path = "/modelDeploymentShapes" method = "GET" - operation_name = "list_ml_application_instance_views" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/MlApplicationInstanceView/ListMlApplicationInstanceViews" + operation_name = "list_model_deployment_shapes" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/ModelDeploymentShapeSummary/ListModelDeploymentShapes" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "display_name", - "ml_application_id", - "ml_application_implementation_id", - "lifecycle_state", + "opc_request_id", "limit", - "page", - "sort_order", - "sort_by", - "opc_request_id" + "page" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"list_ml_application_instance_views got unknown kwargs: {extra_kwargs!r}") - - if 'lifecycle_state' in kwargs: - lifecycle_state_allowed_values = ["CREATING", "UPDATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", "NEEDS_ATTENTION", "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 = ["timeCreated", "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 }" - ) + f"list_model_deployment_shapes got unknown kwargs: {extra_kwargs!r}") query_params = { "compartmentId": compartment_id, - "displayName": kwargs.get("display_name", missing), - "mlApplicationId": kwargs.get("ml_application_id", missing), - "mlApplicationImplementationId": kwargs.get("ml_application_implementation_id", missing), - "lifecycleState": kwargs.get("lifecycle_state", missing), "limit": kwargs.get("limit", missing), - "page": kwargs.get("page", missing), - "sortOrder": kwargs.get("sort_order", missing), - "sortBy": kwargs.get("sort_by", missing) + "page": kwargs.get("page", missing) } query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} @@ -11978,7 +14053,7 @@ def list_ml_application_instance_views(self, compartment_id, **kwargs): method=method, query_params=query_params, header_params=header_params, - response_type="MlApplicationInstanceViewCollection", + response_type="list[ModelDeploymentShapeSummary]", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -11989,15 +14064,15 @@ def list_ml_application_instance_views(self, compartment_id, **kwargs): method=method, query_params=query_params, header_params=header_params, - response_type="MlApplicationInstanceViewCollection", + response_type="list[ModelDeploymentShapeSummary]", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def list_ml_application_instances(self, compartment_id, **kwargs): + def list_model_deployments(self, compartment_id, **kwargs): """ - Returns a list of MlApplicationsInstances. + Lists all model deployments in the specified compartment. Only one parameter other than compartmentId may also be included in a query. The query must include compartmentId. If the query does not include compartmentId, or includes compartmentId but two or more other parameters an error is returned. :param str compartment_id: (required) @@ -12005,16 +14080,29 @@ def list_ml_application_instances(self, compartment_id, **kwargs): __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + :param str id: (optional) + Filter results by `OCID`__. Must be an OCID of the correct type for the resource type. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param str project_id: (optional) + Filter results by the `OCID`__ of the project. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + :param str display_name: (optional) Filter results by its user-friendly name. - :param str ml_application_id: (optional) - unique MlApplication identifier - :param str lifecycle_state: (optional) - A filter to return only resources matching the given lifecycleState. + Filter results by the specified lifecycle state. Must be a valid + state for the resource type. - Allowed values are: "CREATING", "UPDATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", "NEEDS_ATTENTION", "FAILED" + Allowed values are: "CREATING", "ACTIVE", "DELETING", "FAILED", "INACTIVE", "UPDATING", "DELETED", "NEEDS_ATTENTION" + + :param str created_by: (optional) + Filter results by the `OCID`__ of the user who created the resource. + + __ 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, @@ -12040,9 +14128,12 @@ def list_ml_application_instances(self, compartment_id, **kwargs): Allowed values are: "ASC", "DESC" :param str sort_by: (optional) - The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for name is ascending. + Specifies the field to sort by. Accepts only one field. + By default, when you sort by `timeCreated`, results are shown + in descending order. When you sort by `displayName`, results are + shown in ascending order. Sort order for the `displayName` field is case sensitive. - Allowed values are: "timeCreated", "name" + Allowed values are: "timeCreated", "displayName" :param str opc_request_id: (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID. @@ -12059,26 +14150,28 @@ def list_ml_application_instances(self, compartment_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.data_science.models.MlApplicationInstanceCollection` + :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.data_science.models.ModelDeploymentSummary` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use list_ml_application_instances API. + Click `here `__ to see an example of how to use list_model_deployments API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. required_arguments = ['compartmentId'] - resource_path = "/mlApplicationInstances" + resource_path = "/modelDeployments" method = "GET" - operation_name = "list_ml_application_instances" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/MlApplicationInstance/ListMlApplicationInstances" + operation_name = "list_model_deployments" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/ModelDeploymentSummary/ListModelDeployments" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", + "id", + "project_id", "display_name", - "ml_application_id", "lifecycle_state", + "created_by", "limit", "page", "sort_order", @@ -12088,10 +14181,10 @@ def list_ml_application_instances(self, compartment_id, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"list_ml_application_instances got unknown kwargs: {extra_kwargs!r}") + f"list_model_deployments got unknown kwargs: {extra_kwargs!r}") if 'lifecycle_state' in kwargs: - lifecycle_state_allowed_values = ["CREATING", "UPDATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", "NEEDS_ATTENTION", "FAILED"] + lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "DELETING", "FAILED", "INACTIVE", "UPDATING", "DELETED", "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 }" @@ -12105,7 +14198,7 @@ def list_ml_application_instances(self, compartment_id, **kwargs): ) if 'sort_by' in kwargs: - sort_by_allowed_values = ["timeCreated", "name"] + sort_by_allowed_values = ["timeCreated", "displayName"] if kwargs['sort_by'] not in sort_by_allowed_values: raise ValueError( f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }" @@ -12113,9 +14206,11 @@ def list_ml_application_instances(self, compartment_id, **kwargs): query_params = { "compartmentId": compartment_id, + "id": kwargs.get("id", missing), + "projectId": kwargs.get("project_id", missing), "displayName": kwargs.get("display_name", missing), - "mlApplicationId": kwargs.get("ml_application_id", missing), "lifecycleState": kwargs.get("lifecycle_state", missing), + "createdBy": kwargs.get("created_by", missing), "limit": kwargs.get("limit", missing), "page": kwargs.get("page", missing), "sortOrder": kwargs.get("sort_order", missing), @@ -12147,7 +14242,7 @@ def list_ml_application_instances(self, compartment_id, **kwargs): method=method, query_params=query_params, header_params=header_params, - response_type="MlApplicationInstanceCollection", + response_type="list[ModelDeploymentSummary]", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -12158,35 +14253,45 @@ def list_ml_application_instances(self, compartment_id, **kwargs): method=method, query_params=query_params, header_params=header_params, - response_type="MlApplicationInstanceCollection", + response_type="list[ModelDeploymentSummary]", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def list_ml_applications(self, compartment_id, **kwargs): + def list_model_group_models(self, model_group_id, compartment_id, **kwargs): """ - Returns a list of MlApplications. + Lists all models associated with the modelGroup in the specified compartment. + + :param str model_group_id: (required) + The `OCID`__ of the modelGroup. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm :param str compartment_id: (required) Filter results by the `OCID`__ of the compartment. __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm - :param str ml_application_id: (optional) - unique MlApplication identifier + :param str id: (optional) + Filter results by `OCID`__. Must be an OCID of the correct type for the resource type. - :param bool compartment_id_in_subtree: (optional) - If it is true search must include all results from descendant compartments. Value true is allowed only if compartmentId refers to root compartment. + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm - :param str name: (optional) - A filter to return only resources that match the entire name given. + :param str display_name: (optional) + Filter results by its user-friendly name. :param str lifecycle_state: (optional) - A filter to return only resources with lifecycleState matching the given lifecycleState. + Filter results by the specified lifecycle state. Must be a valid + state for the resource type. - Allowed values are: "ACTIVE", "FAILED" + Allowed values are: "ACTIVE", "DELETED", "FAILED", "INACTIVE" + + :param str created_by: (optional) + Filter results by the `OCID`__ of the user who created the resource. + + __ 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, @@ -12212,9 +14317,11 @@ def list_ml_applications(self, compartment_id, **kwargs): Allowed values are: "ASC", "DESC" :param str sort_by: (optional) - The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for name is ascending. + Specifies the field to sort by. Accepts only one field. + By default, when you sort by `timeCreated`, the results are shown + in descending order. All other fields default to ascending order. Sort order for the `displayName` field is case sensitive. - Allowed values are: "timeCreated", "name" + 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, then provide the request ID. @@ -12231,27 +14338,27 @@ def list_ml_applications(self, compartment_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.data_science.models.MlApplicationCollection` + :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.data_science.models.ModelGroupModelSummary` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use list_ml_applications API. + Click `here `__ to see an example of how to use list_model_group_models API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['compartmentId'] - resource_path = "/mlApplications" + required_arguments = ['modelGroupId', 'compartmentId'] + resource_path = "/modelGroups/{modelGroupId}/models" method = "GET" - operation_name = "list_ml_applications" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/MlApplication/ListMlApplications" + operation_name = "list_model_group_models" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/ModelGroup/ListModelGroupModels" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "ml_application_id", - "compartment_id_in_subtree", - "name", + "id", + "display_name", "lifecycle_state", + "created_by", "limit", "page", "sort_order", @@ -12261,10 +14368,20 @@ def list_ml_applications(self, compartment_id, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"list_ml_applications got unknown kwargs: {extra_kwargs!r}") + f"list_model_group_models got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "modelGroupId": model_group_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') if 'lifecycle_state' in kwargs: - lifecycle_state_allowed_values = ["ACTIVE", "FAILED"] + lifecycle_state_allowed_values = ["ACTIVE", "DELETED", "FAILED", "INACTIVE"] 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 }" @@ -12278,18 +14395,18 @@ def list_ml_applications(self, compartment_id, **kwargs): ) if 'sort_by' in kwargs: - sort_by_allowed_values = ["timeCreated", "name"] + 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 = { - "mlApplicationId": kwargs.get("ml_application_id", missing), "compartmentId": compartment_id, - "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing), - "name": kwargs.get("name", missing), + "id": kwargs.get("id", missing), + "displayName": kwargs.get("display_name", missing), "lifecycleState": kwargs.get("lifecycle_state", missing), + "createdBy": kwargs.get("created_by", missing), "limit": kwargs.get("limit", missing), "page": kwargs.get("page", missing), "sortOrder": kwargs.get("sort_order", missing), @@ -12319,9 +14436,10 @@ def list_ml_applications(self, compartment_id, **kwargs): self.base_client.call_api, resource_path=resource_path, method=method, + path_params=path_params, query_params=query_params, header_params=header_params, - response_type="MlApplicationCollection", + response_type="list[ModelGroupModelSummary]", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -12330,17 +14448,18 @@ def list_ml_applications(self, compartment_id, **kwargs): return self.base_client.call_api( resource_path=resource_path, method=method, + path_params=path_params, query_params=query_params, header_params=header_params, - response_type="MlApplicationCollection", + response_type="list[ModelGroupModelSummary]", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def list_model_deployment_shapes(self, compartment_id, **kwargs): + def list_model_group_version_histories(self, compartment_id, **kwargs): """ - Lists the valid model deployment shapes. + List all modelGroupVersionHistories in the specified compartment. The query must include compartmentId. :param str compartment_id: (required) @@ -12348,8 +14467,28 @@ def list_model_deployment_shapes(self, compartment_id, **kwargs): __ 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, then provide the request ID. + :param str project_id: (optional) + Filter results by the `OCID`__ of the project. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param str id: (optional) + Filter results by `OCID`__. Must be an OCID of the correct type for the resource type. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param str display_name: (optional) + Filter results by its user-friendly name. + + :param str lifecycle_state: (optional) + A filter to return resources matching the given lifecycleState. + + Allowed values are: "ACTIVE", "DELETED", "FAILED", "DELETING" + + :param str created_by: (optional) + Filter results by the `OCID`__ of the user who created the resource. + + __ 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, @@ -12369,6 +14508,21 @@ def list_model_deployment_shapes(self, compartment_id, **kwargs): __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/usingapi.htm#nine + :param str sort_order: (optional) + Specifies sort order to use, either `ASC` (ascending) or `DESC` (descending). + + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + Specifies the field to sort by. Accepts only one field. + By default, when you sort by `timeCreated`, the results are shown + in descending order. All other fields default to ascending order. Sort order for the `displayName` field is case sensitive. + + 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, then 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. @@ -12381,36 +14535,71 @@ def list_model_deployment_shapes(self, compartment_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 list of :class:`~oci.data_science.models.ModelDeploymentShapeSummary` + :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.data_science.models.ModelGroupVersionHistorySummary` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use list_model_deployment_shapes API. + Click `here `__ to see an example of how to use list_model_group_version_histories API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. required_arguments = ['compartmentId'] - resource_path = "/modelDeploymentShapes" + resource_path = "/modelGroupVersionHistory" method = "GET" - operation_name = "list_model_deployment_shapes" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/ModelDeploymentShapeSummary/ListModelDeploymentShapes" + operation_name = "list_model_group_version_histories" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/ModelGroupVersionHistorySummary/ListModelGroupVersionHistories" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "project_id", + "id", + "display_name", + "lifecycle_state", + "created_by", + "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_model_group_version_histories got unknown kwargs: {extra_kwargs!r}") + + if 'lifecycle_state' in kwargs: + lifecycle_state_allowed_values = ["ACTIVE", "DELETED", "FAILED", "DELETING"] + 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 }" + ) - # Don't accept unknown kwargs - expected_kwargs = [ - "allow_control_chars", - "retry_strategy", - "opc_request_id", - "limit", - "page" - ] - extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] - if extra_kwargs: - raise ValueError( - f"list_model_deployment_shapes got unknown kwargs: {extra_kwargs!r}") + 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, + "projectId": kwargs.get("project_id", missing), + "id": kwargs.get("id", missing), + "displayName": kwargs.get("display_name", missing), + "lifecycleState": kwargs.get("lifecycle_state", missing), + "createdBy": kwargs.get("created_by", missing), "limit": kwargs.get("limit", missing), - "page": kwargs.get("page", 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} @@ -12438,7 +14627,7 @@ def list_model_deployment_shapes(self, compartment_id, **kwargs): method=method, query_params=query_params, header_params=header_params, - response_type="list[ModelDeploymentShapeSummary]", + response_type="list[ModelGroupVersionHistorySummary]", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -12449,15 +14638,15 @@ def list_model_deployment_shapes(self, compartment_id, **kwargs): method=method, query_params=query_params, header_params=header_params, - response_type="list[ModelDeploymentShapeSummary]", + response_type="list[ModelGroupVersionHistorySummary]", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def list_model_deployments(self, compartment_id, **kwargs): + def list_model_groups(self, compartment_id, **kwargs): """ - Lists all model deployments in the specified compartment. Only one parameter other than compartmentId may also be included in a query. The query must include compartmentId. If the query does not include compartmentId, or includes compartmentId but two or more other parameters an error is returned. + Lists all the modelGroups in the specified compartment. The query must include compartmentId. :param str compartment_id: (required) @@ -12465,13 +14654,13 @@ def list_model_deployments(self, compartment_id, **kwargs): __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm - :param str id: (optional) - Filter results by `OCID`__. Must be an OCID of the correct type for the resource type. + :param str project_id: (optional) + Filter results by the `OCID`__ of the project. __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm - :param str project_id: (optional) - Filter results by the `OCID`__ of the project. + :param str id: (optional) + Filter results by `OCID`__. Must be an OCID of the correct type for the resource type. __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm @@ -12479,16 +14668,20 @@ def list_model_deployments(self, compartment_id, **kwargs): Filter results by its user-friendly name. :param str lifecycle_state: (optional) - Filter results by the specified lifecycle state. Must be a valid - state for the resource type. + A filter to return resources matching the given lifecycleState. - Allowed values are: "CREATING", "ACTIVE", "DELETING", "FAILED", "INACTIVE", "UPDATING", "DELETED", "NEEDS_ATTENTION" + Allowed values are: "CREATING", "ACTIVE", "FAILED", "INACTIVE", "DELETING", "DELETED" :param str created_by: (optional) Filter results by the `OCID`__ of the user who created the resource. __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + :param str model_group_version_history_id: (optional) + The `OCID`__ of the modelGroupVersionHistory. + + __ 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. @@ -12514,11 +14707,10 @@ def list_model_deployments(self, compartment_id, **kwargs): :param str sort_by: (optional) Specifies the field to sort by. Accepts only one field. - By default, when you sort by `timeCreated`, results are shown - in descending order. When you sort by `displayName`, results are - shown in ascending order. Sort order for the `displayName` field is case sensitive. + By default, when you sort by `timeCreated`, the results are shown + in descending order. All other fields default to ascending order. Sort order for the `displayName` field is case sensitive. - Allowed values are: "timeCreated", "displayName" + 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, then provide the request ID. @@ -12535,28 +14727,29 @@ def list_model_deployments(self, compartment_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 list of :class:`~oci.data_science.models.ModelDeploymentSummary` + :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.data_science.models.ModelGroupSummary` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use list_model_deployments API. + Click `here `__ to see an example of how to use list_model_groups API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. required_arguments = ['compartmentId'] - resource_path = "/modelDeployments" + resource_path = "/modelGroups" method = "GET" - operation_name = "list_model_deployments" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/ModelDeploymentSummary/ListModelDeployments" + operation_name = "list_model_groups" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/ModelGroupSummary/ListModelGroups" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "id", "project_id", + "id", "display_name", "lifecycle_state", "created_by", + "model_group_version_history_id", "limit", "page", "sort_order", @@ -12566,10 +14759,10 @@ def list_model_deployments(self, compartment_id, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"list_model_deployments got unknown kwargs: {extra_kwargs!r}") + f"list_model_groups got unknown kwargs: {extra_kwargs!r}") if 'lifecycle_state' in kwargs: - lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "DELETING", "FAILED", "INACTIVE", "UPDATING", "DELETED", "NEEDS_ATTENTION"] + lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "FAILED", "INACTIVE", "DELETING", "DELETED"] 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 }" @@ -12583,7 +14776,7 @@ def list_model_deployments(self, compartment_id, **kwargs): ) if 'sort_by' in kwargs: - sort_by_allowed_values = ["timeCreated", "displayName"] + 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 }" @@ -12591,11 +14784,12 @@ def list_model_deployments(self, compartment_id, **kwargs): query_params = { "compartmentId": compartment_id, - "id": kwargs.get("id", missing), "projectId": kwargs.get("project_id", missing), + "id": kwargs.get("id", missing), "displayName": kwargs.get("display_name", missing), "lifecycleState": kwargs.get("lifecycle_state", missing), "createdBy": kwargs.get("created_by", missing), + "modelGroupVersionHistoryId": kwargs.get("model_group_version_history_id", missing), "limit": kwargs.get("limit", missing), "page": kwargs.get("page", missing), "sortOrder": kwargs.get("sort_order", missing), @@ -12627,7 +14821,7 @@ def list_model_deployments(self, compartment_id, **kwargs): method=method, query_params=query_params, header_params=header_params, - response_type="list[ModelDeploymentSummary]", + response_type="list[ModelGroupSummary]", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -12638,7 +14832,7 @@ def list_model_deployments(self, compartment_id, **kwargs): method=method, query_params=query_params, header_params=header_params, - response_type="list[ModelDeploymentSummary]", + response_type="list[ModelGroupSummary]", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -14371,7 +16565,7 @@ def list_work_requests(self, compartment_id, **kwargs): :param str operation_type: (optional) Filter results by the type of the operation associated with the work request. - Allowed values are: "NOTEBOOK_SESSION_CREATE", "NOTEBOOK_SESSION_DELETE", "NOTEBOOK_SESSION_ACTIVATE", "NOTEBOOK_SESSION_DEACTIVATE", "MODELVERSIONSET_DELETE", "EXPORT_MODEL_ARTIFACT", "IMPORT_MODEL_ARTIFACT", "MODEL_DEPLOYMENT_CREATE", "MODEL_DEPLOYMENT_DELETE", "MODEL_DEPLOYMENT_ACTIVATE", "MODEL_DEPLOYMENT_DEACTIVATE", "MODEL_DEPLOYMENT_UPDATE", "PROJECT_DELETE", "WORKREQUEST_CANCEL", "JOB_DELETE", "PIPELINE_CREATE", "PIPELINE_DELETE", "PIPELINE_RUN_CREATE", "PIPELINE_RUN_CANCEL", "PIPELINE_RUN_DELETE", "ML_APPLICATION_PACKAGE_UPLOAD", "ML_APPLICATION_TRIGGER_START", "ML_APPLICATION_IMPLEMENTATION_DELETE", "ML_APPLICATION_IMPLEMENTATION_UPDATE", "ML_APPLICATION_IMPLEMENTATION_MOVE", "ML_APPLICATION_INSTANCE_CREATE", "ML_APPLICATION_INSTANCE_UPDATE", "ML_APPLICATION_INSTANCE_DELETE", "ML_APPLICATION_INSTANCE_MOVE", "ML_APPLICATION_INSTANCE_VIEW_CREATE", "ML_APPLICATION_INSTANCE_VIEW_UPDATE", "ML_APPLICATION_INSTANCE_VIEW_DELETE", "ML_APPLICATION_INSTANCE_VIEW_UPGRADE", "ML_APPLICATION_INSTANCE_VIEW_MOVE", "PRIVATE_ENDPOINT_CREATE", "PRIVATE_ENDPOINT_DELETE", "PRIVATE_ENDPOINT_MOVE", "PRIVATE_ENDPOINT_UPDATE", "SCHEDULE_CREATE", "SCHEDULE_UPDATE", "SCHEDULE_DELETE", "SCHEDULE_MOVE", "SCHEDULE_ACTIVATE", "SCHEDULE_DEACTIVATE", "REGISTER_MODEL_ARTIFACT", "RESTORE_ARCHIVED_MODEL" + Allowed values are: "NOTEBOOK_SESSION_CREATE", "NOTEBOOK_SESSION_DELETE", "NOTEBOOK_SESSION_ACTIVATE", "NOTEBOOK_SESSION_DEACTIVATE", "MODELVERSIONSET_DELETE", "EXPORT_MODEL_ARTIFACT", "IMPORT_MODEL_ARTIFACT", "MODEL_DEPLOYMENT_CREATE", "MODEL_DEPLOYMENT_DELETE", "MODEL_DEPLOYMENT_ACTIVATE", "MODEL_DEPLOYMENT_DEACTIVATE", "MODEL_DEPLOYMENT_UPDATE", "PROJECT_DELETE", "WORKREQUEST_CANCEL", "JOB_DELETE", "PIPELINE_CREATE", "PIPELINE_DELETE", "PIPELINE_RUN_CREATE", "PIPELINE_RUN_CANCEL", "PIPELINE_RUN_DELETE", "ML_APPLICATION_PACKAGE_UPLOAD", "ML_APPLICATION_TRIGGER_START", "ML_APPLICATION_IMPLEMENTATION_DELETE", "ML_APPLICATION_IMPLEMENTATION_UPDATE", "ML_APPLICATION_IMPLEMENTATION_MOVE", "ML_APPLICATION_INSTANCE_CREATE", "ML_APPLICATION_INSTANCE_UPDATE", "ML_APPLICATION_INSTANCE_DELETE", "ML_APPLICATION_INSTANCE_MOVE", "ML_APPLICATION_INSTANCE_VIEW_CREATE", "ML_APPLICATION_INSTANCE_VIEW_UPDATE", "ML_APPLICATION_INSTANCE_VIEW_DELETE", "ML_APPLICATION_INSTANCE_VIEW_UPGRADE", "ML_APPLICATION_INSTANCE_VIEW_MOVE", "PRIVATE_ENDPOINT_CREATE", "PRIVATE_ENDPOINT_DELETE", "PRIVATE_ENDPOINT_MOVE", "PRIVATE_ENDPOINT_UPDATE", "SCHEDULE_CREATE", "SCHEDULE_UPDATE", "SCHEDULE_DELETE", "SCHEDULE_MOVE", "SCHEDULE_ACTIVATE", "SCHEDULE_DEACTIVATE", "REGISTER_MODEL_ARTIFACT", "RESTORE_ARCHIVED_MODEL", "MODEL_GROUP_CREATE", "MODEL_GROUP_UPDATE", "MODEL_GROUP_DELETE", "MODEL_GROUP_VERSION_HISTORY_DELETE" :param str status: (optional) Filter results by work request status. @@ -14453,7 +16647,7 @@ def list_work_requests(self, compartment_id, **kwargs): f"list_work_requests got unknown kwargs: {extra_kwargs!r}") if 'operation_type' in kwargs: - operation_type_allowed_values = ["NOTEBOOK_SESSION_CREATE", "NOTEBOOK_SESSION_DELETE", "NOTEBOOK_SESSION_ACTIVATE", "NOTEBOOK_SESSION_DEACTIVATE", "MODELVERSIONSET_DELETE", "EXPORT_MODEL_ARTIFACT", "IMPORT_MODEL_ARTIFACT", "MODEL_DEPLOYMENT_CREATE", "MODEL_DEPLOYMENT_DELETE", "MODEL_DEPLOYMENT_ACTIVATE", "MODEL_DEPLOYMENT_DEACTIVATE", "MODEL_DEPLOYMENT_UPDATE", "PROJECT_DELETE", "WORKREQUEST_CANCEL", "JOB_DELETE", "PIPELINE_CREATE", "PIPELINE_DELETE", "PIPELINE_RUN_CREATE", "PIPELINE_RUN_CANCEL", "PIPELINE_RUN_DELETE", "ML_APPLICATION_PACKAGE_UPLOAD", "ML_APPLICATION_TRIGGER_START", "ML_APPLICATION_IMPLEMENTATION_DELETE", "ML_APPLICATION_IMPLEMENTATION_UPDATE", "ML_APPLICATION_IMPLEMENTATION_MOVE", "ML_APPLICATION_INSTANCE_CREATE", "ML_APPLICATION_INSTANCE_UPDATE", "ML_APPLICATION_INSTANCE_DELETE", "ML_APPLICATION_INSTANCE_MOVE", "ML_APPLICATION_INSTANCE_VIEW_CREATE", "ML_APPLICATION_INSTANCE_VIEW_UPDATE", "ML_APPLICATION_INSTANCE_VIEW_DELETE", "ML_APPLICATION_INSTANCE_VIEW_UPGRADE", "ML_APPLICATION_INSTANCE_VIEW_MOVE", "PRIVATE_ENDPOINT_CREATE", "PRIVATE_ENDPOINT_DELETE", "PRIVATE_ENDPOINT_MOVE", "PRIVATE_ENDPOINT_UPDATE", "SCHEDULE_CREATE", "SCHEDULE_UPDATE", "SCHEDULE_DELETE", "SCHEDULE_MOVE", "SCHEDULE_ACTIVATE", "SCHEDULE_DEACTIVATE", "REGISTER_MODEL_ARTIFACT", "RESTORE_ARCHIVED_MODEL"] + operation_type_allowed_values = ["NOTEBOOK_SESSION_CREATE", "NOTEBOOK_SESSION_DELETE", "NOTEBOOK_SESSION_ACTIVATE", "NOTEBOOK_SESSION_DEACTIVATE", "MODELVERSIONSET_DELETE", "EXPORT_MODEL_ARTIFACT", "IMPORT_MODEL_ARTIFACT", "MODEL_DEPLOYMENT_CREATE", "MODEL_DEPLOYMENT_DELETE", "MODEL_DEPLOYMENT_ACTIVATE", "MODEL_DEPLOYMENT_DEACTIVATE", "MODEL_DEPLOYMENT_UPDATE", "PROJECT_DELETE", "WORKREQUEST_CANCEL", "JOB_DELETE", "PIPELINE_CREATE", "PIPELINE_DELETE", "PIPELINE_RUN_CREATE", "PIPELINE_RUN_CANCEL", "PIPELINE_RUN_DELETE", "ML_APPLICATION_PACKAGE_UPLOAD", "ML_APPLICATION_TRIGGER_START", "ML_APPLICATION_IMPLEMENTATION_DELETE", "ML_APPLICATION_IMPLEMENTATION_UPDATE", "ML_APPLICATION_IMPLEMENTATION_MOVE", "ML_APPLICATION_INSTANCE_CREATE", "ML_APPLICATION_INSTANCE_UPDATE", "ML_APPLICATION_INSTANCE_DELETE", "ML_APPLICATION_INSTANCE_MOVE", "ML_APPLICATION_INSTANCE_VIEW_CREATE", "ML_APPLICATION_INSTANCE_VIEW_UPDATE", "ML_APPLICATION_INSTANCE_VIEW_DELETE", "ML_APPLICATION_INSTANCE_VIEW_UPGRADE", "ML_APPLICATION_INSTANCE_VIEW_MOVE", "PRIVATE_ENDPOINT_CREATE", "PRIVATE_ENDPOINT_DELETE", "PRIVATE_ENDPOINT_MOVE", "PRIVATE_ENDPOINT_UPDATE", "SCHEDULE_CREATE", "SCHEDULE_UPDATE", "SCHEDULE_DELETE", "SCHEDULE_MOVE", "SCHEDULE_ACTIVATE", "SCHEDULE_DEACTIVATE", "REGISTER_MODEL_ARTIFACT", "RESTORE_ARCHIVED_MODEL", "MODEL_GROUP_CREATE", "MODEL_GROUP_UPDATE", "MODEL_GROUP_DELETE", "MODEL_GROUP_VERSION_HISTORY_DELETE"] if kwargs['operation_type'] not in operation_type_allowed_values: raise ValueError( f"Invalid value for `operation_type`, must be one of { operation_type_allowed_values }" @@ -16707,6 +18901,230 @@ def update_model_deployment(self, model_deployment_id, update_model_deployment_d api_reference_link=api_reference_link, required_arguments=required_arguments) + def update_model_group(self, model_group_id, update_model_group_details, **kwargs): + """ + Updates the properties of the Model Group. + + + :param str model_group_id: (required) + The `OCID`__ of the modelGroup. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param oci.data_science.models.UpdateModelGroupDetails update_model_group_details: (required) + Details for updating a modelGroup. + + :param str opc_request_id: (optional) + Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then 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 is 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 will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_science.models.ModelGroup` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use update_model_group API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['modelGroupId'] + resource_path = "/modelGroups/{modelGroupId}" + method = "PUT" + operation_name = "update_model_group" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/ModelGroup/UpdateModelGroup" + + # 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_model_group got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "modelGroupId": model_group_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + + 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: + 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_group_details, + response_type="ModelGroup", + 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_group_details, + response_type="ModelGroup", + 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_group_version_history(self, model_group_version_history_id, update_model_group_version_history_details, **kwargs): + """ + Updates the properties of a modelGroupVersionHistory. + + + :param str model_group_version_history_id: (required) + The `OCID`__ of the modelGroupVersionHistory. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param oci.data_science.models.UpdateModelGroupVersionHistoryDetails update_model_group_version_history_details: (required) + Details for updating a modelGroupVersionHistory. + + :param str opc_request_id: (optional) + Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then 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 is 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 will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_science.models.ModelGroupVersionHistory` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use update_model_group_version_history API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['modelGroupVersionHistoryId'] + resource_path = "/modelGroupVersionHistory/{modelGroupVersionHistoryId}" + method = "PUT" + operation_name = "update_model_group_version_history" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/ModelGroupVersionHistory/UpdateModelGroupVersionHistory" + + # 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_model_group_version_history got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "modelGroupVersionHistoryId": model_group_version_history_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: + 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_group_version_history_details, + response_type="ModelGroupVersionHistory", + 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_group_version_history_details, + response_type="ModelGroupVersionHistory", + 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_provenance(self, model_id, update_model_provenance_details, **kwargs): """ Updates the provenance information for the specified model. 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 c2e43c0623..a160e35e53 100644 --- a/src/oci/data_science/data_science_client_composite_operations.py +++ b/src/oci/data_science/data_science_client_composite_operations.py @@ -110,6 +110,50 @@ def activate_model_deployment_and_wait_for_state(self, model_deployment_id, wait except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def activate_model_group_and_wait_for_state(self, model_group_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_science.DataScienceClient.activate_model_group` and waits for the :py:class:`~oci.data_science.models.ModelGroup` acted upon + to enter the given state(s). + + :param str model_group_id: (required) + The `OCID`__ of the modelGroup. + + __ 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.data_science.models.ModelGroup.lifecycle_state` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_science.DataScienceClient.activate_model_group` + + :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.activate_model_group(model_group_id, **operation_kwargs) + if not wait_for_states: + return operation_result + lowered_wait_for_states = [w.lower() for w in wait_for_states] + model_group_id = operation_result.data.id + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_model_group(model_group_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 activate_notebook_session_and_wait_for_state(self, notebook_session_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ Calls :py:func:`~oci.data_science.DataScienceClient.activate_notebook_session` and waits for the :py:class:`~oci.data_science.models.WorkRequest` @@ -771,6 +815,87 @@ def create_model_deployment_and_wait_for_state(self, create_model_deployment_det except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def create_model_group_and_wait_for_state(self, create_base_model_group_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_science.DataScienceClient.create_model_group` and waits for the :py:class:`~oci.data_science.models.WorkRequest` + to enter the given state(s). + + :param oci.data_science.models.CreateBaseModelGroupDetails create_base_model_group_details: (required) + Details for creating a new model group. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_science.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_science.DataScienceClient.create_model_group` + + :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_group(create_base_model_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: + 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_group_version_history_and_wait_for_state(self, create_model_group_version_history_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_science.DataScienceClient.create_model_group_version_history` and waits for the :py:class:`~oci.data_science.models.ModelGroupVersionHistory` acted upon + to enter the given state(s). + + :param oci.data_science.models.CreateModelGroupVersionHistoryDetails create_model_group_version_history_details: (required) + Details for creating a new model group version History. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_science.models.ModelGroupVersionHistory.lifecycle_state` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_science.DataScienceClient.create_model_group_version_history` + + :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_group_version_history(create_model_group_version_history_details, **operation_kwargs) + if not wait_for_states: + return operation_result + lowered_wait_for_states = [w.lower() for w in wait_for_states] + model_group_version_history_id = operation_result.data.id + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_model_group_version_history(model_group_version_history_id), # noqa: F821 + evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except (NameError, TypeError) as e: + if not e.args: + e.args = ('',) + e.args = e.args + ('This composite operation is currently not supported in the SDK. Please use the operation from the service client and use waiters as an alternative. For more information on waiters, visit: "https://docs.oracle.com/en-us/iaas/tools/python/latest/api/waiters.html"', ) + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def create_model_version_set_and_wait_for_state(self, create_model_version_set_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ Calls :py:func:`~oci.data_science.DataScienceClient.create_model_version_set` and waits for the :py:class:`~oci.data_science.models.ModelVersionSet` acted upon @@ -1102,6 +1227,50 @@ def deactivate_model_deployment_and_wait_for_state(self, model_deployment_id, wa except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def deactivate_model_group_and_wait_for_state(self, model_group_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_science.DataScienceClient.deactivate_model_group` and waits for the :py:class:`~oci.data_science.models.ModelGroup` acted upon + to enter the given state(s). + + :param str model_group_id: (required) + The `OCID`__ of the modelGroup. + + __ 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.data_science.models.ModelGroup.lifecycle_state` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_science.DataScienceClient.deactivate_model_group` + + :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.deactivate_model_group(model_group_id, **operation_kwargs) + if not wait_for_states: + return operation_result + lowered_wait_for_states = [w.lower() for w in wait_for_states] + model_group_id = operation_result.data.id + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_model_group(model_group_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 deactivate_notebook_session_and_wait_for_state(self, notebook_session_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ Calls :py:func:`~oci.data_science.DataScienceClient.deactivate_notebook_session` and waits for the :py:class:`~oci.data_science.models.WorkRequest` @@ -1602,6 +1771,104 @@ def delete_model_deployment_and_wait_for_state(self, model_deployment_id, wait_f except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def delete_model_group_and_wait_for_state(self, model_group_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_science.DataScienceClient.delete_model_group` and waits for the :py:class:`~oci.data_science.models.WorkRequest` + to enter the given state(s). + + :param str model_group_id: (required) + The `OCID`__ of the modelGroup. + + __ 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.data_science.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_science.DataScienceClient.delete_model_group` + + :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_group(model_group_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_group_version_history_and_wait_for_state(self, model_group_version_history_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_science.DataScienceClient.delete_model_group_version_history` and waits for the :py:class:`~oci.data_science.models.WorkRequest` + to enter the given state(s). + + :param str model_group_version_history_id: (required) + The `OCID`__ of the modelGroupVersionHistory. + + __ 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.data_science.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_science.DataScienceClient.delete_model_group_version_history` + + :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_group_version_history(model_group_version_history_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_version_set_and_wait_for_state(self, model_version_set_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ Calls :py:func:`~oci.data_science.DataScienceClient.delete_model_version_set` and waits for the :py:class:`~oci.data_science.models.WorkRequest` @@ -2783,6 +3050,100 @@ def update_model_deployment_and_wait_for_state(self, model_deployment_id, update except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def update_model_group_and_wait_for_state(self, model_group_id, update_model_group_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_science.DataScienceClient.update_model_group` and waits for the :py:class:`~oci.data_science.models.ModelGroup` acted upon + to enter the given state(s). + + :param str model_group_id: (required) + The `OCID`__ of the modelGroup. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param oci.data_science.models.UpdateModelGroupDetails update_model_group_details: (required) + Details for updating a modelGroup. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_science.models.ModelGroup.lifecycle_state` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_science.DataScienceClient.update_model_group` + + :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_group(model_group_id, update_model_group_details, **operation_kwargs) + if not wait_for_states: + return operation_result + lowered_wait_for_states = [w.lower() for w in wait_for_states] + model_group_id = operation_result.data.id + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_model_group(model_group_id), # noqa: F821 + evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except (NameError, TypeError) as e: + if not e.args: + e.args = ('',) + e.args = e.args + ('This composite operation is currently not supported in the SDK. Please use the operation from the service client and use waiters as an alternative. For more information on waiters, visit: "https://docs.oracle.com/en-us/iaas/tools/python/latest/api/waiters.html"', ) + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def update_model_group_version_history_and_wait_for_state(self, model_group_version_history_id, update_model_group_version_history_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_science.DataScienceClient.update_model_group_version_history` and waits for the :py:class:`~oci.data_science.models.ModelGroupVersionHistory` acted upon + to enter the given state(s). + + :param str model_group_version_history_id: (required) + The `OCID`__ of the modelGroupVersionHistory. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param oci.data_science.models.UpdateModelGroupVersionHistoryDetails update_model_group_version_history_details: (required) + Details for updating a modelGroupVersionHistory. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_science.models.ModelGroupVersionHistory.lifecycle_state` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_science.DataScienceClient.update_model_group_version_history` + + :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_group_version_history(model_group_version_history_id, update_model_group_version_history_details, **operation_kwargs) + if not wait_for_states: + return operation_result + lowered_wait_for_states = [w.lower() for w in wait_for_states] + model_group_version_history_id = operation_result.data.id + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_model_group_version_history(model_group_version_history_id), # noqa: F821 + evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except (NameError, TypeError) as e: + if not e.args: + e.args = ('',) + e.args = e.args + ('This composite operation is currently not supported in the SDK. Please use the operation from the service client and use waiters as an alternative. For more information on waiters, visit: "https://docs.oracle.com/en-us/iaas/tools/python/latest/api/waiters.html"', ) + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def update_model_version_set_and_wait_for_state(self, model_version_set_id, update_model_version_set_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ Calls :py:func:`~oci.data_science.DataScienceClient.update_model_version_set` and waits for the :py:class:`~oci.data_science.models.ModelVersionSet` acted upon diff --git a/src/oci/data_science/models/__init__.py b/src/oci/data_science/models/__init__.py index ad61702914..be7680f72a 100644 --- a/src/oci/data_science/models/__init__.py +++ b/src/oci/data_science/models/__init__.py @@ -26,16 +26,22 @@ from .change_ml_application_instance_view_compartment_details import ChangeMlApplicationInstanceViewCompartmentDetails from .change_model_compartment_details import ChangeModelCompartmentDetails from .change_model_deployment_compartment_details import ChangeModelDeploymentCompartmentDetails +from .change_model_group_compartment_details import ChangeModelGroupCompartmentDetails +from .change_model_group_version_history_compartment_details import ChangeModelGroupVersionHistoryCompartmentDetails from .change_model_version_set_compartment_details import ChangeModelVersionSetCompartmentDetails from .change_notebook_session_compartment_details import ChangeNotebookSessionCompartmentDetails from .change_pipeline_compartment_details import ChangePipelineCompartmentDetails from .change_pipeline_run_compartment_details import ChangePipelineRunCompartmentDetails from .change_project_compartment_details import ChangeProjectCompartmentDetails from .change_schedule_compartment_details import ChangeScheduleCompartmentDetails +from .clone_create_from_model_group_details import CloneCreateFromModelGroupDetails +from .clone_create_from_model_group_version_history_details import CloneCreateFromModelGroupVersionHistoryDetails +from .clone_model_group_details import CloneModelGroupDetails from .configuration_property import ConfigurationProperty from .configuration_property_schema import ConfigurationPropertySchema from .container_summary import ContainerSummary from .create_auth_configuration_details import CreateAuthConfigurationDetails +from .create_base_model_group_details import CreateBaseModelGroupDetails from .create_data_science_private_endpoint_details import CreateDataSciencePrivateEndpointDetails from .create_iam_auth_configuration_create_details import CreateIamAuthConfigurationCreateDetails from .create_idcs_auth_configuration_details import CreateIdcsAuthConfigurationDetails @@ -48,6 +54,8 @@ from .create_ml_application_instance_details import CreateMlApplicationInstanceDetails from .create_model_deployment_details import CreateModelDeploymentDetails from .create_model_details import CreateModelDetails +from .create_model_group_details import CreateModelGroupDetails +from .create_model_group_version_history_details import CreateModelGroupVersionHistoryDetails from .create_model_provenance_details import CreateModelProvenanceDetails from .create_model_version_set_details import CreateModelVersionSetDetails from .create_notebook_session_details import CreateNotebookSessionDetails @@ -57,6 +65,7 @@ from .create_project_details import CreateProjectDetails from .create_schedule_details import CreateScheduleDetails from .custom_expression_query_scaling_configuration import CustomExpressionQueryScalingConfiguration +from .custom_metadata import CustomMetadata from .custom_metric_expression_rule import CustomMetricExpressionRule from .data_flow_application_application_component import DataFlowApplicationApplicationComponent from .data_science_job_application_component import DataScienceJobApplicationComponent @@ -77,14 +86,18 @@ from .generic_job_run_use_case_configuration_details import GenericJobRunUseCaseConfigurationDetails from .generic_oci_resource_application_component import GenericOciResourceApplicationComponent from .generic_oci_resource_instance_component import GenericOciResourceInstanceComponent +from .heterogeneous_model_group_details import HeterogeneousModelGroupDetails +from .homogeneous_model_group_details import HomogeneousModelGroupDetails from .iam_auth_configuration import IamAuthConfiguration from .idcs_auth_configuration import IdcsAuthConfiguration from .idcs_custom_service_auth_configuration import IdcsCustomServiceAuthConfiguration from .implementation_log_details import ImplementationLogDetails from .implementation_logging import ImplementationLogging from .import_model_artifact_details import ImportModelArtifactDetails +from .infrastructure_configuration_details import InfrastructureConfigurationDetails from .instance_component import InstanceComponent from .instance_configuration import InstanceConfiguration +from .instance_pool_infrastructure_configuration_details import InstancePoolInfrastructureConfigurationDetails from .instance_pool_model_deployment_system_data import InstancePoolModelDeploymentSystemData from .invoke_ml_application_provider_trigger_schedule_action_details import InvokeMlApplicationProviderTriggerScheduleActionDetails from .job import Job @@ -102,6 +115,8 @@ from .job_summary import JobSummary from .log_details import LogDetails from .managed_egress_standalone_job_infrastructure_configuration_details import ManagedEgressStandaloneJobInfrastructureConfigurationDetails +from .member_model_details import MemberModelDetails +from .member_model_entries import MemberModelEntries from .metadata import Metadata from .metric_expression_rule import MetricExpressionRule from .ml_application import MlApplication @@ -130,13 +145,24 @@ from .model_deployment_configuration_details import ModelDeploymentConfigurationDetails from .model_deployment_environment_configuration_details import ModelDeploymentEnvironmentConfigurationDetails from .model_deployment_instance_shape_config_details import ModelDeploymentInstanceShapeConfigDetails +from .model_deployment_model_state_summary import ModelDeploymentModelStateSummary from .model_deployment_shape_summary import ModelDeploymentShapeSummary from .model_deployment_summary import ModelDeploymentSummary from .model_deployment_system_data import ModelDeploymentSystemData +from .model_group import ModelGroup +from .model_group_clone_source_details import ModelGroupCloneSourceDetails +from .model_group_configuration_details import ModelGroupConfigurationDetails +from .model_group_deployment_configuration_details import ModelGroupDeploymentConfigurationDetails +from .model_group_details import ModelGroupDetails +from .model_group_model_summary import ModelGroupModelSummary +from .model_group_summary import ModelGroupSummary +from .model_group_version_history import ModelGroupVersionHistory +from .model_group_version_history_summary import ModelGroupVersionHistorySummary from .model_provenance import ModelProvenance from .model_summary import ModelSummary from .model_version_set import ModelVersionSet from .model_version_set_summary import ModelVersionSetSummary +from .modify_model_group_details import ModifyModelGroupDetails from .notebook_session import NotebookSession from .notebook_session_config_details import NotebookSessionConfigDetails from .notebook_session_configuration_details import NotebookSessionConfigurationDetails @@ -152,6 +178,10 @@ from .object_storage_object_instance_component import ObjectStorageObjectInstanceComponent from .ocir_container_job_environment_configuration_details import OcirContainerJobEnvironmentConfigurationDetails from .ocir_model_deployment_environment_configuration_details import OcirModelDeploymentEnvironmentConfigurationDetails +from .patch_insert_new_member_models import PatchInsertNewMemberModels +from .patch_instruction import PatchInstruction +from .patch_model_group_member_model_details import PatchModelGroupMemberModelDetails +from .patch_remove_member_models import PatchRemoveMemberModels from .pipeline import Pipeline from .pipeline_configuration_details import PipelineConfigurationDetails from .pipeline_container_configuration_details import PipelineContainerConfigurationDetails @@ -204,6 +234,7 @@ from .schedule_summary import ScheduleSummary from .schedule_trigger import ScheduleTrigger from .single_model_deployment_configuration_details import SingleModelDeploymentConfigurationDetails +from .stacked_model_group_details import StackedModelGroupDetails from .standalone_job_infrastructure_configuration_details import StandaloneJobInfrastructureConfigurationDetails from .storage_mount_configuration_details import StorageMountConfigurationDetails from .tag_configuration import TagConfiguration @@ -214,6 +245,8 @@ from .update_category_log_details import UpdateCategoryLogDetails from .update_data_science_private_endpoint_details import UpdateDataSciencePrivateEndpointDetails from .update_default_model_deployment_environment_configuration_details import UpdateDefaultModelDeploymentEnvironmentConfigurationDetails +from .update_infrastructure_configuration_details import UpdateInfrastructureConfigurationDetails +from .update_instance_pool_infrastructure_configuration_details import UpdateInstancePoolInfrastructureConfigurationDetails from .update_job_details import UpdateJobDetails from .update_job_run_details import UpdateJobRunDetails from .update_ml_application_details import UpdateMlApplicationDetails @@ -226,6 +259,10 @@ from .update_model_deployment_details import UpdateModelDeploymentDetails from .update_model_deployment_environment_configuration_details import UpdateModelDeploymentEnvironmentConfigurationDetails from .update_model_details import UpdateModelDetails +from .update_model_group_configuration_details import UpdateModelGroupConfigurationDetails +from .update_model_group_deployment_configuration_details import UpdateModelGroupDeploymentConfigurationDetails +from .update_model_group_details import UpdateModelGroupDetails +from .update_model_group_version_history_details import UpdateModelGroupVersionHistoryDetails from .update_model_provenance_details import UpdateModelProvenanceDetails from .update_model_version_set_details import UpdateModelVersionSetDetails from .update_notebook_session_details import UpdateNotebookSessionDetails @@ -264,16 +301,22 @@ "ChangeMlApplicationInstanceViewCompartmentDetails": ChangeMlApplicationInstanceViewCompartmentDetails, "ChangeModelCompartmentDetails": ChangeModelCompartmentDetails, "ChangeModelDeploymentCompartmentDetails": ChangeModelDeploymentCompartmentDetails, + "ChangeModelGroupCompartmentDetails": ChangeModelGroupCompartmentDetails, + "ChangeModelGroupVersionHistoryCompartmentDetails": ChangeModelGroupVersionHistoryCompartmentDetails, "ChangeModelVersionSetCompartmentDetails": ChangeModelVersionSetCompartmentDetails, "ChangeNotebookSessionCompartmentDetails": ChangeNotebookSessionCompartmentDetails, "ChangePipelineCompartmentDetails": ChangePipelineCompartmentDetails, "ChangePipelineRunCompartmentDetails": ChangePipelineRunCompartmentDetails, "ChangeProjectCompartmentDetails": ChangeProjectCompartmentDetails, "ChangeScheduleCompartmentDetails": ChangeScheduleCompartmentDetails, + "CloneCreateFromModelGroupDetails": CloneCreateFromModelGroupDetails, + "CloneCreateFromModelGroupVersionHistoryDetails": CloneCreateFromModelGroupVersionHistoryDetails, + "CloneModelGroupDetails": CloneModelGroupDetails, "ConfigurationProperty": ConfigurationProperty, "ConfigurationPropertySchema": ConfigurationPropertySchema, "ContainerSummary": ContainerSummary, "CreateAuthConfigurationDetails": CreateAuthConfigurationDetails, + "CreateBaseModelGroupDetails": CreateBaseModelGroupDetails, "CreateDataSciencePrivateEndpointDetails": CreateDataSciencePrivateEndpointDetails, "CreateIamAuthConfigurationCreateDetails": CreateIamAuthConfigurationCreateDetails, "CreateIdcsAuthConfigurationDetails": CreateIdcsAuthConfigurationDetails, @@ -286,6 +329,8 @@ "CreateMlApplicationInstanceDetails": CreateMlApplicationInstanceDetails, "CreateModelDeploymentDetails": CreateModelDeploymentDetails, "CreateModelDetails": CreateModelDetails, + "CreateModelGroupDetails": CreateModelGroupDetails, + "CreateModelGroupVersionHistoryDetails": CreateModelGroupVersionHistoryDetails, "CreateModelProvenanceDetails": CreateModelProvenanceDetails, "CreateModelVersionSetDetails": CreateModelVersionSetDetails, "CreateNotebookSessionDetails": CreateNotebookSessionDetails, @@ -295,6 +340,7 @@ "CreateProjectDetails": CreateProjectDetails, "CreateScheduleDetails": CreateScheduleDetails, "CustomExpressionQueryScalingConfiguration": CustomExpressionQueryScalingConfiguration, + "CustomMetadata": CustomMetadata, "CustomMetricExpressionRule": CustomMetricExpressionRule, "DataFlowApplicationApplicationComponent": DataFlowApplicationApplicationComponent, "DataScienceJobApplicationComponent": DataScienceJobApplicationComponent, @@ -315,14 +361,18 @@ "GenericJobRunUseCaseConfigurationDetails": GenericJobRunUseCaseConfigurationDetails, "GenericOciResourceApplicationComponent": GenericOciResourceApplicationComponent, "GenericOciResourceInstanceComponent": GenericOciResourceInstanceComponent, + "HeterogeneousModelGroupDetails": HeterogeneousModelGroupDetails, + "HomogeneousModelGroupDetails": HomogeneousModelGroupDetails, "IamAuthConfiguration": IamAuthConfiguration, "IdcsAuthConfiguration": IdcsAuthConfiguration, "IdcsCustomServiceAuthConfiguration": IdcsCustomServiceAuthConfiguration, "ImplementationLogDetails": ImplementationLogDetails, "ImplementationLogging": ImplementationLogging, "ImportModelArtifactDetails": ImportModelArtifactDetails, + "InfrastructureConfigurationDetails": InfrastructureConfigurationDetails, "InstanceComponent": InstanceComponent, "InstanceConfiguration": InstanceConfiguration, + "InstancePoolInfrastructureConfigurationDetails": InstancePoolInfrastructureConfigurationDetails, "InstancePoolModelDeploymentSystemData": InstancePoolModelDeploymentSystemData, "InvokeMlApplicationProviderTriggerScheduleActionDetails": InvokeMlApplicationProviderTriggerScheduleActionDetails, "Job": Job, @@ -340,6 +390,8 @@ "JobSummary": JobSummary, "LogDetails": LogDetails, "ManagedEgressStandaloneJobInfrastructureConfigurationDetails": ManagedEgressStandaloneJobInfrastructureConfigurationDetails, + "MemberModelDetails": MemberModelDetails, + "MemberModelEntries": MemberModelEntries, "Metadata": Metadata, "MetricExpressionRule": MetricExpressionRule, "MlApplication": MlApplication, @@ -368,13 +420,24 @@ "ModelDeploymentConfigurationDetails": ModelDeploymentConfigurationDetails, "ModelDeploymentEnvironmentConfigurationDetails": ModelDeploymentEnvironmentConfigurationDetails, "ModelDeploymentInstanceShapeConfigDetails": ModelDeploymentInstanceShapeConfigDetails, + "ModelDeploymentModelStateSummary": ModelDeploymentModelStateSummary, "ModelDeploymentShapeSummary": ModelDeploymentShapeSummary, "ModelDeploymentSummary": ModelDeploymentSummary, "ModelDeploymentSystemData": ModelDeploymentSystemData, + "ModelGroup": ModelGroup, + "ModelGroupCloneSourceDetails": ModelGroupCloneSourceDetails, + "ModelGroupConfigurationDetails": ModelGroupConfigurationDetails, + "ModelGroupDeploymentConfigurationDetails": ModelGroupDeploymentConfigurationDetails, + "ModelGroupDetails": ModelGroupDetails, + "ModelGroupModelSummary": ModelGroupModelSummary, + "ModelGroupSummary": ModelGroupSummary, + "ModelGroupVersionHistory": ModelGroupVersionHistory, + "ModelGroupVersionHistorySummary": ModelGroupVersionHistorySummary, "ModelProvenance": ModelProvenance, "ModelSummary": ModelSummary, "ModelVersionSet": ModelVersionSet, "ModelVersionSetSummary": ModelVersionSetSummary, + "ModifyModelGroupDetails": ModifyModelGroupDetails, "NotebookSession": NotebookSession, "NotebookSessionConfigDetails": NotebookSessionConfigDetails, "NotebookSessionConfigurationDetails": NotebookSessionConfigurationDetails, @@ -390,6 +453,10 @@ "ObjectStorageObjectInstanceComponent": ObjectStorageObjectInstanceComponent, "OcirContainerJobEnvironmentConfigurationDetails": OcirContainerJobEnvironmentConfigurationDetails, "OcirModelDeploymentEnvironmentConfigurationDetails": OcirModelDeploymentEnvironmentConfigurationDetails, + "PatchInsertNewMemberModels": PatchInsertNewMemberModels, + "PatchInstruction": PatchInstruction, + "PatchModelGroupMemberModelDetails": PatchModelGroupMemberModelDetails, + "PatchRemoveMemberModels": PatchRemoveMemberModels, "Pipeline": Pipeline, "PipelineConfigurationDetails": PipelineConfigurationDetails, "PipelineContainerConfigurationDetails": PipelineContainerConfigurationDetails, @@ -442,6 +509,7 @@ "ScheduleSummary": ScheduleSummary, "ScheduleTrigger": ScheduleTrigger, "SingleModelDeploymentConfigurationDetails": SingleModelDeploymentConfigurationDetails, + "StackedModelGroupDetails": StackedModelGroupDetails, "StandaloneJobInfrastructureConfigurationDetails": StandaloneJobInfrastructureConfigurationDetails, "StorageMountConfigurationDetails": StorageMountConfigurationDetails, "TagConfiguration": TagConfiguration, @@ -452,6 +520,8 @@ "UpdateCategoryLogDetails": UpdateCategoryLogDetails, "UpdateDataSciencePrivateEndpointDetails": UpdateDataSciencePrivateEndpointDetails, "UpdateDefaultModelDeploymentEnvironmentConfigurationDetails": UpdateDefaultModelDeploymentEnvironmentConfigurationDetails, + "UpdateInfrastructureConfigurationDetails": UpdateInfrastructureConfigurationDetails, + "UpdateInstancePoolInfrastructureConfigurationDetails": UpdateInstancePoolInfrastructureConfigurationDetails, "UpdateJobDetails": UpdateJobDetails, "UpdateJobRunDetails": UpdateJobRunDetails, "UpdateMlApplicationDetails": UpdateMlApplicationDetails, @@ -464,6 +534,10 @@ "UpdateModelDeploymentDetails": UpdateModelDeploymentDetails, "UpdateModelDeploymentEnvironmentConfigurationDetails": UpdateModelDeploymentEnvironmentConfigurationDetails, "UpdateModelDetails": UpdateModelDetails, + "UpdateModelGroupConfigurationDetails": UpdateModelGroupConfigurationDetails, + "UpdateModelGroupDeploymentConfigurationDetails": UpdateModelGroupDeploymentConfigurationDetails, + "UpdateModelGroupDetails": UpdateModelGroupDetails, + "UpdateModelGroupVersionHistoryDetails": UpdateModelGroupVersionHistoryDetails, "UpdateModelProvenanceDetails": UpdateModelProvenanceDetails, "UpdateModelVersionSetDetails": UpdateModelVersionSetDetails, "UpdateNotebookSessionDetails": UpdateNotebookSessionDetails, diff --git a/src/oci/data_science/models/change_model_group_compartment_details.py b/src/oci/data_science/models/change_model_group_compartment_details.py new file mode 100644 index 0000000000..ccedf90782 --- /dev/null +++ b/src/oci/data_science/models/change_model_group_compartment_details.py @@ -0,0 +1,74 @@ +# coding: utf-8 +# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20190101 + + +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 ChangeModelGroupCompartmentDetails(object): + """ + Details for changing the compartment of a model group. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ChangeModelGroupCompartmentDetails 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 ChangeModelGroupCompartmentDetails. + :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 ChangeModelGroupCompartmentDetails. + The `OCID`__ of the compartment where the resource should be moved. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :return: The compartment_id of this ChangeModelGroupCompartmentDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this ChangeModelGroupCompartmentDetails. + The `OCID`__ of the compartment where the resource should be moved. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :param compartment_id: The compartment_id of this ChangeModelGroupCompartmentDetails. + :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/data_science/models/change_model_group_version_history_compartment_details.py b/src/oci/data_science/models/change_model_group_version_history_compartment_details.py new file mode 100644 index 0000000000..d01ba5974c --- /dev/null +++ b/src/oci/data_science/models/change_model_group_version_history_compartment_details.py @@ -0,0 +1,74 @@ +# coding: utf-8 +# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20190101 + + +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 ChangeModelGroupVersionHistoryCompartmentDetails(object): + """ + Details for changing the compartment of a model group version history. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ChangeModelGroupVersionHistoryCompartmentDetails 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 ChangeModelGroupVersionHistoryCompartmentDetails. + :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 ChangeModelGroupVersionHistoryCompartmentDetails. + The `OCID`__ of the compartment where the resource should be moved. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The compartment_id of this ChangeModelGroupVersionHistoryCompartmentDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this ChangeModelGroupVersionHistoryCompartmentDetails. + The `OCID`__ of the compartment where the resource should be moved. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param compartment_id: The compartment_id of this ChangeModelGroupVersionHistoryCompartmentDetails. + :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/data_science/models/clone_create_from_model_group_details.py b/src/oci/data_science/models/clone_create_from_model_group_details.py new file mode 100644 index 0000000000..ec0cd6a70a --- /dev/null +++ b/src/oci/data_science/models/clone_create_from_model_group_details.py @@ -0,0 +1,138 @@ +# coding: utf-8 +# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20190101 + +from .model_group_clone_source_details import ModelGroupCloneSourceDetails +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 CloneCreateFromModelGroupDetails(ModelGroupCloneSourceDetails): + """ + Parameters needed to cloning a model group from an existing model group. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CloneCreateFromModelGroupDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.data_science.models.CloneCreateFromModelGroupDetails.model_group_clone_source_type` attribute + of this class is ``MODEL_GROUP`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param model_group_clone_source_type: + The value to assign to the model_group_clone_source_type property of this CloneCreateFromModelGroupDetails. + Allowed values for this property are: "MODEL_GROUP", "MODEL_GROUP_VERSION_HISTORY" + :type model_group_clone_source_type: str + + :param source_id: + The value to assign to the source_id property of this CloneCreateFromModelGroupDetails. + :type source_id: str + + :param modify_model_group_details: + The value to assign to the modify_model_group_details property of this CloneCreateFromModelGroupDetails. + :type modify_model_group_details: oci.data_science.models.ModifyModelGroupDetails + + :param patch_model_group_member_model_details: + The value to assign to the patch_model_group_member_model_details property of this CloneCreateFromModelGroupDetails. + :type patch_model_group_member_model_details: oci.data_science.models.PatchModelGroupMemberModelDetails + + """ + self.swagger_types = { + 'model_group_clone_source_type': 'str', + 'source_id': 'str', + 'modify_model_group_details': 'ModifyModelGroupDetails', + 'patch_model_group_member_model_details': 'PatchModelGroupMemberModelDetails' + } + self.attribute_map = { + 'model_group_clone_source_type': 'modelGroupCloneSourceType', + 'source_id': 'sourceId', + 'modify_model_group_details': 'modifyModelGroupDetails', + 'patch_model_group_member_model_details': 'patchModelGroupMemberModelDetails' + } + self._model_group_clone_source_type = None + self._source_id = None + self._modify_model_group_details = None + self._patch_model_group_member_model_details = None + self._model_group_clone_source_type = 'MODEL_GROUP' + + @property + def source_id(self): + """ + **[Required]** Gets the source_id of this CloneCreateFromModelGroupDetails. + The `OCID`__ of the model group to be cloned. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The source_id of this CloneCreateFromModelGroupDetails. + :rtype: str + """ + return self._source_id + + @source_id.setter + def source_id(self, source_id): + """ + Sets the source_id of this CloneCreateFromModelGroupDetails. + The `OCID`__ of the model group to be cloned. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param source_id: The source_id of this CloneCreateFromModelGroupDetails. + :type: str + """ + self._source_id = source_id + + @property + def modify_model_group_details(self): + """ + Gets the modify_model_group_details of this CloneCreateFromModelGroupDetails. + + :return: The modify_model_group_details of this CloneCreateFromModelGroupDetails. + :rtype: oci.data_science.models.ModifyModelGroupDetails + """ + return self._modify_model_group_details + + @modify_model_group_details.setter + def modify_model_group_details(self, modify_model_group_details): + """ + Sets the modify_model_group_details of this CloneCreateFromModelGroupDetails. + + :param modify_model_group_details: The modify_model_group_details of this CloneCreateFromModelGroupDetails. + :type: oci.data_science.models.ModifyModelGroupDetails + """ + self._modify_model_group_details = modify_model_group_details + + @property + def patch_model_group_member_model_details(self): + """ + Gets the patch_model_group_member_model_details of this CloneCreateFromModelGroupDetails. + + :return: The patch_model_group_member_model_details of this CloneCreateFromModelGroupDetails. + :rtype: oci.data_science.models.PatchModelGroupMemberModelDetails + """ + return self._patch_model_group_member_model_details + + @patch_model_group_member_model_details.setter + def patch_model_group_member_model_details(self, patch_model_group_member_model_details): + """ + Sets the patch_model_group_member_model_details of this CloneCreateFromModelGroupDetails. + + :param patch_model_group_member_model_details: The patch_model_group_member_model_details of this CloneCreateFromModelGroupDetails. + :type: oci.data_science.models.PatchModelGroupMemberModelDetails + """ + self._patch_model_group_member_model_details = patch_model_group_member_model_details + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_science/models/clone_create_from_model_group_version_history_details.py b/src/oci/data_science/models/clone_create_from_model_group_version_history_details.py new file mode 100644 index 0000000000..585d1591e7 --- /dev/null +++ b/src/oci/data_science/models/clone_create_from_model_group_version_history_details.py @@ -0,0 +1,138 @@ +# coding: utf-8 +# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20190101 + +from .model_group_clone_source_details import ModelGroupCloneSourceDetails +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 CloneCreateFromModelGroupVersionHistoryDetails(ModelGroupCloneSourceDetails): + """ + Parameters needed to cloning a model group from latest model group in model group version history. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CloneCreateFromModelGroupVersionHistoryDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.data_science.models.CloneCreateFromModelGroupVersionHistoryDetails.model_group_clone_source_type` attribute + of this class is ``MODEL_GROUP_VERSION_HISTORY`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param model_group_clone_source_type: + The value to assign to the model_group_clone_source_type property of this CloneCreateFromModelGroupVersionHistoryDetails. + Allowed values for this property are: "MODEL_GROUP", "MODEL_GROUP_VERSION_HISTORY" + :type model_group_clone_source_type: str + + :param source_id: + The value to assign to the source_id property of this CloneCreateFromModelGroupVersionHistoryDetails. + :type source_id: str + + :param modify_model_group_details: + The value to assign to the modify_model_group_details property of this CloneCreateFromModelGroupVersionHistoryDetails. + :type modify_model_group_details: oci.data_science.models.ModifyModelGroupDetails + + :param patch_model_group_member_model_details: + The value to assign to the patch_model_group_member_model_details property of this CloneCreateFromModelGroupVersionHistoryDetails. + :type patch_model_group_member_model_details: oci.data_science.models.PatchModelGroupMemberModelDetails + + """ + self.swagger_types = { + 'model_group_clone_source_type': 'str', + 'source_id': 'str', + 'modify_model_group_details': 'ModifyModelGroupDetails', + 'patch_model_group_member_model_details': 'PatchModelGroupMemberModelDetails' + } + self.attribute_map = { + 'model_group_clone_source_type': 'modelGroupCloneSourceType', + 'source_id': 'sourceId', + 'modify_model_group_details': 'modifyModelGroupDetails', + 'patch_model_group_member_model_details': 'patchModelGroupMemberModelDetails' + } + self._model_group_clone_source_type = None + self._source_id = None + self._modify_model_group_details = None + self._patch_model_group_member_model_details = None + self._model_group_clone_source_type = 'MODEL_GROUP_VERSION_HISTORY' + + @property + def source_id(self): + """ + **[Required]** Gets the source_id of this CloneCreateFromModelGroupVersionHistoryDetails. + The `OCID`__ of the model group version history. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The source_id of this CloneCreateFromModelGroupVersionHistoryDetails. + :rtype: str + """ + return self._source_id + + @source_id.setter + def source_id(self, source_id): + """ + Sets the source_id of this CloneCreateFromModelGroupVersionHistoryDetails. + The `OCID`__ of the model group version history. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param source_id: The source_id of this CloneCreateFromModelGroupVersionHistoryDetails. + :type: str + """ + self._source_id = source_id + + @property + def modify_model_group_details(self): + """ + Gets the modify_model_group_details of this CloneCreateFromModelGroupVersionHistoryDetails. + + :return: The modify_model_group_details of this CloneCreateFromModelGroupVersionHistoryDetails. + :rtype: oci.data_science.models.ModifyModelGroupDetails + """ + return self._modify_model_group_details + + @modify_model_group_details.setter + def modify_model_group_details(self, modify_model_group_details): + """ + Sets the modify_model_group_details of this CloneCreateFromModelGroupVersionHistoryDetails. + + :param modify_model_group_details: The modify_model_group_details of this CloneCreateFromModelGroupVersionHistoryDetails. + :type: oci.data_science.models.ModifyModelGroupDetails + """ + self._modify_model_group_details = modify_model_group_details + + @property + def patch_model_group_member_model_details(self): + """ + Gets the patch_model_group_member_model_details of this CloneCreateFromModelGroupVersionHistoryDetails. + + :return: The patch_model_group_member_model_details of this CloneCreateFromModelGroupVersionHistoryDetails. + :rtype: oci.data_science.models.PatchModelGroupMemberModelDetails + """ + return self._patch_model_group_member_model_details + + @patch_model_group_member_model_details.setter + def patch_model_group_member_model_details(self, patch_model_group_member_model_details): + """ + Sets the patch_model_group_member_model_details of this CloneCreateFromModelGroupVersionHistoryDetails. + + :param patch_model_group_member_model_details: The patch_model_group_member_model_details of this CloneCreateFromModelGroupVersionHistoryDetails. + :type: oci.data_science.models.PatchModelGroupMemberModelDetails + """ + self._patch_model_group_member_model_details = patch_model_group_member_model_details + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_science/models/clone_model_group_details.py b/src/oci/data_science/models/clone_model_group_details.py new file mode 100644 index 0000000000..d442c432a5 --- /dev/null +++ b/src/oci/data_science/models/clone_model_group_details.py @@ -0,0 +1,90 @@ +# coding: utf-8 +# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20190101 + +from .create_base_model_group_details import CreateBaseModelGroupDetails +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 CloneModelGroupDetails(CreateBaseModelGroupDetails): + """ + Parameters needed to clone a model group. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CloneModelGroupDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.data_science.models.CloneModelGroupDetails.create_type` attribute + of this class is ``CLONE`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param create_type: + The value to assign to the create_type property of this CloneModelGroupDetails. + Allowed values for this property are: "CREATE", "CLONE" + :type create_type: str + + :param compartment_id: + The value to assign to the compartment_id property of this CloneModelGroupDetails. + :type compartment_id: str + + :param project_id: + The value to assign to the project_id property of this CloneModelGroupDetails. + :type project_id: str + + :param model_group_clone_source_details: + The value to assign to the model_group_clone_source_details property of this CloneModelGroupDetails. + :type model_group_clone_source_details: oci.data_science.models.ModelGroupCloneSourceDetails + + """ + self.swagger_types = { + 'create_type': 'str', + 'compartment_id': 'str', + 'project_id': 'str', + 'model_group_clone_source_details': 'ModelGroupCloneSourceDetails' + } + self.attribute_map = { + 'create_type': 'createType', + 'compartment_id': 'compartmentId', + 'project_id': 'projectId', + 'model_group_clone_source_details': 'modelGroupCloneSourceDetails' + } + self._create_type = None + self._compartment_id = None + self._project_id = None + self._model_group_clone_source_details = None + self._create_type = 'CLONE' + + @property + def model_group_clone_source_details(self): + """ + **[Required]** Gets the model_group_clone_source_details of this CloneModelGroupDetails. + + :return: The model_group_clone_source_details of this CloneModelGroupDetails. + :rtype: oci.data_science.models.ModelGroupCloneSourceDetails + """ + return self._model_group_clone_source_details + + @model_group_clone_source_details.setter + def model_group_clone_source_details(self, model_group_clone_source_details): + """ + Sets the model_group_clone_source_details of this CloneModelGroupDetails. + + :param model_group_clone_source_details: The model_group_clone_source_details of this CloneModelGroupDetails. + :type: oci.data_science.models.ModelGroupCloneSourceDetails + """ + self._model_group_clone_source_details = model_group_clone_source_details + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_science/models/create_base_model_group_details.py b/src/oci/data_science/models/create_base_model_group_details.py new file mode 100644 index 0000000000..a9b0f83205 --- /dev/null +++ b/src/oci/data_science/models/create_base_model_group_details.py @@ -0,0 +1,177 @@ +# coding: utf-8 +# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20190101 + + +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 CreateBaseModelGroupDetails(object): + """ + The base create model group details. + """ + + #: A constant which can be used with the create_type property of a CreateBaseModelGroupDetails. + #: This constant has a value of "CREATE" + CREATE_TYPE_CREATE = "CREATE" + + #: A constant which can be used with the create_type property of a CreateBaseModelGroupDetails. + #: This constant has a value of "CLONE" + CREATE_TYPE_CLONE = "CLONE" + + def __init__(self, **kwargs): + """ + Initializes a new CreateBaseModelGroupDetails 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.data_science.models.CloneModelGroupDetails` + * :class:`~oci.data_science.models.CreateModelGroupDetails` + + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param create_type: + The value to assign to the create_type property of this CreateBaseModelGroupDetails. + Allowed values for this property are: "CREATE", "CLONE" + :type create_type: str + + :param compartment_id: + The value to assign to the compartment_id property of this CreateBaseModelGroupDetails. + :type compartment_id: str + + :param project_id: + The value to assign to the project_id property of this CreateBaseModelGroupDetails. + :type project_id: str + + """ + self.swagger_types = { + 'create_type': 'str', + 'compartment_id': 'str', + 'project_id': 'str' + } + self.attribute_map = { + 'create_type': 'createType', + 'compartment_id': 'compartmentId', + 'project_id': 'projectId' + } + self._create_type = None + self._compartment_id = None + self._project_id = None + + @staticmethod + def get_subtype(object_dictionary): + """ + Given the hash representation of a subtype of this class, + use the info in the hash to return the class of the subtype. + """ + type = object_dictionary['createType'] + + if type == 'CLONE': + return 'CloneModelGroupDetails' + + if type == 'CREATE': + return 'CreateModelGroupDetails' + else: + return 'CreateBaseModelGroupDetails' + + @property + def create_type(self): + """ + **[Required]** Gets the create_type of this CreateBaseModelGroupDetails. + The type of the model group create operation. + + Allowed values for this property are: "CREATE", "CLONE" + + + :return: The create_type of this CreateBaseModelGroupDetails. + :rtype: str + """ + return self._create_type + + @create_type.setter + def create_type(self, create_type): + """ + Sets the create_type of this CreateBaseModelGroupDetails. + The type of the model group create operation. + + + :param create_type: The create_type of this CreateBaseModelGroupDetails. + :type: str + """ + allowed_values = ["CREATE", "CLONE"] + if not value_allowed_none_or_none_sentinel(create_type, allowed_values): + raise ValueError( + f"Invalid value for `create_type`, must be None or one of {allowed_values}" + ) + self._create_type = create_type + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this CreateBaseModelGroupDetails. + The `OCID`__ of the compartment to create the modelGroup in. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The compartment_id of this CreateBaseModelGroupDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this CreateBaseModelGroupDetails. + The `OCID`__ of the compartment to create the modelGroup in. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param compartment_id: The compartment_id of this CreateBaseModelGroupDetails. + :type: str + """ + self._compartment_id = compartment_id + + @property + def project_id(self): + """ + **[Required]** Gets the project_id of this CreateBaseModelGroupDetails. + The `OCID`__ of the project to associate with the modelGroup. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The project_id of this CreateBaseModelGroupDetails. + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """ + Sets the project_id of this CreateBaseModelGroupDetails. + The `OCID`__ of the project to associate with the modelGroup. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param project_id: The project_id of this CreateBaseModelGroupDetails. + :type: str + """ + self._project_id = project_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/data_science/models/create_model_group_details.py b/src/oci/data_science/models/create_model_group_details.py new file mode 100644 index 0000000000..4532c4745f --- /dev/null +++ b/src/oci/data_science/models/create_model_group_details.py @@ -0,0 +1,321 @@ +# coding: utf-8 +# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20190101 + +from .create_base_model_group_details import CreateBaseModelGroupDetails +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 CreateModelGroupDetails(CreateBaseModelGroupDetails): + """ + Parameters needed to create a model group. Model Group is a group of models. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CreateModelGroupDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.data_science.models.CreateModelGroupDetails.create_type` attribute + of this class is ``CREATE`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param create_type: + The value to assign to the create_type property of this CreateModelGroupDetails. + Allowed values for this property are: "CREATE", "CLONE" + :type create_type: str + + :param compartment_id: + The value to assign to the compartment_id property of this CreateModelGroupDetails. + :type compartment_id: str + + :param project_id: + The value to assign to the project_id property of this CreateModelGroupDetails. + :type project_id: str + + :param model_group_details: + The value to assign to the model_group_details property of this CreateModelGroupDetails. + :type model_group_details: oci.data_science.models.ModelGroupDetails + + :param member_model_entries: + The value to assign to the member_model_entries property of this CreateModelGroupDetails. + :type member_model_entries: oci.data_science.models.MemberModelEntries + + :param display_name: + The value to assign to the display_name property of this CreateModelGroupDetails. + :type display_name: str + + :param description: + The value to assign to the description property of this CreateModelGroupDetails. + :type description: str + + :param model_group_version_history_id: + The value to assign to the model_group_version_history_id property of this CreateModelGroupDetails. + :type model_group_version_history_id: str + + :param version_label: + The value to assign to the version_label property of this CreateModelGroupDetails. + :type version_label: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this CreateModelGroupDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this CreateModelGroupDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'create_type': 'str', + 'compartment_id': 'str', + 'project_id': 'str', + 'model_group_details': 'ModelGroupDetails', + 'member_model_entries': 'MemberModelEntries', + 'display_name': 'str', + 'description': 'str', + 'model_group_version_history_id': 'str', + 'version_label': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + self.attribute_map = { + 'create_type': 'createType', + 'compartment_id': 'compartmentId', + 'project_id': 'projectId', + 'model_group_details': 'modelGroupDetails', + 'member_model_entries': 'memberModelEntries', + 'display_name': 'displayName', + 'description': 'description', + 'model_group_version_history_id': 'modelGroupVersionHistoryId', + 'version_label': 'versionLabel', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + self._create_type = None + self._compartment_id = None + self._project_id = None + self._model_group_details = None + self._member_model_entries = None + self._display_name = None + self._description = None + self._model_group_version_history_id = None + self._version_label = None + self._freeform_tags = None + self._defined_tags = None + self._create_type = 'CREATE' + + @property + def model_group_details(self): + """ + **[Required]** Gets the model_group_details of this CreateModelGroupDetails. + + :return: The model_group_details of this CreateModelGroupDetails. + :rtype: oci.data_science.models.ModelGroupDetails + """ + return self._model_group_details + + @model_group_details.setter + def model_group_details(self, model_group_details): + """ + Sets the model_group_details of this CreateModelGroupDetails. + + :param model_group_details: The model_group_details of this CreateModelGroupDetails. + :type: oci.data_science.models.ModelGroupDetails + """ + self._model_group_details = model_group_details + + @property + def member_model_entries(self): + """ + **[Required]** Gets the member_model_entries of this CreateModelGroupDetails. + + :return: The member_model_entries of this CreateModelGroupDetails. + :rtype: oci.data_science.models.MemberModelEntries + """ + return self._member_model_entries + + @member_model_entries.setter + def member_model_entries(self, member_model_entries): + """ + Sets the member_model_entries of this CreateModelGroupDetails. + + :param member_model_entries: The member_model_entries of this CreateModelGroupDetails. + :type: oci.data_science.models.MemberModelEntries + """ + self._member_model_entries = member_model_entries + + @property + def display_name(self): + """ + Gets the display_name of this CreateModelGroupDetails. + A user-friendly display name for the resource. It does not have to be unique and can be modified. Avoid entering confidential information. + Example: `My ModelGroup` + + + :return: The display_name of this CreateModelGroupDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this CreateModelGroupDetails. + A user-friendly display name for the resource. It does not have to be unique and can be modified. Avoid entering confidential information. + Example: `My ModelGroup` + + + :param display_name: The display_name of this CreateModelGroupDetails. + :type: str + """ + self._display_name = display_name + + @property + def description(self): + """ + Gets the description of this CreateModelGroupDetails. + A short description of the modelGroup. + + + :return: The description of this CreateModelGroupDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this CreateModelGroupDetails. + A short description of the modelGroup. + + + :param description: The description of this CreateModelGroupDetails. + :type: str + """ + self._description = description + + @property + def model_group_version_history_id(self): + """ + Gets the model_group_version_history_id of this CreateModelGroupDetails. + The `OCID`__ of the model group version history to which the modelGroup is associated. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The model_group_version_history_id of this CreateModelGroupDetails. + :rtype: str + """ + return self._model_group_version_history_id + + @model_group_version_history_id.setter + def model_group_version_history_id(self, model_group_version_history_id): + """ + Sets the model_group_version_history_id of this CreateModelGroupDetails. + The `OCID`__ of the model group version history to which the modelGroup is associated. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param model_group_version_history_id: The model_group_version_history_id of this CreateModelGroupDetails. + :type: str + """ + self._model_group_version_history_id = model_group_version_history_id + + @property + def version_label(self): + """ + Gets the version_label of this CreateModelGroupDetails. + An additional description of the lifecycle state of the model group. + + + :return: The version_label of this CreateModelGroupDetails. + :rtype: str + """ + return self._version_label + + @version_label.setter + def version_label(self, version_label): + """ + Sets the version_label of this CreateModelGroupDetails. + An additional description of the lifecycle state of the model group. + + + :param version_label: The version_label of this CreateModelGroupDetails. + :type: str + """ + self._version_label = version_label + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this CreateModelGroupDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. See `Resource Tags`__. + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this CreateModelGroupDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this CreateModelGroupDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. See `Resource Tags`__. + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this CreateModelGroupDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this CreateModelGroupDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this CreateModelGroupDetails. + :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 CreateModelGroupDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this CreateModelGroupDetails. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_science/models/create_model_group_version_history_details.py b/src/oci/data_science/models/create_model_group_version_history_details.py new file mode 100644 index 0000000000..510dbe6536 --- /dev/null +++ b/src/oci/data_science/models/create_model_group_version_history_details.py @@ -0,0 +1,282 @@ +# coding: utf-8 +# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20190101 + + +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 CreateModelGroupVersionHistoryDetails(object): + """ + Parameters that are required to create a new model group version history. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CreateModelGroupVersionHistoryDetails 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 CreateModelGroupVersionHistoryDetails. + :type compartment_id: str + + :param project_id: + The value to assign to the project_id property of this CreateModelGroupVersionHistoryDetails. + :type project_id: str + + :param display_name: + The value to assign to the display_name property of this CreateModelGroupVersionHistoryDetails. + :type display_name: str + + :param description: + The value to assign to the description property of this CreateModelGroupVersionHistoryDetails. + :type description: str + + :param latest_model_group_id: + The value to assign to the latest_model_group_id property of this CreateModelGroupVersionHistoryDetails. + :type latest_model_group_id: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this CreateModelGroupVersionHistoryDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this CreateModelGroupVersionHistoryDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'compartment_id': 'str', + 'project_id': 'str', + 'display_name': 'str', + 'description': 'str', + 'latest_model_group_id': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + self.attribute_map = { + 'compartment_id': 'compartmentId', + 'project_id': 'projectId', + 'display_name': 'displayName', + 'description': 'description', + 'latest_model_group_id': 'latestModelGroupId', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + self._compartment_id = None + self._project_id = None + self._display_name = None + self._description = None + self._latest_model_group_id = None + self._freeform_tags = None + self._defined_tags = None + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this CreateModelGroupVersionHistoryDetails. + The `OCID`__ of the compartment to create the model group version history in. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The compartment_id of this CreateModelGroupVersionHistoryDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this CreateModelGroupVersionHistoryDetails. + The `OCID`__ of the compartment to create the model group version history in. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param compartment_id: The compartment_id of this CreateModelGroupVersionHistoryDetails. + :type: str + """ + self._compartment_id = compartment_id + + @property + def project_id(self): + """ + **[Required]** Gets the project_id of this CreateModelGroupVersionHistoryDetails. + The `OCID`__ of the project to associate with the model group version history. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The project_id of this CreateModelGroupVersionHistoryDetails. + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """ + Sets the project_id of this CreateModelGroupVersionHistoryDetails. + The `OCID`__ of the project to associate with the model group version history. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param project_id: The project_id of this CreateModelGroupVersionHistoryDetails. + :type: str + """ + self._project_id = project_id + + @property + def display_name(self): + """ + Gets the display_name of this CreateModelGroupVersionHistoryDetails. + A user-friendly name for the resource. It must be unique and can't be modified. Avoid entering confidential information. + Example: `My model version history` + + + :return: The display_name of this CreateModelGroupVersionHistoryDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this CreateModelGroupVersionHistoryDetails. + A user-friendly name for the resource. It must be unique and can't be modified. Avoid entering confidential information. + Example: `My model version history` + + + :param display_name: The display_name of this CreateModelGroupVersionHistoryDetails. + :type: str + """ + self._display_name = display_name + + @property + def description(self): + """ + Gets the description of this CreateModelGroupVersionHistoryDetails. + A short description of the model version history. + + + :return: The description of this CreateModelGroupVersionHistoryDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this CreateModelGroupVersionHistoryDetails. + A short description of the model version history. + + + :param description: The description of this CreateModelGroupVersionHistoryDetails. + :type: str + """ + self._description = description + + @property + def latest_model_group_id(self): + """ + Gets the latest_model_group_id of this CreateModelGroupVersionHistoryDetails. + The `OCID`__ of the latest version of the model group to be associated. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The latest_model_group_id of this CreateModelGroupVersionHistoryDetails. + :rtype: str + """ + return self._latest_model_group_id + + @latest_model_group_id.setter + def latest_model_group_id(self, latest_model_group_id): + """ + Sets the latest_model_group_id of this CreateModelGroupVersionHistoryDetails. + The `OCID`__ of the latest version of the model group to be associated. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param latest_model_group_id: The latest_model_group_id of this CreateModelGroupVersionHistoryDetails. + :type: str + """ + self._latest_model_group_id = latest_model_group_id + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this CreateModelGroupVersionHistoryDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. See `Resource Tags`__. + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this CreateModelGroupVersionHistoryDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this CreateModelGroupVersionHistoryDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. See `Resource Tags`__. + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this CreateModelGroupVersionHistoryDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this CreateModelGroupVersionHistoryDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this CreateModelGroupVersionHistoryDetails. + :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 CreateModelGroupVersionHistoryDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this CreateModelGroupVersionHistoryDetails. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_science/models/custom_metadata.py b/src/oci/data_science/models/custom_metadata.py new file mode 100644 index 0000000000..a25a8b13af --- /dev/null +++ b/src/oci/data_science/models/custom_metadata.py @@ -0,0 +1,163 @@ +# coding: utf-8 +# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20190101 + + +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 CustomMetadata(object): + """ + Array of custom metadata details of model group. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CustomMetadata object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param key: + The value to assign to the key property of this CustomMetadata. + :type key: str + + :param value: + The value to assign to the value property of this CustomMetadata. + :type value: str + + :param description: + The value to assign to the description property of this CustomMetadata. + :type description: str + + :param category: + The value to assign to the category property of this CustomMetadata. + :type category: str + + """ + self.swagger_types = { + 'key': 'str', + 'value': 'str', + 'description': 'str', + 'category': 'str' + } + self.attribute_map = { + 'key': 'key', + 'value': 'value', + 'description': 'description', + 'category': 'category' + } + self._key = None + self._value = None + self._description = None + self._category = None + + @property + def key(self): + """ + Gets the key of this CustomMetadata. + Key of the metadata. + + + :return: The key of this CustomMetadata. + :rtype: str + """ + return self._key + + @key.setter + def key(self, key): + """ + Sets the key of this CustomMetadata. + Key of the metadata. + + + :param key: The key of this CustomMetadata. + :type: str + """ + self._key = key + + @property + def value(self): + """ + Gets the value of this CustomMetadata. + Value of the metadata. + + + :return: The value of this CustomMetadata. + :rtype: str + """ + return self._value + + @value.setter + def value(self, value): + """ + Sets the value of this CustomMetadata. + Value of the metadata. + + + :param value: The value of this CustomMetadata. + :type: str + """ + self._value = value + + @property + def description(self): + """ + Gets the description of this CustomMetadata. + Description of model metadata. + + + :return: The description of this CustomMetadata. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this CustomMetadata. + Description of model metadata. + + + :param description: The description of this CustomMetadata. + :type: str + """ + self._description = description + + @property + def category(self): + """ + Gets the category of this CustomMetadata. + Category of the metadata. + + + :return: The category of this CustomMetadata. + :rtype: str + """ + return self._category + + @category.setter + def category(self, category): + """ + Sets the category of this CustomMetadata. + Category of the metadata. + + + :param category: The category of this CustomMetadata. + :type: str + """ + self._category = category + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_science/models/heterogeneous_model_group_details.py b/src/oci/data_science/models/heterogeneous_model_group_details.py new file mode 100644 index 0000000000..485e2f2661 --- /dev/null +++ b/src/oci/data_science/models/heterogeneous_model_group_details.py @@ -0,0 +1,56 @@ +# coding: utf-8 +# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20190101 + +from .model_group_details import ModelGroupDetails +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 HeterogeneousModelGroupDetails(ModelGroupDetails): + """ + Heterogeneous model group type. + """ + + def __init__(self, **kwargs): + """ + Initializes a new HeterogeneousModelGroupDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.data_science.models.HeterogeneousModelGroupDetails.type` attribute + of this class is ``HETEROGENEOUS`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param type: + The value to assign to the type property of this HeterogeneousModelGroupDetails. + Allowed values for this property are: "HOMOGENEOUS", "HETEROGENEOUS", "STACKED" + :type type: str + + :param custom_metadata_list: + The value to assign to the custom_metadata_list property of this HeterogeneousModelGroupDetails. + :type custom_metadata_list: list[oci.data_science.models.CustomMetadata] + + """ + self.swagger_types = { + 'type': 'str', + 'custom_metadata_list': 'list[CustomMetadata]' + } + self.attribute_map = { + 'type': 'type', + 'custom_metadata_list': 'customMetadataList' + } + self._type = None + self._custom_metadata_list = None + self._type = 'HETEROGENEOUS' + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_science/models/homogeneous_model_group_details.py b/src/oci/data_science/models/homogeneous_model_group_details.py new file mode 100644 index 0000000000..bc24f59b7d --- /dev/null +++ b/src/oci/data_science/models/homogeneous_model_group_details.py @@ -0,0 +1,56 @@ +# coding: utf-8 +# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20190101 + +from .model_group_details import ModelGroupDetails +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 HomogeneousModelGroupDetails(ModelGroupDetails): + """ + Homogeneous model group type. + """ + + def __init__(self, **kwargs): + """ + Initializes a new HomogeneousModelGroupDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.data_science.models.HomogeneousModelGroupDetails.type` attribute + of this class is ``HOMOGENEOUS`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param type: + The value to assign to the type property of this HomogeneousModelGroupDetails. + Allowed values for this property are: "HOMOGENEOUS", "HETEROGENEOUS", "STACKED" + :type type: str + + :param custom_metadata_list: + The value to assign to the custom_metadata_list property of this HomogeneousModelGroupDetails. + :type custom_metadata_list: list[oci.data_science.models.CustomMetadata] + + """ + self.swagger_types = { + 'type': 'str', + 'custom_metadata_list': 'list[CustomMetadata]' + } + self.attribute_map = { + 'type': 'type', + 'custom_metadata_list': 'customMetadataList' + } + self._type = None + self._custom_metadata_list = None + self._type = 'HOMOGENEOUS' + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_science/models/infrastructure_configuration_details.py b/src/oci/data_science/models/infrastructure_configuration_details.py new file mode 100644 index 0000000000..caf17c3963 --- /dev/null +++ b/src/oci/data_science/models/infrastructure_configuration_details.py @@ -0,0 +1,99 @@ +# coding: utf-8 +# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20190101 + + +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 InfrastructureConfigurationDetails(object): + """ + The infrastructure configuration details. + """ + + #: A constant which can be used with the infrastructure_type property of a InfrastructureConfigurationDetails. + #: This constant has a value of "INSTANCE_POOL" + INFRASTRUCTURE_TYPE_INSTANCE_POOL = "INSTANCE_POOL" + + def __init__(self, **kwargs): + """ + Initializes a new InfrastructureConfigurationDetails 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.data_science.models.InstancePoolInfrastructureConfigurationDetails` + + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param infrastructure_type: + The value to assign to the infrastructure_type property of this InfrastructureConfigurationDetails. + Allowed values for this property are: "INSTANCE_POOL", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type infrastructure_type: str + + """ + self.swagger_types = { + 'infrastructure_type': 'str' + } + self.attribute_map = { + 'infrastructure_type': 'infrastructureType' + } + self._infrastructure_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['infrastructureType'] + + if type == 'INSTANCE_POOL': + return 'InstancePoolInfrastructureConfigurationDetails' + else: + return 'InfrastructureConfigurationDetails' + + @property + def infrastructure_type(self): + """ + **[Required]** Gets the infrastructure_type of this InfrastructureConfigurationDetails. + The type of the model deployment infrastructure. + + Allowed values for this property are: "INSTANCE_POOL", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The infrastructure_type of this InfrastructureConfigurationDetails. + :rtype: str + """ + return self._infrastructure_type + + @infrastructure_type.setter + def infrastructure_type(self, infrastructure_type): + """ + Sets the infrastructure_type of this InfrastructureConfigurationDetails. + The type of the model deployment infrastructure. + + + :param infrastructure_type: The infrastructure_type of this InfrastructureConfigurationDetails. + :type: str + """ + allowed_values = ["INSTANCE_POOL"] + if not value_allowed_none_or_none_sentinel(infrastructure_type, allowed_values): + infrastructure_type = 'UNKNOWN_ENUM_VALUE' + self._infrastructure_type = infrastructure_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/data_science/models/instance_configuration.py b/src/oci/data_science/models/instance_configuration.py index 0b36a9cd99..46e614545c 100644 --- a/src/oci/data_science/models/instance_configuration.py +++ b/src/oci/data_science/models/instance_configuration.py @@ -12,7 +12,7 @@ @init_model_state_from_kwargs class InstanceConfiguration(object): """ - The model deployment instance configuration + The model deployment instance configuration. """ def __init__(self, **kwargs): diff --git a/src/oci/data_science/models/instance_pool_infrastructure_configuration_details.py b/src/oci/data_science/models/instance_pool_infrastructure_configuration_details.py new file mode 100644 index 0000000000..c074048763 --- /dev/null +++ b/src/oci/data_science/models/instance_pool_infrastructure_configuration_details.py @@ -0,0 +1,165 @@ +# coding: utf-8 +# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20190101 + +from .infrastructure_configuration_details import InfrastructureConfigurationDetails +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 InstancePoolInfrastructureConfigurationDetails(InfrastructureConfigurationDetails): + """ + Instance Pool based Infrastructure configuration details. + """ + + def __init__(self, **kwargs): + """ + Initializes a new InstancePoolInfrastructureConfigurationDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.data_science.models.InstancePoolInfrastructureConfigurationDetails.infrastructure_type` attribute + of this class is ``INSTANCE_POOL`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param infrastructure_type: + The value to assign to the infrastructure_type property of this InstancePoolInfrastructureConfigurationDetails. + Allowed values for this property are: "INSTANCE_POOL" + :type infrastructure_type: str + + :param instance_configuration: + The value to assign to the instance_configuration property of this InstancePoolInfrastructureConfigurationDetails. + :type instance_configuration: oci.data_science.models.InstanceConfiguration + + :param scaling_policy: + The value to assign to the scaling_policy property of this InstancePoolInfrastructureConfigurationDetails. + :type scaling_policy: oci.data_science.models.ScalingPolicy + + :param bandwidth_mbps: + The value to assign to the bandwidth_mbps property of this InstancePoolInfrastructureConfigurationDetails. + :type bandwidth_mbps: int + + :param maximum_bandwidth_mbps: + The value to assign to the maximum_bandwidth_mbps property of this InstancePoolInfrastructureConfigurationDetails. + :type maximum_bandwidth_mbps: int + + """ + self.swagger_types = { + 'infrastructure_type': 'str', + 'instance_configuration': 'InstanceConfiguration', + 'scaling_policy': 'ScalingPolicy', + 'bandwidth_mbps': 'int', + 'maximum_bandwidth_mbps': 'int' + } + self.attribute_map = { + 'infrastructure_type': 'infrastructureType', + 'instance_configuration': 'instanceConfiguration', + 'scaling_policy': 'scalingPolicy', + 'bandwidth_mbps': 'bandwidthMbps', + 'maximum_bandwidth_mbps': 'maximumBandwidthMbps' + } + self._infrastructure_type = None + self._instance_configuration = None + self._scaling_policy = None + self._bandwidth_mbps = None + self._maximum_bandwidth_mbps = None + self._infrastructure_type = 'INSTANCE_POOL' + + @property + def instance_configuration(self): + """ + **[Required]** Gets the instance_configuration of this InstancePoolInfrastructureConfigurationDetails. + + :return: The instance_configuration of this InstancePoolInfrastructureConfigurationDetails. + :rtype: oci.data_science.models.InstanceConfiguration + """ + return self._instance_configuration + + @instance_configuration.setter + def instance_configuration(self, instance_configuration): + """ + Sets the instance_configuration of this InstancePoolInfrastructureConfigurationDetails. + + :param instance_configuration: The instance_configuration of this InstancePoolInfrastructureConfigurationDetails. + :type: oci.data_science.models.InstanceConfiguration + """ + self._instance_configuration = instance_configuration + + @property + def scaling_policy(self): + """ + Gets the scaling_policy of this InstancePoolInfrastructureConfigurationDetails. + + :return: The scaling_policy of this InstancePoolInfrastructureConfigurationDetails. + :rtype: oci.data_science.models.ScalingPolicy + """ + return self._scaling_policy + + @scaling_policy.setter + def scaling_policy(self, scaling_policy): + """ + Sets the scaling_policy of this InstancePoolInfrastructureConfigurationDetails. + + :param scaling_policy: The scaling_policy of this InstancePoolInfrastructureConfigurationDetails. + :type: oci.data_science.models.ScalingPolicy + """ + self._scaling_policy = scaling_policy + + @property + def bandwidth_mbps(self): + """ + Gets the bandwidth_mbps of this InstancePoolInfrastructureConfigurationDetails. + The minimum network bandwidth for the model deployment. + + + :return: The bandwidth_mbps of this InstancePoolInfrastructureConfigurationDetails. + :rtype: int + """ + return self._bandwidth_mbps + + @bandwidth_mbps.setter + def bandwidth_mbps(self, bandwidth_mbps): + """ + Sets the bandwidth_mbps of this InstancePoolInfrastructureConfigurationDetails. + The minimum network bandwidth for the model deployment. + + + :param bandwidth_mbps: The bandwidth_mbps of this InstancePoolInfrastructureConfigurationDetails. + :type: int + """ + self._bandwidth_mbps = bandwidth_mbps + + @property + def maximum_bandwidth_mbps(self): + """ + Gets the maximum_bandwidth_mbps of this InstancePoolInfrastructureConfigurationDetails. + The maximum network bandwidth for the model deployment. + + + :return: The maximum_bandwidth_mbps of this InstancePoolInfrastructureConfigurationDetails. + :rtype: int + """ + return self._maximum_bandwidth_mbps + + @maximum_bandwidth_mbps.setter + def maximum_bandwidth_mbps(self, maximum_bandwidth_mbps): + """ + Sets the maximum_bandwidth_mbps of this InstancePoolInfrastructureConfigurationDetails. + The maximum network bandwidth for the model deployment. + + + :param maximum_bandwidth_mbps: The maximum_bandwidth_mbps of this InstancePoolInfrastructureConfigurationDetails. + :type: int + """ + self._maximum_bandwidth_mbps = maximum_bandwidth_mbps + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_science/models/job_shape_config_details.py b/src/oci/data_science/models/job_shape_config_details.py index 0cb2957363..63801b7535 100644 --- a/src/oci/data_science/models/job_shape_config_details.py +++ b/src/oci/data_science/models/job_shape_config_details.py @@ -15,6 +15,18 @@ class JobShapeConfigDetails(object): Details for the job run shape configuration. Specify only when a flex shape is selected. """ + #: A constant which can be used with the cpu_baseline property of a JobShapeConfigDetails. + #: This constant has a value of "BASELINE_1_8" + CPU_BASELINE_BASELINE_1_8 = "BASELINE_1_8" + + #: A constant which can be used with the cpu_baseline property of a JobShapeConfigDetails. + #: This constant has a value of "BASELINE_1_2" + CPU_BASELINE_BASELINE_1_2 = "BASELINE_1_2" + + #: A constant which can be used with the cpu_baseline property of a JobShapeConfigDetails. + #: This constant has a value of "BASELINE_1_1" + CPU_BASELINE_BASELINE_1_1 = "BASELINE_1_1" + def __init__(self, **kwargs): """ Initializes a new JobShapeConfigDetails object with values from keyword arguments. @@ -28,17 +40,26 @@ def __init__(self, **kwargs): The value to assign to the memory_in_gbs property of this JobShapeConfigDetails. :type memory_in_gbs: float + :param cpu_baseline: + The value to assign to the cpu_baseline property of this JobShapeConfigDetails. + Allowed values for this property are: "BASELINE_1_8", "BASELINE_1_2", "BASELINE_1_1", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type cpu_baseline: str + """ self.swagger_types = { 'ocpus': 'float', - 'memory_in_gbs': 'float' + 'memory_in_gbs': 'float', + 'cpu_baseline': 'str' } self.attribute_map = { 'ocpus': 'ocpus', - 'memory_in_gbs': 'memoryInGBs' + 'memory_in_gbs': 'memoryInGBs', + 'cpu_baseline': 'cpuBaseline' } self._ocpus = None self._memory_in_gbs = None + self._cpu_baseline = None @property def ocpus(self): @@ -88,6 +109,44 @@ def memory_in_gbs(self, memory_in_gbs): """ self._memory_in_gbs = memory_in_gbs + @property + def cpu_baseline(self): + """ + Gets the cpu_baseline of this JobShapeConfigDetails. + The baseline OCPU utilization for a subcore burstable VM instance. If this attribute is left blank, it will default to `BASELINE_1_1`. + The following values are supported: + BASELINE_1_8 - baseline usage is 1/8 of an OCPU. + BASELINE_1_2 - baseline usage is 1/2 of an OCPU. + BASELINE_1_1 - baseline usage is an entire OCPU. This represents a non-burstable instance. + + Allowed values for this property are: "BASELINE_1_8", "BASELINE_1_2", "BASELINE_1_1", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The cpu_baseline of this JobShapeConfigDetails. + :rtype: str + """ + return self._cpu_baseline + + @cpu_baseline.setter + def cpu_baseline(self, cpu_baseline): + """ + Sets the cpu_baseline of this JobShapeConfigDetails. + The baseline OCPU utilization for a subcore burstable VM instance. If this attribute is left blank, it will default to `BASELINE_1_1`. + The following values are supported: + BASELINE_1_8 - baseline usage is 1/8 of an OCPU. + BASELINE_1_2 - baseline usage is 1/2 of an OCPU. + BASELINE_1_1 - baseline usage is an entire OCPU. This represents a non-burstable instance. + + + :param cpu_baseline: The cpu_baseline of this JobShapeConfigDetails. + :type: str + """ + allowed_values = ["BASELINE_1_8", "BASELINE_1_2", "BASELINE_1_1"] + if not value_allowed_none_or_none_sentinel(cpu_baseline, allowed_values): + cpu_baseline = 'UNKNOWN_ENUM_VALUE' + self._cpu_baseline = cpu_baseline + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/data_science/models/member_model_details.py b/src/oci/data_science/models/member_model_details.py new file mode 100644 index 0000000000..951fd188a1 --- /dev/null +++ b/src/oci/data_science/models/member_model_details.py @@ -0,0 +1,105 @@ +# coding: utf-8 +# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20190101 + + +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 MemberModelDetails(object): + """ + Model details which needs to be part of Model Group. + """ + + def __init__(self, **kwargs): + """ + Initializes a new MemberModelDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param inference_key: + The value to assign to the inference_key property of this MemberModelDetails. + :type inference_key: str + + :param model_id: + The value to assign to the model_id property of this MemberModelDetails. + :type model_id: str + + """ + self.swagger_types = { + 'inference_key': 'str', + 'model_id': 'str' + } + self.attribute_map = { + 'inference_key': 'inferenceKey', + 'model_id': 'modelId' + } + self._inference_key = None + self._model_id = None + + @property + def inference_key(self): + """ + Gets the inference_key of this MemberModelDetails. + SaaS friendly name of the model. + + + :return: The inference_key of this MemberModelDetails. + :rtype: str + """ + return self._inference_key + + @inference_key.setter + def inference_key(self, inference_key): + """ + Sets the inference_key of this MemberModelDetails. + SaaS friendly name of the model. + + + :param inference_key: The inference_key of this MemberModelDetails. + :type: str + """ + self._inference_key = inference_key + + @property + def model_id(self): + """ + **[Required]** Gets the model_id of this MemberModelDetails. + The `OCID`__ of the model. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The model_id of this MemberModelDetails. + :rtype: str + """ + return self._model_id + + @model_id.setter + def model_id(self, model_id): + """ + Sets the model_id of this MemberModelDetails. + The `OCID`__ of the model. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param model_id: The model_id of this MemberModelDetails. + :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/data_science/models/member_model_entries.py b/src/oci/data_science/models/member_model_entries.py new file mode 100644 index 0000000000..a7e108f33a --- /dev/null +++ b/src/oci/data_science/models/member_model_entries.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20190101 + + +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 MemberModelEntries(object): + """ + List of member models (inferenceKey & modelId) to be associated with the model group. + """ + + def __init__(self, **kwargs): + """ + Initializes a new MemberModelEntries object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param member_model_details: + The value to assign to the member_model_details property of this MemberModelEntries. + :type member_model_details: list[oci.data_science.models.MemberModelDetails] + + """ + self.swagger_types = { + 'member_model_details': 'list[MemberModelDetails]' + } + self.attribute_map = { + 'member_model_details': 'memberModelDetails' + } + self._member_model_details = None + + @property + def member_model_details(self): + """ + Gets the member_model_details of this MemberModelEntries. + Each List item contains inference key and model ocid. + + + :return: The member_model_details of this MemberModelEntries. + :rtype: list[oci.data_science.models.MemberModelDetails] + """ + return self._member_model_details + + @member_model_details.setter + def member_model_details(self, member_model_details): + """ + Sets the member_model_details of this MemberModelEntries. + Each List item contains inference key and model ocid. + + + :param member_model_details: The member_model_details of this MemberModelEntries. + :type: list[oci.data_science.models.MemberModelDetails] + """ + self._member_model_details = member_model_details + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_science/models/model_deployment_configuration_details.py b/src/oci/data_science/models/model_deployment_configuration_details.py index fbb28ae942..b4dc9035c8 100644 --- a/src/oci/data_science/models/model_deployment_configuration_details.py +++ b/src/oci/data_science/models/model_deployment_configuration_details.py @@ -19,18 +19,23 @@ class ModelDeploymentConfigurationDetails(object): #: This constant has a value of "SINGLE_MODEL" DEPLOYMENT_TYPE_SINGLE_MODEL = "SINGLE_MODEL" + #: A constant which can be used with the deployment_type property of a ModelDeploymentConfigurationDetails. + #: This constant has a value of "MODEL_GROUP" + DEPLOYMENT_TYPE_MODEL_GROUP = "MODEL_GROUP" + def __init__(self, **kwargs): """ Initializes a new ModelDeploymentConfigurationDetails 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.data_science.models.SingleModelDeploymentConfigurationDetails` + * :class:`~oci.data_science.models.ModelGroupDeploymentConfigurationDetails` The following keyword arguments are supported (corresponding to the getters/setters of this class): :param deployment_type: The value to assign to the deployment_type property of this ModelDeploymentConfigurationDetails. - Allowed values for this property are: "SINGLE_MODEL", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "SINGLE_MODEL", "MODEL_GROUP", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type deployment_type: str @@ -53,6 +58,9 @@ def get_subtype(object_dictionary): if type == 'SINGLE_MODEL': return 'SingleModelDeploymentConfigurationDetails' + + if type == 'MODEL_GROUP': + return 'ModelGroupDeploymentConfigurationDetails' else: return 'ModelDeploymentConfigurationDetails' @@ -62,7 +70,7 @@ def deployment_type(self): **[Required]** Gets the deployment_type of this ModelDeploymentConfigurationDetails. The type of the model deployment. - Allowed values for this property are: "SINGLE_MODEL", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "SINGLE_MODEL", "MODEL_GROUP", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -81,7 +89,7 @@ def deployment_type(self, deployment_type): :param deployment_type: The deployment_type of this ModelDeploymentConfigurationDetails. :type: str """ - allowed_values = ["SINGLE_MODEL"] + allowed_values = ["SINGLE_MODEL", "MODEL_GROUP"] if not value_allowed_none_or_none_sentinel(deployment_type, allowed_values): deployment_type = 'UNKNOWN_ENUM_VALUE' self._deployment_type = deployment_type diff --git a/src/oci/data_science/models/model_deployment_model_state_summary.py b/src/oci/data_science/models/model_deployment_model_state_summary.py new file mode 100644 index 0000000000..ec0fd65a03 --- /dev/null +++ b/src/oci/data_science/models/model_deployment_model_state_summary.py @@ -0,0 +1,329 @@ +# coding: utf-8 +# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20190101 + + +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 ModelDeploymentModelStateSummary(object): + """ + Status of the model in a model group deployment. + """ + + #: A constant which can be used with the state property of a ModelDeploymentModelStateSummary. + #: This constant has a value of "SUCCESS" + STATE_SUCCESS = "SUCCESS" + + #: A constant which can be used with the state property of a ModelDeploymentModelStateSummary. + #: This constant has a value of "FAILED" + STATE_FAILED = "FAILED" + + #: A constant which can be used with the state property of a ModelDeploymentModelStateSummary. + #: This constant has a value of "INCONSISTENT" + STATE_INCONSISTENT = "INCONSISTENT" + + def __init__(self, **kwargs): + """ + Initializes a new ModelDeploymentModelStateSummary 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 ModelDeploymentModelStateSummary. + :type model_id: str + + :param project_id: + The value to assign to the project_id property of this ModelDeploymentModelStateSummary. + :type project_id: str + + :param display_name: + The value to assign to the display_name property of this ModelDeploymentModelStateSummary. + :type display_name: str + + :param inference_key: + The value to assign to the inference_key property of this ModelDeploymentModelStateSummary. + :type inference_key: str + + :param state: + The value to assign to the state property of this ModelDeploymentModelStateSummary. + Allowed values for this property are: "SUCCESS", "FAILED", "INCONSISTENT", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type state: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this ModelDeploymentModelStateSummary. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this ModelDeploymentModelStateSummary. + :type defined_tags: dict(str, dict(str, object)) + + :param system_tags: + The value to assign to the system_tags property of this ModelDeploymentModelStateSummary. + :type system_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'model_id': 'str', + 'project_id': 'str', + 'display_name': 'str', + 'inference_key': 'str', + 'state': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))' + } + self.attribute_map = { + 'model_id': 'modelId', + 'project_id': 'projectId', + 'display_name': 'displayName', + 'inference_key': 'inferenceKey', + 'state': 'state', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags' + } + self._model_id = None + self._project_id = None + self._display_name = None + self._inference_key = None + self._state = None + self._freeform_tags = None + self._defined_tags = None + self._system_tags = None + + @property + def model_id(self): + """ + **[Required]** Gets the model_id of this ModelDeploymentModelStateSummary. + The `OCID`__ of the deployed model in model deployment. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The model_id of this ModelDeploymentModelStateSummary. + :rtype: str + """ + return self._model_id + + @model_id.setter + def model_id(self, model_id): + """ + Sets the model_id of this ModelDeploymentModelStateSummary. + The `OCID`__ of the deployed model in model deployment. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param model_id: The model_id of this ModelDeploymentModelStateSummary. + :type: str + """ + self._model_id = model_id + + @property + def project_id(self): + """ + **[Required]** Gets the project_id of this ModelDeploymentModelStateSummary. + The `OCID`__ of the project associated with the model. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The project_id of this ModelDeploymentModelStateSummary. + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """ + Sets the project_id of this ModelDeploymentModelStateSummary. + The `OCID`__ of the project associated with the model. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param project_id: The project_id of this ModelDeploymentModelStateSummary. + :type: str + """ + self._project_id = project_id + + @property + def display_name(self): + """ + **[Required]** Gets the display_name of this ModelDeploymentModelStateSummary. + A user-friendly display name for the resource. + + + :return: The display_name of this ModelDeploymentModelStateSummary. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this ModelDeploymentModelStateSummary. + A user-friendly display name for the resource. + + + :param display_name: The display_name of this ModelDeploymentModelStateSummary. + :type: str + """ + self._display_name = display_name + + @property + def inference_key(self): + """ + **[Required]** Gets the inference_key of this ModelDeploymentModelStateSummary. + SaaS friendly name for the model OCID. + + + :return: The inference_key of this ModelDeploymentModelStateSummary. + :rtype: str + """ + return self._inference_key + + @inference_key.setter + def inference_key(self, inference_key): + """ + Sets the inference_key of this ModelDeploymentModelStateSummary. + SaaS friendly name for the model OCID. + + + :param inference_key: The inference_key of this ModelDeploymentModelStateSummary. + :type: str + """ + self._inference_key = inference_key + + @property + def state(self): + """ + **[Required]** Gets the state of this ModelDeploymentModelStateSummary. + The state of the deployed model in model deployment. + + Allowed values for this property are: "SUCCESS", "FAILED", "INCONSISTENT", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The state of this ModelDeploymentModelStateSummary. + :rtype: str + """ + return self._state + + @state.setter + def state(self, state): + """ + Sets the state of this ModelDeploymentModelStateSummary. + The state of the deployed model in model deployment. + + + :param state: The state of this ModelDeploymentModelStateSummary. + :type: str + """ + allowed_values = ["SUCCESS", "FAILED", "INCONSISTENT"] + if not value_allowed_none_or_none_sentinel(state, allowed_values): + state = 'UNKNOWN_ENUM_VALUE' + self._state = state + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this ModelDeploymentModelStateSummary. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. See `Resource Tags`__. + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this ModelDeploymentModelStateSummary. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this ModelDeploymentModelStateSummary. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. See `Resource Tags`__. + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this ModelDeploymentModelStateSummary. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this ModelDeploymentModelStateSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this ModelDeploymentModelStateSummary. + :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 ModelDeploymentModelStateSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this ModelDeploymentModelStateSummary. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def system_tags(self): + """ + Gets the system_tags of this ModelDeploymentModelStateSummary. + 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 ModelDeploymentModelStateSummary. + :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 ModelDeploymentModelStateSummary. + 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 ModelDeploymentModelStateSummary. + :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/data_science/models/model_group.py b/src/oci/data_science/models/model_group.py new file mode 100644 index 0000000000..03affb5ce4 --- /dev/null +++ b/src/oci/data_science/models/model_group.py @@ -0,0 +1,764 @@ +# coding: utf-8 +# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20190101 + + +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 ModelGroup(object): + """ + Model group is a collection of the models. Model groups are represented by their associated metadata. + """ + + #: A constant which can be used with the lifecycle_state property of a ModelGroup. + #: This constant has a value of "CREATING" + LIFECYCLE_STATE_CREATING = "CREATING" + + #: A constant which can be used with the lifecycle_state property of a ModelGroup. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a ModelGroup. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + #: A constant which can be used with the lifecycle_state property of a ModelGroup. + #: This constant has a value of "INACTIVE" + LIFECYCLE_STATE_INACTIVE = "INACTIVE" + + #: A constant which can be used with the lifecycle_state property of a ModelGroup. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + #: A constant which can be used with the lifecycle_state property of a ModelGroup. + #: This constant has a value of "DELETED" + LIFECYCLE_STATE_DELETED = "DELETED" + + def __init__(self, **kwargs): + """ + Initializes a new ModelGroup 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 ModelGroup. + :type id: str + + :param compartment_id: + The value to assign to the compartment_id property of this ModelGroup. + :type compartment_id: str + + :param project_id: + The value to assign to the project_id property of this ModelGroup. + :type project_id: str + + :param display_name: + The value to assign to the display_name property of this ModelGroup. + :type display_name: str + + :param description: + The value to assign to the description property of this ModelGroup. + :type description: str + + :param model_group_details: + The value to assign to the model_group_details property of this ModelGroup. + :type model_group_details: oci.data_science.models.ModelGroupDetails + + :param member_model_entries: + The value to assign to the member_model_entries property of this ModelGroup. + :type member_model_entries: oci.data_science.models.MemberModelEntries + + :param freeform_tags: + The value to assign to the freeform_tags property of this ModelGroup. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this ModelGroup. + :type defined_tags: dict(str, dict(str, object)) + + :param system_tags: + The value to assign to the system_tags property of this ModelGroup. + :type system_tags: dict(str, dict(str, object)) + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this ModelGroup. + Allowed values for this property are: "CREATING", "ACTIVE", "FAILED", "INACTIVE", "DELETING", "DELETED", '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 ModelGroup. + :type lifecycle_details: str + + :param time_created: + The value to assign to the time_created property of this ModelGroup. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this ModelGroup. + :type time_updated: datetime + + :param created_by: + The value to assign to the created_by property of this ModelGroup. + :type created_by: str + + :param model_group_version_history_id: + The value to assign to the model_group_version_history_id property of this ModelGroup. + :type model_group_version_history_id: str + + :param model_group_version_history_name: + The value to assign to the model_group_version_history_name property of this ModelGroup. + :type model_group_version_history_name: str + + :param version_label: + The value to assign to the version_label property of this ModelGroup. + :type version_label: str + + :param version_id: + The value to assign to the version_id property of this ModelGroup. + :type version_id: int + + :param create_type: + The value to assign to the create_type property of this ModelGroup. + :type create_type: str + + :param source_model_group_id: + The value to assign to the source_model_group_id property of this ModelGroup. + :type source_model_group_id: str + + """ + self.swagger_types = { + 'id': 'str', + 'compartment_id': 'str', + 'project_id': 'str', + 'display_name': 'str', + 'description': 'str', + 'model_group_details': 'ModelGroupDetails', + 'member_model_entries': 'MemberModelEntries', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))', + 'lifecycle_state': 'str', + 'lifecycle_details': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'created_by': 'str', + 'model_group_version_history_id': 'str', + 'model_group_version_history_name': 'str', + 'version_label': 'str', + 'version_id': 'int', + 'create_type': 'str', + 'source_model_group_id': 'str' + } + self.attribute_map = { + 'id': 'id', + 'compartment_id': 'compartmentId', + 'project_id': 'projectId', + 'display_name': 'displayName', + 'description': 'description', + 'model_group_details': 'modelGroupDetails', + 'member_model_entries': 'memberModelEntries', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags', + 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'created_by': 'createdBy', + 'model_group_version_history_id': 'modelGroupVersionHistoryId', + 'model_group_version_history_name': 'modelGroupVersionHistoryName', + 'version_label': 'versionLabel', + 'version_id': 'versionId', + 'create_type': 'createType', + 'source_model_group_id': 'sourceModelGroupId' + } + self._id = None + self._compartment_id = None + self._project_id = None + self._display_name = None + self._description = None + self._model_group_details = None + self._member_model_entries = None + self._freeform_tags = None + self._defined_tags = None + self._system_tags = None + self._lifecycle_state = None + self._lifecycle_details = None + self._time_created = None + self._time_updated = None + self._created_by = None + self._model_group_version_history_id = None + self._model_group_version_history_name = None + self._version_label = None + self._version_id = None + self._create_type = None + self._source_model_group_id = None + + @property + def id(self): + """ + **[Required]** Gets the id of this ModelGroup. + The `OCID`__ of the modelGroup. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The id of this ModelGroup. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this ModelGroup. + The `OCID`__ of the modelGroup. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param id: The id of this ModelGroup. + :type: str + """ + self._id = id + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this ModelGroup. + The `OCID`__ of the modelGroup's compartment. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The compartment_id of this ModelGroup. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this ModelGroup. + The `OCID`__ of the modelGroup's compartment. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param compartment_id: The compartment_id of this ModelGroup. + :type: str + """ + self._compartment_id = compartment_id + + @property + def project_id(self): + """ + **[Required]** Gets the project_id of this ModelGroup. + The `OCID`__ of the project associated with the modelGroup. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The project_id of this ModelGroup. + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """ + Sets the project_id of this ModelGroup. + The `OCID`__ of the project associated with the modelGroup. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param project_id: The project_id of this ModelGroup. + :type: str + """ + self._project_id = project_id + + @property + def display_name(self): + """ + Gets the display_name of this ModelGroup. + A user-friendly display name for the resource. It does not have to be unique and can be modified. Avoid entering confidential information. + + + :return: The display_name of this ModelGroup. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this ModelGroup. + A user-friendly display name for the resource. It does not have to be unique and can be modified. Avoid entering confidential information. + + + :param display_name: The display_name of this ModelGroup. + :type: str + """ + self._display_name = display_name + + @property + def description(self): + """ + Gets the description of this ModelGroup. + A short description of the modelGroup. + + + :return: The description of this ModelGroup. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this ModelGroup. + A short description of the modelGroup. + + + :param description: The description of this ModelGroup. + :type: str + """ + self._description = description + + @property + def model_group_details(self): + """ + **[Required]** Gets the model_group_details of this ModelGroup. + + :return: The model_group_details of this ModelGroup. + :rtype: oci.data_science.models.ModelGroupDetails + """ + return self._model_group_details + + @model_group_details.setter + def model_group_details(self, model_group_details): + """ + Sets the model_group_details of this ModelGroup. + + :param model_group_details: The model_group_details of this ModelGroup. + :type: oci.data_science.models.ModelGroupDetails + """ + self._model_group_details = model_group_details + + @property + def member_model_entries(self): + """ + **[Required]** Gets the member_model_entries of this ModelGroup. + + :return: The member_model_entries of this ModelGroup. + :rtype: oci.data_science.models.MemberModelEntries + """ + return self._member_model_entries + + @member_model_entries.setter + def member_model_entries(self, member_model_entries): + """ + Sets the member_model_entries of this ModelGroup. + + :param member_model_entries: The member_model_entries of this ModelGroup. + :type: oci.data_science.models.MemberModelEntries + """ + self._member_model_entries = member_model_entries + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this ModelGroup. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. See `Resource Tags`__. + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this ModelGroup. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this ModelGroup. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. See `Resource Tags`__. + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this ModelGroup. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this ModelGroup. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this ModelGroup. + :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 ModelGroup. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this ModelGroup. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def system_tags(self): + """ + Gets the system_tags of this ModelGroup. + 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 ModelGroup. + :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 ModelGroup. + 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 ModelGroup. + :type: dict(str, dict(str, object)) + """ + self._system_tags = system_tags + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this ModelGroup. + The state of the modelGroup. + + Allowed values for this property are: "CREATING", "ACTIVE", "FAILED", "INACTIVE", "DELETING", "DELETED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this ModelGroup. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this ModelGroup. + The state of the modelGroup. + + + :param lifecycle_state: The lifecycle_state of this ModelGroup. + :type: str + """ + allowed_values = ["CREATING", "ACTIVE", "FAILED", "INACTIVE", "DELETING", "DELETED"] + 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 ModelGroup. + Details about the lifecycle state of the model group. + + + :return: The lifecycle_details of this ModelGroup. + :rtype: str + """ + return self._lifecycle_details + + @lifecycle_details.setter + def lifecycle_details(self, lifecycle_details): + """ + Sets the lifecycle_details of this ModelGroup. + Details about the lifecycle state of the model group. + + + :param lifecycle_details: The lifecycle_details of this ModelGroup. + :type: str + """ + self._lifecycle_details = lifecycle_details + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this ModelGroup. + The date and time the resource was created in the timestamp format defined by `RFC3339`__. + Example: 2019-08-25T21:10:29.41Z + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_created of this ModelGroup. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this ModelGroup. + The date and time the resource was created in the timestamp format defined by `RFC3339`__. + Example: 2019-08-25T21:10:29.41Z + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_created: The time_created of this ModelGroup. + :type: datetime + """ + self._time_created = time_created + + @property + def time_updated(self): + """ + **[Required]** Gets the time_updated of this ModelGroup. + The date and time the resource was updated in the timestamp format defined by `RFC3339`__. + Example: 2019-08-25T21:10:29.41Z + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_updated of this ModelGroup. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this ModelGroup. + The date and time the resource was updated in the timestamp format defined by `RFC3339`__. + Example: 2019-08-25T21:10:29.41Z + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_updated: The time_updated of this ModelGroup. + :type: datetime + """ + self._time_updated = time_updated + + @property + def created_by(self): + """ + **[Required]** Gets the created_by of this ModelGroup. + The `OCID`__ of the user who created the modelGroup. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The created_by of this ModelGroup. + :rtype: str + """ + return self._created_by + + @created_by.setter + def created_by(self, created_by): + """ + Sets the created_by of this ModelGroup. + The `OCID`__ of the user who created the modelGroup. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param created_by: The created_by of this ModelGroup. + :type: str + """ + self._created_by = created_by + + @property + def model_group_version_history_id(self): + """ + Gets the model_group_version_history_id of this ModelGroup. + The `OCID`__ of the model group version history to which the modelGroup is associated. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The model_group_version_history_id of this ModelGroup. + :rtype: str + """ + return self._model_group_version_history_id + + @model_group_version_history_id.setter + def model_group_version_history_id(self, model_group_version_history_id): + """ + Sets the model_group_version_history_id of this ModelGroup. + The `OCID`__ of the model group version history to which the modelGroup is associated. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param model_group_version_history_id: The model_group_version_history_id of this ModelGroup. + :type: str + """ + self._model_group_version_history_id = model_group_version_history_id + + @property + def model_group_version_history_name(self): + """ + Gets the model_group_version_history_name of this ModelGroup. + The name of the model group version history to which the model group is associated. + + + :return: The model_group_version_history_name of this ModelGroup. + :rtype: str + """ + return self._model_group_version_history_name + + @model_group_version_history_name.setter + def model_group_version_history_name(self, model_group_version_history_name): + """ + Sets the model_group_version_history_name of this ModelGroup. + The name of the model group version history to which the model group is associated. + + + :param model_group_version_history_name: The model_group_version_history_name of this ModelGroup. + :type: str + """ + self._model_group_version_history_name = model_group_version_history_name + + @property + def version_label(self): + """ + Gets the version_label of this ModelGroup. + An additional description of the lifecycle state of the model group. + + + :return: The version_label of this ModelGroup. + :rtype: str + """ + return self._version_label + + @version_label.setter + def version_label(self, version_label): + """ + Sets the version_label of this ModelGroup. + An additional description of the lifecycle state of the model group. + + + :param version_label: The version_label of this ModelGroup. + :type: str + """ + self._version_label = version_label + + @property + def version_id(self): + """ + Gets the version_id of this ModelGroup. + Unique identifier assigned to each version of the model group. It would be auto-incremented number generated by service. + + + :return: The version_id of this ModelGroup. + :rtype: int + """ + return self._version_id + + @version_id.setter + def version_id(self, version_id): + """ + Sets the version_id of this ModelGroup. + Unique identifier assigned to each version of the model group. It would be auto-incremented number generated by service. + + + :param version_id: The version_id of this ModelGroup. + :type: int + """ + self._version_id = version_id + + @property + def create_type(self): + """ + Gets the create_type of this ModelGroup. + The type of the model group create operation. + + + :return: The create_type of this ModelGroup. + :rtype: str + """ + return self._create_type + + @create_type.setter + def create_type(self, create_type): + """ + Sets the create_type of this ModelGroup. + The type of the model group create operation. + + + :param create_type: The create_type of this ModelGroup. + :type: str + """ + self._create_type = create_type + + @property + def source_model_group_id(self): + """ + Gets the source_model_group_id of this ModelGroup. + The `OCID`__ of the model group used for the clone operation. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The source_model_group_id of this ModelGroup. + :rtype: str + """ + return self._source_model_group_id + + @source_model_group_id.setter + def source_model_group_id(self, source_model_group_id): + """ + Sets the source_model_group_id of this ModelGroup. + The `OCID`__ of the model group used for the clone operation. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param source_model_group_id: The source_model_group_id of this ModelGroup. + :type: str + """ + self._source_model_group_id = source_model_group_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/data_science/models/model_group_clone_source_details.py b/src/oci/data_science/models/model_group_clone_source_details.py new file mode 100644 index 0000000000..45e5be94f7 --- /dev/null +++ b/src/oci/data_science/models/model_group_clone_source_details.py @@ -0,0 +1,107 @@ +# coding: utf-8 +# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20190101 + + +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 ModelGroupCloneSourceDetails(object): + """ + Model Group clone source details. + """ + + #: A constant which can be used with the model_group_clone_source_type property of a ModelGroupCloneSourceDetails. + #: This constant has a value of "MODEL_GROUP" + MODEL_GROUP_CLONE_SOURCE_TYPE_MODEL_GROUP = "MODEL_GROUP" + + #: A constant which can be used with the model_group_clone_source_type property of a ModelGroupCloneSourceDetails. + #: This constant has a value of "MODEL_GROUP_VERSION_HISTORY" + MODEL_GROUP_CLONE_SOURCE_TYPE_MODEL_GROUP_VERSION_HISTORY = "MODEL_GROUP_VERSION_HISTORY" + + def __init__(self, **kwargs): + """ + Initializes a new ModelGroupCloneSourceDetails 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.data_science.models.CloneCreateFromModelGroupVersionHistoryDetails` + * :class:`~oci.data_science.models.CloneCreateFromModelGroupDetails` + + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param model_group_clone_source_type: + The value to assign to the model_group_clone_source_type property of this ModelGroupCloneSourceDetails. + Allowed values for this property are: "MODEL_GROUP", "MODEL_GROUP_VERSION_HISTORY" + :type model_group_clone_source_type: str + + """ + self.swagger_types = { + 'model_group_clone_source_type': 'str' + } + self.attribute_map = { + 'model_group_clone_source_type': 'modelGroupCloneSourceType' + } + self._model_group_clone_source_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['modelGroupCloneSourceType'] + + if type == 'MODEL_GROUP_VERSION_HISTORY': + return 'CloneCreateFromModelGroupVersionHistoryDetails' + + if type == 'MODEL_GROUP': + return 'CloneCreateFromModelGroupDetails' + else: + return 'ModelGroupCloneSourceDetails' + + @property + def model_group_clone_source_type(self): + """ + **[Required]** Gets the model_group_clone_source_type of this ModelGroupCloneSourceDetails. + Source resource for model group clone operation. + + Allowed values for this property are: "MODEL_GROUP", "MODEL_GROUP_VERSION_HISTORY" + + + :return: The model_group_clone_source_type of this ModelGroupCloneSourceDetails. + :rtype: str + """ + return self._model_group_clone_source_type + + @model_group_clone_source_type.setter + def model_group_clone_source_type(self, model_group_clone_source_type): + """ + Sets the model_group_clone_source_type of this ModelGroupCloneSourceDetails. + Source resource for model group clone operation. + + + :param model_group_clone_source_type: The model_group_clone_source_type of this ModelGroupCloneSourceDetails. + :type: str + """ + allowed_values = ["MODEL_GROUP", "MODEL_GROUP_VERSION_HISTORY"] + if not value_allowed_none_or_none_sentinel(model_group_clone_source_type, allowed_values): + raise ValueError( + f"Invalid value for `model_group_clone_source_type`, must be None or one of {allowed_values}" + ) + self._model_group_clone_source_type = model_group_clone_source_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/data_science/models/model_group_configuration_details.py b/src/oci/data_science/models/model_group_configuration_details.py new file mode 100644 index 0000000000..5fb7b492d7 --- /dev/null +++ b/src/oci/data_science/models/model_group_configuration_details.py @@ -0,0 +1,74 @@ +# coding: utf-8 +# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20190101 + + +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 ModelGroupConfigurationDetails(object): + """ + The model group configuration details. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ModelGroupConfigurationDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param model_group_id: + The value to assign to the model_group_id property of this ModelGroupConfigurationDetails. + :type model_group_id: str + + """ + self.swagger_types = { + 'model_group_id': 'str' + } + self.attribute_map = { + 'model_group_id': 'modelGroupId' + } + self._model_group_id = None + + @property + def model_group_id(self): + """ + **[Required]** Gets the model_group_id of this ModelGroupConfigurationDetails. + The `OCID`__ of the model group you want to deploy. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The model_group_id of this ModelGroupConfigurationDetails. + :rtype: str + """ + return self._model_group_id + + @model_group_id.setter + def model_group_id(self, model_group_id): + """ + Sets the model_group_id of this ModelGroupConfigurationDetails. + The `OCID`__ of the model group you want to deploy. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param model_group_id: The model_group_id of this ModelGroupConfigurationDetails. + :type: str + """ + self._model_group_id = model_group_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/data_science/models/model_group_deployment_configuration_details.py b/src/oci/data_science/models/model_group_deployment_configuration_details.py new file mode 100644 index 0000000000..7d8ddc0fac --- /dev/null +++ b/src/oci/data_science/models/model_group_deployment_configuration_details.py @@ -0,0 +1,130 @@ +# coding: utf-8 +# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20190101 + +from .model_deployment_configuration_details import ModelDeploymentConfigurationDetails +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 ModelGroupDeploymentConfigurationDetails(ModelDeploymentConfigurationDetails): + """ + The model group type deployment. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ModelGroupDeploymentConfigurationDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.data_science.models.ModelGroupDeploymentConfigurationDetails.deployment_type` attribute + of this class is ``MODEL_GROUP`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param deployment_type: + The value to assign to the deployment_type property of this ModelGroupDeploymentConfigurationDetails. + Allowed values for this property are: "SINGLE_MODEL", "MODEL_GROUP" + :type deployment_type: str + + :param model_group_configuration_details: + The value to assign to the model_group_configuration_details property of this ModelGroupDeploymentConfigurationDetails. + :type model_group_configuration_details: oci.data_science.models.ModelGroupConfigurationDetails + + :param infrastructure_configuration_details: + The value to assign to the infrastructure_configuration_details property of this ModelGroupDeploymentConfigurationDetails. + :type infrastructure_configuration_details: oci.data_science.models.InfrastructureConfigurationDetails + + :param environment_configuration_details: + The value to assign to the environment_configuration_details property of this ModelGroupDeploymentConfigurationDetails. + :type environment_configuration_details: oci.data_science.models.ModelDeploymentEnvironmentConfigurationDetails + + """ + self.swagger_types = { + 'deployment_type': 'str', + 'model_group_configuration_details': 'ModelGroupConfigurationDetails', + 'infrastructure_configuration_details': 'InfrastructureConfigurationDetails', + 'environment_configuration_details': 'ModelDeploymentEnvironmentConfigurationDetails' + } + self.attribute_map = { + 'deployment_type': 'deploymentType', + 'model_group_configuration_details': 'modelGroupConfigurationDetails', + 'infrastructure_configuration_details': 'infrastructureConfigurationDetails', + 'environment_configuration_details': 'environmentConfigurationDetails' + } + self._deployment_type = None + self._model_group_configuration_details = None + self._infrastructure_configuration_details = None + self._environment_configuration_details = None + self._deployment_type = 'MODEL_GROUP' + + @property + def model_group_configuration_details(self): + """ + **[Required]** Gets the model_group_configuration_details of this ModelGroupDeploymentConfigurationDetails. + + :return: The model_group_configuration_details of this ModelGroupDeploymentConfigurationDetails. + :rtype: oci.data_science.models.ModelGroupConfigurationDetails + """ + return self._model_group_configuration_details + + @model_group_configuration_details.setter + def model_group_configuration_details(self, model_group_configuration_details): + """ + Sets the model_group_configuration_details of this ModelGroupDeploymentConfigurationDetails. + + :param model_group_configuration_details: The model_group_configuration_details of this ModelGroupDeploymentConfigurationDetails. + :type: oci.data_science.models.ModelGroupConfigurationDetails + """ + self._model_group_configuration_details = model_group_configuration_details + + @property + def infrastructure_configuration_details(self): + """ + **[Required]** Gets the infrastructure_configuration_details of this ModelGroupDeploymentConfigurationDetails. + + :return: The infrastructure_configuration_details of this ModelGroupDeploymentConfigurationDetails. + :rtype: oci.data_science.models.InfrastructureConfigurationDetails + """ + return self._infrastructure_configuration_details + + @infrastructure_configuration_details.setter + def infrastructure_configuration_details(self, infrastructure_configuration_details): + """ + Sets the infrastructure_configuration_details of this ModelGroupDeploymentConfigurationDetails. + + :param infrastructure_configuration_details: The infrastructure_configuration_details of this ModelGroupDeploymentConfigurationDetails. + :type: oci.data_science.models.InfrastructureConfigurationDetails + """ + self._infrastructure_configuration_details = infrastructure_configuration_details + + @property + def environment_configuration_details(self): + """ + Gets the environment_configuration_details of this ModelGroupDeploymentConfigurationDetails. + + :return: The environment_configuration_details of this ModelGroupDeploymentConfigurationDetails. + :rtype: oci.data_science.models.ModelDeploymentEnvironmentConfigurationDetails + """ + return self._environment_configuration_details + + @environment_configuration_details.setter + def environment_configuration_details(self, environment_configuration_details): + """ + Sets the environment_configuration_details of this ModelGroupDeploymentConfigurationDetails. + + :param environment_configuration_details: The environment_configuration_details of this ModelGroupDeploymentConfigurationDetails. + :type: oci.data_science.models.ModelDeploymentEnvironmentConfigurationDetails + """ + self._environment_configuration_details = environment_configuration_details + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_science/models/model_group_details.py b/src/oci/data_science/models/model_group_details.py new file mode 100644 index 0000000000..cc278d43d4 --- /dev/null +++ b/src/oci/data_science/models/model_group_details.py @@ -0,0 +1,146 @@ +# coding: utf-8 +# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20190101 + + +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 ModelGroupDetails(object): + """ + The model group details. + """ + + #: A constant which can be used with the type property of a ModelGroupDetails. + #: This constant has a value of "HOMOGENEOUS" + TYPE_HOMOGENEOUS = "HOMOGENEOUS" + + #: A constant which can be used with the type property of a ModelGroupDetails. + #: This constant has a value of "HETEROGENEOUS" + TYPE_HETEROGENEOUS = "HETEROGENEOUS" + + #: A constant which can be used with the type property of a ModelGroupDetails. + #: This constant has a value of "STACKED" + TYPE_STACKED = "STACKED" + + def __init__(self, **kwargs): + """ + Initializes a new ModelGroupDetails 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.data_science.models.HeterogeneousModelGroupDetails` + * :class:`~oci.data_science.models.StackedModelGroupDetails` + * :class:`~oci.data_science.models.HomogeneousModelGroupDetails` + + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param type: + The value to assign to the type property of this ModelGroupDetails. + Allowed values for this property are: "HOMOGENEOUS", "HETEROGENEOUS", "STACKED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type type: str + + :param custom_metadata_list: + The value to assign to the custom_metadata_list property of this ModelGroupDetails. + :type custom_metadata_list: list[oci.data_science.models.CustomMetadata] + + """ + self.swagger_types = { + 'type': 'str', + 'custom_metadata_list': 'list[CustomMetadata]' + } + self.attribute_map = { + 'type': 'type', + 'custom_metadata_list': 'customMetadataList' + } + self._type = None + self._custom_metadata_list = 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['type'] + + if type == 'HETEROGENEOUS': + return 'HeterogeneousModelGroupDetails' + + if type == 'STACKED': + return 'StackedModelGroupDetails' + + if type == 'HOMOGENEOUS': + return 'HomogeneousModelGroupDetails' + else: + return 'ModelGroupDetails' + + @property + def type(self): + """ + **[Required]** Gets the type of this ModelGroupDetails. + The type of the model group. + + Allowed values for this property are: "HOMOGENEOUS", "HETEROGENEOUS", "STACKED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The type of this ModelGroupDetails. + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """ + Sets the type of this ModelGroupDetails. + The type of the model group. + + + :param type: The type of this ModelGroupDetails. + :type: str + """ + allowed_values = ["HOMOGENEOUS", "HETEROGENEOUS", "STACKED"] + if not value_allowed_none_or_none_sentinel(type, allowed_values): + type = 'UNKNOWN_ENUM_VALUE' + self._type = type + + @property + def custom_metadata_list(self): + """ + Gets the custom_metadata_list of this ModelGroupDetails. + An array of custom metadata details for the model group. + + + :return: The custom_metadata_list of this ModelGroupDetails. + :rtype: list[oci.data_science.models.CustomMetadata] + """ + return self._custom_metadata_list + + @custom_metadata_list.setter + def custom_metadata_list(self, custom_metadata_list): + """ + Sets the custom_metadata_list of this ModelGroupDetails. + An array of custom metadata details for the model group. + + + :param custom_metadata_list: The custom_metadata_list of this ModelGroupDetails. + :type: list[oci.data_science.models.CustomMetadata] + """ + self._custom_metadata_list = custom_metadata_list + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_science/models/model_group_model_summary.py b/src/oci/data_science/models/model_group_model_summary.py new file mode 100644 index 0000000000..775d0273b4 --- /dev/null +++ b/src/oci/data_science/models/model_group_model_summary.py @@ -0,0 +1,590 @@ +# coding: utf-8 +# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20190101 + + +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 ModelGroupModelSummary(object): + """ + Summary information for a model associated with the model group. + """ + + #: A constant which can be used with the lifecycle_state property of a ModelGroupModelSummary. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a ModelGroupModelSummary. + #: This constant has a value of "DELETED" + LIFECYCLE_STATE_DELETED = "DELETED" + + #: A constant which can be used with the lifecycle_state property of a ModelGroupModelSummary. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + #: A constant which can be used with the lifecycle_state property of a ModelGroupModelSummary. + #: This constant has a value of "INACTIVE" + LIFECYCLE_STATE_INACTIVE = "INACTIVE" + + #: A constant which can be used with the category property of a ModelGroupModelSummary. + #: This constant has a value of "USER" + CATEGORY_USER = "USER" + + #: A constant which can be used with the category property of a ModelGroupModelSummary. + #: This constant has a value of "SERVICE" + CATEGORY_SERVICE = "SERVICE" + + def __init__(self, **kwargs): + """ + Initializes a new ModelGroupModelSummary 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 ModelGroupModelSummary. + :type id: str + + :param model_id: + The value to assign to the model_id property of this ModelGroupModelSummary. + :type model_id: str + + :param compartment_id: + The value to assign to the compartment_id property of this ModelGroupModelSummary. + :type compartment_id: str + + :param project_id: + The value to assign to the project_id property of this ModelGroupModelSummary. + :type project_id: str + + :param display_name: + The value to assign to the display_name property of this ModelGroupModelSummary. + :type display_name: str + + :param created_by: + The value to assign to the created_by property of this ModelGroupModelSummary. + :type created_by: str + + :param time_created: + The value to assign to the time_created property of this ModelGroupModelSummary. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this ModelGroupModelSummary. + :type time_updated: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this ModelGroupModelSummary. + Allowed values for this property are: "ACTIVE", "DELETED", "FAILED", "INACTIVE", '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 ModelGroupModelSummary. + :type lifecycle_details: str + + :param category: + The value to assign to the category property of this ModelGroupModelSummary. + Allowed values for this property are: "USER", "SERVICE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type category: str + + :param is_model_by_reference: + The value to assign to the is_model_by_reference property of this ModelGroupModelSummary. + :type is_model_by_reference: bool + + :param freeform_tags: + The value to assign to the freeform_tags property of this ModelGroupModelSummary. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this ModelGroupModelSummary. + :type defined_tags: dict(str, dict(str, object)) + + :param system_tags: + The value to assign to the system_tags property of this ModelGroupModelSummary. + :type system_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'id': 'str', + 'model_id': 'str', + 'compartment_id': 'str', + 'project_id': 'str', + 'display_name': 'str', + 'created_by': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'lifecycle_state': 'str', + 'lifecycle_details': 'str', + 'category': 'str', + 'is_model_by_reference': 'bool', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))' + } + self.attribute_map = { + 'id': 'id', + 'model_id': 'modelId', + 'compartment_id': 'compartmentId', + 'project_id': 'projectId', + 'display_name': 'displayName', + 'created_by': 'createdBy', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails', + 'category': 'category', + 'is_model_by_reference': 'isModelByReference', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags' + } + self._id = None + self._model_id = None + self._compartment_id = None + self._project_id = None + self._display_name = None + self._created_by = None + self._time_created = None + self._time_updated = None + self._lifecycle_state = None + self._lifecycle_details = None + self._category = None + self._is_model_by_reference = None + self._freeform_tags = None + self._defined_tags = None + self._system_tags = None + + @property + def id(self): + """ + **[Required]** Gets the id of this ModelGroupModelSummary. + The `OCID`__ of the model group. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The id of this ModelGroupModelSummary. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this ModelGroupModelSummary. + The `OCID`__ of the model group. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param id: The id of this ModelGroupModelSummary. + :type: str + """ + self._id = id + + @property + def model_id(self): + """ + **[Required]** Gets the model_id of this ModelGroupModelSummary. + The `OCID`__ of the model. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The model_id of this ModelGroupModelSummary. + :rtype: str + """ + return self._model_id + + @model_id.setter + def model_id(self, model_id): + """ + Sets the model_id of this ModelGroupModelSummary. + The `OCID`__ of the model. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param model_id: The model_id of this ModelGroupModelSummary. + :type: str + """ + self._model_id = model_id + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this ModelGroupModelSummary. + The `OCID`__ of the model's compartment. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The compartment_id of this ModelGroupModelSummary. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this ModelGroupModelSummary. + The `OCID`__ of the model's compartment. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param compartment_id: The compartment_id of this ModelGroupModelSummary. + :type: str + """ + self._compartment_id = compartment_id + + @property + def project_id(self): + """ + **[Required]** Gets the project_id of this ModelGroupModelSummary. + The `OCID`__ of the project associated with the model. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The project_id of this ModelGroupModelSummary. + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """ + Sets the project_id of this ModelGroupModelSummary. + The `OCID`__ of the project associated with the model. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param project_id: The project_id of this ModelGroupModelSummary. + :type: str + """ + self._project_id = project_id + + @property + def display_name(self): + """ + **[Required]** Gets the display_name of this ModelGroupModelSummary. + A user-friendly display name of the model. + + + :return: The display_name of this ModelGroupModelSummary. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this ModelGroupModelSummary. + A user-friendly display name of the model. + + + :param display_name: The display_name of this ModelGroupModelSummary. + :type: str + """ + self._display_name = display_name + + @property + def created_by(self): + """ + **[Required]** Gets the created_by of this ModelGroupModelSummary. + The `OCID`__ of the user who created the model. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The created_by of this ModelGroupModelSummary. + :rtype: str + """ + return self._created_by + + @created_by.setter + def created_by(self, created_by): + """ + Sets the created_by of this ModelGroupModelSummary. + The `OCID`__ of the user who created the model. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param created_by: The created_by of this ModelGroupModelSummary. + :type: str + """ + self._created_by = created_by + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this ModelGroupModelSummary. + The date and time the resource was created in the timestamp format defined by `RFC3339`__. + Example: 2019-08-25T21:10:29.41Z + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_created of this ModelGroupModelSummary. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this ModelGroupModelSummary. + The date and time the resource was created in the timestamp format defined by `RFC3339`__. + Example: 2019-08-25T21:10:29.41Z + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_created: The time_created of this ModelGroupModelSummary. + :type: datetime + """ + self._time_created = time_created + + @property + def time_updated(self): + """ + **[Required]** Gets the time_updated of this ModelGroupModelSummary. + The date and time the resource was updated in the timestamp format defined by `RFC3339`__. + Example: 2019-08-25T21:10:29.41Z + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_updated of this ModelGroupModelSummary. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this ModelGroupModelSummary. + The date and time the resource was updated in the timestamp format defined by `RFC3339`__. + Example: 2019-08-25T21:10:29.41Z + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_updated: The time_updated of this ModelGroupModelSummary. + :type: datetime + """ + self._time_updated = time_updated + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this ModelGroupModelSummary. + The state of the model. + + Allowed values for this property are: "ACTIVE", "DELETED", "FAILED", "INACTIVE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this ModelGroupModelSummary. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this ModelGroupModelSummary. + The state of the model. + + + :param lifecycle_state: The lifecycle_state of this ModelGroupModelSummary. + :type: str + """ + allowed_values = ["ACTIVE", "DELETED", "FAILED", "INACTIVE"] + 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): + """ + **[Required]** Gets the lifecycle_details of this ModelGroupModelSummary. + Details about the lifecycle state of the model. + + + :return: The lifecycle_details of this ModelGroupModelSummary. + :rtype: str + """ + return self._lifecycle_details + + @lifecycle_details.setter + def lifecycle_details(self, lifecycle_details): + """ + Sets the lifecycle_details of this ModelGroupModelSummary. + Details about the lifecycle state of the model. + + + :param lifecycle_details: The lifecycle_details of this ModelGroupModelSummary. + :type: str + """ + self._lifecycle_details = lifecycle_details + + @property + def category(self): + """ + **[Required]** Gets the category of this ModelGroupModelSummary. + The category of the model. + + Allowed values for this property are: "USER", "SERVICE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The category of this ModelGroupModelSummary. + :rtype: str + """ + return self._category + + @category.setter + def category(self, category): + """ + Sets the category of this ModelGroupModelSummary. + The category of the model. + + + :param category: The category of this ModelGroupModelSummary. + :type: str + """ + allowed_values = ["USER", "SERVICE"] + if not value_allowed_none_or_none_sentinel(category, allowed_values): + category = 'UNKNOWN_ENUM_VALUE' + self._category = category + + @property + def is_model_by_reference(self): + """ + **[Required]** Gets the is_model_by_reference of this ModelGroupModelSummary. + Identifier to indicate whether a model artifact resides in the Service Tenancy or Customer Tenancy. + + + :return: The is_model_by_reference of this ModelGroupModelSummary. + :rtype: bool + """ + return self._is_model_by_reference + + @is_model_by_reference.setter + def is_model_by_reference(self, is_model_by_reference): + """ + Sets the is_model_by_reference of this ModelGroupModelSummary. + Identifier to indicate whether a model artifact resides in the Service Tenancy or Customer Tenancy. + + + :param is_model_by_reference: The is_model_by_reference of this ModelGroupModelSummary. + :type: bool + """ + self._is_model_by_reference = is_model_by_reference + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this ModelGroupModelSummary. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. See `Resource Tags`__. + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this ModelGroupModelSummary. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this ModelGroupModelSummary. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. See `Resource Tags`__. + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this ModelGroupModelSummary. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this ModelGroupModelSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this ModelGroupModelSummary. + :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 ModelGroupModelSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this ModelGroupModelSummary. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def system_tags(self): + """ + Gets the system_tags of this ModelGroupModelSummary. + 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 ModelGroupModelSummary. + :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 ModelGroupModelSummary. + 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 ModelGroupModelSummary. + :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/data_science/models/model_group_summary.py b/src/oci/data_science/models/model_group_summary.py new file mode 100644 index 0000000000..77611d951b --- /dev/null +++ b/src/oci/data_science/models/model_group_summary.py @@ -0,0 +1,640 @@ +# coding: utf-8 +# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20190101 + + +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 ModelGroupSummary(object): + """ + Summary information for a modelGroup. + """ + + #: A constant which can be used with the lifecycle_state property of a ModelGroupSummary. + #: This constant has a value of "CREATING" + LIFECYCLE_STATE_CREATING = "CREATING" + + #: A constant which can be used with the lifecycle_state property of a ModelGroupSummary. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a ModelGroupSummary. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + #: A constant which can be used with the lifecycle_state property of a ModelGroupSummary. + #: This constant has a value of "INACTIVE" + LIFECYCLE_STATE_INACTIVE = "INACTIVE" + + #: A constant which can be used with the lifecycle_state property of a ModelGroupSummary. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + #: A constant which can be used with the lifecycle_state property of a ModelGroupSummary. + #: This constant has a value of "DELETED" + LIFECYCLE_STATE_DELETED = "DELETED" + + def __init__(self, **kwargs): + """ + Initializes a new ModelGroupSummary 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 ModelGroupSummary. + :type id: str + + :param compartment_id: + The value to assign to the compartment_id property of this ModelGroupSummary. + :type compartment_id: str + + :param project_id: + The value to assign to the project_id property of this ModelGroupSummary. + :type project_id: str + + :param display_name: + The value to assign to the display_name property of this ModelGroupSummary. + :type display_name: str + + :param created_by: + The value to assign to the created_by property of this ModelGroupSummary. + :type created_by: str + + :param time_created: + The value to assign to the time_created property of this ModelGroupSummary. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this ModelGroupSummary. + :type time_updated: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this ModelGroupSummary. + Allowed values for this property are: "CREATING", "ACTIVE", "FAILED", "INACTIVE", "DELETING", "DELETED", '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 ModelGroupSummary. + :type lifecycle_details: str + + :param model_group_version_history_id: + The value to assign to the model_group_version_history_id property of this ModelGroupSummary. + :type model_group_version_history_id: str + + :param model_group_version_history_name: + The value to assign to the model_group_version_history_name property of this ModelGroupSummary. + :type model_group_version_history_name: str + + :param version_label: + The value to assign to the version_label property of this ModelGroupSummary. + :type version_label: str + + :param version_id: + The value to assign to the version_id property of this ModelGroupSummary. + :type version_id: int + + :param model_group_details: + The value to assign to the model_group_details property of this ModelGroupSummary. + :type model_group_details: oci.data_science.models.ModelGroupDetails + + :param freeform_tags: + The value to assign to the freeform_tags property of this ModelGroupSummary. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this ModelGroupSummary. + :type defined_tags: dict(str, dict(str, object)) + + :param system_tags: + The value to assign to the system_tags property of this ModelGroupSummary. + :type system_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'id': 'str', + 'compartment_id': 'str', + 'project_id': 'str', + 'display_name': 'str', + 'created_by': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'lifecycle_state': 'str', + 'lifecycle_details': 'str', + 'model_group_version_history_id': 'str', + 'model_group_version_history_name': 'str', + 'version_label': 'str', + 'version_id': 'int', + 'model_group_details': 'ModelGroupDetails', + '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', + 'project_id': 'projectId', + 'display_name': 'displayName', + 'created_by': 'createdBy', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails', + 'model_group_version_history_id': 'modelGroupVersionHistoryId', + 'model_group_version_history_name': 'modelGroupVersionHistoryName', + 'version_label': 'versionLabel', + 'version_id': 'versionId', + 'model_group_details': 'modelGroupDetails', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags' + } + self._id = None + self._compartment_id = None + self._project_id = None + self._display_name = None + self._created_by = None + self._time_created = None + self._time_updated = None + self._lifecycle_state = None + self._lifecycle_details = None + self._model_group_version_history_id = None + self._model_group_version_history_name = None + self._version_label = None + self._version_id = None + self._model_group_details = None + self._freeform_tags = None + self._defined_tags = None + self._system_tags = None + + @property + def id(self): + """ + **[Required]** Gets the id of this ModelGroupSummary. + The `OCID`__ of the modelGroup. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The id of this ModelGroupSummary. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this ModelGroupSummary. + The `OCID`__ of the modelGroup. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param id: The id of this ModelGroupSummary. + :type: str + """ + self._id = id + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this ModelGroupSummary. + The `OCID`__ of the modelGroup's compartment. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The compartment_id of this ModelGroupSummary. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this ModelGroupSummary. + The `OCID`__ of the modelGroup's compartment. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param compartment_id: The compartment_id of this ModelGroupSummary. + :type: str + """ + self._compartment_id = compartment_id + + @property + def project_id(self): + """ + **[Required]** Gets the project_id of this ModelGroupSummary. + The `OCID`__ of the project associated with the modelGroup. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The project_id of this ModelGroupSummary. + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """ + Sets the project_id of this ModelGroupSummary. + The `OCID`__ of the project associated with the modelGroup. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param project_id: The project_id of this ModelGroupSummary. + :type: str + """ + self._project_id = project_id + + @property + def display_name(self): + """ + **[Required]** Gets the display_name of this ModelGroupSummary. + A user-friendly display name for the resource. It does not have to be unique and can be modified. Avoid entering confidential information. + + + :return: The display_name of this ModelGroupSummary. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this ModelGroupSummary. + A user-friendly display name for the resource. It does not have to be unique and can be modified. Avoid entering confidential information. + + + :param display_name: The display_name of this ModelGroupSummary. + :type: str + """ + self._display_name = display_name + + @property + def created_by(self): + """ + **[Required]** Gets the created_by of this ModelGroupSummary. + The `OCID`__ of the user who created the modelGroup. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The created_by of this ModelGroupSummary. + :rtype: str + """ + return self._created_by + + @created_by.setter + def created_by(self, created_by): + """ + Sets the created_by of this ModelGroupSummary. + The `OCID`__ of the user who created the modelGroup. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param created_by: The created_by of this ModelGroupSummary. + :type: str + """ + self._created_by = created_by + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this ModelGroupSummary. + The date and time the resource was created in the timestamp format defined by `RFC3339`__. + Example: 2019-08-25T21:10:29.41Z + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_created of this ModelGroupSummary. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this ModelGroupSummary. + The date and time the resource was created in the timestamp format defined by `RFC3339`__. + Example: 2019-08-25T21:10:29.41Z + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_created: The time_created of this ModelGroupSummary. + :type: datetime + """ + self._time_created = time_created + + @property + def time_updated(self): + """ + **[Required]** Gets the time_updated of this ModelGroupSummary. + The date and time the resource was last updated in the timestamp format defined by `RFC3339`__. + Example: 2019-08-25T21:10:29.41Z + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_updated of this ModelGroupSummary. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this ModelGroupSummary. + The date and time the resource was last updated in the timestamp format defined by `RFC3339`__. + Example: 2019-08-25T21:10:29.41Z + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_updated: The time_updated of this ModelGroupSummary. + :type: datetime + """ + self._time_updated = time_updated + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this ModelGroupSummary. + The state of the model. + + Allowed values for this property are: "CREATING", "ACTIVE", "FAILED", "INACTIVE", "DELETING", "DELETED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this ModelGroupSummary. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this ModelGroupSummary. + The state of the model. + + + :param lifecycle_state: The lifecycle_state of this ModelGroupSummary. + :type: str + """ + allowed_values = ["CREATING", "ACTIVE", "FAILED", "INACTIVE", "DELETING", "DELETED"] + 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 ModelGroupSummary. + Details about the lifecycle state of the model group. + + + :return: The lifecycle_details of this ModelGroupSummary. + :rtype: str + """ + return self._lifecycle_details + + @lifecycle_details.setter + def lifecycle_details(self, lifecycle_details): + """ + Sets the lifecycle_details of this ModelGroupSummary. + Details about the lifecycle state of the model group. + + + :param lifecycle_details: The lifecycle_details of this ModelGroupSummary. + :type: str + """ + self._lifecycle_details = lifecycle_details + + @property + def model_group_version_history_id(self): + """ + Gets the model_group_version_history_id of this ModelGroupSummary. + The `OCID`__ of the model group version history to which the modelGroup is associated. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The model_group_version_history_id of this ModelGroupSummary. + :rtype: str + """ + return self._model_group_version_history_id + + @model_group_version_history_id.setter + def model_group_version_history_id(self, model_group_version_history_id): + """ + Sets the model_group_version_history_id of this ModelGroupSummary. + The `OCID`__ of the model group version history to which the modelGroup is associated. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param model_group_version_history_id: The model_group_version_history_id of this ModelGroupSummary. + :type: str + """ + self._model_group_version_history_id = model_group_version_history_id + + @property + def model_group_version_history_name(self): + """ + Gets the model_group_version_history_name of this ModelGroupSummary. + The name of the model group version history to which the model group is associated. + + + :return: The model_group_version_history_name of this ModelGroupSummary. + :rtype: str + """ + return self._model_group_version_history_name + + @model_group_version_history_name.setter + def model_group_version_history_name(self, model_group_version_history_name): + """ + Sets the model_group_version_history_name of this ModelGroupSummary. + The name of the model group version history to which the model group is associated. + + + :param model_group_version_history_name: The model_group_version_history_name of this ModelGroupSummary. + :type: str + """ + self._model_group_version_history_name = model_group_version_history_name + + @property + def version_label(self): + """ + Gets the version_label of this ModelGroupSummary. + An additional description of the lifecycle state of the model group. + + + :return: The version_label of this ModelGroupSummary. + :rtype: str + """ + return self._version_label + + @version_label.setter + def version_label(self, version_label): + """ + Sets the version_label of this ModelGroupSummary. + An additional description of the lifecycle state of the model group. + + + :param version_label: The version_label of this ModelGroupSummary. + :type: str + """ + self._version_label = version_label + + @property + def version_id(self): + """ + Gets the version_id of this ModelGroupSummary. + Unique identifier assigned to each version of the model group. It would be auto-incremented number generated by service. + + + :return: The version_id of this ModelGroupSummary. + :rtype: int + """ + return self._version_id + + @version_id.setter + def version_id(self, version_id): + """ + Sets the version_id of this ModelGroupSummary. + Unique identifier assigned to each version of the model group. It would be auto-incremented number generated by service. + + + :param version_id: The version_id of this ModelGroupSummary. + :type: int + """ + self._version_id = version_id + + @property + def model_group_details(self): + """ + **[Required]** Gets the model_group_details of this ModelGroupSummary. + + :return: The model_group_details of this ModelGroupSummary. + :rtype: oci.data_science.models.ModelGroupDetails + """ + return self._model_group_details + + @model_group_details.setter + def model_group_details(self, model_group_details): + """ + Sets the model_group_details of this ModelGroupSummary. + + :param model_group_details: The model_group_details of this ModelGroupSummary. + :type: oci.data_science.models.ModelGroupDetails + """ + self._model_group_details = model_group_details + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this ModelGroupSummary. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. See `Resource Tags`__. + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this ModelGroupSummary. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this ModelGroupSummary. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. See `Resource Tags`__. + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this ModelGroupSummary. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this ModelGroupSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this ModelGroupSummary. + :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 ModelGroupSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this ModelGroupSummary. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def system_tags(self): + """ + Gets the system_tags of this ModelGroupSummary. + 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 ModelGroupSummary. + :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 ModelGroupSummary. + 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 ModelGroupSummary. + :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/data_science/models/model_group_version_history.py b/src/oci/data_science/models/model_group_version_history.py new file mode 100644 index 0000000000..e7a96bb241 --- /dev/null +++ b/src/oci/data_science/models/model_group_version_history.py @@ -0,0 +1,543 @@ +# coding: utf-8 +# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20190101 + + +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 ModelGroupVersionHistory(object): + """ + Model Group Version history to associate different versions of Model Group resource. + """ + + #: A constant which can be used with the lifecycle_state property of a ModelGroupVersionHistory. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a ModelGroupVersionHistory. + #: This constant has a value of "DELETED" + LIFECYCLE_STATE_DELETED = "DELETED" + + #: A constant which can be used with the lifecycle_state property of a ModelGroupVersionHistory. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + #: A constant which can be used with the lifecycle_state property of a ModelGroupVersionHistory. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + def __init__(self, **kwargs): + """ + Initializes a new ModelGroupVersionHistory 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 ModelGroupVersionHistory. + :type id: str + + :param compartment_id: + The value to assign to the compartment_id property of this ModelGroupVersionHistory. + :type compartment_id: str + + :param project_id: + The value to assign to the project_id property of this ModelGroupVersionHistory. + :type project_id: str + + :param display_name: + The value to assign to the display_name property of this ModelGroupVersionHistory. + :type display_name: str + + :param description: + The value to assign to the description property of this ModelGroupVersionHistory. + :type description: str + + :param latest_model_group_id: + The value to assign to the latest_model_group_id property of this ModelGroupVersionHistory. + :type latest_model_group_id: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this ModelGroupVersionHistory. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this ModelGroupVersionHistory. + :type defined_tags: dict(str, dict(str, object)) + + :param system_tags: + The value to assign to the system_tags property of this ModelGroupVersionHistory. + :type system_tags: dict(str, dict(str, object)) + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this ModelGroupVersionHistory. + Allowed values for this property are: "ACTIVE", "DELETED", "FAILED", "DELETING", '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 ModelGroupVersionHistory. + :type lifecycle_details: str + + :param time_created: + The value to assign to the time_created property of this ModelGroupVersionHistory. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this ModelGroupVersionHistory. + :type time_updated: datetime + + :param created_by: + The value to assign to the created_by property of this ModelGroupVersionHistory. + :type created_by: str + + """ + self.swagger_types = { + 'id': 'str', + 'compartment_id': 'str', + 'project_id': 'str', + 'display_name': 'str', + 'description': 'str', + 'latest_model_group_id': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))', + 'lifecycle_state': 'str', + 'lifecycle_details': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'created_by': 'str' + } + self.attribute_map = { + 'id': 'id', + 'compartment_id': 'compartmentId', + 'project_id': 'projectId', + 'display_name': 'displayName', + 'description': 'description', + 'latest_model_group_id': 'latestModelGroupId', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags', + 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'created_by': 'createdBy' + } + self._id = None + self._compartment_id = None + self._project_id = None + self._display_name = None + self._description = None + self._latest_model_group_id = None + self._freeform_tags = None + self._defined_tags = None + self._system_tags = None + self._lifecycle_state = None + self._lifecycle_details = None + self._time_created = None + self._time_updated = None + self._created_by = None + + @property + def id(self): + """ + **[Required]** Gets the id of this ModelGroupVersionHistory. + The `OCID`__ of the modelGroupVersionHistory. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The id of this ModelGroupVersionHistory. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this ModelGroupVersionHistory. + The `OCID`__ of the modelGroupVersionHistory. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param id: The id of this ModelGroupVersionHistory. + :type: str + """ + self._id = id + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this ModelGroupVersionHistory. + The `OCID`__ of the modelGroupVersionHistory's compartment. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The compartment_id of this ModelGroupVersionHistory. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this ModelGroupVersionHistory. + The `OCID`__ of the modelGroupVersionHistory's compartment. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param compartment_id: The compartment_id of this ModelGroupVersionHistory. + :type: str + """ + self._compartment_id = compartment_id + + @property + def project_id(self): + """ + **[Required]** Gets the project_id of this ModelGroupVersionHistory. + The `OCID`__ of the project associated with the modelGroupVersionHistory. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The project_id of this ModelGroupVersionHistory. + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """ + Sets the project_id of this ModelGroupVersionHistory. + The `OCID`__ of the project associated with the modelGroupVersionHistory. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param project_id: The project_id of this ModelGroupVersionHistory. + :type: str + """ + self._project_id = project_id + + @property + def display_name(self): + """ + **[Required]** Gets the display_name of this ModelGroupVersionHistory. + A user-friendly display name for the resource. It does not have to be unique and can be modified. Avoid entering confidential information. + + + :return: The display_name of this ModelGroupVersionHistory. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this ModelGroupVersionHistory. + A user-friendly display name for the resource. It does not have to be unique and can be modified. Avoid entering confidential information. + + + :param display_name: The display_name of this ModelGroupVersionHistory. + :type: str + """ + self._display_name = display_name + + @property + def description(self): + """ + Gets the description of this ModelGroupVersionHistory. + A short description of the modelGroupVersionHistory. + + + :return: The description of this ModelGroupVersionHistory. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this ModelGroupVersionHistory. + A short description of the modelGroupVersionHistory. + + + :param description: The description of this ModelGroupVersionHistory. + :type: str + """ + self._description = description + + @property + def latest_model_group_id(self): + """ + Gets the latest_model_group_id of this ModelGroupVersionHistory. + The `OCID`__ of the latest version of the model group associated. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The latest_model_group_id of this ModelGroupVersionHistory. + :rtype: str + """ + return self._latest_model_group_id + + @latest_model_group_id.setter + def latest_model_group_id(self, latest_model_group_id): + """ + Sets the latest_model_group_id of this ModelGroupVersionHistory. + The `OCID`__ of the latest version of the model group associated. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param latest_model_group_id: The latest_model_group_id of this ModelGroupVersionHistory. + :type: str + """ + self._latest_model_group_id = latest_model_group_id + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this ModelGroupVersionHistory. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. See `Resource Tags`__. + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this ModelGroupVersionHistory. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this ModelGroupVersionHistory. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. See `Resource Tags`__. + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this ModelGroupVersionHistory. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this ModelGroupVersionHistory. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this ModelGroupVersionHistory. + :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 ModelGroupVersionHistory. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this ModelGroupVersionHistory. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def system_tags(self): + """ + Gets the system_tags of this ModelGroupVersionHistory. + 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 ModelGroupVersionHistory. + :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 ModelGroupVersionHistory. + 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 ModelGroupVersionHistory. + :type: dict(str, dict(str, object)) + """ + self._system_tags = system_tags + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this ModelGroupVersionHistory. + The state of the modelGroupVersionHistory. + + Allowed values for this property are: "ACTIVE", "DELETED", "FAILED", "DELETING", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this ModelGroupVersionHistory. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this ModelGroupVersionHistory. + The state of the modelGroupVersionHistory. + + + :param lifecycle_state: The lifecycle_state of this ModelGroupVersionHistory. + :type: str + """ + allowed_values = ["ACTIVE", "DELETED", "FAILED", "DELETING"] + 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 ModelGroupVersionHistory. + Details about the lifecycle state of the model group version history. + + + :return: The lifecycle_details of this ModelGroupVersionHistory. + :rtype: str + """ + return self._lifecycle_details + + @lifecycle_details.setter + def lifecycle_details(self, lifecycle_details): + """ + Sets the lifecycle_details of this ModelGroupVersionHistory. + Details about the lifecycle state of the model group version history. + + + :param lifecycle_details: The lifecycle_details of this ModelGroupVersionHistory. + :type: str + """ + self._lifecycle_details = lifecycle_details + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this ModelGroupVersionHistory. + The date and time the resource was created in the timestamp format defined by `RFC3339`__. + Example: 2019-08-25T21:10:29.41Z + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_created of this ModelGroupVersionHistory. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this ModelGroupVersionHistory. + The date and time the resource was created in the timestamp format defined by `RFC3339`__. + Example: 2019-08-25T21:10:29.41Z + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_created: The time_created of this ModelGroupVersionHistory. + :type: datetime + """ + self._time_created = time_created + + @property + def time_updated(self): + """ + **[Required]** Gets the time_updated of this ModelGroupVersionHistory. + The date and time the resource was last updated in the timestamp format defined by `RFC3339`__. + Example: 2019-08-25T21:10:29.41Z + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_updated of this ModelGroupVersionHistory. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this ModelGroupVersionHistory. + The date and time the resource was last updated in the timestamp format defined by `RFC3339`__. + Example: 2019-08-25T21:10:29.41Z + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_updated: The time_updated of this ModelGroupVersionHistory. + :type: datetime + """ + self._time_updated = time_updated + + @property + def created_by(self): + """ + **[Required]** Gets the created_by of this ModelGroupVersionHistory. + The `OCID`__ of the user who created the modelGroupVersionHistory. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The created_by of this ModelGroupVersionHistory. + :rtype: str + """ + return self._created_by + + @created_by.setter + def created_by(self, created_by): + """ + Sets the created_by of this ModelGroupVersionHistory. + The `OCID`__ of the user who created the modelGroupVersionHistory. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param created_by: The created_by of this ModelGroupVersionHistory. + :type: str + """ + self._created_by = created_by + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_science/models/model_group_version_history_summary.py b/src/oci/data_science/models/model_group_version_history_summary.py new file mode 100644 index 0000000000..1e1c783bd0 --- /dev/null +++ b/src/oci/data_science/models/model_group_version_history_summary.py @@ -0,0 +1,512 @@ +# coding: utf-8 +# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20190101 + + +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 ModelGroupVersionHistorySummary(object): + """ + Summary information for a modelGroupVersionHistory. + """ + + #: A constant which can be used with the lifecycle_state property of a ModelGroupVersionHistorySummary. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a ModelGroupVersionHistorySummary. + #: This constant has a value of "DELETED" + LIFECYCLE_STATE_DELETED = "DELETED" + + #: A constant which can be used with the lifecycle_state property of a ModelGroupVersionHistorySummary. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + #: A constant which can be used with the lifecycle_state property of a ModelGroupVersionHistorySummary. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + def __init__(self, **kwargs): + """ + Initializes a new ModelGroupVersionHistorySummary 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 ModelGroupVersionHistorySummary. + :type id: str + + :param compartment_id: + The value to assign to the compartment_id property of this ModelGroupVersionHistorySummary. + :type compartment_id: str + + :param project_id: + The value to assign to the project_id property of this ModelGroupVersionHistorySummary. + :type project_id: str + + :param display_name: + The value to assign to the display_name property of this ModelGroupVersionHistorySummary. + :type display_name: str + + :param latest_model_group_id: + The value to assign to the latest_model_group_id property of this ModelGroupVersionHistorySummary. + :type latest_model_group_id: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this ModelGroupVersionHistorySummary. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this ModelGroupVersionHistorySummary. + :type defined_tags: dict(str, dict(str, object)) + + :param system_tags: + The value to assign to the system_tags property of this ModelGroupVersionHistorySummary. + :type system_tags: dict(str, dict(str, object)) + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this ModelGroupVersionHistorySummary. + Allowed values for this property are: "ACTIVE", "DELETED", "FAILED", "DELETING", '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 ModelGroupVersionHistorySummary. + :type lifecycle_details: str + + :param time_created: + The value to assign to the time_created property of this ModelGroupVersionHistorySummary. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this ModelGroupVersionHistorySummary. + :type time_updated: datetime + + :param created_by: + The value to assign to the created_by property of this ModelGroupVersionHistorySummary. + :type created_by: str + + """ + self.swagger_types = { + 'id': 'str', + 'compartment_id': 'str', + 'project_id': 'str', + 'display_name': 'str', + 'latest_model_group_id': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))', + 'lifecycle_state': 'str', + 'lifecycle_details': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'created_by': 'str' + } + self.attribute_map = { + 'id': 'id', + 'compartment_id': 'compartmentId', + 'project_id': 'projectId', + 'display_name': 'displayName', + 'latest_model_group_id': 'latestModelGroupId', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags', + 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'created_by': 'createdBy' + } + self._id = None + self._compartment_id = None + self._project_id = None + self._display_name = None + self._latest_model_group_id = None + self._freeform_tags = None + self._defined_tags = None + self._system_tags = None + self._lifecycle_state = None + self._lifecycle_details = None + self._time_created = None + self._time_updated = None + self._created_by = None + + @property + def id(self): + """ + **[Required]** Gets the id of this ModelGroupVersionHistorySummary. + The `OCID`__ of the modelGroupVersionHistory. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The id of this ModelGroupVersionHistorySummary. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this ModelGroupVersionHistorySummary. + The `OCID`__ of the modelGroupVersionHistory. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param id: The id of this ModelGroupVersionHistorySummary. + :type: str + """ + self._id = id + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this ModelGroupVersionHistorySummary. + The `OCID`__ of the modelGroupVersionHistory's compartment. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The compartment_id of this ModelGroupVersionHistorySummary. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this ModelGroupVersionHistorySummary. + The `OCID`__ of the modelGroupVersionHistory's compartment. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param compartment_id: The compartment_id of this ModelGroupVersionHistorySummary. + :type: str + """ + self._compartment_id = compartment_id + + @property + def project_id(self): + """ + **[Required]** Gets the project_id of this ModelGroupVersionHistorySummary. + The `OCID`__ of the project associated with the modelGroupVersionHistory. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The project_id of this ModelGroupVersionHistorySummary. + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """ + Sets the project_id of this ModelGroupVersionHistorySummary. + The `OCID`__ of the project associated with the modelGroupVersionHistory. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param project_id: The project_id of this ModelGroupVersionHistorySummary. + :type: str + """ + self._project_id = project_id + + @property + def display_name(self): + """ + **[Required]** Gets the display_name of this ModelGroupVersionHistorySummary. + A user-friendly display name for the resource. + + + :return: The display_name of this ModelGroupVersionHistorySummary. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this ModelGroupVersionHistorySummary. + A user-friendly display name for the resource. + + + :param display_name: The display_name of this ModelGroupVersionHistorySummary. + :type: str + """ + self._display_name = display_name + + @property + def latest_model_group_id(self): + """ + Gets the latest_model_group_id of this ModelGroupVersionHistorySummary. + The `OCID`__ of the latest version of the model group associated + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The latest_model_group_id of this ModelGroupVersionHistorySummary. + :rtype: str + """ + return self._latest_model_group_id + + @latest_model_group_id.setter + def latest_model_group_id(self, latest_model_group_id): + """ + Sets the latest_model_group_id of this ModelGroupVersionHistorySummary. + The `OCID`__ of the latest version of the model group associated + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param latest_model_group_id: The latest_model_group_id of this ModelGroupVersionHistorySummary. + :type: str + """ + self._latest_model_group_id = latest_model_group_id + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this ModelGroupVersionHistorySummary. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. See `Resource Tags`__. + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this ModelGroupVersionHistorySummary. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this ModelGroupVersionHistorySummary. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. See `Resource Tags`__. + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this ModelGroupVersionHistorySummary. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this ModelGroupVersionHistorySummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this ModelGroupVersionHistorySummary. + :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 ModelGroupVersionHistorySummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this ModelGroupVersionHistorySummary. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def system_tags(self): + """ + Gets the system_tags of this ModelGroupVersionHistorySummary. + 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 ModelGroupVersionHistorySummary. + :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 ModelGroupVersionHistorySummary. + 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 ModelGroupVersionHistorySummary. + :type: dict(str, dict(str, object)) + """ + self._system_tags = system_tags + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this ModelGroupVersionHistorySummary. + The state of the modelGroupVersionHistory. + + Allowed values for this property are: "ACTIVE", "DELETED", "FAILED", "DELETING", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this ModelGroupVersionHistorySummary. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this ModelGroupVersionHistorySummary. + The state of the modelGroupVersionHistory. + + + :param lifecycle_state: The lifecycle_state of this ModelGroupVersionHistorySummary. + :type: str + """ + allowed_values = ["ACTIVE", "DELETED", "FAILED", "DELETING"] + 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 ModelGroupVersionHistorySummary. + Details about the lifecycle state of the model group version history. + + + :return: The lifecycle_details of this ModelGroupVersionHistorySummary. + :rtype: str + """ + return self._lifecycle_details + + @lifecycle_details.setter + def lifecycle_details(self, lifecycle_details): + """ + Sets the lifecycle_details of this ModelGroupVersionHistorySummary. + Details about the lifecycle state of the model group version history. + + + :param lifecycle_details: The lifecycle_details of this ModelGroupVersionHistorySummary. + :type: str + """ + self._lifecycle_details = lifecycle_details + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this ModelGroupVersionHistorySummary. + The date and time the resource was created in the timestamp format defined by `RFC3339`__. + Example: 2019-08-25T21:10:29.41Z + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_created of this ModelGroupVersionHistorySummary. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this ModelGroupVersionHistorySummary. + The date and time the resource was created in the timestamp format defined by `RFC3339`__. + Example: 2019-08-25T21:10:29.41Z + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_created: The time_created of this ModelGroupVersionHistorySummary. + :type: datetime + """ + self._time_created = time_created + + @property + def time_updated(self): + """ + **[Required]** Gets the time_updated of this ModelGroupVersionHistorySummary. + The date and time the resource was last updated in the timestamp format defined by `RFC3339`__. + Example: 2019-08-25T21:10:29.41Z + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_updated of this ModelGroupVersionHistorySummary. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this ModelGroupVersionHistorySummary. + The date and time the resource was last updated in the timestamp format defined by `RFC3339`__. + Example: 2019-08-25T21:10:29.41Z + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_updated: The time_updated of this ModelGroupVersionHistorySummary. + :type: datetime + """ + self._time_updated = time_updated + + @property + def created_by(self): + """ + **[Required]** Gets the created_by of this ModelGroupVersionHistorySummary. + The `OCID`__ of the user who created the modelGroupVersionHistory. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The created_by of this ModelGroupVersionHistorySummary. + :rtype: str + """ + return self._created_by + + @created_by.setter + def created_by(self, created_by): + """ + Sets the created_by of this ModelGroupVersionHistorySummary. + The `OCID`__ of the user who created the modelGroupVersionHistory. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param created_by: The created_by of this ModelGroupVersionHistorySummary. + :type: str + """ + self._created_by = created_by + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_science/models/modify_model_group_details.py b/src/oci/data_science/models/modify_model_group_details.py new file mode 100644 index 0000000000..c75c22b486 --- /dev/null +++ b/src/oci/data_science/models/modify_model_group_details.py @@ -0,0 +1,270 @@ +# coding: utf-8 +# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20190101 + + +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 ModifyModelGroupDetails(object): + """ + Overwrites the properties of the source modelGroup. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ModifyModelGroupDetails 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 ModifyModelGroupDetails. + :type display_name: str + + :param description: + The value to assign to the description property of this ModifyModelGroupDetails. + :type description: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this ModifyModelGroupDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this ModifyModelGroupDetails. + :type defined_tags: dict(str, dict(str, object)) + + :param model_group_version_history_id: + The value to assign to the model_group_version_history_id property of this ModifyModelGroupDetails. + :type model_group_version_history_id: str + + :param version_label: + The value to assign to the version_label property of this ModifyModelGroupDetails. + :type version_label: str + + :param model_group_details: + The value to assign to the model_group_details property of this ModifyModelGroupDetails. + :type model_group_details: oci.data_science.models.ModelGroupDetails + + """ + self.swagger_types = { + 'display_name': 'str', + 'description': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'model_group_version_history_id': 'str', + 'version_label': 'str', + 'model_group_details': 'ModelGroupDetails' + } + self.attribute_map = { + 'display_name': 'displayName', + 'description': 'description', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'model_group_version_history_id': 'modelGroupVersionHistoryId', + 'version_label': 'versionLabel', + 'model_group_details': 'modelGroupDetails' + } + self._display_name = None + self._description = None + self._freeform_tags = None + self._defined_tags = None + self._model_group_version_history_id = None + self._version_label = None + self._model_group_details = None + + @property + def display_name(self): + """ + Gets the display_name of this ModifyModelGroupDetails. + A user-friendly display name for the resource. It does not have to be unique and can be modified. Avoid entering confidential information. + Example: `My ModelGroup` + + + :return: The display_name of this ModifyModelGroupDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this ModifyModelGroupDetails. + A user-friendly display name for the resource. It does not have to be unique and can be modified. Avoid entering confidential information. + Example: `My ModelGroup` + + + :param display_name: The display_name of this ModifyModelGroupDetails. + :type: str + """ + self._display_name = display_name + + @property + def description(self): + """ + Gets the description of this ModifyModelGroupDetails. + A short description of the modelGroup. + + + :return: The description of this ModifyModelGroupDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this ModifyModelGroupDetails. + A short description of the modelGroup. + + + :param description: The description of this ModifyModelGroupDetails. + :type: str + """ + self._description = description + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this ModifyModelGroupDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. See `Resource Tags`__. + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this ModifyModelGroupDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this ModifyModelGroupDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. See `Resource Tags`__. + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this ModifyModelGroupDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this ModifyModelGroupDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this ModifyModelGroupDetails. + :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 ModifyModelGroupDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this ModifyModelGroupDetails. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def model_group_version_history_id(self): + """ + Gets the model_group_version_history_id of this ModifyModelGroupDetails. + The `OCID`__ of the model group version history to which the modelGroup is associated. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The model_group_version_history_id of this ModifyModelGroupDetails. + :rtype: str + """ + return self._model_group_version_history_id + + @model_group_version_history_id.setter + def model_group_version_history_id(self, model_group_version_history_id): + """ + Sets the model_group_version_history_id of this ModifyModelGroupDetails. + The `OCID`__ of the model group version history to which the modelGroup is associated. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param model_group_version_history_id: The model_group_version_history_id of this ModifyModelGroupDetails. + :type: str + """ + self._model_group_version_history_id = model_group_version_history_id + + @property + def version_label(self): + """ + Gets the version_label of this ModifyModelGroupDetails. + An additional description of the lifecycle state of the model group. + + + :return: The version_label of this ModifyModelGroupDetails. + :rtype: str + """ + return self._version_label + + @version_label.setter + def version_label(self, version_label): + """ + Sets the version_label of this ModifyModelGroupDetails. + An additional description of the lifecycle state of the model group. + + + :param version_label: The version_label of this ModifyModelGroupDetails. + :type: str + """ + self._version_label = version_label + + @property + def model_group_details(self): + """ + Gets the model_group_details of this ModifyModelGroupDetails. + + :return: The model_group_details of this ModifyModelGroupDetails. + :rtype: oci.data_science.models.ModelGroupDetails + """ + return self._model_group_details + + @model_group_details.setter + def model_group_details(self, model_group_details): + """ + Sets the model_group_details of this ModifyModelGroupDetails. + + :param model_group_details: The model_group_details of this ModifyModelGroupDetails. + :type: oci.data_science.models.ModelGroupDetails + """ + self._model_group_details = model_group_details + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_science/models/notebook_session_shape_config_details.py b/src/oci/data_science/models/notebook_session_shape_config_details.py index b17b05d98f..9728fbd4f3 100644 --- a/src/oci/data_science/models/notebook_session_shape_config_details.py +++ b/src/oci/data_science/models/notebook_session_shape_config_details.py @@ -15,6 +15,18 @@ class NotebookSessionShapeConfigDetails(object): Details for the notebook session shape configuration. """ + #: A constant which can be used with the cpu_baseline property of a NotebookSessionShapeConfigDetails. + #: This constant has a value of "BASELINE_1_8" + CPU_BASELINE_BASELINE_1_8 = "BASELINE_1_8" + + #: A constant which can be used with the cpu_baseline property of a NotebookSessionShapeConfigDetails. + #: This constant has a value of "BASELINE_1_2" + CPU_BASELINE_BASELINE_1_2 = "BASELINE_1_2" + + #: A constant which can be used with the cpu_baseline property of a NotebookSessionShapeConfigDetails. + #: This constant has a value of "BASELINE_1_1" + CPU_BASELINE_BASELINE_1_1 = "BASELINE_1_1" + def __init__(self, **kwargs): """ Initializes a new NotebookSessionShapeConfigDetails object with values from keyword arguments. @@ -28,17 +40,26 @@ def __init__(self, **kwargs): The value to assign to the memory_in_gbs property of this NotebookSessionShapeConfigDetails. :type memory_in_gbs: float + :param cpu_baseline: + The value to assign to the cpu_baseline property of this NotebookSessionShapeConfigDetails. + Allowed values for this property are: "BASELINE_1_8", "BASELINE_1_2", "BASELINE_1_1", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type cpu_baseline: str + """ self.swagger_types = { 'ocpus': 'float', - 'memory_in_gbs': 'float' + 'memory_in_gbs': 'float', + 'cpu_baseline': 'str' } self.attribute_map = { 'ocpus': 'ocpus', - 'memory_in_gbs': 'memoryInGBs' + 'memory_in_gbs': 'memoryInGBs', + 'cpu_baseline': 'cpuBaseline' } self._ocpus = None self._memory_in_gbs = None + self._cpu_baseline = None @property def ocpus(self): @@ -88,6 +109,44 @@ def memory_in_gbs(self, memory_in_gbs): """ self._memory_in_gbs = memory_in_gbs + @property + def cpu_baseline(self): + """ + Gets the cpu_baseline of this NotebookSessionShapeConfigDetails. + The baseline OCPU utilization for a subcore burstable VM instance. If this attribute is left bank, it will default to `BASELINE_1_1`. + The following values are supported: + BASELINE_1_8 - baseline usage is 1/8 of an OCPU. + BASELINE_1_2 - baseline usage is 1/2 of an OCPU. + BASELINE_1_1 - baseline usage is an entire OCPU. This represents a non-burstable instance. + + Allowed values for this property are: "BASELINE_1_8", "BASELINE_1_2", "BASELINE_1_1", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The cpu_baseline of this NotebookSessionShapeConfigDetails. + :rtype: str + """ + return self._cpu_baseline + + @cpu_baseline.setter + def cpu_baseline(self, cpu_baseline): + """ + Sets the cpu_baseline of this NotebookSessionShapeConfigDetails. + The baseline OCPU utilization for a subcore burstable VM instance. If this attribute is left bank, it will default to `BASELINE_1_1`. + The following values are supported: + BASELINE_1_8 - baseline usage is 1/8 of an OCPU. + BASELINE_1_2 - baseline usage is 1/2 of an OCPU. + BASELINE_1_1 - baseline usage is an entire OCPU. This represents a non-burstable instance. + + + :param cpu_baseline: The cpu_baseline of this NotebookSessionShapeConfigDetails. + :type: str + """ + allowed_values = ["BASELINE_1_8", "BASELINE_1_2", "BASELINE_1_1"] + if not value_allowed_none_or_none_sentinel(cpu_baseline, allowed_values): + cpu_baseline = 'UNKNOWN_ENUM_VALUE' + self._cpu_baseline = cpu_baseline + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/data_science/models/patch_insert_new_member_models.py b/src/oci/data_science/models/patch_insert_new_member_models.py new file mode 100644 index 0000000000..8265574c86 --- /dev/null +++ b/src/oci/data_science/models/patch_insert_new_member_models.py @@ -0,0 +1,80 @@ +# coding: utf-8 +# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20190101 + +from .patch_instruction import PatchInstruction +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 PatchInsertNewMemberModels(PatchInstruction): + """ + This will specify the list of new models that are to be associated with the cloned model group. + """ + + def __init__(self, **kwargs): + """ + Initializes a new PatchInsertNewMemberModels object with values from keyword arguments. The default value of the :py:attr:`~oci.data_science.models.PatchInsertNewMemberModels.operation` attribute + of this class is ``INSERT`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param operation: + The value to assign to the operation property of this PatchInsertNewMemberModels. + Allowed values for this property are: "INSERT", "REMOVE" + :type operation: str + + :param values: + The value to assign to the values property of this PatchInsertNewMemberModels. + :type values: list[oci.data_science.models.MemberModelDetails] + + """ + self.swagger_types = { + 'operation': 'str', + 'values': 'list[MemberModelDetails]' + } + self.attribute_map = { + 'operation': 'operation', + 'values': 'values' + } + self._operation = None + self._values = None + self._operation = 'INSERT' + + @property + def values(self): + """ + **[Required]** Gets the values of this PatchInsertNewMemberModels. + Array of inference key and model OCID. + + + :return: The values of this PatchInsertNewMemberModels. + :rtype: list[oci.data_science.models.MemberModelDetails] + """ + return self._values + + @values.setter + def values(self, values): + """ + Sets the values of this PatchInsertNewMemberModels. + Array of inference key and model OCID. + + + :param values: The values of this PatchInsertNewMemberModels. + :type: list[oci.data_science.models.MemberModelDetails] + """ + self._values = values + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_science/models/patch_instruction.py b/src/oci/data_science/models/patch_instruction.py new file mode 100644 index 0000000000..a41aa6b7f6 --- /dev/null +++ b/src/oci/data_science/models/patch_instruction.py @@ -0,0 +1,107 @@ +# coding: utf-8 +# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20190101 + + +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 PatchInstruction(object): + """ + A single instruction to be included as part of Patch request content. + """ + + #: A constant which can be used with the operation property of a PatchInstruction. + #: This constant has a value of "INSERT" + OPERATION_INSERT = "INSERT" + + #: A constant which can be used with the operation property of a PatchInstruction. + #: This constant has a value of "REMOVE" + OPERATION_REMOVE = "REMOVE" + + def __init__(self, **kwargs): + """ + Initializes a new PatchInstruction 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.data_science.models.PatchRemoveMemberModels` + * :class:`~oci.data_science.models.PatchInsertNewMemberModels` + + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param operation: + The value to assign to the operation property of this PatchInstruction. + Allowed values for this property are: "INSERT", "REMOVE" + :type operation: str + + """ + self.swagger_types = { + 'operation': 'str' + } + self.attribute_map = { + 'operation': 'operation' + } + self._operation = 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['operation'] + + if type == 'REMOVE': + return 'PatchRemoveMemberModels' + + if type == 'INSERT': + return 'PatchInsertNewMemberModels' + else: + return 'PatchInstruction' + + @property + def operation(self): + """ + **[Required]** Gets the operation of this PatchInstruction. + A single instruction to be included as part of Patch request content. Enum type (INSERT and REMOVE). + + Allowed values for this property are: "INSERT", "REMOVE" + + + :return: The operation of this PatchInstruction. + :rtype: str + """ + return self._operation + + @operation.setter + def operation(self, operation): + """ + Sets the operation of this PatchInstruction. + A single instruction to be included as part of Patch request content. Enum type (INSERT and REMOVE). + + + :param operation: The operation of this PatchInstruction. + :type: str + """ + allowed_values = ["INSERT", "REMOVE"] + if not value_allowed_none_or_none_sentinel(operation, allowed_values): + raise ValueError( + f"Invalid value for `operation`, must be None or one of {allowed_values}" + ) + self._operation = operation + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_science/models/patch_model_group_member_model_details.py b/src/oci/data_science/models/patch_model_group_member_model_details.py new file mode 100644 index 0000000000..7e6665a031 --- /dev/null +++ b/src/oci/data_science/models/patch_model_group_member_model_details.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20190101 + + +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 PatchModelGroupMemberModelDetails(object): + """ + Specifies the list of new models to be added and list of models from source model group to be removed for cloning. + """ + + def __init__(self, **kwargs): + """ + Initializes a new PatchModelGroupMemberModelDetails 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 PatchModelGroupMemberModelDetails. + :type items: list[oci.data_science.models.PatchInstruction] + + """ + self.swagger_types = { + 'items': 'list[PatchInstruction]' + } + self.attribute_map = { + 'items': 'items' + } + self._items = None + + @property + def items(self): + """ + Gets the items of this PatchModelGroupMemberModelDetails. + Array of patch instructions. + + + :return: The items of this PatchModelGroupMemberModelDetails. + :rtype: list[oci.data_science.models.PatchInstruction] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this PatchModelGroupMemberModelDetails. + Array of patch instructions. + + + :param items: The items of this PatchModelGroupMemberModelDetails. + :type: list[oci.data_science.models.PatchInstruction] + """ + 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/data_science/models/patch_remove_member_models.py b/src/oci/data_science/models/patch_remove_member_models.py new file mode 100644 index 0000000000..a27829ce89 --- /dev/null +++ b/src/oci/data_science/models/patch_remove_member_models.py @@ -0,0 +1,80 @@ +# coding: utf-8 +# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20190101 + +from .patch_instruction import PatchInstruction +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 PatchRemoveMemberModels(PatchInstruction): + """ + This will specify the list of source model group models that are not to be associated with the cloned model group. + """ + + def __init__(self, **kwargs): + """ + Initializes a new PatchRemoveMemberModels object with values from keyword arguments. The default value of the :py:attr:`~oci.data_science.models.PatchRemoveMemberModels.operation` attribute + of this class is ``REMOVE`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param operation: + The value to assign to the operation property of this PatchRemoveMemberModels. + Allowed values for this property are: "INSERT", "REMOVE" + :type operation: str + + :param values: + The value to assign to the values property of this PatchRemoveMemberModels. + :type values: list[oci.data_science.models.MemberModelDetails] + + """ + self.swagger_types = { + 'operation': 'str', + 'values': 'list[MemberModelDetails]' + } + self.attribute_map = { + 'operation': 'operation', + 'values': 'values' + } + self._operation = None + self._values = None + self._operation = 'REMOVE' + + @property + def values(self): + """ + **[Required]** Gets the values of this PatchRemoveMemberModels. + Array of inference key and model OCID. + + + :return: The values of this PatchRemoveMemberModels. + :rtype: list[oci.data_science.models.MemberModelDetails] + """ + return self._values + + @values.setter + def values(self, values): + """ + Sets the values of this PatchRemoveMemberModels. + Array of inference key and model OCID. + + + :param values: The values of this PatchRemoveMemberModels. + :type: list[oci.data_science.models.MemberModelDetails] + """ + self._values = values + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_science/models/pipeline_shape_config_details.py b/src/oci/data_science/models/pipeline_shape_config_details.py index 6b013e1ec1..e82e130143 100644 --- a/src/oci/data_science/models/pipeline_shape_config_details.py +++ b/src/oci/data_science/models/pipeline_shape_config_details.py @@ -15,6 +15,18 @@ class PipelineShapeConfigDetails(object): Details for the pipeline step run shape configuration. Specify only when a flex shape is selected. """ + #: A constant which can be used with the cpu_baseline property of a PipelineShapeConfigDetails. + #: This constant has a value of "BASELINE_1_8" + CPU_BASELINE_BASELINE_1_8 = "BASELINE_1_8" + + #: A constant which can be used with the cpu_baseline property of a PipelineShapeConfigDetails. + #: This constant has a value of "BASELINE_1_2" + CPU_BASELINE_BASELINE_1_2 = "BASELINE_1_2" + + #: A constant which can be used with the cpu_baseline property of a PipelineShapeConfigDetails. + #: This constant has a value of "BASELINE_1_1" + CPU_BASELINE_BASELINE_1_1 = "BASELINE_1_1" + def __init__(self, **kwargs): """ Initializes a new PipelineShapeConfigDetails object with values from keyword arguments. @@ -28,17 +40,26 @@ def __init__(self, **kwargs): The value to assign to the memory_in_gbs property of this PipelineShapeConfigDetails. :type memory_in_gbs: float + :param cpu_baseline: + The value to assign to the cpu_baseline property of this PipelineShapeConfigDetails. + Allowed values for this property are: "BASELINE_1_8", "BASELINE_1_2", "BASELINE_1_1", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type cpu_baseline: str + """ self.swagger_types = { 'ocpus': 'float', - 'memory_in_gbs': 'float' + 'memory_in_gbs': 'float', + 'cpu_baseline': 'str' } self.attribute_map = { 'ocpus': 'ocpus', - 'memory_in_gbs': 'memoryInGBs' + 'memory_in_gbs': 'memoryInGBs', + 'cpu_baseline': 'cpuBaseline' } self._ocpus = None self._memory_in_gbs = None + self._cpu_baseline = None @property def ocpus(self): @@ -88,6 +109,44 @@ def memory_in_gbs(self, memory_in_gbs): """ self._memory_in_gbs = memory_in_gbs + @property + def cpu_baseline(self): + """ + Gets the cpu_baseline of this PipelineShapeConfigDetails. + The baseline OCPU utilization for a subcore burstable VM instance. If this attribute is left blank, it will default to `BASELINE_1_1`. + The following values are supported: + BASELINE_1_8 - baseline usage is 1/8 of an OCPU. + BASELINE_1_2 - baseline usage is 1/2 of an OCPU. + BASELINE_1_1 - baseline usage is an entire OCPU. This represents a non-burstable instance. + + Allowed values for this property are: "BASELINE_1_8", "BASELINE_1_2", "BASELINE_1_1", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The cpu_baseline of this PipelineShapeConfigDetails. + :rtype: str + """ + return self._cpu_baseline + + @cpu_baseline.setter + def cpu_baseline(self, cpu_baseline): + """ + Sets the cpu_baseline of this PipelineShapeConfigDetails. + The baseline OCPU utilization for a subcore burstable VM instance. If this attribute is left blank, it will default to `BASELINE_1_1`. + The following values are supported: + BASELINE_1_8 - baseline usage is 1/8 of an OCPU. + BASELINE_1_2 - baseline usage is 1/2 of an OCPU. + BASELINE_1_1 - baseline usage is an entire OCPU. This represents a non-burstable instance. + + + :param cpu_baseline: The cpu_baseline of this PipelineShapeConfigDetails. + :type: str + """ + allowed_values = ["BASELINE_1_8", "BASELINE_1_2", "BASELINE_1_1"] + if not value_allowed_none_or_none_sentinel(cpu_baseline, allowed_values): + cpu_baseline = 'UNKNOWN_ENUM_VALUE' + self._cpu_baseline = cpu_baseline + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/data_science/models/single_model_deployment_configuration_details.py b/src/oci/data_science/models/single_model_deployment_configuration_details.py index b7a8a6792e..68ab2a198c 100644 --- a/src/oci/data_science/models/single_model_deployment_configuration_details.py +++ b/src/oci/data_science/models/single_model_deployment_configuration_details.py @@ -23,7 +23,7 @@ def __init__(self, **kwargs): :param deployment_type: The value to assign to the deployment_type property of this SingleModelDeploymentConfigurationDetails. - Allowed values for this property are: "SINGLE_MODEL" + Allowed values for this property are: "SINGLE_MODEL", "MODEL_GROUP" :type deployment_type: str :param model_configuration_details: diff --git a/src/oci/data_science/models/stacked_model_group_details.py b/src/oci/data_science/models/stacked_model_group_details.py new file mode 100644 index 0000000000..31019a5f68 --- /dev/null +++ b/src/oci/data_science/models/stacked_model_group_details.py @@ -0,0 +1,91 @@ +# coding: utf-8 +# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20190101 + +from .model_group_details import ModelGroupDetails +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 StackedModelGroupDetails(ModelGroupDetails): + """ + Stacked model group type. + """ + + def __init__(self, **kwargs): + """ + Initializes a new StackedModelGroupDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.data_science.models.StackedModelGroupDetails.type` attribute + of this class is ``STACKED`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param type: + The value to assign to the type property of this StackedModelGroupDetails. + Allowed values for this property are: "HOMOGENEOUS", "HETEROGENEOUS", "STACKED" + :type type: str + + :param custom_metadata_list: + The value to assign to the custom_metadata_list property of this StackedModelGroupDetails. + :type custom_metadata_list: list[oci.data_science.models.CustomMetadata] + + :param base_model_id: + The value to assign to the base_model_id property of this StackedModelGroupDetails. + :type base_model_id: str + + """ + self.swagger_types = { + 'type': 'str', + 'custom_metadata_list': 'list[CustomMetadata]', + 'base_model_id': 'str' + } + self.attribute_map = { + 'type': 'type', + 'custom_metadata_list': 'customMetadataList', + 'base_model_id': 'baseModelId' + } + self._type = None + self._custom_metadata_list = None + self._base_model_id = None + self._type = 'STACKED' + + @property + def base_model_id(self): + """ + **[Required]** Gets the base_model_id of this StackedModelGroupDetails. + The `OCID`__ of the model in the group that represents the base model for stacked deployment. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The base_model_id of this StackedModelGroupDetails. + :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 StackedModelGroupDetails. + The `OCID`__ of the model in the group that represents the base model for stacked deployment. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param base_model_id: The base_model_id of this StackedModelGroupDetails. + :type: str + """ + self._base_model_id = base_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/data_science/models/update_infrastructure_configuration_details.py b/src/oci/data_science/models/update_infrastructure_configuration_details.py new file mode 100644 index 0000000000..9025c06e18 --- /dev/null +++ b/src/oci/data_science/models/update_infrastructure_configuration_details.py @@ -0,0 +1,99 @@ +# coding: utf-8 +# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20190101 + + +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 UpdateInfrastructureConfigurationDetails(object): + """ + The infrastructure configuration details for update. + """ + + #: A constant which can be used with the infrastructure_type property of a UpdateInfrastructureConfigurationDetails. + #: This constant has a value of "INSTANCE_POOL" + INFRASTRUCTURE_TYPE_INSTANCE_POOL = "INSTANCE_POOL" + + def __init__(self, **kwargs): + """ + Initializes a new UpdateInfrastructureConfigurationDetails 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.data_science.models.UpdateInstancePoolInfrastructureConfigurationDetails` + + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param infrastructure_type: + The value to assign to the infrastructure_type property of this UpdateInfrastructureConfigurationDetails. + Allowed values for this property are: "INSTANCE_POOL" + :type infrastructure_type: str + + """ + self.swagger_types = { + 'infrastructure_type': 'str' + } + self.attribute_map = { + 'infrastructure_type': 'infrastructureType' + } + self._infrastructure_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['infrastructureType'] + + if type == 'INSTANCE_POOL': + return 'UpdateInstancePoolInfrastructureConfigurationDetails' + else: + return 'UpdateInfrastructureConfigurationDetails' + + @property + def infrastructure_type(self): + """ + Gets the infrastructure_type of this UpdateInfrastructureConfigurationDetails. + The type of the model deployment infrastructure. + + Allowed values for this property are: "INSTANCE_POOL" + + + :return: The infrastructure_type of this UpdateInfrastructureConfigurationDetails. + :rtype: str + """ + return self._infrastructure_type + + @infrastructure_type.setter + def infrastructure_type(self, infrastructure_type): + """ + Sets the infrastructure_type of this UpdateInfrastructureConfigurationDetails. + The type of the model deployment infrastructure. + + + :param infrastructure_type: The infrastructure_type of this UpdateInfrastructureConfigurationDetails. + :type: str + """ + allowed_values = ["INSTANCE_POOL"] + if not value_allowed_none_or_none_sentinel(infrastructure_type, allowed_values): + raise ValueError( + f"Invalid value for `infrastructure_type`, must be None or one of {allowed_values}" + ) + self._infrastructure_type = infrastructure_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/data_science/models/update_instance_pool_infrastructure_configuration_details.py b/src/oci/data_science/models/update_instance_pool_infrastructure_configuration_details.py new file mode 100644 index 0000000000..863014d85c --- /dev/null +++ b/src/oci/data_science/models/update_instance_pool_infrastructure_configuration_details.py @@ -0,0 +1,165 @@ +# coding: utf-8 +# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20190101 + +from .update_infrastructure_configuration_details import UpdateInfrastructureConfigurationDetails +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 UpdateInstancePoolInfrastructureConfigurationDetails(UpdateInfrastructureConfigurationDetails): + """ + Instance Pool based Infrastructure configuration details for update. + """ + + def __init__(self, **kwargs): + """ + Initializes a new UpdateInstancePoolInfrastructureConfigurationDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.data_science.models.UpdateInstancePoolInfrastructureConfigurationDetails.infrastructure_type` attribute + of this class is ``INSTANCE_POOL`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param infrastructure_type: + The value to assign to the infrastructure_type property of this UpdateInstancePoolInfrastructureConfigurationDetails. + Allowed values for this property are: "INSTANCE_POOL" + :type infrastructure_type: str + + :param instance_configuration: + The value to assign to the instance_configuration property of this UpdateInstancePoolInfrastructureConfigurationDetails. + :type instance_configuration: oci.data_science.models.InstanceConfiguration + + :param scaling_policy: + The value to assign to the scaling_policy property of this UpdateInstancePoolInfrastructureConfigurationDetails. + :type scaling_policy: oci.data_science.models.ScalingPolicy + + :param bandwidth_mbps: + The value to assign to the bandwidth_mbps property of this UpdateInstancePoolInfrastructureConfigurationDetails. + :type bandwidth_mbps: int + + :param maximum_bandwidth_mbps: + The value to assign to the maximum_bandwidth_mbps property of this UpdateInstancePoolInfrastructureConfigurationDetails. + :type maximum_bandwidth_mbps: int + + """ + self.swagger_types = { + 'infrastructure_type': 'str', + 'instance_configuration': 'InstanceConfiguration', + 'scaling_policy': 'ScalingPolicy', + 'bandwidth_mbps': 'int', + 'maximum_bandwidth_mbps': 'int' + } + self.attribute_map = { + 'infrastructure_type': 'infrastructureType', + 'instance_configuration': 'instanceConfiguration', + 'scaling_policy': 'scalingPolicy', + 'bandwidth_mbps': 'bandwidthMbps', + 'maximum_bandwidth_mbps': 'maximumBandwidthMbps' + } + self._infrastructure_type = None + self._instance_configuration = None + self._scaling_policy = None + self._bandwidth_mbps = None + self._maximum_bandwidth_mbps = None + self._infrastructure_type = 'INSTANCE_POOL' + + @property + def instance_configuration(self): + """ + Gets the instance_configuration of this UpdateInstancePoolInfrastructureConfigurationDetails. + + :return: The instance_configuration of this UpdateInstancePoolInfrastructureConfigurationDetails. + :rtype: oci.data_science.models.InstanceConfiguration + """ + return self._instance_configuration + + @instance_configuration.setter + def instance_configuration(self, instance_configuration): + """ + Sets the instance_configuration of this UpdateInstancePoolInfrastructureConfigurationDetails. + + :param instance_configuration: The instance_configuration of this UpdateInstancePoolInfrastructureConfigurationDetails. + :type: oci.data_science.models.InstanceConfiguration + """ + self._instance_configuration = instance_configuration + + @property + def scaling_policy(self): + """ + Gets the scaling_policy of this UpdateInstancePoolInfrastructureConfigurationDetails. + + :return: The scaling_policy of this UpdateInstancePoolInfrastructureConfigurationDetails. + :rtype: oci.data_science.models.ScalingPolicy + """ + return self._scaling_policy + + @scaling_policy.setter + def scaling_policy(self, scaling_policy): + """ + Sets the scaling_policy of this UpdateInstancePoolInfrastructureConfigurationDetails. + + :param scaling_policy: The scaling_policy of this UpdateInstancePoolInfrastructureConfigurationDetails. + :type: oci.data_science.models.ScalingPolicy + """ + self._scaling_policy = scaling_policy + + @property + def bandwidth_mbps(self): + """ + Gets the bandwidth_mbps of this UpdateInstancePoolInfrastructureConfigurationDetails. + The minimum network bandwidth for the model deployment. + + + :return: The bandwidth_mbps of this UpdateInstancePoolInfrastructureConfigurationDetails. + :rtype: int + """ + return self._bandwidth_mbps + + @bandwidth_mbps.setter + def bandwidth_mbps(self, bandwidth_mbps): + """ + Sets the bandwidth_mbps of this UpdateInstancePoolInfrastructureConfigurationDetails. + The minimum network bandwidth for the model deployment. + + + :param bandwidth_mbps: The bandwidth_mbps of this UpdateInstancePoolInfrastructureConfigurationDetails. + :type: int + """ + self._bandwidth_mbps = bandwidth_mbps + + @property + def maximum_bandwidth_mbps(self): + """ + Gets the maximum_bandwidth_mbps of this UpdateInstancePoolInfrastructureConfigurationDetails. + The maximum network bandwidth for the model deployment. + + + :return: The maximum_bandwidth_mbps of this UpdateInstancePoolInfrastructureConfigurationDetails. + :rtype: int + """ + return self._maximum_bandwidth_mbps + + @maximum_bandwidth_mbps.setter + def maximum_bandwidth_mbps(self, maximum_bandwidth_mbps): + """ + Sets the maximum_bandwidth_mbps of this UpdateInstancePoolInfrastructureConfigurationDetails. + The maximum network bandwidth for the model deployment. + + + :param maximum_bandwidth_mbps: The maximum_bandwidth_mbps of this UpdateInstancePoolInfrastructureConfigurationDetails. + :type: int + """ + self._maximum_bandwidth_mbps = maximum_bandwidth_mbps + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_science/models/update_model_deployment_configuration_details.py b/src/oci/data_science/models/update_model_deployment_configuration_details.py index f6233482e4..dcc8bc4b04 100644 --- a/src/oci/data_science/models/update_model_deployment_configuration_details.py +++ b/src/oci/data_science/models/update_model_deployment_configuration_details.py @@ -19,18 +19,23 @@ class UpdateModelDeploymentConfigurationDetails(object): #: This constant has a value of "SINGLE_MODEL" DEPLOYMENT_TYPE_SINGLE_MODEL = "SINGLE_MODEL" + #: A constant which can be used with the deployment_type property of a UpdateModelDeploymentConfigurationDetails. + #: This constant has a value of "MODEL_GROUP" + DEPLOYMENT_TYPE_MODEL_GROUP = "MODEL_GROUP" + def __init__(self, **kwargs): """ Initializes a new UpdateModelDeploymentConfigurationDetails 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.data_science.models.UpdateModelGroupDeploymentConfigurationDetails` * :class:`~oci.data_science.models.UpdateSingleModelDeploymentConfigurationDetails` The following keyword arguments are supported (corresponding to the getters/setters of this class): :param deployment_type: The value to assign to the deployment_type property of this UpdateModelDeploymentConfigurationDetails. - Allowed values for this property are: "SINGLE_MODEL" + Allowed values for this property are: "SINGLE_MODEL", "MODEL_GROUP" :type deployment_type: str """ @@ -50,6 +55,9 @@ def get_subtype(object_dictionary): """ type = object_dictionary['deploymentType'] + if type == 'MODEL_GROUP': + return 'UpdateModelGroupDeploymentConfigurationDetails' + if type == 'SINGLE_MODEL': return 'UpdateSingleModelDeploymentConfigurationDetails' else: @@ -61,7 +69,7 @@ def deployment_type(self): Gets the deployment_type of this UpdateModelDeploymentConfigurationDetails. The type of the model deployment. - Allowed values for this property are: "SINGLE_MODEL" + Allowed values for this property are: "SINGLE_MODEL", "MODEL_GROUP" :return: The deployment_type of this UpdateModelDeploymentConfigurationDetails. @@ -79,7 +87,7 @@ def deployment_type(self, deployment_type): :param deployment_type: The deployment_type of this UpdateModelDeploymentConfigurationDetails. :type: str """ - allowed_values = ["SINGLE_MODEL"] + allowed_values = ["SINGLE_MODEL", "MODEL_GROUP"] if not value_allowed_none_or_none_sentinel(deployment_type, allowed_values): raise ValueError( f"Invalid value for `deployment_type`, must be None or one of {allowed_values}" diff --git a/src/oci/data_science/models/update_model_group_configuration_details.py b/src/oci/data_science/models/update_model_group_configuration_details.py new file mode 100644 index 0000000000..5d6d9ec150 --- /dev/null +++ b/src/oci/data_science/models/update_model_group_configuration_details.py @@ -0,0 +1,74 @@ +# coding: utf-8 +# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20190101 + + +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 UpdateModelGroupConfigurationDetails(object): + """ + The model group configuration details for update. + """ + + def __init__(self, **kwargs): + """ + Initializes a new UpdateModelGroupConfigurationDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param model_group_id: + The value to assign to the model_group_id property of this UpdateModelGroupConfigurationDetails. + :type model_group_id: str + + """ + self.swagger_types = { + 'model_group_id': 'str' + } + self.attribute_map = { + 'model_group_id': 'modelGroupId' + } + self._model_group_id = None + + @property + def model_group_id(self): + """ + **[Required]** Gets the model_group_id of this UpdateModelGroupConfigurationDetails. + The `OCID`__ of the model group you want to deploy. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The model_group_id of this UpdateModelGroupConfigurationDetails. + :rtype: str + """ + return self._model_group_id + + @model_group_id.setter + def model_group_id(self, model_group_id): + """ + Sets the model_group_id of this UpdateModelGroupConfigurationDetails. + The `OCID`__ of the model group you want to deploy. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param model_group_id: The model_group_id of this UpdateModelGroupConfigurationDetails. + :type: str + """ + self._model_group_id = model_group_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/data_science/models/update_model_group_deployment_configuration_details.py b/src/oci/data_science/models/update_model_group_deployment_configuration_details.py new file mode 100644 index 0000000000..b39b2b6ab9 --- /dev/null +++ b/src/oci/data_science/models/update_model_group_deployment_configuration_details.py @@ -0,0 +1,177 @@ +# coding: utf-8 +# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20190101 + +from .update_model_deployment_configuration_details import UpdateModelDeploymentConfigurationDetails +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 UpdateModelGroupDeploymentConfigurationDetails(UpdateModelDeploymentConfigurationDetails): + """ + The model group type deployment for update. + """ + + #: A constant which can be used with the update_type property of a UpdateModelGroupDeploymentConfigurationDetails. + #: This constant has a value of "ZDT" + UPDATE_TYPE_ZDT = "ZDT" + + #: A constant which can be used with the update_type property of a UpdateModelGroupDeploymentConfigurationDetails. + #: This constant has a value of "LIVE" + UPDATE_TYPE_LIVE = "LIVE" + + def __init__(self, **kwargs): + """ + Initializes a new UpdateModelGroupDeploymentConfigurationDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.data_science.models.UpdateModelGroupDeploymentConfigurationDetails.deployment_type` attribute + of this class is ``MODEL_GROUP`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param deployment_type: + The value to assign to the deployment_type property of this UpdateModelGroupDeploymentConfigurationDetails. + Allowed values for this property are: "SINGLE_MODEL", "MODEL_GROUP" + :type deployment_type: str + + :param update_type: + The value to assign to the update_type property of this UpdateModelGroupDeploymentConfigurationDetails. + Allowed values for this property are: "ZDT", "LIVE" + :type update_type: str + + :param model_group_configuration_details: + The value to assign to the model_group_configuration_details property of this UpdateModelGroupDeploymentConfigurationDetails. + :type model_group_configuration_details: oci.data_science.models.UpdateModelGroupConfigurationDetails + + :param infrastructure_configuration_details: + The value to assign to the infrastructure_configuration_details property of this UpdateModelGroupDeploymentConfigurationDetails. + :type infrastructure_configuration_details: oci.data_science.models.UpdateInfrastructureConfigurationDetails + + :param environment_configuration_details: + The value to assign to the environment_configuration_details property of this UpdateModelGroupDeploymentConfigurationDetails. + :type environment_configuration_details: oci.data_science.models.UpdateModelDeploymentEnvironmentConfigurationDetails + + """ + self.swagger_types = { + 'deployment_type': 'str', + 'update_type': 'str', + 'model_group_configuration_details': 'UpdateModelGroupConfigurationDetails', + 'infrastructure_configuration_details': 'UpdateInfrastructureConfigurationDetails', + 'environment_configuration_details': 'UpdateModelDeploymentEnvironmentConfigurationDetails' + } + self.attribute_map = { + 'deployment_type': 'deploymentType', + 'update_type': 'updateType', + 'model_group_configuration_details': 'modelGroupConfigurationDetails', + 'infrastructure_configuration_details': 'infrastructureConfigurationDetails', + 'environment_configuration_details': 'environmentConfigurationDetails' + } + self._deployment_type = None + self._update_type = None + self._model_group_configuration_details = None + self._infrastructure_configuration_details = None + self._environment_configuration_details = None + self._deployment_type = 'MODEL_GROUP' + + @property + def update_type(self): + """ + Gets the update_type of this UpdateModelGroupDeploymentConfigurationDetails. + The type of update operation. + + Allowed values for this property are: "ZDT", "LIVE" + + + :return: The update_type of this UpdateModelGroupDeploymentConfigurationDetails. + :rtype: str + """ + return self._update_type + + @update_type.setter + def update_type(self, update_type): + """ + Sets the update_type of this UpdateModelGroupDeploymentConfigurationDetails. + The type of update operation. + + + :param update_type: The update_type of this UpdateModelGroupDeploymentConfigurationDetails. + :type: str + """ + allowed_values = ["ZDT", "LIVE"] + if not value_allowed_none_or_none_sentinel(update_type, allowed_values): + raise ValueError( + f"Invalid value for `update_type`, must be None or one of {allowed_values}" + ) + self._update_type = update_type + + @property + def model_group_configuration_details(self): + """ + Gets the model_group_configuration_details of this UpdateModelGroupDeploymentConfigurationDetails. + + :return: The model_group_configuration_details of this UpdateModelGroupDeploymentConfigurationDetails. + :rtype: oci.data_science.models.UpdateModelGroupConfigurationDetails + """ + return self._model_group_configuration_details + + @model_group_configuration_details.setter + def model_group_configuration_details(self, model_group_configuration_details): + """ + Sets the model_group_configuration_details of this UpdateModelGroupDeploymentConfigurationDetails. + + :param model_group_configuration_details: The model_group_configuration_details of this UpdateModelGroupDeploymentConfigurationDetails. + :type: oci.data_science.models.UpdateModelGroupConfigurationDetails + """ + self._model_group_configuration_details = model_group_configuration_details + + @property + def infrastructure_configuration_details(self): + """ + Gets the infrastructure_configuration_details of this UpdateModelGroupDeploymentConfigurationDetails. + + :return: The infrastructure_configuration_details of this UpdateModelGroupDeploymentConfigurationDetails. + :rtype: oci.data_science.models.UpdateInfrastructureConfigurationDetails + """ + return self._infrastructure_configuration_details + + @infrastructure_configuration_details.setter + def infrastructure_configuration_details(self, infrastructure_configuration_details): + """ + Sets the infrastructure_configuration_details of this UpdateModelGroupDeploymentConfigurationDetails. + + :param infrastructure_configuration_details: The infrastructure_configuration_details of this UpdateModelGroupDeploymentConfigurationDetails. + :type: oci.data_science.models.UpdateInfrastructureConfigurationDetails + """ + self._infrastructure_configuration_details = infrastructure_configuration_details + + @property + def environment_configuration_details(self): + """ + Gets the environment_configuration_details of this UpdateModelGroupDeploymentConfigurationDetails. + + :return: The environment_configuration_details of this UpdateModelGroupDeploymentConfigurationDetails. + :rtype: oci.data_science.models.UpdateModelDeploymentEnvironmentConfigurationDetails + """ + return self._environment_configuration_details + + @environment_configuration_details.setter + def environment_configuration_details(self, environment_configuration_details): + """ + Sets the environment_configuration_details of this UpdateModelGroupDeploymentConfigurationDetails. + + :param environment_configuration_details: The environment_configuration_details of this UpdateModelGroupDeploymentConfigurationDetails. + :type: oci.data_science.models.UpdateModelDeploymentEnvironmentConfigurationDetails + """ + self._environment_configuration_details = environment_configuration_details + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_science/models/update_model_group_details.py b/src/oci/data_science/models/update_model_group_details.py new file mode 100644 index 0000000000..a1044f2c5d --- /dev/null +++ b/src/oci/data_science/models/update_model_group_details.py @@ -0,0 +1,243 @@ +# coding: utf-8 +# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20190101 + + +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 UpdateModelGroupDetails(object): + """ + Details for updating a modelGroup. + """ + + def __init__(self, **kwargs): + """ + Initializes a new UpdateModelGroupDetails 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 UpdateModelGroupDetails. + :type display_name: str + + :param description: + The value to assign to the description property of this UpdateModelGroupDetails. + :type description: str + + :param version_label: + The value to assign to the version_label property of this UpdateModelGroupDetails. + :type version_label: str + + :param model_group_version_history_id: + The value to assign to the model_group_version_history_id property of this UpdateModelGroupDetails. + :type model_group_version_history_id: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this UpdateModelGroupDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this UpdateModelGroupDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'display_name': 'str', + 'description': 'str', + 'version_label': 'str', + 'model_group_version_history_id': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + self.attribute_map = { + 'display_name': 'displayName', + 'description': 'description', + 'version_label': 'versionLabel', + 'model_group_version_history_id': 'modelGroupVersionHistoryId', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + self._display_name = None + self._description = None + self._version_label = None + self._model_group_version_history_id = None + self._freeform_tags = None + self._defined_tags = None + + @property + def display_name(self): + """ + Gets the display_name of this UpdateModelGroupDetails. + A user-friendly display name for the resource. It does not have to be unique and can be modified. Avoid entering confidential information. + Example: `My ModelGroup` + + + :return: The display_name of this UpdateModelGroupDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this UpdateModelGroupDetails. + A user-friendly display name for the resource. It does not have to be unique and can be modified. Avoid entering confidential information. + Example: `My ModelGroup` + + + :param display_name: The display_name of this UpdateModelGroupDetails. + :type: str + """ + self._display_name = display_name + + @property + def description(self): + """ + Gets the description of this UpdateModelGroupDetails. + A short description of the modelGroup. + + + :return: The description of this UpdateModelGroupDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this UpdateModelGroupDetails. + A short description of the modelGroup. + + + :param description: The description of this UpdateModelGroupDetails. + :type: str + """ + self._description = description + + @property + def version_label(self): + """ + Gets the version_label of this UpdateModelGroupDetails. + An additional description of the lifecycle state of the model group. + + + :return: The version_label of this UpdateModelGroupDetails. + :rtype: str + """ + return self._version_label + + @version_label.setter + def version_label(self, version_label): + """ + Sets the version_label of this UpdateModelGroupDetails. + An additional description of the lifecycle state of the model group. + + + :param version_label: The version_label of this UpdateModelGroupDetails. + :type: str + """ + self._version_label = version_label + + @property + def model_group_version_history_id(self): + """ + Gets the model_group_version_history_id of this UpdateModelGroupDetails. + The `OCID`__ of the model group version history to which the modelGroup will be associated. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The model_group_version_history_id of this UpdateModelGroupDetails. + :rtype: str + """ + return self._model_group_version_history_id + + @model_group_version_history_id.setter + def model_group_version_history_id(self, model_group_version_history_id): + """ + Sets the model_group_version_history_id of this UpdateModelGroupDetails. + The `OCID`__ of the model group version history to which the modelGroup will be associated. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param model_group_version_history_id: The model_group_version_history_id of this UpdateModelGroupDetails. + :type: str + """ + self._model_group_version_history_id = model_group_version_history_id + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this UpdateModelGroupDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. See `Resource Tags`__. + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this UpdateModelGroupDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this UpdateModelGroupDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. See `Resource Tags`__. + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this UpdateModelGroupDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this UpdateModelGroupDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this UpdateModelGroupDetails. + :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 UpdateModelGroupDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this UpdateModelGroupDetails. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_science/models/update_model_group_version_history_details.py b/src/oci/data_science/models/update_model_group_version_history_details.py new file mode 100644 index 0000000000..e0fd998777 --- /dev/null +++ b/src/oci/data_science/models/update_model_group_version_history_details.py @@ -0,0 +1,206 @@ +# coding: utf-8 +# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20190101 + + +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 UpdateModelGroupVersionHistoryDetails(object): + """ + Details for updating a model group version history. + """ + + def __init__(self, **kwargs): + """ + Initializes a new UpdateModelGroupVersionHistoryDetails 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 UpdateModelGroupVersionHistoryDetails. + :type display_name: str + + :param description: + The value to assign to the description property of this UpdateModelGroupVersionHistoryDetails. + :type description: str + + :param latest_model_group_id: + The value to assign to the latest_model_group_id property of this UpdateModelGroupVersionHistoryDetails. + :type latest_model_group_id: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this UpdateModelGroupVersionHistoryDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this UpdateModelGroupVersionHistoryDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'display_name': 'str', + 'description': 'str', + 'latest_model_group_id': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + self.attribute_map = { + 'display_name': 'displayName', + 'description': 'description', + 'latest_model_group_id': 'latestModelGroupId', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + self._display_name = None + self._description = None + self._latest_model_group_id = None + self._freeform_tags = None + self._defined_tags = None + + @property + def display_name(self): + """ + Gets the display_name of this UpdateModelGroupVersionHistoryDetails. + A user-friendly display name for the resource. + + + :return: The display_name of this UpdateModelGroupVersionHistoryDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this UpdateModelGroupVersionHistoryDetails. + A user-friendly display name for the resource. + + + :param display_name: The display_name of this UpdateModelGroupVersionHistoryDetails. + :type: str + """ + self._display_name = display_name + + @property + def description(self): + """ + Gets the description of this UpdateModelGroupVersionHistoryDetails. + A short description of the model group version history. + + + :return: The description of this UpdateModelGroupVersionHistoryDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this UpdateModelGroupVersionHistoryDetails. + A short description of the model group version history. + + + :param description: The description of this UpdateModelGroupVersionHistoryDetails. + :type: str + """ + self._description = description + + @property + def latest_model_group_id(self): + """ + Gets the latest_model_group_id of this UpdateModelGroupVersionHistoryDetails. + The OCID of the latest version of the model group associated. + + + :return: The latest_model_group_id of this UpdateModelGroupVersionHistoryDetails. + :rtype: str + """ + return self._latest_model_group_id + + @latest_model_group_id.setter + def latest_model_group_id(self, latest_model_group_id): + """ + Sets the latest_model_group_id of this UpdateModelGroupVersionHistoryDetails. + The OCID of the latest version of the model group associated. + + + :param latest_model_group_id: The latest_model_group_id of this UpdateModelGroupVersionHistoryDetails. + :type: str + """ + self._latest_model_group_id = latest_model_group_id + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this UpdateModelGroupVersionHistoryDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. See `Resource Tags`__. + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this UpdateModelGroupVersionHistoryDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this UpdateModelGroupVersionHistoryDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. See `Resource Tags`__. + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this UpdateModelGroupVersionHistoryDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this UpdateModelGroupVersionHistoryDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this UpdateModelGroupVersionHistoryDetails. + :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 UpdateModelGroupVersionHistoryDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. See `Resource Tags`__. + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this UpdateModelGroupVersionHistoryDetails. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_science/models/update_single_model_deployment_configuration_details.py b/src/oci/data_science/models/update_single_model_deployment_configuration_details.py index 125e214113..b95ef4bc1f 100644 --- a/src/oci/data_science/models/update_single_model_deployment_configuration_details.py +++ b/src/oci/data_science/models/update_single_model_deployment_configuration_details.py @@ -23,7 +23,7 @@ def __init__(self, **kwargs): :param deployment_type: The value to assign to the deployment_type property of this UpdateSingleModelDeploymentConfigurationDetails. - Allowed values for this property are: "SINGLE_MODEL" + Allowed values for this property are: "SINGLE_MODEL", "MODEL_GROUP" :type deployment_type: str :param model_configuration_details: diff --git a/src/oci/data_science/models/work_request.py b/src/oci/data_science/models/work_request.py index 168bab8371..d921f7ec1b 100644 --- a/src/oci/data_science/models/work_request.py +++ b/src/oci/data_science/models/work_request.py @@ -199,6 +199,22 @@ class WorkRequest(object): #: This constant has a value of "RESTORE_ARCHIVED_MODEL" OPERATION_TYPE_RESTORE_ARCHIVED_MODEL = "RESTORE_ARCHIVED_MODEL" + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "MODEL_GROUP_CREATE" + OPERATION_TYPE_MODEL_GROUP_CREATE = "MODEL_GROUP_CREATE" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "MODEL_GROUP_UPDATE" + OPERATION_TYPE_MODEL_GROUP_UPDATE = "MODEL_GROUP_UPDATE" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "MODEL_GROUP_DELETE" + OPERATION_TYPE_MODEL_GROUP_DELETE = "MODEL_GROUP_DELETE" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "MODEL_GROUP_VERSION_HISTORY_DELETE" + OPERATION_TYPE_MODEL_GROUP_VERSION_HISTORY_DELETE = "MODEL_GROUP_VERSION_HISTORY_DELETE" + #: A constant which can be used with the status property of a WorkRequest. #: This constant has a value of "ACCEPTED" STATUS_ACCEPTED = "ACCEPTED" @@ -234,7 +250,7 @@ def __init__(self, **kwargs): :param operation_type: The value to assign to the operation_type property of this WorkRequest. - Allowed values for this property are: "NOTEBOOK_SESSION_CREATE", "NOTEBOOK_SESSION_DELETE", "NOTEBOOK_SESSION_ACTIVATE", "NOTEBOOK_SESSION_DEACTIVATE", "MODELVERSIONSET_DELETE", "EXPORT_MODEL_ARTIFACT", "IMPORT_MODEL_ARTIFACT", "MODEL_DEPLOYMENT_CREATE", "MODEL_DEPLOYMENT_DELETE", "MODEL_DEPLOYMENT_ACTIVATE", "MODEL_DEPLOYMENT_DEACTIVATE", "MODEL_DEPLOYMENT_UPDATE", "PROJECT_DELETE", "WORKREQUEST_CANCEL", "JOB_DELETE", "PIPELINE_CREATE", "PIPELINE_DELETE", "PIPELINE_RUN_CREATE", "PIPELINE_RUN_CANCEL", "PIPELINE_RUN_DELETE", "ML_APPLICATION_PACKAGE_UPLOAD", "ML_APPLICATION_TRIGGER_START", "ML_APPLICATION_IMPLEMENTATION_DELETE", "ML_APPLICATION_IMPLEMENTATION_UPDATE", "ML_APPLICATION_IMPLEMENTATION_MOVE", "ML_APPLICATION_INSTANCE_CREATE", "ML_APPLICATION_INSTANCE_UPDATE", "ML_APPLICATION_INSTANCE_DELETE", "ML_APPLICATION_INSTANCE_MOVE", "ML_APPLICATION_INSTANCE_VIEW_CREATE", "ML_APPLICATION_INSTANCE_VIEW_UPDATE", "ML_APPLICATION_INSTANCE_VIEW_DELETE", "ML_APPLICATION_INSTANCE_VIEW_UPGRADE", "ML_APPLICATION_INSTANCE_VIEW_MOVE", "PRIVATE_ENDPOINT_CREATE", "PRIVATE_ENDPOINT_DELETE", "PRIVATE_ENDPOINT_MOVE", "PRIVATE_ENDPOINT_UPDATE", "SCHEDULE_CREATE", "SCHEDULE_UPDATE", "SCHEDULE_DELETE", "SCHEDULE_MOVE", "SCHEDULE_ACTIVATE", "SCHEDULE_DEACTIVATE", "REGISTER_MODEL_ARTIFACT", "RESTORE_ARCHIVED_MODEL", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "NOTEBOOK_SESSION_CREATE", "NOTEBOOK_SESSION_DELETE", "NOTEBOOK_SESSION_ACTIVATE", "NOTEBOOK_SESSION_DEACTIVATE", "MODELVERSIONSET_DELETE", "EXPORT_MODEL_ARTIFACT", "IMPORT_MODEL_ARTIFACT", "MODEL_DEPLOYMENT_CREATE", "MODEL_DEPLOYMENT_DELETE", "MODEL_DEPLOYMENT_ACTIVATE", "MODEL_DEPLOYMENT_DEACTIVATE", "MODEL_DEPLOYMENT_UPDATE", "PROJECT_DELETE", "WORKREQUEST_CANCEL", "JOB_DELETE", "PIPELINE_CREATE", "PIPELINE_DELETE", "PIPELINE_RUN_CREATE", "PIPELINE_RUN_CANCEL", "PIPELINE_RUN_DELETE", "ML_APPLICATION_PACKAGE_UPLOAD", "ML_APPLICATION_TRIGGER_START", "ML_APPLICATION_IMPLEMENTATION_DELETE", "ML_APPLICATION_IMPLEMENTATION_UPDATE", "ML_APPLICATION_IMPLEMENTATION_MOVE", "ML_APPLICATION_INSTANCE_CREATE", "ML_APPLICATION_INSTANCE_UPDATE", "ML_APPLICATION_INSTANCE_DELETE", "ML_APPLICATION_INSTANCE_MOVE", "ML_APPLICATION_INSTANCE_VIEW_CREATE", "ML_APPLICATION_INSTANCE_VIEW_UPDATE", "ML_APPLICATION_INSTANCE_VIEW_DELETE", "ML_APPLICATION_INSTANCE_VIEW_UPGRADE", "ML_APPLICATION_INSTANCE_VIEW_MOVE", "PRIVATE_ENDPOINT_CREATE", "PRIVATE_ENDPOINT_DELETE", "PRIVATE_ENDPOINT_MOVE", "PRIVATE_ENDPOINT_UPDATE", "SCHEDULE_CREATE", "SCHEDULE_UPDATE", "SCHEDULE_DELETE", "SCHEDULE_MOVE", "SCHEDULE_ACTIVATE", "SCHEDULE_DEACTIVATE", "REGISTER_MODEL_ARTIFACT", "RESTORE_ARCHIVED_MODEL", "MODEL_GROUP_CREATE", "MODEL_GROUP_UPDATE", "MODEL_GROUP_DELETE", "MODEL_GROUP_VERSION_HISTORY_DELETE", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type operation_type: str @@ -335,7 +351,7 @@ def operation_type(self): **[Required]** Gets the operation_type of this WorkRequest. The type of work the work request is doing. - Allowed values for this property are: "NOTEBOOK_SESSION_CREATE", "NOTEBOOK_SESSION_DELETE", "NOTEBOOK_SESSION_ACTIVATE", "NOTEBOOK_SESSION_DEACTIVATE", "MODELVERSIONSET_DELETE", "EXPORT_MODEL_ARTIFACT", "IMPORT_MODEL_ARTIFACT", "MODEL_DEPLOYMENT_CREATE", "MODEL_DEPLOYMENT_DELETE", "MODEL_DEPLOYMENT_ACTIVATE", "MODEL_DEPLOYMENT_DEACTIVATE", "MODEL_DEPLOYMENT_UPDATE", "PROJECT_DELETE", "WORKREQUEST_CANCEL", "JOB_DELETE", "PIPELINE_CREATE", "PIPELINE_DELETE", "PIPELINE_RUN_CREATE", "PIPELINE_RUN_CANCEL", "PIPELINE_RUN_DELETE", "ML_APPLICATION_PACKAGE_UPLOAD", "ML_APPLICATION_TRIGGER_START", "ML_APPLICATION_IMPLEMENTATION_DELETE", "ML_APPLICATION_IMPLEMENTATION_UPDATE", "ML_APPLICATION_IMPLEMENTATION_MOVE", "ML_APPLICATION_INSTANCE_CREATE", "ML_APPLICATION_INSTANCE_UPDATE", "ML_APPLICATION_INSTANCE_DELETE", "ML_APPLICATION_INSTANCE_MOVE", "ML_APPLICATION_INSTANCE_VIEW_CREATE", "ML_APPLICATION_INSTANCE_VIEW_UPDATE", "ML_APPLICATION_INSTANCE_VIEW_DELETE", "ML_APPLICATION_INSTANCE_VIEW_UPGRADE", "ML_APPLICATION_INSTANCE_VIEW_MOVE", "PRIVATE_ENDPOINT_CREATE", "PRIVATE_ENDPOINT_DELETE", "PRIVATE_ENDPOINT_MOVE", "PRIVATE_ENDPOINT_UPDATE", "SCHEDULE_CREATE", "SCHEDULE_UPDATE", "SCHEDULE_DELETE", "SCHEDULE_MOVE", "SCHEDULE_ACTIVATE", "SCHEDULE_DEACTIVATE", "REGISTER_MODEL_ARTIFACT", "RESTORE_ARCHIVED_MODEL", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "NOTEBOOK_SESSION_CREATE", "NOTEBOOK_SESSION_DELETE", "NOTEBOOK_SESSION_ACTIVATE", "NOTEBOOK_SESSION_DEACTIVATE", "MODELVERSIONSET_DELETE", "EXPORT_MODEL_ARTIFACT", "IMPORT_MODEL_ARTIFACT", "MODEL_DEPLOYMENT_CREATE", "MODEL_DEPLOYMENT_DELETE", "MODEL_DEPLOYMENT_ACTIVATE", "MODEL_DEPLOYMENT_DEACTIVATE", "MODEL_DEPLOYMENT_UPDATE", "PROJECT_DELETE", "WORKREQUEST_CANCEL", "JOB_DELETE", "PIPELINE_CREATE", "PIPELINE_DELETE", "PIPELINE_RUN_CREATE", "PIPELINE_RUN_CANCEL", "PIPELINE_RUN_DELETE", "ML_APPLICATION_PACKAGE_UPLOAD", "ML_APPLICATION_TRIGGER_START", "ML_APPLICATION_IMPLEMENTATION_DELETE", "ML_APPLICATION_IMPLEMENTATION_UPDATE", "ML_APPLICATION_IMPLEMENTATION_MOVE", "ML_APPLICATION_INSTANCE_CREATE", "ML_APPLICATION_INSTANCE_UPDATE", "ML_APPLICATION_INSTANCE_DELETE", "ML_APPLICATION_INSTANCE_MOVE", "ML_APPLICATION_INSTANCE_VIEW_CREATE", "ML_APPLICATION_INSTANCE_VIEW_UPDATE", "ML_APPLICATION_INSTANCE_VIEW_DELETE", "ML_APPLICATION_INSTANCE_VIEW_UPGRADE", "ML_APPLICATION_INSTANCE_VIEW_MOVE", "PRIVATE_ENDPOINT_CREATE", "PRIVATE_ENDPOINT_DELETE", "PRIVATE_ENDPOINT_MOVE", "PRIVATE_ENDPOINT_UPDATE", "SCHEDULE_CREATE", "SCHEDULE_UPDATE", "SCHEDULE_DELETE", "SCHEDULE_MOVE", "SCHEDULE_ACTIVATE", "SCHEDULE_DEACTIVATE", "REGISTER_MODEL_ARTIFACT", "RESTORE_ARCHIVED_MODEL", "MODEL_GROUP_CREATE", "MODEL_GROUP_UPDATE", "MODEL_GROUP_DELETE", "MODEL_GROUP_VERSION_HISTORY_DELETE", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -354,7 +370,7 @@ def operation_type(self, operation_type): :param operation_type: The operation_type of this WorkRequest. :type: str """ - allowed_values = ["NOTEBOOK_SESSION_CREATE", "NOTEBOOK_SESSION_DELETE", "NOTEBOOK_SESSION_ACTIVATE", "NOTEBOOK_SESSION_DEACTIVATE", "MODELVERSIONSET_DELETE", "EXPORT_MODEL_ARTIFACT", "IMPORT_MODEL_ARTIFACT", "MODEL_DEPLOYMENT_CREATE", "MODEL_DEPLOYMENT_DELETE", "MODEL_DEPLOYMENT_ACTIVATE", "MODEL_DEPLOYMENT_DEACTIVATE", "MODEL_DEPLOYMENT_UPDATE", "PROJECT_DELETE", "WORKREQUEST_CANCEL", "JOB_DELETE", "PIPELINE_CREATE", "PIPELINE_DELETE", "PIPELINE_RUN_CREATE", "PIPELINE_RUN_CANCEL", "PIPELINE_RUN_DELETE", "ML_APPLICATION_PACKAGE_UPLOAD", "ML_APPLICATION_TRIGGER_START", "ML_APPLICATION_IMPLEMENTATION_DELETE", "ML_APPLICATION_IMPLEMENTATION_UPDATE", "ML_APPLICATION_IMPLEMENTATION_MOVE", "ML_APPLICATION_INSTANCE_CREATE", "ML_APPLICATION_INSTANCE_UPDATE", "ML_APPLICATION_INSTANCE_DELETE", "ML_APPLICATION_INSTANCE_MOVE", "ML_APPLICATION_INSTANCE_VIEW_CREATE", "ML_APPLICATION_INSTANCE_VIEW_UPDATE", "ML_APPLICATION_INSTANCE_VIEW_DELETE", "ML_APPLICATION_INSTANCE_VIEW_UPGRADE", "ML_APPLICATION_INSTANCE_VIEW_MOVE", "PRIVATE_ENDPOINT_CREATE", "PRIVATE_ENDPOINT_DELETE", "PRIVATE_ENDPOINT_MOVE", "PRIVATE_ENDPOINT_UPDATE", "SCHEDULE_CREATE", "SCHEDULE_UPDATE", "SCHEDULE_DELETE", "SCHEDULE_MOVE", "SCHEDULE_ACTIVATE", "SCHEDULE_DEACTIVATE", "REGISTER_MODEL_ARTIFACT", "RESTORE_ARCHIVED_MODEL"] + allowed_values = ["NOTEBOOK_SESSION_CREATE", "NOTEBOOK_SESSION_DELETE", "NOTEBOOK_SESSION_ACTIVATE", "NOTEBOOK_SESSION_DEACTIVATE", "MODELVERSIONSET_DELETE", "EXPORT_MODEL_ARTIFACT", "IMPORT_MODEL_ARTIFACT", "MODEL_DEPLOYMENT_CREATE", "MODEL_DEPLOYMENT_DELETE", "MODEL_DEPLOYMENT_ACTIVATE", "MODEL_DEPLOYMENT_DEACTIVATE", "MODEL_DEPLOYMENT_UPDATE", "PROJECT_DELETE", "WORKREQUEST_CANCEL", "JOB_DELETE", "PIPELINE_CREATE", "PIPELINE_DELETE", "PIPELINE_RUN_CREATE", "PIPELINE_RUN_CANCEL", "PIPELINE_RUN_DELETE", "ML_APPLICATION_PACKAGE_UPLOAD", "ML_APPLICATION_TRIGGER_START", "ML_APPLICATION_IMPLEMENTATION_DELETE", "ML_APPLICATION_IMPLEMENTATION_UPDATE", "ML_APPLICATION_IMPLEMENTATION_MOVE", "ML_APPLICATION_INSTANCE_CREATE", "ML_APPLICATION_INSTANCE_UPDATE", "ML_APPLICATION_INSTANCE_DELETE", "ML_APPLICATION_INSTANCE_MOVE", "ML_APPLICATION_INSTANCE_VIEW_CREATE", "ML_APPLICATION_INSTANCE_VIEW_UPDATE", "ML_APPLICATION_INSTANCE_VIEW_DELETE", "ML_APPLICATION_INSTANCE_VIEW_UPGRADE", "ML_APPLICATION_INSTANCE_VIEW_MOVE", "PRIVATE_ENDPOINT_CREATE", "PRIVATE_ENDPOINT_DELETE", "PRIVATE_ENDPOINT_MOVE", "PRIVATE_ENDPOINT_UPDATE", "SCHEDULE_CREATE", "SCHEDULE_UPDATE", "SCHEDULE_DELETE", "SCHEDULE_MOVE", "SCHEDULE_ACTIVATE", "SCHEDULE_DEACTIVATE", "REGISTER_MODEL_ARTIFACT", "RESTORE_ARCHIVED_MODEL", "MODEL_GROUP_CREATE", "MODEL_GROUP_UPDATE", "MODEL_GROUP_DELETE", "MODEL_GROUP_VERSION_HISTORY_DELETE"] if not value_allowed_none_or_none_sentinel(operation_type, allowed_values): operation_type = 'UNKNOWN_ENUM_VALUE' self._operation_type = operation_type diff --git a/src/oci/data_science/models/work_request_summary.py b/src/oci/data_science/models/work_request_summary.py index 544bec3078..87717fbc5e 100644 --- a/src/oci/data_science/models/work_request_summary.py +++ b/src/oci/data_science/models/work_request_summary.py @@ -199,6 +199,22 @@ class WorkRequestSummary(object): #: This constant has a value of "RESTORE_ARCHIVED_MODEL" OPERATION_TYPE_RESTORE_ARCHIVED_MODEL = "RESTORE_ARCHIVED_MODEL" + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "MODEL_GROUP_CREATE" + OPERATION_TYPE_MODEL_GROUP_CREATE = "MODEL_GROUP_CREATE" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "MODEL_GROUP_UPDATE" + OPERATION_TYPE_MODEL_GROUP_UPDATE = "MODEL_GROUP_UPDATE" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "MODEL_GROUP_DELETE" + OPERATION_TYPE_MODEL_GROUP_DELETE = "MODEL_GROUP_DELETE" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "MODEL_GROUP_VERSION_HISTORY_DELETE" + OPERATION_TYPE_MODEL_GROUP_VERSION_HISTORY_DELETE = "MODEL_GROUP_VERSION_HISTORY_DELETE" + #: A constant which can be used with the status property of a WorkRequestSummary. #: This constant has a value of "ACCEPTED" STATUS_ACCEPTED = "ACCEPTED" @@ -234,7 +250,7 @@ def __init__(self, **kwargs): :param operation_type: The value to assign to the operation_type property of this WorkRequestSummary. - Allowed values for this property are: "NOTEBOOK_SESSION_CREATE", "NOTEBOOK_SESSION_DELETE", "NOTEBOOK_SESSION_ACTIVATE", "NOTEBOOK_SESSION_DEACTIVATE", "MODELVERSIONSET_DELETE", "EXPORT_MODEL_ARTIFACT", "IMPORT_MODEL_ARTIFACT", "MODEL_DEPLOYMENT_CREATE", "MODEL_DEPLOYMENT_DELETE", "MODEL_DEPLOYMENT_ACTIVATE", "MODEL_DEPLOYMENT_DEACTIVATE", "MODEL_DEPLOYMENT_UPDATE", "PROJECT_DELETE", "WORKREQUEST_CANCEL", "JOB_DELETE", "PIPELINE_CREATE", "PIPELINE_DELETE", "PIPELINE_RUN_CREATE", "PIPELINE_RUN_CANCEL", "PIPELINE_RUN_DELETE", "ML_APPLICATION_PACKAGE_UPLOAD", "ML_APPLICATION_TRIGGER_START", "ML_APPLICATION_IMPLEMENTATION_DELETE", "ML_APPLICATION_IMPLEMENTATION_UPDATE", "ML_APPLICATION_IMPLEMENTATION_MOVE", "ML_APPLICATION_INSTANCE_CREATE", "ML_APPLICATION_INSTANCE_UPDATE", "ML_APPLICATION_INSTANCE_DELETE", "ML_APPLICATION_INSTANCE_MOVE", "ML_APPLICATION_INSTANCE_VIEW_CREATE", "ML_APPLICATION_INSTANCE_VIEW_UPDATE", "ML_APPLICATION_INSTANCE_VIEW_DELETE", "ML_APPLICATION_INSTANCE_VIEW_UPGRADE", "ML_APPLICATION_INSTANCE_VIEW_MOVE", "PRIVATE_ENDPOINT_CREATE", "PRIVATE_ENDPOINT_DELETE", "PRIVATE_ENDPOINT_MOVE", "PRIVATE_ENDPOINT_UPDATE", "SCHEDULE_CREATE", "SCHEDULE_UPDATE", "SCHEDULE_DELETE", "SCHEDULE_MOVE", "SCHEDULE_ACTIVATE", "SCHEDULE_DEACTIVATE", "REGISTER_MODEL_ARTIFACT", "RESTORE_ARCHIVED_MODEL", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "NOTEBOOK_SESSION_CREATE", "NOTEBOOK_SESSION_DELETE", "NOTEBOOK_SESSION_ACTIVATE", "NOTEBOOK_SESSION_DEACTIVATE", "MODELVERSIONSET_DELETE", "EXPORT_MODEL_ARTIFACT", "IMPORT_MODEL_ARTIFACT", "MODEL_DEPLOYMENT_CREATE", "MODEL_DEPLOYMENT_DELETE", "MODEL_DEPLOYMENT_ACTIVATE", "MODEL_DEPLOYMENT_DEACTIVATE", "MODEL_DEPLOYMENT_UPDATE", "PROJECT_DELETE", "WORKREQUEST_CANCEL", "JOB_DELETE", "PIPELINE_CREATE", "PIPELINE_DELETE", "PIPELINE_RUN_CREATE", "PIPELINE_RUN_CANCEL", "PIPELINE_RUN_DELETE", "ML_APPLICATION_PACKAGE_UPLOAD", "ML_APPLICATION_TRIGGER_START", "ML_APPLICATION_IMPLEMENTATION_DELETE", "ML_APPLICATION_IMPLEMENTATION_UPDATE", "ML_APPLICATION_IMPLEMENTATION_MOVE", "ML_APPLICATION_INSTANCE_CREATE", "ML_APPLICATION_INSTANCE_UPDATE", "ML_APPLICATION_INSTANCE_DELETE", "ML_APPLICATION_INSTANCE_MOVE", "ML_APPLICATION_INSTANCE_VIEW_CREATE", "ML_APPLICATION_INSTANCE_VIEW_UPDATE", "ML_APPLICATION_INSTANCE_VIEW_DELETE", "ML_APPLICATION_INSTANCE_VIEW_UPGRADE", "ML_APPLICATION_INSTANCE_VIEW_MOVE", "PRIVATE_ENDPOINT_CREATE", "PRIVATE_ENDPOINT_DELETE", "PRIVATE_ENDPOINT_MOVE", "PRIVATE_ENDPOINT_UPDATE", "SCHEDULE_CREATE", "SCHEDULE_UPDATE", "SCHEDULE_DELETE", "SCHEDULE_MOVE", "SCHEDULE_ACTIVATE", "SCHEDULE_DEACTIVATE", "REGISTER_MODEL_ARTIFACT", "RESTORE_ARCHIVED_MODEL", "MODEL_GROUP_CREATE", "MODEL_GROUP_UPDATE", "MODEL_GROUP_DELETE", "MODEL_GROUP_VERSION_HISTORY_DELETE", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type operation_type: str @@ -335,7 +351,7 @@ def operation_type(self): **[Required]** Gets the operation_type of this WorkRequestSummary. The type of work the work request is doing. - Allowed values for this property are: "NOTEBOOK_SESSION_CREATE", "NOTEBOOK_SESSION_DELETE", "NOTEBOOK_SESSION_ACTIVATE", "NOTEBOOK_SESSION_DEACTIVATE", "MODELVERSIONSET_DELETE", "EXPORT_MODEL_ARTIFACT", "IMPORT_MODEL_ARTIFACT", "MODEL_DEPLOYMENT_CREATE", "MODEL_DEPLOYMENT_DELETE", "MODEL_DEPLOYMENT_ACTIVATE", "MODEL_DEPLOYMENT_DEACTIVATE", "MODEL_DEPLOYMENT_UPDATE", "PROJECT_DELETE", "WORKREQUEST_CANCEL", "JOB_DELETE", "PIPELINE_CREATE", "PIPELINE_DELETE", "PIPELINE_RUN_CREATE", "PIPELINE_RUN_CANCEL", "PIPELINE_RUN_DELETE", "ML_APPLICATION_PACKAGE_UPLOAD", "ML_APPLICATION_TRIGGER_START", "ML_APPLICATION_IMPLEMENTATION_DELETE", "ML_APPLICATION_IMPLEMENTATION_UPDATE", "ML_APPLICATION_IMPLEMENTATION_MOVE", "ML_APPLICATION_INSTANCE_CREATE", "ML_APPLICATION_INSTANCE_UPDATE", "ML_APPLICATION_INSTANCE_DELETE", "ML_APPLICATION_INSTANCE_MOVE", "ML_APPLICATION_INSTANCE_VIEW_CREATE", "ML_APPLICATION_INSTANCE_VIEW_UPDATE", "ML_APPLICATION_INSTANCE_VIEW_DELETE", "ML_APPLICATION_INSTANCE_VIEW_UPGRADE", "ML_APPLICATION_INSTANCE_VIEW_MOVE", "PRIVATE_ENDPOINT_CREATE", "PRIVATE_ENDPOINT_DELETE", "PRIVATE_ENDPOINT_MOVE", "PRIVATE_ENDPOINT_UPDATE", "SCHEDULE_CREATE", "SCHEDULE_UPDATE", "SCHEDULE_DELETE", "SCHEDULE_MOVE", "SCHEDULE_ACTIVATE", "SCHEDULE_DEACTIVATE", "REGISTER_MODEL_ARTIFACT", "RESTORE_ARCHIVED_MODEL", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "NOTEBOOK_SESSION_CREATE", "NOTEBOOK_SESSION_DELETE", "NOTEBOOK_SESSION_ACTIVATE", "NOTEBOOK_SESSION_DEACTIVATE", "MODELVERSIONSET_DELETE", "EXPORT_MODEL_ARTIFACT", "IMPORT_MODEL_ARTIFACT", "MODEL_DEPLOYMENT_CREATE", "MODEL_DEPLOYMENT_DELETE", "MODEL_DEPLOYMENT_ACTIVATE", "MODEL_DEPLOYMENT_DEACTIVATE", "MODEL_DEPLOYMENT_UPDATE", "PROJECT_DELETE", "WORKREQUEST_CANCEL", "JOB_DELETE", "PIPELINE_CREATE", "PIPELINE_DELETE", "PIPELINE_RUN_CREATE", "PIPELINE_RUN_CANCEL", "PIPELINE_RUN_DELETE", "ML_APPLICATION_PACKAGE_UPLOAD", "ML_APPLICATION_TRIGGER_START", "ML_APPLICATION_IMPLEMENTATION_DELETE", "ML_APPLICATION_IMPLEMENTATION_UPDATE", "ML_APPLICATION_IMPLEMENTATION_MOVE", "ML_APPLICATION_INSTANCE_CREATE", "ML_APPLICATION_INSTANCE_UPDATE", "ML_APPLICATION_INSTANCE_DELETE", "ML_APPLICATION_INSTANCE_MOVE", "ML_APPLICATION_INSTANCE_VIEW_CREATE", "ML_APPLICATION_INSTANCE_VIEW_UPDATE", "ML_APPLICATION_INSTANCE_VIEW_DELETE", "ML_APPLICATION_INSTANCE_VIEW_UPGRADE", "ML_APPLICATION_INSTANCE_VIEW_MOVE", "PRIVATE_ENDPOINT_CREATE", "PRIVATE_ENDPOINT_DELETE", "PRIVATE_ENDPOINT_MOVE", "PRIVATE_ENDPOINT_UPDATE", "SCHEDULE_CREATE", "SCHEDULE_UPDATE", "SCHEDULE_DELETE", "SCHEDULE_MOVE", "SCHEDULE_ACTIVATE", "SCHEDULE_DEACTIVATE", "REGISTER_MODEL_ARTIFACT", "RESTORE_ARCHIVED_MODEL", "MODEL_GROUP_CREATE", "MODEL_GROUP_UPDATE", "MODEL_GROUP_DELETE", "MODEL_GROUP_VERSION_HISTORY_DELETE", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -354,7 +370,7 @@ def operation_type(self, operation_type): :param operation_type: The operation_type of this WorkRequestSummary. :type: str """ - allowed_values = ["NOTEBOOK_SESSION_CREATE", "NOTEBOOK_SESSION_DELETE", "NOTEBOOK_SESSION_ACTIVATE", "NOTEBOOK_SESSION_DEACTIVATE", "MODELVERSIONSET_DELETE", "EXPORT_MODEL_ARTIFACT", "IMPORT_MODEL_ARTIFACT", "MODEL_DEPLOYMENT_CREATE", "MODEL_DEPLOYMENT_DELETE", "MODEL_DEPLOYMENT_ACTIVATE", "MODEL_DEPLOYMENT_DEACTIVATE", "MODEL_DEPLOYMENT_UPDATE", "PROJECT_DELETE", "WORKREQUEST_CANCEL", "JOB_DELETE", "PIPELINE_CREATE", "PIPELINE_DELETE", "PIPELINE_RUN_CREATE", "PIPELINE_RUN_CANCEL", "PIPELINE_RUN_DELETE", "ML_APPLICATION_PACKAGE_UPLOAD", "ML_APPLICATION_TRIGGER_START", "ML_APPLICATION_IMPLEMENTATION_DELETE", "ML_APPLICATION_IMPLEMENTATION_UPDATE", "ML_APPLICATION_IMPLEMENTATION_MOVE", "ML_APPLICATION_INSTANCE_CREATE", "ML_APPLICATION_INSTANCE_UPDATE", "ML_APPLICATION_INSTANCE_DELETE", "ML_APPLICATION_INSTANCE_MOVE", "ML_APPLICATION_INSTANCE_VIEW_CREATE", "ML_APPLICATION_INSTANCE_VIEW_UPDATE", "ML_APPLICATION_INSTANCE_VIEW_DELETE", "ML_APPLICATION_INSTANCE_VIEW_UPGRADE", "ML_APPLICATION_INSTANCE_VIEW_MOVE", "PRIVATE_ENDPOINT_CREATE", "PRIVATE_ENDPOINT_DELETE", "PRIVATE_ENDPOINT_MOVE", "PRIVATE_ENDPOINT_UPDATE", "SCHEDULE_CREATE", "SCHEDULE_UPDATE", "SCHEDULE_DELETE", "SCHEDULE_MOVE", "SCHEDULE_ACTIVATE", "SCHEDULE_DEACTIVATE", "REGISTER_MODEL_ARTIFACT", "RESTORE_ARCHIVED_MODEL"] + allowed_values = ["NOTEBOOK_SESSION_CREATE", "NOTEBOOK_SESSION_DELETE", "NOTEBOOK_SESSION_ACTIVATE", "NOTEBOOK_SESSION_DEACTIVATE", "MODELVERSIONSET_DELETE", "EXPORT_MODEL_ARTIFACT", "IMPORT_MODEL_ARTIFACT", "MODEL_DEPLOYMENT_CREATE", "MODEL_DEPLOYMENT_DELETE", "MODEL_DEPLOYMENT_ACTIVATE", "MODEL_DEPLOYMENT_DEACTIVATE", "MODEL_DEPLOYMENT_UPDATE", "PROJECT_DELETE", "WORKREQUEST_CANCEL", "JOB_DELETE", "PIPELINE_CREATE", "PIPELINE_DELETE", "PIPELINE_RUN_CREATE", "PIPELINE_RUN_CANCEL", "PIPELINE_RUN_DELETE", "ML_APPLICATION_PACKAGE_UPLOAD", "ML_APPLICATION_TRIGGER_START", "ML_APPLICATION_IMPLEMENTATION_DELETE", "ML_APPLICATION_IMPLEMENTATION_UPDATE", "ML_APPLICATION_IMPLEMENTATION_MOVE", "ML_APPLICATION_INSTANCE_CREATE", "ML_APPLICATION_INSTANCE_UPDATE", "ML_APPLICATION_INSTANCE_DELETE", "ML_APPLICATION_INSTANCE_MOVE", "ML_APPLICATION_INSTANCE_VIEW_CREATE", "ML_APPLICATION_INSTANCE_VIEW_UPDATE", "ML_APPLICATION_INSTANCE_VIEW_DELETE", "ML_APPLICATION_INSTANCE_VIEW_UPGRADE", "ML_APPLICATION_INSTANCE_VIEW_MOVE", "PRIVATE_ENDPOINT_CREATE", "PRIVATE_ENDPOINT_DELETE", "PRIVATE_ENDPOINT_MOVE", "PRIVATE_ENDPOINT_UPDATE", "SCHEDULE_CREATE", "SCHEDULE_UPDATE", "SCHEDULE_DELETE", "SCHEDULE_MOVE", "SCHEDULE_ACTIVATE", "SCHEDULE_DEACTIVATE", "REGISTER_MODEL_ARTIFACT", "RESTORE_ARCHIVED_MODEL", "MODEL_GROUP_CREATE", "MODEL_GROUP_UPDATE", "MODEL_GROUP_DELETE", "MODEL_GROUP_VERSION_HISTORY_DELETE"] if not value_allowed_none_or_none_sentinel(operation_type, allowed_values): operation_type = 'UNKNOWN_ENUM_VALUE' self._operation_type = operation_type diff --git a/src/oci/management_dashboard/dashx_apis_client.py b/src/oci/management_dashboard/dashx_apis_client.py index efd58d6241..142d3cb47b 100644 --- a/src/oci/management_dashboard/dashx_apis_client.py +++ b/src/oci/management_dashboard/dashx_apis_client.py @@ -780,6 +780,10 @@ def export_dashboard(self, export_dashboard_id, **kwargs): :param str opc_request_id: (optional) The client request ID for tracing. + :param str export_tags: (optional) + Indicates whether tags must be included when exporting dashboards and saved searches. If this attribute is set to true, then both defined and free-form tags are included in the response. The default is false and tag fields are empty objects in the response. + If set to true, NotAuthorizedException is returned if you do not have the permission to access tags, even if you have the permission to access dashboards and saved searches. + :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. @@ -810,7 +814,8 @@ def export_dashboard(self, export_dashboard_id, **kwargs): "allow_control_chars", "retry_strategy", "opc_retry_token", - "opc_request_id" + "opc_request_id", + "export_tags" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: @@ -827,6 +832,11 @@ def export_dashboard(self, export_dashboard_id, **kwargs): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + query_params = { + "exportTags": kwargs.get("export_tags", 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", @@ -850,6 +860,7 @@ def export_dashboard(self, export_dashboard_id, **kwargs): resource_path=resource_path, method=method, path_params=path_params, + query_params=query_params, header_params=header_params, response_type="ManagementDashboardExportDetails", allow_control_chars=kwargs.get('allow_control_chars'), @@ -861,6 +872,7 @@ def export_dashboard(self, export_dashboard_id, **kwargs): resource_path=resource_path, method=method, path_params=path_params, + query_params=query_params, header_params=header_params, response_type="ManagementDashboardExportDetails", allow_control_chars=kwargs.get('allow_control_chars'), @@ -1082,7 +1094,7 @@ def get_management_saved_search(self, management_saved_search_id, **kwargs): def get_oob_management_dashboard(self, management_dashboard_id, **kwargs): """ - Gets an OOB dashboard and its saved searches by ID. Deleted or unauthorized saved searches are marked by tile's state property. + Gets an out-of-the-box dashboard and its saved searches by ID. Deleted or unauthorized saved searches are marked by tile's state property. :param str management_dashboard_id: (required) @@ -1178,7 +1190,7 @@ def get_oob_management_dashboard(self, management_dashboard_id, **kwargs): def get_oob_management_saved_search(self, management_saved_search_id, **kwargs): """ - Gets a saved search by ID. + Gets an out-of-the-box saved search by ID. :param str management_saved_search_id: (required) @@ -1302,6 +1314,16 @@ def import_dashboard(self, management_dashboard_import_details, **kwargs): :param str opc_request_id: (optional) The client request ID for tracing. + :param str override_same_name: (optional) + By default, if a resource with the same OCID exists in the target compartment, it is updated during the import process, otherwise, a new resource is created. + However, if this attribute is set to true, then during the import process if a resource with the same displayName exists in the compartment, then it is updated even if the OCIDs are different. This is useful when importing the same resource multiple times. If the compartment and displayName remain the same, the resource is only updated and multiple copies of a resource are not created. + + :param str override_dashboard_compartment_ocid: (optional) + If this attribute is set, the dashboard resources are created or updated in the compartment specified by OCID. If this attribute is not set, the compartment specified in the JSON metadata is used. + + :param str override_saved_search_compartment_ocid: (optional) + If this attribute is set, the saved search resources are created or updated in the compartment specified by OCID. If this attribute is not set, the compartment specified in the JSON metadata is used. + :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. @@ -1333,13 +1355,23 @@ def import_dashboard(self, management_dashboard_import_details, **kwargs): "retry_strategy", "if_match", "opc_retry_token", - "opc_request_id" + "opc_request_id", + "override_same_name", + "override_dashboard_compartment_ocid", + "override_saved_search_compartment_ocid" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( f"import_dashboard got unknown kwargs: {extra_kwargs!r}") + query_params = { + "overrideSameName": kwargs.get("override_same_name", missing), + "overrideDashboardCompartmentOcid": kwargs.get("override_dashboard_compartment_ocid", missing), + "overrideSavedSearchCompartmentOcid": kwargs.get("override_saved_search_compartment_ocid", 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", @@ -1363,6 +1395,7 @@ def import_dashboard(self, management_dashboard_import_details, **kwargs): self.base_client.call_api, resource_path=resource_path, method=method, + query_params=query_params, header_params=header_params, body=management_dashboard_import_details, allow_control_chars=kwargs.get('allow_control_chars'), @@ -1373,6 +1406,7 @@ def import_dashboard(self, management_dashboard_import_details, **kwargs): return self.base_client.call_api( resource_path=resource_path, method=method, + query_params=query_params, header_params=header_params, body=management_dashboard_import_details, allow_control_chars=kwargs.get('allow_control_chars'), @@ -1650,7 +1684,7 @@ def list_management_saved_searches(self, compartment_id, **kwargs): def list_oob_management_dashboards(self, compartment_id, **kwargs): """ - Gets the list of OOB dashboards with pagination. Returned properties are the summary. + Gets the list of out-of-the-box dashboards with pagination. Returned properties are the summary. :param str compartment_id: (required) @@ -1784,7 +1818,7 @@ def list_oob_management_dashboards(self, compartment_id, **kwargs): def list_oob_management_saved_searches(self, compartment_id, **kwargs): """ - Gets the list of out-of-box saved searches in a compartment with pagination. Returned properties are the summary. + Gets the list of out-of-the-box saved searches in a compartment with pagination. Returned properties are the summary. :param str compartment_id: (required) diff --git a/src/oci/management_dashboard/models/management_dashboard.py b/src/oci/management_dashboard/models/management_dashboard.py index 1ef528eb43..3086f1e2c2 100644 --- a/src/oci/management_dashboard/models/management_dashboard.py +++ b/src/oci/management_dashboard/models/management_dashboard.py @@ -146,6 +146,10 @@ def __init__(self, **kwargs): The value to assign to the defined_tags property of this ManagementDashboard. :type defined_tags: dict(str, dict(str, object)) + :param system_tags: + The value to assign to the system_tags property of this ManagementDashboard. + :type system_tags: dict(str, dict(str, object)) + """ self.swagger_types = { 'dashboard_id': 'str', @@ -177,7 +181,8 @@ def __init__(self, **kwargs): 'drilldown_config': 'list[object]', 'features_config': 'object', 'freeform_tags': 'dict(str, str)', - 'defined_tags': 'dict(str, dict(str, object))' + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))' } self.attribute_map = { 'dashboard_id': 'dashboardId', @@ -209,7 +214,8 @@ def __init__(self, **kwargs): 'drilldown_config': 'drilldownConfig', 'features_config': 'featuresConfig', 'freeform_tags': 'freeformTags', - 'defined_tags': 'definedTags' + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags' } self._dashboard_id = None self._id = None @@ -241,6 +247,7 @@ def __init__(self, **kwargs): self._features_config = None self._freeform_tags = None self._defined_tags = None + self._system_tags = None @property def dashboard_id(self): @@ -972,6 +979,32 @@ def defined_tags(self, defined_tags): """ self._defined_tags = defined_tags + @property + def system_tags(self): + """ + Gets the system_tags of this ManagementDashboard. + 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 ManagementDashboard. + :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 ManagementDashboard. + 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 ManagementDashboard. + :type: dict(str, dict(str, object)) + """ + self._system_tags = system_tags + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/management_dashboard/models/management_dashboard_summary.py b/src/oci/management_dashboard/models/management_dashboard_summary.py index b15f3df2c6..7ac4663769 100644 --- a/src/oci/management_dashboard/models/management_dashboard_summary.py +++ b/src/oci/management_dashboard/models/management_dashboard_summary.py @@ -110,6 +110,10 @@ def __init__(self, **kwargs): The value to assign to the defined_tags property of this ManagementDashboardSummary. :type defined_tags: dict(str, dict(str, object)) + :param system_tags: + The value to assign to the system_tags property of this ManagementDashboardSummary. + :type system_tags: dict(str, dict(str, object)) + """ self.swagger_types = { 'dashboard_id': 'str', @@ -132,7 +136,8 @@ def __init__(self, **kwargs): 'features_config': 'object', 'lifecycle_state': 'str', 'freeform_tags': 'dict(str, str)', - 'defined_tags': 'dict(str, dict(str, object))' + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))' } self.attribute_map = { 'dashboard_id': 'dashboardId', @@ -155,7 +160,8 @@ def __init__(self, **kwargs): 'features_config': 'featuresConfig', 'lifecycle_state': 'lifecycleState', 'freeform_tags': 'freeformTags', - 'defined_tags': 'definedTags' + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags' } self._dashboard_id = None self._id = None @@ -178,6 +184,7 @@ def __init__(self, **kwargs): self._lifecycle_state = None self._freeform_tags = None self._defined_tags = None + self._system_tags = None @property def dashboard_id(self): @@ -693,6 +700,32 @@ def defined_tags(self, defined_tags): """ self._defined_tags = defined_tags + @property + def system_tags(self): + """ + Gets the system_tags of this ManagementDashboardSummary. + 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 ManagementDashboardSummary. + :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 ManagementDashboardSummary. + 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 ManagementDashboardSummary. + :type: dict(str, dict(str, object)) + """ + self._system_tags = system_tags + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/management_dashboard/models/management_saved_search.py b/src/oci/management_dashboard/models/management_saved_search.py index 5f4d15d248..88e275af79 100644 --- a/src/oci/management_dashboard/models/management_saved_search.py +++ b/src/oci/management_dashboard/models/management_saved_search.py @@ -156,6 +156,10 @@ def __init__(self, **kwargs): The value to assign to the defined_tags property of this ManagementSavedSearch. :type defined_tags: dict(str, dict(str, object)) + :param system_tags: + The value to assign to the system_tags property of this ManagementSavedSearch. + :type system_tags: dict(str, dict(str, object)) + """ self.swagger_types = { 'id': 'str', @@ -183,7 +187,8 @@ def __init__(self, **kwargs): 'features_config': 'object', 'drilldown_config': 'list[object]', 'freeform_tags': 'dict(str, str)', - 'defined_tags': 'dict(str, dict(str, object))' + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))' } self.attribute_map = { 'id': 'id', @@ -211,7 +216,8 @@ def __init__(self, **kwargs): 'features_config': 'featuresConfig', 'drilldown_config': 'drilldownConfig', 'freeform_tags': 'freeformTags', - 'defined_tags': 'definedTags' + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags' } self._id = None self._display_name = None @@ -239,6 +245,7 @@ def __init__(self, **kwargs): self._drilldown_config = None self._freeform_tags = None self._defined_tags = None + self._system_tags = None @property def id(self): @@ -880,6 +887,32 @@ def defined_tags(self, defined_tags): """ self._defined_tags = defined_tags + @property + def system_tags(self): + """ + Gets the system_tags of this ManagementSavedSearch. + 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 ManagementSavedSearch. + :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 ManagementSavedSearch. + 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 ManagementSavedSearch. + :type: dict(str, dict(str, object)) + """ + self._system_tags = system_tags + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/management_dashboard/models/management_saved_search_summary.py b/src/oci/management_dashboard/models/management_saved_search_summary.py index db43f83550..38bd681c13 100644 --- a/src/oci/management_dashboard/models/management_saved_search_summary.py +++ b/src/oci/management_dashboard/models/management_saved_search_summary.py @@ -152,6 +152,10 @@ def __init__(self, **kwargs): The value to assign to the defined_tags property of this ManagementSavedSearchSummary. :type defined_tags: dict(str, dict(str, object)) + :param system_tags: + The value to assign to the system_tags property of this ManagementSavedSearchSummary. + :type system_tags: dict(str, dict(str, object)) + """ self.swagger_types = { 'id': 'str', @@ -178,7 +182,8 @@ def __init__(self, **kwargs): 'parameters_config': 'list[object]', 'features_config': 'object', 'freeform_tags': 'dict(str, str)', - 'defined_tags': 'dict(str, dict(str, object))' + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))' } self.attribute_map = { 'id': 'id', @@ -205,7 +210,8 @@ def __init__(self, **kwargs): 'parameters_config': 'parametersConfig', 'features_config': 'featuresConfig', 'freeform_tags': 'freeformTags', - 'defined_tags': 'definedTags' + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags' } self._id = None self._display_name = None @@ -232,6 +238,7 @@ def __init__(self, **kwargs): self._features_config = None self._freeform_tags = None self._defined_tags = None + self._system_tags = None @property def id(self): @@ -849,6 +856,32 @@ def defined_tags(self, defined_tags): """ self._defined_tags = defined_tags + @property + def system_tags(self): + """ + Gets the system_tags of this ManagementSavedSearchSummary. + 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 ManagementSavedSearchSummary. + :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 ManagementSavedSearchSummary. + 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 ManagementSavedSearchSummary. + :type: dict(str, dict(str, object)) + """ + self._system_tags = system_tags + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/psql/models/backup_source_details.py b/src/oci/psql/models/backup_source_details.py index 3abb851aa6..16766c3186 100644 --- a/src/oci/psql/models/backup_source_details.py +++ b/src/oci/psql/models/backup_source_details.py @@ -12,8 +12,7 @@ @init_model_state_from_kwargs class BackupSourceDetails(SourceDetails): """ - Restoring to a new database system from the backup. - The database system details that are part of the CreateDbSystem request are not required, but if present will override the details from the backup's database system snapshot. + Details of the database system backup. """ def __init__(self, **kwargs): diff --git a/src/oci/psql/models/configuration.py b/src/oci/psql/models/configuration.py index 32801aff90..0a7976f469 100644 --- a/src/oci/psql/models/configuration.py +++ b/src/oci/psql/models/configuration.py @@ -104,6 +104,14 @@ def __init__(self, **kwargs): The value to assign to the instance_memory_size_in_gbs property of this Configuration. :type instance_memory_size_in_gbs: int + :param compatible_shapes: + The value to assign to the compatible_shapes property of this Configuration. + :type compatible_shapes: list[str] + + :param default_config_id: + The value to assign to the default_config_id property of this Configuration. + :type default_config_id: str + :param configuration_details: The value to assign to the configuration_details property of this Configuration. :type configuration_details: oci.psql.models.ConfigurationDetails @@ -135,6 +143,8 @@ def __init__(self, **kwargs): 'is_flexible': 'bool', 'instance_ocpu_count': 'int', 'instance_memory_size_in_gbs': 'int', + 'compatible_shapes': 'list[str]', + 'default_config_id': 'str', 'configuration_details': 'ConfigurationDetails', 'freeform_tags': 'dict(str, str)', 'defined_tags': 'dict(str, dict(str, object))', @@ -154,6 +164,8 @@ def __init__(self, **kwargs): 'is_flexible': 'isFlexible', 'instance_ocpu_count': 'instanceOcpuCount', 'instance_memory_size_in_gbs': 'instanceMemorySizeInGBs', + 'compatible_shapes': 'compatibleShapes', + 'default_config_id': 'defaultConfigId', 'configuration_details': 'configurationDetails', 'freeform_tags': 'freeformTags', 'defined_tags': 'definedTags', @@ -172,6 +184,8 @@ def __init__(self, **kwargs): self._is_flexible = None self._instance_ocpu_count = None self._instance_memory_size_in_gbs = None + self._compatible_shapes = None + self._default_config_id = None self._configuration_details = None self._freeform_tags = None self._defined_tags = None @@ -424,7 +438,8 @@ def shape(self): """ **[Required]** Gets the shape of this Configuration. The name of the shape for the configuration. - Example: `VM.Standard.E4.Flex` + + For multi-shape enabled configurations, it is set to PostgreSQL. Please use compatibleShapes property to get list of supported shapes for such configurations. :return: The shape of this Configuration. @@ -437,7 +452,8 @@ def shape(self, shape): """ Sets the shape of this Configuration. The name of the shape for the configuration. - Example: `VM.Standard.E4.Flex` + + For multi-shape enabled configurations, it is set to PostgreSQL. Please use compatibleShapes property to get list of supported shapes for such configurations. :param shape: The shape of this Configuration. @@ -525,6 +541,54 @@ def instance_memory_size_in_gbs(self, instance_memory_size_in_gbs): """ self._instance_memory_size_in_gbs = instance_memory_size_in_gbs + @property + def compatible_shapes(self): + """ + **[Required]** Gets the compatible_shapes of this Configuration. + Indicates the collection of compatible shapes for this configuration. + + + :return: The compatible_shapes of this Configuration. + :rtype: list[str] + """ + return self._compatible_shapes + + @compatible_shapes.setter + def compatible_shapes(self, compatible_shapes): + """ + Sets the compatible_shapes of this Configuration. + Indicates the collection of compatible shapes for this configuration. + + + :param compatible_shapes: The compatible_shapes of this Configuration. + :type: list[str] + """ + self._compatible_shapes = compatible_shapes + + @property + def default_config_id(self): + """ + **[Required]** Gets the default_config_id of this Configuration. + The Default configuration used for this configuration. + + + :return: The default_config_id of this Configuration. + :rtype: str + """ + return self._default_config_id + + @default_config_id.setter + def default_config_id(self, default_config_id): + """ + Sets the default_config_id of this Configuration. + The Default configuration used for this configuration. + + + :param default_config_id: The default_config_id of this Configuration. + :type: str + """ + self._default_config_id = default_config_id + @property def configuration_details(self): """ diff --git a/src/oci/psql/models/configuration_summary.py b/src/oci/psql/models/configuration_summary.py index 9cafa65917..c8f08923b1 100644 --- a/src/oci/psql/models/configuration_summary.py +++ b/src/oci/psql/models/configuration_summary.py @@ -64,6 +64,14 @@ def __init__(self, **kwargs): The value to assign to the instance_memory_size_in_gbs property of this ConfigurationSummary. :type instance_memory_size_in_gbs: int + :param compatible_shapes: + The value to assign to the compatible_shapes property of this ConfigurationSummary. + :type compatible_shapes: list[str] + + :param default_config_id: + The value to assign to the default_config_id property of this ConfigurationSummary. + :type default_config_id: str + :param freeform_tags: The value to assign to the freeform_tags property of this ConfigurationSummary. :type freeform_tags: dict(str, str) @@ -89,6 +97,8 @@ def __init__(self, **kwargs): 'is_flexible': 'bool', 'instance_ocpu_count': 'int', 'instance_memory_size_in_gbs': 'int', + 'compatible_shapes': 'list[str]', + 'default_config_id': 'str', 'freeform_tags': 'dict(str, str)', 'defined_tags': 'dict(str, dict(str, object))', 'system_tags': 'dict(str, dict(str, object))' @@ -105,6 +115,8 @@ def __init__(self, **kwargs): 'is_flexible': 'isFlexible', 'instance_ocpu_count': 'instanceOcpuCount', 'instance_memory_size_in_gbs': 'instanceMemorySizeInGBs', + 'compatible_shapes': 'compatibleShapes', + 'default_config_id': 'defaultConfigId', 'freeform_tags': 'freeformTags', 'defined_tags': 'definedTags', 'system_tags': 'systemTags' @@ -120,6 +132,8 @@ def __init__(self, **kwargs): self._is_flexible = None self._instance_ocpu_count = None self._instance_memory_size_in_gbs = None + self._compatible_shapes = None + self._default_config_id = None self._freeform_tags = None self._defined_tags = None self._system_tags = None @@ -315,7 +329,8 @@ def shape(self): """ **[Required]** Gets the shape of this ConfigurationSummary. The name of the shape for the configuration. - Example: `VM.Standard.E4.Flex` + + For multi-shape enabled configurations, it is set to PostgreSQL. Please use compatibleShapes property to get list of supported shapes for such configurations. :return: The shape of this ConfigurationSummary. @@ -328,7 +343,8 @@ def shape(self, shape): """ Sets the shape of this ConfigurationSummary. The name of the shape for the configuration. - Example: `VM.Standard.E4.Flex` + + For multi-shape enabled configurations, it is set to PostgreSQL. Please use compatibleShapes property to get list of supported shapes for such configurations. :param shape: The shape of this ConfigurationSummary. @@ -416,6 +432,54 @@ def instance_memory_size_in_gbs(self, instance_memory_size_in_gbs): """ self._instance_memory_size_in_gbs = instance_memory_size_in_gbs + @property + def compatible_shapes(self): + """ + **[Required]** Gets the compatible_shapes of this ConfigurationSummary. + Indicates the collection of compatible shapes for this configuration. + + + :return: The compatible_shapes of this ConfigurationSummary. + :rtype: list[str] + """ + return self._compatible_shapes + + @compatible_shapes.setter + def compatible_shapes(self, compatible_shapes): + """ + Sets the compatible_shapes of this ConfigurationSummary. + Indicates the collection of compatible shapes for this configuration. + + + :param compatible_shapes: The compatible_shapes of this ConfigurationSummary. + :type: list[str] + """ + self._compatible_shapes = compatible_shapes + + @property + def default_config_id(self): + """ + **[Required]** Gets the default_config_id of this ConfigurationSummary. + The Default configuration used for this configuration. + + + :return: The default_config_id of this ConfigurationSummary. + :rtype: str + """ + return self._default_config_id + + @default_config_id.setter + def default_config_id(self, default_config_id): + """ + Sets the default_config_id of this ConfigurationSummary. + The Default configuration used for this configuration. + + + :param default_config_id: The default_config_id of this ConfigurationSummary. + :type: str + """ + self._default_config_id = default_config_id + @property def freeform_tags(self): """ diff --git a/src/oci/psql/models/create_configuration_details.py b/src/oci/psql/models/create_configuration_details.py index 38aaeb55de..2182e4c4f3 100644 --- a/src/oci/psql/models/create_configuration_details.py +++ b/src/oci/psql/models/create_configuration_details.py @@ -52,6 +52,10 @@ def __init__(self, **kwargs): The value to assign to the instance_memory_size_in_gbs property of this CreateConfigurationDetails. :type instance_memory_size_in_gbs: int + :param compatible_shapes: + The value to assign to the compatible_shapes property of this CreateConfigurationDetails. + :type compatible_shapes: list[str] + :param db_configuration_overrides: The value to assign to the db_configuration_overrides property of this CreateConfigurationDetails. :type db_configuration_overrides: oci.psql.models.DbConfigurationOverrideCollection @@ -78,6 +82,7 @@ def __init__(self, **kwargs): 'is_flexible': 'bool', 'instance_ocpu_count': 'int', 'instance_memory_size_in_gbs': 'int', + 'compatible_shapes': 'list[str]', 'db_configuration_overrides': 'DbConfigurationOverrideCollection', 'freeform_tags': 'dict(str, str)', 'defined_tags': 'dict(str, dict(str, object))', @@ -92,6 +97,7 @@ def __init__(self, **kwargs): 'is_flexible': 'isFlexible', 'instance_ocpu_count': 'instanceOcpuCount', 'instance_memory_size_in_gbs': 'instanceMemorySizeInGBs', + 'compatible_shapes': 'compatibleShapes', 'db_configuration_overrides': 'dbConfigurationOverrides', 'freeform_tags': 'freeformTags', 'defined_tags': 'definedTags', @@ -105,6 +111,7 @@ def __init__(self, **kwargs): self._is_flexible = None self._instance_ocpu_count = None self._instance_memory_size_in_gbs = None + self._compatible_shapes = None self._db_configuration_overrides = None self._freeform_tags = None self._defined_tags = None @@ -213,9 +220,10 @@ def db_version(self, db_version): @property def shape(self): """ - **[Required]** Gets the shape of this CreateConfigurationDetails. + Gets the shape of this CreateConfigurationDetails. The name of the shape for the configuration. - Example: `VM.Standard.E4.Flex` + + For multi-shape enabled configurations, it is set to PostgreSQL.X86 or similar. Please use compatibleShapes property to set the list of supported shapes. :return: The shape of this CreateConfigurationDetails. @@ -228,7 +236,8 @@ def shape(self, shape): """ Sets the shape of this CreateConfigurationDetails. The name of the shape for the configuration. - Example: `VM.Standard.E4.Flex` + + For multi-shape enabled configurations, it is set to PostgreSQL.X86 or similar. Please use compatibleShapes property to set the list of supported shapes. :param shape: The shape of this CreateConfigurationDetails. @@ -316,6 +325,30 @@ def instance_memory_size_in_gbs(self, instance_memory_size_in_gbs): """ self._instance_memory_size_in_gbs = instance_memory_size_in_gbs + @property + def compatible_shapes(self): + """ + Gets the compatible_shapes of this CreateConfigurationDetails. + Indicates the collection of compatible shapes for this configuration. + + + :return: The compatible_shapes of this CreateConfigurationDetails. + :rtype: list[str] + """ + return self._compatible_shapes + + @compatible_shapes.setter + def compatible_shapes(self, compatible_shapes): + """ + Sets the compatible_shapes of this CreateConfigurationDetails. + Indicates the collection of compatible shapes for this configuration. + + + :param compatible_shapes: The compatible_shapes of this CreateConfigurationDetails. + :type: list[str] + """ + self._compatible_shapes = compatible_shapes + @property def db_configuration_overrides(self): """ diff --git a/src/oci/psql/models/default_configuration.py b/src/oci/psql/models/default_configuration.py index 763a42aa67..9251fb8ab0 100644 --- a/src/oci/psql/models/default_configuration.py +++ b/src/oci/psql/models/default_configuration.py @@ -86,6 +86,10 @@ def __init__(self, **kwargs): The value to assign to the instance_memory_size_in_gbs property of this DefaultConfiguration. :type instance_memory_size_in_gbs: int + :param compatible_shapes: + The value to assign to the compatible_shapes property of this DefaultConfiguration. + :type compatible_shapes: list[str] + :param configuration_details: The value to assign to the configuration_details property of this DefaultConfiguration. :type configuration_details: oci.psql.models.DefaultConfigurationDetails @@ -103,6 +107,7 @@ def __init__(self, **kwargs): 'is_flexible': 'bool', 'instance_ocpu_count': 'int', 'instance_memory_size_in_gbs': 'int', + 'compatible_shapes': 'list[str]', 'configuration_details': 'DefaultConfigurationDetails' } self.attribute_map = { @@ -117,6 +122,7 @@ def __init__(self, **kwargs): 'is_flexible': 'isFlexible', 'instance_ocpu_count': 'instanceOcpuCount', 'instance_memory_size_in_gbs': 'instanceMemorySizeInGBs', + 'compatible_shapes': 'compatibleShapes', 'configuration_details': 'configurationDetails' } self._id = None @@ -130,6 +136,7 @@ def __init__(self, **kwargs): self._is_flexible = None self._instance_ocpu_count = None self._instance_memory_size_in_gbs = None + self._compatible_shapes = None self._configuration_details = None @property @@ -321,7 +328,8 @@ def shape(self): """ **[Required]** Gets the shape of this DefaultConfiguration. The name of the shape for the configuration. - Example: `VM.Standard.E4.Flex` + + For multi-shape enabled configurations, it is set to PostgreSQL. Please use compatibleShapes property to get list of supported shapes for such configurations. :return: The shape of this DefaultConfiguration. @@ -334,7 +342,8 @@ def shape(self, shape): """ Sets the shape of this DefaultConfiguration. The name of the shape for the configuration. - Example: `VM.Standard.E4.Flex` + + For multi-shape enabled configurations, it is set to PostgreSQL. Please use compatibleShapes property to get list of supported shapes for such configurations. :param shape: The shape of this DefaultConfiguration. @@ -422,6 +431,30 @@ def instance_memory_size_in_gbs(self, instance_memory_size_in_gbs): """ self._instance_memory_size_in_gbs = instance_memory_size_in_gbs + @property + def compatible_shapes(self): + """ + **[Required]** Gets the compatible_shapes of this DefaultConfiguration. + Indicates the collection of compatible shapes for this configuration. + + + :return: The compatible_shapes of this DefaultConfiguration. + :rtype: list[str] + """ + return self._compatible_shapes + + @compatible_shapes.setter + def compatible_shapes(self, compatible_shapes): + """ + Sets the compatible_shapes of this DefaultConfiguration. + Indicates the collection of compatible shapes for this configuration. + + + :param compatible_shapes: The compatible_shapes of this DefaultConfiguration. + :type: list[str] + """ + self._compatible_shapes = compatible_shapes + @property def configuration_details(self): """ diff --git a/src/oci/psql/models/default_configuration_summary.py b/src/oci/psql/models/default_configuration_summary.py index e756dd3f24..29913816e3 100644 --- a/src/oci/psql/models/default_configuration_summary.py +++ b/src/oci/psql/models/default_configuration_summary.py @@ -60,6 +60,10 @@ def __init__(self, **kwargs): The value to assign to the instance_memory_size_in_gbs property of this DefaultConfigurationSummary. :type instance_memory_size_in_gbs: int + :param compatible_shapes: + The value to assign to the compatible_shapes property of this DefaultConfigurationSummary. + :type compatible_shapes: list[str] + """ self.swagger_types = { 'id': 'str', @@ -71,7 +75,8 @@ def __init__(self, **kwargs): 'shape': 'str', 'is_flexible': 'bool', 'instance_ocpu_count': 'int', - 'instance_memory_size_in_gbs': 'int' + 'instance_memory_size_in_gbs': 'int', + 'compatible_shapes': 'list[str]' } self.attribute_map = { 'id': 'id', @@ -83,7 +88,8 @@ def __init__(self, **kwargs): 'shape': 'shape', 'is_flexible': 'isFlexible', 'instance_ocpu_count': 'instanceOcpuCount', - 'instance_memory_size_in_gbs': 'instanceMemorySizeInGBs' + 'instance_memory_size_in_gbs': 'instanceMemorySizeInGBs', + 'compatible_shapes': 'compatibleShapes' } self._id = None self._display_name = None @@ -95,6 +101,7 @@ def __init__(self, **kwargs): self._is_flexible = None self._instance_ocpu_count = None self._instance_memory_size_in_gbs = None + self._compatible_shapes = None @property def id(self): @@ -255,7 +262,8 @@ def shape(self): """ **[Required]** Gets the shape of this DefaultConfigurationSummary. The name of the shape for the configuration. - Example: `VM.Standard.E4.Flex` + + For multi-shape enabled configurations, it is set to PostgreSQL. Please use compatibleShapes property to get list of supported shapes for such configurations. :return: The shape of this DefaultConfigurationSummary. @@ -268,7 +276,8 @@ def shape(self, shape): """ Sets the shape of this DefaultConfigurationSummary. The name of the shape for the configuration. - Example: `VM.Standard.E4.Flex` + + For multi-shape enabled configurations, it is set to PostgreSQL. Please use compatibleShapes property to get list of supported shapes for such configurations. :param shape: The shape of this DefaultConfigurationSummary. @@ -356,6 +365,30 @@ def instance_memory_size_in_gbs(self, instance_memory_size_in_gbs): """ self._instance_memory_size_in_gbs = instance_memory_size_in_gbs + @property + def compatible_shapes(self): + """ + **[Required]** Gets the compatible_shapes of this DefaultConfigurationSummary. + Indicates the collection of compatible shapes for this configuration. + + + :return: The compatible_shapes of this DefaultConfigurationSummary. + :rtype: list[str] + """ + return self._compatible_shapes + + @compatible_shapes.setter + def compatible_shapes(self, compatible_shapes): + """ + Sets the compatible_shapes of this DefaultConfigurationSummary. + Indicates the collection of compatible shapes for this configuration. + + + :param compatible_shapes: The compatible_shapes of this DefaultConfigurationSummary. + :type: list[str] + """ + self._compatible_shapes = compatible_shapes + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/psql/models/source_details.py b/src/oci/psql/models/source_details.py index d4aec78a01..5d393784d7 100644 --- a/src/oci/psql/models/source_details.py +++ b/src/oci/psql/models/source_details.py @@ -12,7 +12,7 @@ @init_model_state_from_kwargs class SourceDetails(object): """ - The source used to restore the database system. + The source of the database system. """ #: A constant which can be used with the source_type property of a SourceDetails. diff --git a/src/oci/psql/models/update_configuration_details.py b/src/oci/psql/models/update_configuration_details.py index 39864ae6af..f70fc3674f 100644 --- a/src/oci/psql/models/update_configuration_details.py +++ b/src/oci/psql/models/update_configuration_details.py @@ -36,23 +36,30 @@ def __init__(self, **kwargs): The value to assign to the defined_tags property of this UpdateConfigurationDetails. :type defined_tags: dict(str, dict(str, object)) + :param compatible_shapes: + The value to assign to the compatible_shapes property of this UpdateConfigurationDetails. + :type compatible_shapes: list[str] + """ self.swagger_types = { 'display_name': 'str', 'description': 'str', 'freeform_tags': 'dict(str, str)', - 'defined_tags': 'dict(str, dict(str, object))' + 'defined_tags': 'dict(str, dict(str, object))', + 'compatible_shapes': 'list[str]' } self.attribute_map = { 'display_name': 'displayName', 'description': 'description', 'freeform_tags': 'freeformTags', - 'defined_tags': 'definedTags' + 'defined_tags': 'definedTags', + 'compatible_shapes': 'compatibleShapes' } self._display_name = None self._description = None self._freeform_tags = None self._defined_tags = None + self._compatible_shapes = None @property def display_name(self): @@ -154,6 +161,30 @@ def defined_tags(self, defined_tags): """ self._defined_tags = defined_tags + @property + def compatible_shapes(self): + """ + Gets the compatible_shapes of this UpdateConfigurationDetails. + Indicates the collection of compatible shapes for this configuration. + + + :return: The compatible_shapes of this UpdateConfigurationDetails. + :rtype: list[str] + """ + return self._compatible_shapes + + @compatible_shapes.setter + def compatible_shapes(self, compatible_shapes): + """ + Sets the compatible_shapes of this UpdateConfigurationDetails. + Indicates the collection of compatible shapes for this configuration. + + + :param compatible_shapes: The compatible_shapes of this UpdateConfigurationDetails. + :type: list[str] + """ + self._compatible_shapes = compatible_shapes + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/psql/postgresql_client.py b/src/oci/psql/postgresql_client.py index b861fccc78..4a1995ee21 100644 --- a/src/oci/psql/postgresql_client.py +++ b/src/oci/psql/postgresql_client.py @@ -2199,12 +2199,17 @@ def list_configurations(self, **kwargs): Version of the PostgreSQL database, such as 14.9. :param str shape: (optional) - The name of the shape for the configuration. - Example: `VM.Standard.E4.Flex` + The compute name of the shape for the configuration. :param str configuration_id: (optional) A unique identifier for the configuration. + :param int instance_ocpu_count: (optional) + The instance ocpu count for the configuration. + + :param int instance_memory_size_in_gbs: (optional) + The instance memory size in GBs for the configuration. + :param int limit: (optional) The maximum number of items to return. @@ -2260,6 +2265,8 @@ def list_configurations(self, **kwargs): "db_version", "shape", "configuration_id", + "instance_ocpu_count", + "instance_memory_size_in_gbs", "limit", "page", "sort_order", @@ -2307,6 +2314,8 @@ def list_configurations(self, **kwargs): "dbVersion": kwargs.get("db_version", missing), "shape": kwargs.get("shape", missing), "configurationId": kwargs.get("configuration_id", missing), + "instanceOcpuCount": kwargs.get("instance_ocpu_count", missing), + "instanceMemorySizeInGBs": kwargs.get("instance_memory_size_in_gbs", missing), "limit": kwargs.get("limit", missing), "page": kwargs.get("page", missing), "sortOrder": kwargs.get("sort_order", missing), @@ -2528,8 +2537,13 @@ def list_default_configurations(self, **kwargs): Version of the PostgreSQL database, such as 14.9. :param str shape: (optional) - The name of the shape for the configuration. - Example: `VM.Standard.E4.Flex` + The compute name of the shape for the configuration. + + :param int instance_ocpu_count: (optional) + The instance ocpu count for the configuration. + + :param int instance_memory_size_in_gbs: (optional) + The instance memory size in GBs for the configuration. :param str configuration_id: (optional) A unique identifier for the configuration. @@ -2586,6 +2600,8 @@ def list_default_configurations(self, **kwargs): "display_name", "db_version", "shape", + "instance_ocpu_count", + "instance_memory_size_in_gbs", "configuration_id", "limit", "page", @@ -2624,6 +2640,8 @@ def list_default_configurations(self, **kwargs): "displayName": kwargs.get("display_name", missing), "dbVersion": kwargs.get("db_version", missing), "shape": kwargs.get("shape", missing), + "instanceOcpuCount": kwargs.get("instance_ocpu_count", missing), + "instanceMemorySizeInGBs": kwargs.get("instance_memory_size_in_gbs", missing), "configurationId": kwargs.get("configuration_id", missing), "limit": kwargs.get("limit", missing), "page": kwargs.get("page", missing), diff --git a/src/oci/vault/models/__init__.py b/src/oci/vault/models/__init__.py index dd0200ab7f..cc4a1b11f3 100644 --- a/src/oci/vault/models/__init__.py +++ b/src/oci/vault/models/__init__.py @@ -13,6 +13,8 @@ from .create_secret_details import CreateSecretDetails from .function_target_system_details import FunctionTargetSystemDetails from .passphrase_generation_context import PassphraseGenerationContext +from .replication_config import ReplicationConfig +from .replication_target import ReplicationTarget from .rotation_config import RotationConfig from .schedule_secret_deletion_details import ScheduleSecretDeletionDetails from .schedule_secret_version_deletion_details import ScheduleSecretVersionDeletionDetails @@ -25,6 +27,7 @@ from .secret_summary import SecretSummary from .secret_version import SecretVersion from .secret_version_summary import SecretVersionSummary +from .source_region_information import SourceRegionInformation from .ssh_key_generation_context import SshKeyGenerationContext from .target_system_details import TargetSystemDetails from .update_secret_details import UpdateSecretDetails @@ -38,6 +41,8 @@ "CreateSecretDetails": CreateSecretDetails, "FunctionTargetSystemDetails": FunctionTargetSystemDetails, "PassphraseGenerationContext": PassphraseGenerationContext, + "ReplicationConfig": ReplicationConfig, + "ReplicationTarget": ReplicationTarget, "RotationConfig": RotationConfig, "ScheduleSecretDeletionDetails": ScheduleSecretDeletionDetails, "ScheduleSecretVersionDeletionDetails": ScheduleSecretVersionDeletionDetails, @@ -50,6 +55,7 @@ "SecretSummary": SecretSummary, "SecretVersion": SecretVersion, "SecretVersionSummary": SecretVersionSummary, + "SourceRegionInformation": SourceRegionInformation, "SshKeyGenerationContext": SshKeyGenerationContext, "TargetSystemDetails": TargetSystemDetails, "UpdateSecretDetails": UpdateSecretDetails diff --git a/src/oci/vault/models/create_secret_details.py b/src/oci/vault/models/create_secret_details.py index 165c22b852..4054c346af 100644 --- a/src/oci/vault/models/create_secret_details.py +++ b/src/oci/vault/models/create_secret_details.py @@ -48,6 +48,10 @@ def __init__(self, **kwargs): The value to assign to the secret_content property of this CreateSecretDetails. :type secret_content: oci.vault.models.SecretContentDetails + :param replication_config: + The value to assign to the replication_config property of this CreateSecretDetails. + :type replication_config: oci.vault.models.ReplicationConfig + :param rotation_config: The value to assign to the rotation_config property of this CreateSecretDetails. :type rotation_config: oci.vault.models.RotationConfig @@ -81,6 +85,7 @@ def __init__(self, **kwargs): 'key_id': 'str', 'metadata': 'dict(str, object)', 'secret_content': 'SecretContentDetails', + 'replication_config': 'ReplicationConfig', 'rotation_config': 'RotationConfig', 'secret_name': 'str', 'secret_rules': 'list[SecretRule]', @@ -96,6 +101,7 @@ def __init__(self, **kwargs): 'key_id': 'keyId', 'metadata': 'metadata', 'secret_content': 'secretContent', + 'replication_config': 'replicationConfig', 'rotation_config': 'rotationConfig', 'secret_name': 'secretName', 'secret_rules': 'secretRules', @@ -110,6 +116,7 @@ def __init__(self, **kwargs): self._key_id = None self._metadata = None self._secret_content = None + self._replication_config = None self._rotation_config = None self._secret_name = None self._secret_rules = None @@ -301,6 +308,26 @@ def secret_content(self, secret_content): """ self._secret_content = secret_content + @property + def replication_config(self): + """ + Gets the replication_config of this CreateSecretDetails. + + :return: The replication_config of this CreateSecretDetails. + :rtype: oci.vault.models.ReplicationConfig + """ + return self._replication_config + + @replication_config.setter + def replication_config(self, replication_config): + """ + Sets the replication_config of this CreateSecretDetails. + + :param replication_config: The replication_config of this CreateSecretDetails. + :type: oci.vault.models.ReplicationConfig + """ + self._replication_config = replication_config + @property def rotation_config(self): """ diff --git a/src/oci/vault/models/replication_config.py b/src/oci/vault/models/replication_config.py new file mode 100644 index 0000000000..13bf10aae5 --- /dev/null +++ b/src/oci/vault/models/replication_config.py @@ -0,0 +1,101 @@ +# coding: utf-8 +# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20180608 + + +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 ReplicationConfig(object): + """ + Defines the configuration that enables cross-region secret replication. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ReplicationConfig object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param replication_targets: + The value to assign to the replication_targets property of this ReplicationConfig. + :type replication_targets: list[oci.vault.models.ReplicationTarget] + + :param is_write_forward_enabled: + The value to assign to the is_write_forward_enabled property of this ReplicationConfig. + :type is_write_forward_enabled: bool + + """ + self.swagger_types = { + 'replication_targets': 'list[ReplicationTarget]', + 'is_write_forward_enabled': 'bool' + } + self.attribute_map = { + 'replication_targets': 'replicationTargets', + 'is_write_forward_enabled': 'isWriteForwardEnabled' + } + self._replication_targets = None + self._is_write_forward_enabled = None + + @property + def replication_targets(self): + """ + **[Required]** Gets the replication_targets of this ReplicationConfig. + List of the secret replication targets. By default, a maximum of 3 targets is allowed. To configure more than 3 targets, an override is required. + + + :return: The replication_targets of this ReplicationConfig. + :rtype: list[oci.vault.models.ReplicationTarget] + """ + return self._replication_targets + + @replication_targets.setter + def replication_targets(self, replication_targets): + """ + Sets the replication_targets of this ReplicationConfig. + List of the secret replication targets. By default, a maximum of 3 targets is allowed. To configure more than 3 targets, an override is required. + + + :param replication_targets: The replication_targets of this ReplicationConfig. + :type: list[oci.vault.models.ReplicationTarget] + """ + self._replication_targets = replication_targets + + @property + def is_write_forward_enabled(self): + """ + Gets the is_write_forward_enabled of this ReplicationConfig. + (Optional) A Boolean value to enable forwarding of write requests from replicated secrets to the source secrets. The default value of false disables this option. + + + :return: The is_write_forward_enabled of this ReplicationConfig. + :rtype: bool + """ + return self._is_write_forward_enabled + + @is_write_forward_enabled.setter + def is_write_forward_enabled(self, is_write_forward_enabled): + """ + Sets the is_write_forward_enabled of this ReplicationConfig. + (Optional) A Boolean value to enable forwarding of write requests from replicated secrets to the source secrets. The default value of false disables this option. + + + :param is_write_forward_enabled: The is_write_forward_enabled of this ReplicationConfig. + :type: bool + """ + self._is_write_forward_enabled = is_write_forward_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/vault/models/replication_target.py b/src/oci/vault/models/replication_target.py new file mode 100644 index 0000000000..6e9dc35603 --- /dev/null +++ b/src/oci/vault/models/replication_target.py @@ -0,0 +1,132 @@ +# coding: utf-8 +# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20180608 + + +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 ReplicationTarget(object): + """ + Details for the target that the source secret will be replicated to. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ReplicationTarget object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param target_key_id: + The value to assign to the target_key_id property of this ReplicationTarget. + :type target_key_id: str + + :param target_region: + The value to assign to the target_region property of this ReplicationTarget. + :type target_region: str + + :param target_vault_id: + The value to assign to the target_vault_id property of this ReplicationTarget. + :type target_vault_id: str + + """ + self.swagger_types = { + 'target_key_id': 'str', + 'target_region': 'str', + 'target_vault_id': 'str' + } + self.attribute_map = { + 'target_key_id': 'targetKeyId', + 'target_region': 'targetRegion', + 'target_vault_id': 'targetVaultId' + } + self._target_key_id = None + self._target_region = None + self._target_vault_id = None + + @property + def target_key_id(self): + """ + **[Required]** Gets the target_key_id of this ReplicationTarget. + The OCID of the target region KMS key. + + + :return: The target_key_id of this ReplicationTarget. + :rtype: str + """ + return self._target_key_id + + @target_key_id.setter + def target_key_id(self, target_key_id): + """ + Sets the target_key_id of this ReplicationTarget. + The OCID of the target region KMS key. + + + :param target_key_id: The target_key_id of this ReplicationTarget. + :type: str + """ + self._target_key_id = target_key_id + + @property + def target_region(self): + """ + **[Required]** Gets the target_region of this ReplicationTarget. + The name of the target's region. + + + :return: The target_region of this ReplicationTarget. + :rtype: str + """ + return self._target_region + + @target_region.setter + def target_region(self, target_region): + """ + Sets the target_region of this ReplicationTarget. + The name of the target's region. + + + :param target_region: The target_region of this ReplicationTarget. + :type: str + """ + self._target_region = target_region + + @property + def target_vault_id(self): + """ + **[Required]** Gets the target_vault_id of this ReplicationTarget. + The OCID of the target region's Vault. + + + :return: The target_vault_id of this ReplicationTarget. + :rtype: str + """ + return self._target_vault_id + + @target_vault_id.setter + def target_vault_id(self, target_vault_id): + """ + Sets the target_vault_id of this ReplicationTarget. + The OCID of the target region's Vault. + + + :param target_vault_id: The target_vault_id of this ReplicationTarget. + :type: str + """ + self._target_vault_id = target_vault_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/vault/models/secret.py b/src/oci/vault/models/secret.py index d7a158f933..093b9031e4 100644 --- a/src/oci/vault/models/secret.py +++ b/src/oci/vault/models/secret.py @@ -114,6 +114,18 @@ def __init__(self, **kwargs): The value to assign to the metadata property of this Secret. :type metadata: dict(str, object) + :param replication_config: + The value to assign to the replication_config property of this Secret. + :type replication_config: oci.vault.models.ReplicationConfig + + :param is_replica: + The value to assign to the is_replica property of this Secret. + :type is_replica: bool + + :param source_region_information: + The value to assign to the source_region_information property of this Secret. + :type source_region_information: oci.vault.models.SourceRegionInformation + :param rotation_config: The value to assign to the rotation_config property of this Secret. :type rotation_config: oci.vault.models.RotationConfig @@ -176,6 +188,9 @@ def __init__(self, **kwargs): 'lifecycle_details': 'str', 'lifecycle_state': 'str', 'metadata': 'dict(str, object)', + 'replication_config': 'ReplicationConfig', + 'is_replica': 'bool', + 'source_region_information': 'SourceRegionInformation', 'rotation_config': 'RotationConfig', 'rotation_status': 'str', 'last_rotation_time': 'datetime', @@ -200,6 +215,9 @@ def __init__(self, **kwargs): 'lifecycle_details': 'lifecycleDetails', 'lifecycle_state': 'lifecycleState', 'metadata': 'metadata', + 'replication_config': 'replicationConfig', + 'is_replica': 'isReplica', + 'source_region_information': 'sourceRegionInformation', 'rotation_config': 'rotationConfig', 'rotation_status': 'rotationStatus', 'last_rotation_time': 'lastRotationTime', @@ -223,6 +241,9 @@ def __init__(self, **kwargs): self._lifecycle_details = None self._lifecycle_state = None self._metadata = None + self._replication_config = None + self._is_replica = None + self._source_region_information = None self._rotation_config = None self._rotation_status = None self._last_rotation_time = None @@ -502,6 +523,70 @@ def metadata(self, metadata): """ self._metadata = metadata + @property + def replication_config(self): + """ + Gets the replication_config of this Secret. + + :return: The replication_config of this Secret. + :rtype: oci.vault.models.ReplicationConfig + """ + return self._replication_config + + @replication_config.setter + def replication_config(self, replication_config): + """ + Sets the replication_config of this Secret. + + :param replication_config: The replication_config of this Secret. + :type: oci.vault.models.ReplicationConfig + """ + self._replication_config = replication_config + + @property + def is_replica(self): + """ + Gets the is_replica of this Secret. + A Boolean value that indicates whether the secret is a source or replica secret. + + + :return: The is_replica of this Secret. + :rtype: bool + """ + return self._is_replica + + @is_replica.setter + def is_replica(self, is_replica): + """ + Sets the is_replica of this Secret. + A Boolean value that indicates whether the secret is a source or replica secret. + + + :param is_replica: The is_replica of this Secret. + :type: bool + """ + self._is_replica = is_replica + + @property + def source_region_information(self): + """ + Gets the source_region_information of this Secret. + + :return: The source_region_information of this Secret. + :rtype: oci.vault.models.SourceRegionInformation + """ + return self._source_region_information + + @source_region_information.setter + def source_region_information(self, source_region_information): + """ + Sets the source_region_information of this Secret. + + :param source_region_information: The source_region_information of this Secret. + :type: oci.vault.models.SourceRegionInformation + """ + self._source_region_information = source_region_information + @property def rotation_config(self): """ diff --git a/src/oci/vault/models/secret_summary.py b/src/oci/vault/models/secret_summary.py index 5b69ab6d01..0fc32cfd97 100644 --- a/src/oci/vault/models/secret_summary.py +++ b/src/oci/vault/models/secret_summary.py @@ -94,6 +94,18 @@ def __init__(self, **kwargs): Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type lifecycle_state: str + :param replication_config: + The value to assign to the replication_config property of this SecretSummary. + :type replication_config: oci.vault.models.ReplicationConfig + + :param is_replica: + The value to assign to the is_replica property of this SecretSummary. + :type is_replica: bool + + :param source_region_information: + The value to assign to the source_region_information property of this SecretSummary. + :type source_region_information: oci.vault.models.SourceRegionInformation + :param rotation_config: The value to assign to the rotation_config property of this SecretSummary. :type rotation_config: oci.vault.models.RotationConfig @@ -149,6 +161,9 @@ def __init__(self, **kwargs): 'id': 'str', 'lifecycle_details': 'str', 'lifecycle_state': 'str', + 'replication_config': 'ReplicationConfig', + 'is_replica': 'bool', + 'source_region_information': 'SourceRegionInformation', 'rotation_config': 'RotationConfig', 'rotation_status': 'str', 'last_rotation_time': 'datetime', @@ -171,6 +186,9 @@ def __init__(self, **kwargs): 'id': 'id', 'lifecycle_details': 'lifecycleDetails', 'lifecycle_state': 'lifecycleState', + 'replication_config': 'replicationConfig', + 'is_replica': 'isReplica', + 'source_region_information': 'sourceRegionInformation', 'rotation_config': 'rotationConfig', 'rotation_status': 'rotationStatus', 'last_rotation_time': 'lastRotationTime', @@ -192,6 +210,9 @@ def __init__(self, **kwargs): self._id = None self._lifecycle_details = None self._lifecycle_state = None + self._replication_config = None + self._is_replica = None + self._source_region_information = None self._rotation_config = None self._rotation_status = None self._last_rotation_time = None @@ -446,6 +467,70 @@ def lifecycle_state(self, lifecycle_state): lifecycle_state = 'UNKNOWN_ENUM_VALUE' self._lifecycle_state = lifecycle_state + @property + def replication_config(self): + """ + Gets the replication_config of this SecretSummary. + + :return: The replication_config of this SecretSummary. + :rtype: oci.vault.models.ReplicationConfig + """ + return self._replication_config + + @replication_config.setter + def replication_config(self, replication_config): + """ + Sets the replication_config of this SecretSummary. + + :param replication_config: The replication_config of this SecretSummary. + :type: oci.vault.models.ReplicationConfig + """ + self._replication_config = replication_config + + @property + def is_replica(self): + """ + Gets the is_replica of this SecretSummary. + A Boolean value that indicates whether the secret is a source or replica secret. + + + :return: The is_replica of this SecretSummary. + :rtype: bool + """ + return self._is_replica + + @is_replica.setter + def is_replica(self, is_replica): + """ + Sets the is_replica of this SecretSummary. + A Boolean value that indicates whether the secret is a source or replica secret. + + + :param is_replica: The is_replica of this SecretSummary. + :type: bool + """ + self._is_replica = is_replica + + @property + def source_region_information(self): + """ + Gets the source_region_information of this SecretSummary. + + :return: The source_region_information of this SecretSummary. + :rtype: oci.vault.models.SourceRegionInformation + """ + return self._source_region_information + + @source_region_information.setter + def source_region_information(self, source_region_information): + """ + Sets the source_region_information of this SecretSummary. + + :param source_region_information: The source_region_information of this SecretSummary. + :type: oci.vault.models.SourceRegionInformation + """ + self._source_region_information = source_region_information + @property def rotation_config(self): """ diff --git a/src/oci/vault/models/source_region_information.py b/src/oci/vault/models/source_region_information.py new file mode 100644 index 0000000000..556f907b6e --- /dev/null +++ b/src/oci/vault/models/source_region_information.py @@ -0,0 +1,132 @@ +# coding: utf-8 +# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20180608 + + +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 SourceRegionInformation(object): + """ + Details for the source that the source secret has. + """ + + def __init__(self, **kwargs): + """ + Initializes a new SourceRegionInformation object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param source_key_id: + The value to assign to the source_key_id property of this SourceRegionInformation. + :type source_key_id: str + + :param source_region: + The value to assign to the source_region property of this SourceRegionInformation. + :type source_region: str + + :param source_vault_id: + The value to assign to the source_vault_id property of this SourceRegionInformation. + :type source_vault_id: str + + """ + self.swagger_types = { + 'source_key_id': 'str', + 'source_region': 'str', + 'source_vault_id': 'str' + } + self.attribute_map = { + 'source_key_id': 'sourceKeyId', + 'source_region': 'sourceRegion', + 'source_vault_id': 'sourceVaultId' + } + self._source_key_id = None + self._source_region = None + self._source_vault_id = None + + @property + def source_key_id(self): + """ + **[Required]** Gets the source_key_id of this SourceRegionInformation. + The OCID of the source region KMS key. + + + :return: The source_key_id of this SourceRegionInformation. + :rtype: str + """ + return self._source_key_id + + @source_key_id.setter + def source_key_id(self, source_key_id): + """ + Sets the source_key_id of this SourceRegionInformation. + The OCID of the source region KMS key. + + + :param source_key_id: The source_key_id of this SourceRegionInformation. + :type: str + """ + self._source_key_id = source_key_id + + @property + def source_region(self): + """ + **[Required]** Gets the source_region of this SourceRegionInformation. + The name of the source's region. + + + :return: The source_region of this SourceRegionInformation. + :rtype: str + """ + return self._source_region + + @source_region.setter + def source_region(self, source_region): + """ + Sets the source_region of this SourceRegionInformation. + The name of the source's region. + + + :param source_region: The source_region of this SourceRegionInformation. + :type: str + """ + self._source_region = source_region + + @property + def source_vault_id(self): + """ + **[Required]** Gets the source_vault_id of this SourceRegionInformation. + The OCID of the source region's Vault. + + + :return: The source_vault_id of this SourceRegionInformation. + :rtype: str + """ + return self._source_vault_id + + @source_vault_id.setter + def source_vault_id(self, source_vault_id): + """ + Sets the source_vault_id of this SourceRegionInformation. + The OCID of the source region's Vault. + + + :param source_vault_id: The source_vault_id of this SourceRegionInformation. + :type: str + """ + self._source_vault_id = source_vault_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/vault/models/update_secret_details.py b/src/oci/vault/models/update_secret_details.py index a6fd406097..46bb9006ca 100644 --- a/src/oci/vault/models/update_secret_details.py +++ b/src/oci/vault/models/update_secret_details.py @@ -44,6 +44,10 @@ def __init__(self, **kwargs): The value to assign to the secret_content property of this UpdateSecretDetails. :type secret_content: oci.vault.models.SecretContentDetails + :param replication_config: + The value to assign to the replication_config property of this UpdateSecretDetails. + :type replication_config: oci.vault.models.ReplicationConfig + :param rotation_config: The value to assign to the rotation_config property of this UpdateSecretDetails. :type rotation_config: oci.vault.models.RotationConfig @@ -68,6 +72,7 @@ def __init__(self, **kwargs): 'freeform_tags': 'dict(str, str)', 'metadata': 'dict(str, object)', 'secret_content': 'SecretContentDetails', + 'replication_config': 'ReplicationConfig', 'rotation_config': 'RotationConfig', 'secret_rules': 'list[SecretRule]', 'secret_generation_context': 'SecretGenerationContext', @@ -80,6 +85,7 @@ def __init__(self, **kwargs): 'freeform_tags': 'freeformTags', 'metadata': 'metadata', 'secret_content': 'secretContent', + 'replication_config': 'replicationConfig', 'rotation_config': 'rotationConfig', 'secret_rules': 'secretRules', 'secret_generation_context': 'secretGenerationContext', @@ -91,6 +97,7 @@ def __init__(self, **kwargs): self._freeform_tags = None self._metadata = None self._secret_content = None + self._replication_config = None self._rotation_config = None self._secret_rules = None self._secret_generation_context = None @@ -260,6 +267,26 @@ def secret_content(self, secret_content): """ self._secret_content = secret_content + @property + def replication_config(self): + """ + Gets the replication_config of this UpdateSecretDetails. + + :return: The replication_config of this UpdateSecretDetails. + :rtype: oci.vault.models.ReplicationConfig + """ + return self._replication_config + + @replication_config.setter + def replication_config(self, replication_config): + """ + Sets the replication_config of this UpdateSecretDetails. + + :param replication_config: The replication_config of this UpdateSecretDetails. + :type: oci.vault.models.ReplicationConfig + """ + self._replication_config = replication_config + @property def rotation_config(self): """ diff --git a/src/oci/version.py b/src/oci/version.py index 59ac2ec5dd..c32e36203a 100644 --- a/src/oci/version.py +++ b/src/oci/version.py @@ -2,4 +2,4 @@ # Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. -__version__ = "2.156.0" +__version__ = "2.157.0"