diff --git a/CHANGELOG.rst b/CHANGELOG.rst index a1aadf00b..6f9e3abda 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -3,6 +3,17 @@ Change Log All notable changes to this project will be documented in this file. The format is based on `Keep a Changelog `_. +==================== +2.126.4 - 2024-05-21 +==================== + +Added +----- +* Support for the Resource Scheduler service +* Support for Bring Your Own Container (BYOC), custom networking and graceful termination of pipelines in the Data Science service +* Support for backup and replacement of master, utility, and edge nodes in the Big Data service +* Support for nested resource principal in the Data Science service + ==================== 2.126.3 - 2024-05-14 ==================== diff --git a/docs/api/bds.rst b/docs/api/bds.rst index e9f5c5a55..84dcbeb66 100644 --- a/docs/api/bds.rst +++ b/docs/api/bds.rst @@ -37,6 +37,7 @@ Bds oci.bds.models.AutoScalePolicyRule oci.bds.models.AutoScalingConfiguration oci.bds.models.AutoScalingConfigurationSummary + oci.bds.models.BackupNodeDetails oci.bds.models.BatchingBasedPatchingConfigs oci.bds.models.BdsApiKey oci.bds.models.BdsApiKeySummary @@ -54,7 +55,9 @@ Bds oci.bds.models.CreateBdsApiKeyDetails oci.bds.models.CreateBdsInstanceDetails oci.bds.models.CreateBdsMetastoreConfigurationDetails + oci.bds.models.CreateNodeBackupConfigurationDetails oci.bds.models.CreateNodeDetails + oci.bds.models.CreateNodeReplaceConfigurationDetails oci.bds.models.DayBasedHorizontalScalingScheduleDetails oci.bds.models.DayBasedVerticalScalingScheduleDetails oci.bds.models.DefaultError @@ -68,6 +71,7 @@ Bds oci.bds.models.InstallOsPatchDetails oci.bds.models.InstallPatchDetails oci.bds.models.KerberosDetails + oci.bds.models.LevelTypeDetails oci.bds.models.MetricBasedHorizontalScaleInConfig oci.bds.models.MetricBasedHorizontalScaleOutConfig oci.bds.models.MetricBasedHorizontalScalingPolicyDetails @@ -77,6 +81,14 @@ Bds oci.bds.models.MetricThresholdRule oci.bds.models.NetworkConfig oci.bds.models.Node + oci.bds.models.NodeBackup + oci.bds.models.NodeBackupConfiguration + oci.bds.models.NodeBackupConfigurationSummary + oci.bds.models.NodeBackupSummary + oci.bds.models.NodeLevelDetails + oci.bds.models.NodeReplaceConfiguration + oci.bds.models.NodeReplaceConfigurationSummary + oci.bds.models.NodeTypeLevelDetails oci.bds.models.OsPatchDetails oci.bds.models.OsPatchPackageSummary oci.bds.models.OsPatchSummary @@ -87,7 +99,9 @@ Bds oci.bds.models.RemoveCloudSqlDetails oci.bds.models.RemoveKafkaDetails oci.bds.models.RemoveNodeDetails + oci.bds.models.RemoveNodeReplaceConfigurationDetails oci.bds.models.RenewCertificateDetails + oci.bds.models.ReplaceNodeDetails oci.bds.models.RestartNodeDetails oci.bds.models.ScheduleBasedHorizontalScalingPolicyDetails oci.bds.models.ScheduleBasedVerticalScalingPolicyDetails @@ -104,6 +118,8 @@ Bds oci.bds.models.UpdateBdsMetastoreConfigurationDetails oci.bds.models.UpdateMetricBasedHorizontalScalingPolicyDetails oci.bds.models.UpdateMetricBasedVerticalScalingPolicyDetails + oci.bds.models.UpdateNodeBackupConfigurationDetails + oci.bds.models.UpdateNodeReplaceConfigurationDetails oci.bds.models.UpdateScheduleBasedHorizontalScalingPolicyDetails oci.bds.models.UpdateScheduleBasedVerticalScalingPolicyDetails oci.bds.models.VerticalScalingScheduleDetails diff --git a/docs/api/bds/models/oci.bds.models.BackupNodeDetails.rst b/docs/api/bds/models/oci.bds.models.BackupNodeDetails.rst new file mode 100644 index 000000000..8c390950d --- /dev/null +++ b/docs/api/bds/models/oci.bds.models.BackupNodeDetails.rst @@ -0,0 +1,11 @@ +BackupNodeDetails +================= + +.. currentmodule:: oci.bds.models + +.. autoclass:: BackupNodeDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/bds/models/oci.bds.models.CreateNodeBackupConfigurationDetails.rst b/docs/api/bds/models/oci.bds.models.CreateNodeBackupConfigurationDetails.rst new file mode 100644 index 000000000..078e63a3e --- /dev/null +++ b/docs/api/bds/models/oci.bds.models.CreateNodeBackupConfigurationDetails.rst @@ -0,0 +1,11 @@ +CreateNodeBackupConfigurationDetails +==================================== + +.. currentmodule:: oci.bds.models + +.. autoclass:: CreateNodeBackupConfigurationDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/bds/models/oci.bds.models.CreateNodeReplaceConfigurationDetails.rst b/docs/api/bds/models/oci.bds.models.CreateNodeReplaceConfigurationDetails.rst new file mode 100644 index 000000000..b77453c8e --- /dev/null +++ b/docs/api/bds/models/oci.bds.models.CreateNodeReplaceConfigurationDetails.rst @@ -0,0 +1,11 @@ +CreateNodeReplaceConfigurationDetails +===================================== + +.. currentmodule:: oci.bds.models + +.. autoclass:: CreateNodeReplaceConfigurationDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/bds/models/oci.bds.models.LevelTypeDetails.rst b/docs/api/bds/models/oci.bds.models.LevelTypeDetails.rst new file mode 100644 index 000000000..853eae1bd --- /dev/null +++ b/docs/api/bds/models/oci.bds.models.LevelTypeDetails.rst @@ -0,0 +1,11 @@ +LevelTypeDetails +================ + +.. currentmodule:: oci.bds.models + +.. autoclass:: LevelTypeDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/bds/models/oci.bds.models.NodeBackup.rst b/docs/api/bds/models/oci.bds.models.NodeBackup.rst new file mode 100644 index 000000000..b3aa01381 --- /dev/null +++ b/docs/api/bds/models/oci.bds.models.NodeBackup.rst @@ -0,0 +1,11 @@ +NodeBackup +========== + +.. currentmodule:: oci.bds.models + +.. autoclass:: NodeBackup + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/bds/models/oci.bds.models.NodeBackupConfiguration.rst b/docs/api/bds/models/oci.bds.models.NodeBackupConfiguration.rst new file mode 100644 index 000000000..b8c279682 --- /dev/null +++ b/docs/api/bds/models/oci.bds.models.NodeBackupConfiguration.rst @@ -0,0 +1,11 @@ +NodeBackupConfiguration +======================= + +.. currentmodule:: oci.bds.models + +.. autoclass:: NodeBackupConfiguration + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/bds/models/oci.bds.models.NodeBackupConfigurationSummary.rst b/docs/api/bds/models/oci.bds.models.NodeBackupConfigurationSummary.rst new file mode 100644 index 000000000..7982717a1 --- /dev/null +++ b/docs/api/bds/models/oci.bds.models.NodeBackupConfigurationSummary.rst @@ -0,0 +1,11 @@ +NodeBackupConfigurationSummary +============================== + +.. currentmodule:: oci.bds.models + +.. autoclass:: NodeBackupConfigurationSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/bds/models/oci.bds.models.NodeBackupSummary.rst b/docs/api/bds/models/oci.bds.models.NodeBackupSummary.rst new file mode 100644 index 000000000..c98461b2c --- /dev/null +++ b/docs/api/bds/models/oci.bds.models.NodeBackupSummary.rst @@ -0,0 +1,11 @@ +NodeBackupSummary +================= + +.. currentmodule:: oci.bds.models + +.. autoclass:: NodeBackupSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/bds/models/oci.bds.models.NodeLevelDetails.rst b/docs/api/bds/models/oci.bds.models.NodeLevelDetails.rst new file mode 100644 index 000000000..7e84668ef --- /dev/null +++ b/docs/api/bds/models/oci.bds.models.NodeLevelDetails.rst @@ -0,0 +1,11 @@ +NodeLevelDetails +================ + +.. currentmodule:: oci.bds.models + +.. autoclass:: NodeLevelDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/bds/models/oci.bds.models.NodeReplaceConfiguration.rst b/docs/api/bds/models/oci.bds.models.NodeReplaceConfiguration.rst new file mode 100644 index 000000000..4c4e52c7e --- /dev/null +++ b/docs/api/bds/models/oci.bds.models.NodeReplaceConfiguration.rst @@ -0,0 +1,11 @@ +NodeReplaceConfiguration +======================== + +.. currentmodule:: oci.bds.models + +.. autoclass:: NodeReplaceConfiguration + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/bds/models/oci.bds.models.NodeReplaceConfigurationSummary.rst b/docs/api/bds/models/oci.bds.models.NodeReplaceConfigurationSummary.rst new file mode 100644 index 000000000..b4ecedc95 --- /dev/null +++ b/docs/api/bds/models/oci.bds.models.NodeReplaceConfigurationSummary.rst @@ -0,0 +1,11 @@ +NodeReplaceConfigurationSummary +=============================== + +.. currentmodule:: oci.bds.models + +.. autoclass:: NodeReplaceConfigurationSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/bds/models/oci.bds.models.NodeTypeLevelDetails.rst b/docs/api/bds/models/oci.bds.models.NodeTypeLevelDetails.rst new file mode 100644 index 000000000..de5ec28a0 --- /dev/null +++ b/docs/api/bds/models/oci.bds.models.NodeTypeLevelDetails.rst @@ -0,0 +1,11 @@ +NodeTypeLevelDetails +==================== + +.. currentmodule:: oci.bds.models + +.. autoclass:: NodeTypeLevelDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/bds/models/oci.bds.models.RemoveNodeReplaceConfigurationDetails.rst b/docs/api/bds/models/oci.bds.models.RemoveNodeReplaceConfigurationDetails.rst new file mode 100644 index 000000000..2cbc26beb --- /dev/null +++ b/docs/api/bds/models/oci.bds.models.RemoveNodeReplaceConfigurationDetails.rst @@ -0,0 +1,11 @@ +RemoveNodeReplaceConfigurationDetails +===================================== + +.. currentmodule:: oci.bds.models + +.. autoclass:: RemoveNodeReplaceConfigurationDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/bds/models/oci.bds.models.ReplaceNodeDetails.rst b/docs/api/bds/models/oci.bds.models.ReplaceNodeDetails.rst new file mode 100644 index 000000000..e0608a16e --- /dev/null +++ b/docs/api/bds/models/oci.bds.models.ReplaceNodeDetails.rst @@ -0,0 +1,11 @@ +ReplaceNodeDetails +================== + +.. currentmodule:: oci.bds.models + +.. autoclass:: ReplaceNodeDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/bds/models/oci.bds.models.UpdateNodeBackupConfigurationDetails.rst b/docs/api/bds/models/oci.bds.models.UpdateNodeBackupConfigurationDetails.rst new file mode 100644 index 000000000..edb0a4d68 --- /dev/null +++ b/docs/api/bds/models/oci.bds.models.UpdateNodeBackupConfigurationDetails.rst @@ -0,0 +1,11 @@ +UpdateNodeBackupConfigurationDetails +==================================== + +.. currentmodule:: oci.bds.models + +.. autoclass:: UpdateNodeBackupConfigurationDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/bds/models/oci.bds.models.UpdateNodeReplaceConfigurationDetails.rst b/docs/api/bds/models/oci.bds.models.UpdateNodeReplaceConfigurationDetails.rst new file mode 100644 index 000000000..f291525d4 --- /dev/null +++ b/docs/api/bds/models/oci.bds.models.UpdateNodeReplaceConfigurationDetails.rst @@ -0,0 +1,11 @@ +UpdateNodeReplaceConfigurationDetails +===================================== + +.. currentmodule:: oci.bds.models + +.. autoclass:: UpdateNodeReplaceConfigurationDetails + :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 f6fbe8955..a3693421a 100644 --- a/docs/api/data_science.rst +++ b/docs/api/data_science.rst @@ -101,6 +101,10 @@ Data Science oci.data_science.models.OcirModelDeploymentEnvironmentConfigurationDetails oci.data_science.models.Pipeline oci.data_science.models.PipelineConfigurationDetails + oci.data_science.models.PipelineContainerConfigurationDetails + oci.data_science.models.PipelineContainerStepDetails + oci.data_science.models.PipelineContainerStepRun + oci.data_science.models.PipelineContainerStepUpdateDetails oci.data_science.models.PipelineCustomScriptStepDetails oci.data_science.models.PipelineCustomScriptStepRun oci.data_science.models.PipelineCustomScriptStepUpdateDetails @@ -110,6 +114,7 @@ Data Science oci.data_science.models.PipelineMLJobStepDetails oci.data_science.models.PipelineMLJobStepRun oci.data_science.models.PipelineMLJobStepUpdateDetails + oci.data_science.models.PipelineOcirContainerConfigurationDetails oci.data_science.models.PipelineRun oci.data_science.models.PipelineRunLogDetails oci.data_science.models.PipelineRunSummary diff --git a/docs/api/data_science/models/oci.data_science.models.PipelineContainerConfigurationDetails.rst b/docs/api/data_science/models/oci.data_science.models.PipelineContainerConfigurationDetails.rst new file mode 100644 index 000000000..093070115 --- /dev/null +++ b/docs/api/data_science/models/oci.data_science.models.PipelineContainerConfigurationDetails.rst @@ -0,0 +1,11 @@ +PipelineContainerConfigurationDetails +===================================== + +.. currentmodule:: oci.data_science.models + +.. autoclass:: PipelineContainerConfigurationDetails + :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.PipelineContainerStepDetails.rst b/docs/api/data_science/models/oci.data_science.models.PipelineContainerStepDetails.rst new file mode 100644 index 000000000..c71fd8aa5 --- /dev/null +++ b/docs/api/data_science/models/oci.data_science.models.PipelineContainerStepDetails.rst @@ -0,0 +1,11 @@ +PipelineContainerStepDetails +============================ + +.. currentmodule:: oci.data_science.models + +.. autoclass:: PipelineContainerStepDetails + :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.PipelineContainerStepRun.rst b/docs/api/data_science/models/oci.data_science.models.PipelineContainerStepRun.rst new file mode 100644 index 000000000..82587d6cf --- /dev/null +++ b/docs/api/data_science/models/oci.data_science.models.PipelineContainerStepRun.rst @@ -0,0 +1,11 @@ +PipelineContainerStepRun +======================== + +.. currentmodule:: oci.data_science.models + +.. autoclass:: PipelineContainerStepRun + :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.PipelineContainerStepUpdateDetails.rst b/docs/api/data_science/models/oci.data_science.models.PipelineContainerStepUpdateDetails.rst new file mode 100644 index 000000000..857b77f7e --- /dev/null +++ b/docs/api/data_science/models/oci.data_science.models.PipelineContainerStepUpdateDetails.rst @@ -0,0 +1,11 @@ +PipelineContainerStepUpdateDetails +================================== + +.. currentmodule:: oci.data_science.models + +.. autoclass:: PipelineContainerStepUpdateDetails + :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.PipelineOcirContainerConfigurationDetails.rst b/docs/api/data_science/models/oci.data_science.models.PipelineOcirContainerConfigurationDetails.rst new file mode 100644 index 000000000..412689f43 --- /dev/null +++ b/docs/api/data_science/models/oci.data_science.models.PipelineOcirContainerConfigurationDetails.rst @@ -0,0 +1,11 @@ +PipelineOcirContainerConfigurationDetails +========================================= + +.. currentmodule:: oci.data_science.models + +.. autoclass:: PipelineOcirContainerConfigurationDetails + :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 ab0ec42db..b5518ea61 100644 --- a/docs/api/landing.rst +++ b/docs/api/landing.rst @@ -190,6 +190,7 @@ API Reference * :doc:`Rover Cluster ` * :doc:`Rover Entitlement ` * :doc:`Rover Node ` +* :doc:`Schedule ` * :doc:`Scheduled Job ` * :doc:`Sddc ` * :doc:`Secrets ` @@ -376,6 +377,7 @@ API Reference recovery redis resource_manager + resource_scheduler resource_search rover sch diff --git a/docs/api/resource_scheduler.rst b/docs/api/resource_scheduler.rst new file mode 100644 index 000000000..68232bd07 --- /dev/null +++ b/docs/api/resource_scheduler.rst @@ -0,0 +1,43 @@ +Resource Scheduler +================== + +.. autosummary:: + :toctree: resource_scheduler/client + :nosignatures: + :template: autosummary/service_client.rst + + oci.resource_scheduler.ScheduleClient + oci.resource_scheduler.ScheduleClientCompositeOperations + +-------- + Models +-------- + +.. autosummary:: + :toctree: resource_scheduler/models + :nosignatures: + :template: autosummary/model_class.rst + + oci.resource_scheduler.models.CompartmentIdResourceFilter + oci.resource_scheduler.models.CreateScheduleDetails + oci.resource_scheduler.models.DefinedTagFilterValue + oci.resource_scheduler.models.DefinedTagsResourceFilter + oci.resource_scheduler.models.LifecycleStateResourceFilter + oci.resource_scheduler.models.Resource + oci.resource_scheduler.models.ResourceFilter + oci.resource_scheduler.models.ResourceType + oci.resource_scheduler.models.ResourceTypeCollection + oci.resource_scheduler.models.ResourceTypeResourceFilter + oci.resource_scheduler.models.Schedule + oci.resource_scheduler.models.ScheduleCollection + oci.resource_scheduler.models.ScheduleSummary + oci.resource_scheduler.models.TimeCreatedResourceFilter + oci.resource_scheduler.models.UpdateScheduleDetails + oci.resource_scheduler.models.WorkRequest + oci.resource_scheduler.models.WorkRequestError + oci.resource_scheduler.models.WorkRequestErrorCollection + oci.resource_scheduler.models.WorkRequestLogEntry + oci.resource_scheduler.models.WorkRequestLogEntryCollection + oci.resource_scheduler.models.WorkRequestResource + oci.resource_scheduler.models.WorkRequestSummary + oci.resource_scheduler.models.WorkRequestSummaryCollection diff --git a/docs/api/resource_scheduler/client/oci.resource_scheduler.ScheduleClient.rst b/docs/api/resource_scheduler/client/oci.resource_scheduler.ScheduleClient.rst new file mode 100644 index 000000000..10f251eb8 --- /dev/null +++ b/docs/api/resource_scheduler/client/oci.resource_scheduler.ScheduleClient.rst @@ -0,0 +1,8 @@ +ScheduleClient +============== + +.. currentmodule:: oci.resource_scheduler + +.. autoclass:: ScheduleClient + :special-members: __init__ + :members: \ No newline at end of file diff --git a/docs/api/resource_scheduler/client/oci.resource_scheduler.ScheduleClientCompositeOperations.rst b/docs/api/resource_scheduler/client/oci.resource_scheduler.ScheduleClientCompositeOperations.rst new file mode 100644 index 000000000..55fbf61b9 --- /dev/null +++ b/docs/api/resource_scheduler/client/oci.resource_scheduler.ScheduleClientCompositeOperations.rst @@ -0,0 +1,8 @@ +ScheduleClientCompositeOperations +================================= + +.. currentmodule:: oci.resource_scheduler + +.. autoclass:: ScheduleClientCompositeOperations + :special-members: __init__ + :members: \ No newline at end of file diff --git a/docs/api/resource_scheduler/models/oci.resource_scheduler.models.CompartmentIdResourceFilter.rst b/docs/api/resource_scheduler/models/oci.resource_scheduler.models.CompartmentIdResourceFilter.rst new file mode 100644 index 000000000..855c08620 --- /dev/null +++ b/docs/api/resource_scheduler/models/oci.resource_scheduler.models.CompartmentIdResourceFilter.rst @@ -0,0 +1,11 @@ +CompartmentIdResourceFilter +=========================== + +.. currentmodule:: oci.resource_scheduler.models + +.. autoclass:: CompartmentIdResourceFilter + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/resource_scheduler/models/oci.resource_scheduler.models.CreateScheduleDetails.rst b/docs/api/resource_scheduler/models/oci.resource_scheduler.models.CreateScheduleDetails.rst new file mode 100644 index 000000000..07b758ae4 --- /dev/null +++ b/docs/api/resource_scheduler/models/oci.resource_scheduler.models.CreateScheduleDetails.rst @@ -0,0 +1,11 @@ +CreateScheduleDetails +===================== + +.. currentmodule:: oci.resource_scheduler.models + +.. autoclass:: CreateScheduleDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/resource_scheduler/models/oci.resource_scheduler.models.DefinedTagFilterValue.rst b/docs/api/resource_scheduler/models/oci.resource_scheduler.models.DefinedTagFilterValue.rst new file mode 100644 index 000000000..ef1b644cf --- /dev/null +++ b/docs/api/resource_scheduler/models/oci.resource_scheduler.models.DefinedTagFilterValue.rst @@ -0,0 +1,11 @@ +DefinedTagFilterValue +===================== + +.. currentmodule:: oci.resource_scheduler.models + +.. autoclass:: DefinedTagFilterValue + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/resource_scheduler/models/oci.resource_scheduler.models.DefinedTagsResourceFilter.rst b/docs/api/resource_scheduler/models/oci.resource_scheduler.models.DefinedTagsResourceFilter.rst new file mode 100644 index 000000000..923ed858e --- /dev/null +++ b/docs/api/resource_scheduler/models/oci.resource_scheduler.models.DefinedTagsResourceFilter.rst @@ -0,0 +1,11 @@ +DefinedTagsResourceFilter +========================= + +.. currentmodule:: oci.resource_scheduler.models + +.. autoclass:: DefinedTagsResourceFilter + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/resource_scheduler/models/oci.resource_scheduler.models.LifecycleStateResourceFilter.rst b/docs/api/resource_scheduler/models/oci.resource_scheduler.models.LifecycleStateResourceFilter.rst new file mode 100644 index 000000000..92541011f --- /dev/null +++ b/docs/api/resource_scheduler/models/oci.resource_scheduler.models.LifecycleStateResourceFilter.rst @@ -0,0 +1,11 @@ +LifecycleStateResourceFilter +============================ + +.. currentmodule:: oci.resource_scheduler.models + +.. autoclass:: LifecycleStateResourceFilter + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/resource_scheduler/models/oci.resource_scheduler.models.Resource.rst b/docs/api/resource_scheduler/models/oci.resource_scheduler.models.Resource.rst new file mode 100644 index 000000000..99908eb0a --- /dev/null +++ b/docs/api/resource_scheduler/models/oci.resource_scheduler.models.Resource.rst @@ -0,0 +1,11 @@ +Resource +======== + +.. currentmodule:: oci.resource_scheduler.models + +.. autoclass:: Resource + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/resource_scheduler/models/oci.resource_scheduler.models.ResourceFilter.rst b/docs/api/resource_scheduler/models/oci.resource_scheduler.models.ResourceFilter.rst new file mode 100644 index 000000000..94f5785c6 --- /dev/null +++ b/docs/api/resource_scheduler/models/oci.resource_scheduler.models.ResourceFilter.rst @@ -0,0 +1,11 @@ +ResourceFilter +============== + +.. currentmodule:: oci.resource_scheduler.models + +.. autoclass:: ResourceFilter + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/resource_scheduler/models/oci.resource_scheduler.models.ResourceType.rst b/docs/api/resource_scheduler/models/oci.resource_scheduler.models.ResourceType.rst new file mode 100644 index 000000000..6e5490718 --- /dev/null +++ b/docs/api/resource_scheduler/models/oci.resource_scheduler.models.ResourceType.rst @@ -0,0 +1,11 @@ +ResourceType +============ + +.. currentmodule:: oci.resource_scheduler.models + +.. autoclass:: ResourceType + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/resource_scheduler/models/oci.resource_scheduler.models.ResourceTypeCollection.rst b/docs/api/resource_scheduler/models/oci.resource_scheduler.models.ResourceTypeCollection.rst new file mode 100644 index 000000000..5fb011103 --- /dev/null +++ b/docs/api/resource_scheduler/models/oci.resource_scheduler.models.ResourceTypeCollection.rst @@ -0,0 +1,11 @@ +ResourceTypeCollection +====================== + +.. currentmodule:: oci.resource_scheduler.models + +.. autoclass:: ResourceTypeCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/resource_scheduler/models/oci.resource_scheduler.models.ResourceTypeResourceFilter.rst b/docs/api/resource_scheduler/models/oci.resource_scheduler.models.ResourceTypeResourceFilter.rst new file mode 100644 index 000000000..2385d9144 --- /dev/null +++ b/docs/api/resource_scheduler/models/oci.resource_scheduler.models.ResourceTypeResourceFilter.rst @@ -0,0 +1,11 @@ +ResourceTypeResourceFilter +========================== + +.. currentmodule:: oci.resource_scheduler.models + +.. autoclass:: ResourceTypeResourceFilter + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/resource_scheduler/models/oci.resource_scheduler.models.Schedule.rst b/docs/api/resource_scheduler/models/oci.resource_scheduler.models.Schedule.rst new file mode 100644 index 000000000..e44127990 --- /dev/null +++ b/docs/api/resource_scheduler/models/oci.resource_scheduler.models.Schedule.rst @@ -0,0 +1,11 @@ +Schedule +======== + +.. currentmodule:: oci.resource_scheduler.models + +.. autoclass:: Schedule + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/resource_scheduler/models/oci.resource_scheduler.models.ScheduleCollection.rst b/docs/api/resource_scheduler/models/oci.resource_scheduler.models.ScheduleCollection.rst new file mode 100644 index 000000000..2954cf075 --- /dev/null +++ b/docs/api/resource_scheduler/models/oci.resource_scheduler.models.ScheduleCollection.rst @@ -0,0 +1,11 @@ +ScheduleCollection +================== + +.. currentmodule:: oci.resource_scheduler.models + +.. autoclass:: ScheduleCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/resource_scheduler/models/oci.resource_scheduler.models.ScheduleSummary.rst b/docs/api/resource_scheduler/models/oci.resource_scheduler.models.ScheduleSummary.rst new file mode 100644 index 000000000..4e114f0bf --- /dev/null +++ b/docs/api/resource_scheduler/models/oci.resource_scheduler.models.ScheduleSummary.rst @@ -0,0 +1,11 @@ +ScheduleSummary +=============== + +.. currentmodule:: oci.resource_scheduler.models + +.. autoclass:: ScheduleSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/resource_scheduler/models/oci.resource_scheduler.models.TimeCreatedResourceFilter.rst b/docs/api/resource_scheduler/models/oci.resource_scheduler.models.TimeCreatedResourceFilter.rst new file mode 100644 index 000000000..35b00ab25 --- /dev/null +++ b/docs/api/resource_scheduler/models/oci.resource_scheduler.models.TimeCreatedResourceFilter.rst @@ -0,0 +1,11 @@ +TimeCreatedResourceFilter +========================= + +.. currentmodule:: oci.resource_scheduler.models + +.. autoclass:: TimeCreatedResourceFilter + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/resource_scheduler/models/oci.resource_scheduler.models.UpdateScheduleDetails.rst b/docs/api/resource_scheduler/models/oci.resource_scheduler.models.UpdateScheduleDetails.rst new file mode 100644 index 000000000..5cdbccdf6 --- /dev/null +++ b/docs/api/resource_scheduler/models/oci.resource_scheduler.models.UpdateScheduleDetails.rst @@ -0,0 +1,11 @@ +UpdateScheduleDetails +===================== + +.. currentmodule:: oci.resource_scheduler.models + +.. autoclass:: UpdateScheduleDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/resource_scheduler/models/oci.resource_scheduler.models.WorkRequest.rst b/docs/api/resource_scheduler/models/oci.resource_scheduler.models.WorkRequest.rst new file mode 100644 index 000000000..1a4aae51a --- /dev/null +++ b/docs/api/resource_scheduler/models/oci.resource_scheduler.models.WorkRequest.rst @@ -0,0 +1,11 @@ +WorkRequest +=========== + +.. currentmodule:: oci.resource_scheduler.models + +.. autoclass:: WorkRequest + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/resource_scheduler/models/oci.resource_scheduler.models.WorkRequestError.rst b/docs/api/resource_scheduler/models/oci.resource_scheduler.models.WorkRequestError.rst new file mode 100644 index 000000000..a444b6498 --- /dev/null +++ b/docs/api/resource_scheduler/models/oci.resource_scheduler.models.WorkRequestError.rst @@ -0,0 +1,11 @@ +WorkRequestError +================ + +.. currentmodule:: oci.resource_scheduler.models + +.. autoclass:: WorkRequestError + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/resource_scheduler/models/oci.resource_scheduler.models.WorkRequestErrorCollection.rst b/docs/api/resource_scheduler/models/oci.resource_scheduler.models.WorkRequestErrorCollection.rst new file mode 100644 index 000000000..d683abee4 --- /dev/null +++ b/docs/api/resource_scheduler/models/oci.resource_scheduler.models.WorkRequestErrorCollection.rst @@ -0,0 +1,11 @@ +WorkRequestErrorCollection +========================== + +.. currentmodule:: oci.resource_scheduler.models + +.. autoclass:: WorkRequestErrorCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/resource_scheduler/models/oci.resource_scheduler.models.WorkRequestLogEntry.rst b/docs/api/resource_scheduler/models/oci.resource_scheduler.models.WorkRequestLogEntry.rst new file mode 100644 index 000000000..ef0109ff1 --- /dev/null +++ b/docs/api/resource_scheduler/models/oci.resource_scheduler.models.WorkRequestLogEntry.rst @@ -0,0 +1,11 @@ +WorkRequestLogEntry +=================== + +.. currentmodule:: oci.resource_scheduler.models + +.. autoclass:: WorkRequestLogEntry + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/resource_scheduler/models/oci.resource_scheduler.models.WorkRequestLogEntryCollection.rst b/docs/api/resource_scheduler/models/oci.resource_scheduler.models.WorkRequestLogEntryCollection.rst new file mode 100644 index 000000000..163d1ad63 --- /dev/null +++ b/docs/api/resource_scheduler/models/oci.resource_scheduler.models.WorkRequestLogEntryCollection.rst @@ -0,0 +1,11 @@ +WorkRequestLogEntryCollection +============================= + +.. currentmodule:: oci.resource_scheduler.models + +.. autoclass:: WorkRequestLogEntryCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/resource_scheduler/models/oci.resource_scheduler.models.WorkRequestResource.rst b/docs/api/resource_scheduler/models/oci.resource_scheduler.models.WorkRequestResource.rst new file mode 100644 index 000000000..280de9d6e --- /dev/null +++ b/docs/api/resource_scheduler/models/oci.resource_scheduler.models.WorkRequestResource.rst @@ -0,0 +1,11 @@ +WorkRequestResource +=================== + +.. currentmodule:: oci.resource_scheduler.models + +.. autoclass:: WorkRequestResource + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/resource_scheduler/models/oci.resource_scheduler.models.WorkRequestSummary.rst b/docs/api/resource_scheduler/models/oci.resource_scheduler.models.WorkRequestSummary.rst new file mode 100644 index 000000000..0478990f6 --- /dev/null +++ b/docs/api/resource_scheduler/models/oci.resource_scheduler.models.WorkRequestSummary.rst @@ -0,0 +1,11 @@ +WorkRequestSummary +================== + +.. currentmodule:: oci.resource_scheduler.models + +.. autoclass:: WorkRequestSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/resource_scheduler/models/oci.resource_scheduler.models.WorkRequestSummaryCollection.rst b/docs/api/resource_scheduler/models/oci.resource_scheduler.models.WorkRequestSummaryCollection.rst new file mode 100644 index 000000000..e879ef846 --- /dev/null +++ b/docs/api/resource_scheduler/models/oci.resource_scheduler.models.WorkRequestSummaryCollection.rst @@ -0,0 +1,11 @@ +WorkRequestSummaryCollection +============================ + +.. currentmodule:: oci.resource_scheduler.models + +.. autoclass:: WorkRequestSummaryCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/examples/showoci/CHANGELOG.rst b/examples/showoci/CHANGELOG.rst index ad8a3a249..22f58fc54 100644 --- a/examples/showoci/CHANGELOG.rst +++ b/examples/showoci/CHANGELOG.rst @@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file. The format is based on `Keep a Changelog `_. +===================== +24.05.24 - 24.05.24 +===================== +* IAM Domains - Change way members fetched for groups to avoid limit of 10,000 members in one call +* Added option to filter IAM Domain name using ifilter, allowed comma seperated +* Fix ExaCC CSV Extract bug + ===================== 24.05.17 - 24.05.17 ===================== diff --git a/examples/showoci/showoci.py b/examples/showoci/showoci.py index 3caecb5f4..283e51a60 100644 --- a/examples/showoci/showoci.py +++ b/examples/showoci/showoci.py @@ -128,7 +128,7 @@ import os import time -version = "24.05.17" +version = "24.05.24" ########################################################################## # check OCI version @@ -346,6 +346,7 @@ def set_parser_arguments(argsList=[]): parser.add_argument('-iold', action='store_true', default=False, dest='identity_old', help='Print Identity from the old APIs when choosing identity extract.') parser.add_argument('-ic', action='store_true', default=False, dest='identity_compartments', help='Print Identity Compartments only.') parser.add_argument('-isc', action='store_true', default=False, dest='skip_identity_user_credential', help='Skip Identity User Credential extract.') + parser.add_argument('-ifilter', default="", dest='ifilter', help='Filter IAM domains by Domain Names using comma seperated') parser.add_argument('-s', '-api', '-rm', '-fun', action='store_true', default=False, dest='streams_queues', help='Print API, Functions, Resource management, Gateways, Streams and Queues.') @@ -493,6 +494,9 @@ def set_service_extract_flags(cmd): if cmd.exclude: prm.exclude = str(cmd.exclude).split(",") + if cmd.ifilter: + prm.iam_domain_name_filter = str(cmd.ifilter).split(",") + if cmd.excludelist: prm.excludelist = True diff --git a/examples/showoci/showoci_data.py b/examples/showoci/showoci_data.py index e7ae6985c..89b6214ec 100644 --- a/examples/showoci/showoci_data.py +++ b/examples/showoci/showoci_data.py @@ -20,7 +20,7 @@ class ShowOCIData(object): - version = "24.05.17" + version = "24.05.24" ############################################ # ShowOCIService - Service object to query diff --git a/examples/showoci/showoci_output.py b/examples/showoci/showoci_output.py index 7ce74bd05..edfad4f48 100644 --- a/examples/showoci/showoci_output.py +++ b/examples/showoci/showoci_output.py @@ -22,7 +22,7 @@ class ShowOCIOutput(object): - version = "24.05.17" + version = "24.05.24" ########################################################################## # spaces for align @@ -4922,6 +4922,8 @@ def __csv_identity_domains_users(self, users, domain_name, domain_id): def __csv_identity_domains_groups(self, groups, domain_name, domain_id): try: for var in groups: + members = "Over 200 members" if len(var['members']) > 200 else str(','.join(x['name'] for x in var['members'])) + members_ids = "Over 200 members" if len(var['members']) > 200 else str(','.join(x['ocid'] for x in var['members'])) data = { 'domain_id': domain_id, 'domain_name': domain_name, @@ -4944,8 +4946,8 @@ def __csv_identity_domains_groups(self, groups, domain_name, domain_id): 'tags': str(','.join(x['key'] + "=" + x['value'] for x in var['tags'])), 'freeform_tags': self.__get_freeform_tags(var['freeform_tags']), 'defined_tags': self.__get_defined_tags(var['defined_tags']), - 'members': str(','.join(x['name'] for x in var['members'])), - 'members_ids': str(','.join(x['ocid'] for x in var['members'])), + 'members': members, + 'members_ids': members_ids, 'description': var['ext_group']['description'], 'creation_mechanism': var['ext_group']['creation_mechanism'], 'password_policy': var['ext_group']['password_policy'], @@ -6475,8 +6477,6 @@ def __csv_database_db_exacc(self, region_name, list_exa): 'cluster_count': len(dbs['vm_clusters']), 'cluster_names': str(', '.join(x['display_name'] for x in dbs['vm_clusters'])), 'time_created': dbs['time_created'], - 'kms_key_id': dbs['kms_key_id'], - 'vault_id': dbs['vault_id'], 'freeform_tags': self.__get_freeform_tags(dbs['freeform_tags']), 'defined_tags': self.__get_defined_tags(dbs['defined_tags']), 'maintenance_window': dbs['maintenance_window']['display'] if dbs['maintenance_window'] else "", @@ -6592,7 +6592,7 @@ def __csv_database_db_exacc(self, region_name, list_exa): for pdb in db['pdbs']: data = { 'region_name': region_name, - 'availability_domain': dbs['availability_domain'], + 'availability_domain': 'ExaCC', 'compartment_name': dbs['compartment_name'], 'compartment_path': dbs['compartment_path'], 'name': pdb['name'], diff --git a/examples/showoci/showoci_service.py b/examples/showoci/showoci_service.py index f85a8fe24..7b6163b29 100644 --- a/examples/showoci/showoci_service.py +++ b/examples/showoci/showoci_service.py @@ -39,7 +39,7 @@ # class ShowOCIService ########################################################################## class ShowOCIService(object): - version = "24.05.17" + version = "24.05.24" oci_compatible_version = "2.125.0" thread_lock = threading.Lock() collection_ljust = 40 @@ -298,6 +298,10 @@ class ShowOCIService(object): EXCLUDE_KMS = "KMS" EXCLUDE_GENAI = 'GENAI' EXCLUDE_DATASAFE = 'DATASAFE' + EXCLUDE_NOSQL = 'NOSQL' + EXCLUDE_MYSQL = 'MYSQL' + EXCLUDE_POSTGRESQL = 'POSTGRESQL' + EXCLUDE_GOLDENGATE = 'GOLDENGATE' ########################################################################## # Service not yet available - need to remove on availability @@ -8533,11 +8537,11 @@ def __load_section_database_main(self): database_client = self.__create_client(oci.database.DatabaseClient) virtual_network = self.__create_client(oci.core.VirtualNetworkClient) - nosql_client = self.__create_client(oci.nosql.NosqlClient) - mysql_client = self.__create_client(oci.mysql.DbSystemClient) - mysql_backup_client = self.__create_client(oci.mysql.DbBackupsClient) - postgresql_client = self.__create_client(oci.psql.PostgresqlClient) - gg_client = self.__create_client(oci.golden_gate.GoldenGateClient) + nosql_client = self.__create_client(oci.nosql.NosqlClient, key=self.EXCLUDE_NOSQL) + mysql_client = self.__create_client(oci.mysql.DbSystemClient, key=self.EXCLUDE_MYSQL) + mysql_backup_client = self.__create_client(oci.mysql.DbBackupsClient, key=self.EXCLUDE_MYSQL) + postgresql_client = self.__create_client(oci.psql.PostgresqlClient, key=self.EXCLUDE_POSTGRESQL) + gg_client = self.__create_client(oci.golden_gate.GoldenGateClient, key=self.EXCLUDE_GOLDENGATE) datasafe_client = self.__create_client(oci.data_safe.DataSafeClient, key=self.EXCLUDE_DATASAFE) # reference to compartments @@ -11163,6 +11167,10 @@ def __load_database_nosql(self, nosql_client, compartments): header = "NOSQL Databases" self.__load_print_status_with_threads(header) + if not nosql_client: + self.__load_print_thread_exclude(header) + return data + # loop on all compartments for compartment in compartments: @@ -11258,6 +11266,10 @@ def __load_database_mysql(self, mysql_client, compartments): header = "MYSQL Databases" self.__load_print_status_with_threads(header) + if not mysql_client: + self.__load_print_thread_exclude(header) + return data + # loop on all compartments for compartment in compartments: @@ -11427,6 +11439,10 @@ def __load_database_mysql_backups(self, mysql_backup_client, compartments): self.__load_print_status_with_threads(header) + if not mysql_backup_client: + self.__load_print_thread_exclude(header) + return data + # loop on all compartments for compartment in compartments: @@ -11524,6 +11540,10 @@ def __load_database_postgresql(self, postgresql_client, compartments): header = "PostgreSQL Databases" self.__load_print_status_with_threads(header) + if not postgresql_client: + self.__load_print_thread_exclude(header) + return data + # loop on all compartments for compartment in compartments: @@ -11693,6 +11713,10 @@ def __load_database_postgresql_backups(self, postgresql_client, compartments): self.__load_print_status_with_threads(header) + if not postgresql_client: + self.__load_print_thread_exclude(header) + return data + # loop on all compartments for compartment in compartments: @@ -11875,6 +11899,10 @@ def __load_database_gg_deployments(self, gg_client, compartments): header = "Golden Gate Deployments" self.__load_print_status_with_threads(header) + if not gg_client: + self.__load_print_thread_exclude(header) + return data + # loop on all compartments for compartment in compartments: @@ -11971,6 +11999,10 @@ def __load_database_gg_db_registration(self, gg_client, compartments): header = "Golden Gate DB Reg." self.__load_print_status_with_threads(header) + if not gg_client: + self.__load_print_thread_exclude(header) + return data + # loop on all compartments for compartment in compartments: @@ -18832,6 +18864,7 @@ class ShowOCIFlags(object): skip_dbhomes = False excludelist = False exclude = [] + iam_domain_name_filter = [] connection_timeout = 20 read_timeout = 150 read_announcement_days = 30 @@ -18933,6 +18966,7 @@ class ShowOCIDomains(object): skip_threads = False thread_lock = threading.Lock() collection_ljust = 40 + iam_domain_name_filter = [] ########################################################################## # init class @@ -18944,6 +18978,7 @@ def __init__(self, config, signer, flags): self.config = config self.signer = signer self.read_timeout = flags.read_timeout + self.iam_domain_name_filter = flags.iam_domain_name_filter self.connection_timeout = flags.connection_timeout self.skip_identity_user_credential = flags.skip_identity_user_credential self.proxy = flags.proxy @@ -19378,6 +19413,31 @@ def __list_call_get_all_results_generator_domains(self, list_func_ref, *list_fun else: keep_paginating = False + ################################################################################## + # load_identity_users_to_group_members + ################################################################################## + def __load_identity_users_to_group_members(self, domain_users, domain_groups): + try: + + # loop on all groups: + for grp in domain_groups: + group_ocid = grp['ocid'] + + # loop on users to match group by ocid + for user in domain_users: + for member_group in user['groups']: + if member_group['ocid'] == group_ocid: + val = { + 'date_added': member_group['date_added'], + 'ocid': user['ocid'], + 'membership_ocid': member_group['membership_ocid'], + 'name': user['user_name'] + } + grp['members'].append(val) + + except Exception as e: + self.__print_error(e) + ################################################################################## # load_identity_domain_users ################################################################################## @@ -19828,9 +19888,12 @@ def __load_identity_domain_groups(self, identity_domain_client, domain_name): start_time = time.time() try: + # Change to default attribute-set to remove the members + # this to avoid error when there are over 10,000 members + # compile members based on users info groups = self.__list_call_get_all_results( identity_domain_client.list_groups, - attribute_sets=["all"], + attribute_sets=["default"], sort_by="DisplayName", count=500, retry_strategy=oci.retry.DEFAULT_RETRY_STRATEGY @@ -19865,16 +19928,7 @@ def __load_identity_domain_groups(self, identity_domain_client, domain_name): 'tags': [{'key': x.key, 'value': x.value} for x in var.tags] if var.tags else [], 'freeform_tags': self.__get_tags(var.urn_ietf_params_scim_schemas_oracle_idcs_extension_oci_tags, False), 'defined_tags': self.__get_tags(var.urn_ietf_params_scim_schemas_oracle_idcs_extension_oci_tags, True), - 'members': [{ - 'value': self.get_value(x.value), - 'date_added': self.get_date(x.date_added), - 'ocid': self.get_value(x.ocid), - 'membership_ocid': self.get_value(x.membership_ocid), - 'ref': self.get_value(x.ref), - 'display': self.get_value(x.display), - 'type': self.get_value(x.type), - 'name': self.get_value(x.name) - } for x in var.members] if var.members else [], + 'members': [], 'ext_group': { 'description': self.get_value(ext_group.description) if ext_group else "", 'creation_mechanism': self.get_value(ext_group.creation_mechanism) if ext_group else "", @@ -20440,7 +20494,10 @@ def __load_identity_domain_password_policies(self, identity_domain_client, domai def load_identity_domains_main(self, compartments): compartment = {} try: - print("Identity Domains...") + if self.iam_domain_name_filter: + print("Identity Domains... Filtered...") + else: + print("Identity Domains...") # create identity object identity_client = oci.identity.IdentityClient( @@ -20474,6 +20531,10 @@ def load_identity_domains_main(self, compartments): # oci.identity.models.DomainSummary for domain in list_domains: + if self.iam_domain_name_filter: + if self.get_value(domain.display_name) not in self.iam_domain_name_filter: + continue + domain_data = { 'id': self.get_value(domain.id), 'display_name': self.get_value(domain.display_name), @@ -20550,6 +20611,7 @@ def load_identity_domains_main(self, compartments): domain_data['authentication_factor_settings'] = next(as_completed([future_authentication_factor_settings])).result() domain_data['password_policies'] = next(as_completed([future_password_policies])).result() + self.__load_identity_users_to_group_members(domain_data['users'], domain_data['groups']) self.data.append(domain_data) print('') diff --git a/src/oci/__init__.py b/src/oci/__init__.py index b1f23a7fe..fda61ff48 100644 --- a/src/oci/__init__.py +++ b/src/oci/__init__.py @@ -19,7 +19,7 @@ else: __all__ = [ "BaseClient", "Error", "Request", "Response", "Signer", "config", "constants", "decorators", "exceptions", "regions", "wait_until", "pagination", "auth", "retry", "fips", "circuit_breaker", "alloy", - "access_governance_cp", "adm", "ai_anomaly_detection", "ai_document", "ai_language", "ai_speech", "ai_vision", "analytics", "announcements_service", "apigateway", "apm_config", "apm_control_plane", "apm_synthetics", "apm_traces", "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", "desktops", "devops", "disaster_recovery", "dns", "dts", "em_warehouse", "email", "email_data_plane", "events", "file_storage", "fleet_software_update", "functions", "fusion_apps", "generative_ai", "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", "management_agent", "management_dashboard", "marketplace", "marketplace_private_offer", "marketplace_publisher", "media_services", "monitoring", "mysql", "network_firewall", "network_load_balancer", "nosql", "object_storage", "oce", "oci_control_center", "ocvp", "oda", "onesubscription", "ons", "opa", "opensearch", "operator_access_control", "opsi", "optimizer", "os_management", "os_management_hub", "osp_gateway", "osub_billing_schedule", "osub_organization_subscription", "osub_subscription", "osub_usage", "psql", "queue", "recovery", "redis", "resource_manager", "resource_search", "rover", "sch", "secrets", "service_catalog", "service_manager_proxy", "service_mesh", "stack_monitoring", "streaming", "tenant_manager_control_plane", "threat_intelligence", "usage", "usage_api", "vault", "vbs_inst", "visual_builder", "vn_monitoring", "vulnerability_scanning", "waa", "waas", "waf", "work_requests" + "access_governance_cp", "adm", "ai_anomaly_detection", "ai_document", "ai_language", "ai_speech", "ai_vision", "analytics", "announcements_service", "apigateway", "apm_config", "apm_control_plane", "apm_synthetics", "apm_traces", "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", "desktops", "devops", "disaster_recovery", "dns", "dts", "em_warehouse", "email", "email_data_plane", "events", "file_storage", "fleet_software_update", "functions", "fusion_apps", "generative_ai", "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", "management_agent", "management_dashboard", "marketplace", "marketplace_private_offer", "marketplace_publisher", "media_services", "monitoring", "mysql", "network_firewall", "network_load_balancer", "nosql", "object_storage", "oce", "oci_control_center", "ocvp", "oda", "onesubscription", "ons", "opa", "opensearch", "operator_access_control", "opsi", "optimizer", "os_management", "os_management_hub", "osp_gateway", "osub_billing_schedule", "osub_organization_subscription", "osub_subscription", "osub_usage", "psql", "queue", "recovery", "redis", "resource_manager", "resource_scheduler", "resource_search", "rover", "sch", "secrets", "service_catalog", "service_manager_proxy", "service_mesh", "stack_monitoring", "streaming", "tenant_manager_control_plane", "threat_intelligence", "usage", "usage_api", "vault", "vbs_inst", "visual_builder", "vn_monitoring", "vulnerability_scanning", "waa", "waas", "waf", "work_requests" ] if sys.version_info >= (3, 7) and os.getenv("OCI_PYTHON_SDK_LAZY_IMPORTS_DISABLED", "False").lower() != "true": def __getattr__(x): @@ -30,4 +30,4 @@ def __getattr__(x): return importlib.import_module(__name__ + "." + x) raise AttributeError("module " + __name__ + " has no attribute" + x) else: - from . import access_governance_cp, adm, ai_anomaly_detection, ai_document, ai_language, ai_speech, ai_vision, analytics, announcements_service, apigateway, apm_config, apm_control_plane, apm_synthetics, apm_traces, 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, desktops, devops, disaster_recovery, dns, dts, em_warehouse, email, email_data_plane, events, file_storage, fleet_software_update, functions, fusion_apps, generative_ai, 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, management_agent, management_dashboard, marketplace, marketplace_private_offer, marketplace_publisher, media_services, monitoring, mysql, network_firewall, network_load_balancer, nosql, object_storage, oce, oci_control_center, ocvp, oda, onesubscription, ons, opa, opensearch, operator_access_control, opsi, optimizer, os_management, os_management_hub, osp_gateway, osub_billing_schedule, osub_organization_subscription, osub_subscription, osub_usage, psql, queue, recovery, redis, resource_manager, resource_search, rover, sch, secrets, service_catalog, service_manager_proxy, service_mesh, stack_monitoring, streaming, tenant_manager_control_plane, threat_intelligence, usage, usage_api, vault, vbs_inst, visual_builder, vn_monitoring, vulnerability_scanning, waa, waas, waf, work_requests + from . import access_governance_cp, adm, ai_anomaly_detection, ai_document, ai_language, ai_speech, ai_vision, analytics, announcements_service, apigateway, apm_config, apm_control_plane, apm_synthetics, apm_traces, 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, desktops, devops, disaster_recovery, dns, dts, em_warehouse, email, email_data_plane, events, file_storage, fleet_software_update, functions, fusion_apps, generative_ai, 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, management_agent, management_dashboard, marketplace, marketplace_private_offer, marketplace_publisher, media_services, monitoring, mysql, network_firewall, network_load_balancer, nosql, object_storage, oce, oci_control_center, ocvp, oda, onesubscription, ons, opa, opensearch, operator_access_control, opsi, optimizer, os_management, os_management_hub, osp_gateway, osub_billing_schedule, osub_organization_subscription, osub_subscription, osub_usage, psql, queue, recovery, redis, resource_manager, resource_scheduler, resource_search, rover, sch, secrets, service_catalog, service_manager_proxy, service_mesh, stack_monitoring, streaming, tenant_manager_control_plane, threat_intelligence, usage, usage_api, vault, vbs_inst, visual_builder, vn_monitoring, vulnerability_scanning, waa, waas, waf, work_requests diff --git a/src/oci/bds/bds_client.py b/src/oci/bds/bds_client.py index 917f62e97..611856466 100644 --- a/src/oci/bds/bds_client.py +++ b/src/oci/bds/bds_client.py @@ -1064,6 +1064,124 @@ def add_worker_nodes(self, bds_instance_id, add_worker_nodes_details, **kwargs): api_reference_link=api_reference_link, required_arguments=required_arguments) + def backup_node(self, bds_instance_id, backup_node_details, **kwargs): + """ + Takes a backup of of given nodes. + + + :param str bds_instance_id: (required) + The OCID of the cluster. + + :param oci.bds.models.BackupNodeDetails backup_node_details: (required) + Details for Taking the node's backup + + :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 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 backup_node API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['bdsInstanceId'] + resource_path = "/bdsInstances/{bdsInstanceId}/actions/backupNodes" + method = "POST" + operation_name = "backup_node" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/bigdata/20190531/BdsInstance/BackupNode" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "opc_request_id", + "if_match", + "opc_retry_token" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + f"backup_node got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "bdsInstanceId": bds_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), + "if-match": kwargs.get("if_match", missing), + "opc-retry-token": kwargs.get("opc_retry_token", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=backup_node_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=backup_node_details, + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + def certificate_service_info(self, bds_instance_id, certificate_service_info_details, **kwargs): """ A list of services and their certificate details. @@ -1732,26 +1850,26 @@ def create_bds_metastore_configuration(self, bds_instance_id, create_bds_metasto api_reference_link=api_reference_link, required_arguments=required_arguments) - def delete_bds_api_key(self, bds_instance_id, api_key_id, **kwargs): + def create_node_backup_configuration(self, bds_instance_id, create_node_backup_configuration_details, **kwargs): """ - Deletes the user's API key represented by the provided ID. + Add a node volume backup configuration to the cluster for an indicated node type or node. :param str bds_instance_id: (required) The OCID of the cluster. - :param str api_key_id: (required) - The API key identifier. + :param oci.bds.models.CreateNodeBackupConfigurationDetails create_node_backup_configuration_details: (required) + Details for adding nodeBackupConfiguration to the BDS cluster. :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 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. @@ -1769,30 +1887,29 @@ def delete_bds_api_key(self, bds_instance_id, api_key_id, **kwargs): :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use delete_bds_api_key API. + Click `here `__ to see an example of how to use create_node_backup_configuration API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['bdsInstanceId', 'apiKeyId'] - resource_path = "/bdsInstances/{bdsInstanceId}/apiKeys/{apiKeyId}" - method = "DELETE" - operation_name = "delete_bds_api_key" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/bigdata/20190531/BdsApiKey/DeleteBdsApiKey" + required_arguments = ['bdsInstanceId'] + resource_path = "/bdsInstances/{bdsInstanceId}/nodeBackupConfigurations" + method = "POST" + operation_name = "create_node_backup_configuration" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/bigdata/20190531/BdsInstance/CreateNodeBackupConfiguration" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "opc_request_id", - "if_match" + "opc_retry_token" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"delete_bds_api_key got unknown kwargs: {extra_kwargs!r}") + f"create_node_backup_configuration got unknown kwargs: {extra_kwargs!r}") path_params = { - "bdsInstanceId": bds_instance_id, - "apiKeyId": api_key_id + "bdsInstanceId": bds_instance_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -1805,7 +1922,7 @@ def delete_bds_api_key(self, bds_instance_id, api_key_id, **kwargs): "accept": "application/json", "content-type": "application/json", "opc-request-id": kwargs.get("opc_request_id", missing), - "if-match": kwargs.get("if_match", missing) + "opc-retry-token": kwargs.get("opc_retry_token", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} @@ -1816,6 +1933,7 @@ def delete_bds_api_key(self, bds_instance_id, api_key_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( @@ -1824,6 +1942,7 @@ def delete_bds_api_key(self, bds_instance_id, api_key_id, **kwargs): method=method, path_params=path_params, header_params=header_params, + body=create_node_backup_configuration_details, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -1834,28 +1953,32 @@ def delete_bds_api_key(self, bds_instance_id, api_key_id, **kwargs): method=method, path_params=path_params, header_params=header_params, + body=create_node_backup_configuration_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_bds_instance(self, bds_instance_id, **kwargs): + def create_node_replace_configuration(self, bds_instance_id, create_node_replace_configuration_details, **kwargs): """ - Deletes the cluster identified by the given ID. + Add a nodeReplaceConfigurations to the cluster. :param str bds_instance_id: (required) The OCID of the cluster. + :param oci.bds.models.CreateNodeReplaceConfigurationDetails create_node_replace_configuration_details: (required) + Details for adding nodeReplaceConfiguration to the BDS cluster. + :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 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. @@ -1873,26 +1996,26 @@ def delete_bds_instance(self, bds_instance_id, **kwargs): :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use delete_bds_instance API. + Click `here `__ to see an example of how to use create_node_replace_configuration API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. required_arguments = ['bdsInstanceId'] - resource_path = "/bdsInstances/{bdsInstanceId}" - method = "DELETE" - operation_name = "delete_bds_instance" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/bigdata/20190531/BdsInstance/DeleteBdsInstance" + resource_path = "/bdsInstances/{bdsInstanceId}/nodeReplaceConfigurations" + method = "POST" + operation_name = "create_node_replace_configuration" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/bigdata/20190531/BdsInstance/CreateNodeReplaceConfiguration" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "opc_request_id", - "if_match" + "opc_retry_token" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"delete_bds_instance got unknown kwargs: {extra_kwargs!r}") + f"create_node_replace_configuration got unknown kwargs: {extra_kwargs!r}") path_params = { "bdsInstanceId": bds_instance_id @@ -1908,7 +2031,7 @@ def delete_bds_instance(self, bds_instance_id, **kwargs): "accept": "application/json", "content-type": "application/json", "opc-request-id": kwargs.get("opc_request_id", missing), - "if-match": kwargs.get("if_match", missing) + "opc-retry-token": kwargs.get("opc_retry_token", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} @@ -1919,6 +2042,7 @@ def delete_bds_instance(self, bds_instance_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( @@ -1927,6 +2051,7 @@ def delete_bds_instance(self, bds_instance_id, **kwargs): method=method, path_params=path_params, header_params=header_params, + body=create_node_replace_configuration_details, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -1937,21 +2062,22 @@ def delete_bds_instance(self, bds_instance_id, **kwargs): method=method, path_params=path_params, header_params=header_params, + body=create_node_replace_configuration_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_bds_metastore_configuration(self, bds_instance_id, metastore_config_id, **kwargs): + def delete_bds_api_key(self, bds_instance_id, api_key_id, **kwargs): """ - Delete the BDS metastore configuration represented by the provided ID. + Deletes the user's API key represented by the provided ID. :param str bds_instance_id: (required) The OCID of the cluster. - :param str metastore_config_id: (required) - The metastore configuration ID + :param str api_key_id: (required) + The API key identifier. :param str opc_request_id: (optional) The client request ID for tracing. @@ -1979,14 +2105,14 @@ def delete_bds_metastore_configuration(self, bds_instance_id, metastore_config_i :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use delete_bds_metastore_configuration API. + Click `here `__ to see an example of how to use delete_bds_api_key API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['bdsInstanceId', 'metastoreConfigId'] - resource_path = "/bdsInstances/{bdsInstanceId}/metastoreConfigs/{metastoreConfigId}" + required_arguments = ['bdsInstanceId', 'apiKeyId'] + resource_path = "/bdsInstances/{bdsInstanceId}/apiKeys/{apiKeyId}" method = "DELETE" - operation_name = "delete_bds_metastore_configuration" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/bigdata/20190531/BdsMetastoreConfiguration/DeleteBdsMetastoreConfiguration" + operation_name = "delete_bds_api_key" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/bigdata/20190531/BdsApiKey/DeleteBdsApiKey" # Don't accept unknown kwargs expected_kwargs = [ @@ -1998,11 +2124,11 @@ def delete_bds_metastore_configuration(self, bds_instance_id, metastore_config_i extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"delete_bds_metastore_configuration got unknown kwargs: {extra_kwargs!r}") + f"delete_bds_api_key got unknown kwargs: {extra_kwargs!r}") path_params = { "bdsInstanceId": bds_instance_id, - "metastoreConfigId": metastore_config_id + "apiKeyId": api_key_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -2049,17 +2175,14 @@ def delete_bds_metastore_configuration(self, bds_instance_id, metastore_config_i api_reference_link=api_reference_link, required_arguments=required_arguments) - def disable_certificate(self, bds_instance_id, disable_certificate_details, **kwargs): + def delete_bds_instance(self, bds_instance_id, **kwargs): """ - Disabling TLS/SSL for various ODH services running on the BDS cluster. + Deletes the cluster identified by the given ID. :param str bds_instance_id: (required) The OCID of the cluster. - :param oci.bds.models.DisableCertificateDetails disable_certificate_details: (required) - Details for disabling certificate. - :param str opc_request_id: (optional) The client request ID for tracing. @@ -2070,13 +2193,6 @@ def disable_certificate(self, bds_instance_id, disable_certificate_details, **kw The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. - :param str opc_retry_token: (optional) - A token that uniquely identifies a request so it can be retried in case of a timeout or - server error, without risk of executing that same action again. Retry tokens expire after 24 - hours but can be invalidated before then due to conflicting operations. For example, if a resource - has been deleted and purged from the system, then a retry of the original creation request - might be rejected. - :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. @@ -2093,27 +2209,26 @@ def disable_certificate(self, bds_instance_id, disable_certificate_details, **kw :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use disable_certificate API. + Click `here `__ to see an example of how to use delete_bds_instance API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. required_arguments = ['bdsInstanceId'] - resource_path = "/bdsInstances/{bdsInstanceId}/actions/disableOdhServiceCertificate" - method = "POST" - operation_name = "disable_certificate" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/bigdata/20190531/BdsInstance/DisableCertificate" + resource_path = "/bdsInstances/{bdsInstanceId}" + method = "DELETE" + operation_name = "delete_bds_instance" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/bigdata/20190531/BdsInstance/DeleteBdsInstance" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "opc_request_id", - "if_match", - "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"disable_certificate got unknown kwargs: {extra_kwargs!r}") + f"delete_bds_instance got unknown kwargs: {extra_kwargs!r}") path_params = { "bdsInstanceId": bds_instance_id @@ -2129,8 +2244,7 @@ def disable_certificate(self, bds_instance_id, disable_certificate_details, **kw "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) + "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} @@ -2141,7 +2255,6 @@ def disable_certificate(self, bds_instance_id, disable_certificate_details, **kw 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( @@ -2150,7 +2263,6 @@ def disable_certificate(self, bds_instance_id, disable_certificate_details, **kw method=method, path_params=path_params, header_params=header_params, - body=disable_certificate_details, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -2161,22 +2273,21 @@ def disable_certificate(self, bds_instance_id, disable_certificate_details, **kw method=method, path_params=path_params, header_params=header_params, - body=disable_certificate_details, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def enable_certificate(self, bds_instance_id, enable_certificate_details, **kwargs): + def delete_bds_metastore_configuration(self, bds_instance_id, metastore_config_id, **kwargs): """ - Configuring TLS/SSL for various ODH services running on the BDS cluster. + Delete the BDS metastore configuration represented by the provided ID. :param str bds_instance_id: (required) The OCID of the cluster. - :param oci.bds.models.EnableCertificateDetails enable_certificate_details: (required) - Details for configuring certificate. + :param str metastore_config_id: (required) + The metastore configuration ID :param str opc_request_id: (optional) The client request ID for tracing. @@ -2188,13 +2299,6 @@ def enable_certificate(self, bds_instance_id, enable_certificate_details, **kwar The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. - :param str opc_retry_token: (optional) - A token that uniquely identifies a request so it can be retried in case of a timeout or - server error, without risk of executing that same action again. Retry tokens expire after 24 - hours but can be invalidated before then due to conflicting operations. For example, if a resource - has been deleted and purged from the system, then a retry of the original creation request - might be rejected. - :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. @@ -2211,30 +2315,30 @@ def enable_certificate(self, bds_instance_id, enable_certificate_details, **kwar :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use enable_certificate API. + Click `here `__ to see an example of how to use delete_bds_metastore_configuration API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['bdsInstanceId'] - resource_path = "/bdsInstances/{bdsInstanceId}/actions/enableOdhServiceCertificate" - method = "POST" - operation_name = "enable_certificate" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/bigdata/20190531/BdsInstance/EnableCertificate" + required_arguments = ['bdsInstanceId', 'metastoreConfigId'] + resource_path = "/bdsInstances/{bdsInstanceId}/metastoreConfigs/{metastoreConfigId}" + method = "DELETE" + operation_name = "delete_bds_metastore_configuration" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/bigdata/20190531/BdsMetastoreConfiguration/DeleteBdsMetastoreConfiguration" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "opc_request_id", - "if_match", - "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"enable_certificate got unknown kwargs: {extra_kwargs!r}") + f"delete_bds_metastore_configuration got unknown kwargs: {extra_kwargs!r}") path_params = { - "bdsInstanceId": bds_instance_id + "bdsInstanceId": bds_instance_id, + "metastoreConfigId": metastore_config_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -2247,8 +2351,7 @@ def enable_certificate(self, bds_instance_id, enable_certificate_details, **kwar "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) + "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} @@ -2259,7 +2362,6 @@ def enable_certificate(self, bds_instance_id, enable_certificate_details, **kwar 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( @@ -2268,7 +2370,6 @@ def enable_certificate(self, bds_instance_id, enable_certificate_details, **kwar method=method, path_params=path_params, header_params=header_params, - body=enable_certificate_details, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -2279,22 +2380,21 @@ def enable_certificate(self, bds_instance_id, enable_certificate_details, **kwar method=method, path_params=path_params, header_params=header_params, - body=enable_certificate_details, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def execute_bootstrap_script(self, bds_instance_id, execute_bootstrap_script_details, **kwargs): + def delete_node_backup(self, bds_instance_id, node_backup_id, **kwargs): """ - Execute bootstrap script. + Delete the NodeBackup represented by the provided ID. :param str bds_instance_id: (required) The OCID of the cluster. - :param oci.bds.models.ExecuteBootstrapScriptDetails execute_bootstrap_script_details: (required) - Details of the bootstrap script to execute on this cluster. + :param str node_backup_id: (required) + Unique assigned identifier of the nodeBackupId. :param str opc_request_id: (optional) The client request ID for tracing. @@ -2306,13 +2406,6 @@ def execute_bootstrap_script(self, bds_instance_id, execute_bootstrap_script_det The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. - :param str opc_retry_token: (optional) - A token that uniquely identifies a request so it can be retried in case of a timeout or - server error, without risk of executing that same action again. Retry tokens expire after 24 - hours but can be invalidated before then due to conflicting operations. For example, if a resource - has been deleted and purged from the system, then a retry of the original creation request - might be rejected. - :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. @@ -2329,30 +2422,30 @@ def execute_bootstrap_script(self, bds_instance_id, execute_bootstrap_script_det :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use execute_bootstrap_script API. + Click `here `__ to see an example of how to use delete_node_backup API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['bdsInstanceId'] - resource_path = "/bdsInstances/{bdsInstanceId}/actions/executeBootstrapScript" - method = "POST" - operation_name = "execute_bootstrap_script" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/bigdata/20190531/BdsInstance/ExecuteBootstrapScript" + required_arguments = ['bdsInstanceId', 'nodeBackupId'] + resource_path = "/bdsInstances/{bdsInstanceId}/nodeBackups/{nodeBackupId}" + method = "DELETE" + operation_name = "delete_node_backup" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/bigdata/20190531/NodeBackup/DeleteNodeBackup" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "opc_request_id", - "if_match", - "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"execute_bootstrap_script got unknown kwargs: {extra_kwargs!r}") + f"delete_node_backup got unknown kwargs: {extra_kwargs!r}") path_params = { - "bdsInstanceId": bds_instance_id + "bdsInstanceId": bds_instance_id, + "nodeBackupId": node_backup_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -2365,8 +2458,7 @@ def execute_bootstrap_script(self, bds_instance_id, execute_bootstrap_script_det "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) + "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} @@ -2377,7 +2469,6 @@ def execute_bootstrap_script(self, bds_instance_id, execute_bootstrap_script_det 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( @@ -2386,7 +2477,6 @@ def execute_bootstrap_script(self, bds_instance_id, execute_bootstrap_script_det method=method, path_params=path_params, header_params=header_params, - body=execute_bootstrap_script_details, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -2397,26 +2487,32 @@ def execute_bootstrap_script(self, bds_instance_id, execute_bootstrap_script_det method=method, path_params=path_params, header_params=header_params, - body=execute_bootstrap_script_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_auto_scaling_configuration(self, bds_instance_id, auto_scaling_configuration_id, **kwargs): + def delete_node_backup_configuration(self, bds_instance_id, node_backup_configuration_id, **kwargs): """ - Returns details of the autoscale configuration identified by the given ID. + Delete the NodeBackupConfiguration represented by the provided ID. :param str bds_instance_id: (required) The OCID of the cluster. - :param str auto_scaling_configuration_id: (required) - Unique Oracle-assigned identifier of the autoscale configuration. + :param str node_backup_configuration_id: (required) + Unique Oracle-assigned identifier of the NodeBackupConfiguration. :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. @@ -2429,33 +2525,34 @@ def get_auto_scaling_configuration(self, bds_instance_id, auto_scaling_configura 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.bds.models.AutoScalingConfiguration` + :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_auto_scaling_configuration API. + Click `here `__ to see an example of how to use delete_node_backup_configuration API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['bdsInstanceId', 'autoScalingConfigurationId'] - resource_path = "/bdsInstances/{bdsInstanceId}/autoScalingConfiguration/{autoScalingConfigurationId}" - method = "GET" - operation_name = "get_auto_scaling_configuration" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/bigdata/20190531/BdsInstance/GetAutoScalingConfiguration" + required_arguments = ['bdsInstanceId', 'nodeBackupConfigurationId'] + resource_path = "/bdsInstances/{bdsInstanceId}/nodeBackupConfigurations/{nodeBackupConfigurationId}" + method = "DELETE" + operation_name = "delete_node_backup_configuration" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/bigdata/20190531/NodeBackupConfiguration/DeleteNodeBackupConfiguration" # 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_auto_scaling_configuration got unknown kwargs: {extra_kwargs!r}") + f"delete_node_backup_configuration got unknown kwargs: {extra_kwargs!r}") path_params = { "bdsInstanceId": bds_instance_id, - "autoScalingConfigurationId": auto_scaling_configuration_id + "nodeBackupConfigurationId": node_backup_configuration_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -2467,7 +2564,8 @@ def get_auto_scaling_configuration(self, bds_instance_id, auto_scaling_configura 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} @@ -2486,7 +2584,6 @@ def get_auto_scaling_configuration(self, bds_instance_id, auto_scaling_configura method=method, path_params=path_params, header_params=header_params, - response_type="AutoScalingConfiguration", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -2497,26 +2594,39 @@ def get_auto_scaling_configuration(self, bds_instance_id, auto_scaling_configura method=method, path_params=path_params, header_params=header_params, - response_type="AutoScalingConfiguration", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def get_bds_api_key(self, bds_instance_id, api_key_id, **kwargs): + def disable_certificate(self, bds_instance_id, disable_certificate_details, **kwargs): """ - Returns the user's API key information for the given ID. + Disabling TLS/SSL for various ODH services running on the BDS cluster. :param str bds_instance_id: (required) The OCID of the cluster. - :param str api_key_id: (required) - The API key identifier. + :param oci.bds.models.DisableCertificateDetails disable_certificate_details: (required) + Details for disabling certificate. :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 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. @@ -2529,33 +2639,34 @@ def get_bds_api_key(self, bds_instance_id, api_key_id, **kwargs): allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.bds.models.BdsApiKey` + :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_bds_api_key API. + Click `here `__ to see an example of how to use disable_certificate API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['bdsInstanceId', 'apiKeyId'] - resource_path = "/bdsInstances/{bdsInstanceId}/apiKeys/{apiKeyId}" - method = "GET" - operation_name = "get_bds_api_key" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/bigdata/20190531/BdsApiKey/GetBdsApiKey" + required_arguments = ['bdsInstanceId'] + resource_path = "/bdsInstances/{bdsInstanceId}/actions/disableOdhServiceCertificate" + method = "POST" + operation_name = "disable_certificate" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/bigdata/20190531/BdsInstance/DisableCertificate" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "opc_request_id" + "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"get_bds_api_key got unknown kwargs: {extra_kwargs!r}") + f"disable_certificate got unknown kwargs: {extra_kwargs!r}") path_params = { - "bdsInstanceId": bds_instance_id, - "apiKeyId": api_key_id + "bdsInstanceId": bds_instance_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -2567,7 +2678,9 @@ def get_bds_api_key(self, bds_instance_id, api_key_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), + "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} @@ -2578,6 +2691,7 @@ def get_bds_api_key(self, bds_instance_id, api_key_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( @@ -2586,7 +2700,7 @@ def get_bds_api_key(self, bds_instance_id, api_key_id, **kwargs): method=method, path_params=path_params, header_params=header_params, - response_type="BdsApiKey", + body=disable_certificate_details, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -2597,23 +2711,40 @@ def get_bds_api_key(self, bds_instance_id, api_key_id, **kwargs): method=method, path_params=path_params, header_params=header_params, - response_type="BdsApiKey", + body=disable_certificate_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_bds_instance(self, bds_instance_id, **kwargs): + def enable_certificate(self, bds_instance_id, enable_certificate_details, **kwargs): """ - Returns information about the Big Data Service cluster identified by the given ID. + Configuring TLS/SSL for various ODH services running on the BDS cluster. :param str bds_instance_id: (required) The OCID of the cluster. + :param oci.bds.models.EnableCertificateDetails enable_certificate_details: (required) + Details for configuring certificate. + :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 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. @@ -2626,29 +2757,31 @@ def get_bds_instance(self, bds_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.bds.models.BdsInstance` + :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_bds_instance API. + Click `here `__ to see an example of how to use enable_certificate API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. required_arguments = ['bdsInstanceId'] - resource_path = "/bdsInstances/{bdsInstanceId}" - method = "GET" - operation_name = "get_bds_instance" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/bigdata/20190531/BdsInstance/GetBdsInstance" + resource_path = "/bdsInstances/{bdsInstanceId}/actions/enableOdhServiceCertificate" + method = "POST" + operation_name = "enable_certificate" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/bigdata/20190531/BdsInstance/EnableCertificate" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "opc_request_id" + "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"get_bds_instance got unknown kwargs: {extra_kwargs!r}") + f"enable_certificate got unknown kwargs: {extra_kwargs!r}") path_params = { "bdsInstanceId": bds_instance_id @@ -2663,7 +2796,9 @@ def get_bds_instance(self, bds_instance_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), + "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} @@ -2674,6 +2809,7 @@ def get_bds_instance(self, bds_instance_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( @@ -2682,7 +2818,7 @@ def get_bds_instance(self, bds_instance_id, **kwargs): method=method, path_params=path_params, header_params=header_params, - response_type="BdsInstance", + body=enable_certificate_details, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -2693,26 +2829,40 @@ def get_bds_instance(self, bds_instance_id, **kwargs): method=method, path_params=path_params, header_params=header_params, - response_type="BdsInstance", + body=enable_certificate_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_bds_metastore_configuration(self, bds_instance_id, metastore_config_id, **kwargs): + def execute_bootstrap_script(self, bds_instance_id, execute_bootstrap_script_details, **kwargs): """ - Returns the BDS Metastore configuration information for the given ID. + Execute bootstrap script. :param str bds_instance_id: (required) The OCID of the cluster. - :param str metastore_config_id: (required) - The metastore configuration ID + :param oci.bds.models.ExecuteBootstrapScriptDetails execute_bootstrap_script_details: (required) + Details of the bootstrap script to execute on this cluster. :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 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. @@ -2725,33 +2875,34 @@ def get_bds_metastore_configuration(self, bds_instance_id, metastore_config_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.bds.models.BdsMetastoreConfiguration` + :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_bds_metastore_configuration API. + Click `here `__ to see an example of how to use execute_bootstrap_script API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['bdsInstanceId', 'metastoreConfigId'] - resource_path = "/bdsInstances/{bdsInstanceId}/metastoreConfigs/{metastoreConfigId}" - method = "GET" - operation_name = "get_bds_metastore_configuration" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/bigdata/20190531/BdsMetastoreConfiguration/GetBdsMetastoreConfiguration" + required_arguments = ['bdsInstanceId'] + resource_path = "/bdsInstances/{bdsInstanceId}/actions/executeBootstrapScript" + method = "POST" + operation_name = "execute_bootstrap_script" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/bigdata/20190531/BdsInstance/ExecuteBootstrapScript" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "opc_request_id" + "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"get_bds_metastore_configuration got unknown kwargs: {extra_kwargs!r}") + f"execute_bootstrap_script got unknown kwargs: {extra_kwargs!r}") path_params = { - "bdsInstanceId": bds_instance_id, - "metastoreConfigId": metastore_config_id + "bdsInstanceId": bds_instance_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -2763,7 +2914,9 @@ def get_bds_metastore_configuration(self, bds_instance_id, metastore_config_id, 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), + "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} @@ -2774,6 +2927,7 @@ def get_bds_metastore_configuration(self, bds_instance_id, metastore_config_id, 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( @@ -2782,7 +2936,7 @@ def get_bds_metastore_configuration(self, bds_instance_id, metastore_config_id, method=method, path_params=path_params, header_params=header_params, - response_type="BdsMetastoreConfiguration", + body=execute_bootstrap_script_details, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -2793,40 +2947,26 @@ def get_bds_metastore_configuration(self, bds_instance_id, metastore_config_id, method=method, path_params=path_params, header_params=header_params, - response_type="BdsMetastoreConfiguration", + body=execute_bootstrap_script_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_os_patch_details(self, bds_instance_id, os_patch_version, **kwargs): + def get_auto_scaling_configuration(self, bds_instance_id, auto_scaling_configuration_id, **kwargs): """ - Get the details of an os patch + Returns details of the autoscale configuration identified by the given ID. :param str bds_instance_id: (required) The OCID of the cluster. - :param str os_patch_version: (required) - The version of the OS patch. + :param str auto_scaling_configuration_id: (required) + Unique Oracle-assigned identifier of the autoscale configuration. :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 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. @@ -2839,34 +2979,33 @@ def get_os_patch_details(self, bds_instance_id, os_patch_version, **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.bds.models.OsPatchDetails` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.bds.models.AutoScalingConfiguration` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use get_os_patch_details API. + Click `here `__ to see an example of how to use get_auto_scaling_configuration API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['bdsInstanceId', 'osPatchVersion'] - resource_path = "/bdsInstances/{bdsInstanceId}/actions/getOsPatch" - method = "POST" - operation_name = "get_os_patch_details" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/bigdata/20190531/BdsInstance/GetOsPatchDetails" + required_arguments = ['bdsInstanceId', 'autoScalingConfigurationId'] + resource_path = "/bdsInstances/{bdsInstanceId}/autoScalingConfiguration/{autoScalingConfigurationId}" + method = "GET" + operation_name = "get_auto_scaling_configuration" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/bigdata/20190531/BdsInstance/GetAutoScalingConfiguration" # 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"get_os_patch_details got unknown kwargs: {extra_kwargs!r}") + f"get_auto_scaling_configuration got unknown kwargs: {extra_kwargs!r}") path_params = { - "bdsInstanceId": bds_instance_id + "bdsInstanceId": bds_instance_id, + "autoScalingConfigurationId": auto_scaling_configuration_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -2875,17 +3014,10 @@ def get_os_patch_details(self, bds_instance_id, os_patch_version, **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 = { - "osPatchVersion": os_patch_version - } - 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-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} @@ -2896,7 +3028,6 @@ def get_os_patch_details(self, bds_instance_id, os_patch_version, **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( @@ -2904,9 +3035,8 @@ def get_os_patch_details(self, bds_instance_id, os_patch_version, **kwargs): resource_path=resource_path, method=method, path_params=path_params, - query_params=query_params, header_params=header_params, - response_type="OsPatchDetails", + response_type="AutoScalingConfiguration", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -2916,21 +3046,23 @@ def get_os_patch_details(self, bds_instance_id, os_patch_version, **kwargs): resource_path=resource_path, method=method, path_params=path_params, - query_params=query_params, header_params=header_params, - response_type="OsPatchDetails", + response_type="AutoScalingConfiguration", 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_bds_api_key(self, bds_instance_id, api_key_id, **kwargs): """ - Returns the status of the work request identified by the given ID. + Returns the user's API key information for the given ID. - :param str work_request_id: (required) - The ID of the asynchronous request. + :param str bds_instance_id: (required) + The OCID of the cluster. + + :param str api_key_id: (required) + The API key identifier. :param str opc_request_id: (optional) The client request ID for tracing. @@ -2947,18 +3079,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.bds.models.WorkRequest` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.bds.models.BdsApiKey` :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_bds_api_key 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 = ['bdsInstanceId', 'apiKeyId'] + resource_path = "/bdsInstances/{bdsInstanceId}/apiKeys/{apiKeyId}" method = "GET" - operation_name = "get_work_request" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/bigdata/20190531/WorkRequest/GetWorkRequest" + operation_name = "get_bds_api_key" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/bigdata/20190531/BdsApiKey/GetBdsApiKey" # Don't accept unknown kwargs expected_kwargs = [ @@ -2969,10 +3101,11 @@ def get_work_request(self, work_request_id, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"get_work_request got unknown kwargs: {extra_kwargs!r}") + f"get_bds_api_key got unknown kwargs: {extra_kwargs!r}") path_params = { - "workRequestId": work_request_id + "bdsInstanceId": bds_instance_id, + "apiKeyId": api_key_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -3003,7 +3136,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="BdsApiKey", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -3014,40 +3147,23 @@ def get_work_request(self, work_request_id, **kwargs): method=method, path_params=path_params, header_params=header_params, - response_type="WorkRequest", + response_type="BdsApiKey", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def install_os_patch(self, bds_instance_id, install_os_patch_details, **kwargs): + def get_bds_instance(self, bds_instance_id, **kwargs): """ - Install an os patch on a cluster + Returns information about the Big Data Service cluster identified by the given ID. :param str bds_instance_id: (required) The OCID of the cluster. - :param oci.bds.models.InstallOsPatchDetails install_os_patch_details: (required) - Details of the target os patch that will be installed - :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 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. @@ -3060,31 +3176,29 @@ def install_os_patch(self, bds_instance_id, install_os_patch_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 None + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.bds.models.BdsInstance` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use install_os_patch API. + Click `here `__ to see an example of how to use get_bds_instance API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. required_arguments = ['bdsInstanceId'] - resource_path = "/bdsInstances/{bdsInstanceId}/actions/installOsPatch" - method = "POST" - operation_name = "install_os_patch" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/bigdata/20190531/BdsInstance/InstallOsPatch" + resource_path = "/bdsInstances/{bdsInstanceId}" + method = "GET" + operation_name = "get_bds_instance" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/bigdata/20190531/BdsInstance/GetBdsInstance" # 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"install_os_patch got unknown kwargs: {extra_kwargs!r}") + f"get_bds_instance got unknown kwargs: {extra_kwargs!r}") path_params = { "bdsInstanceId": bds_instance_id @@ -3099,9 +3213,7 @@ def install_os_patch(self, bds_instance_id, install_os_patch_details, **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} @@ -3112,7 +3224,6 @@ def install_os_patch(self, bds_instance_id, install_os_patch_details, **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( @@ -3121,7 +3232,7 @@ def install_os_patch(self, bds_instance_id, install_os_patch_details, **kwargs): method=method, path_params=path_params, header_params=header_params, - body=install_os_patch_details, + response_type="BdsInstance", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -3132,39 +3243,125 @@ def install_os_patch(self, bds_instance_id, install_os_patch_details, **kwargs): method=method, path_params=path_params, header_params=header_params, - body=install_os_patch_details, + response_type="BdsInstance", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def install_patch(self, bds_instance_id, install_patch_details, **kwargs): + def get_bds_metastore_configuration(self, bds_instance_id, metastore_config_id, **kwargs): """ - Install the specified patch to this cluster. + Returns the BDS Metastore configuration information for the given ID. :param str bds_instance_id: (required) The OCID of the cluster. - :param oci.bds.models.InstallPatchDetails install_patch_details: (required) - Details of the patch to be installed. + :param str metastore_config_id: (required) + The metastore configuration ID :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. - :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. + 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.bds.models.BdsMetastoreConfiguration` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_bds_metastore_configuration API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['bdsInstanceId', 'metastoreConfigId'] + resource_path = "/bdsInstances/{bdsInstanceId}/metastoreConfigs/{metastoreConfigId}" + method = "GET" + operation_name = "get_bds_metastore_configuration" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/bigdata/20190531/BdsMetastoreConfiguration/GetBdsMetastoreConfiguration" + + # 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_bds_metastore_configuration got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "bdsInstanceId": bds_instance_id, + "metastoreConfigId": metastore_config_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="BdsMetastoreConfiguration", + 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="BdsMetastoreConfiguration", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + + def get_node_backup(self, bds_instance_id, node_backup_id, **kwargs): + """ + Returns details of NodeBackup identified by the given ID. + + + :param str bds_instance_id: (required) + The OCID of the cluster. + + :param str node_backup_id: (required) + Unique assigned identifier of the nodeBackupId. + + :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. @@ -3178,48 +3375,1177 @@ def install_patch(self, bds_instance_id, install_patch_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 None + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.bds.models.NodeBackup` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use install_patch API. + Click `here `__ to see an example of how to use get_node_backup API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['bdsInstanceId'] - resource_path = "/bdsInstances/{bdsInstanceId}/actions/installPatch" - method = "POST" - operation_name = "install_patch" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/bigdata/20190531/BdsInstance/InstallPatch" + required_arguments = ['bdsInstanceId', 'nodeBackupId'] + resource_path = "/bdsInstances/{bdsInstanceId}/nodeBackups/{nodeBackupId}" + method = "GET" + operation_name = "get_node_backup" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/bigdata/20190531/BdsInstance/GetNodeBackup" # 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"get_node_backup got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "bdsInstanceId": bds_instance_id, + "nodeBackupId": node_backup_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="NodeBackup", + 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="NodeBackup", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + + def get_node_backup_configuration(self, bds_instance_id, node_backup_configuration_id, **kwargs): + """ + Returns details of the NodeBackupConfiguration identified by the given ID. + + + :param str bds_instance_id: (required) + The OCID of the cluster. + + :param str node_backup_configuration_id: (required) + Unique Oracle-assigned identifier of the NodeBackupConfiguration. + + :param str opc_request_id: (optional) + The client request ID for tracing. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.bds.models.NodeBackupConfiguration` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_node_backup_configuration API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['bdsInstanceId', 'nodeBackupConfigurationId'] + resource_path = "/bdsInstances/{bdsInstanceId}/nodeBackupConfigurations/{nodeBackupConfigurationId}" + method = "GET" + operation_name = "get_node_backup_configuration" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/bigdata/20190531/BdsInstance/GetNodeBackupConfiguration" + + # 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_node_backup_configuration got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "bdsInstanceId": bds_instance_id, + "nodeBackupConfigurationId": node_backup_configuration_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="NodeBackupConfiguration", + 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="NodeBackupConfiguration", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + + def get_node_replace_configuration(self, bds_instance_id, node_replace_configuration_id, **kwargs): + """ + Returns details of the nodeReplaceConfiguration identified by the given ID. + + + :param str bds_instance_id: (required) + The OCID of the cluster. + + :param str node_replace_configuration_id: (required) + Unique Oracle-assigned identifier of the NodeReplaceConfiguration. + + :param str opc_request_id: (optional) + The client request ID for tracing. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.bds.models.NodeReplaceConfiguration` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_node_replace_configuration API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['bdsInstanceId', 'nodeReplaceConfigurationId'] + resource_path = "/bdsInstances/{bdsInstanceId}/nodeReplaceConfigurations/{nodeReplaceConfigurationId}" + method = "GET" + operation_name = "get_node_replace_configuration" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/bigdata/20190531/BdsInstance/GetNodeReplaceConfiguration" + + # 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_node_replace_configuration got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "bdsInstanceId": bds_instance_id, + "nodeReplaceConfigurationId": node_replace_configuration_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="NodeReplaceConfiguration", + 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="NodeReplaceConfiguration", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + + def get_os_patch_details(self, bds_instance_id, os_patch_version, **kwargs): + """ + Get the details of an os patch + + + :param str bds_instance_id: (required) + The OCID of the cluster. + + :param str os_patch_version: (required) + The version of the OS patch. + + :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 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 :class:`~oci.bds.models.OsPatchDetails` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_os_patch_details API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['bdsInstanceId', 'osPatchVersion'] + resource_path = "/bdsInstances/{bdsInstanceId}/actions/getOsPatch" + method = "POST" + operation_name = "get_os_patch_details" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/bigdata/20190531/BdsInstance/GetOsPatchDetails" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "opc_request_id", + "if_match", + "opc_retry_token" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + f"get_os_patch_details got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "bdsInstanceId": bds_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') + + query_params = { + "osPatchVersion": os_patch_version + } + 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-retry-token": kwargs.get("opc_retry_token", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="OsPatchDetails", + 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="OsPatchDetails", + 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): + """ + Returns the status of the work request identified by the given ID. + + + :param str work_request_id: (required) + The ID of the asynchronous request. + + :param str opc_request_id: (optional) + The client request ID for tracing. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.bds.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/bigdata/20190531/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: + 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 install_os_patch(self, bds_instance_id, install_os_patch_details, **kwargs): + """ + Install an os patch on a cluster + + + :param str bds_instance_id: (required) + The OCID of the cluster. + + :param oci.bds.models.InstallOsPatchDetails install_os_patch_details: (required) + Details of the target os patch that will be installed + + :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 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 install_os_patch API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['bdsInstanceId'] + resource_path = "/bdsInstances/{bdsInstanceId}/actions/installOsPatch" + method = "POST" + operation_name = "install_os_patch" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/bigdata/20190531/BdsInstance/InstallOsPatch" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "opc_request_id", + "if_match", + "opc_retry_token" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + f"install_os_patch got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "bdsInstanceId": bds_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), + "if-match": kwargs.get("if_match", missing), + "opc-retry-token": kwargs.get("opc_retry_token", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=install_os_patch_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=install_os_patch_details, + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + + def install_patch(self, bds_instance_id, install_patch_details, **kwargs): + """ + Install the specified patch to this cluster. + + + :param str bds_instance_id: (required) + The OCID of the cluster. + + :param oci.bds.models.InstallPatchDetails install_patch_details: (required) + Details of the patch to be installed. + + :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 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 install_patch API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['bdsInstanceId'] + resource_path = "/bdsInstances/{bdsInstanceId}/actions/installPatch" + method = "POST" + operation_name = "install_patch" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/bigdata/20190531/BdsInstance/InstallPatch" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "opc_request_id", + "if_match", + "opc_retry_token" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + f"install_patch got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "bdsInstanceId": bds_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), + "if-match": kwargs.get("if_match", missing), + "opc-retry-token": kwargs.get("opc_retry_token", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=install_patch_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=install_patch_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_auto_scaling_configurations(self, compartment_id, bds_instance_id, **kwargs): + """ + Returns information about the autoscaling configurations for a cluster. + + + :param str compartment_id: (required) + The OCID of the compartment. + + :param str bds_instance_id: (required) + The OCID of the cluster. + + :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 int limit: (optional) + The maximum number of items to return. + + :param str sort_by: (optional) + The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. If no value is specified timeCreated is default. + + Allowed values are: "timeCreated", "displayName" + + :param str sort_order: (optional) + The sort order to use, either 'asc' or 'desc'. + + Allowed values are: "ASC", "DESC" + + :param str display_name: (optional) + A filter to return only resources that match the entire display name given. + + :param str lifecycle_state: (optional) + The state of the autoscale configuration. + + Allowed values are: "CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED" + + :param str opc_request_id: (optional) + The client request ID for tracing. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.bds.models.AutoScalingConfigurationSummary` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_auto_scaling_configurations API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['bdsInstanceId', 'compartmentId'] + resource_path = "/bdsInstances/{bdsInstanceId}/autoScalingConfiguration" + method = "GET" + operation_name = "list_auto_scaling_configurations" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/bigdata/20190531/BdsInstance/ListAutoScalingConfigurations" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "page", + "limit", + "sort_by", + "sort_order", + "display_name", + "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_auto_scaling_configurations got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "bdsInstanceId": bds_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') + + if 'sort_by' in kwargs: + sort_by_allowed_values = ["timeCreated", "displayName"] + if kwargs['sort_by'] not in sort_by_allowed_values: + raise ValueError( + f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }" + ) + + if 'sort_order' in kwargs: + sort_order_allowed_values = ["ASC", "DESC"] + if kwargs['sort_order'] not in sort_order_allowed_values: + raise ValueError( + f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }" + ) + + if 'lifecycle_state' in kwargs: + lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "INACTIVE", "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 }" + ) + + query_params = { + "compartmentId": compartment_id, + "page": kwargs.get("page", missing), + "limit": kwargs.get("limit", missing), + "sortBy": kwargs.get("sort_by", missing), + "sortOrder": kwargs.get("sort_order", missing), + "displayName": kwargs.get("display_name", 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) + } + 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, + query_params=query_params, + header_params=header_params, + response_type="list[AutoScalingConfigurationSummary]", + 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="list[AutoScalingConfigurationSummary]", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + + def list_bds_api_keys(self, bds_instance_id, **kwargs): + """ + Returns a list of all API keys associated with this Big Data Service cluster. + + + :param str bds_instance_id: (required) + The OCID of the cluster. + + :param str lifecycle_state: (optional) + The state of the API key. + + Allowed values are: "CREATING", "ACTIVE", "DELETING", "DELETED", "FAILED" + + :param str user_id: (optional) + The OCID of the user for whom the API key belongs. + + :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 int limit: (optional) + The maximum number of items to return. + + :param str sort_by: (optional) + The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. If no value is specified timeCreated is default. + + Allowed values are: "timeCreated", "displayName" + + :param str sort_order: (optional) + The sort order to use, either 'asc' or 'desc'. + + Allowed values are: "ASC", "DESC" + + :param str display_name: (optional) + A filter to return only resources that match the entire display name given. + + :param str opc_request_id: (optional) + The client request ID for tracing. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.bds.models.BdsApiKeySummary` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_bds_api_keys API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['bdsInstanceId'] + resource_path = "/bdsInstances/{bdsInstanceId}/apiKeys" + method = "GET" + operation_name = "list_bds_api_keys" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/bigdata/20190531/BdsApiKey/ListBdsApiKeys" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "lifecycle_state", + "user_id", + "page", + "limit", + "sort_by", + "sort_order", + "display_name", + "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_bds_api_keys got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "bdsInstanceId": bds_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') + + if 'lifecycle_state' in kwargs: + lifecycle_state_allowed_values = ["CREATING", "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_by' in kwargs: + sort_by_allowed_values = ["timeCreated", "displayName"] + if kwargs['sort_by'] not in sort_by_allowed_values: + raise ValueError( + f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }" + ) + + if 'sort_order' in kwargs: + sort_order_allowed_values = ["ASC", "DESC"] + if kwargs['sort_order'] not in sort_order_allowed_values: + raise ValueError( + f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }" + ) + + query_params = { + "lifecycleState": kwargs.get("lifecycle_state", missing), + "userId": kwargs.get("user_id", missing), + "page": kwargs.get("page", missing), + "limit": kwargs.get("limit", missing), + "sortBy": kwargs.get("sort_by", missing), + "sortOrder": kwargs.get("sort_order", missing), + "displayName": kwargs.get("display_name", missing) + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + 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="list[BdsApiKeySummary]", + 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="list[BdsApiKeySummary]", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + + def list_bds_instances(self, compartment_id, **kwargs): + """ + Returns a list of all Big Data Service clusters in a compartment. + + + :param str compartment_id: (required) + The OCID of the compartment. + + :param str lifecycle_state: (optional) + The state of the cluster. + + Allowed values are: "CREATING", "ACTIVE", "UPDATING", "SUSPENDING", "SUSPENDED", "RESUMING", "DELETING", "DELETED", "FAILED", "INACTIVE" + + :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 int limit: (optional) + The maximum number of items to return. + + :param str sort_by: (optional) + The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. If no value is specified timeCreated is default. + + Allowed values are: "timeCreated", "displayName" + + :param str sort_order: (optional) + The sort order to use, either 'asc' or 'desc'. + + Allowed values are: "ASC", "DESC" + + :param str display_name: (optional) + A filter to return only resources that match the entire display name given. + + :param str opc_request_id: (optional) + The client request ID for tracing. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.bds.models.BdsInstanceSummary` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_bds_instances API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['compartmentId'] + resource_path = "/bdsInstances" + method = "GET" + operation_name = "list_bds_instances" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/bigdata/20190531/BdsInstanceSummary/ListBdsInstances" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "lifecycle_state", + "page", + "limit", + "sort_by", + "sort_order", + "display_name", + "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"install_patch got unknown kwargs: {extra_kwargs!r}") + f"list_bds_instances got unknown kwargs: {extra_kwargs!r}") - path_params = { - "bdsInstanceId": bds_instance_id - } + if 'lifecycle_state' in kwargs: + lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "UPDATING", "SUSPENDING", "SUSPENDED", "RESUMING", "DELETING", "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 }" + ) - 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 'sort_order' in kwargs: + sort_order_allowed_values = ["ASC", "DESC"] + if kwargs['sort_order'] not in sort_order_allowed_values: + raise ValueError( + f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }" + ) + + query_params = { + "compartmentId": compartment_id, + "lifecycleState": kwargs.get("lifecycle_state", missing), + "page": kwargs.get("page", missing), + "limit": kwargs.get("limit", missing), + "sortBy": kwargs.get("sort_by", missing), + "sortOrder": kwargs.get("sort_order", missing), + "displayName": kwargs.get("display_name", missing) + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} header_params = { "accept": "application/json", "content-type": "application/json", - "opc-request-id": kwargs.get("opc_request_id", missing), - "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} @@ -3230,16 +4556,15 @@ def install_patch(self, bds_instance_id, install_patch_details, **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, - body=install_patch_details, + response_type="list[BdsInstanceSummary]", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -3248,25 +4573,38 @@ def install_patch(self, bds_instance_id, install_patch_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=install_patch_details, + response_type="list[BdsInstanceSummary]", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def list_auto_scaling_configurations(self, compartment_id, bds_instance_id, **kwargs): + def list_bds_metastore_configurations(self, bds_instance_id, **kwargs): """ - Returns information about the autoscaling configurations for a cluster. - + Returns a list of metastore configurations ssociated with this Big Data Service cluster. - :param str compartment_id: (required) - The OCID of the compartment. :param str bds_instance_id: (required) The OCID of the cluster. + :param str metastore_type: (optional) + The type of the metastore in the metastore configuration + + Allowed values are: "LOCAL", "EXTERNAL" + + :param str metastore_id: (optional) + The OCID of the Data Catalog metastore in the metastore configuration + + :param str lifecycle_state: (optional) + The lifecycle state of the metastore in the metastore configuration + + Allowed values are: "CREATING", "ACTIVATING", "ACTIVE", "INACTIVE", "UPDATING", "FAILED", "DELETING", "DELETED" + + :param str bds_api_key_id: (optional) + The ID of the API key that is associated with the external metastore in the metastore configuration + :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. @@ -3286,11 +4624,6 @@ def list_auto_scaling_configurations(self, compartment_id, bds_instance_id, **kw :param str display_name: (optional) A filter to return only resources that match the entire display name given. - :param str lifecycle_state: (optional) - The state of the autoscale configuration. - - Allowed values are: "CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED" - :param str opc_request_id: (optional) The client request ID for tracing. @@ -3306,35 +4639,38 @@ def list_auto_scaling_configurations(self, compartment_id, bds_instance_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 list of :class:`~oci.bds.models.AutoScalingConfigurationSummary` + :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.bds.models.BdsMetastoreConfigurationSummary` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use list_auto_scaling_configurations API. + Click `here `__ to see an example of how to use list_bds_metastore_configurations API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['bdsInstanceId', 'compartmentId'] - resource_path = "/bdsInstances/{bdsInstanceId}/autoScalingConfiguration" + required_arguments = ['bdsInstanceId'] + resource_path = "/bdsInstances/{bdsInstanceId}/metastoreConfigs" method = "GET" - operation_name = "list_auto_scaling_configurations" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/bigdata/20190531/BdsInstance/ListAutoScalingConfigurations" + operation_name = "list_bds_metastore_configurations" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/bigdata/20190531/BdsMetastoreConfiguration/ListBdsMetastoreConfigurations" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", + "metastore_type", + "metastore_id", + "lifecycle_state", + "bds_api_key_id", "page", "limit", "sort_by", "sort_order", "display_name", - "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_auto_scaling_configurations got unknown kwargs: {extra_kwargs!r}") + f"list_bds_metastore_configurations got unknown kwargs: {extra_kwargs!r}") path_params = { "bdsInstanceId": bds_instance_id @@ -3346,6 +4682,20 @@ def list_auto_scaling_configurations(self, compartment_id, bds_instance_id, **kw 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 'metastore_type' in kwargs: + metastore_type_allowed_values = ["LOCAL", "EXTERNAL"] + if kwargs['metastore_type'] not in metastore_type_allowed_values: + raise ValueError( + f"Invalid value for `metastore_type`, must be one of { metastore_type_allowed_values }" + ) + + if 'lifecycle_state' in kwargs: + lifecycle_state_allowed_values = ["CREATING", "ACTIVATING", "ACTIVE", "INACTIVE", "UPDATING", "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 }" + ) + if 'sort_by' in kwargs: sort_by_allowed_values = ["timeCreated", "displayName"] if kwargs['sort_by'] not in sort_by_allowed_values: @@ -3360,21 +4710,16 @@ def list_auto_scaling_configurations(self, compartment_id, bds_instance_id, **kw f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }" ) - if 'lifecycle_state' in kwargs: - lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "INACTIVE", "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 }" - ) - query_params = { - "compartmentId": compartment_id, + "metastoreType": kwargs.get("metastore_type", missing), + "metastoreId": kwargs.get("metastore_id", missing), + "lifecycleState": kwargs.get("lifecycle_state", missing), + "bdsApiKeyId": kwargs.get("bds_api_key_id", missing), "page": kwargs.get("page", missing), "limit": kwargs.get("limit", missing), "sortBy": kwargs.get("sort_by", missing), "sortOrder": kwargs.get("sort_order", missing), - "displayName": kwargs.get("display_name", missing), - "lifecycleState": kwargs.get("lifecycle_state", 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} @@ -3401,7 +4746,7 @@ def list_auto_scaling_configurations(self, compartment_id, bds_instance_id, **kw path_params=path_params, query_params=query_params, header_params=header_params, - response_type="list[AutoScalingConfigurationSummary]", + response_type="list[BdsMetastoreConfigurationSummary]", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -3413,28 +4758,20 @@ def list_auto_scaling_configurations(self, compartment_id, bds_instance_id, **kw path_params=path_params, query_params=query_params, header_params=header_params, - response_type="list[AutoScalingConfigurationSummary]", + response_type="list[BdsMetastoreConfigurationSummary]", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def list_bds_api_keys(self, bds_instance_id, **kwargs): + def list_node_backup_configurations(self, bds_instance_id, **kwargs): """ - Returns a list of all API keys associated with this Big Data Service cluster. + Returns information about the NodeBackupConfigurations. :param str bds_instance_id: (required) The OCID of the cluster. - :param str lifecycle_state: (optional) - The state of the API key. - - Allowed values are: "CREATING", "ACTIVE", "DELETING", "DELETED", "FAILED" - - :param str user_id: (optional) - The OCID of the user for whom the API key belongs. - :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. @@ -3454,6 +4791,11 @@ def list_bds_api_keys(self, bds_instance_id, **kwargs): :param str display_name: (optional) A filter to return only resources that match the entire display name given. + :param str lifecycle_state: (optional) + The state of the NodeBackupConfiguration configuration. + + Allowed values are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED" + :param str opc_request_id: (optional) The client request ID for tracing. @@ -3469,36 +4811,35 @@ def list_bds_api_keys(self, bds_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 list of :class:`~oci.bds.models.BdsApiKeySummary` + :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.bds.models.NodeBackupConfigurationSummary` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use list_bds_api_keys API. + Click `here `__ to see an example of how to use list_node_backup_configurations API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. required_arguments = ['bdsInstanceId'] - resource_path = "/bdsInstances/{bdsInstanceId}/apiKeys" + resource_path = "/bdsInstances/{bdsInstanceId}/nodeBackupConfigurations" method = "GET" - operation_name = "list_bds_api_keys" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/bigdata/20190531/BdsApiKey/ListBdsApiKeys" + operation_name = "list_node_backup_configurations" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/bigdata/20190531/BdsInstance/ListNodeBackupConfigurations" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "lifecycle_state", - "user_id", "page", "limit", "sort_by", "sort_order", "display_name", + "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_bds_api_keys got unknown kwargs: {extra_kwargs!r}") + f"list_node_backup_configurations got unknown kwargs: {extra_kwargs!r}") path_params = { "bdsInstanceId": bds_instance_id @@ -3510,13 +4851,6 @@ def list_bds_api_keys(self, bds_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') - if 'lifecycle_state' in kwargs: - lifecycle_state_allowed_values = ["CREATING", "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_by' in kwargs: sort_by_allowed_values = ["timeCreated", "displayName"] if kwargs['sort_by'] not in sort_by_allowed_values: @@ -3531,14 +4865,20 @@ def list_bds_api_keys(self, bds_instance_id, **kwargs): f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }" ) + 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 }" + ) + query_params = { - "lifecycleState": kwargs.get("lifecycle_state", missing), - "userId": kwargs.get("user_id", missing), "page": kwargs.get("page", missing), "limit": kwargs.get("limit", missing), "sortBy": kwargs.get("sort_by", missing), "sortOrder": kwargs.get("sort_order", missing), - "displayName": kwargs.get("display_name", missing) + "displayName": kwargs.get("display_name", 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} @@ -3565,7 +4905,7 @@ def list_bds_api_keys(self, bds_instance_id, **kwargs): path_params=path_params, query_params=query_params, header_params=header_params, - response_type="list[BdsApiKeySummary]", + response_type="list[NodeBackupConfigurationSummary]", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -3577,24 +4917,19 @@ def list_bds_api_keys(self, bds_instance_id, **kwargs): path_params=path_params, query_params=query_params, header_params=header_params, - response_type="list[BdsApiKeySummary]", + response_type="list[NodeBackupConfigurationSummary]", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def list_bds_instances(self, compartment_id, **kwargs): + def list_node_backups(self, bds_instance_id, **kwargs): """ - Returns a list of all Big Data Service clusters in a compartment. - - - :param str compartment_id: (required) - The OCID of the compartment. + Returns information about the node Backups. - :param str lifecycle_state: (optional) - The state of the cluster. - Allowed values are: "CREATING", "ACTIVE", "UPDATING", "SUSPENDING", "SUSPENDED", "RESUMING", "DELETING", "DELETED", "FAILED", "INACTIVE" + :param str bds_instance_id: (required) + The OCID of the cluster. :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. @@ -3612,12 +4947,20 @@ def list_bds_instances(self, compartment_id, **kwargs): Allowed values are: "ASC", "DESC" - :param str display_name: (optional) - A filter to return only resources that match the entire display name given. + :param str node_host_name: (optional) + The node host name belonged to a node that has a node backup. + + :param str lifecycle_state: (optional) + The state of the Node's Backup. + + Allowed values are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", "PARTIAL" :param str opc_request_id: (optional) The client request ID for tracing. + :param str display_name: (optional) + The display name belonged to the node backup. + :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. @@ -3630,42 +4973,46 @@ def list_bds_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 list of :class:`~oci.bds.models.BdsInstanceSummary` + :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.bds.models.NodeBackupSummary` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use list_bds_instances API. + Click `here `__ to see an example of how to use list_node_backups API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['compartmentId'] - resource_path = "/bdsInstances" + required_arguments = ['bdsInstanceId'] + resource_path = "/bdsInstances/{bdsInstanceId}/nodeBackups" method = "GET" - operation_name = "list_bds_instances" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/bigdata/20190531/BdsInstanceSummary/ListBdsInstances" + operation_name = "list_node_backups" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/bigdata/20190531/BdsInstance/ListNodeBackups" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "lifecycle_state", "page", "limit", "sort_by", "sort_order", - "display_name", - "opc_request_id" + "node_host_name", + "lifecycle_state", + "opc_request_id", + "display_name" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"list_bds_instances got unknown kwargs: {extra_kwargs!r}") + f"list_node_backups got unknown kwargs: {extra_kwargs!r}") - if 'lifecycle_state' in kwargs: - lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "UPDATING", "SUSPENDING", "SUSPENDED", "RESUMING", "DELETING", "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 }" - ) + path_params = { + "bdsInstanceId": bds_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') if 'sort_by' in kwargs: sort_by_allowed_values = ["timeCreated", "displayName"] @@ -3681,13 +5028,20 @@ def list_bds_instances(self, compartment_id, **kwargs): f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }" ) + if 'lifecycle_state' in kwargs: + lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", "PARTIAL"] + 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 = { - "compartmentId": compartment_id, - "lifecycleState": kwargs.get("lifecycle_state", missing), "page": kwargs.get("page", missing), "limit": kwargs.get("limit", missing), "sortBy": kwargs.get("sort_by", missing), "sortOrder": kwargs.get("sort_order", missing), + "nodeHostName": kwargs.get("node_host_name", missing), + "lifecycleState": kwargs.get("lifecycle_state", 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} @@ -3712,9 +5066,10 @@ def list_bds_instances(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="list[BdsInstanceSummary]", + response_type="list[NodeBackupSummary]", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -3723,38 +5078,23 @@ def list_bds_instances(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="list[BdsInstanceSummary]", + response_type="list[NodeBackupSummary]", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def list_bds_metastore_configurations(self, bds_instance_id, **kwargs): + def list_node_replace_configurations(self, bds_instance_id, **kwargs): """ - Returns a list of metastore configurations ssociated with this Big Data Service cluster. + Returns information about the NodeReplaceConfiguration. :param str bds_instance_id: (required) The OCID of the cluster. - :param str metastore_type: (optional) - The type of the metastore in the metastore configuration - - Allowed values are: "LOCAL", "EXTERNAL" - - :param str metastore_id: (optional) - The OCID of the Data Catalog metastore in the metastore configuration - - :param str lifecycle_state: (optional) - The lifecycle state of the metastore in the metastore configuration - - Allowed values are: "CREATING", "ACTIVATING", "ACTIVE", "INACTIVE", "UPDATING", "FAILED", "DELETING", "DELETED" - - :param str bds_api_key_id: (optional) - The ID of the API key that is associated with the external metastore in the metastore configuration - :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. @@ -3774,6 +5114,11 @@ def list_bds_metastore_configurations(self, bds_instance_id, **kwargs): :param str display_name: (optional) A filter to return only resources that match the entire display name given. + :param str lifecycle_state: (optional) + The state of the NodeReplaceConfiguration. + + Allowed values are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED" + :param str opc_request_id: (optional) The client request ID for tracing. @@ -3789,38 +5134,35 @@ def list_bds_metastore_configurations(self, bds_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 list of :class:`~oci.bds.models.BdsMetastoreConfigurationSummary` + :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.bds.models.NodeReplaceConfigurationSummary` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use list_bds_metastore_configurations API. + Click `here `__ to see an example of how to use list_node_replace_configurations API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. required_arguments = ['bdsInstanceId'] - resource_path = "/bdsInstances/{bdsInstanceId}/metastoreConfigs" + resource_path = "/bdsInstances/{bdsInstanceId}/nodeReplaceConfigurations" method = "GET" - operation_name = "list_bds_metastore_configurations" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/bigdata/20190531/BdsMetastoreConfiguration/ListBdsMetastoreConfigurations" + operation_name = "list_node_replace_configurations" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/bigdata/20190531/BdsInstance/ListNodeReplaceConfigurations" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "metastore_type", - "metastore_id", - "lifecycle_state", - "bds_api_key_id", "page", "limit", "sort_by", "sort_order", "display_name", + "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_bds_metastore_configurations got unknown kwargs: {extra_kwargs!r}") + f"list_node_replace_configurations got unknown kwargs: {extra_kwargs!r}") path_params = { "bdsInstanceId": bds_instance_id @@ -3832,20 +5174,6 @@ def list_bds_metastore_configurations(self, bds_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') - if 'metastore_type' in kwargs: - metastore_type_allowed_values = ["LOCAL", "EXTERNAL"] - if kwargs['metastore_type'] not in metastore_type_allowed_values: - raise ValueError( - f"Invalid value for `metastore_type`, must be one of { metastore_type_allowed_values }" - ) - - if 'lifecycle_state' in kwargs: - lifecycle_state_allowed_values = ["CREATING", "ACTIVATING", "ACTIVE", "INACTIVE", "UPDATING", "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 }" - ) - if 'sort_by' in kwargs: sort_by_allowed_values = ["timeCreated", "displayName"] if kwargs['sort_by'] not in sort_by_allowed_values: @@ -3860,16 +5188,20 @@ def list_bds_metastore_configurations(self, bds_instance_id, **kwargs): f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }" ) + 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 }" + ) + query_params = { - "metastoreType": kwargs.get("metastore_type", missing), - "metastoreId": kwargs.get("metastore_id", missing), - "lifecycleState": kwargs.get("lifecycle_state", missing), - "bdsApiKeyId": kwargs.get("bds_api_key_id", missing), "page": kwargs.get("page", missing), "limit": kwargs.get("limit", missing), "sortBy": kwargs.get("sort_by", missing), "sortOrder": kwargs.get("sort_order", missing), - "displayName": kwargs.get("display_name", missing) + "displayName": kwargs.get("display_name", 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} @@ -3896,7 +5228,7 @@ def list_bds_metastore_configurations(self, bds_instance_id, **kwargs): path_params=path_params, query_params=query_params, header_params=header_params, - response_type="list[BdsMetastoreConfigurationSummary]", + response_type="list[NodeReplaceConfigurationSummary]", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -3908,7 +5240,7 @@ def list_bds_metastore_configurations(self, bds_instance_id, **kwargs): path_params=path_params, query_params=query_params, header_params=header_params, - response_type="list[BdsMetastoreConfigurationSummary]", + response_type="list[NodeReplaceConfigurationSummary]", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -5167,26 +6499,264 @@ def remove_node(self, bds_instance_id, remove_node_details, **kwargs): :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use remove_node API. + Click `here `__ to see an example of how to use remove_node API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['bdsInstanceId'] + resource_path = "/bdsInstances/{bdsInstanceId}/actions/removeNode" + method = "POST" + operation_name = "remove_node" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/bigdata/20190531/BdsInstance/RemoveNode" + + # 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_node got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "bdsInstanceId": bds_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), + "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_node_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=remove_node_details, + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + + def remove_node_replace_configuration(self, bds_instance_id, node_replace_configuration_id, remove_node_replace_configuration_details, **kwargs): + """ + Deletes a nodeReplaceConfiguration + + + :param str bds_instance_id: (required) + The OCID of the cluster. + + :param str node_replace_configuration_id: (required) + Unique Oracle-assigned identifier of the NodeReplaceConfiguration. + + :param oci.bds.models.RemoveNodeReplaceConfigurationDetails remove_node_replace_configuration_details: (required) + Details for removing NodeReplaceConfiguration + + :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 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 remove_node_replace_configuration API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['bdsInstanceId', 'nodeReplaceConfigurationId'] + resource_path = "/bdsInstances/{bdsInstanceId}/nodeReplaceConfigurations/{nodeReplaceConfigurationId}/actions/remove" + method = "POST" + operation_name = "remove_node_replace_configuration" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/bigdata/20190531/NodeReplaceConfiguration/RemoveNodeReplaceConfiguration" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "opc_request_id", + "if_match", + "opc_retry_token" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + f"remove_node_replace_configuration got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "bdsInstanceId": bds_instance_id, + "nodeReplaceConfigurationId": node_replace_configuration_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing), + "if-match": kwargs.get("if_match", missing), + "opc-retry-token": kwargs.get("opc_retry_token", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + 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=remove_node_replace_configuration_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=remove_node_replace_configuration_details, + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + + def renew_certificate(self, bds_instance_id, renew_certificate_details, **kwargs): + """ + Renewing TLS/SSL for various ODH services running on the BDS cluster. + + + :param str bds_instance_id: (required) + The OCID of the cluster. + + :param oci.bds.models.RenewCertificateDetails renew_certificate_details: (required) + Details for renewing certificate. + + :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 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 renew_certificate API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. required_arguments = ['bdsInstanceId'] - resource_path = "/bdsInstances/{bdsInstanceId}/actions/removeNode" + resource_path = "/bdsInstances/{bdsInstanceId}/actions/renewOdhServiceCertificate" method = "POST" - operation_name = "remove_node" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/bigdata/20190531/BdsInstance/RemoveNode" + operation_name = "renew_certificate" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/bigdata/20190531/BdsInstance/RenewCertificate" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "opc_request_id", - "if_match" + "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"remove_node got unknown kwargs: {extra_kwargs!r}") + f"renew_certificate got unknown kwargs: {extra_kwargs!r}") path_params = { "bdsInstanceId": bds_instance_id @@ -5202,7 +6772,8 @@ def remove_node(self, bds_instance_id, remove_node_details, **kwargs): "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-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} @@ -5213,6 +6784,7 @@ def remove_node(self, bds_instance_id, remove_node_details, **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( @@ -5221,7 +6793,7 @@ def remove_node(self, bds_instance_id, remove_node_details, **kwargs): method=method, path_params=path_params, header_params=header_params, - body=remove_node_details, + body=renew_certificate_details, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -5232,32 +6804,32 @@ def remove_node(self, bds_instance_id, remove_node_details, **kwargs): method=method, path_params=path_params, header_params=header_params, - body=remove_node_details, + body=renew_certificate_details, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def renew_certificate(self, bds_instance_id, renew_certificate_details, **kwargs): + def replace_node(self, bds_instance_id, replace_node_details, **kwargs): """ - Renewing TLS/SSL for various ODH services running on the BDS cluster. + Replaces a node of a Big Data Service cluster from backup. :param str bds_instance_id: (required) The OCID of the cluster. - :param oci.bds.models.RenewCertificateDetails renew_certificate_details: (required) - Details for renewing certificate. + :param oci.bds.models.ReplaceNodeDetails replace_node_details: (required) + Details for Replacing the node. :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. + This if-match is for the BdsInstance. 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 @@ -5282,14 +6854,14 @@ def renew_certificate(self, bds_instance_id, renew_certificate_details, **kwargs :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use renew_certificate API. + Click `here `__ to see an example of how to use replace_node API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. required_arguments = ['bdsInstanceId'] - resource_path = "/bdsInstances/{bdsInstanceId}/actions/renewOdhServiceCertificate" + resource_path = "/bdsInstances/{bdsInstanceId}/actions/replaceNode" method = "POST" - operation_name = "renew_certificate" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/bigdata/20190531/BdsInstance/RenewCertificate" + operation_name = "replace_node" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/bigdata/20190531/BdsInstance/ReplaceNode" # Don't accept unknown kwargs expected_kwargs = [ @@ -5302,7 +6874,7 @@ def renew_certificate(self, bds_instance_id, renew_certificate_details, **kwargs extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"renew_certificate got unknown kwargs: {extra_kwargs!r}") + f"replace_node got unknown kwargs: {extra_kwargs!r}") path_params = { "bdsInstanceId": bds_instance_id @@ -5339,7 +6911,7 @@ def renew_certificate(self, bds_instance_id, renew_certificate_details, **kwargs method=method, path_params=path_params, header_params=header_params, - body=renew_certificate_details, + body=replace_node_details, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -5350,7 +6922,7 @@ def renew_certificate(self, bds_instance_id, renew_certificate_details, **kwargs method=method, path_params=path_params, header_params=header_params, - body=renew_certificate_details, + body=replace_node_details, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -6246,3 +7818,247 @@ def update_bds_metastore_configuration(self, bds_instance_id, metastore_config_i operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) + + def update_node_backup_configuration(self, bds_instance_id, node_backup_configuration_id, update_node_backup_configuration_details, **kwargs): + """ + Updates fields on NodeBackupConfiguration, including the name, the schedule. + + + :param str bds_instance_id: (required) + The OCID of the cluster. + + :param str node_backup_configuration_id: (required) + Unique Oracle-assigned identifier of the NodeBackupConfiguration. + + :param oci.bds.models.UpdateNodeBackupConfigurationDetails update_node_backup_configuration_details: (required) + Details for updating the NodeBackupConfiguration. + + :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 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 update_node_backup_configuration API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['bdsInstanceId', 'nodeBackupConfigurationId'] + resource_path = "/bdsInstances/{bdsInstanceId}/nodeBackupConfigurations/{nodeBackupConfigurationId}" + method = "PUT" + operation_name = "update_node_backup_configuration" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/bigdata/20190531/BdsInstance/UpdateNodeBackupConfiguration" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "opc_request_id", + "if_match", + "opc_retry_token" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + f"update_node_backup_configuration got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "bdsInstanceId": bds_instance_id, + "nodeBackupConfigurationId": node_backup_configuration_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing), + "if-match": kwargs.get("if_match", missing), + "opc-retry-token": kwargs.get("opc_retry_token", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=update_node_backup_configuration_details, + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=update_node_backup_configuration_details, + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + + def update_node_replace_configuration(self, bds_instance_id, node_replace_configuration_id, update_node_replace_configuration_details, **kwargs): + """ + Updates fields on nodeReplaceConfigurations, including the name, the schedule + + + :param str bds_instance_id: (required) + The OCID of the cluster. + + :param str node_replace_configuration_id: (required) + Unique Oracle-assigned identifier of the NodeReplaceConfiguration. + + :param oci.bds.models.UpdateNodeReplaceConfigurationDetails update_node_replace_configuration_details: (required) + Details for updating the nodeReplaceConfiguration. + + :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 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 update_node_replace_configuration API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['bdsInstanceId', 'nodeReplaceConfigurationId'] + resource_path = "/bdsInstances/{bdsInstanceId}/nodeReplaceConfigurations/{nodeReplaceConfigurationId}" + method = "PUT" + operation_name = "update_node_replace_configuration" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/bigdata/20190531/BdsInstance/UpdateNodeReplaceConfiguration" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "opc_request_id", + "if_match", + "opc_retry_token" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + f"update_node_replace_configuration got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "bdsInstanceId": bds_instance_id, + "nodeReplaceConfigurationId": node_replace_configuration_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing), + "if-match": kwargs.get("if_match", missing), + "opc-retry-token": kwargs.get("opc_retry_token", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=update_node_replace_configuration_details, + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=update_node_replace_configuration_details, + 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/bds/bds_client_composite_operations.py b/src/oci/bds/bds_client_composite_operations.py index b25b3b3c9..3fb2cf38f 100644 --- a/src/oci/bds/bds_client_composite_operations.py +++ b/src/oci/bds/bds_client_composite_operations.py @@ -364,6 +364,48 @@ def add_worker_nodes_and_wait_for_state(self, bds_instance_id, add_worker_nodes_ except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def backup_node_and_wait_for_state(self, bds_instance_id, backup_node_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.bds.BdsClient.backup_node` and waits for the :py:class:`~oci.bds.models.WorkRequest` + to enter the given state(s). + + :param str bds_instance_id: (required) + The OCID of the cluster. + + :param oci.bds.models.BackupNodeDetails backup_node_details: (required) + Details for Taking the node's backup + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.bds.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.bds.BdsClient.backup_node` + + :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.backup_node(bds_instance_id, backup_node_details, **operation_kwargs) + if not wait_for_states: + return operation_result + lowered_wait_for_states = [w.lower() for w in wait_for_states] + if 'opc-work-request-id' not in operation_result.headers: + return operation_result + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def change_bds_instance_compartment_and_wait_for_state(self, bds_instance_id, change_bds_instance_compartment_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ Calls :py:func:`~oci.bds.BdsClient.change_bds_instance_compartment` and waits for the :py:class:`~oci.bds.models.WorkRequest` @@ -571,6 +613,90 @@ def create_bds_metastore_configuration_and_wait_for_state(self, bds_instance_id, except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def create_node_backup_configuration_and_wait_for_state(self, bds_instance_id, create_node_backup_configuration_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.bds.BdsClient.create_node_backup_configuration` and waits for the :py:class:`~oci.bds.models.WorkRequest` + to enter the given state(s). + + :param str bds_instance_id: (required) + The OCID of the cluster. + + :param oci.bds.models.CreateNodeBackupConfigurationDetails create_node_backup_configuration_details: (required) + Details for adding nodeBackupConfiguration to the BDS cluster. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.bds.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.bds.BdsClient.create_node_backup_configuration` + + :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_node_backup_configuration(bds_instance_id, create_node_backup_configuration_details, **operation_kwargs) + if not wait_for_states: + return operation_result + lowered_wait_for_states = [w.lower() for w in wait_for_states] + if 'opc-work-request-id' not in operation_result.headers: + return operation_result + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + 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_node_replace_configuration_and_wait_for_state(self, bds_instance_id, create_node_replace_configuration_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.bds.BdsClient.create_node_replace_configuration` and waits for the :py:class:`~oci.bds.models.WorkRequest` + to enter the given state(s). + + :param str bds_instance_id: (required) + The OCID of the cluster. + + :param oci.bds.models.CreateNodeReplaceConfigurationDetails create_node_replace_configuration_details: (required) + Details for adding nodeReplaceConfiguration to the BDS cluster. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.bds.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.bds.BdsClient.create_node_replace_configuration` + + :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_node_replace_configuration(bds_instance_id, create_node_replace_configuration_details, **operation_kwargs) + if not wait_for_states: + return operation_result + lowered_wait_for_states = [w.lower() for w in wait_for_states] + if 'opc-work-request-id' not in operation_result.headers: + return operation_result + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + 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_bds_api_key_and_wait_for_state(self, bds_instance_id, api_key_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ Calls :py:func:`~oci.bds.BdsClient.delete_bds_api_key` and waits for the :py:class:`~oci.bds.models.WorkRequest` @@ -718,6 +844,106 @@ def delete_bds_metastore_configuration_and_wait_for_state(self, bds_instance_id, except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def delete_node_backup_and_wait_for_state(self, bds_instance_id, node_backup_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.bds.BdsClient.delete_node_backup` and waits for the :py:class:`~oci.bds.models.WorkRequest` + to enter the given state(s). + + :param str bds_instance_id: (required) + The OCID of the cluster. + + :param str node_backup_id: (required) + Unique assigned identifier of the nodeBackupId. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.bds.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.bds.BdsClient.delete_node_backup` + + :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_node_backup(bds_instance_id, node_backup_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_node_backup_configuration_and_wait_for_state(self, bds_instance_id, node_backup_configuration_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.bds.BdsClient.delete_node_backup_configuration` and waits for the :py:class:`~oci.bds.models.WorkRequest` + to enter the given state(s). + + :param str bds_instance_id: (required) + The OCID of the cluster. + + :param str node_backup_configuration_id: (required) + Unique Oracle-assigned identifier of the NodeBackupConfiguration. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.bds.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.bds.BdsClient.delete_node_backup_configuration` + + :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_node_backup_configuration(bds_instance_id, node_backup_configuration_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 disable_certificate_and_wait_for_state(self, bds_instance_id, disable_certificate_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ Calls :py:func:`~oci.bds.BdsClient.disable_certificate` and waits for the :py:class:`~oci.bds.models.WorkRequest` @@ -1099,6 +1325,51 @@ def remove_node_and_wait_for_state(self, bds_instance_id, remove_node_details, w except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def remove_node_replace_configuration_and_wait_for_state(self, bds_instance_id, node_replace_configuration_id, remove_node_replace_configuration_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.bds.BdsClient.remove_node_replace_configuration` and waits for the :py:class:`~oci.bds.models.WorkRequest` + to enter the given state(s). + + :param str bds_instance_id: (required) + The OCID of the cluster. + + :param str node_replace_configuration_id: (required) + Unique Oracle-assigned identifier of the NodeReplaceConfiguration. + + :param oci.bds.models.RemoveNodeReplaceConfigurationDetails remove_node_replace_configuration_details: (required) + Details for removing NodeReplaceConfiguration + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.bds.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.bds.BdsClient.remove_node_replace_configuration` + + :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_node_replace_configuration(bds_instance_id, node_replace_configuration_id, remove_node_replace_configuration_details, **operation_kwargs) + if not wait_for_states: + return operation_result + lowered_wait_for_states = [w.lower() for w in wait_for_states] + if 'opc-work-request-id' not in operation_result.headers: + return operation_result + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + 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 renew_certificate_and_wait_for_state(self, bds_instance_id, renew_certificate_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ Calls :py:func:`~oci.bds.BdsClient.renew_certificate` and waits for the :py:class:`~oci.bds.models.WorkRequest` @@ -1141,6 +1412,48 @@ def renew_certificate_and_wait_for_state(self, bds_instance_id, renew_certificat except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def replace_node_and_wait_for_state(self, bds_instance_id, replace_node_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.bds.BdsClient.replace_node` and waits for the :py:class:`~oci.bds.models.WorkRequest` + to enter the given state(s). + + :param str bds_instance_id: (required) + The OCID of the cluster. + + :param oci.bds.models.ReplaceNodeDetails replace_node_details: (required) + Details for Replacing the node. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.bds.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.bds.BdsClient.replace_node` + + :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.replace_node(bds_instance_id, replace_node_details, **operation_kwargs) + if not wait_for_states: + return operation_result + lowered_wait_for_states = [w.lower() for w in wait_for_states] + if 'opc-work-request-id' not in operation_result.headers: + return operation_result + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + 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 restart_node_and_wait_for_state(self, bds_instance_id, restart_node_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ Calls :py:func:`~oci.bds.BdsClient.restart_node` and waits for the :py:class:`~oci.bds.models.WorkRequest` @@ -1488,3 +1801,93 @@ def update_bds_metastore_configuration_and_wait_for_state(self, bds_instance_id, return result_to_return except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def update_node_backup_configuration_and_wait_for_state(self, bds_instance_id, node_backup_configuration_id, update_node_backup_configuration_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.bds.BdsClient.update_node_backup_configuration` and waits for the :py:class:`~oci.bds.models.WorkRequest` + to enter the given state(s). + + :param str bds_instance_id: (required) + The OCID of the cluster. + + :param str node_backup_configuration_id: (required) + Unique Oracle-assigned identifier of the NodeBackupConfiguration. + + :param oci.bds.models.UpdateNodeBackupConfigurationDetails update_node_backup_configuration_details: (required) + Details for updating the NodeBackupConfiguration. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.bds.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.bds.BdsClient.update_node_backup_configuration` + + :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_node_backup_configuration(bds_instance_id, node_backup_configuration_id, update_node_backup_configuration_details, **operation_kwargs) + if not wait_for_states: + return operation_result + lowered_wait_for_states = [w.lower() for w in wait_for_states] + if 'opc-work-request-id' not in operation_result.headers: + return operation_result + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + 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_node_replace_configuration_and_wait_for_state(self, bds_instance_id, node_replace_configuration_id, update_node_replace_configuration_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.bds.BdsClient.update_node_replace_configuration` and waits for the :py:class:`~oci.bds.models.WorkRequest` + to enter the given state(s). + + :param str bds_instance_id: (required) + The OCID of the cluster. + + :param str node_replace_configuration_id: (required) + Unique Oracle-assigned identifier of the NodeReplaceConfiguration. + + :param oci.bds.models.UpdateNodeReplaceConfigurationDetails update_node_replace_configuration_details: (required) + Details for updating the nodeReplaceConfiguration. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.bds.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.bds.BdsClient.update_node_replace_configuration` + + :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_node_replace_configuration(bds_instance_id, node_replace_configuration_id, update_node_replace_configuration_details, **operation_kwargs) + if not wait_for_states: + return operation_result + lowered_wait_for_states = [w.lower() for w in wait_for_states] + if 'opc-work-request-id' not in operation_result.headers: + return operation_result + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + 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) diff --git a/src/oci/bds/models/__init__.py b/src/oci/bds/models/__init__.py index 195d64f7f..4774baf89 100644 --- a/src/oci/bds/models/__init__.py +++ b/src/oci/bds/models/__init__.py @@ -25,6 +25,7 @@ from .auto_scale_policy_rule import AutoScalePolicyRule from .auto_scaling_configuration import AutoScalingConfiguration from .auto_scaling_configuration_summary import AutoScalingConfigurationSummary +from .backup_node_details import BackupNodeDetails from .batching_based_patching_configs import BatchingBasedPatchingConfigs from .bds_api_key import BdsApiKey from .bds_api_key_summary import BdsApiKeySummary @@ -42,7 +43,9 @@ from .create_bds_api_key_details import CreateBdsApiKeyDetails from .create_bds_instance_details import CreateBdsInstanceDetails from .create_bds_metastore_configuration_details import CreateBdsMetastoreConfigurationDetails +from .create_node_backup_configuration_details import CreateNodeBackupConfigurationDetails from .create_node_details import CreateNodeDetails +from .create_node_replace_configuration_details import CreateNodeReplaceConfigurationDetails from .day_based_horizontal_scaling_schedule_details import DayBasedHorizontalScalingScheduleDetails from .day_based_vertical_scaling_schedule_details import DayBasedVerticalScalingScheduleDetails from .default_error import DefaultError @@ -56,6 +59,7 @@ from .install_os_patch_details import InstallOsPatchDetails from .install_patch_details import InstallPatchDetails from .kerberos_details import KerberosDetails +from .level_type_details import LevelTypeDetails from .metric_based_horizontal_scale_in_config import MetricBasedHorizontalScaleInConfig from .metric_based_horizontal_scale_out_config import MetricBasedHorizontalScaleOutConfig from .metric_based_horizontal_scaling_policy_details import MetricBasedHorizontalScalingPolicyDetails @@ -65,6 +69,14 @@ from .metric_threshold_rule import MetricThresholdRule from .network_config import NetworkConfig from .node import Node +from .node_backup import NodeBackup +from .node_backup_configuration import NodeBackupConfiguration +from .node_backup_configuration_summary import NodeBackupConfigurationSummary +from .node_backup_summary import NodeBackupSummary +from .node_level_details import NodeLevelDetails +from .node_replace_configuration import NodeReplaceConfiguration +from .node_replace_configuration_summary import NodeReplaceConfigurationSummary +from .node_type_level_details import NodeTypeLevelDetails from .os_patch_details import OsPatchDetails from .os_patch_package_summary import OsPatchPackageSummary from .os_patch_summary import OsPatchSummary @@ -75,7 +87,9 @@ from .remove_cloud_sql_details import RemoveCloudSqlDetails from .remove_kafka_details import RemoveKafkaDetails from .remove_node_details import RemoveNodeDetails +from .remove_node_replace_configuration_details import RemoveNodeReplaceConfigurationDetails from .renew_certificate_details import RenewCertificateDetails +from .replace_node_details import ReplaceNodeDetails from .restart_node_details import RestartNodeDetails from .schedule_based_horizontal_scaling_policy_details import ScheduleBasedHorizontalScalingPolicyDetails from .schedule_based_vertical_scaling_policy_details import ScheduleBasedVerticalScalingPolicyDetails @@ -92,6 +106,8 @@ from .update_bds_metastore_configuration_details import UpdateBdsMetastoreConfigurationDetails from .update_metric_based_horizontal_scaling_policy_details import UpdateMetricBasedHorizontalScalingPolicyDetails from .update_metric_based_vertical_scaling_policy_details import UpdateMetricBasedVerticalScalingPolicyDetails +from .update_node_backup_configuration_details import UpdateNodeBackupConfigurationDetails +from .update_node_replace_configuration_details import UpdateNodeReplaceConfigurationDetails from .update_schedule_based_horizontal_scaling_policy_details import UpdateScheduleBasedHorizontalScalingPolicyDetails from .update_schedule_based_vertical_scaling_policy_details import UpdateScheduleBasedVerticalScalingPolicyDetails from .vertical_scaling_schedule_details import VerticalScalingScheduleDetails @@ -122,6 +138,7 @@ "AutoScalePolicyRule": AutoScalePolicyRule, "AutoScalingConfiguration": AutoScalingConfiguration, "AutoScalingConfigurationSummary": AutoScalingConfigurationSummary, + "BackupNodeDetails": BackupNodeDetails, "BatchingBasedPatchingConfigs": BatchingBasedPatchingConfigs, "BdsApiKey": BdsApiKey, "BdsApiKeySummary": BdsApiKeySummary, @@ -139,7 +156,9 @@ "CreateBdsApiKeyDetails": CreateBdsApiKeyDetails, "CreateBdsInstanceDetails": CreateBdsInstanceDetails, "CreateBdsMetastoreConfigurationDetails": CreateBdsMetastoreConfigurationDetails, + "CreateNodeBackupConfigurationDetails": CreateNodeBackupConfigurationDetails, "CreateNodeDetails": CreateNodeDetails, + "CreateNodeReplaceConfigurationDetails": CreateNodeReplaceConfigurationDetails, "DayBasedHorizontalScalingScheduleDetails": DayBasedHorizontalScalingScheduleDetails, "DayBasedVerticalScalingScheduleDetails": DayBasedVerticalScalingScheduleDetails, "DefaultError": DefaultError, @@ -153,6 +172,7 @@ "InstallOsPatchDetails": InstallOsPatchDetails, "InstallPatchDetails": InstallPatchDetails, "KerberosDetails": KerberosDetails, + "LevelTypeDetails": LevelTypeDetails, "MetricBasedHorizontalScaleInConfig": MetricBasedHorizontalScaleInConfig, "MetricBasedHorizontalScaleOutConfig": MetricBasedHorizontalScaleOutConfig, "MetricBasedHorizontalScalingPolicyDetails": MetricBasedHorizontalScalingPolicyDetails, @@ -162,6 +182,14 @@ "MetricThresholdRule": MetricThresholdRule, "NetworkConfig": NetworkConfig, "Node": Node, + "NodeBackup": NodeBackup, + "NodeBackupConfiguration": NodeBackupConfiguration, + "NodeBackupConfigurationSummary": NodeBackupConfigurationSummary, + "NodeBackupSummary": NodeBackupSummary, + "NodeLevelDetails": NodeLevelDetails, + "NodeReplaceConfiguration": NodeReplaceConfiguration, + "NodeReplaceConfigurationSummary": NodeReplaceConfigurationSummary, + "NodeTypeLevelDetails": NodeTypeLevelDetails, "OsPatchDetails": OsPatchDetails, "OsPatchPackageSummary": OsPatchPackageSummary, "OsPatchSummary": OsPatchSummary, @@ -172,7 +200,9 @@ "RemoveCloudSqlDetails": RemoveCloudSqlDetails, "RemoveKafkaDetails": RemoveKafkaDetails, "RemoveNodeDetails": RemoveNodeDetails, + "RemoveNodeReplaceConfigurationDetails": RemoveNodeReplaceConfigurationDetails, "RenewCertificateDetails": RenewCertificateDetails, + "ReplaceNodeDetails": ReplaceNodeDetails, "RestartNodeDetails": RestartNodeDetails, "ScheduleBasedHorizontalScalingPolicyDetails": ScheduleBasedHorizontalScalingPolicyDetails, "ScheduleBasedVerticalScalingPolicyDetails": ScheduleBasedVerticalScalingPolicyDetails, @@ -189,6 +219,8 @@ "UpdateBdsMetastoreConfigurationDetails": UpdateBdsMetastoreConfigurationDetails, "UpdateMetricBasedHorizontalScalingPolicyDetails": UpdateMetricBasedHorizontalScalingPolicyDetails, "UpdateMetricBasedVerticalScalingPolicyDetails": UpdateMetricBasedVerticalScalingPolicyDetails, + "UpdateNodeBackupConfigurationDetails": UpdateNodeBackupConfigurationDetails, + "UpdateNodeReplaceConfigurationDetails": UpdateNodeReplaceConfigurationDetails, "UpdateScheduleBasedHorizontalScalingPolicyDetails": UpdateScheduleBasedHorizontalScalingPolicyDetails, "UpdateScheduleBasedVerticalScalingPolicyDetails": UpdateScheduleBasedVerticalScalingPolicyDetails, "VerticalScalingScheduleDetails": VerticalScalingScheduleDetails, diff --git a/src/oci/bds/models/backup_node_details.py b/src/oci/bds/models/backup_node_details.py new file mode 100644 index 000000000..e1848519c --- /dev/null +++ b/src/oci/bds/models/backup_node_details.py @@ -0,0 +1,99 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20190531 + + +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 BackupNodeDetails(object): + """ + The information about the nodes to backup. + """ + + def __init__(self, **kwargs): + """ + Initializes a new BackupNodeDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param level_type_details: + The value to assign to the level_type_details property of this BackupNodeDetails. + :type level_type_details: oci.bds.models.LevelTypeDetails + + :param backup_type: + The value to assign to the backup_type property of this BackupNodeDetails. + :type backup_type: str + + """ + self.swagger_types = { + 'level_type_details': 'LevelTypeDetails', + 'backup_type': 'str' + } + + self.attribute_map = { + 'level_type_details': 'levelTypeDetails', + 'backup_type': 'backupType' + } + + self._level_type_details = None + self._backup_type = None + + @property + def level_type_details(self): + """ + **[Required]** Gets the level_type_details of this BackupNodeDetails. + + :return: The level_type_details of this BackupNodeDetails. + :rtype: oci.bds.models.LevelTypeDetails + """ + return self._level_type_details + + @level_type_details.setter + def level_type_details(self, level_type_details): + """ + Sets the level_type_details of this BackupNodeDetails. + + :param level_type_details: The level_type_details of this BackupNodeDetails. + :type: oci.bds.models.LevelTypeDetails + """ + self._level_type_details = level_type_details + + @property + def backup_type(self): + """ + Gets the backup_type of this BackupNodeDetails. + Incremental backup type includes only the changes since the last backup. Full backup type includes all changes since the volume was created. + + + :return: The backup_type of this BackupNodeDetails. + :rtype: str + """ + return self._backup_type + + @backup_type.setter + def backup_type(self, backup_type): + """ + Sets the backup_type of this BackupNodeDetails. + Incremental backup type includes only the changes since the last backup. Full backup type includes all changes since the volume was created. + + + :param backup_type: The backup_type of this BackupNodeDetails. + :type: str + """ + self._backup_type = backup_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/bds/models/create_node_backup_configuration_details.py b/src/oci/bds/models/create_node_backup_configuration_details.py new file mode 100644 index 000000000..913c4bda3 --- /dev/null +++ b/src/oci/bds/models/create_node_backup_configuration_details.py @@ -0,0 +1,223 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20190531 + + +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 CreateNodeBackupConfigurationDetails(object): + """ + The information about the NodeBackupConfiguration. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CreateNodeBackupConfigurationDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param level_type_details: + The value to assign to the level_type_details property of this CreateNodeBackupConfigurationDetails. + :type level_type_details: oci.bds.models.LevelTypeDetails + + :param display_name: + The value to assign to the display_name property of this CreateNodeBackupConfigurationDetails. + :type display_name: str + + :param timezone: + The value to assign to the timezone property of this CreateNodeBackupConfigurationDetails. + :type timezone: str + + :param schedule: + The value to assign to the schedule property of this CreateNodeBackupConfigurationDetails. + :type schedule: str + + :param number_of_backups_to_retain: + The value to assign to the number_of_backups_to_retain property of this CreateNodeBackupConfigurationDetails. + :type number_of_backups_to_retain: int + + :param backup_type: + The value to assign to the backup_type property of this CreateNodeBackupConfigurationDetails. + :type backup_type: str + + """ + self.swagger_types = { + 'level_type_details': 'LevelTypeDetails', + 'display_name': 'str', + 'timezone': 'str', + 'schedule': 'str', + 'number_of_backups_to_retain': 'int', + 'backup_type': 'str' + } + + self.attribute_map = { + 'level_type_details': 'levelTypeDetails', + 'display_name': 'displayName', + 'timezone': 'timezone', + 'schedule': 'schedule', + 'number_of_backups_to_retain': 'numberOfBackupsToRetain', + 'backup_type': 'backupType' + } + + self._level_type_details = None + self._display_name = None + self._timezone = None + self._schedule = None + self._number_of_backups_to_retain = None + self._backup_type = None + + @property + def level_type_details(self): + """ + **[Required]** Gets the level_type_details of this CreateNodeBackupConfigurationDetails. + + :return: The level_type_details of this CreateNodeBackupConfigurationDetails. + :rtype: oci.bds.models.LevelTypeDetails + """ + return self._level_type_details + + @level_type_details.setter + def level_type_details(self, level_type_details): + """ + Sets the level_type_details of this CreateNodeBackupConfigurationDetails. + + :param level_type_details: The level_type_details of this CreateNodeBackupConfigurationDetails. + :type: oci.bds.models.LevelTypeDetails + """ + self._level_type_details = level_type_details + + @property + def display_name(self): + """ + Gets the display_name of this CreateNodeBackupConfigurationDetails. + A user-friendly name. Only ASCII alphanumeric characters with no spaces allowed. The name does not have to be unique, and it may be changed. Avoid entering confidential information. + + + :return: The display_name of this CreateNodeBackupConfigurationDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this CreateNodeBackupConfigurationDetails. + A user-friendly name. Only ASCII alphanumeric characters with no spaces allowed. The name does not have to be unique, and it may be changed. Avoid entering confidential information. + + + :param display_name: The display_name of this CreateNodeBackupConfigurationDetails. + :type: str + """ + self._display_name = display_name + + @property + def timezone(self): + """ + Gets the timezone of this CreateNodeBackupConfigurationDetails. + The time zone of the execution schedule, in IANA time zone database name format + + + :return: The timezone of this CreateNodeBackupConfigurationDetails. + :rtype: str + """ + return self._timezone + + @timezone.setter + def timezone(self, timezone): + """ + Sets the timezone of this CreateNodeBackupConfigurationDetails. + The time zone of the execution schedule, in IANA time zone database name format + + + :param timezone: The timezone of this CreateNodeBackupConfigurationDetails. + :type: str + """ + self._timezone = timezone + + @property + def schedule(self): + """ + **[Required]** Gets the schedule of this CreateNodeBackupConfigurationDetails. + Day/time recurrence (specified following RFC 5545) at which to trigger the backup process. Currently only DAILY, WEEKLY and MONTHLY frequency is supported. Days of the week are specified using BYDAY field. Time of the day is specified using BYHOUR. Other fields are not supported. + + + :return: The schedule of this CreateNodeBackupConfigurationDetails. + :rtype: str + """ + return self._schedule + + @schedule.setter + def schedule(self, schedule): + """ + Sets the schedule of this CreateNodeBackupConfigurationDetails. + Day/time recurrence (specified following RFC 5545) at which to trigger the backup process. Currently only DAILY, WEEKLY and MONTHLY frequency is supported. Days of the week are specified using BYDAY field. Time of the day is specified using BYHOUR. Other fields are not supported. + + + :param schedule: The schedule of this CreateNodeBackupConfigurationDetails. + :type: str + """ + self._schedule = schedule + + @property + def number_of_backups_to_retain(self): + """ + Gets the number_of_backups_to_retain of this CreateNodeBackupConfigurationDetails. + Number of backup copies to retain. + + + :return: The number_of_backups_to_retain of this CreateNodeBackupConfigurationDetails. + :rtype: int + """ + return self._number_of_backups_to_retain + + @number_of_backups_to_retain.setter + def number_of_backups_to_retain(self, number_of_backups_to_retain): + """ + Sets the number_of_backups_to_retain of this CreateNodeBackupConfigurationDetails. + Number of backup copies to retain. + + + :param number_of_backups_to_retain: The number_of_backups_to_retain of this CreateNodeBackupConfigurationDetails. + :type: int + """ + self._number_of_backups_to_retain = number_of_backups_to_retain + + @property + def backup_type(self): + """ + Gets the backup_type of this CreateNodeBackupConfigurationDetails. + Incremental backup type includes only the changes since the last backup. Full backup type includes all changes since the volume was created. + + + :return: The backup_type of this CreateNodeBackupConfigurationDetails. + :rtype: str + """ + return self._backup_type + + @backup_type.setter + def backup_type(self, backup_type): + """ + Sets the backup_type of this CreateNodeBackupConfigurationDetails. + Incremental backup type includes only the changes since the last backup. Full backup type includes all changes since the volume was created. + + + :param backup_type: The backup_type of this CreateNodeBackupConfigurationDetails. + :type: str + """ + self._backup_type = backup_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/bds/models/create_node_replace_configuration_details.py b/src/oci/bds/models/create_node_replace_configuration_details.py new file mode 100644 index 000000000..21f6bab98 --- /dev/null +++ b/src/oci/bds/models/create_node_replace_configuration_details.py @@ -0,0 +1,192 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20190531 + + +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 CreateNodeReplaceConfigurationDetails(object): + """ + The information about the NodeReplaceConfiguration + """ + + def __init__(self, **kwargs): + """ + Initializes a new CreateNodeReplaceConfigurationDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param level_type_details: + The value to assign to the level_type_details property of this CreateNodeReplaceConfigurationDetails. + :type level_type_details: oci.bds.models.LevelTypeDetails + + :param display_name: + The value to assign to the display_name property of this CreateNodeReplaceConfigurationDetails. + :type display_name: str + + :param cluster_admin_password: + The value to assign to the cluster_admin_password property of this CreateNodeReplaceConfigurationDetails. + :type cluster_admin_password: str + + :param metric_type: + The value to assign to the metric_type property of this CreateNodeReplaceConfigurationDetails. + :type metric_type: str + + :param duration_in_minutes: + The value to assign to the duration_in_minutes property of this CreateNodeReplaceConfigurationDetails. + :type duration_in_minutes: int + + """ + self.swagger_types = { + 'level_type_details': 'LevelTypeDetails', + 'display_name': 'str', + 'cluster_admin_password': 'str', + 'metric_type': 'str', + 'duration_in_minutes': 'int' + } + + self.attribute_map = { + 'level_type_details': 'levelTypeDetails', + 'display_name': 'displayName', + 'cluster_admin_password': 'clusterAdminPassword', + 'metric_type': 'metricType', + 'duration_in_minutes': 'durationInMinutes' + } + + self._level_type_details = None + self._display_name = None + self._cluster_admin_password = None + self._metric_type = None + self._duration_in_minutes = None + + @property + def level_type_details(self): + """ + **[Required]** Gets the level_type_details of this CreateNodeReplaceConfigurationDetails. + + :return: The level_type_details of this CreateNodeReplaceConfigurationDetails. + :rtype: oci.bds.models.LevelTypeDetails + """ + return self._level_type_details + + @level_type_details.setter + def level_type_details(self, level_type_details): + """ + Sets the level_type_details of this CreateNodeReplaceConfigurationDetails. + + :param level_type_details: The level_type_details of this CreateNodeReplaceConfigurationDetails. + :type: oci.bds.models.LevelTypeDetails + """ + self._level_type_details = level_type_details + + @property + def display_name(self): + """ + Gets the display_name of this CreateNodeReplaceConfigurationDetails. + A user-friendly name. Only ASCII alphanumeric characters with no spaces allowed. The name does not have to be unique, and it may be changed. Avoid entering confidential information. + + + :return: The display_name of this CreateNodeReplaceConfigurationDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this CreateNodeReplaceConfigurationDetails. + A user-friendly name. Only ASCII alphanumeric characters with no spaces allowed. The name does not have to be unique, and it may be changed. Avoid entering confidential information. + + + :param display_name: The display_name of this CreateNodeReplaceConfigurationDetails. + :type: str + """ + self._display_name = display_name + + @property + def cluster_admin_password(self): + """ + **[Required]** Gets the cluster_admin_password of this CreateNodeReplaceConfigurationDetails. + Base-64 encoded password for the cluster admin user. + + + :return: The cluster_admin_password of this CreateNodeReplaceConfigurationDetails. + :rtype: str + """ + return self._cluster_admin_password + + @cluster_admin_password.setter + def cluster_admin_password(self, cluster_admin_password): + """ + Sets the cluster_admin_password of this CreateNodeReplaceConfigurationDetails. + Base-64 encoded password for the cluster admin user. + + + :param cluster_admin_password: The cluster_admin_password of this CreateNodeReplaceConfigurationDetails. + :type: str + """ + self._cluster_admin_password = cluster_admin_password + + @property + def metric_type(self): + """ + **[Required]** Gets the metric_type of this CreateNodeReplaceConfigurationDetails. + Type of compute instance health metric to use for node replacement + + + :return: The metric_type of this CreateNodeReplaceConfigurationDetails. + :rtype: str + """ + return self._metric_type + + @metric_type.setter + def metric_type(self, metric_type): + """ + Sets the metric_type of this CreateNodeReplaceConfigurationDetails. + Type of compute instance health metric to use for node replacement + + + :param metric_type: The metric_type of this CreateNodeReplaceConfigurationDetails. + :type: str + """ + self._metric_type = metric_type + + @property + def duration_in_minutes(self): + """ + **[Required]** Gets the duration_in_minutes of this CreateNodeReplaceConfigurationDetails. + This value is the minimum period of time to wait before triggering node replacement. The value is in minutes. + + + :return: The duration_in_minutes of this CreateNodeReplaceConfigurationDetails. + :rtype: int + """ + return self._duration_in_minutes + + @duration_in_minutes.setter + def duration_in_minutes(self, duration_in_minutes): + """ + Sets the duration_in_minutes of this CreateNodeReplaceConfigurationDetails. + This value is the minimum period of time to wait before triggering node replacement. The value is in minutes. + + + :param duration_in_minutes: The duration_in_minutes of this CreateNodeReplaceConfigurationDetails. + :type: int + """ + self._duration_in_minutes = duration_in_minutes + + 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/bds/models/level_type_details.py b/src/oci/bds/models/level_type_details.py new file mode 100644 index 000000000..593b628d5 --- /dev/null +++ b/src/oci/bds/models/level_type_details.py @@ -0,0 +1,109 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20190531 + + +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 LevelTypeDetails(object): + """ + Details of the type of level used to trigger the creation of a new node backup configuration or node replacement configuration. + """ + + #: A constant which can be used with the level_type property of a LevelTypeDetails. + #: This constant has a value of "NODE_LEVEL" + LEVEL_TYPE_NODE_LEVEL = "NODE_LEVEL" + + #: A constant which can be used with the level_type property of a LevelTypeDetails. + #: This constant has a value of "NODE_TYPE_LEVEL" + LEVEL_TYPE_NODE_TYPE_LEVEL = "NODE_TYPE_LEVEL" + + def __init__(self, **kwargs): + """ + Initializes a new LevelTypeDetails 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.bds.models.NodeTypeLevelDetails` + * :class:`~oci.bds.models.NodeLevelDetails` + + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param level_type: + The value to assign to the level_type property of this LevelTypeDetails. + Allowed values for this property are: "NODE_LEVEL", "NODE_TYPE_LEVEL", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type level_type: str + + """ + self.swagger_types = { + 'level_type': 'str' + } + + self.attribute_map = { + 'level_type': 'levelType' + } + + self._level_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['levelType'] + + if type == 'NODE_TYPE_LEVEL': + return 'NodeTypeLevelDetails' + + if type == 'NODE_LEVEL': + return 'NodeLevelDetails' + else: + return 'LevelTypeDetails' + + @property + def level_type(self): + """ + **[Required]** Gets the level_type of this LevelTypeDetails. + Type of level used to trigger the creation of a new node backup configuration or node replacement configuration. + + Allowed values for this property are: "NODE_LEVEL", "NODE_TYPE_LEVEL", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The level_type of this LevelTypeDetails. + :rtype: str + """ + return self._level_type + + @level_type.setter + def level_type(self, level_type): + """ + Sets the level_type of this LevelTypeDetails. + Type of level used to trigger the creation of a new node backup configuration or node replacement configuration. + + + :param level_type: The level_type of this LevelTypeDetails. + :type: str + """ + allowed_values = ["NODE_LEVEL", "NODE_TYPE_LEVEL"] + if not value_allowed_none_or_none_sentinel(level_type, allowed_values): + level_type = 'UNKNOWN_ENUM_VALUE' + self._level_type = level_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/bds/models/node.py b/src/oci/bds/models/node.py index 9a7ca2626..383fea984 100644 --- a/src/oci/bds/models/node.py +++ b/src/oci/bds/models/node.py @@ -184,6 +184,14 @@ def __init__(self, **kwargs): The value to assign to the is_reboot_required property of this Node. :type is_reboot_required: bool + :param time_replaced: + The value to assign to the time_replaced property of this Node. + :type time_replaced: datetime + + :param node_backup_id: + The value to assign to the node_backup_id property of this Node. + :type node_backup_id: str + """ self.swagger_types = { 'instance_id': 'str', @@ -207,7 +215,9 @@ def __init__(self, **kwargs): 'local_disks_total_size_in_gbs': 'float', 'time_maintenance_reboot_due': 'datetime', 'os_version': 'str', - 'is_reboot_required': 'bool' + 'is_reboot_required': 'bool', + 'time_replaced': 'datetime', + 'node_backup_id': 'str' } self.attribute_map = { @@ -232,7 +242,9 @@ def __init__(self, **kwargs): 'local_disks_total_size_in_gbs': 'localDisksTotalSizeInGBs', 'time_maintenance_reboot_due': 'timeMaintenanceRebootDue', 'os_version': 'osVersion', - 'is_reboot_required': 'isRebootRequired' + 'is_reboot_required': 'isRebootRequired', + 'time_replaced': 'timeReplaced', + 'node_backup_id': 'nodeBackupId' } self._instance_id = None @@ -257,6 +269,8 @@ def __init__(self, **kwargs): self._time_maintenance_reboot_due = None self._os_version = None self._is_reboot_required = None + self._time_replaced = None + self._node_backup_id = None @property def instance_id(self): @@ -798,6 +812,54 @@ def is_reboot_required(self, is_reboot_required): """ self._is_reboot_required = is_reboot_required + @property + def time_replaced(self): + """ + Gets the time_replaced of this Node. + The date and time the instance was replaced by a new vm with a node backup. + + + :return: The time_replaced of this Node. + :rtype: datetime + """ + return self._time_replaced + + @time_replaced.setter + def time_replaced(self, time_replaced): + """ + Sets the time_replaced of this Node. + The date and time the instance was replaced by a new vm with a node backup. + + + :param time_replaced: The time_replaced of this Node. + :type: datetime + """ + self._time_replaced = time_replaced + + @property + def node_backup_id(self): + """ + Gets the node_backup_id of this Node. + The node back id that was used for replacing the node. + + + :return: The node_backup_id of this Node. + :rtype: str + """ + return self._node_backup_id + + @node_backup_id.setter + def node_backup_id(self, node_backup_id): + """ + Sets the node_backup_id of this Node. + The node back id that was used for replacing the node. + + + :param node_backup_id: The node_backup_id of this Node. + :type: str + """ + self._node_backup_id = node_backup_id + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/bds/models/node_backup.py b/src/oci/bds/models/node_backup.py new file mode 100644 index 000000000..e4d38a131 --- /dev/null +++ b/src/oci/bds/models/node_backup.py @@ -0,0 +1,388 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20190531 + + +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 NodeBackup(object): + """ + The information about the Node's backup. + """ + + #: A constant which can be used with the backup_trigger_type property of a NodeBackup. + #: This constant has a value of "MANUAL" + BACKUP_TRIGGER_TYPE_MANUAL = "MANUAL" + + #: A constant which can be used with the backup_trigger_type property of a NodeBackup. + #: This constant has a value of "SCHEDULED" + BACKUP_TRIGGER_TYPE_SCHEDULED = "SCHEDULED" + + #: A constant which can be used with the backup_type property of a NodeBackup. + #: This constant has a value of "FULL" + BACKUP_TYPE_FULL = "FULL" + + #: A constant which can be used with the backup_type property of a NodeBackup. + #: This constant has a value of "INCREMENTAL" + BACKUP_TYPE_INCREMENTAL = "INCREMENTAL" + + #: A constant which can be used with the lifecycle_state property of a NodeBackup. + #: This constant has a value of "CREATING" + LIFECYCLE_STATE_CREATING = "CREATING" + + #: A constant which can be used with the lifecycle_state property of a NodeBackup. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a NodeBackup. + #: This constant has a value of "UPDATING" + LIFECYCLE_STATE_UPDATING = "UPDATING" + + #: A constant which can be used with the lifecycle_state property of a NodeBackup. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + #: A constant which can be used with the lifecycle_state property of a NodeBackup. + #: This constant has a value of "DELETED" + LIFECYCLE_STATE_DELETED = "DELETED" + + #: A constant which can be used with the lifecycle_state property of a NodeBackup. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + #: A constant which can be used with the lifecycle_state property of a NodeBackup. + #: This constant has a value of "PARTIAL" + LIFECYCLE_STATE_PARTIAL = "PARTIAL" + + def __init__(self, **kwargs): + """ + Initializes a new NodeBackup 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 NodeBackup. + :type id: str + + :param display_name: + The value to assign to the display_name property of this NodeBackup. + :type display_name: str + + :param node_instance_id: + The value to assign to the node_instance_id property of this NodeBackup. + :type node_instance_id: str + + :param node_host_name: + The value to assign to the node_host_name property of this NodeBackup. + :type node_host_name: str + + :param backup_trigger_type: + The value to assign to the backup_trigger_type property of this NodeBackup. + Allowed values for this property are: "MANUAL", "SCHEDULED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type backup_trigger_type: str + + :param node_backup_config_id: + The value to assign to the node_backup_config_id property of this NodeBackup. + :type node_backup_config_id: str + + :param backup_type: + The value to assign to the backup_type property of this NodeBackup. + Allowed values for this property are: "FULL", "INCREMENTAL", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type backup_type: str + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this NodeBackup. + Allowed values for this property are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", "PARTIAL", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param time_created: + The value to assign to the time_created property of this NodeBackup. + :type time_created: datetime + + """ + self.swagger_types = { + 'id': 'str', + 'display_name': 'str', + 'node_instance_id': 'str', + 'node_host_name': 'str', + 'backup_trigger_type': 'str', + 'node_backup_config_id': 'str', + 'backup_type': 'str', + 'lifecycle_state': 'str', + 'time_created': 'datetime' + } + + self.attribute_map = { + 'id': 'id', + 'display_name': 'displayName', + 'node_instance_id': 'nodeInstanceId', + 'node_host_name': 'nodeHostName', + 'backup_trigger_type': 'backupTriggerType', + 'node_backup_config_id': 'nodeBackupConfigId', + 'backup_type': 'backupType', + 'lifecycle_state': 'lifecycleState', + 'time_created': 'timeCreated' + } + + self._id = None + self._display_name = None + self._node_instance_id = None + self._node_host_name = None + self._backup_trigger_type = None + self._node_backup_config_id = None + self._backup_type = None + self._lifecycle_state = None + self._time_created = None + + @property + def id(self): + """ + **[Required]** Gets the id of this NodeBackup. + The id of the node backup. + + + :return: The id of this NodeBackup. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this NodeBackup. + The id of the node backup. + + + :param id: The id of this NodeBackup. + :type: str + """ + self._id = id + + @property + def display_name(self): + """ + **[Required]** Gets the display_name of this NodeBackup. + BDS generated name for the backup. Format is nodeHostName_timeCreated + + + :return: The display_name of this NodeBackup. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this NodeBackup. + BDS generated name for the backup. Format is nodeHostName_timeCreated + + + :param display_name: The display_name of this NodeBackup. + :type: str + """ + self._display_name = display_name + + @property + def node_instance_id(self): + """ + **[Required]** Gets the node_instance_id of this NodeBackup. + The instance OCID of the node, which is the resource from which the node backup was acquired. + + + :return: The node_instance_id of this NodeBackup. + :rtype: str + """ + return self._node_instance_id + + @node_instance_id.setter + def node_instance_id(self, node_instance_id): + """ + Sets the node_instance_id of this NodeBackup. + The instance OCID of the node, which is the resource from which the node backup was acquired. + + + :param node_instance_id: The node_instance_id of this NodeBackup. + :type: str + """ + self._node_instance_id = node_instance_id + + @property + def node_host_name(self): + """ + **[Required]** Gets the node_host_name of this NodeBackup. + Host name of the node to which this backup belongs. + + + :return: The node_host_name of this NodeBackup. + :rtype: str + """ + return self._node_host_name + + @node_host_name.setter + def node_host_name(self, node_host_name): + """ + Sets the node_host_name of this NodeBackup. + Host name of the node to which this backup belongs. + + + :param node_host_name: The node_host_name of this NodeBackup. + :type: str + """ + self._node_host_name = node_host_name + + @property + def backup_trigger_type(self): + """ + **[Required]** Gets the backup_trigger_type of this NodeBackup. + type based on how backup action was initiated. + + Allowed values for this property are: "MANUAL", "SCHEDULED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The backup_trigger_type of this NodeBackup. + :rtype: str + """ + return self._backup_trigger_type + + @backup_trigger_type.setter + def backup_trigger_type(self, backup_trigger_type): + """ + Sets the backup_trigger_type of this NodeBackup. + type based on how backup action was initiated. + + + :param backup_trigger_type: The backup_trigger_type of this NodeBackup. + :type: str + """ + allowed_values = ["MANUAL", "SCHEDULED"] + if not value_allowed_none_or_none_sentinel(backup_trigger_type, allowed_values): + backup_trigger_type = 'UNKNOWN_ENUM_VALUE' + self._backup_trigger_type = backup_trigger_type + + @property + def node_backup_config_id(self): + """ + Gets the node_backup_config_id of this NodeBackup. + The ID of the nodeBackupConfiguration if the NodeBackup is automatically created by applying the configuration. + + + :return: The node_backup_config_id of this NodeBackup. + :rtype: str + """ + return self._node_backup_config_id + + @node_backup_config_id.setter + def node_backup_config_id(self, node_backup_config_id): + """ + Sets the node_backup_config_id of this NodeBackup. + The ID of the nodeBackupConfiguration if the NodeBackup is automatically created by applying the configuration. + + + :param node_backup_config_id: The node_backup_config_id of this NodeBackup. + :type: str + """ + self._node_backup_config_id = node_backup_config_id + + @property + def backup_type(self): + """ + **[Required]** Gets the backup_type of this NodeBackup. + Incremental backup type includes only the changes since the last backup. Full backup type includes all changes since the volume was created. + + Allowed values for this property are: "FULL", "INCREMENTAL", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The backup_type of this NodeBackup. + :rtype: str + """ + return self._backup_type + + @backup_type.setter + def backup_type(self, backup_type): + """ + Sets the backup_type of this NodeBackup. + Incremental backup type includes only the changes since the last backup. Full backup type includes all changes since the volume was created. + + + :param backup_type: The backup_type of this NodeBackup. + :type: str + """ + allowed_values = ["FULL", "INCREMENTAL"] + if not value_allowed_none_or_none_sentinel(backup_type, allowed_values): + backup_type = 'UNKNOWN_ENUM_VALUE' + self._backup_type = backup_type + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this NodeBackup. + The state of the NodeBackup. + + Allowed values for this property are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", "PARTIAL", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this NodeBackup. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this NodeBackup. + The state of the NodeBackup. + + + :param lifecycle_state: The lifecycle_state of this NodeBackup. + :type: str + """ + allowed_values = ["CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", "PARTIAL"] + if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): + lifecycle_state = 'UNKNOWN_ENUM_VALUE' + self._lifecycle_state = lifecycle_state + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this NodeBackup. + The time the cluster was created, shown as an RFC 3339 formatted datetime string. + + + :return: The time_created of this NodeBackup. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this NodeBackup. + The time the cluster was created, shown as an RFC 3339 formatted datetime string. + + + :param time_created: The time_created of this NodeBackup. + :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/bds/models/node_backup_configuration.py b/src/oci/bds/models/node_backup_configuration.py new file mode 100644 index 000000000..2cd7905d9 --- /dev/null +++ b/src/oci/bds/models/node_backup_configuration.py @@ -0,0 +1,410 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20190531 + + +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 NodeBackupConfiguration(object): + """ + The information about the NodeBackupConfiguration. + """ + + #: A constant which can be used with the lifecycle_state property of a NodeBackupConfiguration. + #: This constant has a value of "CREATING" + LIFECYCLE_STATE_CREATING = "CREATING" + + #: A constant which can be used with the lifecycle_state property of a NodeBackupConfiguration. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a NodeBackupConfiguration. + #: This constant has a value of "UPDATING" + LIFECYCLE_STATE_UPDATING = "UPDATING" + + #: A constant which can be used with the lifecycle_state property of a NodeBackupConfiguration. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + #: A constant which can be used with the lifecycle_state property of a NodeBackupConfiguration. + #: This constant has a value of "DELETED" + LIFECYCLE_STATE_DELETED = "DELETED" + + #: A constant which can be used with the lifecycle_state property of a NodeBackupConfiguration. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + def __init__(self, **kwargs): + """ + Initializes a new NodeBackupConfiguration 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 NodeBackupConfiguration. + :type id: str + + :param bds_instance_id: + The value to assign to the bds_instance_id property of this NodeBackupConfiguration. + :type bds_instance_id: str + + :param display_name: + The value to assign to the display_name property of this NodeBackupConfiguration. + :type display_name: str + + :param level_type_details: + The value to assign to the level_type_details property of this NodeBackupConfiguration. + :type level_type_details: oci.bds.models.LevelTypeDetails + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this NodeBackupConfiguration. + Allowed values for this property are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param time_created: + The value to assign to the time_created property of this NodeBackupConfiguration. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this NodeBackupConfiguration. + :type time_updated: datetime + + :param timezone: + The value to assign to the timezone property of this NodeBackupConfiguration. + :type timezone: str + + :param schedule: + The value to assign to the schedule property of this NodeBackupConfiguration. + :type schedule: str + + :param number_of_backups_to_retain: + The value to assign to the number_of_backups_to_retain property of this NodeBackupConfiguration. + :type number_of_backups_to_retain: int + + :param backup_type: + The value to assign to the backup_type property of this NodeBackupConfiguration. + :type backup_type: str + + """ + self.swagger_types = { + 'id': 'str', + 'bds_instance_id': 'str', + 'display_name': 'str', + 'level_type_details': 'LevelTypeDetails', + 'lifecycle_state': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'timezone': 'str', + 'schedule': 'str', + 'number_of_backups_to_retain': 'int', + 'backup_type': 'str' + } + + self.attribute_map = { + 'id': 'id', + 'bds_instance_id': 'bdsInstanceId', + 'display_name': 'displayName', + 'level_type_details': 'levelTypeDetails', + 'lifecycle_state': 'lifecycleState', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'timezone': 'timezone', + 'schedule': 'schedule', + 'number_of_backups_to_retain': 'numberOfBackupsToRetain', + 'backup_type': 'backupType' + } + + self._id = None + self._bds_instance_id = None + self._display_name = None + self._level_type_details = None + self._lifecycle_state = None + self._time_created = None + self._time_updated = None + self._timezone = None + self._schedule = None + self._number_of_backups_to_retain = None + self._backup_type = None + + @property + def id(self): + """ + **[Required]** Gets the id of this NodeBackupConfiguration. + The unique identifier for the NodeBackupConfiguration. + + + :return: The id of this NodeBackupConfiguration. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this NodeBackupConfiguration. + The unique identifier for the NodeBackupConfiguration. + + + :param id: The id of this NodeBackupConfiguration. + :type: str + """ + self._id = id + + @property + def bds_instance_id(self): + """ + **[Required]** Gets the bds_instance_id of this NodeBackupConfiguration. + The OCID of the bdsInstance which is the parent resource id. + + + :return: The bds_instance_id of this NodeBackupConfiguration. + :rtype: str + """ + return self._bds_instance_id + + @bds_instance_id.setter + def bds_instance_id(self, bds_instance_id): + """ + Sets the bds_instance_id of this NodeBackupConfiguration. + The OCID of the bdsInstance which is the parent resource id. + + + :param bds_instance_id: The bds_instance_id of this NodeBackupConfiguration. + :type: str + """ + self._bds_instance_id = bds_instance_id + + @property + def display_name(self): + """ + **[Required]** Gets the display_name of this NodeBackupConfiguration. + A user-friendly name. Only ASCII alphanumeric characters with no spaces allowed. The name does not have to be unique, and it may be changed. Avoid entering confidential information. + + + :return: The display_name of this NodeBackupConfiguration. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this NodeBackupConfiguration. + A user-friendly name. Only ASCII alphanumeric characters with no spaces allowed. The name does not have to be unique, and it may be changed. Avoid entering confidential information. + + + :param display_name: The display_name of this NodeBackupConfiguration. + :type: str + """ + self._display_name = display_name + + @property + def level_type_details(self): + """ + **[Required]** Gets the level_type_details of this NodeBackupConfiguration. + + :return: The level_type_details of this NodeBackupConfiguration. + :rtype: oci.bds.models.LevelTypeDetails + """ + return self._level_type_details + + @level_type_details.setter + def level_type_details(self, level_type_details): + """ + Sets the level_type_details of this NodeBackupConfiguration. + + :param level_type_details: The level_type_details of this NodeBackupConfiguration. + :type: oci.bds.models.LevelTypeDetails + """ + self._level_type_details = level_type_details + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this NodeBackupConfiguration. + The state of the NodeBackupConfiguration. + + Allowed values for this property are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this NodeBackupConfiguration. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this NodeBackupConfiguration. + The state of the NodeBackupConfiguration. + + + :param lifecycle_state: The lifecycle_state of this NodeBackupConfiguration. + :type: str + """ + allowed_values = ["CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED"] + if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): + lifecycle_state = 'UNKNOWN_ENUM_VALUE' + self._lifecycle_state = lifecycle_state + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this NodeBackupConfiguration. + The time the NodeBackupConfiguration was created, shown as an RFC 3339 formatted datetime string. + + + :return: The time_created of this NodeBackupConfiguration. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this NodeBackupConfiguration. + The time the NodeBackupConfiguration was created, shown as an RFC 3339 formatted datetime string. + + + :param time_created: The time_created of this NodeBackupConfiguration. + :type: datetime + """ + self._time_created = time_created + + @property + def time_updated(self): + """ + **[Required]** Gets the time_updated of this NodeBackupConfiguration. + The time the NodeBackupConfiguration was updated, shown as an RFC 3339 formatted datetime string. + + + :return: The time_updated of this NodeBackupConfiguration. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this NodeBackupConfiguration. + The time the NodeBackupConfiguration was updated, shown as an RFC 3339 formatted datetime string. + + + :param time_updated: The time_updated of this NodeBackupConfiguration. + :type: datetime + """ + self._time_updated = time_updated + + @property + def timezone(self): + """ + **[Required]** Gets the timezone of this NodeBackupConfiguration. + The time zone of the execution schedule, in IANA time zone database name format + + + :return: The timezone of this NodeBackupConfiguration. + :rtype: str + """ + return self._timezone + + @timezone.setter + def timezone(self, timezone): + """ + Sets the timezone of this NodeBackupConfiguration. + The time zone of the execution schedule, in IANA time zone database name format + + + :param timezone: The timezone of this NodeBackupConfiguration. + :type: str + """ + self._timezone = timezone + + @property + def schedule(self): + """ + **[Required]** Gets the schedule of this NodeBackupConfiguration. + Day/time recurrence (specified following RFC 5545) at which to trigger the backup process. Currently only DAILY, WEEKLY and MONTHLY frequency is supported. Days of the week are specified using BYDAY field. Time of the day is specified using BYHOUR. Other fields are not supported. + + + :return: The schedule of this NodeBackupConfiguration. + :rtype: str + """ + return self._schedule + + @schedule.setter + def schedule(self, schedule): + """ + Sets the schedule of this NodeBackupConfiguration. + Day/time recurrence (specified following RFC 5545) at which to trigger the backup process. Currently only DAILY, WEEKLY and MONTHLY frequency is supported. Days of the week are specified using BYDAY field. Time of the day is specified using BYHOUR. Other fields are not supported. + + + :param schedule: The schedule of this NodeBackupConfiguration. + :type: str + """ + self._schedule = schedule + + @property + def number_of_backups_to_retain(self): + """ + **[Required]** Gets the number_of_backups_to_retain of this NodeBackupConfiguration. + Number of backup copies to retain. + + + :return: The number_of_backups_to_retain of this NodeBackupConfiguration. + :rtype: int + """ + return self._number_of_backups_to_retain + + @number_of_backups_to_retain.setter + def number_of_backups_to_retain(self, number_of_backups_to_retain): + """ + Sets the number_of_backups_to_retain of this NodeBackupConfiguration. + Number of backup copies to retain. + + + :param number_of_backups_to_retain: The number_of_backups_to_retain of this NodeBackupConfiguration. + :type: int + """ + self._number_of_backups_to_retain = number_of_backups_to_retain + + @property + def backup_type(self): + """ + Gets the backup_type of this NodeBackupConfiguration. + Incremental backup type includes only the changes since the last backup. Full backup type includes all changes since the volume was created. + + + :return: The backup_type of this NodeBackupConfiguration. + :rtype: str + """ + return self._backup_type + + @backup_type.setter + def backup_type(self, backup_type): + """ + Sets the backup_type of this NodeBackupConfiguration. + Incremental backup type includes only the changes since the last backup. Full backup type includes all changes since the volume was created. + + + :param backup_type: The backup_type of this NodeBackupConfiguration. + :type: str + """ + self._backup_type = backup_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/bds/models/node_backup_configuration_summary.py b/src/oci/bds/models/node_backup_configuration_summary.py new file mode 100644 index 000000000..2875b600a --- /dev/null +++ b/src/oci/bds/models/node_backup_configuration_summary.py @@ -0,0 +1,254 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20190531 + + +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 NodeBackupConfigurationSummary(object): + """ + The information about the NodeBackupConfiguration. + """ + + def __init__(self, **kwargs): + """ + Initializes a new NodeBackupConfigurationSummary 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 NodeBackupConfigurationSummary. + :type id: str + + :param bds_instance_id: + The value to assign to the bds_instance_id property of this NodeBackupConfigurationSummary. + :type bds_instance_id: str + + :param display_name: + The value to assign to the display_name property of this NodeBackupConfigurationSummary. + :type display_name: str + + :param level_type_details: + The value to assign to the level_type_details property of this NodeBackupConfigurationSummary. + :type level_type_details: oci.bds.models.LevelTypeDetails + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this NodeBackupConfigurationSummary. + :type lifecycle_state: str + + :param time_created: + The value to assign to the time_created property of this NodeBackupConfigurationSummary. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this NodeBackupConfigurationSummary. + :type time_updated: datetime + + """ + self.swagger_types = { + 'id': 'str', + 'bds_instance_id': 'str', + 'display_name': 'str', + 'level_type_details': 'LevelTypeDetails', + 'lifecycle_state': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime' + } + + self.attribute_map = { + 'id': 'id', + 'bds_instance_id': 'bdsInstanceId', + 'display_name': 'displayName', + 'level_type_details': 'levelTypeDetails', + 'lifecycle_state': 'lifecycleState', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated' + } + + self._id = None + self._bds_instance_id = None + self._display_name = None + self._level_type_details = None + self._lifecycle_state = None + self._time_created = None + self._time_updated = None + + @property + def id(self): + """ + **[Required]** Gets the id of this NodeBackupConfigurationSummary. + The id of the NodeBackupConfiguration. + + + :return: The id of this NodeBackupConfigurationSummary. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this NodeBackupConfigurationSummary. + The id of the NodeBackupConfiguration. + + + :param id: The id of this NodeBackupConfigurationSummary. + :type: str + """ + self._id = id + + @property + def bds_instance_id(self): + """ + **[Required]** Gets the bds_instance_id of this NodeBackupConfigurationSummary. + The OCID of the bdsInstance which is the parent resource id. + + + :return: The bds_instance_id of this NodeBackupConfigurationSummary. + :rtype: str + """ + return self._bds_instance_id + + @bds_instance_id.setter + def bds_instance_id(self, bds_instance_id): + """ + Sets the bds_instance_id of this NodeBackupConfigurationSummary. + The OCID of the bdsInstance which is the parent resource id. + + + :param bds_instance_id: The bds_instance_id of this NodeBackupConfigurationSummary. + :type: str + """ + self._bds_instance_id = bds_instance_id + + @property + def display_name(self): + """ + **[Required]** Gets the display_name of this NodeBackupConfigurationSummary. + A user-friendly name. Only ASCII alphanumeric characters with no spaces allowed. The name does not have to be unique, and it may be changed. Avoid entering confidential information. + + + :return: The display_name of this NodeBackupConfigurationSummary. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this NodeBackupConfigurationSummary. + A user-friendly name. Only ASCII alphanumeric characters with no spaces allowed. The name does not have to be unique, and it may be changed. Avoid entering confidential information. + + + :param display_name: The display_name of this NodeBackupConfigurationSummary. + :type: str + """ + self._display_name = display_name + + @property + def level_type_details(self): + """ + **[Required]** Gets the level_type_details of this NodeBackupConfigurationSummary. + + :return: The level_type_details of this NodeBackupConfigurationSummary. + :rtype: oci.bds.models.LevelTypeDetails + """ + return self._level_type_details + + @level_type_details.setter + def level_type_details(self, level_type_details): + """ + Sets the level_type_details of this NodeBackupConfigurationSummary. + + :param level_type_details: The level_type_details of this NodeBackupConfigurationSummary. + :type: oci.bds.models.LevelTypeDetails + """ + self._level_type_details = level_type_details + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this NodeBackupConfigurationSummary. + The state of the NodeBackupConfiguration. + + + :return: The lifecycle_state of this NodeBackupConfigurationSummary. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this NodeBackupConfigurationSummary. + The state of the NodeBackupConfiguration. + + + :param lifecycle_state: The lifecycle_state of this NodeBackupConfigurationSummary. + :type: str + """ + self._lifecycle_state = lifecycle_state + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this NodeBackupConfigurationSummary. + The time the NodeBackupConfiguration was created, shown as an RFC 3339 formatted datetime string. + + + :return: The time_created of this NodeBackupConfigurationSummary. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this NodeBackupConfigurationSummary. + The time the NodeBackupConfiguration was created, shown as an RFC 3339 formatted datetime string. + + + :param time_created: The time_created of this NodeBackupConfigurationSummary. + :type: datetime + """ + self._time_created = time_created + + @property + def time_updated(self): + """ + **[Required]** Gets the time_updated of this NodeBackupConfigurationSummary. + The time the NodeBackupConfiguration was updated, shown as an RFC 3339 formatted datetime string. + + + :return: The time_updated of this NodeBackupConfigurationSummary. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this NodeBackupConfigurationSummary. + The time the NodeBackupConfiguration was updated, shown as an RFC 3339 formatted datetime string. + + + :param time_updated: The time_updated of this NodeBackupConfigurationSummary. + :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/bds/models/node_backup_summary.py b/src/oci/bds/models/node_backup_summary.py new file mode 100644 index 000000000..5d5209994 --- /dev/null +++ b/src/oci/bds/models/node_backup_summary.py @@ -0,0 +1,289 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20190531 + + +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 NodeBackupSummary(object): + """ + The information about the nodeBackupSummary. + """ + + def __init__(self, **kwargs): + """ + Initializes a new NodeBackupSummary 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 NodeBackupSummary. + :type id: str + + :param display_name: + The value to assign to the display_name property of this NodeBackupSummary. + :type display_name: str + + :param node_instance_id: + The value to assign to the node_instance_id property of this NodeBackupSummary. + :type node_instance_id: str + + :param node_host_name: + The value to assign to the node_host_name property of this NodeBackupSummary. + :type node_host_name: str + + :param backup_trigger_type: + The value to assign to the backup_trigger_type property of this NodeBackupSummary. + :type backup_trigger_type: str + + :param backup_type: + The value to assign to the backup_type property of this NodeBackupSummary. + :type backup_type: str + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this NodeBackupSummary. + :type lifecycle_state: str + + :param time_created: + The value to assign to the time_created property of this NodeBackupSummary. + :type time_created: datetime + + """ + self.swagger_types = { + 'id': 'str', + 'display_name': 'str', + 'node_instance_id': 'str', + 'node_host_name': 'str', + 'backup_trigger_type': 'str', + 'backup_type': 'str', + 'lifecycle_state': 'str', + 'time_created': 'datetime' + } + + self.attribute_map = { + 'id': 'id', + 'display_name': 'displayName', + 'node_instance_id': 'nodeInstanceId', + 'node_host_name': 'nodeHostName', + 'backup_trigger_type': 'backupTriggerType', + 'backup_type': 'backupType', + 'lifecycle_state': 'lifecycleState', + 'time_created': 'timeCreated' + } + + self._id = None + self._display_name = None + self._node_instance_id = None + self._node_host_name = None + self._backup_trigger_type = None + self._backup_type = None + self._lifecycle_state = None + self._time_created = None + + @property + def id(self): + """ + **[Required]** Gets the id of this NodeBackupSummary. + The id of the node backup. + + + :return: The id of this NodeBackupSummary. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this NodeBackupSummary. + The id of the node backup. + + + :param id: The id of this NodeBackupSummary. + :type: str + """ + self._id = id + + @property + def display_name(self): + """ + **[Required]** Gets the display_name of this NodeBackupSummary. + BDS generated name for the backup. Format is nodeHostName_timeCreated. + + + :return: The display_name of this NodeBackupSummary. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this NodeBackupSummary. + BDS generated name for the backup. Format is nodeHostName_timeCreated. + + + :param display_name: The display_name of this NodeBackupSummary. + :type: str + """ + self._display_name = display_name + + @property + def node_instance_id(self): + """ + **[Required]** Gets the node_instance_id of this NodeBackupSummary. + The instance OCID of the node, which is the resource from which the node backup was acquired. + + + :return: The node_instance_id of this NodeBackupSummary. + :rtype: str + """ + return self._node_instance_id + + @node_instance_id.setter + def node_instance_id(self, node_instance_id): + """ + Sets the node_instance_id of this NodeBackupSummary. + The instance OCID of the node, which is the resource from which the node backup was acquired. + + + :param node_instance_id: The node_instance_id of this NodeBackupSummary. + :type: str + """ + self._node_instance_id = node_instance_id + + @property + def node_host_name(self): + """ + **[Required]** Gets the node_host_name of this NodeBackupSummary. + Host name of the node that the backup belongs to. + + + :return: The node_host_name of this NodeBackupSummary. + :rtype: str + """ + return self._node_host_name + + @node_host_name.setter + def node_host_name(self, node_host_name): + """ + Sets the node_host_name of this NodeBackupSummary. + Host name of the node that the backup belongs to. + + + :param node_host_name: The node_host_name of this NodeBackupSummary. + :type: str + """ + self._node_host_name = node_host_name + + @property + def backup_trigger_type(self): + """ + **[Required]** Gets the backup_trigger_type of this NodeBackupSummary. + type based on how backup action was initiated. + + + :return: The backup_trigger_type of this NodeBackupSummary. + :rtype: str + """ + return self._backup_trigger_type + + @backup_trigger_type.setter + def backup_trigger_type(self, backup_trigger_type): + """ + Sets the backup_trigger_type of this NodeBackupSummary. + type based on how backup action was initiated. + + + :param backup_trigger_type: The backup_trigger_type of this NodeBackupSummary. + :type: str + """ + self._backup_trigger_type = backup_trigger_type + + @property + def backup_type(self): + """ + **[Required]** Gets the backup_type of this NodeBackupSummary. + Incremental backup type includes only the changes since the last backup. Full backup type includes all changes since the volume was created + + + :return: The backup_type of this NodeBackupSummary. + :rtype: str + """ + return self._backup_type + + @backup_type.setter + def backup_type(self, backup_type): + """ + Sets the backup_type of this NodeBackupSummary. + Incremental backup type includes only the changes since the last backup. Full backup type includes all changes since the volume was created + + + :param backup_type: The backup_type of this NodeBackupSummary. + :type: str + """ + self._backup_type = backup_type + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this NodeBackupSummary. + The state of NodeBackup. + + + :return: The lifecycle_state of this NodeBackupSummary. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this NodeBackupSummary. + The state of NodeBackup. + + + :param lifecycle_state: The lifecycle_state of this NodeBackupSummary. + :type: str + """ + self._lifecycle_state = lifecycle_state + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this NodeBackupSummary. + The time the cluster was created, shown as an RFC 3339 formatted datetime string. + + + :return: The time_created of this NodeBackupSummary. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this NodeBackupSummary. + The time the cluster was created, shown as an RFC 3339 formatted datetime string. + + + :param time_created: The time_created of this NodeBackupSummary. + :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/bds/models/node_level_details.py b/src/oci/bds/models/node_level_details.py new file mode 100644 index 000000000..121f3d456 --- /dev/null +++ b/src/oci/bds/models/node_level_details.py @@ -0,0 +1,82 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20190531 + +from .level_type_details import LevelTypeDetails +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 NodeLevelDetails(LevelTypeDetails): + """ + Details of node level used to trigger the creation of a new node backup configuration and node replacement configuration. + """ + + def __init__(self, **kwargs): + """ + Initializes a new NodeLevelDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.bds.models.NodeLevelDetails.level_type` attribute + of this class is ``NODE_LEVEL`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param level_type: + The value to assign to the level_type property of this NodeLevelDetails. + Allowed values for this property are: "NODE_LEVEL", "NODE_TYPE_LEVEL" + :type level_type: str + + :param node_host_name: + The value to assign to the node_host_name property of this NodeLevelDetails. + :type node_host_name: str + + """ + self.swagger_types = { + 'level_type': 'str', + 'node_host_name': 'str' + } + + self.attribute_map = { + 'level_type': 'levelType', + 'node_host_name': 'nodeHostName' + } + + self._level_type = None + self._node_host_name = None + self._level_type = 'NODE_LEVEL' + + @property + def node_host_name(self): + """ + **[Required]** Gets the node_host_name of this NodeLevelDetails. + Host name of the node to create backup configuration. + + + :return: The node_host_name of this NodeLevelDetails. + :rtype: str + """ + return self._node_host_name + + @node_host_name.setter + def node_host_name(self, node_host_name): + """ + Sets the node_host_name of this NodeLevelDetails. + Host name of the node to create backup configuration. + + + :param node_host_name: The node_host_name of this NodeLevelDetails. + :type: str + """ + self._node_host_name = node_host_name + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/bds/models/node_replace_configuration.py b/src/oci/bds/models/node_replace_configuration.py new file mode 100644 index 000000000..2330a8693 --- /dev/null +++ b/src/oci/bds/models/node_replace_configuration.py @@ -0,0 +1,364 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20190531 + + +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 NodeReplaceConfiguration(object): + """ + The information about the NodeReplaceConfiguration. + """ + + #: A constant which can be used with the lifecycle_state property of a NodeReplaceConfiguration. + #: This constant has a value of "CREATING" + LIFECYCLE_STATE_CREATING = "CREATING" + + #: A constant which can be used with the lifecycle_state property of a NodeReplaceConfiguration. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a NodeReplaceConfiguration. + #: This constant has a value of "UPDATING" + LIFECYCLE_STATE_UPDATING = "UPDATING" + + #: A constant which can be used with the lifecycle_state property of a NodeReplaceConfiguration. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + #: A constant which can be used with the lifecycle_state property of a NodeReplaceConfiguration. + #: This constant has a value of "DELETED" + LIFECYCLE_STATE_DELETED = "DELETED" + + #: A constant which can be used with the lifecycle_state property of a NodeReplaceConfiguration. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + #: A constant which can be used with the metric_type property of a NodeReplaceConfiguration. + #: This constant has a value of "INSTANCE_STATUS" + METRIC_TYPE_INSTANCE_STATUS = "INSTANCE_STATUS" + + #: A constant which can be used with the metric_type property of a NodeReplaceConfiguration. + #: This constant has a value of "INSTANCE_ACCESSIBILITY_STATUS" + METRIC_TYPE_INSTANCE_ACCESSIBILITY_STATUS = "INSTANCE_ACCESSIBILITY_STATUS" + + def __init__(self, **kwargs): + """ + Initializes a new NodeReplaceConfiguration 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 NodeReplaceConfiguration. + :type id: str + + :param bds_instance_id: + The value to assign to the bds_instance_id property of this NodeReplaceConfiguration. + :type bds_instance_id: str + + :param display_name: + The value to assign to the display_name property of this NodeReplaceConfiguration. + :type display_name: str + + :param level_type_details: + The value to assign to the level_type_details property of this NodeReplaceConfiguration. + :type level_type_details: oci.bds.models.LevelTypeDetails + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this NodeReplaceConfiguration. + Allowed values for this property are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param time_created: + The value to assign to the time_created property of this NodeReplaceConfiguration. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this NodeReplaceConfiguration. + :type time_updated: datetime + + :param metric_type: + The value to assign to the metric_type property of this NodeReplaceConfiguration. + Allowed values for this property are: "INSTANCE_STATUS", "INSTANCE_ACCESSIBILITY_STATUS", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type metric_type: str + + :param duration_in_minutes: + The value to assign to the duration_in_minutes property of this NodeReplaceConfiguration. + :type duration_in_minutes: int + + """ + self.swagger_types = { + 'id': 'str', + 'bds_instance_id': 'str', + 'display_name': 'str', + 'level_type_details': 'LevelTypeDetails', + 'lifecycle_state': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'metric_type': 'str', + 'duration_in_minutes': 'int' + } + + self.attribute_map = { + 'id': 'id', + 'bds_instance_id': 'bdsInstanceId', + 'display_name': 'displayName', + 'level_type_details': 'levelTypeDetails', + 'lifecycle_state': 'lifecycleState', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'metric_type': 'metricType', + 'duration_in_minutes': 'durationInMinutes' + } + + self._id = None + self._bds_instance_id = None + self._display_name = None + self._level_type_details = None + self._lifecycle_state = None + self._time_created = None + self._time_updated = None + self._metric_type = None + self._duration_in_minutes = None + + @property + def id(self): + """ + **[Required]** Gets the id of this NodeReplaceConfiguration. + The unique identifier for the NodeReplaceConfiguration. + + + :return: The id of this NodeReplaceConfiguration. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this NodeReplaceConfiguration. + The unique identifier for the NodeReplaceConfiguration. + + + :param id: The id of this NodeReplaceConfiguration. + :type: str + """ + self._id = id + + @property + def bds_instance_id(self): + """ + **[Required]** Gets the bds_instance_id of this NodeReplaceConfiguration. + The OCID of the bdsInstance which is the parent resource id. + + + :return: The bds_instance_id of this NodeReplaceConfiguration. + :rtype: str + """ + return self._bds_instance_id + + @bds_instance_id.setter + def bds_instance_id(self, bds_instance_id): + """ + Sets the bds_instance_id of this NodeReplaceConfiguration. + The OCID of the bdsInstance which is the parent resource id. + + + :param bds_instance_id: The bds_instance_id of this NodeReplaceConfiguration. + :type: str + """ + self._bds_instance_id = bds_instance_id + + @property + def display_name(self): + """ + **[Required]** Gets the display_name of this NodeReplaceConfiguration. + A user-friendly name. Only ASCII alphanumeric characters with no spaces allowed. The name does not have to be unique, and it may be changed. Avoid entering confidential information. + + + :return: The display_name of this NodeReplaceConfiguration. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this NodeReplaceConfiguration. + A user-friendly name. Only ASCII alphanumeric characters with no spaces allowed. The name does not have to be unique, and it may be changed. Avoid entering confidential information. + + + :param display_name: The display_name of this NodeReplaceConfiguration. + :type: str + """ + self._display_name = display_name + + @property + def level_type_details(self): + """ + **[Required]** Gets the level_type_details of this NodeReplaceConfiguration. + + :return: The level_type_details of this NodeReplaceConfiguration. + :rtype: oci.bds.models.LevelTypeDetails + """ + return self._level_type_details + + @level_type_details.setter + def level_type_details(self, level_type_details): + """ + Sets the level_type_details of this NodeReplaceConfiguration. + + :param level_type_details: The level_type_details of this NodeReplaceConfiguration. + :type: oci.bds.models.LevelTypeDetails + """ + self._level_type_details = level_type_details + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this NodeReplaceConfiguration. + The state of the NodeReplaceConfiguration. + + Allowed values for this property are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this NodeReplaceConfiguration. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this NodeReplaceConfiguration. + The state of the NodeReplaceConfiguration. + + + :param lifecycle_state: The lifecycle_state of this NodeReplaceConfiguration. + :type: str + """ + allowed_values = ["CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED"] + if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): + lifecycle_state = 'UNKNOWN_ENUM_VALUE' + self._lifecycle_state = lifecycle_state + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this NodeReplaceConfiguration. + The time the NodeReplaceConfiguration was created, shown as an RFC 3339 formatted datetime string. + + + :return: The time_created of this NodeReplaceConfiguration. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this NodeReplaceConfiguration. + The time the NodeReplaceConfiguration was created, shown as an RFC 3339 formatted datetime string. + + + :param time_created: The time_created of this NodeReplaceConfiguration. + :type: datetime + """ + self._time_created = time_created + + @property + def time_updated(self): + """ + **[Required]** Gets the time_updated of this NodeReplaceConfiguration. + The time the NodeReplaceConfiguration was updated, shown as an RFC 3339 formatted datetime string. + + + :return: The time_updated of this NodeReplaceConfiguration. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this NodeReplaceConfiguration. + The time the NodeReplaceConfiguration was updated, shown as an RFC 3339 formatted datetime string. + + + :param time_updated: The time_updated of this NodeReplaceConfiguration. + :type: datetime + """ + self._time_updated = time_updated + + @property + def metric_type(self): + """ + **[Required]** Gets the metric_type of this NodeReplaceConfiguration. + Type of compute instance health metric to use for node replacement + + Allowed values for this property are: "INSTANCE_STATUS", "INSTANCE_ACCESSIBILITY_STATUS", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The metric_type of this NodeReplaceConfiguration. + :rtype: str + """ + return self._metric_type + + @metric_type.setter + def metric_type(self, metric_type): + """ + Sets the metric_type of this NodeReplaceConfiguration. + Type of compute instance health metric to use for node replacement + + + :param metric_type: The metric_type of this NodeReplaceConfiguration. + :type: str + """ + allowed_values = ["INSTANCE_STATUS", "INSTANCE_ACCESSIBILITY_STATUS"] + if not value_allowed_none_or_none_sentinel(metric_type, allowed_values): + metric_type = 'UNKNOWN_ENUM_VALUE' + self._metric_type = metric_type + + @property + def duration_in_minutes(self): + """ + **[Required]** Gets the duration_in_minutes of this NodeReplaceConfiguration. + This value is the minimum period of time to wait for metric emission before triggering node replacement. The value is in minutes. + + + :return: The duration_in_minutes of this NodeReplaceConfiguration. + :rtype: int + """ + return self._duration_in_minutes + + @duration_in_minutes.setter + def duration_in_minutes(self, duration_in_minutes): + """ + Sets the duration_in_minutes of this NodeReplaceConfiguration. + This value is the minimum period of time to wait for metric emission before triggering node replacement. The value is in minutes. + + + :param duration_in_minutes: The duration_in_minutes of this NodeReplaceConfiguration. + :type: int + """ + self._duration_in_minutes = duration_in_minutes + + 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/bds/models/node_replace_configuration_summary.py b/src/oci/bds/models/node_replace_configuration_summary.py new file mode 100644 index 000000000..4903baf0c --- /dev/null +++ b/src/oci/bds/models/node_replace_configuration_summary.py @@ -0,0 +1,254 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20190531 + + +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 NodeReplaceConfigurationSummary(object): + """ + The information about the NodeReplaceConfigurationSummary. + """ + + def __init__(self, **kwargs): + """ + Initializes a new NodeReplaceConfigurationSummary 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 NodeReplaceConfigurationSummary. + :type id: str + + :param bds_instance_id: + The value to assign to the bds_instance_id property of this NodeReplaceConfigurationSummary. + :type bds_instance_id: str + + :param display_name: + The value to assign to the display_name property of this NodeReplaceConfigurationSummary. + :type display_name: str + + :param level_type_details: + The value to assign to the level_type_details property of this NodeReplaceConfigurationSummary. + :type level_type_details: oci.bds.models.LevelTypeDetails + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this NodeReplaceConfigurationSummary. + :type lifecycle_state: str + + :param time_created: + The value to assign to the time_created property of this NodeReplaceConfigurationSummary. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this NodeReplaceConfigurationSummary. + :type time_updated: datetime + + """ + self.swagger_types = { + 'id': 'str', + 'bds_instance_id': 'str', + 'display_name': 'str', + 'level_type_details': 'LevelTypeDetails', + 'lifecycle_state': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime' + } + + self.attribute_map = { + 'id': 'id', + 'bds_instance_id': 'bdsInstanceId', + 'display_name': 'displayName', + 'level_type_details': 'levelTypeDetails', + 'lifecycle_state': 'lifecycleState', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated' + } + + self._id = None + self._bds_instance_id = None + self._display_name = None + self._level_type_details = None + self._lifecycle_state = None + self._time_created = None + self._time_updated = None + + @property + def id(self): + """ + **[Required]** Gets the id of this NodeReplaceConfigurationSummary. + The id of the NodeReplaceConfiguration. + + + :return: The id of this NodeReplaceConfigurationSummary. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this NodeReplaceConfigurationSummary. + The id of the NodeReplaceConfiguration. + + + :param id: The id of this NodeReplaceConfigurationSummary. + :type: str + """ + self._id = id + + @property + def bds_instance_id(self): + """ + **[Required]** Gets the bds_instance_id of this NodeReplaceConfigurationSummary. + The OCID of the bdsInstance which is the parent resource id. + + + :return: The bds_instance_id of this NodeReplaceConfigurationSummary. + :rtype: str + """ + return self._bds_instance_id + + @bds_instance_id.setter + def bds_instance_id(self, bds_instance_id): + """ + Sets the bds_instance_id of this NodeReplaceConfigurationSummary. + The OCID of the bdsInstance which is the parent resource id. + + + :param bds_instance_id: The bds_instance_id of this NodeReplaceConfigurationSummary. + :type: str + """ + self._bds_instance_id = bds_instance_id + + @property + def display_name(self): + """ + **[Required]** Gets the display_name of this NodeReplaceConfigurationSummary. + A user-friendly name. Only ASCII alphanumeric characters with no spaces allowed. The name does not have to be unique, and it may be changed. Avoid entering confidential information. + + + :return: The display_name of this NodeReplaceConfigurationSummary. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this NodeReplaceConfigurationSummary. + A user-friendly name. Only ASCII alphanumeric characters with no spaces allowed. The name does not have to be unique, and it may be changed. Avoid entering confidential information. + + + :param display_name: The display_name of this NodeReplaceConfigurationSummary. + :type: str + """ + self._display_name = display_name + + @property + def level_type_details(self): + """ + **[Required]** Gets the level_type_details of this NodeReplaceConfigurationSummary. + + :return: The level_type_details of this NodeReplaceConfigurationSummary. + :rtype: oci.bds.models.LevelTypeDetails + """ + return self._level_type_details + + @level_type_details.setter + def level_type_details(self, level_type_details): + """ + Sets the level_type_details of this NodeReplaceConfigurationSummary. + + :param level_type_details: The level_type_details of this NodeReplaceConfigurationSummary. + :type: oci.bds.models.LevelTypeDetails + """ + self._level_type_details = level_type_details + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this NodeReplaceConfigurationSummary. + The state of the NodeReplaceConfiguration. + + + :return: The lifecycle_state of this NodeReplaceConfigurationSummary. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this NodeReplaceConfigurationSummary. + The state of the NodeReplaceConfiguration. + + + :param lifecycle_state: The lifecycle_state of this NodeReplaceConfigurationSummary. + :type: str + """ + self._lifecycle_state = lifecycle_state + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this NodeReplaceConfigurationSummary. + The time the NodeReplaceConfiguration was created, shown as an RFC 3339 formatted datetime string. + + + :return: The time_created of this NodeReplaceConfigurationSummary. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this NodeReplaceConfigurationSummary. + The time the NodeReplaceConfiguration was created, shown as an RFC 3339 formatted datetime string. + + + :param time_created: The time_created of this NodeReplaceConfigurationSummary. + :type: datetime + """ + self._time_created = time_created + + @property + def time_updated(self): + """ + **[Required]** Gets the time_updated of this NodeReplaceConfigurationSummary. + The time the NodeReplaceConfiguration was updated, shown as an RFC 3339 formatted datetime string. + + + :return: The time_updated of this NodeReplaceConfigurationSummary. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this NodeReplaceConfigurationSummary. + The time the NodeReplaceConfiguration was updated, shown as an RFC 3339 formatted datetime string. + + + :param time_updated: The time_updated of this NodeReplaceConfigurationSummary. + :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/bds/models/node_type_level_details.py b/src/oci/bds/models/node_type_level_details.py new file mode 100644 index 000000000..fb14d6afc --- /dev/null +++ b/src/oci/bds/models/node_type_level_details.py @@ -0,0 +1,82 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20190531 + +from .level_type_details import LevelTypeDetails +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 NodeTypeLevelDetails(LevelTypeDetails): + """ + Details of node type level used to trigger the creation of a new node backup configuration and node replacement configuration. + """ + + def __init__(self, **kwargs): + """ + Initializes a new NodeTypeLevelDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.bds.models.NodeTypeLevelDetails.level_type` attribute + of this class is ``NODE_TYPE_LEVEL`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param level_type: + The value to assign to the level_type property of this NodeTypeLevelDetails. + Allowed values for this property are: "NODE_LEVEL", "NODE_TYPE_LEVEL" + :type level_type: str + + :param node_type: + The value to assign to the node_type property of this NodeTypeLevelDetails. + :type node_type: str + + """ + self.swagger_types = { + 'level_type': 'str', + 'node_type': 'str' + } + + self.attribute_map = { + 'level_type': 'levelType', + 'node_type': 'nodeType' + } + + self._level_type = None + self._node_type = None + self._level_type = 'NODE_TYPE_LEVEL' + + @property + def node_type(self): + """ + **[Required]** Gets the node_type of this NodeTypeLevelDetails. + Type of the node or nodes of the node backup configuration or node replacement configuration which are going to be created. + + + :return: The node_type of this NodeTypeLevelDetails. + :rtype: str + """ + return self._node_type + + @node_type.setter + def node_type(self, node_type): + """ + Sets the node_type of this NodeTypeLevelDetails. + Type of the node or nodes of the node backup configuration or node replacement configuration which are going to be created. + + + :param node_type: The node_type of this NodeTypeLevelDetails. + :type: str + """ + self._node_type = node_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/bds/models/remove_node_replace_configuration_details.py b/src/oci/bds/models/remove_node_replace_configuration_details.py new file mode 100644 index 000000000..0d5094062 --- /dev/null +++ b/src/oci/bds/models/remove_node_replace_configuration_details.py @@ -0,0 +1,72 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20190531 + + +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 RemoveNodeReplaceConfigurationDetails(object): + """ + The information about the NodeReplaceConfiguration that being removed. + """ + + def __init__(self, **kwargs): + """ + Initializes a new RemoveNodeReplaceConfigurationDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param cluster_admin_password: + The value to assign to the cluster_admin_password property of this RemoveNodeReplaceConfigurationDetails. + :type cluster_admin_password: str + + """ + self.swagger_types = { + 'cluster_admin_password': 'str' + } + + self.attribute_map = { + 'cluster_admin_password': 'clusterAdminPassword' + } + + self._cluster_admin_password = None + + @property + def cluster_admin_password(self): + """ + **[Required]** Gets the cluster_admin_password of this RemoveNodeReplaceConfigurationDetails. + Base-64 encoded password for the cluster admin user. + + + :return: The cluster_admin_password of this RemoveNodeReplaceConfigurationDetails. + :rtype: str + """ + return self._cluster_admin_password + + @cluster_admin_password.setter + def cluster_admin_password(self, cluster_admin_password): + """ + Sets the cluster_admin_password of this RemoveNodeReplaceConfigurationDetails. + Base-64 encoded password for the cluster admin user. + + + :param cluster_admin_password: The cluster_admin_password of this RemoveNodeReplaceConfigurationDetails. + :type: str + """ + self._cluster_admin_password = cluster_admin_password + + 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/bds/models/replace_node_details.py b/src/oci/bds/models/replace_node_details.py new file mode 100644 index 000000000..6056e3fb7 --- /dev/null +++ b/src/oci/bds/models/replace_node_details.py @@ -0,0 +1,165 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20190531 + + +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 ReplaceNodeDetails(object): + """ + The information about the node to be replaced. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ReplaceNodeDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param node_host_name: + The value to assign to the node_host_name property of this ReplaceNodeDetails. + :type node_host_name: str + + :param node_backup_id: + The value to assign to the node_backup_id property of this ReplaceNodeDetails. + :type node_backup_id: str + + :param cluster_admin_password: + The value to assign to the cluster_admin_password property of this ReplaceNodeDetails. + :type cluster_admin_password: str + + :param shape: + The value to assign to the shape property of this ReplaceNodeDetails. + :type shape: str + + """ + self.swagger_types = { + 'node_host_name': 'str', + 'node_backup_id': 'str', + 'cluster_admin_password': 'str', + 'shape': 'str' + } + + self.attribute_map = { + 'node_host_name': 'nodeHostName', + 'node_backup_id': 'nodeBackupId', + 'cluster_admin_password': 'clusterAdminPassword', + 'shape': 'shape' + } + + self._node_host_name = None + self._node_backup_id = None + self._cluster_admin_password = None + self._shape = None + + @property + def node_host_name(self): + """ + **[Required]** Gets the node_host_name of this ReplaceNodeDetails. + Host name of the node to replace. MASTER, UTILITY and EDGE node are only supported types + + + :return: The node_host_name of this ReplaceNodeDetails. + :rtype: str + """ + return self._node_host_name + + @node_host_name.setter + def node_host_name(self, node_host_name): + """ + Sets the node_host_name of this ReplaceNodeDetails. + Host name of the node to replace. MASTER, UTILITY and EDGE node are only supported types + + + :param node_host_name: The node_host_name of this ReplaceNodeDetails. + :type: str + """ + self._node_host_name = node_host_name + + @property + def node_backup_id(self): + """ + **[Required]** Gets the node_backup_id of this ReplaceNodeDetails. + The id of the nodeBackup to use for replacing the node. + + + :return: The node_backup_id of this ReplaceNodeDetails. + :rtype: str + """ + return self._node_backup_id + + @node_backup_id.setter + def node_backup_id(self, node_backup_id): + """ + Sets the node_backup_id of this ReplaceNodeDetails. + The id of the nodeBackup to use for replacing the node. + + + :param node_backup_id: The node_backup_id of this ReplaceNodeDetails. + :type: str + """ + self._node_backup_id = node_backup_id + + @property + def cluster_admin_password(self): + """ + **[Required]** Gets the cluster_admin_password of this ReplaceNodeDetails. + Base-64 encoded password for the cluster admin user. + + + :return: The cluster_admin_password of this ReplaceNodeDetails. + :rtype: str + """ + return self._cluster_admin_password + + @cluster_admin_password.setter + def cluster_admin_password(self, cluster_admin_password): + """ + Sets the cluster_admin_password of this ReplaceNodeDetails. + Base-64 encoded password for the cluster admin user. + + + :param cluster_admin_password: The cluster_admin_password of this ReplaceNodeDetails. + :type: str + """ + self._cluster_admin_password = cluster_admin_password + + @property + def shape(self): + """ + Gets the shape of this ReplaceNodeDetails. + Shape of the new vm when replacing the node. If not provided, BDS will attempt to replace the node with the shape of current node. + + + :return: The shape of this ReplaceNodeDetails. + :rtype: str + """ + return self._shape + + @shape.setter + def shape(self, shape): + """ + Sets the shape of this ReplaceNodeDetails. + Shape of the new vm when replacing the node. If not provided, BDS will attempt to replace the node with the shape of current node. + + + :param shape: The shape of this ReplaceNodeDetails. + :type: str + """ + self._shape = shape + + 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/bds/models/update_node_backup_configuration_details.py b/src/oci/bds/models/update_node_backup_configuration_details.py new file mode 100644 index 000000000..ad3124ae6 --- /dev/null +++ b/src/oci/bds/models/update_node_backup_configuration_details.py @@ -0,0 +1,223 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20190531 + + +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 UpdateNodeBackupConfigurationDetails(object): + """ + The information about the NodeBackupConfiguration that is being updated. + """ + + def __init__(self, **kwargs): + """ + Initializes a new UpdateNodeBackupConfigurationDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param level_type_details: + The value to assign to the level_type_details property of this UpdateNodeBackupConfigurationDetails. + :type level_type_details: oci.bds.models.LevelTypeDetails + + :param display_name: + The value to assign to the display_name property of this UpdateNodeBackupConfigurationDetails. + :type display_name: str + + :param timezone: + The value to assign to the timezone property of this UpdateNodeBackupConfigurationDetails. + :type timezone: str + + :param schedule: + The value to assign to the schedule property of this UpdateNodeBackupConfigurationDetails. + :type schedule: str + + :param number_of_backups_to_retain: + The value to assign to the number_of_backups_to_retain property of this UpdateNodeBackupConfigurationDetails. + :type number_of_backups_to_retain: int + + :param backup_type: + The value to assign to the backup_type property of this UpdateNodeBackupConfigurationDetails. + :type backup_type: str + + """ + self.swagger_types = { + 'level_type_details': 'LevelTypeDetails', + 'display_name': 'str', + 'timezone': 'str', + 'schedule': 'str', + 'number_of_backups_to_retain': 'int', + 'backup_type': 'str' + } + + self.attribute_map = { + 'level_type_details': 'levelTypeDetails', + 'display_name': 'displayName', + 'timezone': 'timezone', + 'schedule': 'schedule', + 'number_of_backups_to_retain': 'numberOfBackupsToRetain', + 'backup_type': 'backupType' + } + + self._level_type_details = None + self._display_name = None + self._timezone = None + self._schedule = None + self._number_of_backups_to_retain = None + self._backup_type = None + + @property + def level_type_details(self): + """ + Gets the level_type_details of this UpdateNodeBackupConfigurationDetails. + + :return: The level_type_details of this UpdateNodeBackupConfigurationDetails. + :rtype: oci.bds.models.LevelTypeDetails + """ + return self._level_type_details + + @level_type_details.setter + def level_type_details(self, level_type_details): + """ + Sets the level_type_details of this UpdateNodeBackupConfigurationDetails. + + :param level_type_details: The level_type_details of this UpdateNodeBackupConfigurationDetails. + :type: oci.bds.models.LevelTypeDetails + """ + self._level_type_details = level_type_details + + @property + def display_name(self): + """ + Gets the display_name of this UpdateNodeBackupConfigurationDetails. + A user-friendly name. Only ASCII alphanumeric characters with no spaces allowed. The name does not have to be unique, and it may be changed. Avoid entering confidential information. + + + :return: The display_name of this UpdateNodeBackupConfigurationDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this UpdateNodeBackupConfigurationDetails. + A user-friendly name. Only ASCII alphanumeric characters with no spaces allowed. The name does not have to be unique, and it may be changed. Avoid entering confidential information. + + + :param display_name: The display_name of this UpdateNodeBackupConfigurationDetails. + :type: str + """ + self._display_name = display_name + + @property + def timezone(self): + """ + Gets the timezone of this UpdateNodeBackupConfigurationDetails. + The time zone of the execution schedule, in IANA time zone database name format + + + :return: The timezone of this UpdateNodeBackupConfigurationDetails. + :rtype: str + """ + return self._timezone + + @timezone.setter + def timezone(self, timezone): + """ + Sets the timezone of this UpdateNodeBackupConfigurationDetails. + The time zone of the execution schedule, in IANA time zone database name format + + + :param timezone: The timezone of this UpdateNodeBackupConfigurationDetails. + :type: str + """ + self._timezone = timezone + + @property + def schedule(self): + """ + Gets the schedule of this UpdateNodeBackupConfigurationDetails. + Day/time recurrence (specified following RFC 5545) at which to trigger the backup process. Currently only DAILY, WEEKLY and MONTHLY frequency is supported. Days of the week are specified using BYDAY field. Time of the day is specified using BYHOUR. Other fields are not supported. + + + :return: The schedule of this UpdateNodeBackupConfigurationDetails. + :rtype: str + """ + return self._schedule + + @schedule.setter + def schedule(self, schedule): + """ + Sets the schedule of this UpdateNodeBackupConfigurationDetails. + Day/time recurrence (specified following RFC 5545) at which to trigger the backup process. Currently only DAILY, WEEKLY and MONTHLY frequency is supported. Days of the week are specified using BYDAY field. Time of the day is specified using BYHOUR. Other fields are not supported. + + + :param schedule: The schedule of this UpdateNodeBackupConfigurationDetails. + :type: str + """ + self._schedule = schedule + + @property + def number_of_backups_to_retain(self): + """ + Gets the number_of_backups_to_retain of this UpdateNodeBackupConfigurationDetails. + Number of backup copies to retain. + + + :return: The number_of_backups_to_retain of this UpdateNodeBackupConfigurationDetails. + :rtype: int + """ + return self._number_of_backups_to_retain + + @number_of_backups_to_retain.setter + def number_of_backups_to_retain(self, number_of_backups_to_retain): + """ + Sets the number_of_backups_to_retain of this UpdateNodeBackupConfigurationDetails. + Number of backup copies to retain. + + + :param number_of_backups_to_retain: The number_of_backups_to_retain of this UpdateNodeBackupConfigurationDetails. + :type: int + """ + self._number_of_backups_to_retain = number_of_backups_to_retain + + @property + def backup_type(self): + """ + Gets the backup_type of this UpdateNodeBackupConfigurationDetails. + Incremental backup type includes only the changes since the last backup. Full backup type includes all changes since the volume was created. + + + :return: The backup_type of this UpdateNodeBackupConfigurationDetails. + :rtype: str + """ + return self._backup_type + + @backup_type.setter + def backup_type(self, backup_type): + """ + Sets the backup_type of this UpdateNodeBackupConfigurationDetails. + Incremental backup type includes only the changes since the last backup. Full backup type includes all changes since the volume was created. + + + :param backup_type: The backup_type of this UpdateNodeBackupConfigurationDetails. + :type: str + """ + self._backup_type = backup_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/bds/models/update_node_replace_configuration_details.py b/src/oci/bds/models/update_node_replace_configuration_details.py new file mode 100644 index 000000000..3746dd1c3 --- /dev/null +++ b/src/oci/bds/models/update_node_replace_configuration_details.py @@ -0,0 +1,161 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20190531 + + +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 UpdateNodeReplaceConfigurationDetails(object): + """ + The information about the NodeReplaceConfiguration + """ + + def __init__(self, **kwargs): + """ + Initializes a new UpdateNodeReplaceConfigurationDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param level_type_details: + The value to assign to the level_type_details property of this UpdateNodeReplaceConfigurationDetails. + :type level_type_details: oci.bds.models.LevelTypeDetails + + :param display_name: + The value to assign to the display_name property of this UpdateNodeReplaceConfigurationDetails. + :type display_name: str + + :param metric_type: + The value to assign to the metric_type property of this UpdateNodeReplaceConfigurationDetails. + :type metric_type: str + + :param duration_in_minutes: + The value to assign to the duration_in_minutes property of this UpdateNodeReplaceConfigurationDetails. + :type duration_in_minutes: int + + """ + self.swagger_types = { + 'level_type_details': 'LevelTypeDetails', + 'display_name': 'str', + 'metric_type': 'str', + 'duration_in_minutes': 'int' + } + + self.attribute_map = { + 'level_type_details': 'levelTypeDetails', + 'display_name': 'displayName', + 'metric_type': 'metricType', + 'duration_in_minutes': 'durationInMinutes' + } + + self._level_type_details = None + self._display_name = None + self._metric_type = None + self._duration_in_minutes = None + + @property + def level_type_details(self): + """ + Gets the level_type_details of this UpdateNodeReplaceConfigurationDetails. + + :return: The level_type_details of this UpdateNodeReplaceConfigurationDetails. + :rtype: oci.bds.models.LevelTypeDetails + """ + return self._level_type_details + + @level_type_details.setter + def level_type_details(self, level_type_details): + """ + Sets the level_type_details of this UpdateNodeReplaceConfigurationDetails. + + :param level_type_details: The level_type_details of this UpdateNodeReplaceConfigurationDetails. + :type: oci.bds.models.LevelTypeDetails + """ + self._level_type_details = level_type_details + + @property + def display_name(self): + """ + Gets the display_name of this UpdateNodeReplaceConfigurationDetails. + A user-friendly name. Only ASCII alphanumeric characters with no spaces allowed. The name does not have to be unique, and it may be changed. Avoid entering confidential information. + + + :return: The display_name of this UpdateNodeReplaceConfigurationDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this UpdateNodeReplaceConfigurationDetails. + A user-friendly name. Only ASCII alphanumeric characters with no spaces allowed. The name does not have to be unique, and it may be changed. Avoid entering confidential information. + + + :param display_name: The display_name of this UpdateNodeReplaceConfigurationDetails. + :type: str + """ + self._display_name = display_name + + @property + def metric_type(self): + """ + Gets the metric_type of this UpdateNodeReplaceConfigurationDetails. + Type of compute instance health metric to use for node replacement + + + :return: The metric_type of this UpdateNodeReplaceConfigurationDetails. + :rtype: str + """ + return self._metric_type + + @metric_type.setter + def metric_type(self, metric_type): + """ + Sets the metric_type of this UpdateNodeReplaceConfigurationDetails. + Type of compute instance health metric to use for node replacement + + + :param metric_type: The metric_type of this UpdateNodeReplaceConfigurationDetails. + :type: str + """ + self._metric_type = metric_type + + @property + def duration_in_minutes(self): + """ + Gets the duration_in_minutes of this UpdateNodeReplaceConfigurationDetails. + This value is the pending duration time to wait for metric emission before triggering node replacement. The value is in minutes. + + + :return: The duration_in_minutes of this UpdateNodeReplaceConfigurationDetails. + :rtype: int + """ + return self._duration_in_minutes + + @duration_in_minutes.setter + def duration_in_minutes(self, duration_in_minutes): + """ + Sets the duration_in_minutes of this UpdateNodeReplaceConfigurationDetails. + This value is the pending duration time to wait for metric emission before triggering node replacement. The value is in minutes. + + + :param duration_in_minutes: The duration_in_minutes of this UpdateNodeReplaceConfigurationDetails. + :type: int + """ + self._duration_in_minutes = duration_in_minutes + + 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/bds/models/work_request.py b/src/oci/bds/models/work_request.py index f5b970ff5..31b121650 100644 --- a/src/oci/bds/models/work_request.py +++ b/src/oci/bds/models/work_request.py @@ -159,6 +159,42 @@ class WorkRequest(object): #: This constant has a value of "ODH_SERVICE_CERTIFICATE_UPDATE" OPERATION_TYPE_ODH_SERVICE_CERTIFICATE_UPDATE = "ODH_SERVICE_CERTIFICATE_UPDATE" + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "CREATE_BACKUP_CONFIG" + OPERATION_TYPE_CREATE_BACKUP_CONFIG = "CREATE_BACKUP_CONFIG" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "UPDATE_BACKUP_CONFIG" + OPERATION_TYPE_UPDATE_BACKUP_CONFIG = "UPDATE_BACKUP_CONFIG" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "DELETE_BACKUP_CONFIG" + OPERATION_TYPE_DELETE_BACKUP_CONFIG = "DELETE_BACKUP_CONFIG" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "CREATE_NODE_REPLACE_CONFIG" + OPERATION_TYPE_CREATE_NODE_REPLACE_CONFIG = "CREATE_NODE_REPLACE_CONFIG" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "UPDATE_NODE_REPLACE_CONFIG" + OPERATION_TYPE_UPDATE_NODE_REPLACE_CONFIG = "UPDATE_NODE_REPLACE_CONFIG" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "DELETE_NODE_REPLACE_CONFIG" + OPERATION_TYPE_DELETE_NODE_REPLACE_CONFIG = "DELETE_NODE_REPLACE_CONFIG" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "BACKUP_NODES" + OPERATION_TYPE_BACKUP_NODES = "BACKUP_NODES" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "DELETE_NODE_BACKUP" + OPERATION_TYPE_DELETE_NODE_BACKUP = "DELETE_NODE_BACKUP" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "REPLACE_NODE" + OPERATION_TYPE_REPLACE_NODE = "REPLACE_NODE" + #: A constant which can be used with the status property of a WorkRequest. #: This constant has a value of "ACCEPTED" STATUS_ACCEPTED = "ACCEPTED" @@ -198,7 +234,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: "CREATE_BDS", "UPDATE_BDS", "DELETE_BDS", "ADD_BLOCK_STORAGE", "ADD_MASTER_NODES", "ADD_UTILITY_NODES", "ADD_WORKER_NODES", "ADD_CLOUD_SQL", "REMOVE_CLOUD_SQL", "CHANGE_COMPARTMENT_FOR_BDS", "CHANGE_SHAPE", "UPDATE_INFRA", "RESTART_NODE", "REMOVE_NODE", "CREATE_AUTOSCALE_CONFIG", "UPDATE_AUTOSCALE_CONFIG", "DELETE_AUTOSCALE_CONFIG", "AUTOSCALE_CONFIG", "AUTOSCALE_RUN", "CREATE_API_KEY", "DELETE_API_KEY", "TEST_OBJECT_STORE_CONNECTION", "CREATE_METASTORE_CONFIG", "DELETE_METASTORE_CONFIG", "UPDATE_METASTORE_CONFIG", "ACTIVATE_METASTORE_CONFIG", "TEST_METASTORE_CONFIG", "PATCH_BDS", "PATCH_ODH", "PATCH_OS", "STOP_BDS", "START_BDS", "ADD_KAFKA", "REMOVE_KAFKA", "EXECUTE_BOOTSTRAP_SCRIPT", "ODH_SERVICE_CERTIFICATE_UPDATE", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "CREATE_BDS", "UPDATE_BDS", "DELETE_BDS", "ADD_BLOCK_STORAGE", "ADD_MASTER_NODES", "ADD_UTILITY_NODES", "ADD_WORKER_NODES", "ADD_CLOUD_SQL", "REMOVE_CLOUD_SQL", "CHANGE_COMPARTMENT_FOR_BDS", "CHANGE_SHAPE", "UPDATE_INFRA", "RESTART_NODE", "REMOVE_NODE", "CREATE_AUTOSCALE_CONFIG", "UPDATE_AUTOSCALE_CONFIG", "DELETE_AUTOSCALE_CONFIG", "AUTOSCALE_CONFIG", "AUTOSCALE_RUN", "CREATE_API_KEY", "DELETE_API_KEY", "TEST_OBJECT_STORE_CONNECTION", "CREATE_METASTORE_CONFIG", "DELETE_METASTORE_CONFIG", "UPDATE_METASTORE_CONFIG", "ACTIVATE_METASTORE_CONFIG", "TEST_METASTORE_CONFIG", "PATCH_BDS", "PATCH_ODH", "PATCH_OS", "STOP_BDS", "START_BDS", "ADD_KAFKA", "REMOVE_KAFKA", "EXECUTE_BOOTSTRAP_SCRIPT", "ODH_SERVICE_CERTIFICATE_UPDATE", "CREATE_BACKUP_CONFIG", "UPDATE_BACKUP_CONFIG", "DELETE_BACKUP_CONFIG", "CREATE_NODE_REPLACE_CONFIG", "UPDATE_NODE_REPLACE_CONFIG", "DELETE_NODE_REPLACE_CONFIG", "BACKUP_NODES", "DELETE_NODE_BACKUP", "REPLACE_NODE", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type operation_type: str @@ -317,7 +353,7 @@ def operation_type(self): **[Required]** Gets the operation_type of this WorkRequest. The type of this work request. - Allowed values for this property are: "CREATE_BDS", "UPDATE_BDS", "DELETE_BDS", "ADD_BLOCK_STORAGE", "ADD_MASTER_NODES", "ADD_UTILITY_NODES", "ADD_WORKER_NODES", "ADD_CLOUD_SQL", "REMOVE_CLOUD_SQL", "CHANGE_COMPARTMENT_FOR_BDS", "CHANGE_SHAPE", "UPDATE_INFRA", "RESTART_NODE", "REMOVE_NODE", "CREATE_AUTOSCALE_CONFIG", "UPDATE_AUTOSCALE_CONFIG", "DELETE_AUTOSCALE_CONFIG", "AUTOSCALE_CONFIG", "AUTOSCALE_RUN", "CREATE_API_KEY", "DELETE_API_KEY", "TEST_OBJECT_STORE_CONNECTION", "CREATE_METASTORE_CONFIG", "DELETE_METASTORE_CONFIG", "UPDATE_METASTORE_CONFIG", "ACTIVATE_METASTORE_CONFIG", "TEST_METASTORE_CONFIG", "PATCH_BDS", "PATCH_ODH", "PATCH_OS", "STOP_BDS", "START_BDS", "ADD_KAFKA", "REMOVE_KAFKA", "EXECUTE_BOOTSTRAP_SCRIPT", "ODH_SERVICE_CERTIFICATE_UPDATE", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "CREATE_BDS", "UPDATE_BDS", "DELETE_BDS", "ADD_BLOCK_STORAGE", "ADD_MASTER_NODES", "ADD_UTILITY_NODES", "ADD_WORKER_NODES", "ADD_CLOUD_SQL", "REMOVE_CLOUD_SQL", "CHANGE_COMPARTMENT_FOR_BDS", "CHANGE_SHAPE", "UPDATE_INFRA", "RESTART_NODE", "REMOVE_NODE", "CREATE_AUTOSCALE_CONFIG", "UPDATE_AUTOSCALE_CONFIG", "DELETE_AUTOSCALE_CONFIG", "AUTOSCALE_CONFIG", "AUTOSCALE_RUN", "CREATE_API_KEY", "DELETE_API_KEY", "TEST_OBJECT_STORE_CONNECTION", "CREATE_METASTORE_CONFIG", "DELETE_METASTORE_CONFIG", "UPDATE_METASTORE_CONFIG", "ACTIVATE_METASTORE_CONFIG", "TEST_METASTORE_CONFIG", "PATCH_BDS", "PATCH_ODH", "PATCH_OS", "STOP_BDS", "START_BDS", "ADD_KAFKA", "REMOVE_KAFKA", "EXECUTE_BOOTSTRAP_SCRIPT", "ODH_SERVICE_CERTIFICATE_UPDATE", "CREATE_BACKUP_CONFIG", "UPDATE_BACKUP_CONFIG", "DELETE_BACKUP_CONFIG", "CREATE_NODE_REPLACE_CONFIG", "UPDATE_NODE_REPLACE_CONFIG", "DELETE_NODE_REPLACE_CONFIG", "BACKUP_NODES", "DELETE_NODE_BACKUP", "REPLACE_NODE", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -336,7 +372,7 @@ def operation_type(self, operation_type): :param operation_type: The operation_type of this WorkRequest. :type: str """ - allowed_values = ["CREATE_BDS", "UPDATE_BDS", "DELETE_BDS", "ADD_BLOCK_STORAGE", "ADD_MASTER_NODES", "ADD_UTILITY_NODES", "ADD_WORKER_NODES", "ADD_CLOUD_SQL", "REMOVE_CLOUD_SQL", "CHANGE_COMPARTMENT_FOR_BDS", "CHANGE_SHAPE", "UPDATE_INFRA", "RESTART_NODE", "REMOVE_NODE", "CREATE_AUTOSCALE_CONFIG", "UPDATE_AUTOSCALE_CONFIG", "DELETE_AUTOSCALE_CONFIG", "AUTOSCALE_CONFIG", "AUTOSCALE_RUN", "CREATE_API_KEY", "DELETE_API_KEY", "TEST_OBJECT_STORE_CONNECTION", "CREATE_METASTORE_CONFIG", "DELETE_METASTORE_CONFIG", "UPDATE_METASTORE_CONFIG", "ACTIVATE_METASTORE_CONFIG", "TEST_METASTORE_CONFIG", "PATCH_BDS", "PATCH_ODH", "PATCH_OS", "STOP_BDS", "START_BDS", "ADD_KAFKA", "REMOVE_KAFKA", "EXECUTE_BOOTSTRAP_SCRIPT", "ODH_SERVICE_CERTIFICATE_UPDATE"] + allowed_values = ["CREATE_BDS", "UPDATE_BDS", "DELETE_BDS", "ADD_BLOCK_STORAGE", "ADD_MASTER_NODES", "ADD_UTILITY_NODES", "ADD_WORKER_NODES", "ADD_CLOUD_SQL", "REMOVE_CLOUD_SQL", "CHANGE_COMPARTMENT_FOR_BDS", "CHANGE_SHAPE", "UPDATE_INFRA", "RESTART_NODE", "REMOVE_NODE", "CREATE_AUTOSCALE_CONFIG", "UPDATE_AUTOSCALE_CONFIG", "DELETE_AUTOSCALE_CONFIG", "AUTOSCALE_CONFIG", "AUTOSCALE_RUN", "CREATE_API_KEY", "DELETE_API_KEY", "TEST_OBJECT_STORE_CONNECTION", "CREATE_METASTORE_CONFIG", "DELETE_METASTORE_CONFIG", "UPDATE_METASTORE_CONFIG", "ACTIVATE_METASTORE_CONFIG", "TEST_METASTORE_CONFIG", "PATCH_BDS", "PATCH_ODH", "PATCH_OS", "STOP_BDS", "START_BDS", "ADD_KAFKA", "REMOVE_KAFKA", "EXECUTE_BOOTSTRAP_SCRIPT", "ODH_SERVICE_CERTIFICATE_UPDATE", "CREATE_BACKUP_CONFIG", "UPDATE_BACKUP_CONFIG", "DELETE_BACKUP_CONFIG", "CREATE_NODE_REPLACE_CONFIG", "UPDATE_NODE_REPLACE_CONFIG", "DELETE_NODE_REPLACE_CONFIG", "BACKUP_NODES", "DELETE_NODE_BACKUP", "REPLACE_NODE"] 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/cluster_placement_groups/cluster_placement_groups_cp_client.py b/src/oci/cluster_placement_groups/cluster_placement_groups_cp_client.py index 008f69ba6..2c04e3552 100644 --- a/src/oci/cluster_placement_groups/cluster_placement_groups_cp_client.py +++ b/src/oci/cluster_placement_groups/cluster_placement_groups_cp_client.py @@ -164,7 +164,7 @@ def activate_cluster_placement_group(self, cluster_placement_group_id, **kwargs) resource_path = "/clusterPlacementGroups/{clusterPlacementGroupId}/actions/activate" method = "POST" operation_name = "activate_cluster_placement_group" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/clusterplacementgroups/20230801/ClusterPlacementGroup/ActivateClusterPlacementGroup" # Don't accept unknown kwargs expected_kwargs = [ @@ -274,7 +274,7 @@ def cancel_work_request(self, work_request_id, **kwargs): resource_path = "/workRequests/{workRequestId}" method = "DELETE" operation_name = "cancel_work_request" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/clusterplacementgroups/20230801/WorkRequest/CancelWorkRequest" # Don't accept unknown kwargs expected_kwargs = [ @@ -394,7 +394,7 @@ def change_cluster_placement_group_compartment(self, cluster_placement_group_id, resource_path = "/clusterPlacementGroups/{clusterPlacementGroupId}/actions/changeCompartment" method = "POST" operation_name = "change_cluster_placement_group_compartment" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/clusterplacementgroups/20230801/ClusterPlacementGroup/ChangeClusterPlacementGroupCompartment" # Don't accept unknown kwargs expected_kwargs = [ @@ -507,7 +507,7 @@ def create_cluster_placement_group(self, create_cluster_placement_group_details, resource_path = "/clusterPlacementGroups" method = "POST" operation_name = "create_cluster_placement_group" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/clusterplacementgroups/20230801/ClusterPlacementGroup/CreateClusterPlacementGroup" # Don't accept unknown kwargs expected_kwargs = [ @@ -614,7 +614,7 @@ def deactivate_cluster_placement_group(self, cluster_placement_group_id, **kwarg resource_path = "/clusterPlacementGroups/{clusterPlacementGroupId}/actions/deactivate" method = "POST" operation_name = "deactivate_cluster_placement_group" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/clusterplacementgroups/20230801/ClusterPlacementGroup/DeactivateClusterPlacementGroup" # Don't accept unknown kwargs expected_kwargs = [ @@ -724,7 +724,7 @@ def delete_cluster_placement_group(self, cluster_placement_group_id, **kwargs): resource_path = "/clusterPlacementGroups/{clusterPlacementGroupId}" method = "DELETE" operation_name = "delete_cluster_placement_group" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/clusterplacementgroups/20230801/ClusterPlacementGroup/DeleteClusterPlacementGroup" # Don't accept unknown kwargs expected_kwargs = [ @@ -822,7 +822,7 @@ def get_cluster_placement_group(self, cluster_placement_group_id, **kwargs): resource_path = "/clusterPlacementGroups/{clusterPlacementGroupId}" method = "GET" operation_name = "get_cluster_placement_group" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/clusterplacementgroups/20230801/ClusterPlacementGroup/GetClusterPlacementGroup" # Don't accept unknown kwargs expected_kwargs = [ @@ -920,7 +920,7 @@ def get_work_request(self, work_request_id, **kwargs): resource_path = "/workRequests/{workRequestId}" method = "GET" operation_name = "get_work_request" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/clusterplacementgroups/20230801/WorkRequest/GetWorkRequest" # Don't accept unknown kwargs expected_kwargs = [ @@ -1053,7 +1053,7 @@ def list_cluster_placement_groups(self, **kwargs): resource_path = "/clusterPlacementGroups" method = "GET" operation_name = "list_cluster_placement_groups" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/clusterplacementgroups/20230801/ClusterPlacementGroupCollection/ListClusterPlacementGroups" # Don't accept unknown kwargs expected_kwargs = [ @@ -1202,7 +1202,7 @@ def list_work_request_errors(self, work_request_id, **kwargs): resource_path = "/workRequests/{workRequestId}/errors" method = "GET" operation_name = "list_work_request_errors" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/clusterplacementgroups/20230801/WorkRequestError/ListWorkRequestErrors" # Don't accept unknown kwargs expected_kwargs = [ @@ -1344,7 +1344,7 @@ def list_work_request_logs(self, work_request_id, **kwargs): resource_path = "/workRequests/{workRequestId}/logs" method = "GET" operation_name = "list_work_request_logs" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/clusterplacementgroups/20230801/WorkRequestLogEntry/ListWorkRequestLogs" # Don't accept unknown kwargs expected_kwargs = [ @@ -1499,7 +1499,7 @@ def list_work_requests(self, **kwargs): resource_path = "/workRequests" method = "GET" operation_name = "list_work_requests" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/clusterplacementgroups/20230801/WorkRequest/ListWorkRequests" # Don't accept unknown kwargs expected_kwargs = [ @@ -1638,7 +1638,7 @@ def update_cluster_placement_group(self, cluster_placement_group_id, update_clus resource_path = "/clusterPlacementGroups/{clusterPlacementGroupId}" method = "PUT" operation_name = "update_cluster_placement_group" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/clusterplacementgroups/20230801/ClusterPlacementGroup/UpdateClusterPlacementGroup" # Don't accept unknown kwargs expected_kwargs = [ diff --git a/src/oci/data_science/data_science_client.py b/src/oci/data_science/data_science_client.py index 99808653e..735b9f86e 100644 --- a/src/oci/data_science/data_science_client.py +++ b/src/oci/data_science/data_science_client.py @@ -566,6 +566,9 @@ def cancel_pipeline_run(self, pipeline_run_id, **kwargs): The resource is updated or deleted only if the `etag` you provide matches the resource's current `etag` value. + :param bool terminate_gracefully: (optional) + A boolean value to specify whether to terminate pipeline run gracefully. + :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. @@ -597,7 +600,8 @@ def cancel_pipeline_run(self, pipeline_run_id, **kwargs): "retry_strategy", "opc_request_id", "opc_retry_token", - "if_match" + "if_match", + "terminate_gracefully" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: @@ -614,6 +618,11 @@ def cancel_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 = { + "terminateGracefully": kwargs.get("terminate_gracefully", 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", @@ -640,6 +649,7 @@ def cancel_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, @@ -650,6 +660,7 @@ def cancel_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, @@ -2247,6 +2258,9 @@ def create_job_run(self, create_job_run_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 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. @@ -2277,7 +2291,8 @@ def create_job_run(self, create_job_run_details, **kwargs): "allow_control_chars", "retry_strategy", "opc_request_id", - "opc_retry_token" + "opc_retry_token", + "opc_parent_rpt_url" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: @@ -2288,7 +2303,8 @@ def create_job_run(self, create_job_run_details, **kwargs): "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), + "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} @@ -2599,6 +2615,9 @@ def create_model_deployment(self, create_model_deployment_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 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. @@ -2629,7 +2648,8 @@ def create_model_deployment(self, create_model_deployment_details, **kwargs): "allow_control_chars", "retry_strategy", "opc_request_id", - "opc_retry_token" + "opc_retry_token", + "opc_parent_rpt_url" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: @@ -2640,7 +2660,8 @@ def create_model_deployment(self, create_model_deployment_details, **kwargs): "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), + "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} @@ -3086,6 +3107,9 @@ def create_pipeline_run(self, create_pipeline_run_details, **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 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. @@ -3116,7 +3140,8 @@ def create_pipeline_run(self, create_pipeline_run_details, **kwargs): "allow_control_chars", "retry_strategy", "opc_retry_token", - "opc_request_id" + "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: @@ -3127,7 +3152,8 @@ def create_pipeline_run(self, create_pipeline_run_details, **kwargs): "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-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} diff --git a/src/oci/data_science/models/__init__.py b/src/oci/data_science/models/__init__.py index 035290af2..8ac35dd88 100644 --- a/src/oci/data_science/models/__init__.py +++ b/src/oci/data_science/models/__init__.py @@ -89,6 +89,10 @@ from .ocir_model_deployment_environment_configuration_details import OcirModelDeploymentEnvironmentConfigurationDetails from .pipeline import Pipeline from .pipeline_configuration_details import PipelineConfigurationDetails +from .pipeline_container_configuration_details import PipelineContainerConfigurationDetails +from .pipeline_container_step_details import PipelineContainerStepDetails +from .pipeline_container_step_run import PipelineContainerStepRun +from .pipeline_container_step_update_details import PipelineContainerStepUpdateDetails from .pipeline_custom_script_step_details import PipelineCustomScriptStepDetails from .pipeline_custom_script_step_run import PipelineCustomScriptStepRun from .pipeline_custom_script_step_update_details import PipelineCustomScriptStepUpdateDetails @@ -98,6 +102,7 @@ from .pipeline_ml_job_step_details import PipelineMLJobStepDetails from .pipeline_ml_job_step_run import PipelineMLJobStepRun from .pipeline_ml_job_step_update_details import PipelineMLJobStepUpdateDetails +from .pipeline_ocir_container_configuration_details import PipelineOcirContainerConfigurationDetails from .pipeline_run import PipelineRun from .pipeline_run_log_details import PipelineRunLogDetails from .pipeline_run_summary import PipelineRunSummary @@ -227,6 +232,10 @@ "OcirModelDeploymentEnvironmentConfigurationDetails": OcirModelDeploymentEnvironmentConfigurationDetails, "Pipeline": Pipeline, "PipelineConfigurationDetails": PipelineConfigurationDetails, + "PipelineContainerConfigurationDetails": PipelineContainerConfigurationDetails, + "PipelineContainerStepDetails": PipelineContainerStepDetails, + "PipelineContainerStepRun": PipelineContainerStepRun, + "PipelineContainerStepUpdateDetails": PipelineContainerStepUpdateDetails, "PipelineCustomScriptStepDetails": PipelineCustomScriptStepDetails, "PipelineCustomScriptStepRun": PipelineCustomScriptStepRun, "PipelineCustomScriptStepUpdateDetails": PipelineCustomScriptStepUpdateDetails, @@ -236,6 +245,7 @@ "PipelineMLJobStepDetails": PipelineMLJobStepDetails, "PipelineMLJobStepRun": PipelineMLJobStepRun, "PipelineMLJobStepUpdateDetails": PipelineMLJobStepUpdateDetails, + "PipelineOcirContainerConfigurationDetails": PipelineOcirContainerConfigurationDetails, "PipelineRun": PipelineRun, "PipelineRunLogDetails": PipelineRunLogDetails, "PipelineRunSummary": PipelineRunSummary, diff --git a/src/oci/data_science/models/fast_launch_job_config_summary.py b/src/oci/data_science/models/fast_launch_job_config_summary.py index 324a85d78..5887e7d28 100644 --- a/src/oci/data_science/models/fast_launch_job_config_summary.py +++ b/src/oci/data_science/models/fast_launch_job_config_summary.py @@ -27,6 +27,10 @@ class FastLaunchJobConfigSummary(object): #: This constant has a value of "NVIDIA_GPU" SHAPE_SERIES_NVIDIA_GPU = "NVIDIA_GPU" + #: A constant which can be used with the shape_series property of a FastLaunchJobConfigSummary. + #: This constant has a value of "GENERIC" + SHAPE_SERIES_GENERIC = "GENERIC" + #: A constant which can be used with the shape_series property of a FastLaunchJobConfigSummary. #: This constant has a value of "LEGACY" SHAPE_SERIES_LEGACY = "LEGACY" @@ -70,7 +74,7 @@ def __init__(self, **kwargs): :param shape_series: The value to assign to the shape_series property of this FastLaunchJobConfigSummary. - Allowed values for this property are: "AMD_ROME", "INTEL_SKYLAKE", "NVIDIA_GPU", "LEGACY", "ARM", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "AMD_ROME", "INTEL_SKYLAKE", "NVIDIA_GPU", "GENERIC", "LEGACY", "ARM", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type shape_series: str @@ -208,7 +212,7 @@ def shape_series(self): **[Required]** Gets the shape_series of this FastLaunchJobConfigSummary. The family that the compute shape belongs to. - Allowed values for this property are: "AMD_ROME", "INTEL_SKYLAKE", "NVIDIA_GPU", "LEGACY", "ARM", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "AMD_ROME", "INTEL_SKYLAKE", "NVIDIA_GPU", "GENERIC", "LEGACY", "ARM", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -227,7 +231,7 @@ def shape_series(self, shape_series): :param shape_series: The shape_series of this FastLaunchJobConfigSummary. :type: str """ - allowed_values = ["AMD_ROME", "INTEL_SKYLAKE", "NVIDIA_GPU", "LEGACY", "ARM"] + allowed_values = ["AMD_ROME", "INTEL_SKYLAKE", "NVIDIA_GPU", "GENERIC", "LEGACY", "ARM"] if not value_allowed_none_or_none_sentinel(shape_series, allowed_values): shape_series = 'UNKNOWN_ENUM_VALUE' self._shape_series = shape_series diff --git a/src/oci/data_science/models/job_shape_summary.py b/src/oci/data_science/models/job_shape_summary.py index b60e0a8b1..1c9a0268d 100644 --- a/src/oci/data_science/models/job_shape_summary.py +++ b/src/oci/data_science/models/job_shape_summary.py @@ -27,6 +27,10 @@ class JobShapeSummary(object): #: This constant has a value of "NVIDIA_GPU" SHAPE_SERIES_NVIDIA_GPU = "NVIDIA_GPU" + #: A constant which can be used with the shape_series property of a JobShapeSummary. + #: This constant has a value of "GENERIC" + SHAPE_SERIES_GENERIC = "GENERIC" + #: A constant which can be used with the shape_series property of a JobShapeSummary. #: This constant has a value of "LEGACY" SHAPE_SERIES_LEGACY = "LEGACY" @@ -54,7 +58,7 @@ def __init__(self, **kwargs): :param shape_series: The value to assign to the shape_series property of this JobShapeSummary. - Allowed values for this property are: "AMD_ROME", "INTEL_SKYLAKE", "NVIDIA_GPU", "LEGACY", "ARM", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "AMD_ROME", "INTEL_SKYLAKE", "NVIDIA_GPU", "GENERIC", "LEGACY", "ARM", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type shape_series: str @@ -156,7 +160,7 @@ def shape_series(self): **[Required]** Gets the shape_series of this JobShapeSummary. The family that the compute shape belongs to. - Allowed values for this property are: "AMD_ROME", "INTEL_SKYLAKE", "NVIDIA_GPU", "LEGACY", "ARM", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "AMD_ROME", "INTEL_SKYLAKE", "NVIDIA_GPU", "GENERIC", "LEGACY", "ARM", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -175,7 +179,7 @@ def shape_series(self, shape_series): :param shape_series: The shape_series of this JobShapeSummary. :type: str """ - allowed_values = ["AMD_ROME", "INTEL_SKYLAKE", "NVIDIA_GPU", "LEGACY", "ARM"] + allowed_values = ["AMD_ROME", "INTEL_SKYLAKE", "NVIDIA_GPU", "GENERIC", "LEGACY", "ARM"] if not value_allowed_none_or_none_sentinel(shape_series, allowed_values): shape_series = 'UNKNOWN_ENUM_VALUE' self._shape_series = shape_series diff --git a/src/oci/data_science/models/model_deployment_shape_summary.py b/src/oci/data_science/models/model_deployment_shape_summary.py index fcfb155dd..2d3a182ac 100644 --- a/src/oci/data_science/models/model_deployment_shape_summary.py +++ b/src/oci/data_science/models/model_deployment_shape_summary.py @@ -27,6 +27,10 @@ class ModelDeploymentShapeSummary(object): #: This constant has a value of "NVIDIA_GPU" SHAPE_SERIES_NVIDIA_GPU = "NVIDIA_GPU" + #: A constant which can be used with the shape_series property of a ModelDeploymentShapeSummary. + #: This constant has a value of "GENERIC" + SHAPE_SERIES_GENERIC = "GENERIC" + #: A constant which can be used with the shape_series property of a ModelDeploymentShapeSummary. #: This constant has a value of "LEGACY" SHAPE_SERIES_LEGACY = "LEGACY" @@ -54,7 +58,7 @@ def __init__(self, **kwargs): :param shape_series: The value to assign to the shape_series property of this ModelDeploymentShapeSummary. - Allowed values for this property are: "AMD_ROME", "INTEL_SKYLAKE", "NVIDIA_GPU", "LEGACY", "ARM", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "AMD_ROME", "INTEL_SKYLAKE", "NVIDIA_GPU", "GENERIC", "LEGACY", "ARM", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type shape_series: str @@ -156,7 +160,7 @@ def shape_series(self): **[Required]** Gets the shape_series of this ModelDeploymentShapeSummary. The family that the compute shape belongs to. - Allowed values for this property are: "AMD_ROME", "INTEL_SKYLAKE", "NVIDIA_GPU", "LEGACY", "ARM", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "AMD_ROME", "INTEL_SKYLAKE", "NVIDIA_GPU", "GENERIC", "LEGACY", "ARM", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -175,7 +179,7 @@ def shape_series(self, shape_series): :param shape_series: The shape_series of this ModelDeploymentShapeSummary. :type: str """ - allowed_values = ["AMD_ROME", "INTEL_SKYLAKE", "NVIDIA_GPU", "LEGACY", "ARM"] + allowed_values = ["AMD_ROME", "INTEL_SKYLAKE", "NVIDIA_GPU", "GENERIC", "LEGACY", "ARM"] if not value_allowed_none_or_none_sentinel(shape_series, allowed_values): shape_series = 'UNKNOWN_ENUM_VALUE' self._shape_series = shape_series diff --git a/src/oci/data_science/models/notebook_session_shape_summary.py b/src/oci/data_science/models/notebook_session_shape_summary.py index 57057a744..07819183e 100644 --- a/src/oci/data_science/models/notebook_session_shape_summary.py +++ b/src/oci/data_science/models/notebook_session_shape_summary.py @@ -27,6 +27,10 @@ class NotebookSessionShapeSummary(object): #: This constant has a value of "NVIDIA_GPU" SHAPE_SERIES_NVIDIA_GPU = "NVIDIA_GPU" + #: A constant which can be used with the shape_series property of a NotebookSessionShapeSummary. + #: This constant has a value of "GENERIC" + SHAPE_SERIES_GENERIC = "GENERIC" + #: A constant which can be used with the shape_series property of a NotebookSessionShapeSummary. #: This constant has a value of "LEGACY" SHAPE_SERIES_LEGACY = "LEGACY" @@ -54,7 +58,7 @@ def __init__(self, **kwargs): :param shape_series: The value to assign to the shape_series property of this NotebookSessionShapeSummary. - Allowed values for this property are: "AMD_ROME", "INTEL_SKYLAKE", "NVIDIA_GPU", "LEGACY", "ARM", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "AMD_ROME", "INTEL_SKYLAKE", "NVIDIA_GPU", "GENERIC", "LEGACY", "ARM", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type shape_series: str @@ -156,7 +160,7 @@ def shape_series(self): **[Required]** Gets the shape_series of this NotebookSessionShapeSummary. The family that the compute shape belongs to. - Allowed values for this property are: "AMD_ROME", "INTEL_SKYLAKE", "NVIDIA_GPU", "LEGACY", "ARM", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "AMD_ROME", "INTEL_SKYLAKE", "NVIDIA_GPU", "GENERIC", "LEGACY", "ARM", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -175,7 +179,7 @@ def shape_series(self, shape_series): :param shape_series: The shape_series of this NotebookSessionShapeSummary. :type: str """ - allowed_values = ["AMD_ROME", "INTEL_SKYLAKE", "NVIDIA_GPU", "LEGACY", "ARM"] + allowed_values = ["AMD_ROME", "INTEL_SKYLAKE", "NVIDIA_GPU", "GENERIC", "LEGACY", "ARM"] if not value_allowed_none_or_none_sentinel(shape_series, allowed_values): shape_series = 'UNKNOWN_ENUM_VALUE' self._shape_series = shape_series diff --git a/src/oci/data_science/models/pipeline_container_configuration_details.py b/src/oci/data_science/models/pipeline_container_configuration_details.py new file mode 100644 index 000000000..6b6d336f7 --- /dev/null +++ b/src/oci/data_science/models/pipeline_container_configuration_details.py @@ -0,0 +1,101 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 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 PipelineContainerConfigurationDetails(object): + """ + Container Details for a step in pipeline. + """ + + #: A constant which can be used with the container_type property of a PipelineContainerConfigurationDetails. + #: This constant has a value of "OCIR_CONTAINER" + CONTAINER_TYPE_OCIR_CONTAINER = "OCIR_CONTAINER" + + def __init__(self, **kwargs): + """ + Initializes a new PipelineContainerConfigurationDetails 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.PipelineOcirContainerConfigurationDetails` + + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param container_type: + The value to assign to the container_type property of this PipelineContainerConfigurationDetails. + Allowed values for this property are: "OCIR_CONTAINER", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type container_type: str + + """ + self.swagger_types = { + 'container_type': 'str' + } + + self.attribute_map = { + 'container_type': 'containerType' + } + + self._container_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['containerType'] + + if type == 'OCIR_CONTAINER': + return 'PipelineOcirContainerConfigurationDetails' + else: + return 'PipelineContainerConfigurationDetails' + + @property + def container_type(self): + """ + **[Required]** Gets the container_type of this PipelineContainerConfigurationDetails. + The type of container. + + Allowed values for this property are: "OCIR_CONTAINER", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The container_type of this PipelineContainerConfigurationDetails. + :rtype: str + """ + return self._container_type + + @container_type.setter + def container_type(self, container_type): + """ + Sets the container_type of this PipelineContainerConfigurationDetails. + The type of container. + + + :param container_type: The container_type of this PipelineContainerConfigurationDetails. + :type: str + """ + allowed_values = ["OCIR_CONTAINER"] + if not value_allowed_none_or_none_sentinel(container_type, allowed_values): + container_type = 'UNKNOWN_ENUM_VALUE' + self._container_type = container_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/pipeline_container_step_details.py b/src/oci/data_science/models/pipeline_container_step_details.py new file mode 100644 index 000000000..44d8432c4 --- /dev/null +++ b/src/oci/data_science/models/pipeline_container_step_details.py @@ -0,0 +1,164 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20190101 + +from .pipeline_step_details import PipelineStepDetails +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 PipelineContainerStepDetails(PipelineStepDetails): + """ + The type of step where user provides the container details for an execution engine managed by the pipelines service. + """ + + def __init__(self, **kwargs): + """ + Initializes a new PipelineContainerStepDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.data_science.models.PipelineContainerStepDetails.step_type` attribute + of this class is ``CONTAINER`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param step_type: + The value to assign to the step_type property of this PipelineContainerStepDetails. + Allowed values for this property are: "ML_JOB", "CUSTOM_SCRIPT", "CONTAINER" + :type step_type: str + + :param step_name: + The value to assign to the step_name property of this PipelineContainerStepDetails. + :type step_name: str + + :param description: + The value to assign to the description property of this PipelineContainerStepDetails. + :type description: str + + :param depends_on: + The value to assign to the depends_on property of this PipelineContainerStepDetails. + :type depends_on: list[str] + + :param step_configuration_details: + The value to assign to the step_configuration_details property of this PipelineContainerStepDetails. + :type step_configuration_details: oci.data_science.models.PipelineStepConfigurationDetails + + :param step_infrastructure_configuration_details: + The value to assign to the step_infrastructure_configuration_details property of this PipelineContainerStepDetails. + :type step_infrastructure_configuration_details: oci.data_science.models.PipelineInfrastructureConfigurationDetails + + :param step_container_configuration_details: + The value to assign to the step_container_configuration_details property of this PipelineContainerStepDetails. + :type step_container_configuration_details: oci.data_science.models.PipelineContainerConfigurationDetails + + :param is_artifact_uploaded: + The value to assign to the is_artifact_uploaded property of this PipelineContainerStepDetails. + :type is_artifact_uploaded: bool + + """ + self.swagger_types = { + 'step_type': 'str', + 'step_name': 'str', + 'description': 'str', + 'depends_on': 'list[str]', + 'step_configuration_details': 'PipelineStepConfigurationDetails', + 'step_infrastructure_configuration_details': 'PipelineInfrastructureConfigurationDetails', + 'step_container_configuration_details': 'PipelineContainerConfigurationDetails', + 'is_artifact_uploaded': 'bool' + } + + self.attribute_map = { + 'step_type': 'stepType', + 'step_name': 'stepName', + 'description': 'description', + 'depends_on': 'dependsOn', + 'step_configuration_details': 'stepConfigurationDetails', + 'step_infrastructure_configuration_details': 'stepInfrastructureConfigurationDetails', + 'step_container_configuration_details': 'stepContainerConfigurationDetails', + 'is_artifact_uploaded': 'isArtifactUploaded' + } + + self._step_type = None + self._step_name = None + self._description = None + self._depends_on = None + self._step_configuration_details = None + self._step_infrastructure_configuration_details = None + self._step_container_configuration_details = None + self._is_artifact_uploaded = None + self._step_type = 'CONTAINER' + + @property + def step_infrastructure_configuration_details(self): + """ + Gets the step_infrastructure_configuration_details of this PipelineContainerStepDetails. + + :return: The step_infrastructure_configuration_details of this PipelineContainerStepDetails. + :rtype: oci.data_science.models.PipelineInfrastructureConfigurationDetails + """ + return self._step_infrastructure_configuration_details + + @step_infrastructure_configuration_details.setter + def step_infrastructure_configuration_details(self, step_infrastructure_configuration_details): + """ + Sets the step_infrastructure_configuration_details of this PipelineContainerStepDetails. + + :param step_infrastructure_configuration_details: The step_infrastructure_configuration_details of this PipelineContainerStepDetails. + :type: oci.data_science.models.PipelineInfrastructureConfigurationDetails + """ + self._step_infrastructure_configuration_details = step_infrastructure_configuration_details + + @property + def step_container_configuration_details(self): + """ + **[Required]** Gets the step_container_configuration_details of this PipelineContainerStepDetails. + + :return: The step_container_configuration_details of this PipelineContainerStepDetails. + :rtype: oci.data_science.models.PipelineContainerConfigurationDetails + """ + return self._step_container_configuration_details + + @step_container_configuration_details.setter + def step_container_configuration_details(self, step_container_configuration_details): + """ + Sets the step_container_configuration_details of this PipelineContainerStepDetails. + + :param step_container_configuration_details: The step_container_configuration_details of this PipelineContainerStepDetails. + :type: oci.data_science.models.PipelineContainerConfigurationDetails + """ + self._step_container_configuration_details = step_container_configuration_details + + @property + def is_artifact_uploaded(self): + """ + Gets the is_artifact_uploaded of this PipelineContainerStepDetails. + A flag to indicate whether the artifact has been uploaded for this step or not. + + + :return: The is_artifact_uploaded of this PipelineContainerStepDetails. + :rtype: bool + """ + return self._is_artifact_uploaded + + @is_artifact_uploaded.setter + def is_artifact_uploaded(self, is_artifact_uploaded): + """ + Sets the is_artifact_uploaded of this PipelineContainerStepDetails. + A flag to indicate whether the artifact has been uploaded for this step or not. + + + :param is_artifact_uploaded: The is_artifact_uploaded of this PipelineContainerStepDetails. + :type: bool + """ + self._is_artifact_uploaded = is_artifact_uploaded + + 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_container_step_run.py b/src/oci/data_science/models/pipeline_container_step_run.py new file mode 100644 index 000000000..8178fd339 --- /dev/null +++ b/src/oci/data_science/models/pipeline_container_step_run.py @@ -0,0 +1,87 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20190101 + +from .pipeline_step_run import PipelineStepRun +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 PipelineContainerStepRun(PipelineStepRun): + """ + Detail of each ContainerStepRun. + """ + + def __init__(self, **kwargs): + """ + Initializes a new PipelineContainerStepRun object with values from keyword arguments. The default value of the :py:attr:`~oci.data_science.models.PipelineContainerStepRun.step_type` attribute + of this class is ``CONTAINER`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param step_type: + The value to assign to the step_type property of this PipelineContainerStepRun. + Allowed values for this property are: "ML_JOB", "CUSTOM_SCRIPT", "CONTAINER" + :type step_type: str + + :param time_started: + The value to assign to the time_started property of this PipelineContainerStepRun. + :type time_started: datetime + + :param time_finished: + The value to assign to the time_finished property of this PipelineContainerStepRun. + :type time_finished: datetime + + :param step_name: + The value to assign to the step_name property of this PipelineContainerStepRun. + :type step_name: str + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this PipelineContainerStepRun. + Allowed values for this property are: "WAITING", "ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", "DELETED", "SKIPPED" + :type lifecycle_state: str + + :param lifecycle_details: + The value to assign to the lifecycle_details property of this PipelineContainerStepRun. + :type lifecycle_details: str + + """ + self.swagger_types = { + 'step_type': 'str', + 'time_started': 'datetime', + 'time_finished': 'datetime', + 'step_name': 'str', + 'lifecycle_state': 'str', + 'lifecycle_details': 'str' + } + + self.attribute_map = { + 'step_type': 'stepType', + 'time_started': 'timeStarted', + 'time_finished': 'timeFinished', + 'step_name': 'stepName', + 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails' + } + + self._step_type = None + self._time_started = None + self._time_finished = None + self._step_name = None + self._lifecycle_state = None + self._lifecycle_details = None + self._step_type = 'CONTAINER' + + 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_container_step_update_details.py b/src/oci/data_science/models/pipeline_container_step_update_details.py new file mode 100644 index 000000000..7cccb9f60 --- /dev/null +++ b/src/oci/data_science/models/pipeline_container_step_update_details.py @@ -0,0 +1,99 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20190101 + +from .pipeline_step_update_details import PipelineStepUpdateDetails +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 PipelineContainerStepUpdateDetails(PipelineStepUpdateDetails): + """ + Update the details for a container step type. + """ + + def __init__(self, **kwargs): + """ + Initializes a new PipelineContainerStepUpdateDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.data_science.models.PipelineContainerStepUpdateDetails.step_type` attribute + of this class is ``CONTAINER`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param step_type: + The value to assign to the step_type property of this PipelineContainerStepUpdateDetails. + Allowed values for this property are: "ML_JOB", "CUSTOM_SCRIPT", "CONTAINER" + :type step_type: str + + :param step_name: + The value to assign to the step_name property of this PipelineContainerStepUpdateDetails. + :type step_name: str + + :param description: + The value to assign to the description property of this PipelineContainerStepUpdateDetails. + :type description: str + + :param step_configuration_details: + The value to assign to the step_configuration_details property of this PipelineContainerStepUpdateDetails. + :type step_configuration_details: oci.data_science.models.PipelineStepConfigurationDetails + + :param step_infrastructure_configuration_details: + The value to assign to the step_infrastructure_configuration_details property of this PipelineContainerStepUpdateDetails. + :type step_infrastructure_configuration_details: oci.data_science.models.PipelineInfrastructureConfigurationDetails + + """ + self.swagger_types = { + 'step_type': 'str', + 'step_name': 'str', + 'description': 'str', + 'step_configuration_details': 'PipelineStepConfigurationDetails', + 'step_infrastructure_configuration_details': 'PipelineInfrastructureConfigurationDetails' + } + + self.attribute_map = { + 'step_type': 'stepType', + 'step_name': 'stepName', + 'description': 'description', + 'step_configuration_details': 'stepConfigurationDetails', + 'step_infrastructure_configuration_details': 'stepInfrastructureConfigurationDetails' + } + + self._step_type = None + self._step_name = None + self._description = None + self._step_configuration_details = None + self._step_infrastructure_configuration_details = None + self._step_type = 'CONTAINER' + + @property + def step_infrastructure_configuration_details(self): + """ + Gets the step_infrastructure_configuration_details of this PipelineContainerStepUpdateDetails. + + :return: The step_infrastructure_configuration_details of this PipelineContainerStepUpdateDetails. + :rtype: oci.data_science.models.PipelineInfrastructureConfigurationDetails + """ + return self._step_infrastructure_configuration_details + + @step_infrastructure_configuration_details.setter + def step_infrastructure_configuration_details(self, step_infrastructure_configuration_details): + """ + Sets the step_infrastructure_configuration_details of this PipelineContainerStepUpdateDetails. + + :param step_infrastructure_configuration_details: The step_infrastructure_configuration_details of this PipelineContainerStepUpdateDetails. + :type: oci.data_science.models.PipelineInfrastructureConfigurationDetails + """ + self._step_infrastructure_configuration_details = step_infrastructure_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/pipeline_custom_script_step_details.py b/src/oci/data_science/models/pipeline_custom_script_step_details.py index 10ee6cc33..ff9f70ae2 100644 --- a/src/oci/data_science/models/pipeline_custom_script_step_details.py +++ b/src/oci/data_science/models/pipeline_custom_script_step_details.py @@ -23,7 +23,7 @@ def __init__(self, **kwargs): :param step_type: The value to assign to the step_type property of this PipelineCustomScriptStepDetails. - Allowed values for this property are: "ML_JOB", "CUSTOM_SCRIPT" + Allowed values for this property are: "ML_JOB", "CUSTOM_SCRIPT", "CONTAINER" :type step_type: str :param step_name: diff --git a/src/oci/data_science/models/pipeline_custom_script_step_run.py b/src/oci/data_science/models/pipeline_custom_script_step_run.py index 28741d5d2..429d3603f 100644 --- a/src/oci/data_science/models/pipeline_custom_script_step_run.py +++ b/src/oci/data_science/models/pipeline_custom_script_step_run.py @@ -23,7 +23,7 @@ def __init__(self, **kwargs): :param step_type: The value to assign to the step_type property of this PipelineCustomScriptStepRun. - Allowed values for this property are: "ML_JOB", "CUSTOM_SCRIPT" + Allowed values for this property are: "ML_JOB", "CUSTOM_SCRIPT", "CONTAINER" :type step_type: str :param time_started: diff --git a/src/oci/data_science/models/pipeline_custom_script_step_update_details.py b/src/oci/data_science/models/pipeline_custom_script_step_update_details.py index 5b526060a..8faea7ea7 100644 --- a/src/oci/data_science/models/pipeline_custom_script_step_update_details.py +++ b/src/oci/data_science/models/pipeline_custom_script_step_update_details.py @@ -23,7 +23,7 @@ def __init__(self, **kwargs): :param step_type: The value to assign to the step_type property of this PipelineCustomScriptStepUpdateDetails. - Allowed values for this property are: "ML_JOB", "CUSTOM_SCRIPT" + Allowed values for this property are: "ML_JOB", "CUSTOM_SCRIPT", "CONTAINER" :type step_type: str :param step_name: @@ -38,27 +38,54 @@ def __init__(self, **kwargs): The value to assign to the step_configuration_details property of this PipelineCustomScriptStepUpdateDetails. :type step_configuration_details: oci.data_science.models.PipelineStepConfigurationDetails + :param step_infrastructure_configuration_details: + The value to assign to the step_infrastructure_configuration_details property of this PipelineCustomScriptStepUpdateDetails. + :type step_infrastructure_configuration_details: oci.data_science.models.PipelineInfrastructureConfigurationDetails + """ self.swagger_types = { 'step_type': 'str', 'step_name': 'str', 'description': 'str', - 'step_configuration_details': 'PipelineStepConfigurationDetails' + 'step_configuration_details': 'PipelineStepConfigurationDetails', + 'step_infrastructure_configuration_details': 'PipelineInfrastructureConfigurationDetails' } self.attribute_map = { 'step_type': 'stepType', 'step_name': 'stepName', 'description': 'description', - 'step_configuration_details': 'stepConfigurationDetails' + 'step_configuration_details': 'stepConfigurationDetails', + 'step_infrastructure_configuration_details': 'stepInfrastructureConfigurationDetails' } self._step_type = None self._step_name = None self._description = None self._step_configuration_details = None + self._step_infrastructure_configuration_details = None self._step_type = 'CUSTOM_SCRIPT' + @property + def step_infrastructure_configuration_details(self): + """ + Gets the step_infrastructure_configuration_details of this PipelineCustomScriptStepUpdateDetails. + + :return: The step_infrastructure_configuration_details of this PipelineCustomScriptStepUpdateDetails. + :rtype: oci.data_science.models.PipelineInfrastructureConfigurationDetails + """ + return self._step_infrastructure_configuration_details + + @step_infrastructure_configuration_details.setter + def step_infrastructure_configuration_details(self, step_infrastructure_configuration_details): + """ + Sets the step_infrastructure_configuration_details of this PipelineCustomScriptStepUpdateDetails. + + :param step_infrastructure_configuration_details: The step_infrastructure_configuration_details of this PipelineCustomScriptStepUpdateDetails. + :type: oci.data_science.models.PipelineInfrastructureConfigurationDetails + """ + self._step_infrastructure_configuration_details = step_infrastructure_configuration_details + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/data_science/models/pipeline_infrastructure_configuration_details.py b/src/oci/data_science/models/pipeline_infrastructure_configuration_details.py index 6e2e8ca94..c6c02b9a2 100644 --- a/src/oci/data_science/models/pipeline_infrastructure_configuration_details.py +++ b/src/oci/data_science/models/pipeline_infrastructure_configuration_details.py @@ -28,6 +28,10 @@ def __init__(self, **kwargs): The value to assign to the block_storage_size_in_gbs property of this PipelineInfrastructureConfigurationDetails. :type block_storage_size_in_gbs: int + :param subnet_id: + The value to assign to the subnet_id property of this PipelineInfrastructureConfigurationDetails. + :type subnet_id: str + :param shape_config_details: The value to assign to the shape_config_details property of this PipelineInfrastructureConfigurationDetails. :type shape_config_details: oci.data_science.models.PipelineShapeConfigDetails @@ -36,17 +40,20 @@ def __init__(self, **kwargs): self.swagger_types = { 'shape_name': 'str', 'block_storage_size_in_gbs': 'int', + 'subnet_id': 'str', 'shape_config_details': 'PipelineShapeConfigDetails' } self.attribute_map = { 'shape_name': 'shapeName', 'block_storage_size_in_gbs': 'blockStorageSizeInGBs', + 'subnet_id': 'subnetId', 'shape_config_details': 'shapeConfigDetails' } self._shape_name = None self._block_storage_size_in_gbs = None + self._subnet_id = None self._shape_config_details = None @property @@ -97,6 +104,30 @@ def block_storage_size_in_gbs(self, block_storage_size_in_gbs): """ self._block_storage_size_in_gbs = block_storage_size_in_gbs + @property + def subnet_id(self): + """ + Gets the subnet_id of this PipelineInfrastructureConfigurationDetails. + The subnet to create a secondary vnic in to attach to the instance running the pipeline step. + + + :return: The subnet_id of this PipelineInfrastructureConfigurationDetails. + :rtype: str + """ + return self._subnet_id + + @subnet_id.setter + def subnet_id(self, subnet_id): + """ + Sets the subnet_id of this PipelineInfrastructureConfigurationDetails. + The subnet to create a secondary vnic in to attach to the instance running the pipeline step. + + + :param subnet_id: The subnet_id of this PipelineInfrastructureConfigurationDetails. + :type: str + """ + self._subnet_id = subnet_id + @property def shape_config_details(self): """ diff --git a/src/oci/data_science/models/pipeline_ml_job_step_details.py b/src/oci/data_science/models/pipeline_ml_job_step_details.py index e5c3146c3..3ecb882bf 100644 --- a/src/oci/data_science/models/pipeline_ml_job_step_details.py +++ b/src/oci/data_science/models/pipeline_ml_job_step_details.py @@ -23,7 +23,7 @@ def __init__(self, **kwargs): :param step_type: The value to assign to the step_type property of this PipelineMLJobStepDetails. - Allowed values for this property are: "ML_JOB", "CUSTOM_SCRIPT" + Allowed values for this property are: "ML_JOB", "CUSTOM_SCRIPT", "CONTAINER" :type step_type: str :param step_name: diff --git a/src/oci/data_science/models/pipeline_ml_job_step_run.py b/src/oci/data_science/models/pipeline_ml_job_step_run.py index 8d65356bc..2a59d79f9 100644 --- a/src/oci/data_science/models/pipeline_ml_job_step_run.py +++ b/src/oci/data_science/models/pipeline_ml_job_step_run.py @@ -23,7 +23,7 @@ def __init__(self, **kwargs): :param step_type: The value to assign to the step_type property of this PipelineMLJobStepRun. - Allowed values for this property are: "ML_JOB", "CUSTOM_SCRIPT" + Allowed values for this property are: "ML_JOB", "CUSTOM_SCRIPT", "CONTAINER" :type step_type: str :param time_started: diff --git a/src/oci/data_science/models/pipeline_ml_job_step_update_details.py b/src/oci/data_science/models/pipeline_ml_job_step_update_details.py index 771b3c48d..ac67cf932 100644 --- a/src/oci/data_science/models/pipeline_ml_job_step_update_details.py +++ b/src/oci/data_science/models/pipeline_ml_job_step_update_details.py @@ -23,7 +23,7 @@ def __init__(self, **kwargs): :param step_type: The value to assign to the step_type property of this PipelineMLJobStepUpdateDetails. - Allowed values for this property are: "ML_JOB", "CUSTOM_SCRIPT" + Allowed values for this property are: "ML_JOB", "CUSTOM_SCRIPT", "CONTAINER" :type step_type: str :param step_name: diff --git a/src/oci/data_science/models/pipeline_ocir_container_configuration_details.py b/src/oci/data_science/models/pipeline_ocir_container_configuration_details.py new file mode 100644 index 000000000..215612b3d --- /dev/null +++ b/src/oci/data_science/models/pipeline_ocir_container_configuration_details.py @@ -0,0 +1,228 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20190101 + +from .pipeline_container_configuration_details import PipelineContainerConfigurationDetails +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 PipelineOcirContainerConfigurationDetails(PipelineContainerConfigurationDetails): + """ + Container configuration based on image stored in OCI Container Registry. + """ + + def __init__(self, **kwargs): + """ + Initializes a new PipelineOcirContainerConfigurationDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.data_science.models.PipelineOcirContainerConfigurationDetails.container_type` attribute + of this class is ``OCIR_CONTAINER`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param container_type: + The value to assign to the container_type property of this PipelineOcirContainerConfigurationDetails. + Allowed values for this property are: "OCIR_CONTAINER" + :type container_type: str + + :param image: + The value to assign to the image property of this PipelineOcirContainerConfigurationDetails. + :type image: str + + :param cmd: + The value to assign to the cmd property of this PipelineOcirContainerConfigurationDetails. + :type cmd: list[str] + + :param entrypoint: + The value to assign to the entrypoint property of this PipelineOcirContainerConfigurationDetails. + :type entrypoint: list[str] + + :param image_digest: + The value to assign to the image_digest property of this PipelineOcirContainerConfigurationDetails. + :type image_digest: str + + :param image_signature_id: + The value to assign to the image_signature_id property of this PipelineOcirContainerConfigurationDetails. + :type image_signature_id: str + + """ + self.swagger_types = { + 'container_type': 'str', + 'image': 'str', + 'cmd': 'list[str]', + 'entrypoint': 'list[str]', + 'image_digest': 'str', + 'image_signature_id': 'str' + } + + self.attribute_map = { + 'container_type': 'containerType', + 'image': 'image', + 'cmd': 'cmd', + 'entrypoint': 'entrypoint', + 'image_digest': 'imageDigest', + 'image_signature_id': 'imageSignatureId' + } + + self._container_type = None + self._image = None + self._cmd = None + self._entrypoint = None + self._image_digest = None + self._image_signature_id = None + self._container_type = 'OCIR_CONTAINER' + + @property + def image(self): + """ + **[Required]** Gets the image of this PipelineOcirContainerConfigurationDetails. + The full path to the Oracle Container Repository (OCIR) registry, image, and tag in a canonical format. + + + :return: The image of this PipelineOcirContainerConfigurationDetails. + :rtype: str + """ + return self._image + + @image.setter + def image(self, image): + """ + Sets the image of this PipelineOcirContainerConfigurationDetails. + The full path to the Oracle Container Repository (OCIR) registry, image, and tag in a canonical format. + + + :param image: The image of this PipelineOcirContainerConfigurationDetails. + :type: str + """ + self._image = image + + @property + def cmd(self): + """ + Gets the cmd of this PipelineOcirContainerConfigurationDetails. + The container image run `CMD`__ as a list of strings. + Use `CMD` as arguments to the `ENTRYPOINT` or the only command to run in the absence of an `ENTRYPOINT`. + The combined size of `CMD` and `ENTRYPOINT` must be less than 2048 bytes. + + __ https://docs.docker.com/engine/reference/builder/#cmd + + + :return: The cmd of this PipelineOcirContainerConfigurationDetails. + :rtype: list[str] + """ + return self._cmd + + @cmd.setter + def cmd(self, cmd): + """ + Sets the cmd of this PipelineOcirContainerConfigurationDetails. + The container image run `CMD`__ as a list of strings. + Use `CMD` as arguments to the `ENTRYPOINT` or the only command to run in the absence of an `ENTRYPOINT`. + The combined size of `CMD` and `ENTRYPOINT` must be less than 2048 bytes. + + __ https://docs.docker.com/engine/reference/builder/#cmd + + + :param cmd: The cmd of this PipelineOcirContainerConfigurationDetails. + :type: list[str] + """ + self._cmd = cmd + + @property + def entrypoint(self): + """ + Gets the entrypoint of this PipelineOcirContainerConfigurationDetails. + The container image run `ENTRYPOINT`__ as a list of strings. + Accept the `CMD` as extra arguments. + The combined size of `CMD` and `ENTRYPOINT` must be less than 2048 bytes. + More information on how `CMD` and `ENTRYPOINT` interact are `here`__. + + __ https://docs.docker.com/engine/reference/builder/#entrypoint + __ https://docs.docker.com/engine/reference/builder/#understand-how-cmd-and-entrypoint-interact + + + :return: The entrypoint of this PipelineOcirContainerConfigurationDetails. + :rtype: list[str] + """ + return self._entrypoint + + @entrypoint.setter + def entrypoint(self, entrypoint): + """ + Sets the entrypoint of this PipelineOcirContainerConfigurationDetails. + The container image run `ENTRYPOINT`__ as a list of strings. + Accept the `CMD` as extra arguments. + The combined size of `CMD` and `ENTRYPOINT` must be less than 2048 bytes. + More information on how `CMD` and `ENTRYPOINT` interact are `here`__. + + __ https://docs.docker.com/engine/reference/builder/#entrypoint + __ https://docs.docker.com/engine/reference/builder/#understand-how-cmd-and-entrypoint-interact + + + :param entrypoint: The entrypoint of this PipelineOcirContainerConfigurationDetails. + :type: list[str] + """ + self._entrypoint = entrypoint + + @property + def image_digest(self): + """ + Gets the image_digest of this PipelineOcirContainerConfigurationDetails. + The digest of the container image. For example, + `sha256:881303a6b2738834d795a32b4a98eb0e5e3d1cad590a712d1e04f9b2fa90a030` + + + :return: The image_digest of this PipelineOcirContainerConfigurationDetails. + :rtype: str + """ + return self._image_digest + + @image_digest.setter + def image_digest(self, image_digest): + """ + Sets the image_digest of this PipelineOcirContainerConfigurationDetails. + The digest of the container image. For example, + `sha256:881303a6b2738834d795a32b4a98eb0e5e3d1cad590a712d1e04f9b2fa90a030` + + + :param image_digest: The image_digest of this PipelineOcirContainerConfigurationDetails. + :type: str + """ + self._image_digest = image_digest + + @property + def image_signature_id(self): + """ + Gets the image_signature_id of this PipelineOcirContainerConfigurationDetails. + OCID of the container image signature + + + :return: The image_signature_id of this PipelineOcirContainerConfigurationDetails. + :rtype: str + """ + return self._image_signature_id + + @image_signature_id.setter + def image_signature_id(self, image_signature_id): + """ + Sets the image_signature_id of this PipelineOcirContainerConfigurationDetails. + OCID of the container image signature + + + :param image_signature_id: The image_signature_id of this PipelineOcirContainerConfigurationDetails. + :type: str + """ + self._image_signature_id = image_signature_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/pipeline_step_details.py b/src/oci/data_science/models/pipeline_step_details.py index 03f09c4f2..0679cbb53 100644 --- a/src/oci/data_science/models/pipeline_step_details.py +++ b/src/oci/data_science/models/pipeline_step_details.py @@ -23,11 +23,16 @@ class PipelineStepDetails(object): #: This constant has a value of "CUSTOM_SCRIPT" STEP_TYPE_CUSTOM_SCRIPT = "CUSTOM_SCRIPT" + #: A constant which can be used with the step_type property of a PipelineStepDetails. + #: This constant has a value of "CONTAINER" + STEP_TYPE_CONTAINER = "CONTAINER" + def __init__(self, **kwargs): """ Initializes a new PipelineStepDetails 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.PipelineContainerStepDetails` * :class:`~oci.data_science.models.PipelineMLJobStepDetails` * :class:`~oci.data_science.models.PipelineCustomScriptStepDetails` @@ -35,7 +40,7 @@ def __init__(self, **kwargs): :param step_type: The value to assign to the step_type property of this PipelineStepDetails. - Allowed values for this property are: "ML_JOB", "CUSTOM_SCRIPT", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "ML_JOB", "CUSTOM_SCRIPT", "CONTAINER", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type step_type: str @@ -86,6 +91,9 @@ def get_subtype(object_dictionary): """ type = object_dictionary['stepType'] + if type == 'CONTAINER': + return 'PipelineContainerStepDetails' + if type == 'ML_JOB': return 'PipelineMLJobStepDetails' @@ -100,7 +108,7 @@ def step_type(self): **[Required]** Gets the step_type of this PipelineStepDetails. The type of step. - Allowed values for this property are: "ML_JOB", "CUSTOM_SCRIPT", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "ML_JOB", "CUSTOM_SCRIPT", "CONTAINER", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -119,7 +127,7 @@ def step_type(self, step_type): :param step_type: The step_type of this PipelineStepDetails. :type: str """ - allowed_values = ["ML_JOB", "CUSTOM_SCRIPT"] + allowed_values = ["ML_JOB", "CUSTOM_SCRIPT", "CONTAINER"] if not value_allowed_none_or_none_sentinel(step_type, allowed_values): step_type = 'UNKNOWN_ENUM_VALUE' self._step_type = step_type diff --git a/src/oci/data_science/models/pipeline_step_override_details.py b/src/oci/data_science/models/pipeline_step_override_details.py index 9260345ec..3cfae8ece 100644 --- a/src/oci/data_science/models/pipeline_step_override_details.py +++ b/src/oci/data_science/models/pipeline_step_override_details.py @@ -28,19 +28,26 @@ def __init__(self, **kwargs): The value to assign to the step_configuration_details property of this PipelineStepOverrideDetails. :type step_configuration_details: oci.data_science.models.PipelineStepConfigurationDetails + :param step_container_configuration_details: + The value to assign to the step_container_configuration_details property of this PipelineStepOverrideDetails. + :type step_container_configuration_details: oci.data_science.models.PipelineContainerConfigurationDetails + """ self.swagger_types = { 'step_name': 'str', - 'step_configuration_details': 'PipelineStepConfigurationDetails' + 'step_configuration_details': 'PipelineStepConfigurationDetails', + 'step_container_configuration_details': 'PipelineContainerConfigurationDetails' } self.attribute_map = { 'step_name': 'stepName', - 'step_configuration_details': 'stepConfigurationDetails' + 'step_configuration_details': 'stepConfigurationDetails', + 'step_container_configuration_details': 'stepContainerConfigurationDetails' } self._step_name = None self._step_configuration_details = None + self._step_container_configuration_details = None @property def step_name(self): @@ -86,6 +93,26 @@ def step_configuration_details(self, step_configuration_details): """ self._step_configuration_details = step_configuration_details + @property + def step_container_configuration_details(self): + """ + Gets the step_container_configuration_details of this PipelineStepOverrideDetails. + + :return: The step_container_configuration_details of this PipelineStepOverrideDetails. + :rtype: oci.data_science.models.PipelineContainerConfigurationDetails + """ + return self._step_container_configuration_details + + @step_container_configuration_details.setter + def step_container_configuration_details(self, step_container_configuration_details): + """ + Sets the step_container_configuration_details of this PipelineStepOverrideDetails. + + :param step_container_configuration_details: The step_container_configuration_details of this PipelineStepOverrideDetails. + :type: oci.data_science.models.PipelineContainerConfigurationDetails + """ + self._step_container_configuration_details = step_container_configuration_details + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/data_science/models/pipeline_step_run.py b/src/oci/data_science/models/pipeline_step_run.py index 0d9572da4..8832638ed 100644 --- a/src/oci/data_science/models/pipeline_step_run.py +++ b/src/oci/data_science/models/pipeline_step_run.py @@ -23,6 +23,10 @@ class PipelineStepRun(object): #: This constant has a value of "CUSTOM_SCRIPT" STEP_TYPE_CUSTOM_SCRIPT = "CUSTOM_SCRIPT" + #: A constant which can be used with the step_type property of a PipelineStepRun. + #: This constant has a value of "CONTAINER" + STEP_TYPE_CONTAINER = "CONTAINER" + #: A constant which can be used with the lifecycle_state property of a PipelineStepRun. #: This constant has a value of "WAITING" LIFECYCLE_STATE_WAITING = "WAITING" @@ -64,6 +68,7 @@ def __init__(self, **kwargs): Initializes a new PipelineStepRun 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.PipelineContainerStepRun` * :class:`~oci.data_science.models.PipelineCustomScriptStepRun` * :class:`~oci.data_science.models.PipelineMLJobStepRun` @@ -71,7 +76,7 @@ def __init__(self, **kwargs): :param step_type: The value to assign to the step_type property of this PipelineStepRun. - Allowed values for this property are: "ML_JOB", "CUSTOM_SCRIPT", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "ML_JOB", "CUSTOM_SCRIPT", "CONTAINER", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type step_type: str @@ -131,6 +136,9 @@ def get_subtype(object_dictionary): """ type = object_dictionary['stepType'] + if type == 'CONTAINER': + return 'PipelineContainerStepRun' + if type == 'CUSTOM_SCRIPT': return 'PipelineCustomScriptStepRun' @@ -145,7 +153,7 @@ def step_type(self): **[Required]** Gets the step_type of this PipelineStepRun. The type of step. - Allowed values for this property are: "ML_JOB", "CUSTOM_SCRIPT", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "ML_JOB", "CUSTOM_SCRIPT", "CONTAINER", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -164,7 +172,7 @@ def step_type(self, step_type): :param step_type: The step_type of this PipelineStepRun. :type: str """ - allowed_values = ["ML_JOB", "CUSTOM_SCRIPT"] + allowed_values = ["ML_JOB", "CUSTOM_SCRIPT", "CONTAINER"] if not value_allowed_none_or_none_sentinel(step_type, allowed_values): step_type = 'UNKNOWN_ENUM_VALUE' self._step_type = step_type diff --git a/src/oci/data_science/models/pipeline_step_update_details.py b/src/oci/data_science/models/pipeline_step_update_details.py index bcb894059..10890e2ef 100644 --- a/src/oci/data_science/models/pipeline_step_update_details.py +++ b/src/oci/data_science/models/pipeline_step_update_details.py @@ -23,6 +23,10 @@ class PipelineStepUpdateDetails(object): #: This constant has a value of "CUSTOM_SCRIPT" STEP_TYPE_CUSTOM_SCRIPT = "CUSTOM_SCRIPT" + #: A constant which can be used with the step_type property of a PipelineStepUpdateDetails. + #: This constant has a value of "CONTAINER" + STEP_TYPE_CONTAINER = "CONTAINER" + def __init__(self, **kwargs): """ Initializes a new PipelineStepUpdateDetails object with values from keyword arguments. This class has the following subclasses and if you are using this class as input @@ -30,12 +34,13 @@ def __init__(self, **kwargs): * :class:`~oci.data_science.models.PipelineMLJobStepUpdateDetails` * :class:`~oci.data_science.models.PipelineCustomScriptStepUpdateDetails` + * :class:`~oci.data_science.models.PipelineContainerStepUpdateDetails` The following keyword arguments are supported (corresponding to the getters/setters of this class): :param step_type: The value to assign to the step_type property of this PipelineStepUpdateDetails. - Allowed values for this property are: "ML_JOB", "CUSTOM_SCRIPT" + Allowed values for this property are: "ML_JOB", "CUSTOM_SCRIPT", "CONTAINER" :type step_type: str :param step_name: @@ -83,6 +88,9 @@ def get_subtype(object_dictionary): if type == 'CUSTOM_SCRIPT': return 'PipelineCustomScriptStepUpdateDetails' + + if type == 'CONTAINER': + return 'PipelineContainerStepUpdateDetails' else: return 'PipelineStepUpdateDetails' @@ -92,7 +100,7 @@ def step_type(self): **[Required]** Gets the step_type of this PipelineStepUpdateDetails. The type of step. - Allowed values for this property are: "ML_JOB", "CUSTOM_SCRIPT" + Allowed values for this property are: "ML_JOB", "CUSTOM_SCRIPT", "CONTAINER" :return: The step_type of this PipelineStepUpdateDetails. @@ -110,7 +118,7 @@ def step_type(self, step_type): :param step_type: The step_type of this PipelineStepUpdateDetails. :type: str """ - allowed_values = ["ML_JOB", "CUSTOM_SCRIPT"] + allowed_values = ["ML_JOB", "CUSTOM_SCRIPT", "CONTAINER"] if not value_allowed_none_or_none_sentinel(step_type, allowed_values): raise ValueError( f"Invalid value for `step_type`, must be None or one of {allowed_values}" diff --git a/src/oci/data_science/models/update_pipeline_details.py b/src/oci/data_science/models/update_pipeline_details.py index 7d48fff61..f6c5f1d09 100644 --- a/src/oci/data_science/models/update_pipeline_details.py +++ b/src/oci/data_science/models/update_pipeline_details.py @@ -32,6 +32,10 @@ def __init__(self, **kwargs): The value to assign to the configuration_details property of this UpdatePipelineDetails. :type configuration_details: oci.data_science.models.PipelineConfigurationDetails + :param infrastructure_configuration_details: + The value to assign to the infrastructure_configuration_details property of this UpdatePipelineDetails. + :type infrastructure_configuration_details: oci.data_science.models.PipelineInfrastructureConfigurationDetails + :param log_configuration_details: The value to assign to the log_configuration_details property of this UpdatePipelineDetails. :type log_configuration_details: oci.data_science.models.PipelineLogConfigurationDetails @@ -53,6 +57,7 @@ def __init__(self, **kwargs): 'display_name': 'str', 'description': 'str', 'configuration_details': 'PipelineConfigurationDetails', + 'infrastructure_configuration_details': 'PipelineInfrastructureConfigurationDetails', 'log_configuration_details': 'PipelineLogConfigurationDetails', 'step_details': 'list[PipelineStepUpdateDetails]', 'freeform_tags': 'dict(str, str)', @@ -63,6 +68,7 @@ def __init__(self, **kwargs): 'display_name': 'displayName', 'description': 'description', 'configuration_details': 'configurationDetails', + 'infrastructure_configuration_details': 'infrastructureConfigurationDetails', 'log_configuration_details': 'logConfigurationDetails', 'step_details': 'stepDetails', 'freeform_tags': 'freeformTags', @@ -72,6 +78,7 @@ def __init__(self, **kwargs): self._display_name = None self._description = None self._configuration_details = None + self._infrastructure_configuration_details = None self._log_configuration_details = None self._step_details = None self._freeform_tags = None @@ -145,6 +152,26 @@ def configuration_details(self, configuration_details): """ self._configuration_details = configuration_details + @property + def infrastructure_configuration_details(self): + """ + Gets the infrastructure_configuration_details of this UpdatePipelineDetails. + + :return: The infrastructure_configuration_details of this UpdatePipelineDetails. + :rtype: oci.data_science.models.PipelineInfrastructureConfigurationDetails + """ + return self._infrastructure_configuration_details + + @infrastructure_configuration_details.setter + def infrastructure_configuration_details(self, infrastructure_configuration_details): + """ + Sets the infrastructure_configuration_details of this UpdatePipelineDetails. + + :param infrastructure_configuration_details: The infrastructure_configuration_details of this UpdatePipelineDetails. + :type: oci.data_science.models.PipelineInfrastructureConfigurationDetails + """ + self._infrastructure_configuration_details = infrastructure_configuration_details + @property def log_configuration_details(self): """ @@ -169,7 +196,7 @@ def log_configuration_details(self, log_configuration_details): def step_details(self): """ Gets the step_details of this UpdatePipelineDetails. - Array of update details for each step. Only step configurations are allowed to be updated. + Array of update details for each step. Only step configurations and step infrastructure configurations are allowed to be updated. :return: The step_details of this UpdatePipelineDetails. @@ -181,7 +208,7 @@ def step_details(self): def step_details(self, step_details): """ Sets the step_details of this UpdatePipelineDetails. - Array of update details for each step. Only step configurations are allowed to be updated. + Array of update details for each step. Only step configurations and step infrastructure configurations are allowed to be updated. :param step_details: The step_details of this UpdatePipelineDetails. diff --git a/src/oci/resource_scheduler/__init__.py b/src/oci/resource_scheduler/__init__.py new file mode 100644 index 000000000..3fdf79cef --- /dev/null +++ b/src/oci/resource_scheduler/__init__.py @@ -0,0 +1,14 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20240430 + +from __future__ import absolute_import + + +from .schedule_client import ScheduleClient +from .schedule_client_composite_operations import ScheduleClientCompositeOperations +from . import models + +__all__ = ["ScheduleClient", "ScheduleClientCompositeOperations", "models"] diff --git a/src/oci/resource_scheduler/models/__init__.py b/src/oci/resource_scheduler/models/__init__.py new file mode 100644 index 000000000..442781d5b --- /dev/null +++ b/src/oci/resource_scheduler/models/__init__.py @@ -0,0 +1,58 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20240430 + +from __future__ import absolute_import + +from .compartment_id_resource_filter import CompartmentIdResourceFilter +from .create_schedule_details import CreateScheduleDetails +from .defined_tag_filter_value import DefinedTagFilterValue +from .defined_tags_resource_filter import DefinedTagsResourceFilter +from .lifecycle_state_resource_filter import LifecycleStateResourceFilter +from .resource import Resource +from .resource_filter import ResourceFilter +from .resource_type import ResourceType +from .resource_type_collection import ResourceTypeCollection +from .resource_type_resource_filter import ResourceTypeResourceFilter +from .schedule import Schedule +from .schedule_collection import ScheduleCollection +from .schedule_summary import ScheduleSummary +from .time_created_resource_filter import TimeCreatedResourceFilter +from .update_schedule_details import UpdateScheduleDetails +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 resource_scheduler services. +resource_scheduler_type_mapping = { + "CompartmentIdResourceFilter": CompartmentIdResourceFilter, + "CreateScheduleDetails": CreateScheduleDetails, + "DefinedTagFilterValue": DefinedTagFilterValue, + "DefinedTagsResourceFilter": DefinedTagsResourceFilter, + "LifecycleStateResourceFilter": LifecycleStateResourceFilter, + "Resource": Resource, + "ResourceFilter": ResourceFilter, + "ResourceType": ResourceType, + "ResourceTypeCollection": ResourceTypeCollection, + "ResourceTypeResourceFilter": ResourceTypeResourceFilter, + "Schedule": Schedule, + "ScheduleCollection": ScheduleCollection, + "ScheduleSummary": ScheduleSummary, + "TimeCreatedResourceFilter": TimeCreatedResourceFilter, + "UpdateScheduleDetails": UpdateScheduleDetails, + "WorkRequest": WorkRequest, + "WorkRequestError": WorkRequestError, + "WorkRequestErrorCollection": WorkRequestErrorCollection, + "WorkRequestLogEntry": WorkRequestLogEntry, + "WorkRequestLogEntryCollection": WorkRequestLogEntryCollection, + "WorkRequestResource": WorkRequestResource, + "WorkRequestSummary": WorkRequestSummary, + "WorkRequestSummaryCollection": WorkRequestSummaryCollection +} diff --git a/src/oci/resource_scheduler/models/compartment_id_resource_filter.py b/src/oci/resource_scheduler/models/compartment_id_resource_filter.py new file mode 100644 index 000000000..02d7c7164 --- /dev/null +++ b/src/oci/resource_scheduler/models/compartment_id_resource_filter.py @@ -0,0 +1,113 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20240430 + +from .resource_filter import ResourceFilter +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 CompartmentIdResourceFilter(ResourceFilter): + """ + This is a resource filter for filtering resource based on compartment OCID. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CompartmentIdResourceFilter object with values from keyword arguments. The default value of the :py:attr:`~oci.resource_scheduler.models.CompartmentIdResourceFilter.attribute` attribute + of this class is ``COMPARTMENT_ID`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param attribute: + The value to assign to the attribute property of this CompartmentIdResourceFilter. + Allowed values for this property are: "COMPARTMENT_ID", "RESOURCE_TYPE", "DEFINED_TAGS", "TIME_CREATED", "LIFECYCLE_STATE" + :type attribute: str + + :param value: + The value to assign to the value property of this CompartmentIdResourceFilter. + :type value: str + + :param should_include_child_compartments: + The value to assign to the should_include_child_compartments property of this CompartmentIdResourceFilter. + :type should_include_child_compartments: bool + + """ + self.swagger_types = { + 'attribute': 'str', + 'value': 'str', + 'should_include_child_compartments': 'bool' + } + + self.attribute_map = { + 'attribute': 'attribute', + 'value': 'value', + 'should_include_child_compartments': 'shouldIncludeChildCompartments' + } + + self._attribute = None + self._value = None + self._should_include_child_compartments = None + self._attribute = 'COMPARTMENT_ID' + + @property + def value(self): + """ + Gets the value of this CompartmentIdResourceFilter. + This is the compartment used for filtering. + + + :return: The value of this CompartmentIdResourceFilter. + :rtype: str + """ + return self._value + + @value.setter + def value(self, value): + """ + Sets the value of this CompartmentIdResourceFilter. + This is the compartment used for filtering. + + + :param value: The value of this CompartmentIdResourceFilter. + :type: str + """ + self._value = value + + @property + def should_include_child_compartments(self): + """ + Gets the should_include_child_compartments of this CompartmentIdResourceFilter. + This sets whether to include child compartments. + + + :return: The should_include_child_compartments of this CompartmentIdResourceFilter. + :rtype: bool + """ + return self._should_include_child_compartments + + @should_include_child_compartments.setter + def should_include_child_compartments(self, should_include_child_compartments): + """ + Sets the should_include_child_compartments of this CompartmentIdResourceFilter. + This sets whether to include child compartments. + + + :param should_include_child_compartments: The should_include_child_compartments of this CompartmentIdResourceFilter. + :type: bool + """ + self._should_include_child_compartments = should_include_child_compartments + + 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/resource_scheduler/models/create_schedule_details.py b/src/oci/resource_scheduler/models/create_schedule_details.py new file mode 100644 index 000000000..221839b35 --- /dev/null +++ b/src/oci/resource_scheduler/models/create_schedule_details.py @@ -0,0 +1,487 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20240430 + + +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 CreateScheduleDetails(object): + """ + This is the data to create a schedule. + """ + + #: A constant which can be used with the action property of a CreateScheduleDetails. + #: This constant has a value of "START_RESOURCE" + ACTION_START_RESOURCE = "START_RESOURCE" + + #: A constant which can be used with the action property of a CreateScheduleDetails. + #: This constant has a value of "STOP_RESOURCE" + ACTION_STOP_RESOURCE = "STOP_RESOURCE" + + #: A constant which can be used with the recurrence_type property of a CreateScheduleDetails. + #: This constant has a value of "CRON" + RECURRENCE_TYPE_CRON = "CRON" + + #: A constant which can be used with the recurrence_type property of a CreateScheduleDetails. + #: This constant has a value of "ICAL" + RECURRENCE_TYPE_ICAL = "ICAL" + + def __init__(self, **kwargs): + """ + Initializes a new CreateScheduleDetails 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 CreateScheduleDetails. + :type compartment_id: str + + :param display_name: + The value to assign to the display_name property of this CreateScheduleDetails. + :type display_name: str + + :param description: + The value to assign to the description property of this CreateScheduleDetails. + :type description: str + + :param action: + The value to assign to the action property of this CreateScheduleDetails. + Allowed values for this property are: "START_RESOURCE", "STOP_RESOURCE" + :type action: str + + :param recurrence_details: + The value to assign to the recurrence_details property of this CreateScheduleDetails. + :type recurrence_details: str + + :param recurrence_type: + The value to assign to the recurrence_type property of this CreateScheduleDetails. + Allowed values for this property are: "CRON", "ICAL" + :type recurrence_type: str + + :param resource_filters: + The value to assign to the resource_filters property of this CreateScheduleDetails. + :type resource_filters: list[oci.resource_scheduler.models.ResourceFilter] + + :param resources: + The value to assign to the resources property of this CreateScheduleDetails. + :type resources: list[oci.resource_scheduler.models.Resource] + + :param time_starts: + The value to assign to the time_starts property of this CreateScheduleDetails. + :type time_starts: datetime + + :param time_ends: + The value to assign to the time_ends property of this CreateScheduleDetails. + :type time_ends: datetime + + :param freeform_tags: + The value to assign to the freeform_tags property of this CreateScheduleDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this CreateScheduleDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'compartment_id': 'str', + 'display_name': 'str', + 'description': 'str', + 'action': 'str', + 'recurrence_details': 'str', + 'recurrence_type': 'str', + 'resource_filters': 'list[ResourceFilter]', + 'resources': 'list[Resource]', + 'time_starts': 'datetime', + 'time_ends': 'datetime', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'compartment_id': 'compartmentId', + 'display_name': 'displayName', + 'description': 'description', + 'action': 'action', + 'recurrence_details': 'recurrenceDetails', + 'recurrence_type': 'recurrenceType', + 'resource_filters': 'resourceFilters', + 'resources': 'resources', + 'time_starts': 'timeStarts', + 'time_ends': 'timeEnds', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._compartment_id = None + self._display_name = None + self._description = None + self._action = None + self._recurrence_details = None + self._recurrence_type = None + self._resource_filters = None + self._resources = None + self._time_starts = None + self._time_ends = None + self._freeform_tags = None + self._defined_tags = None + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this CreateScheduleDetails. + The `OCID`__ of the compartment in which the schedule is created + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The compartment_id of this CreateScheduleDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this CreateScheduleDetails. + The `OCID`__ of the compartment in which the schedule is created + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param compartment_id: The compartment_id of this CreateScheduleDetails. + :type: str + """ + self._compartment_id = compartment_id + + @property + def display_name(self): + """ + Gets the display_name of this CreateScheduleDetails. + This is a user-friendly name for the schedule. It does not have to be unique, and it's changeable. + + + :return: The display_name of this CreateScheduleDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this CreateScheduleDetails. + This is a user-friendly name for the schedule. It does not have to be unique, and it's changeable. + + + :param display_name: The display_name of this CreateScheduleDetails. + :type: str + """ + self._display_name = display_name + + @property + def description(self): + """ + Gets the description of this CreateScheduleDetails. + This is the description of the schedule. + + + :return: The description of this CreateScheduleDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this CreateScheduleDetails. + This is the description of the schedule. + + + :param description: The description of this CreateScheduleDetails. + :type: str + """ + self._description = description + + @property + def action(self): + """ + **[Required]** Gets the action of this CreateScheduleDetails. + This is the action that will be executed by the schedule. + + Allowed values for this property are: "START_RESOURCE", "STOP_RESOURCE" + + + :return: The action of this CreateScheduleDetails. + :rtype: str + """ + return self._action + + @action.setter + def action(self, action): + """ + Sets the action of this CreateScheduleDetails. + This is the action that will be executed by the schedule. + + + :param action: The action of this CreateScheduleDetails. + :type: str + """ + allowed_values = ["START_RESOURCE", "STOP_RESOURCE"] + if not value_allowed_none_or_none_sentinel(action, allowed_values): + raise ValueError( + f"Invalid value for `action`, must be None or one of {allowed_values}" + ) + self._action = action + + @property + def recurrence_details(self): + """ + **[Required]** Gets the recurrence_details of this CreateScheduleDetails. + This is the frequency of recurrence of a schedule. The frequency field can either conform to RFC-5545 formatting + or UNIX cron formatting for recurrences, based on the value specified by the recurrenceType field. + + + :return: The recurrence_details of this CreateScheduleDetails. + :rtype: str + """ + return self._recurrence_details + + @recurrence_details.setter + def recurrence_details(self, recurrence_details): + """ + Sets the recurrence_details of this CreateScheduleDetails. + This is the frequency of recurrence of a schedule. The frequency field can either conform to RFC-5545 formatting + or UNIX cron formatting for recurrences, based on the value specified by the recurrenceType field. + + + :param recurrence_details: The recurrence_details of this CreateScheduleDetails. + :type: str + """ + self._recurrence_details = recurrence_details + + @property + def recurrence_type(self): + """ + **[Required]** Gets the recurrence_type of this CreateScheduleDetails. + Type of recurrence of a schedule + + Allowed values for this property are: "CRON", "ICAL" + + + :return: The recurrence_type of this CreateScheduleDetails. + :rtype: str + """ + return self._recurrence_type + + @recurrence_type.setter + def recurrence_type(self, recurrence_type): + """ + Sets the recurrence_type of this CreateScheduleDetails. + Type of recurrence of a schedule + + + :param recurrence_type: The recurrence_type of this CreateScheduleDetails. + :type: str + """ + allowed_values = ["CRON", "ICAL"] + if not value_allowed_none_or_none_sentinel(recurrence_type, allowed_values): + raise ValueError( + f"Invalid value for `recurrence_type`, must be None or one of {allowed_values}" + ) + self._recurrence_type = recurrence_type + + @property + def resource_filters(self): + """ + Gets the resource_filters of this CreateScheduleDetails. + This is a list of resources filters. The schedule will be applied to resources matching all of them. + + + :return: The resource_filters of this CreateScheduleDetails. + :rtype: list[oci.resource_scheduler.models.ResourceFilter] + """ + return self._resource_filters + + @resource_filters.setter + def resource_filters(self, resource_filters): + """ + Sets the resource_filters of this CreateScheduleDetails. + This is a list of resources filters. The schedule will be applied to resources matching all of them. + + + :param resource_filters: The resource_filters of this CreateScheduleDetails. + :type: list[oci.resource_scheduler.models.ResourceFilter] + """ + self._resource_filters = resource_filters + + @property + def resources(self): + """ + Gets the resources of this CreateScheduleDetails. + This is the list of resources to which the scheduled operation is applied. + + + :return: The resources of this CreateScheduleDetails. + :rtype: list[oci.resource_scheduler.models.Resource] + """ + return self._resources + + @resources.setter + def resources(self, resources): + """ + Sets the resources of this CreateScheduleDetails. + This is the list of resources to which the scheduled operation is applied. + + + :param resources: The resources of this CreateScheduleDetails. + :type: list[oci.resource_scheduler.models.Resource] + """ + self._resources = resources + + @property + def time_starts(self): + """ + Gets the time_starts of this CreateScheduleDetails. + This is the date and time the schedule starts, in the format defined by `RFC 3339`__ + + Example: `2016-08-25T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_starts of this CreateScheduleDetails. + :rtype: datetime + """ + return self._time_starts + + @time_starts.setter + def time_starts(self, time_starts): + """ + Sets the time_starts of this CreateScheduleDetails. + This is the date and time the schedule starts, in the format defined by `RFC 3339`__ + + Example: `2016-08-25T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_starts: The time_starts of this CreateScheduleDetails. + :type: datetime + """ + self._time_starts = time_starts + + @property + def time_ends(self): + """ + Gets the time_ends of this CreateScheduleDetails. + This is the date and time the schedule ends, in the format defined by `RFC 3339`__ + + Example: `2016-08-25T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_ends of this CreateScheduleDetails. + :rtype: datetime + """ + return self._time_ends + + @time_ends.setter + def time_ends(self, time_ends): + """ + Sets the time_ends of this CreateScheduleDetails. + This is the date and time the schedule ends, in the format defined by `RFC 3339`__ + + Example: `2016-08-25T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_ends: The time_ends of this CreateScheduleDetails. + :type: datetime + """ + self._time_ends = time_ends + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this CreateScheduleDetails. + These are free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + For more information, see `Resource Tags`__. + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this CreateScheduleDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this CreateScheduleDetails. + These are free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + For more information, see `Resource Tags`__. + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this CreateScheduleDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this CreateScheduleDetails. + These are defined tags for this resource. Each key is predefined and scoped to a namespace. + For more information, see `Resource Tags`__. + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this CreateScheduleDetails. + :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 CreateScheduleDetails. + These are defined tags for this resource. Each key is predefined and scoped to a namespace. + For more information, see `Resource Tags`__. + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this CreateScheduleDetails. + :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/resource_scheduler/models/defined_tag_filter_value.py b/src/oci/resource_scheduler/models/defined_tag_filter_value.py new file mode 100644 index 000000000..5bb5db512 --- /dev/null +++ b/src/oci/resource_scheduler/models/defined_tag_filter_value.py @@ -0,0 +1,134 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20240430 + + +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 DefinedTagFilterValue(object): + """ + This is a defined tag filter value. + """ + + def __init__(self, **kwargs): + """ + Initializes a new DefinedTagFilterValue object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param namespace: + The value to assign to the namespace property of this DefinedTagFilterValue. + :type namespace: str + + :param tag_key: + The value to assign to the tag_key property of this DefinedTagFilterValue. + :type tag_key: str + + :param value: + The value to assign to the value property of this DefinedTagFilterValue. + :type value: str + + """ + self.swagger_types = { + 'namespace': 'str', + 'tag_key': 'str', + 'value': 'str' + } + + self.attribute_map = { + 'namespace': 'namespace', + 'tag_key': 'tagKey', + 'value': 'value' + } + + self._namespace = None + self._tag_key = None + self._value = None + + @property + def namespace(self): + """ + Gets the namespace of this DefinedTagFilterValue. + This is the namespace of the defined tag. + + + :return: The namespace of this DefinedTagFilterValue. + :rtype: str + """ + return self._namespace + + @namespace.setter + def namespace(self, namespace): + """ + Sets the namespace of this DefinedTagFilterValue. + This is the namespace of the defined tag. + + + :param namespace: The namespace of this DefinedTagFilterValue. + :type: str + """ + self._namespace = namespace + + @property + def tag_key(self): + """ + Gets the tag_key of this DefinedTagFilterValue. + This is the key of the defined tag. + + + :return: The tag_key of this DefinedTagFilterValue. + :rtype: str + """ + return self._tag_key + + @tag_key.setter + def tag_key(self, tag_key): + """ + Sets the tag_key of this DefinedTagFilterValue. + This is the key of the defined tag. + + + :param tag_key: The tag_key of this DefinedTagFilterValue. + :type: str + """ + self._tag_key = tag_key + + @property + def value(self): + """ + Gets the value of this DefinedTagFilterValue. + This is the value of the defined tag. + + + :return: The value of this DefinedTagFilterValue. + :rtype: str + """ + return self._value + + @value.setter + def value(self, value): + """ + Sets the value of this DefinedTagFilterValue. + This is the value of the defined tag. + + + :param value: The value of this DefinedTagFilterValue. + :type: str + """ + self._value = value + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/resource_scheduler/models/defined_tags_resource_filter.py b/src/oci/resource_scheduler/models/defined_tags_resource_filter.py new file mode 100644 index 000000000..3645229d7 --- /dev/null +++ b/src/oci/resource_scheduler/models/defined_tags_resource_filter.py @@ -0,0 +1,82 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20240430 + +from .resource_filter import ResourceFilter +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 DefinedTagsResourceFilter(ResourceFilter): + """ + This is a resource filter for filtering resource based on a defined tag. + """ + + def __init__(self, **kwargs): + """ + Initializes a new DefinedTagsResourceFilter object with values from keyword arguments. The default value of the :py:attr:`~oci.resource_scheduler.models.DefinedTagsResourceFilter.attribute` attribute + of this class is ``DEFINED_TAGS`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param attribute: + The value to assign to the attribute property of this DefinedTagsResourceFilter. + Allowed values for this property are: "COMPARTMENT_ID", "RESOURCE_TYPE", "DEFINED_TAGS", "TIME_CREATED", "LIFECYCLE_STATE" + :type attribute: str + + :param value: + The value to assign to the value property of this DefinedTagsResourceFilter. + :type value: list[oci.resource_scheduler.models.DefinedTagFilterValue] + + """ + self.swagger_types = { + 'attribute': 'str', + 'value': 'list[DefinedTagFilterValue]' + } + + self.attribute_map = { + 'attribute': 'attribute', + 'value': 'value' + } + + self._attribute = None + self._value = None + self._attribute = 'DEFINED_TAGS' + + @property + def value(self): + """ + Gets the value of this DefinedTagsResourceFilter. + This is a defined tag filter value. + + + :return: The value of this DefinedTagsResourceFilter. + :rtype: list[oci.resource_scheduler.models.DefinedTagFilterValue] + """ + return self._value + + @value.setter + def value(self, value): + """ + Sets the value of this DefinedTagsResourceFilter. + This is a defined tag filter value. + + + :param value: The value of this DefinedTagsResourceFilter. + :type: list[oci.resource_scheduler.models.DefinedTagFilterValue] + """ + self._value = value + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/resource_scheduler/models/lifecycle_state_resource_filter.py b/src/oci/resource_scheduler/models/lifecycle_state_resource_filter.py new file mode 100644 index 000000000..1f82c43de --- /dev/null +++ b/src/oci/resource_scheduler/models/lifecycle_state_resource_filter.py @@ -0,0 +1,82 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20240430 + +from .resource_filter import ResourceFilter +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 LifecycleStateResourceFilter(ResourceFilter): + """ + This is a resource filter for filtering resources based on their lifecycle state. + """ + + def __init__(self, **kwargs): + """ + Initializes a new LifecycleStateResourceFilter object with values from keyword arguments. The default value of the :py:attr:`~oci.resource_scheduler.models.LifecycleStateResourceFilter.attribute` attribute + of this class is ``LIFECYCLE_STATE`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param attribute: + The value to assign to the attribute property of this LifecycleStateResourceFilter. + Allowed values for this property are: "COMPARTMENT_ID", "RESOURCE_TYPE", "DEFINED_TAGS", "TIME_CREATED", "LIFECYCLE_STATE" + :type attribute: str + + :param value: + The value to assign to the value property of this LifecycleStateResourceFilter. + :type value: list[str] + + """ + self.swagger_types = { + 'attribute': 'str', + 'value': 'list[str]' + } + + self.attribute_map = { + 'attribute': 'attribute', + 'value': 'value' + } + + self._attribute = None + self._value = None + self._attribute = 'LIFECYCLE_STATE' + + @property + def value(self): + """ + Gets the value of this LifecycleStateResourceFilter. + This is a collection of resource lifecycle state values. + + + :return: The value of this LifecycleStateResourceFilter. + :rtype: list[str] + """ + return self._value + + @value.setter + def value(self, value): + """ + Sets the value of this LifecycleStateResourceFilter. + This is a collection of resource lifecycle state values. + + + :param value: The value of this LifecycleStateResourceFilter. + :type: list[str] + """ + self._value = value + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/resource_scheduler/models/resource.py b/src/oci/resource_scheduler/models/resource.py new file mode 100644 index 000000000..1db361470 --- /dev/null +++ b/src/oci/resource_scheduler/models/resource.py @@ -0,0 +1,121 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20240430 + + +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 Resource(object): + """ + This is the schedule resource entity. + """ + + def __init__(self, **kwargs): + """ + Initializes a new Resource 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 Resource. + :type id: str + + :param metadata: + The value to assign to the metadata property of this Resource. + :type metadata: dict(str, str) + + """ + self.swagger_types = { + 'id': 'str', + 'metadata': 'dict(str, str)' + } + + self.attribute_map = { + 'id': 'id', + 'metadata': 'metadata' + } + + self._id = None + self._metadata = None + + @property + def id(self): + """ + **[Required]** Gets the id of this Resource. + This is the resource OCID. + + + :return: The id of this Resource. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this Resource. + This is the resource OCID. + + + :param id: The id of this Resource. + :type: str + """ + self._id = id + + @property + def metadata(self): + """ + Gets the metadata of this Resource. + This is additional information that helps to identity the resource for the schedule. + + { + \"id\": \"\" + \"metadata\": + { + \"namespaceName\": \"sampleNamespace\", + \"bucketName\": \"sampleBucket\" + } + } + + + :return: The metadata of this Resource. + :rtype: dict(str, str) + """ + return self._metadata + + @metadata.setter + def metadata(self, metadata): + """ + Sets the metadata of this Resource. + This is additional information that helps to identity the resource for the schedule. + + { + \"id\": \"\" + \"metadata\": + { + \"namespaceName\": \"sampleNamespace\", + \"bucketName\": \"sampleBucket\" + } + } + + + :param metadata: The metadata of this Resource. + :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/resource_scheduler/models/resource_filter.py b/src/oci/resource_scheduler/models/resource_filter.py new file mode 100644 index 000000000..7beabea1a --- /dev/null +++ b/src/oci/resource_scheduler/models/resource_filter.py @@ -0,0 +1,133 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20240430 + + +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 ResourceFilter(object): + """ + This is a generic filter used to decide which resources that the schedule be applied to. + """ + + #: A constant which can be used with the attribute property of a ResourceFilter. + #: This constant has a value of "COMPARTMENT_ID" + ATTRIBUTE_COMPARTMENT_ID = "COMPARTMENT_ID" + + #: A constant which can be used with the attribute property of a ResourceFilter. + #: This constant has a value of "RESOURCE_TYPE" + ATTRIBUTE_RESOURCE_TYPE = "RESOURCE_TYPE" + + #: A constant which can be used with the attribute property of a ResourceFilter. + #: This constant has a value of "DEFINED_TAGS" + ATTRIBUTE_DEFINED_TAGS = "DEFINED_TAGS" + + #: A constant which can be used with the attribute property of a ResourceFilter. + #: This constant has a value of "TIME_CREATED" + ATTRIBUTE_TIME_CREATED = "TIME_CREATED" + + #: A constant which can be used with the attribute property of a ResourceFilter. + #: This constant has a value of "LIFECYCLE_STATE" + ATTRIBUTE_LIFECYCLE_STATE = "LIFECYCLE_STATE" + + def __init__(self, **kwargs): + """ + Initializes a new ResourceFilter 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.resource_scheduler.models.TimeCreatedResourceFilter` + * :class:`~oci.resource_scheduler.models.ResourceTypeResourceFilter` + * :class:`~oci.resource_scheduler.models.LifecycleStateResourceFilter` + * :class:`~oci.resource_scheduler.models.CompartmentIdResourceFilter` + * :class:`~oci.resource_scheduler.models.DefinedTagsResourceFilter` + + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param attribute: + The value to assign to the attribute property of this ResourceFilter. + Allowed values for this property are: "COMPARTMENT_ID", "RESOURCE_TYPE", "DEFINED_TAGS", "TIME_CREATED", "LIFECYCLE_STATE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type attribute: str + + """ + self.swagger_types = { + 'attribute': 'str' + } + + self.attribute_map = { + 'attribute': 'attribute' + } + + self._attribute = 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['attribute'] + + if type == 'TIME_CREATED': + return 'TimeCreatedResourceFilter' + + if type == 'RESOURCE_TYPE': + return 'ResourceTypeResourceFilter' + + if type == 'LIFECYCLE_STATE': + return 'LifecycleStateResourceFilter' + + if type == 'COMPARTMENT_ID': + return 'CompartmentIdResourceFilter' + + if type == 'DEFINED_TAGS': + return 'DefinedTagsResourceFilter' + else: + return 'ResourceFilter' + + @property + def attribute(self): + """ + **[Required]** Gets the attribute of this ResourceFilter. + This is the resource attribute on which the threshold is defined. + + Allowed values for this property are: "COMPARTMENT_ID", "RESOURCE_TYPE", "DEFINED_TAGS", "TIME_CREATED", "LIFECYCLE_STATE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The attribute of this ResourceFilter. + :rtype: str + """ + return self._attribute + + @attribute.setter + def attribute(self, attribute): + """ + Sets the attribute of this ResourceFilter. + This is the resource attribute on which the threshold is defined. + + + :param attribute: The attribute of this ResourceFilter. + :type: str + """ + allowed_values = ["COMPARTMENT_ID", "RESOURCE_TYPE", "DEFINED_TAGS", "TIME_CREATED", "LIFECYCLE_STATE"] + if not value_allowed_none_or_none_sentinel(attribute, allowed_values): + attribute = 'UNKNOWN_ENUM_VALUE' + self._attribute = attribute + + 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/resource_scheduler/models/resource_type.py b/src/oci/resource_scheduler/models/resource_type.py new file mode 100644 index 000000000..f0dd60be1 --- /dev/null +++ b/src/oci/resource_scheduler/models/resource_type.py @@ -0,0 +1,72 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20240430 + + +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 ResourceType(object): + """ + This is a resource type supported by resource scheduler. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ResourceType 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 ResourceType. + :type name: str + + """ + self.swagger_types = { + 'name': 'str' + } + + self.attribute_map = { + 'name': 'name' + } + + self._name = None + + @property + def name(self): + """ + **[Required]** Gets the name of this ResourceType. + This is a resource type supported by resource scheduler. + + + :return: The name of this ResourceType. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this ResourceType. + This is a resource type supported by resource scheduler. + + + :param name: The name of this ResourceType. + :type: str + """ + self._name = name + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/resource_scheduler/models/resource_type_collection.py b/src/oci/resource_scheduler/models/resource_type_collection.py new file mode 100644 index 000000000..4f15a05a7 --- /dev/null +++ b/src/oci/resource_scheduler/models/resource_type_collection.py @@ -0,0 +1,72 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20240430 + + +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 ResourceTypeCollection(object): + """ + This is the collection of resource types supported by resource scheduler. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ResourceTypeCollection 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 ResourceTypeCollection. + :type items: list[oci.resource_scheduler.models.ResourceType] + + """ + self.swagger_types = { + 'items': 'list[ResourceType]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this ResourceTypeCollection. + This is the collection of resource types supported by resource scheduler. + + + :return: The items of this ResourceTypeCollection. + :rtype: list[oci.resource_scheduler.models.ResourceType] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this ResourceTypeCollection. + This is the collection of resource types supported by resource scheduler. + + + :param items: The items of this ResourceTypeCollection. + :type: list[oci.resource_scheduler.models.ResourceType] + """ + 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/resource_scheduler/models/resource_type_resource_filter.py b/src/oci/resource_scheduler/models/resource_type_resource_filter.py new file mode 100644 index 000000000..b2668f871 --- /dev/null +++ b/src/oci/resource_scheduler/models/resource_type_resource_filter.py @@ -0,0 +1,82 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20240430 + +from .resource_filter import ResourceFilter +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 ResourceTypeResourceFilter(ResourceFilter): + """ + This is a resource filter for filtering resource based on resource type. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ResourceTypeResourceFilter object with values from keyword arguments. The default value of the :py:attr:`~oci.resource_scheduler.models.ResourceTypeResourceFilter.attribute` attribute + of this class is ``RESOURCE_TYPE`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param attribute: + The value to assign to the attribute property of this ResourceTypeResourceFilter. + Allowed values for this property are: "COMPARTMENT_ID", "RESOURCE_TYPE", "DEFINED_TAGS", "TIME_CREATED", "LIFECYCLE_STATE" + :type attribute: str + + :param value: + The value to assign to the value property of this ResourceTypeResourceFilter. + :type value: list[str] + + """ + self.swagger_types = { + 'attribute': 'str', + 'value': 'list[str]' + } + + self.attribute_map = { + 'attribute': 'attribute', + 'value': 'value' + } + + self._attribute = None + self._value = None + self._attribute = 'RESOURCE_TYPE' + + @property + def value(self): + """ + Gets the value of this ResourceTypeResourceFilter. + This is a collection of resource types. + + + :return: The value of this ResourceTypeResourceFilter. + :rtype: list[str] + """ + return self._value + + @value.setter + def value(self, value): + """ + Sets the value of this ResourceTypeResourceFilter. + This is a collection of resource types. + + + :param value: The value of this ResourceTypeResourceFilter. + :type: list[str] + """ + self._value = value + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/resource_scheduler/models/schedule.py b/src/oci/resource_scheduler/models/schedule.py new file mode 100644 index 000000000..48fc9118c --- /dev/null +++ b/src/oci/resource_scheduler/models/schedule.py @@ -0,0 +1,787 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20240430 + + +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 Schedule(object): + """ + A Schedule describes the date and time when an operation will be or has been applied to a set of resources. You must specify either + the resources directly or provide a set of resource filters to select the resources. + + To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, contact your + administrator. If you're an administrator who needs to write policies to give users access, see + `Getting Started with Policies`__. + + __ https://docs.cloud.oracle.com/iaas/Content/Identity/policiesgs/get-started-with-policies.htm + """ + + #: A constant which can be used with the action property of a Schedule. + #: This constant has a value of "START_RESOURCE" + ACTION_START_RESOURCE = "START_RESOURCE" + + #: A constant which can be used with the action property of a Schedule. + #: This constant has a value of "STOP_RESOURCE" + ACTION_STOP_RESOURCE = "STOP_RESOURCE" + + #: A constant which can be used with the recurrence_type property of a Schedule. + #: This constant has a value of "CRON" + RECURRENCE_TYPE_CRON = "CRON" + + #: A constant which can be used with the recurrence_type property of a Schedule. + #: This constant has a value of "ICAL" + RECURRENCE_TYPE_ICAL = "ICAL" + + #: A constant which can be used with the lifecycle_state property of a Schedule. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a Schedule. + #: This constant has a value of "INACTIVE" + LIFECYCLE_STATE_INACTIVE = "INACTIVE" + + #: A constant which can be used with the lifecycle_state property of a Schedule. + #: This constant has a value of "CREATING" + LIFECYCLE_STATE_CREATING = "CREATING" + + #: A constant which can be used with the lifecycle_state property of a Schedule. + #: This constant has a value of "UPDATING" + LIFECYCLE_STATE_UPDATING = "UPDATING" + + #: A constant which can be used with the lifecycle_state property of a Schedule. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + #: A constant which can be used with the lifecycle_state property of a Schedule. + #: This constant has a value of "DELETED" + LIFECYCLE_STATE_DELETED = "DELETED" + + #: A constant which can be used with the lifecycle_state property of a Schedule. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + def __init__(self, **kwargs): + """ + Initializes a new Schedule 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 Schedule. + :type id: str + + :param compartment_id: + The value to assign to the compartment_id property of this Schedule. + :type compartment_id: str + + :param display_name: + The value to assign to the display_name property of this Schedule. + :type display_name: str + + :param description: + The value to assign to the description property of this Schedule. + :type description: str + + :param action: + The value to assign to the action property of this Schedule. + Allowed values for this property are: "START_RESOURCE", "STOP_RESOURCE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type action: str + + :param recurrence_details: + The value to assign to the recurrence_details property of this Schedule. + :type recurrence_details: str + + :param recurrence_type: + The value to assign to the recurrence_type property of this Schedule. + Allowed values for this property are: "CRON", "ICAL", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type recurrence_type: str + + :param resource_filters: + The value to assign to the resource_filters property of this Schedule. + :type resource_filters: list[oci.resource_scheduler.models.ResourceFilter] + + :param resources: + The value to assign to the resources property of this Schedule. + :type resources: list[oci.resource_scheduler.models.Resource] + + :param time_starts: + The value to assign to the time_starts property of this Schedule. + :type time_starts: datetime + + :param time_ends: + The value to assign to the time_ends property of this Schedule. + :type time_ends: datetime + + :param time_created: + The value to assign to the time_created property of this Schedule. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this Schedule. + :type time_updated: datetime + + :param time_last_run: + The value to assign to the time_last_run property of this Schedule. + :type time_last_run: datetime + + :param time_next_run: + The value to assign to the time_next_run property of this Schedule. + :type time_next_run: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this Schedule. + Allowed values for this property are: "ACTIVE", "INACTIVE", "CREATING", "UPDATING", "DELETING", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this Schedule. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this Schedule. + :type defined_tags: dict(str, dict(str, object)) + + :param system_tags: + The value to assign to the system_tags property of this Schedule. + :type system_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'id': 'str', + 'compartment_id': 'str', + 'display_name': 'str', + 'description': 'str', + 'action': 'str', + 'recurrence_details': 'str', + 'recurrence_type': 'str', + 'resource_filters': 'list[ResourceFilter]', + 'resources': 'list[Resource]', + 'time_starts': 'datetime', + 'time_ends': 'datetime', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'time_last_run': 'datetime', + 'time_next_run': 'datetime', + 'lifecycle_state': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'id': 'id', + 'compartment_id': 'compartmentId', + 'display_name': 'displayName', + 'description': 'description', + 'action': 'action', + 'recurrence_details': 'recurrenceDetails', + 'recurrence_type': 'recurrenceType', + 'resource_filters': 'resourceFilters', + 'resources': 'resources', + 'time_starts': 'timeStarts', + 'time_ends': 'timeEnds', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'time_last_run': 'timeLastRun', + 'time_next_run': 'timeNextRun', + 'lifecycle_state': 'lifecycleState', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags' + } + + self._id = None + self._compartment_id = None + self._display_name = None + self._description = None + self._action = None + self._recurrence_details = None + self._recurrence_type = None + self._resource_filters = None + self._resources = None + self._time_starts = None + self._time_ends = None + self._time_created = None + self._time_updated = None + self._time_last_run = None + self._time_next_run = None + self._lifecycle_state = None + self._freeform_tags = None + self._defined_tags = None + self._system_tags = None + + @property + def id(self): + """ + **[Required]** Gets the id of this Schedule. + The `OCID`__ of the schedule + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The id of this Schedule. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this Schedule. + The `OCID`__ of the schedule + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param id: The id of this Schedule. + :type: str + """ + self._id = id + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this Schedule. + The `OCID`__ of the compartment in which the schedule is created + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The compartment_id of this Schedule. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this Schedule. + The `OCID`__ of the compartment in which the schedule is created + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param compartment_id: The compartment_id of this Schedule. + :type: str + """ + self._compartment_id = compartment_id + + @property + def display_name(self): + """ + **[Required]** Gets the display_name of this Schedule. + This is a user-friendly name for the schedule. It does not have to be unique, and it's changeable. + + + :return: The display_name of this Schedule. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this Schedule. + This is a user-friendly name for the schedule. It does not have to be unique, and it's changeable. + + + :param display_name: The display_name of this Schedule. + :type: str + """ + self._display_name = display_name + + @property + def description(self): + """ + Gets the description of this Schedule. + This is the description of the schedule. + + + :return: The description of this Schedule. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this Schedule. + This is the description of the schedule. + + + :param description: The description of this Schedule. + :type: str + """ + self._description = description + + @property + def action(self): + """ + **[Required]** Gets the action of this Schedule. + This is the action that will be executed by the schedule. + + Allowed values for this property are: "START_RESOURCE", "STOP_RESOURCE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The action of this Schedule. + :rtype: str + """ + return self._action + + @action.setter + def action(self, action): + """ + Sets the action of this Schedule. + This is the action that will be executed by the schedule. + + + :param action: The action of this Schedule. + :type: str + """ + allowed_values = ["START_RESOURCE", "STOP_RESOURCE"] + if not value_allowed_none_or_none_sentinel(action, allowed_values): + action = 'UNKNOWN_ENUM_VALUE' + self._action = action + + @property + def recurrence_details(self): + """ + **[Required]** Gets the recurrence_details of this Schedule. + This is the frequency of recurrence of a schedule. The frequency field can either conform to RFC-5545 formatting + or UNIX cron formatting for recurrences, based on the value specified by the recurrenceType field. + + + :return: The recurrence_details of this Schedule. + :rtype: str + """ + return self._recurrence_details + + @recurrence_details.setter + def recurrence_details(self, recurrence_details): + """ + Sets the recurrence_details of this Schedule. + This is the frequency of recurrence of a schedule. The frequency field can either conform to RFC-5545 formatting + or UNIX cron formatting for recurrences, based on the value specified by the recurrenceType field. + + + :param recurrence_details: The recurrence_details of this Schedule. + :type: str + """ + self._recurrence_details = recurrence_details + + @property + def recurrence_type(self): + """ + **[Required]** Gets the recurrence_type of this Schedule. + Type of recurrence of a schedule + + Allowed values for this property are: "CRON", "ICAL", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The recurrence_type of this Schedule. + :rtype: str + """ + return self._recurrence_type + + @recurrence_type.setter + def recurrence_type(self, recurrence_type): + """ + Sets the recurrence_type of this Schedule. + Type of recurrence of a schedule + + + :param recurrence_type: The recurrence_type of this Schedule. + :type: str + """ + allowed_values = ["CRON", "ICAL"] + if not value_allowed_none_or_none_sentinel(recurrence_type, allowed_values): + recurrence_type = 'UNKNOWN_ENUM_VALUE' + self._recurrence_type = recurrence_type + + @property + def resource_filters(self): + """ + Gets the resource_filters of this Schedule. + This is a list of resources filters. The schedule will be applied to resources matching all of them. + + + :return: The resource_filters of this Schedule. + :rtype: list[oci.resource_scheduler.models.ResourceFilter] + """ + return self._resource_filters + + @resource_filters.setter + def resource_filters(self, resource_filters): + """ + Sets the resource_filters of this Schedule. + This is a list of resources filters. The schedule will be applied to resources matching all of them. + + + :param resource_filters: The resource_filters of this Schedule. + :type: list[oci.resource_scheduler.models.ResourceFilter] + """ + self._resource_filters = resource_filters + + @property + def resources(self): + """ + Gets the resources of this Schedule. + This is the list of resources to which the scheduled operation is applied. + + + :return: The resources of this Schedule. + :rtype: list[oci.resource_scheduler.models.Resource] + """ + return self._resources + + @resources.setter + def resources(self, resources): + """ + Sets the resources of this Schedule. + This is the list of resources to which the scheduled operation is applied. + + + :param resources: The resources of this Schedule. + :type: list[oci.resource_scheduler.models.Resource] + """ + self._resources = resources + + @property + def time_starts(self): + """ + Gets the time_starts of this Schedule. + This is the date and time the schedule starts, in the format defined by `RFC 3339`__ + + Example: `2016-08-25T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_starts of this Schedule. + :rtype: datetime + """ + return self._time_starts + + @time_starts.setter + def time_starts(self, time_starts): + """ + Sets the time_starts of this Schedule. + This is the date and time the schedule starts, in the format defined by `RFC 3339`__ + + Example: `2016-08-25T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_starts: The time_starts of this Schedule. + :type: datetime + """ + self._time_starts = time_starts + + @property + def time_ends(self): + """ + Gets the time_ends of this Schedule. + This is the date and time the schedule ends, in the format defined by `RFC 3339`__ + + Example: `2016-08-25T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_ends of this Schedule. + :rtype: datetime + """ + return self._time_ends + + @time_ends.setter + def time_ends(self, time_ends): + """ + Sets the time_ends of this Schedule. + This is the date and time the schedule ends, in the format defined by `RFC 3339`__ + + Example: `2016-08-25T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_ends: The time_ends of this Schedule. + :type: datetime + """ + self._time_ends = time_ends + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this Schedule. + This is the date and time the schedule 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 Schedule. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this Schedule. + This is the date and time the schedule 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 Schedule. + :type: datetime + """ + self._time_created = time_created + + @property + def time_updated(self): + """ + Gets the time_updated of this Schedule. + This is the date and time the schedule 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 Schedule. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this Schedule. + This is the date and time the schedule 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 Schedule. + :type: datetime + """ + self._time_updated = time_updated + + @property + def time_last_run(self): + """ + Gets the time_last_run of this Schedule. + This is the date and time the schedule runs last time, in the format defined by `RFC 3339`__. + + Example: `2016-08-25T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_last_run of this Schedule. + :rtype: datetime + """ + return self._time_last_run + + @time_last_run.setter + def time_last_run(self, time_last_run): + """ + Sets the time_last_run of this Schedule. + This is the date and time the schedule runs last time, in the format defined by `RFC 3339`__. + + Example: `2016-08-25T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_last_run: The time_last_run of this Schedule. + :type: datetime + """ + self._time_last_run = time_last_run + + @property + def time_next_run(self): + """ + Gets the time_next_run of this Schedule. + This is the date and time the schedule run the next time, in the format defined by `RFC 3339`__. + + Example: `2016-08-25T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_next_run of this Schedule. + :rtype: datetime + """ + return self._time_next_run + + @time_next_run.setter + def time_next_run(self, time_next_run): + """ + Sets the time_next_run of this Schedule. + This is the date and time the schedule run the next time, in the format defined by `RFC 3339`__. + + Example: `2016-08-25T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_next_run: The time_next_run of this Schedule. + :type: datetime + """ + self._time_next_run = time_next_run + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this Schedule. + This is the current state of a schedule. + + Allowed values for this property are: "ACTIVE", "INACTIVE", "CREATING", "UPDATING", "DELETING", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this Schedule. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this Schedule. + This is the current state of a schedule. + + + :param lifecycle_state: The lifecycle_state of this Schedule. + :type: str + """ + allowed_values = ["ACTIVE", "INACTIVE", "CREATING", "UPDATING", "DELETING", "DELETED", "FAILED"] + if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): + lifecycle_state = 'UNKNOWN_ENUM_VALUE' + self._lifecycle_state = lifecycle_state + + @property + def freeform_tags(self): + """ + **[Required]** Gets the freeform_tags of this Schedule. + These are free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + For more information, see `Resource Tags`__. + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this Schedule. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this Schedule. + These are free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + For more information, see `Resource Tags`__. + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this Schedule. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + **[Required]** Gets the defined_tags of this Schedule. + These are defined tags for this resource. Each key is predefined and scoped to a namespace. + For more information, see `Resource Tags`__. + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this Schedule. + :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 Schedule. + These are defined tags for this resource. Each key is predefined and scoped to a namespace. + For more information, see `Resource Tags`__. + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this Schedule. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def system_tags(self): + """ + Gets the system_tags of this Schedule. + These are 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 Schedule. + :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 Schedule. + These are 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 Schedule. + :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/resource_scheduler/models/schedule_collection.py b/src/oci/resource_scheduler/models/schedule_collection.py new file mode 100644 index 000000000..1dcf47360 --- /dev/null +++ b/src/oci/resource_scheduler/models/schedule_collection.py @@ -0,0 +1,72 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20240430 + + +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 ScheduleCollection(object): + """ + This is the list of schedule items. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ScheduleCollection 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 ScheduleCollection. + :type items: list[oci.resource_scheduler.models.ScheduleSummary] + + """ + self.swagger_types = { + 'items': 'list[ScheduleSummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this ScheduleCollection. + This is the list of schedule items. + + + :return: The items of this ScheduleCollection. + :rtype: list[oci.resource_scheduler.models.ScheduleSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this ScheduleCollection. + This is the list of schedule items. + + + :param items: The items of this ScheduleCollection. + :type: list[oci.resource_scheduler.models.ScheduleSummary] + """ + 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/resource_scheduler/models/schedule_summary.py b/src/oci/resource_scheduler/models/schedule_summary.py new file mode 100644 index 000000000..38fb0f696 --- /dev/null +++ b/src/oci/resource_scheduler/models/schedule_summary.py @@ -0,0 +1,815 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20240430 + + +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 ScheduleSummary(object): + """ + This is the summary information about a schedule. + """ + + #: A constant which can be used with the action property of a ScheduleSummary. + #: This constant has a value of "START_RESOURCE" + ACTION_START_RESOURCE = "START_RESOURCE" + + #: A constant which can be used with the action property of a ScheduleSummary. + #: This constant has a value of "STOP_RESOURCE" + ACTION_STOP_RESOURCE = "STOP_RESOURCE" + + #: A constant which can be used with the recurrence_type property of a ScheduleSummary. + #: This constant has a value of "CRON" + RECURRENCE_TYPE_CRON = "CRON" + + #: A constant which can be used with the recurrence_type property of a ScheduleSummary. + #: This constant has a value of "ICAL" + RECURRENCE_TYPE_ICAL = "ICAL" + + #: A constant which can be used with the last_run_status property of a ScheduleSummary. + #: This constant has a value of "ACCEPTED" + LAST_RUN_STATUS_ACCEPTED = "ACCEPTED" + + #: A constant which can be used with the last_run_status property of a ScheduleSummary. + #: This constant has a value of "IN_PROGRESS" + LAST_RUN_STATUS_IN_PROGRESS = "IN_PROGRESS" + + #: A constant which can be used with the last_run_status property of a ScheduleSummary. + #: This constant has a value of "WAITING" + LAST_RUN_STATUS_WAITING = "WAITING" + + #: A constant which can be used with the last_run_status property of a ScheduleSummary. + #: This constant has a value of "NEEDS_ATTENTION" + LAST_RUN_STATUS_NEEDS_ATTENTION = "NEEDS_ATTENTION" + + #: A constant which can be used with the last_run_status property of a ScheduleSummary. + #: This constant has a value of "FAILED" + LAST_RUN_STATUS_FAILED = "FAILED" + + #: A constant which can be used with the last_run_status property of a ScheduleSummary. + #: This constant has a value of "SUCCEEDED" + LAST_RUN_STATUS_SUCCEEDED = "SUCCEEDED" + + #: A constant which can be used with the last_run_status property of a ScheduleSummary. + #: This constant has a value of "CANCELING" + LAST_RUN_STATUS_CANCELING = "CANCELING" + + #: A constant which can be used with the last_run_status property of a ScheduleSummary. + #: This constant has a value of "CANCELED" + LAST_RUN_STATUS_CANCELED = "CANCELED" + + def __init__(self, **kwargs): + """ + Initializes a new ScheduleSummary 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 ScheduleSummary. + :type id: str + + :param compartment_id: + The value to assign to the compartment_id property of this ScheduleSummary. + :type compartment_id: str + + :param display_name: + The value to assign to the display_name property of this ScheduleSummary. + :type display_name: str + + :param action: + The value to assign to the action property of this ScheduleSummary. + Allowed values for this property are: "START_RESOURCE", "STOP_RESOURCE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type action: str + + :param description: + The value to assign to the description property of this ScheduleSummary. + :type description: str + + :param recurrence_details: + The value to assign to the recurrence_details property of this ScheduleSummary. + :type recurrence_details: str + + :param recurrence_type: + The value to assign to the recurrence_type property of this ScheduleSummary. + Allowed values for this property are: "CRON", "ICAL", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type recurrence_type: str + + :param resource_filters: + The value to assign to the resource_filters property of this ScheduleSummary. + :type resource_filters: list[oci.resource_scheduler.models.ResourceFilter] + + :param resources: + The value to assign to the resources property of this ScheduleSummary. + :type resources: list[oci.resource_scheduler.models.Resource] + + :param time_starts: + The value to assign to the time_starts property of this ScheduleSummary. + :type time_starts: datetime + + :param time_ends: + The value to assign to the time_ends property of this ScheduleSummary. + :type time_ends: datetime + + :param time_created: + The value to assign to the time_created property of this ScheduleSummary. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this ScheduleSummary. + :type time_updated: datetime + + :param time_last_run: + The value to assign to the time_last_run property of this ScheduleSummary. + :type time_last_run: datetime + + :param time_next_run: + The value to assign to the time_next_run property of this ScheduleSummary. + :type time_next_run: datetime + + :param last_run_status: + The value to assign to the last_run_status property of this ScheduleSummary. + 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 last_run_status: str + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this ScheduleSummary. + :type lifecycle_state: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this ScheduleSummary. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this ScheduleSummary. + :type defined_tags: dict(str, dict(str, object)) + + :param system_tags: + The value to assign to the system_tags property of this ScheduleSummary. + :type system_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'id': 'str', + 'compartment_id': 'str', + 'display_name': 'str', + 'action': 'str', + 'description': 'str', + 'recurrence_details': 'str', + 'recurrence_type': 'str', + 'resource_filters': 'list[ResourceFilter]', + 'resources': 'list[Resource]', + 'time_starts': 'datetime', + 'time_ends': 'datetime', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'time_last_run': 'datetime', + 'time_next_run': 'datetime', + 'last_run_status': 'str', + 'lifecycle_state': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'id': 'id', + 'compartment_id': 'compartmentId', + 'display_name': 'displayName', + 'action': 'action', + 'description': 'description', + 'recurrence_details': 'recurrenceDetails', + 'recurrence_type': 'recurrenceType', + 'resource_filters': 'resourceFilters', + 'resources': 'resources', + 'time_starts': 'timeStarts', + 'time_ends': 'timeEnds', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'time_last_run': 'timeLastRun', + 'time_next_run': 'timeNextRun', + 'last_run_status': 'lastRunStatus', + 'lifecycle_state': 'lifecycleState', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags' + } + + self._id = None + self._compartment_id = None + self._display_name = None + self._action = None + self._description = None + self._recurrence_details = None + self._recurrence_type = None + self._resource_filters = None + self._resources = None + self._time_starts = None + self._time_ends = None + self._time_created = None + self._time_updated = None + self._time_last_run = None + self._time_next_run = None + self._last_run_status = None + self._lifecycle_state = None + self._freeform_tags = None + self._defined_tags = None + self._system_tags = None + + @property + def id(self): + """ + **[Required]** Gets the id of this ScheduleSummary. + The `OCID`__ of the schedule + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The id of this ScheduleSummary. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this ScheduleSummary. + The `OCID`__ of the schedule + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param id: The id of this ScheduleSummary. + :type: str + """ + self._id = id + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this ScheduleSummary. + The `OCID`__ of the compartment in which the schedule is created + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The compartment_id of this ScheduleSummary. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this ScheduleSummary. + The `OCID`__ of the compartment in which the schedule is created + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param compartment_id: The compartment_id of this ScheduleSummary. + :type: str + """ + self._compartment_id = compartment_id + + @property + def display_name(self): + """ + **[Required]** Gets the display_name of this ScheduleSummary. + This is a user-friendly name for the schedule. It does not have to be unique, and it's changeable. + + + :return: The display_name of this ScheduleSummary. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this ScheduleSummary. + This is a user-friendly name for the schedule. It does not have to be unique, and it's changeable. + + + :param display_name: The display_name of this ScheduleSummary. + :type: str + """ + self._display_name = display_name + + @property + def action(self): + """ + **[Required]** Gets the action of this ScheduleSummary. + This is the action that will be executed by the schedule. + + Allowed values for this property are: "START_RESOURCE", "STOP_RESOURCE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The action of this ScheduleSummary. + :rtype: str + """ + return self._action + + @action.setter + def action(self, action): + """ + Sets the action of this ScheduleSummary. + This is the action that will be executed by the schedule. + + + :param action: The action of this ScheduleSummary. + :type: str + """ + allowed_values = ["START_RESOURCE", "STOP_RESOURCE"] + if not value_allowed_none_or_none_sentinel(action, allowed_values): + action = 'UNKNOWN_ENUM_VALUE' + self._action = action + + @property + def description(self): + """ + Gets the description of this ScheduleSummary. + This is the description of the schedule. + + + :return: The description of this ScheduleSummary. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this ScheduleSummary. + This is the description of the schedule. + + + :param description: The description of this ScheduleSummary. + :type: str + """ + self._description = description + + @property + def recurrence_details(self): + """ + **[Required]** Gets the recurrence_details of this ScheduleSummary. + This is the frequency of recurrence of a schedule. The frequency field can either conform to RFC-5545 formatting + or UNIX cron formatting for recurrences, based on the value specified by the recurrenceType field. + + + :return: The recurrence_details of this ScheduleSummary. + :rtype: str + """ + return self._recurrence_details + + @recurrence_details.setter + def recurrence_details(self, recurrence_details): + """ + Sets the recurrence_details of this ScheduleSummary. + This is the frequency of recurrence of a schedule. The frequency field can either conform to RFC-5545 formatting + or UNIX cron formatting for recurrences, based on the value specified by the recurrenceType field. + + + :param recurrence_details: The recurrence_details of this ScheduleSummary. + :type: str + """ + self._recurrence_details = recurrence_details + + @property + def recurrence_type(self): + """ + **[Required]** Gets the recurrence_type of this ScheduleSummary. + Type of recurrence of a schedule + + Allowed values for this property are: "CRON", "ICAL", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The recurrence_type of this ScheduleSummary. + :rtype: str + """ + return self._recurrence_type + + @recurrence_type.setter + def recurrence_type(self, recurrence_type): + """ + Sets the recurrence_type of this ScheduleSummary. + Type of recurrence of a schedule + + + :param recurrence_type: The recurrence_type of this ScheduleSummary. + :type: str + """ + allowed_values = ["CRON", "ICAL"] + if not value_allowed_none_or_none_sentinel(recurrence_type, allowed_values): + recurrence_type = 'UNKNOWN_ENUM_VALUE' + self._recurrence_type = recurrence_type + + @property + def resource_filters(self): + """ + Gets the resource_filters of this ScheduleSummary. + This is a list of resources filters. The schedule will be applied to resources matching all of them. + + + :return: The resource_filters of this ScheduleSummary. + :rtype: list[oci.resource_scheduler.models.ResourceFilter] + """ + return self._resource_filters + + @resource_filters.setter + def resource_filters(self, resource_filters): + """ + Sets the resource_filters of this ScheduleSummary. + This is a list of resources filters. The schedule will be applied to resources matching all of them. + + + :param resource_filters: The resource_filters of this ScheduleSummary. + :type: list[oci.resource_scheduler.models.ResourceFilter] + """ + self._resource_filters = resource_filters + + @property + def resources(self): + """ + Gets the resources of this ScheduleSummary. + This is the list of resources to which the scheduled operation is applied. + + + :return: The resources of this ScheduleSummary. + :rtype: list[oci.resource_scheduler.models.Resource] + """ + return self._resources + + @resources.setter + def resources(self, resources): + """ + Sets the resources of this ScheduleSummary. + This is the list of resources to which the scheduled operation is applied. + + + :param resources: The resources of this ScheduleSummary. + :type: list[oci.resource_scheduler.models.Resource] + """ + self._resources = resources + + @property + def time_starts(self): + """ + Gets the time_starts of this ScheduleSummary. + This is the date and time the schedule starts, in the format defined by `RFC 3339`__ + + Example: `2016-08-25T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_starts of this ScheduleSummary. + :rtype: datetime + """ + return self._time_starts + + @time_starts.setter + def time_starts(self, time_starts): + """ + Sets the time_starts of this ScheduleSummary. + This is the date and time the schedule starts, in the format defined by `RFC 3339`__ + + Example: `2016-08-25T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_starts: The time_starts of this ScheduleSummary. + :type: datetime + """ + self._time_starts = time_starts + + @property + def time_ends(self): + """ + Gets the time_ends of this ScheduleSummary. + This is the date and time the schedule ends, in the format defined by `RFC 3339`__ + + Example: `2016-08-25T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_ends of this ScheduleSummary. + :rtype: datetime + """ + return self._time_ends + + @time_ends.setter + def time_ends(self, time_ends): + """ + Sets the time_ends of this ScheduleSummary. + This is the date and time the schedule ends, in the format defined by `RFC 3339`__ + + Example: `2016-08-25T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_ends: The time_ends of this ScheduleSummary. + :type: datetime + """ + self._time_ends = time_ends + + @property + def time_created(self): + """ + Gets the time_created of this ScheduleSummary. + This is the date and time the schedule 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 ScheduleSummary. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this ScheduleSummary. + This is the date and time the schedule 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 ScheduleSummary. + :type: datetime + """ + self._time_created = time_created + + @property + def time_updated(self): + """ + Gets the time_updated of this ScheduleSummary. + This is the date and time the schedule 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 ScheduleSummary. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this ScheduleSummary. + This is the date and time the schedule 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 ScheduleSummary. + :type: datetime + """ + self._time_updated = time_updated + + @property + def time_last_run(self): + """ + Gets the time_last_run of this ScheduleSummary. + This is the date and time the schedule runs last time, in the format defined by `RFC 3339`__. + + Example: `2016-08-25T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_last_run of this ScheduleSummary. + :rtype: datetime + """ + return self._time_last_run + + @time_last_run.setter + def time_last_run(self, time_last_run): + """ + Sets the time_last_run of this ScheduleSummary. + This is the date and time the schedule runs last time, in the format defined by `RFC 3339`__. + + Example: `2016-08-25T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_last_run: The time_last_run of this ScheduleSummary. + :type: datetime + """ + self._time_last_run = time_last_run + + @property + def time_next_run(self): + """ + Gets the time_next_run of this ScheduleSummary. + This is the date and time the schedule run the next time, in the format defined by `RFC 3339`__. + + Example: `2016-08-25T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_next_run of this ScheduleSummary. + :rtype: datetime + """ + return self._time_next_run + + @time_next_run.setter + def time_next_run(self, time_next_run): + """ + Sets the time_next_run of this ScheduleSummary. + This is the date and time the schedule run the next time, in the format defined by `RFC 3339`__. + + Example: `2016-08-25T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_next_run: The time_next_run of this ScheduleSummary. + :type: datetime + """ + self._time_next_run = time_next_run + + @property + def last_run_status(self): + """ + Gets the last_run_status of this ScheduleSummary. + This is the status of the last 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 last_run_status of this ScheduleSummary. + :rtype: str + """ + return self._last_run_status + + @last_run_status.setter + def last_run_status(self, last_run_status): + """ + Sets the last_run_status of this ScheduleSummary. + This is the status of the last work request. + + + :param last_run_status: The last_run_status of this ScheduleSummary. + :type: str + """ + allowed_values = ["ACCEPTED", "IN_PROGRESS", "WAITING", "NEEDS_ATTENTION", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"] + if not value_allowed_none_or_none_sentinel(last_run_status, allowed_values): + last_run_status = 'UNKNOWN_ENUM_VALUE' + self._last_run_status = last_run_status + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this ScheduleSummary. + This is the current state of the schedule. + + + :return: The lifecycle_state of this ScheduleSummary. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this ScheduleSummary. + This is the current state of the schedule. + + + :param lifecycle_state: The lifecycle_state of this ScheduleSummary. + :type: str + """ + self._lifecycle_state = lifecycle_state + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this ScheduleSummary. + These are free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + For more information, see `Resource Tags`__. + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this ScheduleSummary. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this ScheduleSummary. + These are free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + For more information, see `Resource Tags`__. + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this ScheduleSummary. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this ScheduleSummary. + These are defined tags for this resource. Each key is predefined and scoped to a namespace. + For more information, see `Resource Tags`__. + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this ScheduleSummary. + :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 ScheduleSummary. + These are defined tags for this resource. Each key is predefined and scoped to a namespace. + For more information, see `Resource Tags`__. + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this ScheduleSummary. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def system_tags(self): + """ + Gets the system_tags of this ScheduleSummary. + These are 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 ScheduleSummary. + :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 ScheduleSummary. + These are 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 ScheduleSummary. + :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/resource_scheduler/models/time_created_resource_filter.py b/src/oci/resource_scheduler/models/time_created_resource_filter.py new file mode 100644 index 000000000..3b1fe1d0e --- /dev/null +++ b/src/oci/resource_scheduler/models/time_created_resource_filter.py @@ -0,0 +1,134 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20240430 + +from .resource_filter import ResourceFilter +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 TimeCreatedResourceFilter(ResourceFilter): + """ + This is a resource filter for filtering resources based on their creation time. + """ + + #: A constant which can be used with the condition property of a TimeCreatedResourceFilter. + #: This constant has a value of "EQUAL" + CONDITION_EQUAL = "EQUAL" + + #: A constant which can be used with the condition property of a TimeCreatedResourceFilter. + #: This constant has a value of "BEFORE" + CONDITION_BEFORE = "BEFORE" + + #: A constant which can be used with the condition property of a TimeCreatedResourceFilter. + #: This constant has a value of "AFTER" + CONDITION_AFTER = "AFTER" + + def __init__(self, **kwargs): + """ + Initializes a new TimeCreatedResourceFilter object with values from keyword arguments. The default value of the :py:attr:`~oci.resource_scheduler.models.TimeCreatedResourceFilter.attribute` attribute + of this class is ``TIME_CREATED`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param attribute: + The value to assign to the attribute property of this TimeCreatedResourceFilter. + Allowed values for this property are: "COMPARTMENT_ID", "RESOURCE_TYPE", "DEFINED_TAGS", "TIME_CREATED", "LIFECYCLE_STATE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type attribute: str + + :param condition: + The value to assign to the condition property of this TimeCreatedResourceFilter. + Allowed values for this property are: "EQUAL", "BEFORE", "AFTER", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type condition: str + + :param value: + The value to assign to the value property of this TimeCreatedResourceFilter. + :type value: str + + """ + self.swagger_types = { + 'attribute': 'str', + 'condition': 'str', + 'value': 'str' + } + + self.attribute_map = { + 'attribute': 'attribute', + 'condition': 'condition', + 'value': 'value' + } + + self._attribute = None + self._condition = None + self._value = None + self._attribute = 'TIME_CREATED' + + @property + def condition(self): + """ + Gets the condition of this TimeCreatedResourceFilter. + This is the condition for the filter in comparison to its creation time. + + Allowed values for this property are: "EQUAL", "BEFORE", "AFTER", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The condition of this TimeCreatedResourceFilter. + :rtype: str + """ + return self._condition + + @condition.setter + def condition(self, condition): + """ + Sets the condition of this TimeCreatedResourceFilter. + This is the condition for the filter in comparison to its creation time. + + + :param condition: The condition of this TimeCreatedResourceFilter. + :type: str + """ + allowed_values = ["EQUAL", "BEFORE", "AFTER"] + if not value_allowed_none_or_none_sentinel(condition, allowed_values): + condition = 'UNKNOWN_ENUM_VALUE' + self._condition = condition + + @property + def value(self): + """ + Gets the value of this TimeCreatedResourceFilter. + This is the date and time as the value of the filter. + + + :return: The value of this TimeCreatedResourceFilter. + :rtype: str + """ + return self._value + + @value.setter + def value(self, value): + """ + Sets the value of this TimeCreatedResourceFilter. + This is the date and time as the value of the filter. + + + :param value: The value of this TimeCreatedResourceFilter. + :type: str + """ + self._value = value + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/resource_scheduler/models/update_schedule_details.py b/src/oci/resource_scheduler/models/update_schedule_details.py new file mode 100644 index 000000000..0ca5e0f8d --- /dev/null +++ b/src/oci/resource_scheduler/models/update_schedule_details.py @@ -0,0 +1,452 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20240430 + + +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 UpdateScheduleDetails(object): + """ + This is the data to update a schedule. + """ + + #: A constant which can be used with the action property of a UpdateScheduleDetails. + #: This constant has a value of "START_RESOURCE" + ACTION_START_RESOURCE = "START_RESOURCE" + + #: A constant which can be used with the action property of a UpdateScheduleDetails. + #: This constant has a value of "STOP_RESOURCE" + ACTION_STOP_RESOURCE = "STOP_RESOURCE" + + #: A constant which can be used with the recurrence_type property of a UpdateScheduleDetails. + #: This constant has a value of "CRON" + RECURRENCE_TYPE_CRON = "CRON" + + #: A constant which can be used with the recurrence_type property of a UpdateScheduleDetails. + #: This constant has a value of "ICAL" + RECURRENCE_TYPE_ICAL = "ICAL" + + def __init__(self, **kwargs): + """ + Initializes a new UpdateScheduleDetails 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 UpdateScheduleDetails. + :type display_name: str + + :param description: + The value to assign to the description property of this UpdateScheduleDetails. + :type description: str + + :param action: + The value to assign to the action property of this UpdateScheduleDetails. + Allowed values for this property are: "START_RESOURCE", "STOP_RESOURCE" + :type action: str + + :param recurrence_details: + The value to assign to the recurrence_details property of this UpdateScheduleDetails. + :type recurrence_details: str + + :param recurrence_type: + The value to assign to the recurrence_type property of this UpdateScheduleDetails. + Allowed values for this property are: "CRON", "ICAL" + :type recurrence_type: str + + :param resource_filters: + The value to assign to the resource_filters property of this UpdateScheduleDetails. + :type resource_filters: list[oci.resource_scheduler.models.ResourceFilter] + + :param resources: + The value to assign to the resources property of this UpdateScheduleDetails. + :type resources: list[oci.resource_scheduler.models.Resource] + + :param time_starts: + The value to assign to the time_starts property of this UpdateScheduleDetails. + :type time_starts: datetime + + :param time_ends: + The value to assign to the time_ends property of this UpdateScheduleDetails. + :type time_ends: datetime + + :param freeform_tags: + The value to assign to the freeform_tags property of this UpdateScheduleDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this UpdateScheduleDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'display_name': 'str', + 'description': 'str', + 'action': 'str', + 'recurrence_details': 'str', + 'recurrence_type': 'str', + 'resource_filters': 'list[ResourceFilter]', + 'resources': 'list[Resource]', + 'time_starts': 'datetime', + 'time_ends': 'datetime', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'display_name': 'displayName', + 'description': 'description', + 'action': 'action', + 'recurrence_details': 'recurrenceDetails', + 'recurrence_type': 'recurrenceType', + 'resource_filters': 'resourceFilters', + 'resources': 'resources', + 'time_starts': 'timeStarts', + 'time_ends': 'timeEnds', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._display_name = None + self._description = None + self._action = None + self._recurrence_details = None + self._recurrence_type = None + self._resource_filters = None + self._resources = None + self._time_starts = None + self._time_ends = None + self._freeform_tags = None + self._defined_tags = None + + @property + def display_name(self): + """ + Gets the display_name of this UpdateScheduleDetails. + This is a user-friendly name for the schedule. It does not have to be unique, and it's changeable. + + + :return: The display_name of this UpdateScheduleDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this UpdateScheduleDetails. + This is a user-friendly name for the schedule. It does not have to be unique, and it's changeable. + + + :param display_name: The display_name of this UpdateScheduleDetails. + :type: str + """ + self._display_name = display_name + + @property + def description(self): + """ + Gets the description of this UpdateScheduleDetails. + This is the description of the schedule. + + + :return: The description of this UpdateScheduleDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this UpdateScheduleDetails. + This is the description of the schedule. + + + :param description: The description of this UpdateScheduleDetails. + :type: str + """ + self._description = description + + @property + def action(self): + """ + Gets the action of this UpdateScheduleDetails. + This is the action that will be executed by the schedule. + + Allowed values for this property are: "START_RESOURCE", "STOP_RESOURCE" + + + :return: The action of this UpdateScheduleDetails. + :rtype: str + """ + return self._action + + @action.setter + def action(self, action): + """ + Sets the action of this UpdateScheduleDetails. + This is the action that will be executed by the schedule. + + + :param action: The action of this UpdateScheduleDetails. + :type: str + """ + allowed_values = ["START_RESOURCE", "STOP_RESOURCE"] + if not value_allowed_none_or_none_sentinel(action, allowed_values): + raise ValueError( + f"Invalid value for `action`, must be None or one of {allowed_values}" + ) + self._action = action + + @property + def recurrence_details(self): + """ + Gets the recurrence_details of this UpdateScheduleDetails. + This is the frequency of recurrence of a schedule. The frequency field can either conform to RFC-5545 formatting + or UNIX cron formatting for recurrences, based on the value specified by the recurrenceType field. + + + :return: The recurrence_details of this UpdateScheduleDetails. + :rtype: str + """ + return self._recurrence_details + + @recurrence_details.setter + def recurrence_details(self, recurrence_details): + """ + Sets the recurrence_details of this UpdateScheduleDetails. + This is the frequency of recurrence of a schedule. The frequency field can either conform to RFC-5545 formatting + or UNIX cron formatting for recurrences, based on the value specified by the recurrenceType field. + + + :param recurrence_details: The recurrence_details of this UpdateScheduleDetails. + :type: str + """ + self._recurrence_details = recurrence_details + + @property + def recurrence_type(self): + """ + Gets the recurrence_type of this UpdateScheduleDetails. + Type of recurrence of a schedule + + Allowed values for this property are: "CRON", "ICAL" + + + :return: The recurrence_type of this UpdateScheduleDetails. + :rtype: str + """ + return self._recurrence_type + + @recurrence_type.setter + def recurrence_type(self, recurrence_type): + """ + Sets the recurrence_type of this UpdateScheduleDetails. + Type of recurrence of a schedule + + + :param recurrence_type: The recurrence_type of this UpdateScheduleDetails. + :type: str + """ + allowed_values = ["CRON", "ICAL"] + if not value_allowed_none_or_none_sentinel(recurrence_type, allowed_values): + raise ValueError( + f"Invalid value for `recurrence_type`, must be None or one of {allowed_values}" + ) + self._recurrence_type = recurrence_type + + @property + def resource_filters(self): + """ + Gets the resource_filters of this UpdateScheduleDetails. + This is a list of resources filters. The schedule will be applied to resources matching all of them. + + + :return: The resource_filters of this UpdateScheduleDetails. + :rtype: list[oci.resource_scheduler.models.ResourceFilter] + """ + return self._resource_filters + + @resource_filters.setter + def resource_filters(self, resource_filters): + """ + Sets the resource_filters of this UpdateScheduleDetails. + This is a list of resources filters. The schedule will be applied to resources matching all of them. + + + :param resource_filters: The resource_filters of this UpdateScheduleDetails. + :type: list[oci.resource_scheduler.models.ResourceFilter] + """ + self._resource_filters = resource_filters + + @property + def resources(self): + """ + Gets the resources of this UpdateScheduleDetails. + This is the list of resources to which the scheduled operation is applied. + + + :return: The resources of this UpdateScheduleDetails. + :rtype: list[oci.resource_scheduler.models.Resource] + """ + return self._resources + + @resources.setter + def resources(self, resources): + """ + Sets the resources of this UpdateScheduleDetails. + This is the list of resources to which the scheduled operation is applied. + + + :param resources: The resources of this UpdateScheduleDetails. + :type: list[oci.resource_scheduler.models.Resource] + """ + self._resources = resources + + @property + def time_starts(self): + """ + Gets the time_starts of this UpdateScheduleDetails. + This is the date and time the schedule starts, in the format defined by `RFC 3339`__ + + Example: `2016-08-25T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_starts of this UpdateScheduleDetails. + :rtype: datetime + """ + return self._time_starts + + @time_starts.setter + def time_starts(self, time_starts): + """ + Sets the time_starts of this UpdateScheduleDetails. + This is the date and time the schedule starts, in the format defined by `RFC 3339`__ + + Example: `2016-08-25T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_starts: The time_starts of this UpdateScheduleDetails. + :type: datetime + """ + self._time_starts = time_starts + + @property + def time_ends(self): + """ + Gets the time_ends of this UpdateScheduleDetails. + This is the date and time the schedule ends, in the format defined by `RFC 3339`__ + + Example: `2016-08-25T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_ends of this UpdateScheduleDetails. + :rtype: datetime + """ + return self._time_ends + + @time_ends.setter + def time_ends(self, time_ends): + """ + Sets the time_ends of this UpdateScheduleDetails. + This is the date and time the schedule ends, in the format defined by `RFC 3339`__ + + Example: `2016-08-25T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_ends: The time_ends of this UpdateScheduleDetails. + :type: datetime + """ + self._time_ends = time_ends + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this UpdateScheduleDetails. + These are free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + For more information, see `Resource Tags`__. + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this UpdateScheduleDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this UpdateScheduleDetails. + These are free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + For more information, see `Resource Tags`__. + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this UpdateScheduleDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this UpdateScheduleDetails. + These are defined tags for this resource. Each key is predefined and scoped to a namespace. + For more information, see `Resource Tags`__. + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this UpdateScheduleDetails. + :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 UpdateScheduleDetails. + These are defined tags for this resource. Each key is predefined and scoped to a namespace. + For more information, see `Resource Tags`__. + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this UpdateScheduleDetails. + :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/resource_scheduler/models/work_request.py b/src/oci/resource_scheduler/models/work_request.py new file mode 100644 index 000000000..a445140ae --- /dev/null +++ b/src/oci/resource_scheduler/models/work_request.py @@ -0,0 +1,455 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20240430 + + +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): + """ + This is 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 "START_RESOURCE" + OPERATION_TYPE_START_RESOURCE = "START_RESOURCE" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "STOP_RESOURCE" + OPERATION_TYPE_STOP_RESOURCE = "STOP_RESOURCE" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "CHANGE_SCHEDULE_COMPARTMENT" + OPERATION_TYPE_CHANGE_SCHEDULE_COMPARTMENT = "CHANGE_SCHEDULE_COMPARTMENT" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "CREATE_SCHEDULE" + OPERATION_TYPE_CREATE_SCHEDULE = "CREATE_SCHEDULE" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "UPDATE_SCHEDULE" + OPERATION_TYPE_UPDATE_SCHEDULE = "UPDATE_SCHEDULE" + + #: 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: "START_RESOURCE", "STOP_RESOURCE", "CHANGE_SCHEDULE_COMPARTMENT", "CREATE_SCHEDULE", "UPDATE_SCHEDULE", '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.resource_scheduler.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: "START_RESOURCE", "STOP_RESOURCE", "CHANGE_SCHEDULE_COMPARTMENT", "CREATE_SCHEDULE", "UPDATE_SCHEDULE", '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 = ["START_RESOURCE", "STOP_RESOURCE", "CHANGE_SCHEDULE_COMPARTMENT", "CREATE_SCHEDULE", "UPDATE_SCHEDULE"] + 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. + This is 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. + This is 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. + This is the resources that are affected by the work request. + + + :return: The resources of this WorkRequest. + :rtype: list[oci.resource_scheduler.models.WorkRequestResource] + """ + return self._resources + + @resources.setter + def resources(self, resources): + """ + Sets the resources of this WorkRequest. + This is the resources that are affected by the work request. + + + :param resources: The resources of this WorkRequest. + :type: list[oci.resource_scheduler.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. + This is 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. + This is 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. + This is 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. + This is 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. + This is 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. + This is 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. + This is 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. + This is 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/resource_scheduler/models/work_request_error.py b/src/oci/resource_scheduler/models/work_request_error.py new file mode 100644 index 000000000..d64726bcf --- /dev/null +++ b/src/oci/resource_scheduler/models/work_request_error.py @@ -0,0 +1,146 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20240430 + + +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): + """ + This is 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. + This is 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. + This is 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. + This is 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. + This is 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/resource_scheduler/models/work_request_error_collection.py b/src/oci/resource_scheduler/models/work_request_error_collection.py new file mode 100644 index 000000000..85a58edb2 --- /dev/null +++ b/src/oci/resource_scheduler/models/work_request_error_collection.py @@ -0,0 +1,72 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20240430 + + +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): + """ + This is 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.resource_scheduler.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. + This is a list of work request errors. + + + :return: The items of this WorkRequestErrorCollection. + :rtype: list[oci.resource_scheduler.models.WorkRequestError] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this WorkRequestErrorCollection. + This is a list of work request errors. + + + :param items: The items of this WorkRequestErrorCollection. + :type: list[oci.resource_scheduler.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/resource_scheduler/models/work_request_log_entry.py b/src/oci/resource_scheduler/models/work_request_log_entry.py new file mode 100644 index 000000000..b093a6e03 --- /dev/null +++ b/src/oci/resource_scheduler/models/work_request_log_entry.py @@ -0,0 +1,109 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20240430 + + +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): + """ + This is 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. + This is 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. + This is 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. + This is 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. + This is 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/resource_scheduler/models/work_request_log_entry_collection.py b/src/oci/resource_scheduler/models/work_request_log_entry_collection.py new file mode 100644 index 000000000..d8b82ad87 --- /dev/null +++ b/src/oci/resource_scheduler/models/work_request_log_entry_collection.py @@ -0,0 +1,72 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20240430 + + +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): + """ + This is 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.resource_scheduler.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. + This is a list of work request log entries. + + + :return: The items of this WorkRequestLogEntryCollection. + :rtype: list[oci.resource_scheduler.models.WorkRequestLogEntry] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this WorkRequestLogEntryCollection. + This is a list of work request log entries. + + + :param items: The items of this WorkRequestLogEntryCollection. + :type: list[oci.resource_scheduler.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/resource_scheduler/models/work_request_resource.py b/src/oci/resource_scheduler/models/work_request_resource.py new file mode 100644 index 000000000..02e4c678f --- /dev/null +++ b/src/oci/resource_scheduler/models/work_request_resource.py @@ -0,0 +1,207 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20240430 + + +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): + """ + This is 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 + + """ + self.swagger_types = { + 'entity_type': 'str', + 'action_type': 'str', + 'identifier': 'str', + 'entity_uri': 'str' + } + + self.attribute_map = { + 'entity_type': 'entityType', + 'action_type': 'actionType', + 'identifier': 'identifier', + 'entity_uri': 'entityUri' + } + + self._entity_type = None + self._action_type = None + self._identifier = None + self._entity_uri = None + + @property + def entity_type(self): + """ + **[Required]** Gets the entity_type of this WorkRequestResource. + This is 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. + This is 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. + This is 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. + This is 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. + This is 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. + This is 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 + + 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/resource_scheduler/models/work_request_summary.py b/src/oci/resource_scheduler/models/work_request_summary.py new file mode 100644 index 000000000..0f6196a4a --- /dev/null +++ b/src/oci/resource_scheduler/models/work_request_summary.py @@ -0,0 +1,453 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20240430 + + +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): + """ + This is the 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 "START_RESOURCE" + OPERATION_TYPE_START_RESOURCE = "START_RESOURCE" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "STOP_RESOURCE" + OPERATION_TYPE_STOP_RESOURCE = "STOP_RESOURCE" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "CHANGE_SCHEDULE_COMPARTMENT" + OPERATION_TYPE_CHANGE_SCHEDULE_COMPARTMENT = "CHANGE_SCHEDULE_COMPARTMENT" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "CREATE_SCHEDULE" + OPERATION_TYPE_CREATE_SCHEDULE = "CREATE_SCHEDULE" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "UPDATE_SCHEDULE" + OPERATION_TYPE_UPDATE_SCHEDULE = "UPDATE_SCHEDULE" + + #: 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: "START_RESOURCE", "STOP_RESOURCE", "CHANGE_SCHEDULE_COMPARTMENT", "CREATE_SCHEDULE", "UPDATE_SCHEDULE", '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.resource_scheduler.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): + """ + Gets the operation_type of this WorkRequestSummary. + This is the asynchronous operation tracked by this work request. + + Allowed values for this property are: "START_RESOURCE", "STOP_RESOURCE", "CHANGE_SCHEDULE_COMPARTMENT", "CREATE_SCHEDULE", "UPDATE_SCHEDULE", '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. + This is the asynchronous operation tracked by this work request. + + + :param operation_type: The operation_type of this WorkRequestSummary. + :type: str + """ + allowed_values = ["START_RESOURCE", "STOP_RESOURCE", "CHANGE_SCHEDULE_COMPARTMENT", "CREATE_SCHEDULE", "UPDATE_SCHEDULE"] + 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. + This is 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. + This is 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.resource_scheduler.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.resource_scheduler.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. + This is 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. + This is 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. + This is 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. + This is 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. + This is 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. + This is 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. + This is 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. + This is 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/resource_scheduler/models/work_request_summary_collection.py b/src/oci/resource_scheduler/models/work_request_summary_collection.py new file mode 100644 index 000000000..d48943426 --- /dev/null +++ b/src/oci/resource_scheduler/models/work_request_summary_collection.py @@ -0,0 +1,72 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20240430 + + +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): + """ + This is 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.resource_scheduler.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. + This is a list of work requests. + + + :return: The items of this WorkRequestSummaryCollection. + :rtype: list[oci.resource_scheduler.models.WorkRequestSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this WorkRequestSummaryCollection. + This is a list of work requests. + + + :param items: The items of this WorkRequestSummaryCollection. + :type: list[oci.resource_scheduler.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/resource_scheduler/schedule_client.py b/src/oci/resource_scheduler/schedule_client.py new file mode 100644 index 000000000..b08f9ed70 --- /dev/null +++ b/src/oci/resource_scheduler/schedule_client.py @@ -0,0 +1,1778 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20240430 + +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 resource_scheduler_type_mapping +missing = Sentinel("Missing") + + +class ScheduleClient(object): + """ + Use the Resource scheduler API to manage schedules, to perform actions on a collection of resources. + """ + + 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("resource_scheduler"): + 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': '/20240430', + 'service_endpoint_template': 'https://resource-scheduler.{region}.oci.{secondLevelDomain}', + 'service_endpoint_template_per_realm': { }, # noqa: E201 E202 + 'skip_deserialization': kwargs.get('skip_deserialization', False), + 'circuit_breaker_strategy': kwargs.get('circuit_breaker_strategy', circuit_breaker.GLOBAL_CIRCUIT_BREAKER_STRATEGY), + 'client_level_realm_specific_endpoint_template_enabled': kwargs.get('client_level_realm_specific_endpoint_template_enabled') + } + if 'timeout' in kwargs: + base_client_init_kwargs['timeout'] = kwargs.get('timeout') + if base_client_init_kwargs.get('circuit_breaker_strategy') is None: + base_client_init_kwargs['circuit_breaker_strategy'] = circuit_breaker.DEFAULT_CIRCUIT_BREAKER_STRATEGY + if 'allow_control_chars' in kwargs: + base_client_init_kwargs['allow_control_chars'] = kwargs.get('allow_control_chars') + self.base_client = BaseClient("schedule", config, signer, resource_scheduler_type_mapping, **base_client_init_kwargs) + self.retry_strategy = kwargs.get('retry_strategy') + self.circuit_breaker_callback = kwargs.get('circuit_breaker_callback') + + def activate_schedule(self, schedule_id, **kwargs): + """ + This API activates a schedule. + + + :param str schedule_id: (required) + This is the `OCID`__ of the schedule. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param str if_match: (optional) + This is used 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) + This is a unique Oracle-assigned identifier for the request. If you need to contact + Oracle about a particular request, please provide the request ID. + The only valid characters for request IDs are letters, numbers, + underscore, and dash. + + :param str opc_retry_token: (optional) + This is a token that uniquely identifies a request so it can be retried in case of a timeout or + server error without risk of running that same action again. Retry tokens expire after 24 + hours, but can be invalidated before then due to conflicting operations. For example, if a resource + has been deleted and removed from the system, then a retry of the original creation request + might be rejected. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.resource_scheduler.models.Schedule` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use activate_schedule API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['scheduleId'] + resource_path = "/schedules/{scheduleId}/actions/activateSchedule" + method = "POST" + operation_name = "activate_schedule" + api_reference_link = "" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "if_match", + "opc_request_id", + "opc_retry_token" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + f"activate_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", + "if-match": kwargs.get("if_match", missing), + "opc-request-id": kwargs.get("opc_request_id", missing), + "opc-retry-token": kwargs.get("opc_retry_token", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + if retry_strategy is None: + retry_strategy = retry.DEFAULT_RETRY_STRATEGY + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + 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 cancel_work_request(self, work_request_id, **kwargs): + """ + This API cancels a work request. + + + :param str work_request_id: (required) + This is the `OCID`__ of the asynchronous work request. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param str if_match: (optional) + This is used 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) + This is a 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 cancel_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 = "DELETE" + operation_name = "cancel_work_request" + 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"cancel_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", + "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 create_schedule(self, create_schedule_details, **kwargs): + """ + Creates a Schedule + + + :param oci.resource_scheduler.models.CreateScheduleDetails create_schedule_details: (required) + This API shows the details of the new schedule + + :param str opc_retry_token: (optional) + This is 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) + This is a 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.resource_scheduler.models.Schedule` + :rtype: :class:`~oci.response.Response` + + :example: + 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 = [] + resource_path = "/schedules" + method = "POST" + operation_name = "create_schedule" + 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_schedule 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_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) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + 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_schedule(self, schedule_id, **kwargs): + """ + This API deactivates a schedule. + + + :param str schedule_id: (required) + This is the `OCID`__ of the schedule. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param str if_match: (optional) + This is used 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) + This is a unique Oracle-assigned identifier for the request. If you need to contact + Oracle about a particular request, please provide the request ID. + The only valid characters for request IDs are letters, numbers, + underscore, and dash. + + :param str opc_retry_token: (optional) + This is a token that uniquely identifies a request so it can be retried in case of a timeout or + server error without risk of running that same action again. Retry tokens expire after 24 + hours, but can be invalidated before then due to conflicting operations. For example, if a resource + has been deleted and removed from the system, then a retry of the original creation request + might be rejected. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.resource_scheduler.models.Schedule` + :rtype: :class:`~oci.response.Response` + + :example: + 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 = ['scheduleId'] + resource_path = "/schedules/{scheduleId}/actions/deactivateSchedule" + method = "POST" + operation_name = "deactivate_schedule" + api_reference_link = "" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "if_match", + "opc_request_id", + "opc_retry_token" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + f"deactivate_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", + "if-match": kwargs.get("if_match", missing), + "opc-request-id": kwargs.get("opc_request_id", missing), + "opc-retry-token": kwargs.get("opc_retry_token", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + if retry_strategy is None: + retry_strategy = retry.DEFAULT_RETRY_STRATEGY + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + 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 delete_schedule(self, schedule_id, **kwargs): + """ + This API deletes a schedule. + + + :param str schedule_id: (required) + This is the `OCID`__ of the schedule. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param str if_match: (optional) + This is used 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) + This is a 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_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 = "DELETE" + operation_name = "delete_schedule" + 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_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", + "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_schedule(self, schedule_id, **kwargs): + """ + This API gets information about a schedule. + + + :param str schedule_id: (required) + This is the `OCID`__ of the schedule. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param str opc_request_id: (optional) + This is a 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.resource_scheduler.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 = "" + + # 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_work_request(self, work_request_id, **kwargs): + """ + This API gets the details of a work request. + + + :param str work_request_id: (required) + This is the `OCID`__ of the asynchronous work request. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param str opc_request_id: (optional) + This is a 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.resource_scheduler.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_resource_types(self, **kwargs): + """ + This API gets a list of schedule resource types. + + + :param str compartment_id: (optional) + This is the `OCID`__ of the compartment in which to list resources. + + __ 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) + This used 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 opc_request_id: (optional) + This is a 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.resource_scheduler.models.ResourceTypeCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_resource_types API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = [] + resource_path = "/schedules/resourceTypes" + method = "GET" + operation_name = "list_resource_types" + api_reference_link = "" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "compartment_id", + "limit", + "page", + "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_resource_types got unknown kwargs: {extra_kwargs!r}") + + query_params = { + "compartmentId": kwargs.get("compartment_id", 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="ResourceTypeCollection", + 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="ResourceTypeCollection", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + + def list_schedules(self, **kwargs): + """ + This API gets a list of schedules + + + :param str compartment_id: (optional) + This is 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) + This is a filter to return only resources that match the given lifecycle state. The + state value is case-insensitive. + + Allowed values are: "ACTIVE", "INACTIVE", "CREATING", "UPDATING", "DELETING", "DELETED", "FAILED" + + :param str display_name: (optional) + This is a filter to return only resources that match the given display name exactly. + + :param str schedule_id: (optional) + This is the `OCID`__ of the schedule. + + __ 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) + This used for list pagination. The value of the opc-next-page response header from the previous + \"List\" call. For important details about how pagination works, see + `List Pagination`__. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str sort_by: (optional) + This is the field to sort by. You can provide only one sort order. The default order for `timeCreated` + is descending. The default order for `displayName` is ascending. + + Allowed values are: "timeCreated", "displayName", "lifecycleState", "state" + + :param str sort_order: (optional) + This is the sort order to use, either ascending (`ASC`) or descending (`DESC`). + + Allowed values are: "ASC", "DESC" + + :param str opc_request_id: (optional) + This is a 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.resource_scheduler.models.ScheduleCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_schedules API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = [] + resource_path = "/schedules" + method = "GET" + operation_name = "list_schedules" + api_reference_link = "" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "compartment_id", + "lifecycle_state", + "display_name", + "schedule_id", + "limit", + "page", + "sort_by", + "sort_order", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + f"list_schedules got unknown kwargs: {extra_kwargs!r}") + + if 'lifecycle_state' in kwargs: + lifecycle_state_allowed_values = ["ACTIVE", "INACTIVE", "CREATING", "UPDATING", "DELETING", "DELETED", "FAILED"] + if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: + raise ValueError( + f"Invalid value for `lifecycle_state`, must be one of { lifecycle_state_allowed_values }" + ) + + if 'sort_by' in kwargs: + sort_by_allowed_values = ["timeCreated", "displayName", "lifecycleState", "state"] + if kwargs['sort_by'] not in sort_by_allowed_values: + raise ValueError( + f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }" + ) + + if 'sort_order' in kwargs: + sort_order_allowed_values = ["ASC", "DESC"] + if kwargs['sort_order'] not in sort_order_allowed_values: + raise ValueError( + f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }" + ) + + query_params = { + "compartmentId": kwargs.get("compartment_id", missing), + "lifecycleState": kwargs.get("lifecycle_state", missing), + "displayName": kwargs.get("display_name", missing), + "scheduleId": kwargs.get("schedule_id", missing), + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", missing), + "sortBy": kwargs.get("sort_by", missing), + "sortOrder": kwargs.get("sort_order", missing) + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + if retry_strategy is None: + retry_strategy = retry.DEFAULT_RETRY_STRATEGY + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="ScheduleCollection", + 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="ScheduleCollection", + 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): + """ + This API lists the errors for a work request. + + + :param str work_request_id: (required) + This is the `OCID`__ of the asynchronous work request. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param str opc_request_id: (optional) + This is a 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) + This used 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) + This is 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) + This is 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.resource_scheduler.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) + This is the `OCID`__ of the asynchronous work request. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param str opc_request_id: (optional) + This is a 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) + This used 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) + This is 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) + This is 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.resource_scheduler.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 cloud scheduler work requests in a compartment. + + + :param str compartment_id: (optional) + This is 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) + This is the `OCID`__ of the asynchronous work request. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param str status: (optional) + This is 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) + This is the `OCID`__ of the resource affected by the work request. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param str page: (optional) + This used 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) + This is the sort order to use, either ascending (`ASC`) or descending (`DESC`). + + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + This is the field to sort by. Only one sort order may be provided. Default order for `timeAccepted` is descending. + + Allowed values are: "timeAccepted" + + :param str schedule_id: (optional) + This is the `OCID`__ of the schedule. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param str opc_request_id: (optional) + This is a 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.resource_scheduler.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", + "page", + "limit", + "sort_order", + "sort_by", + "schedule_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_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), + "scheduleId": kwargs.get("schedule_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="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_schedule(self, schedule_id, update_schedule_details, **kwargs): + """ + The API updates a schedule + + + :param str schedule_id: (required) + This is the `OCID`__ of the schedule. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param oci.resource_scheduler.models.UpdateScheduleDetails update_schedule_details: (required) + The information about a schedule that will be updated. + + :param str if_match: (optional) + This is used 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) + This is a 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 update_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 = "PUT" + operation_name = "update_schedule" + 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_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", + "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_schedule_details, + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=update_schedule_details, + 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/resource_scheduler/schedule_client_composite_operations.py b/src/oci/resource_scheduler/schedule_client_composite_operations.py new file mode 100644 index 000000000..643a94cff --- /dev/null +++ b/src/oci/resource_scheduler/schedule_client_composite_operations.py @@ -0,0 +1,258 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20240430 + +import oci # noqa: F401 +from oci.util import WAIT_RESOURCE_NOT_FOUND # noqa: F401 + + +class ScheduleClientCompositeOperations(object): + """ + This class provides a wrapper around :py:class:`~oci.resource_scheduler.ScheduleClient` 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 ScheduleClientCompositeOperations object + + :param ScheduleClient client: + The service client which will be wrapped by this object + """ + self.client = client + + def activate_schedule_and_wait_for_state(self, schedule_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.resource_scheduler.ScheduleClient.activate_schedule` and waits for the :py:class:`~oci.resource_scheduler.models.Schedule` acted upon + to enter the given state(s). + + :param str schedule_id: (required) + This is the `OCID`__ of the schedule. + + __ 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.resource_scheduler.models.Schedule.lifecycle_state` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.resource_scheduler.ScheduleClient.activate_schedule` + + :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_schedule(schedule_id, **operation_kwargs) + if not wait_for_states: + return operation_result + lowered_wait_for_states = [w.lower() for w in wait_for_states] + schedule_id = operation_result.data.id + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_schedule(schedule_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_schedule_and_wait_for_state(self, create_schedule_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.resource_scheduler.ScheduleClient.create_schedule` and waits for the :py:class:`~oci.resource_scheduler.models.WorkRequest` + to enter the given state(s). + + :param oci.resource_scheduler.models.CreateScheduleDetails create_schedule_details: (required) + This API shows the details of the new schedule + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.resource_scheduler.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.resource_scheduler.ScheduleClient.create_schedule` + + :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_schedule(create_schedule_details, **operation_kwargs) + if not wait_for_states: + return operation_result + lowered_wait_for_states = [w.lower() for w in wait_for_states] + if '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 deactivate_schedule_and_wait_for_state(self, schedule_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.resource_scheduler.ScheduleClient.deactivate_schedule` and waits for the :py:class:`~oci.resource_scheduler.models.Schedule` acted upon + to enter the given state(s). + + :param str schedule_id: (required) + This is the `OCID`__ of the schedule. + + __ 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.resource_scheduler.models.Schedule.lifecycle_state` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.resource_scheduler.ScheduleClient.deactivate_schedule` + + :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_schedule(schedule_id, **operation_kwargs) + if not wait_for_states: + return operation_result + lowered_wait_for_states = [w.lower() for w in wait_for_states] + schedule_id = operation_result.data.id + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_schedule(schedule_id), # noqa: F821 + evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except (NameError, TypeError) as e: + if not e.args: + e.args = ('',) + e.args = e.args + ('This composite operation is currently not supported in the SDK. Please use the operation from the service client and use waiters as an alternative. For more information on waiters, visit: "https://docs.oracle.com/en-us/iaas/tools/python/latest/api/waiters.html"', ) + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def delete_schedule_and_wait_for_state(self, schedule_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.resource_scheduler.ScheduleClient.delete_schedule` and waits for the :py:class:`~oci.resource_scheduler.models.Schedule` acted upon + to enter the given state(s). + + :param str schedule_id: (required) + This is the `OCID`__ of the schedule. + + __ 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.resource_scheduler.models.Schedule.lifecycle_state` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.resource_scheduler.ScheduleClient.delete_schedule` + + :param dict waiter_kwargs: + A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` + as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait + """ + initial_get_result = self.client.get_schedule(schedule_id) + operation_result = None + try: + operation_result = self.client.delete_schedule(schedule_id, **operation_kwargs) + except oci.exceptions.ServiceError as e: + if e.status == 404: + return WAIT_RESOURCE_NOT_FOUND + else: + raise e + + if not wait_for_states: + return operation_result + lowered_wait_for_states = [w.lower() for w in wait_for_states] + + try: + if ("succeed_on_not_found" in waiter_kwargs) and (waiter_kwargs["succeed_on_not_found"] is False): + self.client.base_client.logger.warning("The waiter kwarg succeed_on_not_found was passed as False for the delete composite operation delete_schedule, this would result in the operation to fail if the resource is not found! Please, do not pass this kwarg if this was not intended") + else: + """ + If the user does not send in this value, we set it to True by default. + We are doing this because during a delete resource scenario and waiting on its state, the service can + return a 404 NOT FOUND exception as the resource was deleted and a get on its state would fail + """ + waiter_kwargs["succeed_on_not_found"] = True + waiter_result = oci.wait_until( + self.client, + initial_get_result, # noqa: F821 + evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except (NameError, TypeError) as e: + if not e.args: + e.args = ('',) + e.args = e.args + ('This composite operation is currently not supported in the SDK. Please use the operation from the service client and use waiters as an alternative. For more information on waiters, visit: "https://docs.oracle.com/en-us/iaas/tools/python/latest/api/waiters.html"', ) + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def update_schedule_and_wait_for_state(self, schedule_id, update_schedule_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.resource_scheduler.ScheduleClient.update_schedule` and waits for the :py:class:`~oci.resource_scheduler.models.WorkRequest` + to enter the given state(s). + + :param str schedule_id: (required) + This is the `OCID`__ of the schedule. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param oci.resource_scheduler.models.UpdateScheduleDetails update_schedule_details: (required) + The information about a schedule that will be updated. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.resource_scheduler.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.resource_scheduler.ScheduleClient.update_schedule` + + :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_schedule(schedule_id, update_schedule_details, **operation_kwargs) + if not wait_for_states: + return operation_result + lowered_wait_for_states = [w.lower() for w in wait_for_states] + if 'opc-work-request-id' not in operation_result.headers: + return operation_result + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + 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) diff --git a/src/oci/version.py b/src/oci/version.py index 380551331..ab11660bf 100644 --- a/src/oci/version.py +++ b/src/oci/version.py @@ -2,4 +2,4 @@ # Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. -__version__ = "2.126.3" +__version__ = "2.126.4"