diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 8e8449418c..cd76bf1aa9 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -3,6 +3,19 @@ Change Log All notable changes to this project will be documented in this file. The format is based on `Keep a Changelog `_. +==================== +2.12.2 - 2020-03-31 +==================== + +Added +----- +* Support for the Secrets Management service +* Support for the Big Data service +* Support for updating class name, file URI, language, and spark version of applications in the Data Flow service +* Support for cross-region replication in the Object Storage service +* Support for retention rules in the Object Storage service +* Support for enabling and disabling pod security policy admission controllers in the Container Engine for Kubernetes service + ==================== 2.12.1 - 2020-03-24 ==================== diff --git a/docs/api/bds.rst b/docs/api/bds.rst new file mode 100644 index 0000000000..5b781cf19c --- /dev/null +++ b/docs/api/bds.rst @@ -0,0 +1,41 @@ +Bds +=== + +.. autosummary:: + :toctree: bds/client + :nosignatures: + :template: autosummary/service_client.rst + + oci.bds.BdsClient + oci.bds.BdsClientCompositeOperations + +-------- + Models +-------- + +.. autosummary:: + :toctree: bds/models + :nosignatures: + :template: autosummary/model_class.rst + + oci.bds.models.AddBlockStorageDetails + oci.bds.models.AddCloudSqlDetails + oci.bds.models.AddWorkerNodesDetails + oci.bds.models.BdsInstance + oci.bds.models.BdsInstanceSummary + oci.bds.models.ChangeBdsInstanceCompartmentDetails + oci.bds.models.CloudSqlDetails + oci.bds.models.ClusterDetails + oci.bds.models.CreateBdsInstanceDetails + oci.bds.models.CreateNodeDetails + oci.bds.models.DefaultError + oci.bds.models.KerberosDetails + oci.bds.models.NetworkConfig + oci.bds.models.Node + oci.bds.models.RemoveCloudSqlDetails + oci.bds.models.UpdateBdsInstanceDetails + oci.bds.models.VolumeAttachmentDetail + oci.bds.models.WorkRequest + oci.bds.models.WorkRequestError + oci.bds.models.WorkRequestLogEntry + oci.bds.models.WorkRequestResource diff --git a/docs/api/bds/client/oci.bds.BdsClient.rst b/docs/api/bds/client/oci.bds.BdsClient.rst new file mode 100644 index 0000000000..1bda59a82d --- /dev/null +++ b/docs/api/bds/client/oci.bds.BdsClient.rst @@ -0,0 +1,8 @@ +BdsClient +========= + +.. currentmodule:: oci.bds + +.. autoclass:: BdsClient + :special-members: __init__ + :members: \ No newline at end of file diff --git a/docs/api/bds/client/oci.bds.BdsClientCompositeOperations.rst b/docs/api/bds/client/oci.bds.BdsClientCompositeOperations.rst new file mode 100644 index 0000000000..7df104ec4b --- /dev/null +++ b/docs/api/bds/client/oci.bds.BdsClientCompositeOperations.rst @@ -0,0 +1,8 @@ +BdsClientCompositeOperations +============================ + +.. currentmodule:: oci.bds + +.. autoclass:: BdsClientCompositeOperations + :special-members: __init__ + :members: \ No newline at end of file diff --git a/docs/api/bds/models/oci.bds.models.AddBlockStorageDetails.rst b/docs/api/bds/models/oci.bds.models.AddBlockStorageDetails.rst new file mode 100644 index 0000000000..6c2720a95d --- /dev/null +++ b/docs/api/bds/models/oci.bds.models.AddBlockStorageDetails.rst @@ -0,0 +1,11 @@ +AddBlockStorageDetails +====================== + +.. currentmodule:: oci.bds.models + +.. autoclass:: AddBlockStorageDetails + :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.AddCloudSqlDetails.rst b/docs/api/bds/models/oci.bds.models.AddCloudSqlDetails.rst new file mode 100644 index 0000000000..12a7417bed --- /dev/null +++ b/docs/api/bds/models/oci.bds.models.AddCloudSqlDetails.rst @@ -0,0 +1,11 @@ +AddCloudSqlDetails +================== + +.. currentmodule:: oci.bds.models + +.. autoclass:: AddCloudSqlDetails + :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.AddWorkerNodesDetails.rst b/docs/api/bds/models/oci.bds.models.AddWorkerNodesDetails.rst new file mode 100644 index 0000000000..118c918cce --- /dev/null +++ b/docs/api/bds/models/oci.bds.models.AddWorkerNodesDetails.rst @@ -0,0 +1,11 @@ +AddWorkerNodesDetails +===================== + +.. currentmodule:: oci.bds.models + +.. autoclass:: AddWorkerNodesDetails + :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.BdsInstance.rst b/docs/api/bds/models/oci.bds.models.BdsInstance.rst new file mode 100644 index 0000000000..eb115821ce --- /dev/null +++ b/docs/api/bds/models/oci.bds.models.BdsInstance.rst @@ -0,0 +1,11 @@ +BdsInstance +=========== + +.. currentmodule:: oci.bds.models + +.. autoclass:: BdsInstance + :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.BdsInstanceSummary.rst b/docs/api/bds/models/oci.bds.models.BdsInstanceSummary.rst new file mode 100644 index 0000000000..776479a96b --- /dev/null +++ b/docs/api/bds/models/oci.bds.models.BdsInstanceSummary.rst @@ -0,0 +1,11 @@ +BdsInstanceSummary +================== + +.. currentmodule:: oci.bds.models + +.. autoclass:: BdsInstanceSummary + :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.ChangeBdsInstanceCompartmentDetails.rst b/docs/api/bds/models/oci.bds.models.ChangeBdsInstanceCompartmentDetails.rst new file mode 100644 index 0000000000..773ec6c00f --- /dev/null +++ b/docs/api/bds/models/oci.bds.models.ChangeBdsInstanceCompartmentDetails.rst @@ -0,0 +1,11 @@ +ChangeBdsInstanceCompartmentDetails +=================================== + +.. currentmodule:: oci.bds.models + +.. autoclass:: ChangeBdsInstanceCompartmentDetails + :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.CloudSqlDetails.rst b/docs/api/bds/models/oci.bds.models.CloudSqlDetails.rst new file mode 100644 index 0000000000..5b5ca5c9e8 --- /dev/null +++ b/docs/api/bds/models/oci.bds.models.CloudSqlDetails.rst @@ -0,0 +1,11 @@ +CloudSqlDetails +=============== + +.. currentmodule:: oci.bds.models + +.. autoclass:: CloudSqlDetails + :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.ClusterDetails.rst b/docs/api/bds/models/oci.bds.models.ClusterDetails.rst new file mode 100644 index 0000000000..f0d3f4fd17 --- /dev/null +++ b/docs/api/bds/models/oci.bds.models.ClusterDetails.rst @@ -0,0 +1,11 @@ +ClusterDetails +============== + +.. currentmodule:: oci.bds.models + +.. autoclass:: ClusterDetails + :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.CreateBdsInstanceDetails.rst b/docs/api/bds/models/oci.bds.models.CreateBdsInstanceDetails.rst new file mode 100644 index 0000000000..cea4296799 --- /dev/null +++ b/docs/api/bds/models/oci.bds.models.CreateBdsInstanceDetails.rst @@ -0,0 +1,11 @@ +CreateBdsInstanceDetails +======================== + +.. currentmodule:: oci.bds.models + +.. autoclass:: CreateBdsInstanceDetails + :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.CreateNodeDetails.rst b/docs/api/bds/models/oci.bds.models.CreateNodeDetails.rst new file mode 100644 index 0000000000..0bf040dc0a --- /dev/null +++ b/docs/api/bds/models/oci.bds.models.CreateNodeDetails.rst @@ -0,0 +1,11 @@ +CreateNodeDetails +================= + +.. currentmodule:: oci.bds.models + +.. autoclass:: CreateNodeDetails + :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.DefaultError.rst b/docs/api/bds/models/oci.bds.models.DefaultError.rst new file mode 100644 index 0000000000..c1329aa013 --- /dev/null +++ b/docs/api/bds/models/oci.bds.models.DefaultError.rst @@ -0,0 +1,11 @@ +DefaultError +============ + +.. currentmodule:: oci.bds.models + +.. autoclass:: DefaultError + :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.KerberosDetails.rst b/docs/api/bds/models/oci.bds.models.KerberosDetails.rst new file mode 100644 index 0000000000..0be1b6fa64 --- /dev/null +++ b/docs/api/bds/models/oci.bds.models.KerberosDetails.rst @@ -0,0 +1,11 @@ +KerberosDetails +=============== + +.. currentmodule:: oci.bds.models + +.. autoclass:: KerberosDetails + :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.NetworkConfig.rst b/docs/api/bds/models/oci.bds.models.NetworkConfig.rst new file mode 100644 index 0000000000..2503b3f290 --- /dev/null +++ b/docs/api/bds/models/oci.bds.models.NetworkConfig.rst @@ -0,0 +1,11 @@ +NetworkConfig +============= + +.. currentmodule:: oci.bds.models + +.. autoclass:: NetworkConfig + :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.Node.rst b/docs/api/bds/models/oci.bds.models.Node.rst new file mode 100644 index 0000000000..cb16aab2d5 --- /dev/null +++ b/docs/api/bds/models/oci.bds.models.Node.rst @@ -0,0 +1,11 @@ +Node +==== + +.. currentmodule:: oci.bds.models + +.. autoclass:: Node + :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.RemoveCloudSqlDetails.rst b/docs/api/bds/models/oci.bds.models.RemoveCloudSqlDetails.rst new file mode 100644 index 0000000000..97a808a250 --- /dev/null +++ b/docs/api/bds/models/oci.bds.models.RemoveCloudSqlDetails.rst @@ -0,0 +1,11 @@ +RemoveCloudSqlDetails +===================== + +.. currentmodule:: oci.bds.models + +.. autoclass:: RemoveCloudSqlDetails + :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.UpdateBdsInstanceDetails.rst b/docs/api/bds/models/oci.bds.models.UpdateBdsInstanceDetails.rst new file mode 100644 index 0000000000..a6615b8f91 --- /dev/null +++ b/docs/api/bds/models/oci.bds.models.UpdateBdsInstanceDetails.rst @@ -0,0 +1,11 @@ +UpdateBdsInstanceDetails +======================== + +.. currentmodule:: oci.bds.models + +.. autoclass:: UpdateBdsInstanceDetails + :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.VolumeAttachmentDetail.rst b/docs/api/bds/models/oci.bds.models.VolumeAttachmentDetail.rst new file mode 100644 index 0000000000..80c903afb3 --- /dev/null +++ b/docs/api/bds/models/oci.bds.models.VolumeAttachmentDetail.rst @@ -0,0 +1,11 @@ +VolumeAttachmentDetail +====================== + +.. currentmodule:: oci.bds.models + +.. autoclass:: VolumeAttachmentDetail + :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.WorkRequest.rst b/docs/api/bds/models/oci.bds.models.WorkRequest.rst new file mode 100644 index 0000000000..38e83071ea --- /dev/null +++ b/docs/api/bds/models/oci.bds.models.WorkRequest.rst @@ -0,0 +1,11 @@ +WorkRequest +=========== + +.. currentmodule:: oci.bds.models + +.. autoclass:: WorkRequest + :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.WorkRequestError.rst b/docs/api/bds/models/oci.bds.models.WorkRequestError.rst new file mode 100644 index 0000000000..1a77d1cf59 --- /dev/null +++ b/docs/api/bds/models/oci.bds.models.WorkRequestError.rst @@ -0,0 +1,11 @@ +WorkRequestError +================ + +.. currentmodule:: oci.bds.models + +.. autoclass:: WorkRequestError + :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.WorkRequestLogEntry.rst b/docs/api/bds/models/oci.bds.models.WorkRequestLogEntry.rst new file mode 100644 index 0000000000..a4d97a1981 --- /dev/null +++ b/docs/api/bds/models/oci.bds.models.WorkRequestLogEntry.rst @@ -0,0 +1,11 @@ +WorkRequestLogEntry +=================== + +.. currentmodule:: oci.bds.models + +.. autoclass:: WorkRequestLogEntry + :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.WorkRequestResource.rst b/docs/api/bds/models/oci.bds.models.WorkRequestResource.rst new file mode 100644 index 0000000000..0996348472 --- /dev/null +++ b/docs/api/bds/models/oci.bds.models.WorkRequestResource.rst @@ -0,0 +1,11 @@ +WorkRequestResource +=================== + +.. currentmodule:: oci.bds.models + +.. autoclass:: WorkRequestResource + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/container_engine.rst b/docs/api/container_engine.rst index c68330986b..d0ea3482ef 100644 --- a/docs/api/container_engine.rst +++ b/docs/api/container_engine.rst @@ -19,6 +19,7 @@ Container Engine :template: autosummary/model_class.rst oci.container_engine.models.AddOnOptions + oci.container_engine.models.AdmissionControllerOptions oci.container_engine.models.Cluster oci.container_engine.models.ClusterCreateOptions oci.container_engine.models.ClusterEndpoints @@ -43,6 +44,7 @@ Container Engine oci.container_engine.models.NodeSourceViaImageDetails oci.container_engine.models.NodeSourceViaImageOption oci.container_engine.models.UpdateClusterDetails + oci.container_engine.models.UpdateClusterOptionsDetails oci.container_engine.models.UpdateNodePoolDetails oci.container_engine.models.UpdateNodePoolNodeConfigDetails oci.container_engine.models.WorkRequest diff --git a/docs/api/container_engine/models/oci.container_engine.models.AdmissionControllerOptions.rst b/docs/api/container_engine/models/oci.container_engine.models.AdmissionControllerOptions.rst new file mode 100644 index 0000000000..1009415b2a --- /dev/null +++ b/docs/api/container_engine/models/oci.container_engine.models.AdmissionControllerOptions.rst @@ -0,0 +1,11 @@ +AdmissionControllerOptions +========================== + +.. currentmodule:: oci.container_engine.models + +.. autoclass:: AdmissionControllerOptions + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/container_engine/models/oci.container_engine.models.UpdateClusterOptionsDetails.rst b/docs/api/container_engine/models/oci.container_engine.models.UpdateClusterOptionsDetails.rst new file mode 100644 index 0000000000..99031ded7d --- /dev/null +++ b/docs/api/container_engine/models/oci.container_engine.models.UpdateClusterOptionsDetails.rst @@ -0,0 +1,11 @@ +UpdateClusterOptionsDetails +=========================== + +.. currentmodule:: oci.container_engine.models + +.. autoclass:: UpdateClusterOptionsDetails + :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 bd3b717902..bb017f1907 100644 --- a/docs/api/landing.rst +++ b/docs/api/landing.rst @@ -11,6 +11,7 @@ API Reference * :doc:`Application Migration ` * :doc:`Audit ` * :doc:`Auto Scaling ` +* :doc:`Bds ` * :doc:`Budget ` * :doc:`Container Engine ` * :doc:`Block Storage ` @@ -54,8 +55,10 @@ API Reference * :doc:`Os Management ` * :doc:`Resource Manager ` * :doc:`Resource Search ` +* :doc:`Secrets ` * :doc:`Stream Admin ` * :doc:`Stream ` +* :doc:`Vaults ` * :doc:`Redirect ` * :doc:`Waas ` * :doc:`Work Request ` @@ -83,6 +86,7 @@ API Reference application_migration audit autoscaling + bds budget container_engine core @@ -112,7 +116,9 @@ API Reference os_management resource_manager resource_search + secrets streaming + vault waas work_requests config diff --git a/docs/api/object_storage.rst b/docs/api/object_storage.rst index 07a1a4ca0c..dd26f5cb8f 100644 --- a/docs/api/object_storage.rst +++ b/docs/api/object_storage.rst @@ -26,6 +26,9 @@ Object Storage oci.object_storage.models.CreateBucketDetails oci.object_storage.models.CreateMultipartUploadDetails oci.object_storage.models.CreatePreauthenticatedRequestDetails + oci.object_storage.models.CreateReplicationPolicyDetails + oci.object_storage.models.CreateRetentionRuleDetails + oci.object_storage.models.Duration oci.object_storage.models.ListObjects oci.object_storage.models.MultipartUpload oci.object_storage.models.MultipartUploadPartSummary @@ -39,9 +42,17 @@ Object Storage oci.object_storage.models.PreauthenticatedRequestSummary oci.object_storage.models.PutObjectLifecyclePolicyDetails oci.object_storage.models.RenameObjectDetails + oci.object_storage.models.ReplicationPolicy + oci.object_storage.models.ReplicationPolicySummary + oci.object_storage.models.ReplicationSource oci.object_storage.models.RestoreObjectsDetails + oci.object_storage.models.RetentionRule + oci.object_storage.models.RetentionRuleCollection + oci.object_storage.models.RetentionRuleDetails + oci.object_storage.models.RetentionRuleSummary oci.object_storage.models.UpdateBucketDetails oci.object_storage.models.UpdateNamespaceMetadataDetails + oci.object_storage.models.UpdateRetentionRuleDetails oci.object_storage.models.WorkRequest oci.object_storage.models.WorkRequestError oci.object_storage.models.WorkRequestLogEntry diff --git a/docs/api/object_storage/models/oci.object_storage.models.CreateReplicationPolicyDetails.rst b/docs/api/object_storage/models/oci.object_storage.models.CreateReplicationPolicyDetails.rst new file mode 100644 index 0000000000..5a9a05fdd6 --- /dev/null +++ b/docs/api/object_storage/models/oci.object_storage.models.CreateReplicationPolicyDetails.rst @@ -0,0 +1,11 @@ +CreateReplicationPolicyDetails +============================== + +.. currentmodule:: oci.object_storage.models + +.. autoclass:: CreateReplicationPolicyDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/object_storage/models/oci.object_storage.models.CreateRetentionRuleDetails.rst b/docs/api/object_storage/models/oci.object_storage.models.CreateRetentionRuleDetails.rst new file mode 100644 index 0000000000..a1a3923d8d --- /dev/null +++ b/docs/api/object_storage/models/oci.object_storage.models.CreateRetentionRuleDetails.rst @@ -0,0 +1,11 @@ +CreateRetentionRuleDetails +========================== + +.. currentmodule:: oci.object_storage.models + +.. autoclass:: CreateRetentionRuleDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/object_storage/models/oci.object_storage.models.Duration.rst b/docs/api/object_storage/models/oci.object_storage.models.Duration.rst new file mode 100644 index 0000000000..ebf12de42b --- /dev/null +++ b/docs/api/object_storage/models/oci.object_storage.models.Duration.rst @@ -0,0 +1,11 @@ +Duration +======== + +.. currentmodule:: oci.object_storage.models + +.. autoclass:: Duration + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/object_storage/models/oci.object_storage.models.ReplicationPolicy.rst b/docs/api/object_storage/models/oci.object_storage.models.ReplicationPolicy.rst new file mode 100644 index 0000000000..d76bc63ede --- /dev/null +++ b/docs/api/object_storage/models/oci.object_storage.models.ReplicationPolicy.rst @@ -0,0 +1,11 @@ +ReplicationPolicy +================= + +.. currentmodule:: oci.object_storage.models + +.. autoclass:: ReplicationPolicy + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/object_storage/models/oci.object_storage.models.ReplicationPolicySummary.rst b/docs/api/object_storage/models/oci.object_storage.models.ReplicationPolicySummary.rst new file mode 100644 index 0000000000..2e0793cd7c --- /dev/null +++ b/docs/api/object_storage/models/oci.object_storage.models.ReplicationPolicySummary.rst @@ -0,0 +1,11 @@ +ReplicationPolicySummary +======================== + +.. currentmodule:: oci.object_storage.models + +.. autoclass:: ReplicationPolicySummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/object_storage/models/oci.object_storage.models.ReplicationSource.rst b/docs/api/object_storage/models/oci.object_storage.models.ReplicationSource.rst new file mode 100644 index 0000000000..d4f7eb7a1d --- /dev/null +++ b/docs/api/object_storage/models/oci.object_storage.models.ReplicationSource.rst @@ -0,0 +1,11 @@ +ReplicationSource +================= + +.. currentmodule:: oci.object_storage.models + +.. autoclass:: ReplicationSource + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/object_storage/models/oci.object_storage.models.RetentionRule.rst b/docs/api/object_storage/models/oci.object_storage.models.RetentionRule.rst new file mode 100644 index 0000000000..9d7042a404 --- /dev/null +++ b/docs/api/object_storage/models/oci.object_storage.models.RetentionRule.rst @@ -0,0 +1,11 @@ +RetentionRule +============= + +.. currentmodule:: oci.object_storage.models + +.. autoclass:: RetentionRule + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/object_storage/models/oci.object_storage.models.RetentionRuleCollection.rst b/docs/api/object_storage/models/oci.object_storage.models.RetentionRuleCollection.rst new file mode 100644 index 0000000000..3c6f3d0709 --- /dev/null +++ b/docs/api/object_storage/models/oci.object_storage.models.RetentionRuleCollection.rst @@ -0,0 +1,11 @@ +RetentionRuleCollection +======================= + +.. currentmodule:: oci.object_storage.models + +.. autoclass:: RetentionRuleCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/object_storage/models/oci.object_storage.models.RetentionRuleDetails.rst b/docs/api/object_storage/models/oci.object_storage.models.RetentionRuleDetails.rst new file mode 100644 index 0000000000..90212f9196 --- /dev/null +++ b/docs/api/object_storage/models/oci.object_storage.models.RetentionRuleDetails.rst @@ -0,0 +1,11 @@ +RetentionRuleDetails +==================== + +.. currentmodule:: oci.object_storage.models + +.. autoclass:: RetentionRuleDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/object_storage/models/oci.object_storage.models.RetentionRuleSummary.rst b/docs/api/object_storage/models/oci.object_storage.models.RetentionRuleSummary.rst new file mode 100644 index 0000000000..a52b886a98 --- /dev/null +++ b/docs/api/object_storage/models/oci.object_storage.models.RetentionRuleSummary.rst @@ -0,0 +1,11 @@ +RetentionRuleSummary +==================== + +.. currentmodule:: oci.object_storage.models + +.. autoclass:: RetentionRuleSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/object_storage/models/oci.object_storage.models.UpdateRetentionRuleDetails.rst b/docs/api/object_storage/models/oci.object_storage.models.UpdateRetentionRuleDetails.rst new file mode 100644 index 0000000000..489c952138 --- /dev/null +++ b/docs/api/object_storage/models/oci.object_storage.models.UpdateRetentionRuleDetails.rst @@ -0,0 +1,11 @@ +UpdateRetentionRuleDetails +========================== + +.. currentmodule:: oci.object_storage.models + +.. autoclass:: UpdateRetentionRuleDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/secrets.rst b/docs/api/secrets.rst new file mode 100644 index 0000000000..271c41c6e0 --- /dev/null +++ b/docs/api/secrets.rst @@ -0,0 +1,24 @@ +Secrets +======= + +.. autosummary:: + :toctree: secrets/client + :nosignatures: + :template: autosummary/service_client.rst + + oci.secrets.SecretsClient + oci.secrets.SecretsClientCompositeOperations + +-------- + Models +-------- + +.. autosummary:: + :toctree: secrets/models + :nosignatures: + :template: autosummary/model_class.rst + + oci.secrets.models.Base64SecretBundleContentDetails + oci.secrets.models.SecretBundle + oci.secrets.models.SecretBundleContentDetails + oci.secrets.models.SecretBundleVersionSummary diff --git a/docs/api/secrets/client/oci.secrets.SecretsClient.rst b/docs/api/secrets/client/oci.secrets.SecretsClient.rst new file mode 100644 index 0000000000..6608d0dfa0 --- /dev/null +++ b/docs/api/secrets/client/oci.secrets.SecretsClient.rst @@ -0,0 +1,8 @@ +SecretsClient +============= + +.. currentmodule:: oci.secrets + +.. autoclass:: SecretsClient + :special-members: __init__ + :members: \ No newline at end of file diff --git a/docs/api/secrets/client/oci.secrets.SecretsClientCompositeOperations.rst b/docs/api/secrets/client/oci.secrets.SecretsClientCompositeOperations.rst new file mode 100644 index 0000000000..5bcaca8f6b --- /dev/null +++ b/docs/api/secrets/client/oci.secrets.SecretsClientCompositeOperations.rst @@ -0,0 +1,8 @@ +SecretsClientCompositeOperations +================================ + +.. currentmodule:: oci.secrets + +.. autoclass:: SecretsClientCompositeOperations + :special-members: __init__ + :members: \ No newline at end of file diff --git a/docs/api/secrets/models/oci.secrets.models.Base64SecretBundleContentDetails.rst b/docs/api/secrets/models/oci.secrets.models.Base64SecretBundleContentDetails.rst new file mode 100644 index 0000000000..6747142c70 --- /dev/null +++ b/docs/api/secrets/models/oci.secrets.models.Base64SecretBundleContentDetails.rst @@ -0,0 +1,11 @@ +Base64SecretBundleContentDetails +================================ + +.. currentmodule:: oci.secrets.models + +.. autoclass:: Base64SecretBundleContentDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/secrets/models/oci.secrets.models.SecretBundle.rst b/docs/api/secrets/models/oci.secrets.models.SecretBundle.rst new file mode 100644 index 0000000000..1b4fc5ca85 --- /dev/null +++ b/docs/api/secrets/models/oci.secrets.models.SecretBundle.rst @@ -0,0 +1,11 @@ +SecretBundle +============ + +.. currentmodule:: oci.secrets.models + +.. autoclass:: SecretBundle + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/secrets/models/oci.secrets.models.SecretBundleContentDetails.rst b/docs/api/secrets/models/oci.secrets.models.SecretBundleContentDetails.rst new file mode 100644 index 0000000000..3d03baef20 --- /dev/null +++ b/docs/api/secrets/models/oci.secrets.models.SecretBundleContentDetails.rst @@ -0,0 +1,11 @@ +SecretBundleContentDetails +========================== + +.. currentmodule:: oci.secrets.models + +.. autoclass:: SecretBundleContentDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/secrets/models/oci.secrets.models.SecretBundleVersionSummary.rst b/docs/api/secrets/models/oci.secrets.models.SecretBundleVersionSummary.rst new file mode 100644 index 0000000000..e850ff153a --- /dev/null +++ b/docs/api/secrets/models/oci.secrets.models.SecretBundleVersionSummary.rst @@ -0,0 +1,11 @@ +SecretBundleVersionSummary +========================== + +.. currentmodule:: oci.secrets.models + +.. autoclass:: SecretBundleVersionSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/vault.rst b/docs/api/vault.rst new file mode 100644 index 0000000000..bc891c39e7 --- /dev/null +++ b/docs/api/vault.rst @@ -0,0 +1,34 @@ +Vault +===== + +.. autosummary:: + :toctree: vault/client + :nosignatures: + :template: autosummary/service_client.rst + + oci.vault.VaultsClient + oci.vault.VaultsClientCompositeOperations + +-------- + Models +-------- + +.. autosummary:: + :toctree: vault/models + :nosignatures: + :template: autosummary/model_class.rst + + oci.vault.models.Base64SecretContentDetails + oci.vault.models.ChangeSecretCompartmentDetails + oci.vault.models.CreateSecretDetails + oci.vault.models.ScheduleSecretDeletionDetails + oci.vault.models.ScheduleSecretVersionDeletionDetails + oci.vault.models.Secret + oci.vault.models.SecretContentDetails + oci.vault.models.SecretExpiryRule + oci.vault.models.SecretReuseRule + oci.vault.models.SecretRule + oci.vault.models.SecretSummary + oci.vault.models.SecretVersion + oci.vault.models.SecretVersionSummary + oci.vault.models.UpdateSecretDetails diff --git a/docs/api/vault/client/oci.vault.VaultsClient.rst b/docs/api/vault/client/oci.vault.VaultsClient.rst new file mode 100644 index 0000000000..a80c58b851 --- /dev/null +++ b/docs/api/vault/client/oci.vault.VaultsClient.rst @@ -0,0 +1,8 @@ +VaultsClient +============ + +.. currentmodule:: oci.vault + +.. autoclass:: VaultsClient + :special-members: __init__ + :members: \ No newline at end of file diff --git a/docs/api/vault/client/oci.vault.VaultsClientCompositeOperations.rst b/docs/api/vault/client/oci.vault.VaultsClientCompositeOperations.rst new file mode 100644 index 0000000000..c98caa9f7a --- /dev/null +++ b/docs/api/vault/client/oci.vault.VaultsClientCompositeOperations.rst @@ -0,0 +1,8 @@ +VaultsClientCompositeOperations +=============================== + +.. currentmodule:: oci.vault + +.. autoclass:: VaultsClientCompositeOperations + :special-members: __init__ + :members: \ No newline at end of file diff --git a/docs/api/vault/models/oci.vault.models.Base64SecretContentDetails.rst b/docs/api/vault/models/oci.vault.models.Base64SecretContentDetails.rst new file mode 100644 index 0000000000..364edfa0df --- /dev/null +++ b/docs/api/vault/models/oci.vault.models.Base64SecretContentDetails.rst @@ -0,0 +1,11 @@ +Base64SecretContentDetails +========================== + +.. currentmodule:: oci.vault.models + +.. autoclass:: Base64SecretContentDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/vault/models/oci.vault.models.ChangeSecretCompartmentDetails.rst b/docs/api/vault/models/oci.vault.models.ChangeSecretCompartmentDetails.rst new file mode 100644 index 0000000000..7dc96aba0c --- /dev/null +++ b/docs/api/vault/models/oci.vault.models.ChangeSecretCompartmentDetails.rst @@ -0,0 +1,11 @@ +ChangeSecretCompartmentDetails +============================== + +.. currentmodule:: oci.vault.models + +.. autoclass:: ChangeSecretCompartmentDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/vault/models/oci.vault.models.CreateSecretDetails.rst b/docs/api/vault/models/oci.vault.models.CreateSecretDetails.rst new file mode 100644 index 0000000000..aab646bbf9 --- /dev/null +++ b/docs/api/vault/models/oci.vault.models.CreateSecretDetails.rst @@ -0,0 +1,11 @@ +CreateSecretDetails +=================== + +.. currentmodule:: oci.vault.models + +.. autoclass:: CreateSecretDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/vault/models/oci.vault.models.ScheduleSecretDeletionDetails.rst b/docs/api/vault/models/oci.vault.models.ScheduleSecretDeletionDetails.rst new file mode 100644 index 0000000000..6d0da34138 --- /dev/null +++ b/docs/api/vault/models/oci.vault.models.ScheduleSecretDeletionDetails.rst @@ -0,0 +1,11 @@ +ScheduleSecretDeletionDetails +============================= + +.. currentmodule:: oci.vault.models + +.. autoclass:: ScheduleSecretDeletionDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/vault/models/oci.vault.models.ScheduleSecretVersionDeletionDetails.rst b/docs/api/vault/models/oci.vault.models.ScheduleSecretVersionDeletionDetails.rst new file mode 100644 index 0000000000..307c8b8b2b --- /dev/null +++ b/docs/api/vault/models/oci.vault.models.ScheduleSecretVersionDeletionDetails.rst @@ -0,0 +1,11 @@ +ScheduleSecretVersionDeletionDetails +==================================== + +.. currentmodule:: oci.vault.models + +.. autoclass:: ScheduleSecretVersionDeletionDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/vault/models/oci.vault.models.Secret.rst b/docs/api/vault/models/oci.vault.models.Secret.rst new file mode 100644 index 0000000000..d7a394bd31 --- /dev/null +++ b/docs/api/vault/models/oci.vault.models.Secret.rst @@ -0,0 +1,11 @@ +Secret +====== + +.. currentmodule:: oci.vault.models + +.. autoclass:: Secret + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/vault/models/oci.vault.models.SecretContentDetails.rst b/docs/api/vault/models/oci.vault.models.SecretContentDetails.rst new file mode 100644 index 0000000000..5c32833beb --- /dev/null +++ b/docs/api/vault/models/oci.vault.models.SecretContentDetails.rst @@ -0,0 +1,11 @@ +SecretContentDetails +==================== + +.. currentmodule:: oci.vault.models + +.. autoclass:: SecretContentDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/vault/models/oci.vault.models.SecretExpiryRule.rst b/docs/api/vault/models/oci.vault.models.SecretExpiryRule.rst new file mode 100644 index 0000000000..3513120621 --- /dev/null +++ b/docs/api/vault/models/oci.vault.models.SecretExpiryRule.rst @@ -0,0 +1,11 @@ +SecretExpiryRule +================ + +.. currentmodule:: oci.vault.models + +.. autoclass:: SecretExpiryRule + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/vault/models/oci.vault.models.SecretReuseRule.rst b/docs/api/vault/models/oci.vault.models.SecretReuseRule.rst new file mode 100644 index 0000000000..b7fcdb68eb --- /dev/null +++ b/docs/api/vault/models/oci.vault.models.SecretReuseRule.rst @@ -0,0 +1,11 @@ +SecretReuseRule +=============== + +.. currentmodule:: oci.vault.models + +.. autoclass:: SecretReuseRule + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/vault/models/oci.vault.models.SecretRule.rst b/docs/api/vault/models/oci.vault.models.SecretRule.rst new file mode 100644 index 0000000000..2432425e34 --- /dev/null +++ b/docs/api/vault/models/oci.vault.models.SecretRule.rst @@ -0,0 +1,11 @@ +SecretRule +========== + +.. currentmodule:: oci.vault.models + +.. autoclass:: SecretRule + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/vault/models/oci.vault.models.SecretSummary.rst b/docs/api/vault/models/oci.vault.models.SecretSummary.rst new file mode 100644 index 0000000000..4f6414e3ce --- /dev/null +++ b/docs/api/vault/models/oci.vault.models.SecretSummary.rst @@ -0,0 +1,11 @@ +SecretSummary +============= + +.. currentmodule:: oci.vault.models + +.. autoclass:: SecretSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/vault/models/oci.vault.models.SecretVersion.rst b/docs/api/vault/models/oci.vault.models.SecretVersion.rst new file mode 100644 index 0000000000..a9144316a6 --- /dev/null +++ b/docs/api/vault/models/oci.vault.models.SecretVersion.rst @@ -0,0 +1,11 @@ +SecretVersion +============= + +.. currentmodule:: oci.vault.models + +.. autoclass:: SecretVersion + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/vault/models/oci.vault.models.SecretVersionSummary.rst b/docs/api/vault/models/oci.vault.models.SecretVersionSummary.rst new file mode 100644 index 0000000000..a08f9322bb --- /dev/null +++ b/docs/api/vault/models/oci.vault.models.SecretVersionSummary.rst @@ -0,0 +1,11 @@ +SecretVersionSummary +==================== + +.. currentmodule:: oci.vault.models + +.. autoclass:: SecretVersionSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/vault/models/oci.vault.models.UpdateSecretDetails.rst b/docs/api/vault/models/oci.vault.models.UpdateSecretDetails.rst new file mode 100644 index 0000000000..6efa48a8c5 --- /dev/null +++ b/docs/api/vault/models/oci.vault.models.UpdateSecretDetails.rst @@ -0,0 +1,11 @@ +UpdateSecretDetails +=================== + +.. currentmodule:: oci.vault.models + +.. autoclass:: UpdateSecretDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/examples/add_soc_group_policy.py b/examples/add_soc_group_policy.py new file mode 100755 index 0000000000..162b4297f8 --- /dev/null +++ b/examples/add_soc_group_policy.py @@ -0,0 +1,92 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + +from os import path +import argparse + +try: + import oci + from oci.identity.models import CreatePolicyDetails, CreateGroupDetails +except ImportError as error: + print(error) + print("") + print("OCI libraries not installed. Please install them with 'pip3 install oci'") + exit(-1) + + +def create_soc_group(): + """Function to create a specified or default SOC group""" + print("Creating group " + groupName) + request = CreateGroupDetails() + request.compartment_id = tcompartment_id + request.name = groupName + request.description = "Created with the SOC setup script" + try: + group = identity.create_group(request) + group_id = group.data.id + print(group_id) + except oci.exceptions.ServiceError as e: + if e.status == 409: + print("Group already exists...") + return + + else: + print("Operational Error" + e.message) + + +def main(): + print("Adding IAM policy for WAF Access...") + + create_soc_group() + waf_policy = CreatePolicyDetails() + waf_policy.compartment_id = compartment_id + waf_policy.name = 'waas_iam_policy' + waf_policy.description = "Allows SOC team to appropriately access WAF, audit and metric services" + waf_policy.statements = statements + try: + identity.create_policy(waf_policy) + except oci.exceptions.ServiceError as e: + if e.status == 409: + print("Policy exists, do nothing") + return + else: + print(e) + return + print("Added the policy successfully") + + +if __name__ == "__main__": + OCIConfigFile = '~/.oci/config' + parser = argparse.ArgumentParser() + parser.add_argument("-c", "--config", action="store", help="Tenancy configuration file") + parser.add_argument("-g", "--group", action="store", help="Policy Group Name") + parser.add_argument("-o", "--OCID", action="store", help="Specify the OCID of the comapartment to associate this " + "policy") + args = parser.parse_args() + if args.group is not None: + groupName = args.group + else: + print("Group name is missing") + exit(-1) + if args.config is not None and path.exists(args.config): + OCIConfigFile = args.config + compartment_id = args.OCID + if compartment_id is None: + print("Provide the OCID of the compartment to which the new policies will be associated with") + exit(-1) + + print("OCI Config :" + OCIConfigFile + " Compartment OCID : " + compartment_id) + + # Set up config + config = oci.config.from_file(OCIConfigFile, "DEFAULT") + # Create a service client + identity = oci.identity.IdentityClient(config) + tcompartment_id = config['tenancy'] + + statement1 = "Allow group " + groupName + " to manage waas-family in compartment id " + compartment_id + statement2 = "Allow group " + groupName + " to read audit-events in compartment id " + compartment_id +\ + " where target.metrics.namespace='oci_waf'" + statement3 = "Allow group " + groupName + " to read metrics in compartment id " + compartment_id +\ + " where target.metrics.namespace='oci_waf'" + statements = [statement1, statement2, statement3] + main() diff --git a/examples/add_soc_user.py b/examples/add_soc_user.py new file mode 100755 index 0000000000..7931c042b9 --- /dev/null +++ b/examples/add_soc_user.py @@ -0,0 +1,135 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + +from os import path + +import argparse +try: + import oci + from oci.identity.models import CreateUserDetails, AddUserToGroupDetails, CreateApiKeyDetails +except ImportError as error: + print(error) + print("") + print("OCI libraries not installed. Please install them with 'pip3 install oci'") + exit(-1) + + +def search_soc_group(): + """Function to search a specified SOC group""" + global group_id + structured_search = oci.resource_search.models.StructuredSearchDetails(query="query group resources where name = '" + groupName + "'", type='Structured', matching_context_type=oci.resource_search.models.SearchDetails.MATCHING_CONTEXT_TYPE_NONE) + results = search_client.search_resources(structured_search) + for result in results.data.items: + if debug: + print("Group ID : " + result.identifier) + group_id = result.identifier + + +def create_soc_user(): + """Create a SOC user, upload public key and add the user to the SOC group""" + # Load Public Key + apikeydetails = CreateApiKeyDetails() + with open(fileName, "r") as certfile: + data = certfile.read() + apikeydetails.key = data + + # Populate a user request + request = CreateUserDetails() + request.compartment_id = compartment_id + request.name = userName + request.description = "SOC User created For WAF Access" + + try: + user = identity.create_user(request) + uid = user.data.id + + except oci.exceptions.ServiceError as e: + if e.status == 409: + print("User '" + request.name + "' already exists.") + structured_user_search = oci.resource_search.models.StructuredSearchDetails( + query="query user resources where name = '" + userName + "'", + type='Structured', + matching_context_type=oci.resource_search.models.SearchDetails.MATCHING_CONTEXT_TYPE_NONE) + results = search_client.search_resources(structured_user_search) + for result in results.data.items: + if debug: + print("User ID : " + result.identifier) + uid = result.identifier + else: + print(e) + # Upload the user's public cert for API Access + try: + identity.upload_api_key(uid, apikeydetails) + print("User's public key is uploaded successfully") + except oci.exceptions.ServiceError as e: + if e.status == 409: + print("User " + userName + " already has a public key associated, do nothing") + else: + print(e) + # Add the newly created user to the SOC Group + try: + add_soc_member(uid) + except oci.exceptions.ServiceError as e: + if e.status == 409: + print("User" + userName + " has been already added to the group :" + groupName) + else: + print(e) + + +def add_soc_member(uid): + """Add a given user OCID to the SOC group""" + request = AddUserToGroupDetails() + request.group_id = group_id + request.user_id = uid + try: + identity.add_user_to_group(request) + except oci.exceptions.ServiceError as e: + if e.status == 409: + print("User is already a member of the group " + groupName) + else: + print(e) + + +def main(): + print("Creating user : " + userName + " and adding to OCI group: " + groupName) + search_soc_group() + create_soc_user() + + +if __name__ == "__main__": + groupName = 'SOC' + debug = False + OCIConfigFile = '~/.oci/config' + parser = argparse.ArgumentParser() + parser.add_argument("-d", "--debug", action="store_true", help="Turn on debug mode") + parser.add_argument("-c", "--config", action="store", help="Tenancy configuration file") + parser.add_argument("-u", "--username", action="store", help="specify the username to add.") + parser.add_argument("-g", "--groupname", action="store", default="soc", + help="Specify the group name to add this SOC user to. Defaults to 'SOC'.") + parser.add_argument("-f", "--certpath", action="store", type=str, help="Specify absolute path to the public key file in PEM format, See - https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/apisigningkey.htm#How") + args = parser.parse_args() + if args.debug is not None: + debug = args.debug + if args.config is not None and path.exists(args.config): + OCIConfigFile = args.config + userName = args.username + if userName is None: + print("Username is mandatory, provide the username as -u username") + exit(-1) + groupName = args.groupname + fileName = args.certpath + if fileName is None or not path.exists(fileName): + print("Public Certificate file not provided or does not exist, provide the filepath as -f filepath") + exit(-1) + if debug: + print(userName, " : " + groupName + " : " + fileName) + + # Set up config + config = oci.config.from_file(OCIConfigFile, "DEFAULT") + # Create a service client + identity = oci.identity.IdentityClient(config) + + compartment_id = config["tenancy"] + search_client = oci.resource_search.ResourceSearchClient(config) + group_id = "" + main() diff --git a/examples/adw_example.py b/examples/adw_example.py index 86a9e658b7..364d19102a 100644 --- a/examples/adw_example.py +++ b/examples/adw_example.py @@ -17,7 +17,7 @@ def create_adw(db_client): # Create the model and populate the values # See: https://docs.cloud.oracle.com/iaas/Content/Database/Tasks/adwcreating.htm - adw_request = oci.database.models.CreateAutonomousDataWarehouseDetails() + adw_request = oci.database.models.CreateAutonomousDatabaseDetails() adw_request.compartment_id = compartment_id adw_request.cpu_core_count = 1 @@ -27,12 +27,14 @@ def create_adw(db_client): adw_request.license_model = adw_request.LICENSE_MODEL_BRING_YOUR_OWN_LICENSE # Remeber this is only an example. Please change the password. adw_request.admin_password = "Welcome1!SDK" + adw_request.db_workload = "DW" - adw_response = db_client.create_autonomous_data_warehouse( - create_autonomous_data_warehouse_details=adw_request, + adw_response = db_client.create_autonomous_database( + create_autonomous_database_details=adw_request, retry_strategy=oci.retry.DEFAULT_RETRY_STRATEGY) adw_id = adw_response.data.id + oci.wait_until(db_client, db_client.get_autonomous_database(adw_id), 'lifecycle_state', 'AVAILABLE') print("Created Automated Data Warehouse {}".format(adw_id)) return adw_id @@ -40,7 +42,9 @@ def create_adw(db_client): def delete_adw(db_client, adw_id): # Delete the autonomous data warehouse - response = db_client.delete_autonomous_data_warehouse(adw_id) + response = db_client.delete_autonomous_database(adw_id) + print("Waiting Automated Data Warehouse to be deleted") + oci.wait_until(db_client, db_client.get_autonomous_database(adw_id), 'lifecycle_state', 'TERMINATED') print(response.data) diff --git a/examples/container_engine.py b/examples/container_engine.py index 3679f45e56..e4b5d5c7c7 100644 --- a/examples/container_engine.py +++ b/examples/container_engine.py @@ -169,7 +169,7 @@ def create_node_pool(ce_client, ads, cluster_id, subnet): name="PythonSDK_nodepool1", kubernetes_version=get_kubernetes_version(ce_client), node_image_name="Oracle-Linux-7.4", - node_shape="VM.Standard1.1", + node_shape="VM.Standard2.1", initial_node_labels=[{"nodes": "Example Nodes"}], node_config_details=create_node_pool_node_config_details) diff --git a/examples/file_storage_example.py b/examples/file_storage_example.py index faa255017a..aa4677c259 100644 --- a/examples/file_storage_example.py +++ b/examples/file_storage_example.py @@ -71,37 +71,26 @@ def create_vcn_and_subnet(virtual_network, compartment_id, availability_domain): def delete_vcn_and_subnet(virtual_network, vcn_and_subnet): vcn = vcn_and_subnet['vcn'] subnet = vcn_and_subnet['subnet'] - + composite_virtual_network = oci.core.VirtualNetworkClientCompositeOperations(virtual_network) # Sometimes we can't delete the subnet straight after a mount target has been deleted as network resources # still need to clear. If we get a conflict, try a few times before bailing out attempts = 0 while attempts < 5: try: - virtual_network.delete_subnet(subnet.id) - oci.wait_until( - virtual_network, - virtual_network.get_subnet(subnet.id), - 'lifecycle_state', - 'TERMINATED', - max_wait_seconds=600, - succeed_on_not_found=True + composite_virtual_network.delete_subnet_and_wait_for_state( + subnet.id, + [oci.core.models.Subnet.LIFECYCLE_STATE_TERMINATED] ) break except oci.exceptions.ServiceError as e: attempts += 1 if e.status == 409 and attempts < 5: - time.sleep(5) + time.sleep(50) else: raise - - virtual_network.delete_vcn(vcn.id) - oci.wait_until( - virtual_network, - virtual_network.get_vcn(vcn.id), - 'lifecycle_state', - 'TERMINATED', - max_wait_seconds=600, - succeed_on_not_found=True + composite_virtual_network.delete_vcn_and_wait_for_state( + vcn.id, + [oci.core.models.Vcn.LIFECYCLE_STATE_TERMINATED] ) @@ -264,14 +253,14 @@ def delete_vcn_and_subnet(virtual_network, vcn_and_subnet): # Since listing is a paginated operation, we can use the functionality in oci.pagination all_exports_by_file_system = oci.pagination.list_call_get_all_results( file_storage_client.list_exports, - compartment_id, + compartment_id=compartment_id, file_system_id=file_system.id ) print('All exports by file system:\n{}'.format(all_exports_by_file_system.data)) print('=============================\n') all_exports_by_export_set = oci.pagination.list_call_get_all_results( file_storage_client.list_exports, - compartment_id, + compartment_id=compartment_id, export_set_id=mount_target.export_set_id ) print('All exports by export set:\n{}'.format(all_exports_by_export_set.data)) diff --git a/examples/get_all_instance_ip_addresses_and_dns_info.py b/examples/get_all_instance_ip_addresses_and_dns_info.py index f0461a48b1..a64d423a25 100644 --- a/examples/get_all_instance_ip_addresses_and_dns_info.py +++ b/examples/get_all_instance_ip_addresses_and_dns_info.py @@ -39,7 +39,7 @@ def load_reserved_public_ips_for_all_compartments(virtual_network_client, identi identity_client.list_compartments, config['tenancy'] ).data - compartment_ids = [c.id for c in compartments] + compartment_ids = [c.id for c in filter(lambda c: c.lifecycle_state == 'ACTIVE', compartments)] if config['tenancy'] not in compartment_ids: compartment_ids.append(config['tenancy']) diff --git a/examples/instance_pools_example.py b/examples/instance_pools_example.py index f65e09a7a9..aea701cc28 100644 --- a/examples/instance_pools_example.py +++ b/examples/instance_pools_example.py @@ -57,13 +57,20 @@ def _wait_until_lb_becomes_attached(cim_client, instance_pool_id): cim_client, cim_client.get_instance_pool(instance_pool_id), evaluate_response=( - lambda r: r.data.load_balancers[0].lifecycle_state.upper() == "ATTACHED")) + lambda r: r.data.load_balancers[0].lifecycle_state.upper() == "ATTACHED"), + max_wait_seconds=6000) print("Load balancer attached to instance pool") except Exception: print("LB could not be attached!") raise +def _delete_tag_defaults(identity_client, compartment_id): + tag_default_list = identity_client.list_tag_defaults(compartment_id=compartment_id).data + for tag_default in tag_default_list: + identity_client.delete_tag_default(tag_default.id) + + # === Main === if __name__ == "__main__": @@ -108,6 +115,10 @@ def _wait_until_lb_becomes_attached(cim_client, instance_pool_id): compute_management_client = ComputeManagementClient(config) composite_client = ComputeManagementClientCompositeOperations(compute_management_client) + identity_client = oci.identity.IdentityClient(config) + # disable tag defaults + _delete_tag_defaults(identity_client, args.compartment_id) + launch_details = InstanceConfigurationLaunchInstanceDetails( compartment_id=args.compartment_id, display_name="some instance name", diff --git a/examples/launch_db_system_example.py b/examples/launch_db_system_example.py index a365b964fd..bb1a66948b 100644 --- a/examples/launch_db_system_example.py +++ b/examples/launch_db_system_example.py @@ -60,16 +60,10 @@ def create_vcn(virtual_network, compartment_id, cidr_block): def delete_vcn(virtual_network, vcn): - virtual_network.delete_vcn(vcn.id) - oci.wait_until( - virtual_network, - virtual_network.get_vcn(vcn.id), - 'lifecycle_state', - 'TERMINATED', - # For a deletion, the record may no longer be available and the waiter may encounter a 404 when trying to retrieve it. - # This flag tells the waiter to consider 404s as successful (which is only really valid for delete/terminate since - # the record not being there anymore can signify a successful delete/terminate) - succeed_on_not_found=True + composite_virtual_network = oci.core.VirtualNetworkClientCompositeOperations(virtual_network) + composite_virtual_network.delete_vcn_and_wait_for_state( + vcn.id, + [oci.core.models.Vcn.LIFECYCLE_STATE_TERMINATED] ) print('Deleted VCN: {}'.format(vcn.id)) @@ -98,15 +92,11 @@ def create_subnet(virtual_network, vcn, availability_domain): def delete_subnet(virtual_network, subnet): - virtual_network.delete_subnet(subnet.id) - oci.wait_until( - virtual_network, - virtual_network.get_subnet(subnet.id), - 'lifecycle_state', - 'TERMINATED', - succeed_on_not_found=True + composite_virtual_network = oci.core.VirtualNetworkClientCompositeOperations(virtual_network) + composite_virtual_network.delete_subnet_and_wait_for_state( + subnet.id, + [oci.core.models.Subnet.LIFECYCLE_STATE_TERMINATED] ) - print('Deleted Subnet: {}'.format(subnet.id)) def list_db_system_shapes(database_client, compartment_id): @@ -114,8 +104,8 @@ def list_db_system_shapes(database_client, compartment_id): # in oci.pagination to get all the results without having to manually deal with page tokens list_db_shape_results = oci.pagination.list_call_get_all_results( database_client.list_db_system_shapes, - availability_domain, - compartment_id + availability_domain=availability_domain, + compartment_id=compartment_id ) print('\nDB System Shapes') @@ -128,7 +118,7 @@ def list_db_versions(database_client, compartment_id): # all the results without having to manually deal with page tokens list_db_version_results = oci.pagination.list_call_get_all_results( database_client.list_db_versions, - compartment_id + compartment_id=compartment_id ) print('\nDB Versions') @@ -139,7 +129,7 @@ def list_db_versions(database_client, compartment_id): # the usage of the db_system_shape keword argument list_db_version_results = oci.pagination.list_call_get_all_results( database_client.list_db_versions, - compartment_id, + compartment_id=compartment_id, db_system_shape=DB_SYSTEM_SHAPE ) @@ -154,8 +144,8 @@ def list_db_home_and_databases_under_db_system(database_client, compartment_id, # here list_db_homes_response = oci.pagination.list_call_get_all_results( database_client.list_db_homes, - compartment_id, - db_system.id + compartment_id=compartment_id, + db_system_id=db_system.id ) print('\nDB Homes For DB System') print('===========================') @@ -173,8 +163,8 @@ def list_db_home_and_databases_under_db_system(database_client, compartment_id, # operation so we can use the functions in oci.pagination here list_databases_response = oci.pagination.list_call_get_all_results( database_client.list_databases, - compartment_id, - db_home.id + compartment_id=compartment_id, + db_home_id=db_home.id ) print('\nDatabases For DB Home') print('===========================') diff --git a/examples/launch_instance_pv_encryption_intransit_example.py b/examples/launch_instance_pv_encryption_intransit_example.py index a2bcea49da..5ccc543e2c 100755 --- a/examples/launch_instance_pv_encryption_intransit_example.py +++ b/examples/launch_instance_pv_encryption_intransit_example.py @@ -7,7 +7,7 @@ # * Create a VCN, subnet and internet gateway. This will enable the instance to connect to the public internet. # If this is not desired then the internet gateway (and associated route rule) don't need to be created. # * Launch an instance. Certain assumptions are made about launching the instance -# - The instance launched will have a shape of VM.Standard1.1 +# - The instance launched will have a shape of VM.Standard2.1 # - The instance launched will use an Oracle Linux 7.5 image # # Resources created by the script will be removed when the script is done. @@ -223,7 +223,7 @@ def get_image(compute, operating_system, operating_system_version, shape): subnet = create_subnet(virtual_network_client, vcn, availability_domain) internet_gateway = create_internet_gateway(virtual_network_client, vcn) - image = get_image(compute_client, 'Oracle Linux', '7.5', 'VM.Standard1.1') + image = get_image(compute_client, 'Oracle Linux', '7.5', 'VM.Standard2.1') with open(ssh_public_key_path, mode='r') as file: ssh_key = file.read() @@ -257,7 +257,7 @@ def get_image(compute, operating_system, operating_system_version, shape): display_name=instance_display_name, compartment_id=compartment_id, availability_domain=availability_domain, - shape='VM.Standard1.1', + shape='VM.Standard2.1', metadata=instance_metadata, extended_metadata=instance_extended_metadata, is_pv_encryption_in_transit_enabled=True, diff --git a/examples/list_ipsec_and_virtual_circuits_in_tenancy/how_to_run_in_cloud_shell.rst b/examples/list_ipsec_and_virtual_circuits_in_tenancy/how_to_run_in_cloud_shell.rst new file mode 100644 index 0000000000..2d21de2de2 --- /dev/null +++ b/examples/list_ipsec_and_virtual_circuits_in_tenancy/how_to_run_in_cloud_shell.rst @@ -0,0 +1,27 @@ +----------------------------- +Executing using Cloud Shell: +----------------------------- + +.. code-block:: + + 1. Create virtual env of python + python -m venv python_venv + source python_venv/bin/activate + + 2. install oci sdk package + pip install oci + + 3. clone the oci sdk repo + cd $HOME + git init + git clone https://github.com/oracle/oci-python-sdk + + 4. Config OCI config file - ~/.oci/config + Please follow SDK config documentation - https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/sdkconfig.htm + + 5. Execute + cd $HOME/oci-python-sdk/examples/list_ipsec_and_virtual_circuits_in_tenancy + python list_all_ipsec_tunnels_in_tenancy.py + python list_all_virtual_circuits_in_tenancy.py + + diff --git a/examples/load_balancer_path_route_sets_example.py b/examples/load_balancer_path_route_sets_example.py index d9525ad327..11851b8644 100644 --- a/examples/load_balancer_path_route_sets_example.py +++ b/examples/load_balancer_path_route_sets_example.py @@ -90,37 +90,19 @@ def delete_vcn_and_subnets(virtual_network, vcn_and_subnets): subnet_one = vcn_and_subnets['subnets'][0] subnet_two = vcn_and_subnets['subnets'][1] - virtual_network.delete_subnet(subnet_one.id) - oci.wait_until( - virtual_network, - virtual_network.get_subnet(subnet_one.id), - 'lifecycle_state', - 'TERMINATED', - max_wait_seconds=300, - # For a deletion, the record may no longer be available and the waiter may encounter a 404 when trying to retrieve it. - # This flag tells the waiter to consider 404s as successful (which is only really valid for delete/terminate since - # the record not being there anymore can signify a successful delete/terminate) - succeed_on_not_found=True + composite_virtual_network = oci.core.VirtualNetworkClientCompositeOperations(virtual_network) + composite_virtual_network.delete_subnet_and_wait_for_state( + subnet_one.id, + [oci.core.models.Subnet.LIFECYCLE_STATE_TERMINATED] ) - - virtual_network.delete_subnet(subnet_two.id) - oci.wait_until( - virtual_network, - virtual_network.get_subnet(subnet_two.id), - 'lifecycle_state', - 'TERMINATED', - max_wait_seconds=300, - succeed_on_not_found=True + composite_virtual_network.delete_subnet_and_wait_for_state( + subnet_two.id, + [oci.core.models.Subnet.LIFECYCLE_STATE_TERMINATED] ) - virtual_network.delete_vcn(vcn.id) - oci.wait_until( - virtual_network, - virtual_network.get_vcn(vcn.id), - 'lifecycle_state', - 'TERMINATED', - max_wait_seconds=300, - succeed_on_not_found=True + composite_virtual_network.delete_vcn_and_wait_for_state( + vcn.id, + [oci.core.models.Vcn.LIFECYCLE_STATE_TERMINATED] ) diff --git a/examples/move_compartment_example.py b/examples/move_compartment_example.py index e008664eca..273bbbd9c5 100644 --- a/examples/move_compartment_example.py +++ b/examples/move_compartment_example.py @@ -7,6 +7,7 @@ # * create cp_source_PYSDK under tenancy # * create cp_target_PYSDK under tenancy # * move cp_source_PYSDK under cp_target_PYSDK +import time import oci @@ -36,6 +37,9 @@ compartment_target_id = create_compartment_response.data.id print('Created target compartment: {}'.format(create_compartment_response.data)) +# require a few seconds for system to process +time.sleep(10) + move_compartment_response = identity.move_compartment( compartment_source_id, oci.identity.models.MoveCompartmentDetails( diff --git a/examples/network_security_groups_example.py b/examples/network_security_groups_example.py index aacc7c36ab..6a3962befd 100644 --- a/examples/network_security_groups_example.py +++ b/examples/network_security_groups_example.py @@ -173,7 +173,7 @@ def launch_instance_in_nsg(virtual_network_client, display_name="NSG Example Instance", compartment_id=compartment_id, availability_domain=availability_domain, - shape='VM.Standard1.1', + shape='VM.Standard2.1', source_details=oci.core.models.InstanceSourceViaImageDetails(image_id=image_id), create_vnic_details=oci.core.models.CreateVnicDetails( subnet_id=subnet_id, diff --git a/examples/remote_peering_connection_example.py b/examples/remote_peering_connection_example.py index 89b8d9477f..779569c867 100644 --- a/examples/remote_peering_connection_example.py +++ b/examples/remote_peering_connection_example.py @@ -86,35 +86,25 @@ def delete_vcn_drg_and_drg_attachment(virtual_network_client, vcn_drg_and_drg_at vcn = vcn_drg_and_drg_attachment['vcn'] drg = vcn_drg_and_drg_attachment['drg'] drg_attachment = vcn_drg_and_drg_attachment['drg_attachment'] + composite_virtual_network_client = oci.core.VirtualNetworkClientCompositeOperations( + virtual_network_client) print('Deleting DRG Attachment') - virtual_network_client.delete_drg_attachment(drg_attachment.id) - oci.wait_until( - virtual_network_client, - virtual_network_client.get_drg_attachment(drg_attachment.id), - 'lifecycle_state', - 'DETACHED', - succeed_on_not_found=True + composite_virtual_network_client.delete_drg_attachment_and_wait_for_state( + drg_attachment.id, + oci.core.models.DrgAttachment.LIFECYCLE_STATE_DETACHED ) print('Deleting DRG') - virtual_network_client.delete_drg(drg.id) - oci.wait_until( - virtual_network_client, - virtual_network_client.get_drg(drg.id), - 'lifecycle_state', - 'TERMINATED', - succeed_on_not_found=True + composite_virtual_network_client.delete_drg_and_wait_for_state( + drg.id, + oci.core.models.Drg.LIFECYCLE_STATE_TERMINATED ) print('Deleting VCN') - virtual_network_client.delete_vcn(vcn.id) - oci.wait_until( - virtual_network_client, - virtual_network_client.get_vcn(vcn.id), - 'lifecycle_state', - 'TERMINATED', - succeed_on_not_found=True + composite_virtual_network_client.delete_vcn_and_wait_for_state( + vcn.id, + oci.core.models.Vcn.LIFECYCLE_STATE_TERMINATED ) diff --git a/examples/reserved_public_ip_example.py b/examples/reserved_public_ip_example.py index 06259bf1a1..db86d87c73 100644 --- a/examples/reserved_public_ip_example.py +++ b/examples/reserved_public_ip_example.py @@ -66,30 +66,18 @@ def create_vcn_and_subnet(virtual_network, compartment_id, availability_domain): def delete_vcn_and_subnet(virtual_network, vcn_and_subnet): + composite_virtual_network = oci.core.VirtualNetworkClientCompositeOperations(virtual_network) vcn = vcn_and_subnet['vcn'] subnet = vcn_and_subnet['subnet'] - virtual_network.delete_subnet(subnet.id) - oci.wait_until( - virtual_network, - virtual_network.get_subnet(subnet.id), - 'lifecycle_state', - 'TERMINATED', - max_wait_seconds=300, - # For a deletion, the record may no longer be available and the waiter may encounter a 404 when trying to retrieve it. - # This flag tells the waiter to consider 404s as successful (which is only really valid for delete/terminate since - # the record not being there anymore can signify a successful delete/terminate) - succeed_on_not_found=True + composite_virtual_network.delete_subnet_and_wait_for_state( + subnet.id, + [oci.core.models.Subnet.LIFECYCLE_STATE_TERMINATED] ) - virtual_network.delete_vcn(vcn.id) - oci.wait_until( - virtual_network, - virtual_network.get_vcn(vcn.id), - 'lifecycle_state', - 'TERMINATED', - max_wait_seconds=300, - succeed_on_not_found=True + composite_virtual_network.delete_vcn_and_wait_for_state( + vcn.id, + [oci.core.models.Vcn.LIFECYCLE_STATE_TERMINATED] ) @@ -268,6 +256,5 @@ def terminate_instance(compute, instance): succeed_on_not_found=True ) print('Terminated instance - ephemeral public IP also deleted') - delete_vcn_and_subnet(virtual_network, vcn_and_subnet) print('Script finished') diff --git a/examples/retries.py b/examples/retries.py index 4b08aeb22f..dd3352abe4 100644 --- a/examples/retries.py +++ b/examples/retries.py @@ -25,13 +25,14 @@ def do_vcn_interactions_with_retries(virtual_network_client, compartment_id, ret retry_strategy=retry_strategy ) - vcn = oci.wait_until( + vcn_response = oci.wait_until( virtual_network_client, virtual_network_client.get_vcn(result.data.id), 'lifecycle_state', 'AVAILABLE', max_wait_seconds=300 - ).data + ) + vcn = vcn_response.data print('Created VCN') print('================') print(vcn) @@ -50,7 +51,7 @@ def do_vcn_interactions_with_retries(virtual_network_client, compartment_id, ret virtual_network_client.delete_vcn(vcn.id, retry_strategy=retry_strategy) oci.wait_until( virtual_network_client, - virtual_network_client.get_vcn(vcn.id), + vcn_response, 'lifecycle_state', 'TERMINATED', max_wait_seconds=300, diff --git a/examples/retrieve_audit_events.py b/examples/retrieve_audit_events.py index ea42b05717..ba8f6268f9 100644 --- a/examples/retrieve_audit_events.py +++ b/examples/retrieve_audit_events.py @@ -25,14 +25,12 @@ def get_compartments(identity, tenancy_id): ''' Retrieve the list of compartments under the tenancy. ''' - compartment_ocids = [] - # Store tenancy id as the first compartment - compartment_ocids.append(tenancy_id) list_compartments_response = oci.pagination.list_call_get_all_results( identity.list_compartments, compartment_id=tenancy_id).data - for c in list_compartments_response: - compartment_ocids.append(c.id) + + compartment_ocids = [c.id for c in filter(lambda c: c.lifecycle_state == 'ACTIVE', list_compartments_response)] + return compartment_ocids diff --git a/examples/showoci/CHANGELOG.rst b/examples/showoci/CHANGELOG.rst index 61701c4d13..398855f9bc 100755 --- a/examples/showoci/CHANGELOG.rst +++ b/examples/showoci/CHANGELOG.rst @@ -4,6 +4,15 @@ All notable changes to this project will be documented in this file. The format is based on `Keep a Changelog `_. +===================== +20.03.31 - 2020-03-31 +===================== +* Added DNS Zones to the -edge flag +* Added DNS Steering Policies to the -edge flag +* Added Events to -m flag +* Added Retry Strategy to all network and load balancers requests +* Added Image count to the summary + ===================== 20.03.24 - 2020-03-24 ===================== diff --git a/examples/showoci/README.md b/examples/showoci/README.md index 5a7a88947e..eec88402d0 100755 --- a/examples/showoci/README.md +++ b/examples/showoci/README.md @@ -44,6 +44,8 @@ Output can be printer friendly, CSV files or JSON file. - oci.data_science.DataScienceClient - oci.data_flow.DataFlowClient - oci.nosql.NosqlClient +- oci.dns.DnsClient +- oci.events.EventsClient ** DISCLAIMER – This is not an official Oracle application @@ -119,6 +121,27 @@ Please follow Oracle Python SDK Documentation - https://github.com/oracle/oci-py ## Copy the Software Download the showoci*.py from this project +## Executing using Cloud Shell: +``` +1. Create virtual env of python + python -m venv python_venv + source python_venv/bin/activate + +2. install oci sdk package + pip install oci + +3. clone the oci sdk repo + cd $HOME + git init + git clone https://github.com/oracle/oci-python-sdk + +4. Config OCI config file - ~/.oci/config + Please follow SDK config documentation - https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/sdkconfig.htm + +5. run showoci + cd $HOME/oci-python-sdk/examples/showoci + python showoci.py ... +``` Execute ``` @@ -144,14 +167,14 @@ optional arguments: -cn Print Containers -d Print Database -e Print EMail - -edge Print Edge Services (Healthcheck) + -edge Print Edge and DNS Services -f Print File Storage -fun Print Functions -i Print Identity -ic Print Identity Compartments only -l Print Load Balancer -lq Print Limits and Quotas - -m Print Monitoring and Notifications + -m Print Monitoring, Notifications and Events -n Print Network -o Print Object Storage -paas Print PaaS Platform Services - OIC OAC OCE diff --git a/examples/showoci/showoci.py b/examples/showoci/showoci.py index 952134ad8a..c9169d2df0 100755 --- a/examples/showoci/showoci.py +++ b/examples/showoci/showoci.py @@ -57,11 +57,11 @@ # - oci.data_science.DataScienceClient # - oci.data_flow.DataFlowClient # - oci.nosql.NosqlClient +# - oci.dns.DnsClient +# - oci.events.EventsClient # # Modules Not Yet Covered: # - oci.waas.WaasClient -# - oci.dns.DnsClient -# - oci.events.EventsClient # ########################################################################## from __future__ import print_function @@ -73,7 +73,7 @@ import argparse import datetime -version = "20.3.11" +version = "20.3.31" ########################################################################## # execute_extract @@ -236,14 +236,14 @@ def set_parser_arguments(): parser.add_argument('-cn', action='store_true', default=False, dest='container', help='Print Containers') parser.add_argument('-d', action='store_true', default=False, dest='database', help='Print Database') parser.add_argument('-e', action='store_true', default=False, dest='email', help='Print EMail') - parser.add_argument('-edge', action='store_true', default=False, dest='edge', help='Print Edge Services (Healthcheck)') + parser.add_argument('-edge', action='store_true', default=False, dest='edge', help='Print Edge and DNS Services') parser.add_argument('-f', action='store_true', default=False, dest='file', help='Print File Storage') parser.add_argument('-fun', action='store_true', default=False, dest='function', help='Print Functions') parser.add_argument('-i', action='store_true', default=False, dest='identity', help='Print Identity') parser.add_argument('-ic', action='store_true', default=False, dest='identity_compartments', help='Print Identity Compartments only') parser.add_argument('-l', action='store_true', default=False, dest='load', help='Print Load Balancer') parser.add_argument('-lq', action='store_true', default=False, dest='limits', help='Print Limits and Quotas') - parser.add_argument('-m', action='store_true', default=False, dest='monitoring', help='Print Monitoring and Notifications') + parser.add_argument('-m', action='store_true', default=False, dest='monitoring', help='Print Monitoring, Notifications and Events') parser.add_argument('-n', action='store_true', default=False, dest='network', help='Print Network') parser.add_argument('-o', action='store_true', default=False, dest='object', help='Print Object Storage') parser.add_argument('-paas', action='store_true', default=False, dest='paas_native', help='Print PaaS Platform Services - OIC OAC OCE') diff --git a/examples/showoci/showoci_data.py b/examples/showoci/showoci_data.py index f92948dea3..d871a96f83 100755 --- a/examples/showoci/showoci_data.py +++ b/examples/showoci/showoci_data.py @@ -1454,9 +1454,16 @@ def __get_core_compute_images(self, region_name, compartment): value = {'id': image['id'], 'desc': image['display_name'].ljust(24) + " - " + image['operating_system'] + " - " + image[ 'size_in_gbs'].rjust(3) + "GB - Base: " + image['base_image_name'], - 'sum_info': 'Object Storage - Images (GB)', 'sum_size_gb': image['size_in_gbs'], + 'sum_info': 'Object Storage - Images (GB)', + 'sum_size_gb': image['size_in_gbs'], + 'sum_count_info': "Compute - Images (Count)", + 'sum_count_size': "1", 'time_created': image['time_created'], - 'defined_tags': image['defined_tags'], 'freeform_tags': image['freeform_tags']} + 'defined_tags': image['defined_tags'], + 'freeform_tags': image['freeform_tags'], + 'compartment_name': image['compartment_name'], + 'compartment_id': image['compartment_id'] + } data.append(value) return data @@ -2489,25 +2496,19 @@ def __get_apigateway_main(self, region_name, compartment): def __get_monitoring_main(self, region_name, compartment): try: alarms = self.service.search_multi_items(self.service.C_MONITORING, self.service.C_MONITORING_ALARMS, 'region_name', region_name, 'compartment_id', compartment['id']) + events = self.service.search_multi_items(self.service.C_MONITORING, self.service.C_MONITORING_EVENTS, 'region_name', region_name, 'compartment_id', compartment['id']) - data = [] + data = {} + # if events add it + if events: + data['events'] = events + + # if events add it if alarms: + data['alarms'] = [] for alarm in alarms: - val = {'id': alarm['id'], - 'display_name': alarm['display_name'], - 'metric_compartment_id': alarm['metric_compartment_id'], - 'namespace': alarm['namespace'], - 'query': alarm['query'], - 'is_enabled': alarm['is_enabled'], - 'destinations': alarm['destinations'], - 'destinations_names': [], - 'severity': alarm['severity'], - 'defined_tags': alarm['defined_tags'], - 'freeform_tags': alarm['freeform_tags'], - 'compartment_name': alarm['compartment_name'], - 'compartment_id': alarm['compartment_id'], - 'region_name': alarm['region_name'] - } + val = alarm + val['destinations_names'] = [] # find the topics for dest in alarm['destinations']: @@ -2515,7 +2516,7 @@ def __get_monitoring_main(self, region_name, compartment): if topic: val['destinations_names'].append(topic['name'] + " - " + topic['description']) - data.append(val) + data['alarms'].append(val) return data except Exception as e: @@ -2561,10 +2562,19 @@ def __get_load_edge_main(self, region_name, compartment): try: healthcheck_http = self.service.search_multi_items(self.service.C_EDGE, self.service.C_EDGE_HEALTHCHECK_HTTP, 'region_name', region_name, 'compartment_id', compartment['id']) healthcheck_ping = self.service.search_multi_items(self.service.C_EDGE, self.service.C_EDGE_HEALTHCHECK_PING, 'region_name', region_name, 'compartment_id', compartment['id']) + dns_zone = self.service.search_multi_items(self.service.C_EDGE, self.service.C_EDGE_DNS_ZONE, 'region_name', region_name, 'compartment_id', compartment['id']) + dns_steering = self.service.search_multi_items(self.service.C_EDGE, self.service.C_EDGE_DNS_STEERING, 'region_name', region_name, 'compartment_id', compartment['id']) data = {} if len(healthcheck_http) > 0 or len(healthcheck_ping) > 0: data['healthcheck'] = {'http': healthcheck_http, 'ping': healthcheck_ping} + + if dns_zone: + data['dns_zone'] = dns_zone + + if dns_steering: + data['dns_steering'] = dns_steering + return data except Exception as e: diff --git a/examples/showoci/showoci_output.py b/examples/showoci/showoci_output.py index 509391617a..2e0932caf3 100755 --- a/examples/showoci/showoci_output.py +++ b/examples/showoci/showoci_output.py @@ -1096,20 +1096,35 @@ def __print_announcement_main(self, announcements): ########################################################################## # Monitoring ########################################################################## - def __print_monitoring_main(self, alarms): + def __print_monitoring_main(self, monitorings): try: - if not alarms: + if not monitorings: return - self.print_header("Monitoring - Alarms", 2) + # if alarms + if 'alarms' in monitorings: + if monitorings['alarms']: + alarms = monitorings['alarms'] + self.print_header("Monitoring - Alarms", 2) - for alarm in alarms: - print(self.taba + alarm['display_name'] + " (" + alarm['namespace'] + "), Enabled = " + str(alarm['is_enabled']) + ", Severity = " + alarm['severity']) - print(self.tabs + "Query : " + alarm['query']) - for dest in alarm['destinations_names']: - print(self.tabs + "Topic : " + dest) - print("") + for alarm in alarms: + print(self.taba + alarm['display_name'] + " (" + alarm['namespace'] + "), Enabled = " + str(alarm['is_enabled']) + ", Severity = " + alarm['severity']) + print(self.tabs + "Query : " + alarm['query']) + for dest in alarm['destinations_names']: + print(self.tabs + "Topic : " + dest) + print("") + + # if events + if 'events' in monitorings: + if monitorings['events']: + events = monitorings['events'] + self.print_header("Events", 2) + + for event in events: + print(self.taba + event['display_name'] + " (" + event['description'] + "), Enabled = " + str(event['is_enabled'])) + print(self.tabs + "Condition : " + event['condition']) + print("") except Exception as e: self.__print_error("__print_monitoring_main", e) @@ -1165,6 +1180,24 @@ def __print_edge_services_main(self, edge): print(self.tabs + "VPoints : " + arr['vantage_point_names']) print("") + # if dns_zone + if 'dns_zone' in edge: + self.print_header("DNS Zone", 2) + + for arr in edge['dns_zone']: + print(self.taba + arr['name'] + " (" + arr['zone_type'] + "), Version: " + arr['version'] + ", Serial: " + arr['serial']) + print(self.tabs + "URI : " + arr['self_uri']) + print("") + + # if dns_steering + if 'dns_steering' in edge: + self.print_header("DNS Steering Policies", 2) + + for arr in edge['dns_steering']: + print(self.taba + arr['display_name'] + " (" + arr['template'] + "), TTL: " + arr['ttl']) + print(self.tabs + "Health Check Id : " + arr['health_check_monitor_id']) + print("") + except Exception as e: self.__print_error("__print_edge_services_main", e) @@ -1937,18 +1970,18 @@ def __summary_core_compute_instances(self, instances): self.__print_error("__summary_core_compute_instances", e) ########################################################################## - # print compute images + # sum core sizes ########################################################################## - def __summary_core_size(self, objects): + def __summary_core_size(self, objects, sum_info="sum_info", sum_size="sum_size_gb"): try: if len(objects) == 0: return for obj in objects: - if 'sum_info' in obj and 'sum_size_gb' in obj: - if obj['sum_size_gb'] != '': - self.summary_global_list.append({'type': obj['sum_info'], 'size': float(obj['sum_size_gb'])}) + if sum_info in obj and sum_size in obj: + if obj[sum_size] != '': + self.summary_global_list.append({'type': obj[sum_info], 'size': float(obj[sum_size])}) except Exception as e: self.__print_error("__summary_core_size", e) @@ -1967,6 +2000,7 @@ def __summary_core_compute_main(self, data): if 'images' in data: self.__summary_core_size(data['images']) + self.__summary_core_size(data['images'], "sum_count_info", "sum_count_size") if 'boot_volume_backup' in data: self.__summary_core_size(data['boot_volume_backup']) @@ -1985,7 +2019,7 @@ def __summary_core_compute_main(self, data): ########################################################################## # Summary Group By - # took the function frmo stackoverflow + # took the function from stackoverflow ########################################################################## def __summary_group_by(self, key, list_of_dicts): diff --git a/examples/showoci/showoci_service.py b/examples/showoci/showoci_service.py index 5c24a9efa7..ad80a4be35 100755 --- a/examples/showoci/showoci_service.py +++ b/examples/showoci/showoci_service.py @@ -228,18 +228,21 @@ class ShowOCIService(object): # monitoring C_MONITORING = "monitoring" C_MONITORING_ALARMS = "alarms" + C_MONITORING_EVENTS = "events" # notifications C_NOTIFICATIONS = "notifications" C_NOTIFICATIONS_TOPICS = "topics" C_NOTIFICATIONS_SUBSCRIPTIONS = "subscriptions" - # edge services + # edge services and DNS C_EDGE = "edge" C_EDGE_HEALTHCHECK_PING = "healthcheck_ping" C_EDGE_HEALTHCHECK_HTTP = "healthcheck_http" + C_EDGE_DNS_ZONE = 'dns_zone' + C_EDGE_DNS_STEERING = 'dns_steering' - # edge services + # Announcement services C_ANNOUNCEMENT = "announcement" C_ANNOUNCEMENT_ANNOUNCEMENT = "announcements" @@ -1360,7 +1363,7 @@ def __load_identity_availability_domain(self, region_name): # # class oci.core.virtual_network_client.virtual_networkClient(config, **kwargs) # - # TBD Apis + # Not done APIs: # list_allowed_peer_regions_for_remote_peering(**kwargs) # list_private_ips(**kwargs) - this is performance issue running all subnets # list_public_ips(scope, compartment_id, **kwargs) @@ -1428,6 +1431,7 @@ def __load_core_network_main(self): if self.flags.read_network: # append the data + network[self.C_NETWORK_LPG] += self.__load_core_network_lpg(virtual_network, compartments, vcns) network[self.C_NETWORK_SGW] += self.__load_core_network_sgw(virtual_network, compartments) network[self.C_NETWORK_NAT] += self.__load_core_network_nat(virtual_network, compartments) network[self.C_NETWORK_DRG] += self.__load_core_network_drg(virtual_network, compartments) @@ -1437,7 +1441,6 @@ def __load_core_network_main(self): network[self.C_NETWORK_RPC] += self.__load_core_network_rpc(virtual_network, compartments) network[self.C_NETWORK_VC] += self.__load_core_network_vc(virtual_network, compartments) network[self.C_NETWORK_IGW] += self.__load_core_network_igw(virtual_network, compartments, vcns) - network[self.C_NETWORK_LPG] += self.__load_core_network_lpg(virtual_network, compartments, vcns) network[self.C_NETWORK_SLIST] += self.__load_core_network_seclst(virtual_network, compartments, vcns) network[self.C_NETWORK_DHCP] += self.__load_core_network_dhcpop(virtual_network, compartments, vcns) @@ -1475,7 +1478,8 @@ def __load_core_network_vcn(self, virtual_network, compartments): virtual_network.list_vcns, compartment['id'], lifecycle_state=oci.core.models.Vcn.LIFECYCLE_STATE_AVAILABLE, - sort_by="DISPLAYNAME" + sort_by="DISPLAYNAME", + retry_strategy=oci.retry.DEFAULT_RETRY_STRATEGY ).data except oci.exceptions.ServiceError as e: @@ -1572,7 +1576,8 @@ def __load_core_network_igw(self, virtual_network, compartments, vcns): try: igws = virtual_network.list_internet_gateways( compartment['id'], vcn['id'], - lifecycle_state=oci.core.models.InternetGateway.LIFECYCLE_STATE_AVAILABLE + lifecycle_state=oci.core.models.InternetGateway.LIFECYCLE_STATE_AVAILABLE, + retry_strategy=oci.retry.DEFAULT_RETRY_STRATEGY ).data except oci.exceptions.ServiceError as e: @@ -1620,21 +1625,23 @@ def __load_core_network_lpg(self, virtual_network, compartments, vcns): # loop on all vcns - vcn is must parameter for vcn in vcns: print("+", end="") + warning_printed_for_vcn = False # iLoop on all compartments for compartment in compartments: - local_peering_gateways = [] try: local_peering_gateways = virtual_network.list_local_peering_gateways( compartment['id'], - vcn['id'] + vcn['id'], + retry_strategy=oci.retry.DEFAULT_RETRY_STRATEGY ).data except oci.exceptions.ServiceError as e: if self.__check_service_error(e.code): - # self.__load_print_auth_warning() - # don't print "a" access due to issue with local peering GW service issue + if not warning_printed_for_vcn: + self.__load_print_auth_warning() + warning_printed_for_vcn = True continue raise @@ -1697,7 +1704,8 @@ def __load_core_network_rpc(self, virtual_network, compartments): try: rpcs = oci.pagination.list_call_get_all_results( virtual_network.list_remote_peering_connections, - compartment['id'] + compartment['id'], + retry_strategy=oci.retry.DEFAULT_RETRY_STRATEGY ).data except oci.exceptions.ServiceError as e: @@ -1760,7 +1768,9 @@ def __load_core_network_routet(self, virtual_network, compartments, vcns): virtual_network.list_route_tables, compartment['id'], vcn['id'], - lifecycle_state=oci.core.models.RouteTable.LIFECYCLE_STATE_AVAILABLE).data + lifecycle_state=oci.core.models.RouteTable.LIFECYCLE_STATE_AVAILABLE, + retry_strategy=oci.retry.DEFAULT_RETRY_STRATEGY + ).data except oci.exceptions.ServiceError as e: if self.__check_service_error(e.code): @@ -1850,7 +1860,8 @@ def __load_core_network_dhcpop(self, virtual_network, compartments, vcns): virtual_network.list_dhcp_options, compartment['id'], vcn['id'], - lifecycle_state=oci.core.models.DhcpOptions.LIFECYCLE_STATE_AVAILABLE).data + lifecycle_state=oci.core.models.DhcpOptions.LIFECYCLE_STATE_AVAILABLE, + retry_strategy=oci.retry.DEFAULT_RETRY_STRATEGY).data except oci.exceptions.ServiceError as e: if self.__check_service_error(e.code): @@ -2062,7 +2073,9 @@ def __load_core_network_seclst(self, virtual_network, compartments, vcns): compartment['id'], vcn['id'], lifecycle_state=oci.core.models.SecurityList.LIFECYCLE_STATE_AVAILABLE, - sort_by="DISPLAYNAME").data + sort_by="DISPLAYNAME", + retry_strategy=oci.retry.DEFAULT_RETRY_STRATEGY + ).data except oci.exceptions.ServiceError as e: if self.__check_service_error(e.code): @@ -2279,7 +2292,8 @@ def __load_core_network_nsg(self, virtual_network, compartments): arrs = oci.pagination.list_call_get_all_results( virtual_network.list_network_security_groups, compartment['id'], - lifecycle_state=oci.core.models.NetworkSecurityGroup.LIFECYCLE_STATE_AVAILABLE + lifecycle_state=oci.core.models.NetworkSecurityGroup.LIFECYCLE_STATE_AVAILABLE, + retry_strategy=oci.retry.DEFAULT_RETRY_STRATEGY ).data except oci.exceptions.ServiceError as e: @@ -2366,7 +2380,9 @@ def __load_core_network_subnet(self, virtual_network, compartments, vcns): compartment['id'], vcn['id'], lifecycle_state=oci.core.models.Subnet.LIFECYCLE_STATE_AVAILABLE, - sort_by="DISPLAYNAME").data + sort_by="DISPLAYNAME", + retry_strategy=oci.retry.DEFAULT_RETRY_STRATEGY + ).data except oci.exceptions.ServiceError as e: if self.__check_service_error(e.code): @@ -2429,7 +2445,8 @@ def __load_core_network_sgw(self, virtual_network, compartments): sgws = oci.pagination.list_call_get_all_results( virtual_network.list_service_gateways, compartment['id'], - lifecycle_state=oci.core.models.ServiceGateway.LIFECYCLE_STATE_AVAILABLE + lifecycle_state=oci.core.models.ServiceGateway.LIFECYCLE_STATE_AVAILABLE, + retry_strategy=oci.retry.DEFAULT_RETRY_STRATEGY ).data except oci.exceptions.ServiceError as e: @@ -2492,7 +2509,8 @@ def __load_core_network_nat(self, virtual_network, compartments): natgws = oci.pagination.list_call_get_all_results( virtual_network.list_nat_gateways, compartment['id'], - lifecycle_state=oci.core.models.NatGateway.LIFECYCLE_STATE_AVAILABLE + lifecycle_state=oci.core.models.NatGateway.LIFECYCLE_STATE_AVAILABLE, + retry_strategy=oci.retry.DEFAULT_RETRY_STRATEGY ).data except oci.exceptions.ServiceError as e: @@ -2605,7 +2623,8 @@ def __load_core_network_drg(self, virtual_network, compartments): try: arrs = oci.pagination.list_call_get_all_results( virtual_network.list_drgs, - compartment['id'] + compartment['id'], + retry_strategy=oci.retry.DEFAULT_RETRY_STRATEGY ).data except oci.exceptions.ServiceError as e: @@ -2678,7 +2697,8 @@ def __load_core_network_cpe(self, virtual_network, compartments): try: arrs = oci.pagination.list_call_get_all_results( virtual_network.list_cpes, - compartment['id'] + compartment['id'], + retry_strategy=oci.retry.DEFAULT_RETRY_STRATEGY ).data except oci.exceptions.ServiceError as e: @@ -2814,7 +2834,8 @@ def __load_core_network_vc(self, virtual_network, compartments): try: arrs = oci.pagination.list_call_get_all_results( virtual_network.list_virtual_circuits, - compartment['id'] + compartment['id'], + retry_strategy=oci.retry.DEFAULT_RETRY_STRATEGY ).data except oci.exceptions.ServiceError as e: @@ -2883,7 +2904,8 @@ def __load_core_network_ips(self, virtual_network, compartments): try: arrs = oci.pagination.list_call_get_all_results( virtual_network.list_ip_sec_connections, - compartment['id'] + compartment['id'], + retry_strategy=oci.retry.DEFAULT_RETRY_STRATEGY ).data except oci.exceptions.ServiceError as e: @@ -3191,8 +3213,8 @@ def __load_core_compute_images(self, compute, compartments): continue raise - # filter the array to only cutomer images - arrs = [i for i in images if i.base_image_id is not None] + # filter the array to only customer images + arrs = [i for i in images if i.compartment_id is not None] print(".", end="") # loop on array @@ -3207,7 +3229,8 @@ def __load_core_compute_images(self, compute, compartments): 'region_name': str(self.config['region']), 'defined_tags': [] if arr.defined_tags is None else arr.defined_tags, 'freeform_tags': [] if arr.freeform_tags is None else arr.freeform_tags, - 'base_image_name': str(compute.get_image(arr.base_image_id).data.display_name)} + 'base_image_name': (str(compute.get_image(arr.base_image_id).data.display_name) if arr.base_image_id else "") + } data.append(val) cnt += 1 @@ -4220,7 +4243,9 @@ def __load_load_balancers(self, load_balancer, compartments): load_balancer.list_load_balancers, compartment['id'], sort_by="DISPLAYNAME", - lifecycle_state=oci.load_balancer.models.LoadBalancer.LIFECYCLE_STATE_ACTIVE).data + lifecycle_state=oci.load_balancer.models.LoadBalancer.LIFECYCLE_STATE_ACTIVE, + retry_strategy=oci.retry.DEFAULT_RETRY_STRATEGY + ).data except oci.exceptions.ServiceError as e: if self.__check_service_error(e.code): @@ -4365,7 +4390,8 @@ def __load_load_balancer_backendset(self, load_balancer): try: backend_sets = oci.pagination.list_call_get_all_results( load_balancer.list_backend_sets, - load_balancer_id + load_balancer_id, + retry_strategy=oci.retry.DEFAULT_RETRY_STRATEGY ).data except oci.exceptions.ServiceError as e: @@ -4509,9 +4535,6 @@ def __load_load_balancer_backendset(self, load_balancer): data.append(dataval) cnt += 1 - # sleep 0.5 seconds every 10 checks to avoid too many requests - if cnt % 10 == 0: - time.sleep(0.5) self.__load_print_cnt(cnt, start_time) return data @@ -5816,7 +5839,8 @@ def __load_database_nosql(self, nosql_client, compartments): list_tables = oci.pagination.list_call_get_all_results( nosql_client.list_tables, compartment['id'], - sort_by="name" + sort_by="name", + retry_strategy=oci.retry.DEFAULT_RETRY_STRATEGY ).data except oci.exceptions.ServiceError as e: @@ -6498,12 +6522,13 @@ def __load_budgets_budgets(self, budget_client, tenancy_id): # class oci.monitoring.MonitoringClient(config, **kwargs) # class oci.ons.NotificationControlPlaneClient(config, **kwargs) # class oci.ons.NotificationDataPlaneClient(config, **kwargs) + # class oci.events.EventsClient(config, **kwargs) # ########################################################################## def __load_monitor_notification_main(self): try: - print("Monitoring and Notifications...") + print("Monitoring, Notifications and Events...") # MonitoringClient monitor_client = oci.monitoring.MonitoringClient(self.config, signer=self.signer) @@ -6520,17 +6545,24 @@ def __load_monitor_notification_main(self): if self.flags.proxy: ons_dp_client.base_client.session.proxies = {'https': self.flags.proxy} + # oci.events.EventsClient + event_client = oci.events.EventsClient(self.config, signer=self.signer) + if self.flags.proxy: + event_client.base_client.session.proxies = {'https': self.flags.proxy} + # reference to compartments compartments = self.get_compartment() # add the key if not exists self.__initialize_data_key(self.C_MONITORING, self.C_MONITORING_ALARMS) + self.__initialize_data_key(self.C_MONITORING, self.C_MONITORING_EVENTS) self.__initialize_data_key(self.C_NOTIFICATIONS, self.C_NOTIFICATIONS_TOPICS) self.__initialize_data_key(self.C_NOTIFICATIONS, self.C_NOTIFICATIONS_SUBSCRIPTIONS) # append the data for monitoring monitor = self.data[self.C_MONITORING] monitor[self.C_MONITORING_ALARMS] += self.__load_monitoring_alarms(monitor_client, compartments) + monitor[self.C_MONITORING_EVENTS] += self.__load_monitoring_events(event_client, compartments) # append the data for notifications notifications = self.data[self.C_NOTIFICATIONS] @@ -6545,6 +6577,74 @@ def __load_monitor_notification_main(self): except Exception as e: self.__print_error("__load_monitor_notification_main", e) + ########################################################################## + # __load_monitoring_events + ########################################################################## + def __load_monitoring_events(self, event_client, compartments): + + data = [] + cnt = 0 + start_time = time.time() + + try: + self.__load_print_status("Events") + + # loop on all compartments + for compartment in compartments: + + # skip managed paas compartment + if self.__if_managed_paas_compartment(compartment['name']): + print(".", end="") + continue + + events = [] + try: + events = oci.pagination.list_call_get_all_results( + event_client.list_rules, + compartment['id'], + sort_by="DISPLAY_NAME", + lifecycle_state="ACTIVE" + ).data + + except oci.exceptions.ServiceError as e: + if self.__check_service_error(e.code): + self.__load_print_auth_warning() + continue + raise + + print(".", end="") + + # event = oci.events.models.RuleSummary + for event in events: + val = {'id': str(event.id), + 'display_name': str(event.display_name), + 'description': str(event.description), + 'condition': str(event.condition), + 'is_enabled': str(event.is_enabled), + 'time_created': str(event.time_created), + 'compartment_name': str(compartment['name']), + 'compartment_id': str(compartment['id']), + 'defined_tags': [] if event.defined_tags is None else event.defined_tags, + 'freeform_tags': [] if event.freeform_tags is None else event.freeform_tags, + 'region_name': str(self.config['region'])} + + # add the data + cnt += 1 + data.append(val) + + self.__load_print_cnt(cnt, start_time) + return data + + except oci.exceptions.RequestException as e: + + if self.__check_request_error(e): + return data + + raise + except Exception as e: + self.__print_error("__load_monitoring_events", e) + return data + ########################################################################## # __load_monitoring_alarms ########################################################################## @@ -6759,6 +6859,7 @@ def __load_notifications_subscriptions(self, ons_dp_client, compartments): # OCI Classes used: # # class oci.healthchecks.HealthChecksClient(config, **kwargs) + # class oci.dns.DnsClient(config, **kwargs) # ########################################################################## def __load_edge_services_main(self): @@ -6771,12 +6872,19 @@ def __load_edge_services_main(self): if self.flags.proxy: healthcheck_client.base_client.session.proxies = {'https': self.flags.proxy} + # Open connectivity to OCI + dns = oci.dns.DnsClient(self.config, signer=self.signer) + if self.flags.proxy: + dns.base_client.session.proxies = {'https': self.flags.proxy} + # reference to compartments compartments = self.get_compartment() # add the key if not exists self.__initialize_data_key(self.C_EDGE, self.C_EDGE_HEALTHCHECK_PING) self.__initialize_data_key(self.C_EDGE, self.C_EDGE_HEALTHCHECK_HTTP) + self.__initialize_data_key(self.C_EDGE, self.C_EDGE_DNS_ZONE) + self.__initialize_data_key(self.C_EDGE, self.C_EDGE_DNS_STEERING) # reference to stream edge = self.data[self.C_EDGE] @@ -6784,6 +6892,8 @@ def __load_edge_services_main(self): # append the data edge[self.C_EDGE_HEALTHCHECK_PING] += self.__load_edge_healthchecks_ping(healthcheck_client, compartments) edge[self.C_EDGE_HEALTHCHECK_HTTP] += self.__load_edge_healthchecks_http(healthcheck_client, compartments) + edge[self.C_EDGE_DNS_ZONE] += self.__load_edge_dns_zone(dns, compartments) + edge[self.C_EDGE_DNS_STEERING] += self.__load_edge_dns_steering(dns, compartments) print("") except oci.exceptions.RequestException: @@ -6960,6 +7070,147 @@ def __load_edge_healthchecks_http(self, healthcheck_client, compartments): self.__print_error("__load_edge_healthchecks_http", e) return data + ########################################################################## + # __load_edge_dns_zone + ########################################################################## + def __load_edge_dns_zone(self, dns_client, compartments): + + data = [] + cnt = 0 + start_time = time.time() + + try: + self.__load_print_status("DNS Zones") + + # loop on all compartments + for compartment in compartments: + + # skip managed paas compartment + if self.__if_managed_paas_compartment(compartment['name']): + print(".", end="") + continue + + array = [] + try: + array = oci.pagination.list_call_get_all_results( + dns_client.list_zones, + compartment['id'], + lifecycle_state=oci.dns.models.ZoneSummary.LIFECYCLE_STATE_ACTIVE, + sort_by="name" + ).data + + except oci.exceptions.ServiceError as e: + if self.__check_service_error(e.code): + self.__load_print_auth_warning() + continue + raise + except oci.exceptions.ConnectTimeout: + self.__load_print_auth_warning() + continue + + print(".", end="") + + # arr = oci.dns.models.ZoneSummary + for arr in array: + val = {'id': str(arr.id), + 'name': str(arr.name), + 'zone_type': str(arr.zone_type), + 'self_uri': str(arr.self_uri), + 'time_created': str(arr.time_created), + 'version': str(arr.version), + 'serial': str(arr.serial), + 'compartment_name': str(compartment['name']), + 'compartment_id': str(compartment['id']), + 'defined_tags': [] if arr.defined_tags is None else arr.defined_tags, + 'freeform_tags': [] if arr.freeform_tags is None else arr.freeform_tags, + 'region_name': str(self.config['region']) + } + + # add the data + cnt += 1 + data.append(val) + + self.__load_print_cnt(cnt, start_time) + return data + + except oci.exceptions.RequestException as e: + if self.__check_request_error(e): + return data + raise + except Exception as e: + self.__print_error("__load_edge_dns_zone", e) + return data + + ########################################################################## + # __load_edge_dns_steering + ########################################################################## + def __load_edge_dns_steering(self, dns_client, compartments): + + data = [] + cnt = 0 + start_time = time.time() + + try: + self.__load_print_status("DNS Steering Policies") + + # loop on all compartments + for compartment in compartments: + + # skip managed paas compartment + if self.__if_managed_paas_compartment(compartment['name']): + print(".", end="") + continue + + array = [] + try: + array = oci.pagination.list_call_get_all_results( + dns_client.list_steering_policies, + compartment['id'], + lifecycle_state=oci.dns.models.SteeringPolicySummary.LIFECYCLE_STATE_ACTIVE, + sort_by="displayName" + ).data + + except oci.exceptions.ServiceError as e: + if self.__check_service_error(e.code): + self.__load_print_auth_warning() + continue + raise + except oci.exceptions.ConnectTimeout: + self.__load_print_auth_warning() + continue + + print(".", end="") + + # arr = oci.dns.models.SteeringPolicySummary + for arr in array: + val = {'id': str(arr.id), + 'display_name': str(arr.display_name), + 'ttl': str(arr.ttl), + 'health_check_monitor_id': str(arr.health_check_monitor_id), + 'template': str(arr.template), + 'time_created': str(arr.time_created), + 'compartment_name': str(compartment['name']), + 'compartment_id': str(compartment['id']), + 'defined_tags': [] if arr.defined_tags is None else arr.defined_tags, + 'freeform_tags': [] if arr.freeform_tags is None else arr.freeform_tags, + 'region_name': str(self.config['region']) + } + + # add the data + cnt += 1 + data.append(val) + + self.__load_print_cnt(cnt, start_time) + return data + + except oci.exceptions.RequestException as e: + if self.__check_request_error(e): + return data + raise + except Exception as e: + self.__print_error("__load_edge_dns_zone", e) + return data + ########################################################################## # __load_data_ai_main ########################################################################## @@ -7747,7 +7998,11 @@ def __load_limits(self, limits_client, tenancy_id): services = [] try: - services = oci.pagination.list_call_get_all_results(limits_client.list_services, tenancy_id, sort_by="name").data + services = oci.pagination.list_call_get_all_results( + limits_client.list_services, + tenancy_id, sort_by="name", + retry_strategy=oci.retry.DEFAULT_RETRY_STRATEGY + ).data except oci.exceptions.ServiceError as e: if self.__check_service_error(e.code): self.__load_print_auth_warning("a", False) @@ -7840,7 +8095,12 @@ def __load_quotas(self, quotas_client, compartments): quotas = [] try: - quotas = quotas_client.list_quotas(compartment['id'], lifecycle_state=oci.limits.models.QuotaSummary.LIFECYCLE_STATE_ACTIVE, sort_by="NAME").data + quotas = quotas_client.list_quotas( + compartment['id'], + lifecycle_state=oci.limits.models.QuotaSummary.LIFECYCLE_STATE_ACTIVE, + sort_by="NAME", + retry_strategy=oci.retry.DEFAULT_RETRY_STRATEGY + ).data except oci.exceptions.ServiceError as e: if 'go to your home region' in str(e): print("Service can only run at home region, skipping") diff --git a/examples/stream_example.py b/examples/stream_example.py index 928d450879..f44bf9bdbc 100644 --- a/examples/stream_example.py +++ b/examples/stream_example.py @@ -47,7 +47,7 @@ def publish_example_messages(client, stream_id): def get_or_create_stream(client, compartment_id, stream_name, partition, sac_composite): - list_streams = client.list_streams(compartment_id, name=stream_name, + list_streams = client.list_streams(compartment_id=compartment_id, name=stream_name, lifecycle_state=oci.streaming.models.StreamSummary.LIFECYCLE_STATE_ACTIVE) if list_streams.data: # If we find an active stream with the correct name, we'll use it. diff --git a/examples/volume_attachment_example.py b/examples/volume_attachment_example.py index 71cb644ba3..76e12268df 100644 --- a/examples/volume_attachment_example.py +++ b/examples/volume_attachment_example.py @@ -114,9 +114,9 @@ def launch_instance(compute, vcn_and_subnet): availability_domain=vcn_and_subnet['subnet'].availability_domain, compartment_id=vcn_and_subnet['subnet'].compartment_id, display_name='VolAttachTypesExampleInstance', - shape='VM.Standard1.1', + shape='VM.Standard2.1', subnet_id=vcn_and_subnet['subnet'].id, - image_id=get_image(compute, vcn_and_subnet['subnet'].compartment_id, 'Oracle Linux', '7.4', 'VM.Standard1.1').id + image_id=get_image(compute, vcn_and_subnet['subnet'].compartment_id, 'Oracle Linux', '7.7', 'VM.Standard2.1').id ) ) get_instance_response = oci.wait_until( @@ -144,30 +144,19 @@ def terminate_instance(compute, instance): def delete_vcn_and_subnet(virtual_network, vcn_and_subnet): + composite_virtual_network = oci.core.VirtualNetworkClientCompositeOperations(virtual_network_client) + vcn = vcn_and_subnet['vcn'] subnet = vcn_and_subnet['subnet'] - virtual_network.delete_subnet(subnet.id) - oci.wait_until( - virtual_network, - virtual_network.get_subnet(subnet.id), - 'lifecycle_state', - 'TERMINATED', - max_wait_seconds=300, - # For a deletion, the record may no longer be available and the waiter may encounter a 404 when trying to retrieve it. - # This flag tells the waiter to consider 404s as successful (which is only really valid for delete/terminate since - # the record not being there anymore can signify a successful delete/terminate) - succeed_on_not_found=True + composite_virtual_network.delete_subnet_and_wait_for_state( + subnet.id, + [oci.core.models.Subnet.LIFECYCLE_STATE_TERMINATED] ) - virtual_network.delete_vcn(vcn.id) - oci.wait_until( - virtual_network, - virtual_network.get_vcn(vcn.id), - 'lifecycle_state', - 'TERMINATED', - max_wait_seconds=300, - succeed_on_not_found=True + composite_virtual_network.delete_vcn_and_wait_for_state( + vcn.id, + [oci.core.models.Vcn.LIFECYCLE_STATE_TERMINATED] ) diff --git a/examples/volume_attachment_pv_encryption_intransit_example.py b/examples/volume_attachment_pv_encryption_intransit_example.py index debddbf7c3..6e8ee71754 100755 --- a/examples/volume_attachment_pv_encryption_intransit_example.py +++ b/examples/volume_attachment_pv_encryption_intransit_example.py @@ -107,13 +107,13 @@ def get_image(compute, compartment_id, operating_system, os_version, target_shap def launch_instance(compute, vcn_and_subnet, kms_key_id): - image_id = get_image(compute, vcn_and_subnet['subnet'].compartment_id, 'Oracle Linux', '7.5', 'VM.Standard1.1').id + image_id = get_image(compute, vcn_and_subnet['subnet'].compartment_id, 'Oracle Linux', '7.5', 'VM.Standard2.1').id result = compute.launch_instance( oci.core.models.LaunchInstanceDetails( availability_domain=vcn_and_subnet['subnet'].availability_domain, compartment_id=vcn_and_subnet['subnet'].compartment_id, display_name='VolAttachTypesExampleInstance', - shape='VM.Standard1.1', + shape='VM.Standard2.1', subnet_id=vcn_and_subnet['subnet'].id, is_pv_encryption_in_transit_enabled=True, source_details=oci.core.models.InstanceSourceViaImageDetails(image_id=image_id, kms_key_id=kms_key_id) diff --git a/src/oci/__init__.py b/src/oci/__init__.py index 8199d31220..5e2ad325b2 100644 --- a/src/oci/__init__.py +++ b/src/oci/__init__.py @@ -1,7 +1,7 @@ # coding: utf-8 # Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. -from . import analytics, announcements_service, apigateway, application_migration, audit, autoscaling, budget, container_engine, core, data_catalog, data_flow, data_science, database, dns, dts, email, events, file_storage, functions, healthchecks, identity, integration, key_management, limits, load_balancer, marketplace, monitoring, nosql, object_storage, oce, oda, ons, os_management, resource_manager, resource_search, streaming, waas, work_requests +from . import analytics, announcements_service, apigateway, application_migration, audit, autoscaling, bds, budget, container_engine, core, data_catalog, data_flow, data_science, database, dns, dts, email, events, file_storage, functions, healthchecks, identity, integration, key_management, limits, load_balancer, marketplace, monitoring, nosql, object_storage, oce, oda, ons, os_management, resource_manager, resource_search, secrets, streaming, vault, waas, work_requests from . import auth, config, constants, decorators, exceptions, regions, pagination, retry, fips from .base_client import BaseClient from .request import Request @@ -14,5 +14,5 @@ __all__ = [ "BaseClient", "Error", "Request", "Response", "Signer", "config", "constants", "decorators", "exceptions", "regions", "wait_until", "pagination", "auth", "retry", "fips", - "analytics", "announcements_service", "apigateway", "application_migration", "audit", "autoscaling", "budget", "container_engine", "core", "data_catalog", "data_flow", "data_science", "database", "dns", "dts", "email", "events", "file_storage", "functions", "healthchecks", "identity", "integration", "key_management", "limits", "load_balancer", "marketplace", "monitoring", "nosql", "object_storage", "oce", "oda", "ons", "os_management", "resource_manager", "resource_search", "streaming", "waas", "work_requests" + "analytics", "announcements_service", "apigateway", "application_migration", "audit", "autoscaling", "bds", "budget", "container_engine", "core", "data_catalog", "data_flow", "data_science", "database", "dns", "dts", "email", "events", "file_storage", "functions", "healthchecks", "identity", "integration", "key_management", "limits", "load_balancer", "marketplace", "monitoring", "nosql", "object_storage", "oce", "oda", "ons", "os_management", "resource_manager", "resource_search", "secrets", "streaming", "vault", "waas", "work_requests" ] diff --git a/src/oci/analytics/analytics_client.py b/src/oci/analytics/analytics_client.py index c899c589ad..dfceab89a0 100644 --- a/src/oci/analytics/analytics_client.py +++ b/src/oci/analytics/analytics_client.py @@ -82,7 +82,6 @@ def __init__(self, config, **kwargs): def change_analytics_instance_compartment(self, analytics_instance_id, change_compartment_details, **kwargs): """ - Change the compartment of an Analytics instance. Change the compartment of an Analytics instance. The operation is long-running and creates a new WorkRequest. @@ -178,7 +177,6 @@ def change_analytics_instance_compartment(self, analytics_instance_id, change_co def create_analytics_instance(self, create_analytics_instance_details, **kwargs): """ - Create an Analytics instance. Create a new AnalyticsInstance in the specified compartment. The operation is long-running and creates a new WorkRequest. @@ -254,7 +252,6 @@ def create_analytics_instance(self, create_analytics_instance_details, **kwargs) def delete_analytics_instance(self, analytics_instance_id, **kwargs): """ - Delete an Analytics instance. Terminates the specified Analytics instance. The operation is long-running and creates a new WorkRequest. @@ -345,7 +342,6 @@ def delete_analytics_instance(self, analytics_instance_id, **kwargs): def delete_work_request(self, work_request_id, **kwargs): """ - Cancel a work request. Cancel a work request that has not started yet. @@ -424,7 +420,6 @@ def delete_work_request(self, work_request_id, **kwargs): def get_analytics_instance(self, analytics_instance_id, **kwargs): """ - Retrieve Analytics instance metadata. Info for a specific Analytics instance. @@ -498,7 +493,6 @@ def get_analytics_instance(self, analytics_instance_id, **kwargs): def get_work_request(self, work_request_id, **kwargs): """ - Get work request details. Get the details of a work request. @@ -573,7 +567,6 @@ def get_work_request(self, work_request_id, **kwargs): def list_analytics_instances(self, compartment_id, **kwargs): """ List Analytics instances. - List Analytics instances. :param str compartment_id: (required) @@ -740,7 +733,6 @@ def list_analytics_instances(self, compartment_id, **kwargs): def list_work_request_errors(self, work_request_id, **kwargs): """ - Get work request errors. Get the errors of a work request. @@ -840,7 +832,6 @@ def list_work_request_errors(self, work_request_id, **kwargs): def list_work_request_logs(self, work_request_id, **kwargs): """ - Get work request logs. Get the logs of a work request. @@ -940,7 +931,6 @@ def list_work_request_logs(self, work_request_id, **kwargs): def list_work_requests(self, compartment_id, **kwargs): """ - List all work requests. List all work requests in a compartment. @@ -1091,7 +1081,6 @@ def list_work_requests(self, compartment_id, **kwargs): def scale_analytics_instance(self, analytics_instance_id, scale_analytics_instance_details, **kwargs): """ - Scale an Analytics instance up or down. Scale an Analytics instance up or down. The operation is long-running and creates a new WorkRequest. @@ -1187,7 +1176,6 @@ def scale_analytics_instance(self, analytics_instance_id, scale_analytics_instan def start_analytics_instance(self, analytics_instance_id, **kwargs): """ - Starts the specified Analytics instance. Starts the specified Analytics instance. The operation is long-running and creates a new WorkRequest. @@ -1278,7 +1266,6 @@ def start_analytics_instance(self, analytics_instance_id, **kwargs): def stop_analytics_instance(self, analytics_instance_id, **kwargs): """ - Stop the specified Analytics instance. Stop the specified Analytics instance. The operation is long-running and creates a new WorkRequest. @@ -1369,7 +1356,6 @@ def stop_analytics_instance(self, analytics_instance_id, **kwargs): def update_analytics_instance(self, analytics_instance_id, update_analytics_instance_details, **kwargs): """ - Update an Analytics instance. Updates certain fields of an Analytics instance. Fields that are not provided in the request will not be updated. diff --git a/src/oci/announcements_service/announcement_client.py b/src/oci/announcements_service/announcement_client.py index 6a3634b00e..1a131df85a 100644 --- a/src/oci/announcements_service/announcement_client.py +++ b/src/oci/announcements_service/announcement_client.py @@ -81,7 +81,6 @@ def __init__(self, config, **kwargs): def get_announcement(self, announcement_id, **kwargs): """ - Gets information about an announcement. Gets the details of a specific announcement. @@ -155,7 +154,6 @@ def get_announcement(self, announcement_id, **kwargs): def get_announcement_user_status(self, announcement_id, **kwargs): """ - Gets the read status of an announcement. Gets information about whether a specific announcement was acknowledged by a user. @@ -229,7 +227,6 @@ def get_announcement_user_status(self, announcement_id, **kwargs): def list_announcements(self, compartment_id, **kwargs): """ - Lists announcements for the tenancy. Gets a list of announcements for the current tenancy. @@ -371,7 +368,6 @@ def list_announcements(self, compartment_id, **kwargs): def update_announcement_user_status(self, announcement_id, status_details, **kwargs): """ - Updates the read status of an announcement. Updates the status of the specified announcement with regard to whether it has been marked as read. diff --git a/src/oci/apigateway/deployment_client.py b/src/oci/apigateway/deployment_client.py index cfe8e20846..a7b5321593 100644 --- a/src/oci/apigateway/deployment_client.py +++ b/src/oci/apigateway/deployment_client.py @@ -84,7 +84,6 @@ def __init__(self, config, **kwargs): def change_deployment_compartment(self, deployment_id, change_deployment_compartment_details, **kwargs): """ - Change the deployment compartment. Changes the deployment compartment. @@ -180,7 +179,6 @@ def change_deployment_compartment(self, deployment_id, change_deployment_compart def create_deployment(self, create_deployment_details, **kwargs): """ - Creates a new Deployment Creates a new deployment. @@ -254,7 +252,6 @@ def create_deployment(self, create_deployment_details, **kwargs): def delete_deployment(self, deployment_id, **kwargs): """ - Delete a provisioned Deployment Deletes the deployment with the given identifier. @@ -334,7 +331,6 @@ def delete_deployment(self, deployment_id, **kwargs): def get_deployment(self, deployment_id, **kwargs): """ - Get Deployment Gets a deployment by identifier. @@ -407,7 +403,6 @@ def get_deployment(self, deployment_id, **kwargs): def list_deployments(self, compartment_id, **kwargs): """ - Gets a list of all Deployments in a compartment Returns a list of deployments. @@ -544,7 +539,6 @@ def list_deployments(self, compartment_id, **kwargs): def update_deployment(self, deployment_id, update_deployment_details, **kwargs): """ - Update the Deployment identified by the id Updates the deployment with the given identifier. diff --git a/src/oci/apigateway/gateway_client.py b/src/oci/apigateway/gateway_client.py index 1f7d40a573..55f53e2022 100644 --- a/src/oci/apigateway/gateway_client.py +++ b/src/oci/apigateway/gateway_client.py @@ -84,7 +84,6 @@ def __init__(self, config, **kwargs): def change_gateway_compartment(self, gateway_id, change_gateway_compartment_details, **kwargs): """ - Change the gateway compartment. Changes the gateway compartment. @@ -180,7 +179,6 @@ def change_gateway_compartment(self, gateway_id, change_gateway_compartment_deta def create_gateway(self, create_gateway_details, **kwargs): """ - Creates a new Gateway Creates a new gateway. @@ -254,7 +252,6 @@ def create_gateway(self, create_gateway_details, **kwargs): def delete_gateway(self, gateway_id, **kwargs): """ - Delete a provisioned Gateway Deletes the gateway with the given identifier. @@ -334,7 +331,6 @@ def delete_gateway(self, gateway_id, **kwargs): def get_gateway(self, gateway_id, **kwargs): """ - Get Gateway Gets a gateway by identifier. @@ -407,7 +403,6 @@ def get_gateway(self, gateway_id, **kwargs): def list_gateways(self, compartment_id, **kwargs): """ - Gets a list of all Gateways in a compartment Returns a list of gateways. @@ -539,7 +534,6 @@ def list_gateways(self, compartment_id, **kwargs): def update_gateway(self, gateway_id, update_gateway_details, **kwargs): """ - Update the Gateway by the identifier Updates the gateway with the given identifier. diff --git a/src/oci/apigateway/work_requests_client.py b/src/oci/apigateway/work_requests_client.py index f3871d226c..bdae13ffde 100644 --- a/src/oci/apigateway/work_requests_client.py +++ b/src/oci/apigateway/work_requests_client.py @@ -84,7 +84,6 @@ def __init__(self, config, **kwargs): def cancel_work_request(self, work_request_id, **kwargs): """ - Cancel the work request Cancels the work request. @@ -175,7 +174,6 @@ def cancel_work_request(self, work_request_id, **kwargs): def get_work_request(self, work_request_id, **kwargs): """ - Gets work request status Gets the status of the work request with the given identifier. @@ -248,7 +246,6 @@ def get_work_request(self, work_request_id, **kwargs): def list_work_request_errors(self, work_request_id, **kwargs): """ - Lists work request errors Returns a (paginated) list of errors for a given work request. @@ -368,7 +365,6 @@ def list_work_request_errors(self, work_request_id, **kwargs): def list_work_request_logs(self, work_request_id, **kwargs): """ - Lists work request logs Returns a (paginated) list of logs for a given work request. @@ -488,7 +484,6 @@ def list_work_request_logs(self, work_request_id, **kwargs): def list_work_requests(self, compartment_id, **kwargs): """ - List work requests Lists the work requests in a compartment. diff --git a/src/oci/application_migration/application_migration_client.py b/src/oci/application_migration/application_migration_client.py index 0077aafd97..658a368dfb 100644 --- a/src/oci/application_migration/application_migration_client.py +++ b/src/oci/application_migration/application_migration_client.py @@ -82,7 +82,6 @@ def __init__(self, config, **kwargs): def cancel_work_request(self, work_request_id, **kwargs): """ - Cancel a work request Cancels the specified work request @@ -161,7 +160,6 @@ def cancel_work_request(self, work_request_id, **kwargs): def change_migration_compartment(self, migration_id, change_migration_compartment_details, **kwargs): """ - Moves a Migration into a different compartment. When provided, If-Match is checked against ETag values of the Migration. Moves a Migration into a different compartment. @@ -256,7 +254,6 @@ def change_migration_compartment(self, migration_id, change_migration_compartmen def change_source_compartment(self, source_id, change_source_compartment_details, **kwargs): """ - Moves a Source into a different compartment. When provided, If-Match is checked against ETag values of the Source. Moves a Source into a different compartment. @@ -351,7 +348,6 @@ def change_source_compartment(self, source_id, change_source_compartment_details def create_migration(self, create_migration_details, **kwargs): """ - Creates an application migration Creates an application migration in the specified compartment. Specify the compartment using the compartment ID. @@ -427,7 +423,6 @@ def create_migration(self, create_migration_details, **kwargs): def create_source(self, create_source_details, **kwargs): """ - Creates a migration source Creates a migration source in the specified compartment. Specify the compartment using the compartment ID. @@ -503,7 +498,6 @@ def create_source(self, create_source_details, **kwargs): def delete_migration(self, migration_id, **kwargs): """ - Deletes an application migration Deletes the specified Application object. @@ -582,7 +576,6 @@ def delete_migration(self, migration_id, **kwargs): def delete_source(self, source_id, **kwargs): """ - Deletes a source Deletes the specified Source object. @@ -661,7 +654,6 @@ def delete_source(self, source_id, **kwargs): def get_migration(self, migration_id, **kwargs): """ - Gets an application migration by ID. Gets an application migration using the ID. @@ -735,7 +727,6 @@ def get_migration(self, migration_id, **kwargs): def get_source(self, source_id, **kwargs): """ - Gets a migration source by ID. Gets a migration source using the source ID. @@ -810,7 +801,6 @@ def get_source(self, source_id, **kwargs): def get_work_request(self, work_request_id, **kwargs): """ Gets the details of a work request. - Gets the details of a work request. :param str work_request_id: (required) @@ -883,7 +873,6 @@ def get_work_request(self, work_request_id, **kwargs): def list_migrations(self, compartment_id, **kwargs): """ - Returns a list of migrations Returns a list of migrations in a given compartment. @@ -1013,7 +1002,6 @@ def list_migrations(self, compartment_id, **kwargs): def list_source_applications(self, source_id, compartment_id, **kwargs): """ - Returns a list of applications for a source in a given compartment. Returns a list of applications running in the source environment. This list is generated dynamically by interrogating the source and changes as applications are started or stopped in that environment. @@ -1148,7 +1136,6 @@ def list_source_applications(self, source_id, compartment_id, **kwargs): def list_sources(self, compartment_id, **kwargs): """ - Returns a list of migration sources Returns a list of migration sources in a specified compartment. @@ -1278,7 +1265,6 @@ def list_sources(self, compartment_id, **kwargs): def list_work_request_errors(self, work_request_id, **kwargs): """ - Lists work request errors Gets the errors for a work request. @@ -1388,7 +1374,6 @@ def list_work_request_errors(self, work_request_id, **kwargs): def list_work_request_logs(self, work_request_id, **kwargs): """ - Lists work request logs Gets the logs for a work request. @@ -1498,7 +1483,6 @@ def list_work_request_logs(self, work_request_id, **kwargs): def list_work_requests(self, compartment_id, **kwargs): """ - Lists work requests in a compartment or for a resource. Lists the work requests in a compartment or for a specified resource. @@ -1588,7 +1572,6 @@ def list_work_requests(self, compartment_id, **kwargs): def migrate_application(self, migration_id, **kwargs): """ - Migrates a PaaS application running in a Source environment to OCI.\n Validates target configuration and migrates a PaaS application running in a Source environment into the customers Oracle Cloud Infrastructure tenancy. This an optional action and only required if automatic start of migration was not selected when creating the migration. @@ -1661,7 +1644,6 @@ def migrate_application(self, migration_id, **kwargs): def update_migration(self, migration_id, update_migration_details, **kwargs): """ Update the configuration for an application migration. - Update the configuration for an application migration. :param str migration_id: (required) @@ -1755,7 +1737,6 @@ def update_migration(self, migration_id, update_migration_details, **kwargs): def update_source(self, source_id, update_source_details, **kwargs): """ - Update source details Update source details. diff --git a/src/oci/audit/audit_client.py b/src/oci/audit/audit_client.py index 1f64c8a3e9..dfaefaa855 100644 --- a/src/oci/audit/audit_client.py +++ b/src/oci/audit/audit_client.py @@ -85,7 +85,6 @@ def __init__(self, config, **kwargs): def get_configuration(self, compartment_id, **kwargs): """ - GetConfiguration Get the configuration @@ -144,7 +143,6 @@ def get_configuration(self, compartment_id, **kwargs): def list_events(self, compartment_id, start_time, end_time, **kwargs): """ - ListEvents Returns all the audit events processed for the specified compartment within the specified time range. @@ -249,7 +247,6 @@ def list_events(self, compartment_id, start_time, end_time, **kwargs): def update_configuration(self, compartment_id, update_configuration_details, **kwargs): """ - UpdateConfiguration Update the configuration diff --git a/src/oci/autoscaling/auto_scaling_client.py b/src/oci/autoscaling/auto_scaling_client.py index a5359bc1a7..3c0e1d59c5 100644 --- a/src/oci/autoscaling/auto_scaling_client.py +++ b/src/oci/autoscaling/auto_scaling_client.py @@ -83,7 +83,6 @@ def __init__(self, config, **kwargs): def change_auto_scaling_configuration_compartment(self, auto_scaling_configuration_id, change_compartment_details, **kwargs): """ - ChangeAutoScalingConfigurationCompartment Moves an autoscaling configuration into a different compartment within the same tenancy. For information about moving resources between compartments, see `Moving Resources to a Different Compartment`__. @@ -185,7 +184,6 @@ def change_auto_scaling_configuration_compartment(self, auto_scaling_configurati def create_auto_scaling_configuration(self, create_auto_scaling_configuration_details, **kwargs): """ - CreateAutoScalingConfiguration Creates an autoscaling configuration. @@ -258,7 +256,6 @@ def create_auto_scaling_configuration(self, create_auto_scaling_configuration_de def create_auto_scaling_policy(self, auto_scaling_configuration_id, create_auto_scaling_policy_details, **kwargs): """ - CreateAutoScalingPolicy Creates an autoscaling policy for the specified autoscaling configuration. @@ -348,7 +345,6 @@ def create_auto_scaling_policy(self, auto_scaling_configuration_id, create_auto_ def delete_auto_scaling_configuration(self, auto_scaling_configuration_id, **kwargs): """ - DeleteAutoScalingConfiguration Deletes an autoscaling configuration. @@ -427,7 +423,6 @@ def delete_auto_scaling_configuration(self, auto_scaling_configuration_id, **kwa def delete_auto_scaling_policy(self, auto_scaling_configuration_id, auto_scaling_policy_id, **kwargs): """ - DeleteAutoScalingPolicy Deletes an autoscaling policy for the specified autoscaling configuration. @@ -510,7 +505,6 @@ def delete_auto_scaling_policy(self, auto_scaling_configuration_id, auto_scaling def get_auto_scaling_configuration(self, auto_scaling_configuration_id, **kwargs): """ - GetAutoScalingConfiguration Gets information about the specified autoscaling configuration. @@ -584,7 +578,6 @@ def get_auto_scaling_configuration(self, auto_scaling_configuration_id, **kwargs def get_auto_scaling_policy(self, auto_scaling_configuration_id, auto_scaling_policy_id, **kwargs): """ - GetAutoScalingPolicy Gets information about the specified autoscaling policy in the specified autoscaling configuration. @@ -662,7 +655,6 @@ def get_auto_scaling_policy(self, auto_scaling_configuration_id, auto_scaling_po def list_auto_scaling_configurations(self, compartment_id, **kwargs): """ - ListAutoScalingConfigurations Lists autoscaling configurations in the specifed compartment. @@ -785,7 +777,6 @@ def list_auto_scaling_configurations(self, compartment_id, **kwargs): def list_auto_scaling_policies(self, auto_scaling_configuration_id, **kwargs): """ - ListAutoScalingPolicies Lists the autoscaling policies in the specified autoscaling configuration. @@ -917,7 +908,6 @@ def list_auto_scaling_policies(self, auto_scaling_configuration_id, **kwargs): def update_auto_scaling_configuration(self, auto_scaling_configuration_id, update_auto_scaling_configuration_details, **kwargs): """ - UpdateAutoScalingConfiguration Updates certain fields on the specified autoscaling configuration, such as the name, the cooldown period, and whether the autoscaling configuration is enabled. @@ -1015,7 +1005,6 @@ def update_auto_scaling_configuration(self, auto_scaling_configuration_id, updat def update_auto_scaling_policy(self, auto_scaling_configuration_id, auto_scaling_policy_id, update_auto_scaling_policy_details, **kwargs): """ - UpdateAutoScalingPolicy Updates an autoscaling policy in the specified autoscaling configuration. diff --git a/src/oci/bds/__init__.py b/src/oci/bds/__init__.py new file mode 100644 index 0000000000..d8e548adb6 --- /dev/null +++ b/src/oci/bds/__init__.py @@ -0,0 +1,11 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + +from __future__ import absolute_import + + +from .bds_client import BdsClient +from .bds_client_composite_operations import BdsClientCompositeOperations +from . import models + +__all__ = ["BdsClient", "BdsClientCompositeOperations", "models"] diff --git a/src/oci/bds/bds_client.py b/src/oci/bds/bds_client.py new file mode 100644 index 0000000000..24052b5129 --- /dev/null +++ b/src/oci/bds/bds_client.py @@ -0,0 +1,1394 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + +from __future__ import absolute_import + +from oci._vendor import requests # noqa: F401 +from oci._vendor import six + +from oci import retry # 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 +from .models import bds_type_mapping +missing = Sentinel("Missing") + + +class BdsClient(object): + """ + API for the Big Data Service. Use this API to build, deploy, and manage fully elastic Big Data Service + build on Hadoop, Spark and Data Science distribution, which can be fully integrated with existing enterprise + data in Oracle Database and Oracle Applications.. + """ + + 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 `__. + """ + validate_config(config, signer=kwargs.get('signer')) + if 'signer' in kwargs: + signer = kwargs['signer'] + 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'), + 'timeout': kwargs.get('timeout'), + 'base_path': '/20190531', + 'service_endpoint_template': 'https://bigdataservice.{region}.oci.{secondLevelDomain}', + 'skip_deserialization': kwargs.get('skip_deserialization', False) + } + self.base_client = BaseClient("bds", config, signer, bds_type_mapping, **base_client_init_kwargs) + self.retry_strategy = kwargs.get('retry_strategy') + + def add_block_storage(self, bds_instance_id, add_block_storage_details, **kwargs): + """ + Adds storage to existing worker nodes. The same amount of storage will be added to all workers. + No change will be made to already attached storage. Block Storage once added cannot be removed. + + + :param str bds_instance_id: (required) + The OCID of the BDS instance + + :param AddBlockStorageDetails add_block_storage_details: (required) + Details for the newly added block storage + + :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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. 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`. + + :return: A :class:`~oci.response.Response` object with data of type None + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/bdsInstances/{bdsInstanceId}/actions/addBlockStorage" + method = "POST" + + # Don't accept unknown kwargs + expected_kwargs = [ + "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( + "add_block_storage got unknown kwargs: {!r}".format(extra_kwargs)) + + 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('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + 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.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=add_block_storage_details) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=add_block_storage_details) + + def add_cloud_sql(self, bds_instance_id, add_cloud_sql_details, **kwargs): + """ + Adds Cloud SQL to your cluster. This will add a query server node to the cluster + and create cell servers on all your worker nodes. + + + :param str bds_instance_id: (required) + The OCID of the BDS instance + + :param AddCloudSqlDetails add_cloud_sql_details: (required) + Details for the Cloud SQL capability + + :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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. 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`. + + :return: A :class:`~oci.response.Response` object with data of type None + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/bdsInstances/{bdsInstanceId}/actions/addCloudSql" + method = "POST" + + # Don't accept unknown kwargs + expected_kwargs = [ + "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( + "add_cloud_sql got unknown kwargs: {!r}".format(extra_kwargs)) + + 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('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + 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.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=add_cloud_sql_details) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=add_cloud_sql_details) + + def add_worker_nodes(self, bds_instance_id, add_worker_nodes_details, **kwargs): + """ + Add worker nodes to an existing cluster. The worker nodes added will be based on an identical shape + and have the same amount of attached block storage as other worker nodes in the cluster. + + + :param str bds_instance_id: (required) + The OCID of the BDS instance + + :param AddWorkerNodesDetails add_worker_nodes_details: (required) + Details for the newly added nodes + + :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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. 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`. + + :return: A :class:`~oci.response.Response` object with data of type None + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/bdsInstances/{bdsInstanceId}/actions/addWorkerNodes" + method = "POST" + + # Don't accept unknown kwargs + expected_kwargs = [ + "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( + "add_worker_nodes got unknown kwargs: {!r}".format(extra_kwargs)) + + 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('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + 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.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=add_worker_nodes_details) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=add_worker_nodes_details) + + def change_bds_instance_compartment(self, bds_instance_id, change_bds_instance_compartment_details, **kwargs): + """ + Moves a BDS instance into a different compartment. + + + :param str bds_instance_id: (required) + The OCID of the BDS instance + + :param ChangeBdsInstanceCompartmentDetails change_bds_instance_compartment_details: (required) + Details for the comparment change. + + :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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. 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`. + + :return: A :class:`~oci.response.Response` object with data of type None + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/bdsInstances/{bdsInstanceId}/actions/changeCompartment" + method = "POST" + + # Don't accept unknown kwargs + expected_kwargs = [ + "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( + "change_bds_instance_compartment got unknown kwargs: {!r}".format(extra_kwargs)) + + 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('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + 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.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=change_bds_instance_compartment_details) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=change_bds_instance_compartment_details) + + def create_bds_instance(self, create_bds_instance_details, **kwargs): + """ + Creates a new BDS instance. + + + :param CreateBdsInstanceDetails create_bds_instance_details: (required) + Details for the new BDS instace. + + :param str opc_request_id: (optional) + The client request ID for tracing. + + :param str opc_retry_token: (optional) + A token that uniquely identifies a request so it can be retried in case of a timeout or + server error without risk of executing that same action again. Retry tokens expire after 24 + hours, but can be invalidated before then due to conflicting operations. For example, if a resource + has been deleted and purged from the system, then a retry of the original creation request + might be rejected. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. 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`. + + :return: A :class:`~oci.response.Response` object with data of type None + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/bdsInstances" + method = "POST" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "opc_request_id", + "opc_retry_token" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "create_bds_instance got unknown kwargs: {!r}".format(extra_kwargs)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing), + "opc-retry-token": kwargs.get("opc_retry_token", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + header_params=header_params, + body=create_bds_instance_details) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + header_params=header_params, + body=create_bds_instance_details) + + def delete_bds_instance(self, bds_instance_id, **kwargs): + """ + Deletes a BDS instance by identifier + + + :param str bds_instance_id: (required) + The OCID of the BDS instance + + :param str opc_request_id: (optional) + The client request ID for tracing. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the `if-match` parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. 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`. + + :return: A :class:`~oci.response.Response` object with data of type None + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/bdsInstances/{bdsInstanceId}" + method = "DELETE" + + # Don't accept unknown kwargs + expected_kwargs = [ + "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( + "delete_bds_instance got unknown kwargs: {!r}".format(extra_kwargs)) + + 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('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + 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.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + 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) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + + def get_bds_instance(self, bds_instance_id, **kwargs): + """ + Gets a BDS instance by identifier + + + :param str bds_instance_id: (required) + The OCID of the BDS instance + + :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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. 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`. + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.bds.models.BdsInstance` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/bdsInstances/{bdsInstanceId}" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "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( + "get_bds_instance got unknown kwargs: {!r}".format(extra_kwargs)) + + 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('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + 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.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + 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="BdsInstance") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="BdsInstance") + + def get_work_request(self, work_request_id, **kwargs): + """ + Gets the status of the work request with 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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. 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`. + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.bds.models.WorkRequest` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/workRequests/{workRequestId}" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "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( + "get_work_request got unknown kwargs: {!r}".format(extra_kwargs)) + + 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('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + 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.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + 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") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="WorkRequest") + + def list_bds_instances(self, compartment_id, **kwargs): + """ + Returns a list of BDS instances. + + + :param str compartment_id: (required) + The OCID of the compartment. + + :param str lifecycle_state: (optional) + The state of the BDS instance. + + Allowed values are: "CREATING", "ACTIVE", "UPDATING", "SUSPENDING", "SUSPENDED", "RESUMING", "DELETING", "DELETED", "FAILED" + + :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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. 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`. + + :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.bds.models.BdsInstanceSummary` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/bdsInstances" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "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( + "list_bds_instances got unknown kwargs: {!r}".format(extra_kwargs)) + + if 'lifecycle_state' in kwargs: + lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "UPDATING", "SUSPENDING", "SUSPENDED", "RESUMING", "DELETING", "DELETED", "FAILED"] + if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: + raise ValueError( + "Invalid value for `lifecycle_state`, must be one of {0}".format(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( + "Invalid value for `sort_by`, must be one of {0}".format(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( + "Invalid value for `sort_order`, must be one of {0}".format(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) + } + 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.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="list[BdsInstanceSummary]") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="list[BdsInstanceSummary]") + + def list_work_request_errors(self, work_request_id, **kwargs): + """ + Return a (paginated) list of errors for a given work request. + + + :param str work_request_id: (required) + The ID of the asynchronous request. + + :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 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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. 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`. + + :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.bds.models.WorkRequestError` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/workRequests/{workRequestId}/errors" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "page", + "limit", + "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( + "list_work_request_errors got unknown kwargs: {!r}".format(extra_kwargs)) + + 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('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + if 'sort_by' in kwargs: + sort_by_allowed_values = ["timeCreated", "displayName"] + if kwargs['sort_by'] not in sort_by_allowed_values: + raise ValueError( + "Invalid value for `sort_by`, must be one of {0}".format(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( + "Invalid value for `sort_order`, must be one of {0}".format(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.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + 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[WorkRequestError]") + 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[WorkRequestError]") + + def list_work_request_logs(self, work_request_id, **kwargs): + """ + Return a (paginated) list of logs for a given work request. + + + :param str work_request_id: (required) + The ID of the asynchronous request. + + :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 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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. 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`. + + :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.bds.models.WorkRequestLogEntry` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/workRequests/{workRequestId}/logs" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "page", + "limit", + "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( + "list_work_request_logs got unknown kwargs: {!r}".format(extra_kwargs)) + + 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('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + if 'sort_by' in kwargs: + sort_by_allowed_values = ["timeCreated", "displayName"] + if kwargs['sort_by'] not in sort_by_allowed_values: + raise ValueError( + "Invalid value for `sort_by`, must be one of {0}".format(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( + "Invalid value for `sort_order`, must be one of {0}".format(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.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + 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[WorkRequestLogEntry]") + 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[WorkRequestLogEntry]") + + def list_work_requests(self, compartment_id, **kwargs): + """ + Lists the work requests in a compartment. + + + :param str compartment_id: (required) + The OCID of the compartment. + + :param str resource_id: (optional) + The OCID of the resource. + + :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 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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. 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`. + + :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.bds.models.WorkRequest` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/workRequests" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "resource_id", + "page", + "limit", + "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( + "list_work_requests got unknown kwargs: {!r}".format(extra_kwargs)) + + if 'sort_by' in kwargs: + sort_by_allowed_values = ["timeCreated", "displayName"] + if kwargs['sort_by'] not in sort_by_allowed_values: + raise ValueError( + "Invalid value for `sort_by`, must be one of {0}".format(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( + "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) + ) + + query_params = { + "compartmentId": compartment_id, + "resourceId": kwargs.get("resource_id", missing), + "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.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="list[WorkRequest]") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="list[WorkRequest]") + + def remove_cloud_sql(self, bds_instance_id, remove_cloud_sql_details, **kwargs): + """ + Remove Cloud SQL capability. + + + :param str bds_instance_id: (required) + The OCID of the BDS instance + + :param RemoveCloudSqlDetails remove_cloud_sql_details: (required) + Details for the Cloud SQL capability + + :param str opc_request_id: (optional) + The client request ID for tracing. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the `if-match` parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. 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`. + + :return: A :class:`~oci.response.Response` object with data of type None + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/bdsInstances/{bdsInstanceId}/actions/removeCloudSql" + method = "POST" + + # Don't accept unknown kwargs + expected_kwargs = [ + "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( + "remove_cloud_sql got unknown kwargs: {!r}".format(extra_kwargs)) + + 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('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + 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.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + 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_cloud_sql_details) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=remove_cloud_sql_details) + + def update_bds_instance(self, bds_instance_id, update_bds_instance_details, **kwargs): + """ + Update the BDS instance identified by the id + + + :param str bds_instance_id: (required) + The OCID of the BDS instance + + :param UpdateBdsInstanceDetails update_bds_instance_details: (required) + Details for the to-be-updated BDS instace. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the `if-match` parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. + + :param str opc_request_id: (optional) + The client request ID for tracing. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. 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`. + + :return: A :class:`~oci.response.Response` object with data of type None + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/bdsInstances/{bdsInstanceId}" + method = "PUT" + + # Don't accept unknown kwargs + expected_kwargs = [ + "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( + "update_bds_instance got unknown kwargs: {!r}".format(extra_kwargs)) + + 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('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + 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.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + 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_bds_instance_details) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=update_bds_instance_details) diff --git a/src/oci/bds/bds_client_composite_operations.py b/src/oci/bds/bds_client_composite_operations.py new file mode 100644 index 0000000000..eb8ea45c19 --- /dev/null +++ b/src/oci/bds/bds_client_composite_operations.py @@ -0,0 +1,353 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + +import oci # noqa: F401 +from oci.util import WAIT_RESOURCE_NOT_FOUND # noqa: F401 + + +class BdsClientCompositeOperations(object): + """ + This class provides a wrapper around :py:class:`~oci.bds.BdsClient` 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 BdsClientCompositeOperations object + + :param BdsClient client: + The service client which will be wrapped by this object + """ + self.client = client + + def add_block_storage_and_wait_for_state(self, bds_instance_id, add_block_storage_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.bds.BdsClient.add_block_storage` 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 BDS instance + + :param AddBlockStorageDetails add_block_storage_details: (required) + Details for the newly added block storage + + :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.add_block_storage` + + :param dict waiter_kwargs: + A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` + as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait + """ + operation_result = self.client.add_block_storage(bds_instance_id, add_block_storage_details, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + 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 add_cloud_sql_and_wait_for_state(self, bds_instance_id, add_cloud_sql_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.bds.BdsClient.add_cloud_sql` 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 BDS instance + + :param AddCloudSqlDetails add_cloud_sql_details: (required) + Details for the Cloud SQL capability + + :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.add_cloud_sql` + + :param dict waiter_kwargs: + A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` + as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait + """ + operation_result = self.client.add_cloud_sql(bds_instance_id, add_cloud_sql_details, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + 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 add_worker_nodes_and_wait_for_state(self, bds_instance_id, add_worker_nodes_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.bds.BdsClient.add_worker_nodes` 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 BDS instance + + :param AddWorkerNodesDetails add_worker_nodes_details: (required) + Details for the newly added nodes + + :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.add_worker_nodes` + + :param dict waiter_kwargs: + A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` + as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait + """ + operation_result = self.client.add_worker_nodes(bds_instance_id, add_worker_nodes_details, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + 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` + to enter the given state(s). + + :param str bds_instance_id: (required) + The OCID of the BDS instance + + :param ChangeBdsInstanceCompartmentDetails change_bds_instance_compartment_details: (required) + Details for the comparment change. + + :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.change_bds_instance_compartment` + + :param dict waiter_kwargs: + A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` + as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait + """ + operation_result = self.client.change_bds_instance_compartment(bds_instance_id, change_bds_instance_compartment_details, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + 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_bds_instance_and_wait_for_state(self, create_bds_instance_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.bds.BdsClient.create_bds_instance` and waits for the :py:class:`~oci.bds.models.WorkRequest` + to enter the given state(s). + + :param CreateBdsInstanceDetails create_bds_instance_details: (required) + Details for the new BDS instace. + + :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_bds_instance` + + :param dict waiter_kwargs: + A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` + as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait + """ + operation_result = self.client.create_bds_instance(create_bds_instance_details, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + 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_instance_and_wait_for_state(self, bds_instance_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.bds.BdsClient.delete_bds_instance` 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 BDS instance + + :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_bds_instance` + + :param dict waiter_kwargs: + A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` + as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait + """ + operation_result = None + try: + operation_result = self.client.delete_bds_instance(bds_instance_id, **operation_kwargs) + except oci.exceptions.ServiceError as e: + if e.status == 404: + return WAIT_RESOURCE_NOT_FOUND + else: + raise e + + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + 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 remove_cloud_sql_and_wait_for_state(self, bds_instance_id, remove_cloud_sql_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.bds.BdsClient.remove_cloud_sql` 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 BDS instance + + :param RemoveCloudSqlDetails remove_cloud_sql_details: (required) + Details for the Cloud SQL capability + + :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_cloud_sql` + + :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_cloud_sql(bds_instance_id, remove_cloud_sql_details, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + 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_bds_instance_and_wait_for_state(self, bds_instance_id, update_bds_instance_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.bds.BdsClient.update_bds_instance` 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 BDS instance + + :param UpdateBdsInstanceDetails update_bds_instance_details: (required) + Details for the to-be-updated BDS instace. + + :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_bds_instance` + + :param dict waiter_kwargs: + A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` + as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait + """ + operation_result = self.client.update_bds_instance(bds_instance_id, update_bds_instance_details, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + 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 new file mode 100644 index 0000000000..5ea2169f24 --- /dev/null +++ b/src/oci/bds/models/__init__.py @@ -0,0 +1,51 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + +from __future__ import absolute_import + +from .add_block_storage_details import AddBlockStorageDetails +from .add_cloud_sql_details import AddCloudSqlDetails +from .add_worker_nodes_details import AddWorkerNodesDetails +from .bds_instance import BdsInstance +from .bds_instance_summary import BdsInstanceSummary +from .change_bds_instance_compartment_details import ChangeBdsInstanceCompartmentDetails +from .cloud_sql_details import CloudSqlDetails +from .cluster_details import ClusterDetails +from .create_bds_instance_details import CreateBdsInstanceDetails +from .create_node_details import CreateNodeDetails +from .default_error import DefaultError +from .kerberos_details import KerberosDetails +from .network_config import NetworkConfig +from .node import Node +from .remove_cloud_sql_details import RemoveCloudSqlDetails +from .update_bds_instance_details import UpdateBdsInstanceDetails +from .volume_attachment_detail import VolumeAttachmentDetail +from .work_request import WorkRequest +from .work_request_error import WorkRequestError +from .work_request_log_entry import WorkRequestLogEntry +from .work_request_resource import WorkRequestResource + +# Maps type names to classes for bds services. +bds_type_mapping = { + "AddBlockStorageDetails": AddBlockStorageDetails, + "AddCloudSqlDetails": AddCloudSqlDetails, + "AddWorkerNodesDetails": AddWorkerNodesDetails, + "BdsInstance": BdsInstance, + "BdsInstanceSummary": BdsInstanceSummary, + "ChangeBdsInstanceCompartmentDetails": ChangeBdsInstanceCompartmentDetails, + "CloudSqlDetails": CloudSqlDetails, + "ClusterDetails": ClusterDetails, + "CreateBdsInstanceDetails": CreateBdsInstanceDetails, + "CreateNodeDetails": CreateNodeDetails, + "DefaultError": DefaultError, + "KerberosDetails": KerberosDetails, + "NetworkConfig": NetworkConfig, + "Node": Node, + "RemoveCloudSqlDetails": RemoveCloudSqlDetails, + "UpdateBdsInstanceDetails": UpdateBdsInstanceDetails, + "VolumeAttachmentDetail": VolumeAttachmentDetail, + "WorkRequest": WorkRequest, + "WorkRequestError": WorkRequestError, + "WorkRequestLogEntry": WorkRequestLogEntry, + "WorkRequestResource": WorkRequestResource +} diff --git a/src/oci/bds/models/add_block_storage_details.py b/src/oci/bds/models/add_block_storage_details.py new file mode 100644 index 0000000000..ec5b6fe373 --- /dev/null +++ b/src/oci/bds/models/add_block_storage_details.py @@ -0,0 +1,102 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + + +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 AddBlockStorageDetails(object): + """ + The information about additionally added block volumes + """ + + def __init__(self, **kwargs): + """ + Initializes a new AddBlockStorageDetails 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 AddBlockStorageDetails. + :type cluster_admin_password: str + + :param block_volume_size_in_gbs: + The value to assign to the block_volume_size_in_gbs property of this AddBlockStorageDetails. + :type block_volume_size_in_gbs: int + + """ + self.swagger_types = { + 'cluster_admin_password': 'str', + 'block_volume_size_in_gbs': 'int' + } + + self.attribute_map = { + 'cluster_admin_password': 'clusterAdminPassword', + 'block_volume_size_in_gbs': 'blockVolumeSizeInGBs' + } + + self._cluster_admin_password = None + self._block_volume_size_in_gbs = None + + @property + def cluster_admin_password(self): + """ + **[Required]** Gets the cluster_admin_password of this AddBlockStorageDetails. + Base-64 encoded password for Cloudera Manager admin user + + + :return: The cluster_admin_password of this AddBlockStorageDetails. + :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 AddBlockStorageDetails. + Base-64 encoded password for Cloudera Manager admin user + + + :param cluster_admin_password: The cluster_admin_password of this AddBlockStorageDetails. + :type: str + """ + self._cluster_admin_password = cluster_admin_password + + @property + def block_volume_size_in_gbs(self): + """ + **[Required]** Gets the block_volume_size_in_gbs of this AddBlockStorageDetails. + The size of block volume in GB that needs to be added to each worker node. + All the necessary details needed for attachment are managed by service itself. + + + :return: The block_volume_size_in_gbs of this AddBlockStorageDetails. + :rtype: int + """ + return self._block_volume_size_in_gbs + + @block_volume_size_in_gbs.setter + def block_volume_size_in_gbs(self, block_volume_size_in_gbs): + """ + Sets the block_volume_size_in_gbs of this AddBlockStorageDetails. + The size of block volume in GB that needs to be added to each worker node. + All the necessary details needed for attachment are managed by service itself. + + + :param block_volume_size_in_gbs: The block_volume_size_in_gbs of this AddBlockStorageDetails. + :type: int + """ + self._block_volume_size_in_gbs = block_volume_size_in_gbs + + 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/add_cloud_sql_details.py b/src/oci/bds/models/add_cloud_sql_details.py new file mode 100644 index 0000000000..c23291f388 --- /dev/null +++ b/src/oci/bds/models/add_cloud_sql_details.py @@ -0,0 +1,133 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + + +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 AddCloudSqlDetails(object): + """ + The information about added Cloud SQL capability + """ + + def __init__(self, **kwargs): + """ + Initializes a new AddCloudSqlDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param shape: + The value to assign to the shape property of this AddCloudSqlDetails. + :type shape: str + + :param block_volume_size_in_gbs: + The value to assign to the block_volume_size_in_gbs property of this AddCloudSqlDetails. + :type block_volume_size_in_gbs: int + + :param cluster_admin_password: + The value to assign to the cluster_admin_password property of this AddCloudSqlDetails. + :type cluster_admin_password: str + + """ + self.swagger_types = { + 'shape': 'str', + 'block_volume_size_in_gbs': 'int', + 'cluster_admin_password': 'str' + } + + self.attribute_map = { + 'shape': 'shape', + 'block_volume_size_in_gbs': 'blockVolumeSizeInGBs', + 'cluster_admin_password': 'clusterAdminPassword' + } + + self._shape = None + self._block_volume_size_in_gbs = None + self._cluster_admin_password = None + + @property + def shape(self): + """ + **[Required]** Gets the shape of this AddCloudSqlDetails. + Shape of the node + + + :return: The shape of this AddCloudSqlDetails. + :rtype: str + """ + return self._shape + + @shape.setter + def shape(self, shape): + """ + Sets the shape of this AddCloudSqlDetails. + Shape of the node + + + :param shape: The shape of this AddCloudSqlDetails. + :type: str + """ + self._shape = shape + + @property + def block_volume_size_in_gbs(self): + """ + Gets the block_volume_size_in_gbs of this AddCloudSqlDetails. + The size of block volume in GB that needs to be attached to a given node. + All the necessary details needed for attachment are managed by service itself. + + + :return: The block_volume_size_in_gbs of this AddCloudSqlDetails. + :rtype: int + """ + return self._block_volume_size_in_gbs + + @block_volume_size_in_gbs.setter + def block_volume_size_in_gbs(self, block_volume_size_in_gbs): + """ + Sets the block_volume_size_in_gbs of this AddCloudSqlDetails. + The size of block volume in GB that needs to be attached to a given node. + All the necessary details needed for attachment are managed by service itself. + + + :param block_volume_size_in_gbs: The block_volume_size_in_gbs of this AddCloudSqlDetails. + :type: int + """ + self._block_volume_size_in_gbs = block_volume_size_in_gbs + + @property + def cluster_admin_password(self): + """ + **[Required]** Gets the cluster_admin_password of this AddCloudSqlDetails. + Base-64 encoded password for Cloudera Manager admin user + + + :return: The cluster_admin_password of this AddCloudSqlDetails. + :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 AddCloudSqlDetails. + Base-64 encoded password for Cloudera Manager admin user + + + :param cluster_admin_password: The cluster_admin_password of this AddCloudSqlDetails. + :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/add_worker_nodes_details.py b/src/oci/bds/models/add_worker_nodes_details.py new file mode 100644 index 0000000000..6091b5b341 --- /dev/null +++ b/src/oci/bds/models/add_worker_nodes_details.py @@ -0,0 +1,100 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + + +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 AddWorkerNodesDetails(object): + """ + The information about additionaly added nodes + """ + + def __init__(self, **kwargs): + """ + Initializes a new AddWorkerNodesDetails 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 AddWorkerNodesDetails. + :type cluster_admin_password: str + + :param number_of_worker_nodes: + The value to assign to the number_of_worker_nodes property of this AddWorkerNodesDetails. + :type number_of_worker_nodes: int + + """ + self.swagger_types = { + 'cluster_admin_password': 'str', + 'number_of_worker_nodes': 'int' + } + + self.attribute_map = { + 'cluster_admin_password': 'clusterAdminPassword', + 'number_of_worker_nodes': 'numberOfWorkerNodes' + } + + self._cluster_admin_password = None + self._number_of_worker_nodes = None + + @property + def cluster_admin_password(self): + """ + **[Required]** Gets the cluster_admin_password of this AddWorkerNodesDetails. + Base-64 encoded password for Cloudera Manager admin user + + + :return: The cluster_admin_password of this AddWorkerNodesDetails. + :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 AddWorkerNodesDetails. + Base-64 encoded password for Cloudera Manager admin user + + + :param cluster_admin_password: The cluster_admin_password of this AddWorkerNodesDetails. + :type: str + """ + self._cluster_admin_password = cluster_admin_password + + @property + def number_of_worker_nodes(self): + """ + **[Required]** Gets the number_of_worker_nodes of this AddWorkerNodesDetails. + Number of additional worker nodes for the BDS instance + + + :return: The number_of_worker_nodes of this AddWorkerNodesDetails. + :rtype: int + """ + return self._number_of_worker_nodes + + @number_of_worker_nodes.setter + def number_of_worker_nodes(self, number_of_worker_nodes): + """ + Sets the number_of_worker_nodes of this AddWorkerNodesDetails. + Number of additional worker nodes for the BDS instance + + + :param number_of_worker_nodes: The number_of_worker_nodes of this AddWorkerNodesDetails. + :type: int + """ + self._number_of_worker_nodes = number_of_worker_nodes + + 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/bds_instance.py b/src/oci/bds/models/bds_instance.py new file mode 100644 index 0000000000..26209831ec --- /dev/null +++ b/src/oci/bds/models/bds_instance.py @@ -0,0 +1,660 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + + +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 BdsInstance(object): + """ + Description of the BDS instance + """ + + #: A constant which can be used with the lifecycle_state property of a BdsInstance. + #: This constant has a value of "CREATING" + LIFECYCLE_STATE_CREATING = "CREATING" + + #: A constant which can be used with the lifecycle_state property of a BdsInstance. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a BdsInstance. + #: This constant has a value of "UPDATING" + LIFECYCLE_STATE_UPDATING = "UPDATING" + + #: A constant which can be used with the lifecycle_state property of a BdsInstance. + #: This constant has a value of "SUSPENDING" + LIFECYCLE_STATE_SUSPENDING = "SUSPENDING" + + #: A constant which can be used with the lifecycle_state property of a BdsInstance. + #: This constant has a value of "SUSPENDED" + LIFECYCLE_STATE_SUSPENDED = "SUSPENDED" + + #: A constant which can be used with the lifecycle_state property of a BdsInstance. + #: This constant has a value of "RESUMING" + LIFECYCLE_STATE_RESUMING = "RESUMING" + + #: A constant which can be used with the lifecycle_state property of a BdsInstance. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + #: A constant which can be used with the lifecycle_state property of a BdsInstance. + #: This constant has a value of "DELETED" + LIFECYCLE_STATE_DELETED = "DELETED" + + #: A constant which can be used with the lifecycle_state property of a BdsInstance. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + #: A constant which can be used with the cluster_version property of a BdsInstance. + #: This constant has a value of "CDH5" + CLUSTER_VERSION_CDH5 = "CDH5" + + #: A constant which can be used with the cluster_version property of a BdsInstance. + #: This constant has a value of "CDH6" + CLUSTER_VERSION_CDH6 = "CDH6" + + def __init__(self, **kwargs): + """ + Initializes a new BdsInstance 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 BdsInstance. + :type id: str + + :param compartment_id: + The value to assign to the compartment_id property of this BdsInstance. + :type compartment_id: str + + :param display_name: + The value to assign to the display_name property of this BdsInstance. + :type display_name: str + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this BdsInstance. + Allowed values for this property are: "CREATING", "ACTIVE", "UPDATING", "SUSPENDING", "SUSPENDED", "RESUMING", "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 cluster_version: + The value to assign to the cluster_version property of this BdsInstance. + Allowed values for this property are: "CDH5", "CDH6", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type cluster_version: str + + :param is_high_availability: + The value to assign to the is_high_availability property of this BdsInstance. + :type is_high_availability: bool + + :param is_secure: + The value to assign to the is_secure property of this BdsInstance. + :type is_secure: bool + + :param is_cloud_sql_configured: + The value to assign to the is_cloud_sql_configured property of this BdsInstance. + :type is_cloud_sql_configured: bool + + :param network_config: + The value to assign to the network_config property of this BdsInstance. + :type network_config: NetworkConfig + + :param cluster_details: + The value to assign to the cluster_details property of this BdsInstance. + :type cluster_details: ClusterDetails + + :param nodes: + The value to assign to the nodes property of this BdsInstance. + :type nodes: list[Node] + + :param cloud_sql_details: + The value to assign to the cloud_sql_details property of this BdsInstance. + :type cloud_sql_details: CloudSqlDetails + + :param created_by: + The value to assign to the created_by property of this BdsInstance. + :type created_by: str + + :param time_created: + The value to assign to the time_created property of this BdsInstance. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this BdsInstance. + :type time_updated: datetime + + :param number_of_nodes: + The value to assign to the number_of_nodes property of this BdsInstance. + :type number_of_nodes: int + + :param freeform_tags: + The value to assign to the freeform_tags property of this BdsInstance. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this BdsInstance. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'id': 'str', + 'compartment_id': 'str', + 'display_name': 'str', + 'lifecycle_state': 'str', + 'cluster_version': 'str', + 'is_high_availability': 'bool', + 'is_secure': 'bool', + 'is_cloud_sql_configured': 'bool', + 'network_config': 'NetworkConfig', + 'cluster_details': 'ClusterDetails', + 'nodes': 'list[Node]', + 'cloud_sql_details': 'CloudSqlDetails', + 'created_by': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'number_of_nodes': 'int', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'id': 'id', + 'compartment_id': 'compartmentId', + 'display_name': 'displayName', + 'lifecycle_state': 'lifecycleState', + 'cluster_version': 'clusterVersion', + 'is_high_availability': 'isHighAvailability', + 'is_secure': 'isSecure', + 'is_cloud_sql_configured': 'isCloudSqlConfigured', + 'network_config': 'networkConfig', + 'cluster_details': 'clusterDetails', + 'nodes': 'nodes', + 'cloud_sql_details': 'cloudSqlDetails', + 'created_by': 'createdBy', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'number_of_nodes': 'numberOfNodes', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._id = None + self._compartment_id = None + self._display_name = None + self._lifecycle_state = None + self._cluster_version = None + self._is_high_availability = None + self._is_secure = None + self._is_cloud_sql_configured = None + self._network_config = None + self._cluster_details = None + self._nodes = None + self._cloud_sql_details = None + self._created_by = None + self._time_created = None + self._time_updated = None + self._number_of_nodes = None + self._freeform_tags = None + self._defined_tags = None + + @property + def id(self): + """ + **[Required]** Gets the id of this BdsInstance. + The OCID of the BDS resource + + + :return: The id of this BdsInstance. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this BdsInstance. + The OCID of the BDS resource + + + :param id: The id of this BdsInstance. + :type: str + """ + self._id = id + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this BdsInstance. + The OCID of the compartment + + + :return: The compartment_id of this BdsInstance. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this BdsInstance. + The OCID of the compartment + + + :param compartment_id: The compartment_id of this BdsInstance. + :type: str + """ + self._compartment_id = compartment_id + + @property + def display_name(self): + """ + **[Required]** Gets the display_name of this BdsInstance. + Name of the BDS instance + + + :return: The display_name of this BdsInstance. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this BdsInstance. + Name of the BDS instance + + + :param display_name: The display_name of this BdsInstance. + :type: str + """ + self._display_name = display_name + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this BdsInstance. + The state of the BDS instance + + Allowed values for this property are: "CREATING", "ACTIVE", "UPDATING", "SUSPENDING", "SUSPENDED", "RESUMING", "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 BdsInstance. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this BdsInstance. + The state of the BDS instance + + + :param lifecycle_state: The lifecycle_state of this BdsInstance. + :type: str + """ + allowed_values = ["CREATING", "ACTIVE", "UPDATING", "SUSPENDING", "SUSPENDED", "RESUMING", "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 cluster_version(self): + """ + Gets the cluster_version of this BdsInstance. + Version of the Hadoop distribution + + Allowed values for this property are: "CDH5", "CDH6", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The cluster_version of this BdsInstance. + :rtype: str + """ + return self._cluster_version + + @cluster_version.setter + def cluster_version(self, cluster_version): + """ + Sets the cluster_version of this BdsInstance. + Version of the Hadoop distribution + + + :param cluster_version: The cluster_version of this BdsInstance. + :type: str + """ + allowed_values = ["CDH5", "CDH6"] + if not value_allowed_none_or_none_sentinel(cluster_version, allowed_values): + cluster_version = 'UNKNOWN_ENUM_VALUE' + self._cluster_version = cluster_version + + @property + def is_high_availability(self): + """ + **[Required]** Gets the is_high_availability of this BdsInstance. + Boolean flag specifying whether or not the cluster is HA + + + :return: The is_high_availability of this BdsInstance. + :rtype: bool + """ + return self._is_high_availability + + @is_high_availability.setter + def is_high_availability(self, is_high_availability): + """ + Sets the is_high_availability of this BdsInstance. + Boolean flag specifying whether or not the cluster is HA + + + :param is_high_availability: The is_high_availability of this BdsInstance. + :type: bool + """ + self._is_high_availability = is_high_availability + + @property + def is_secure(self): + """ + **[Required]** Gets the is_secure of this BdsInstance. + Boolean flag specifying whether or not the cluster should be setup as secure. + + + :return: The is_secure of this BdsInstance. + :rtype: bool + """ + return self._is_secure + + @is_secure.setter + def is_secure(self, is_secure): + """ + Sets the is_secure of this BdsInstance. + Boolean flag specifying whether or not the cluster should be setup as secure. + + + :param is_secure: The is_secure of this BdsInstance. + :type: bool + """ + self._is_secure = is_secure + + @property + def is_cloud_sql_configured(self): + """ + **[Required]** Gets the is_cloud_sql_configured of this BdsInstance. + Boolean flag specifying whether we configure Cloud SQL or not + + + :return: The is_cloud_sql_configured of this BdsInstance. + :rtype: bool + """ + return self._is_cloud_sql_configured + + @is_cloud_sql_configured.setter + def is_cloud_sql_configured(self, is_cloud_sql_configured): + """ + Sets the is_cloud_sql_configured of this BdsInstance. + Boolean flag specifying whether we configure Cloud SQL or not + + + :param is_cloud_sql_configured: The is_cloud_sql_configured of this BdsInstance. + :type: bool + """ + self._is_cloud_sql_configured = is_cloud_sql_configured + + @property + def network_config(self): + """ + Gets the network_config of this BdsInstance. + Additional configuration of customer's network. + + + :return: The network_config of this BdsInstance. + :rtype: NetworkConfig + """ + return self._network_config + + @network_config.setter + def network_config(self, network_config): + """ + Sets the network_config of this BdsInstance. + Additional configuration of customer's network. + + + :param network_config: The network_config of this BdsInstance. + :type: NetworkConfig + """ + self._network_config = network_config + + @property + def cluster_details(self): + """ + Gets the cluster_details of this BdsInstance. + Specific info about a Hadoop cluster + + + :return: The cluster_details of this BdsInstance. + :rtype: ClusterDetails + """ + return self._cluster_details + + @cluster_details.setter + def cluster_details(self, cluster_details): + """ + Sets the cluster_details of this BdsInstance. + Specific info about a Hadoop cluster + + + :param cluster_details: The cluster_details of this BdsInstance. + :type: ClusterDetails + """ + self._cluster_details = cluster_details + + @property + def nodes(self): + """ + **[Required]** Gets the nodes of this BdsInstance. + The list of nodes in the BDS instance + + + :return: The nodes of this BdsInstance. + :rtype: list[Node] + """ + return self._nodes + + @nodes.setter + def nodes(self, nodes): + """ + Sets the nodes of this BdsInstance. + The list of nodes in the BDS instance + + + :param nodes: The nodes of this BdsInstance. + :type: list[Node] + """ + self._nodes = nodes + + @property + def cloud_sql_details(self): + """ + Gets the cloud_sql_details of this BdsInstance. + The information about added Cloud SQL capability + + + :return: The cloud_sql_details of this BdsInstance. + :rtype: CloudSqlDetails + """ + return self._cloud_sql_details + + @cloud_sql_details.setter + def cloud_sql_details(self, cloud_sql_details): + """ + Sets the cloud_sql_details of this BdsInstance. + The information about added Cloud SQL capability + + + :param cloud_sql_details: The cloud_sql_details of this BdsInstance. + :type: CloudSqlDetails + """ + self._cloud_sql_details = cloud_sql_details + + @property + def created_by(self): + """ + Gets the created_by of this BdsInstance. + The user who created the BDS instance. + + + :return: The created_by of this BdsInstance. + :rtype: str + """ + return self._created_by + + @created_by.setter + def created_by(self, created_by): + """ + Sets the created_by of this BdsInstance. + The user who created the BDS instance. + + + :param created_by: The created_by of this BdsInstance. + :type: str + """ + self._created_by = created_by + + @property + def time_created(self): + """ + Gets the time_created of this BdsInstance. + The time the BDS instance was created. An RFC3339 formatted datetime string + + + :return: The time_created of this BdsInstance. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this BdsInstance. + The time the BDS instance was created. An RFC3339 formatted datetime string + + + :param time_created: The time_created of this BdsInstance. + :type: datetime + """ + self._time_created = time_created + + @property + def time_updated(self): + """ + Gets the time_updated of this BdsInstance. + The time the BDS instance was updated. An RFC3339 formatted datetime string + + + :return: The time_updated of this BdsInstance. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this BdsInstance. + The time the BDS instance was updated. An RFC3339 formatted datetime string + + + :param time_updated: The time_updated of this BdsInstance. + :type: datetime + """ + self._time_updated = time_updated + + @property + def number_of_nodes(self): + """ + **[Required]** Gets the number_of_nodes of this BdsInstance. + Number of nodes that forming the cluster + + + :return: The number_of_nodes of this BdsInstance. + :rtype: int + """ + return self._number_of_nodes + + @number_of_nodes.setter + def number_of_nodes(self, number_of_nodes): + """ + Sets the number_of_nodes of this BdsInstance. + Number of nodes that forming the cluster + + + :param number_of_nodes: The number_of_nodes of this BdsInstance. + :type: int + """ + self._number_of_nodes = number_of_nodes + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this BdsInstance. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + Example: `{\"bar-key\": \"value\"}` + + + :return: The freeform_tags of this BdsInstance. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this BdsInstance. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + Example: `{\"bar-key\": \"value\"}` + + + :param freeform_tags: The freeform_tags of this BdsInstance. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this BdsInstance. + Defined tags for this resource. Each key is predefined and scoped to a namespace. + Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + + :return: The defined_tags of this BdsInstance. + :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 BdsInstance. + Defined tags for this resource. Each key is predefined and scoped to a namespace. + Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + + :param defined_tags: The defined_tags of this BdsInstance. + :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/bds/models/bds_instance_summary.py b/src/oci/bds/models/bds_instance_summary.py new file mode 100644 index 0000000000..323870a663 --- /dev/null +++ b/src/oci/bds/models/bds_instance_summary.py @@ -0,0 +1,414 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + + +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 BdsInstanceSummary(object): + """ + Summary of the BDS instance + """ + + def __init__(self, **kwargs): + """ + Initializes a new BdsInstanceSummary 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 BdsInstanceSummary. + :type id: str + + :param compartment_id: + The value to assign to the compartment_id property of this BdsInstanceSummary. + :type compartment_id: str + + :param display_name: + The value to assign to the display_name property of this BdsInstanceSummary. + :type display_name: str + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this BdsInstanceSummary. + :type lifecycle_state: str + + :param number_of_nodes: + The value to assign to the number_of_nodes property of this BdsInstanceSummary. + :type number_of_nodes: int + + :param cluster_version: + The value to assign to the cluster_version property of this BdsInstanceSummary. + :type cluster_version: str + + :param is_high_availability: + The value to assign to the is_high_availability property of this BdsInstanceSummary. + :type is_high_availability: bool + + :param is_secure: + The value to assign to the is_secure property of this BdsInstanceSummary. + :type is_secure: bool + + :param is_cloud_sql_configured: + The value to assign to the is_cloud_sql_configured property of this BdsInstanceSummary. + :type is_cloud_sql_configured: bool + + :param time_created: + The value to assign to the time_created property of this BdsInstanceSummary. + :type time_created: datetime + + :param freeform_tags: + The value to assign to the freeform_tags property of this BdsInstanceSummary. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this BdsInstanceSummary. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'id': 'str', + 'compartment_id': 'str', + 'display_name': 'str', + 'lifecycle_state': 'str', + 'number_of_nodes': 'int', + 'cluster_version': 'str', + 'is_high_availability': 'bool', + 'is_secure': 'bool', + 'is_cloud_sql_configured': 'bool', + 'time_created': 'datetime', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'id': 'id', + 'compartment_id': 'compartmentId', + 'display_name': 'displayName', + 'lifecycle_state': 'lifecycleState', + 'number_of_nodes': 'numberOfNodes', + 'cluster_version': 'clusterVersion', + 'is_high_availability': 'isHighAvailability', + 'is_secure': 'isSecure', + 'is_cloud_sql_configured': 'isCloudSqlConfigured', + 'time_created': 'timeCreated', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._id = None + self._compartment_id = None + self._display_name = None + self._lifecycle_state = None + self._number_of_nodes = None + self._cluster_version = None + self._is_high_availability = None + self._is_secure = None + self._is_cloud_sql_configured = None + self._time_created = None + self._freeform_tags = None + self._defined_tags = None + + @property + def id(self): + """ + **[Required]** Gets the id of this BdsInstanceSummary. + The OCID of the BDS resource + + + :return: The id of this BdsInstanceSummary. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this BdsInstanceSummary. + The OCID of the BDS resource + + + :param id: The id of this BdsInstanceSummary. + :type: str + """ + self._id = id + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this BdsInstanceSummary. + The OCID of the compartment + + + :return: The compartment_id of this BdsInstanceSummary. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this BdsInstanceSummary. + The OCID of the compartment + + + :param compartment_id: The compartment_id of this BdsInstanceSummary. + :type: str + """ + self._compartment_id = compartment_id + + @property + def display_name(self): + """ + **[Required]** Gets the display_name of this BdsInstanceSummary. + Name of the BDS instance + + + :return: The display_name of this BdsInstanceSummary. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this BdsInstanceSummary. + Name of the BDS instance + + + :param display_name: The display_name of this BdsInstanceSummary. + :type: str + """ + self._display_name = display_name + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this BdsInstanceSummary. + The state of the BDS instance + + + :return: The lifecycle_state of this BdsInstanceSummary. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this BdsInstanceSummary. + The state of the BDS instance + + + :param lifecycle_state: The lifecycle_state of this BdsInstanceSummary. + :type: str + """ + self._lifecycle_state = lifecycle_state + + @property + def number_of_nodes(self): + """ + **[Required]** Gets the number_of_nodes of this BdsInstanceSummary. + Number of nodes that forming the cluster + + + :return: The number_of_nodes of this BdsInstanceSummary. + :rtype: int + """ + return self._number_of_nodes + + @number_of_nodes.setter + def number_of_nodes(self, number_of_nodes): + """ + Sets the number_of_nodes of this BdsInstanceSummary. + Number of nodes that forming the cluster + + + :param number_of_nodes: The number_of_nodes of this BdsInstanceSummary. + :type: int + """ + self._number_of_nodes = number_of_nodes + + @property + def cluster_version(self): + """ + Gets the cluster_version of this BdsInstanceSummary. + Version of the Hadoop distribution + + + :return: The cluster_version of this BdsInstanceSummary. + :rtype: str + """ + return self._cluster_version + + @cluster_version.setter + def cluster_version(self, cluster_version): + """ + Sets the cluster_version of this BdsInstanceSummary. + Version of the Hadoop distribution + + + :param cluster_version: The cluster_version of this BdsInstanceSummary. + :type: str + """ + self._cluster_version = cluster_version + + @property + def is_high_availability(self): + """ + **[Required]** Gets the is_high_availability of this BdsInstanceSummary. + Boolean flag specifying whether or not the cluster is HA + + + :return: The is_high_availability of this BdsInstanceSummary. + :rtype: bool + """ + return self._is_high_availability + + @is_high_availability.setter + def is_high_availability(self, is_high_availability): + """ + Sets the is_high_availability of this BdsInstanceSummary. + Boolean flag specifying whether or not the cluster is HA + + + :param is_high_availability: The is_high_availability of this BdsInstanceSummary. + :type: bool + """ + self._is_high_availability = is_high_availability + + @property + def is_secure(self): + """ + **[Required]** Gets the is_secure of this BdsInstanceSummary. + Boolean flag specifying whether or not the cluster should be setup as secure. + + + :return: The is_secure of this BdsInstanceSummary. + :rtype: bool + """ + return self._is_secure + + @is_secure.setter + def is_secure(self, is_secure): + """ + Sets the is_secure of this BdsInstanceSummary. + Boolean flag specifying whether or not the cluster should be setup as secure. + + + :param is_secure: The is_secure of this BdsInstanceSummary. + :type: bool + """ + self._is_secure = is_secure + + @property + def is_cloud_sql_configured(self): + """ + **[Required]** Gets the is_cloud_sql_configured of this BdsInstanceSummary. + Boolean flag specifying whether we configure Cloud SQL or not + + + :return: The is_cloud_sql_configured of this BdsInstanceSummary. + :rtype: bool + """ + return self._is_cloud_sql_configured + + @is_cloud_sql_configured.setter + def is_cloud_sql_configured(self, is_cloud_sql_configured): + """ + Sets the is_cloud_sql_configured of this BdsInstanceSummary. + Boolean flag specifying whether we configure Cloud SQL or not + + + :param is_cloud_sql_configured: The is_cloud_sql_configured of this BdsInstanceSummary. + :type: bool + """ + self._is_cloud_sql_configured = is_cloud_sql_configured + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this BdsInstanceSummary. + The time the BDS instance was created. An RFC3339 formatted datetime string + + + :return: The time_created of this BdsInstanceSummary. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this BdsInstanceSummary. + The time the BDS instance was created. An RFC3339 formatted datetime string + + + :param time_created: The time_created of this BdsInstanceSummary. + :type: datetime + """ + self._time_created = time_created + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this BdsInstanceSummary. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + Example: `{\"bar-key\": \"value\"}` + + + :return: The freeform_tags of this BdsInstanceSummary. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this BdsInstanceSummary. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + Example: `{\"bar-key\": \"value\"}` + + + :param freeform_tags: The freeform_tags of this BdsInstanceSummary. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this BdsInstanceSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. + Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + + :return: The defined_tags of this BdsInstanceSummary. + :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 BdsInstanceSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. + Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + + :param defined_tags: The defined_tags of this BdsInstanceSummary. + :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/bds/models/change_bds_instance_compartment_details.py b/src/oci/bds/models/change_bds_instance_compartment_details.py new file mode 100644 index 0000000000..f8b9e31280 --- /dev/null +++ b/src/oci/bds/models/change_bds_instance_compartment_details.py @@ -0,0 +1,69 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + + +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 ChangeBdsInstanceCompartmentDetails(object): + """ + Moves a BDS instance into a different compartment. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ChangeBdsInstanceCompartmentDetails 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 ChangeBdsInstanceCompartmentDetails. + :type compartment_id: str + + """ + self.swagger_types = { + 'compartment_id': 'str' + } + + self.attribute_map = { + 'compartment_id': 'compartmentId' + } + + self._compartment_id = None + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this ChangeBdsInstanceCompartmentDetails. + The OCID of the compartment + + + :return: The compartment_id of this ChangeBdsInstanceCompartmentDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this ChangeBdsInstanceCompartmentDetails. + The OCID of the compartment + + + :param compartment_id: The compartment_id of this ChangeBdsInstanceCompartmentDetails. + :type: str + """ + self._compartment_id = compartment_id + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/bds/models/cloud_sql_details.py b/src/oci/bds/models/cloud_sql_details.py new file mode 100644 index 0000000000..a0cdecd8ba --- /dev/null +++ b/src/oci/bds/models/cloud_sql_details.py @@ -0,0 +1,197 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + + +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 CloudSqlDetails(object): + """ + The information about added Cloud SQL capability + """ + + def __init__(self, **kwargs): + """ + Initializes a new CloudSqlDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param shape: + The value to assign to the shape property of this CloudSqlDetails. + :type shape: str + + :param block_volume_size_in_gbs: + The value to assign to the block_volume_size_in_gbs property of this CloudSqlDetails. + :type block_volume_size_in_gbs: int + + :param is_kerberos_mapped_to_database_users: + The value to assign to the is_kerberos_mapped_to_database_users property of this CloudSqlDetails. + :type is_kerberos_mapped_to_database_users: bool + + :param ip_address: + The value to assign to the ip_address property of this CloudSqlDetails. + :type ip_address: str + + :param kerberos_details: + The value to assign to the kerberos_details property of this CloudSqlDetails. + :type kerberos_details: list[KerberosDetails] + + """ + self.swagger_types = { + 'shape': 'str', + 'block_volume_size_in_gbs': 'int', + 'is_kerberos_mapped_to_database_users': 'bool', + 'ip_address': 'str', + 'kerberos_details': 'list[KerberosDetails]' + } + + self.attribute_map = { + 'shape': 'shape', + 'block_volume_size_in_gbs': 'blockVolumeSizeInGBs', + 'is_kerberos_mapped_to_database_users': 'isKerberosMappedToDatabaseUsers', + 'ip_address': 'ipAddress', + 'kerberos_details': 'kerberosDetails' + } + + self._shape = None + self._block_volume_size_in_gbs = None + self._is_kerberos_mapped_to_database_users = None + self._ip_address = None + self._kerberos_details = None + + @property + def shape(self): + """ + **[Required]** Gets the shape of this CloudSqlDetails. + Shape of the node + + + :return: The shape of this CloudSqlDetails. + :rtype: str + """ + return self._shape + + @shape.setter + def shape(self, shape): + """ + Sets the shape of this CloudSqlDetails. + Shape of the node + + + :param shape: The shape of this CloudSqlDetails. + :type: str + """ + self._shape = shape + + @property + def block_volume_size_in_gbs(self): + """ + Gets the block_volume_size_in_gbs of this CloudSqlDetails. + The size of block volume in GB that needs to be attached to a given node. + All the necessary details needed for attachment are managed by service itself. + + + :return: The block_volume_size_in_gbs of this CloudSqlDetails. + :rtype: int + """ + return self._block_volume_size_in_gbs + + @block_volume_size_in_gbs.setter + def block_volume_size_in_gbs(self, block_volume_size_in_gbs): + """ + Sets the block_volume_size_in_gbs of this CloudSqlDetails. + The size of block volume in GB that needs to be attached to a given node. + All the necessary details needed for attachment are managed by service itself. + + + :param block_volume_size_in_gbs: The block_volume_size_in_gbs of this CloudSqlDetails. + :type: int + """ + self._block_volume_size_in_gbs = block_volume_size_in_gbs + + @property + def is_kerberos_mapped_to_database_users(self): + """ + Gets the is_kerberos_mapped_to_database_users of this CloudSqlDetails. + Boolean flag specifying whether or not are Kerberos principals mapped + to database users. + + + :return: The is_kerberos_mapped_to_database_users of this CloudSqlDetails. + :rtype: bool + """ + return self._is_kerberos_mapped_to_database_users + + @is_kerberos_mapped_to_database_users.setter + def is_kerberos_mapped_to_database_users(self, is_kerberos_mapped_to_database_users): + """ + Sets the is_kerberos_mapped_to_database_users of this CloudSqlDetails. + Boolean flag specifying whether or not are Kerberos principals mapped + to database users. + + + :param is_kerberos_mapped_to_database_users: The is_kerberos_mapped_to_database_users of this CloudSqlDetails. + :type: bool + """ + self._is_kerberos_mapped_to_database_users = is_kerberos_mapped_to_database_users + + @property + def ip_address(self): + """ + **[Required]** Gets the ip_address of this CloudSqlDetails. + IP address of the Cloud SQL node + + + :return: The ip_address of this CloudSqlDetails. + :rtype: str + """ + return self._ip_address + + @ip_address.setter + def ip_address(self, ip_address): + """ + Sets the ip_address of this CloudSqlDetails. + IP address of the Cloud SQL node + + + :param ip_address: The ip_address of this CloudSqlDetails. + :type: str + """ + self._ip_address = ip_address + + @property + def kerberos_details(self): + """ + Gets the kerberos_details of this CloudSqlDetails. + Details about Kerberos principals + + + :return: The kerberos_details of this CloudSqlDetails. + :rtype: list[KerberosDetails] + """ + return self._kerberos_details + + @kerberos_details.setter + def kerberos_details(self, kerberos_details): + """ + Sets the kerberos_details of this CloudSqlDetails. + Details about Kerberos principals + + + :param kerberos_details: The kerberos_details of this CloudSqlDetails. + :type: list[KerberosDetails] + """ + self._kerberos_details = kerberos_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/bds/models/cluster_details.py b/src/oci/bds/models/cluster_details.py new file mode 100644 index 0000000000..ac43b11c17 --- /dev/null +++ b/src/oci/bds/models/cluster_details.py @@ -0,0 +1,257 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + + +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 ClusterDetails(object): + """ + Specific info about a Hadoop cluster + """ + + def __init__(self, **kwargs): + """ + Initializes a new ClusterDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param bda_version: + The value to assign to the bda_version property of this ClusterDetails. + :type bda_version: str + + :param bdm_version: + The value to assign to the bdm_version property of this ClusterDetails. + :type bdm_version: str + + :param time_created: + The value to assign to the time_created property of this ClusterDetails. + :type time_created: datetime + + :param time_refreshed: + The value to assign to the time_refreshed property of this ClusterDetails. + :type time_refreshed: datetime + + :param cloudera_manager_url: + The value to assign to the cloudera_manager_url property of this ClusterDetails. + :type cloudera_manager_url: str + + :param big_data_manager_url: + The value to assign to the big_data_manager_url property of this ClusterDetails. + :type big_data_manager_url: str + + :param hue_server_url: + The value to assign to the hue_server_url property of this ClusterDetails. + :type hue_server_url: str + + """ + self.swagger_types = { + 'bda_version': 'str', + 'bdm_version': 'str', + 'time_created': 'datetime', + 'time_refreshed': 'datetime', + 'cloudera_manager_url': 'str', + 'big_data_manager_url': 'str', + 'hue_server_url': 'str' + } + + self.attribute_map = { + 'bda_version': 'bdaVersion', + 'bdm_version': 'bdmVersion', + 'time_created': 'timeCreated', + 'time_refreshed': 'timeRefreshed', + 'cloudera_manager_url': 'clouderaManagerUrl', + 'big_data_manager_url': 'bigDataManagerUrl', + 'hue_server_url': 'hueServerUrl' + } + + self._bda_version = None + self._bdm_version = None + self._time_created = None + self._time_refreshed = None + self._cloudera_manager_url = None + self._big_data_manager_url = None + self._hue_server_url = None + + @property + def bda_version(self): + """ + Gets the bda_version of this ClusterDetails. + BDA version installed in the cluster + + + :return: The bda_version of this ClusterDetails. + :rtype: str + """ + return self._bda_version + + @bda_version.setter + def bda_version(self, bda_version): + """ + Sets the bda_version of this ClusterDetails. + BDA version installed in the cluster + + + :param bda_version: The bda_version of this ClusterDetails. + :type: str + """ + self._bda_version = bda_version + + @property + def bdm_version(self): + """ + Gets the bdm_version of this ClusterDetails. + BDM version installed in the cluster + + + :return: The bdm_version of this ClusterDetails. + :rtype: str + """ + return self._bdm_version + + @bdm_version.setter + def bdm_version(self, bdm_version): + """ + Sets the bdm_version of this ClusterDetails. + BDM version installed in the cluster + + + :param bdm_version: The bdm_version of this ClusterDetails. + :type: str + """ + self._bdm_version = bdm_version + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this ClusterDetails. + The time the cluster was created. An RFC3339 formatted datetime string + + + :return: The time_created of this ClusterDetails. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this ClusterDetails. + The time the cluster was created. An RFC3339 formatted datetime string + + + :param time_created: The time_created of this ClusterDetails. + :type: datetime + """ + self._time_created = time_created + + @property + def time_refreshed(self): + """ + Gets the time_refreshed of this ClusterDetails. + The time the BDS instance was automatically, or manually refreshed. + An RFC3339 formatted datetime string + + + :return: The time_refreshed of this ClusterDetails. + :rtype: datetime + """ + return self._time_refreshed + + @time_refreshed.setter + def time_refreshed(self, time_refreshed): + """ + Sets the time_refreshed of this ClusterDetails. + The time the BDS instance was automatically, or manually refreshed. + An RFC3339 formatted datetime string + + + :param time_refreshed: The time_refreshed of this ClusterDetails. + :type: datetime + """ + self._time_refreshed = time_refreshed + + @property + def cloudera_manager_url(self): + """ + Gets the cloudera_manager_url of this ClusterDetails. + The URL of a Cloudera Manager + + + :return: The cloudera_manager_url of this ClusterDetails. + :rtype: str + """ + return self._cloudera_manager_url + + @cloudera_manager_url.setter + def cloudera_manager_url(self, cloudera_manager_url): + """ + Sets the cloudera_manager_url of this ClusterDetails. + The URL of a Cloudera Manager + + + :param cloudera_manager_url: The cloudera_manager_url of this ClusterDetails. + :type: str + """ + self._cloudera_manager_url = cloudera_manager_url + + @property + def big_data_manager_url(self): + """ + Gets the big_data_manager_url of this ClusterDetails. + The URL of a Big Data Manager + + + :return: The big_data_manager_url of this ClusterDetails. + :rtype: str + """ + return self._big_data_manager_url + + @big_data_manager_url.setter + def big_data_manager_url(self, big_data_manager_url): + """ + Sets the big_data_manager_url of this ClusterDetails. + The URL of a Big Data Manager + + + :param big_data_manager_url: The big_data_manager_url of this ClusterDetails. + :type: str + """ + self._big_data_manager_url = big_data_manager_url + + @property + def hue_server_url(self): + """ + Gets the hue_server_url of this ClusterDetails. + The URL of a Hue Server + + + :return: The hue_server_url of this ClusterDetails. + :rtype: str + """ + return self._hue_server_url + + @hue_server_url.setter + def hue_server_url(self, hue_server_url): + """ + Sets the hue_server_url of this ClusterDetails. + The URL of a Hue Server + + + :param hue_server_url: The hue_server_url of this ClusterDetails. + :type: str + """ + self._hue_server_url = hue_server_url + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/bds/models/create_bds_instance_details.py b/src/oci/bds/models/create_bds_instance_details.py new file mode 100644 index 0000000000..52194d6fcf --- /dev/null +++ b/src/oci/bds/models/create_bds_instance_details.py @@ -0,0 +1,383 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + + +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 CreateBdsInstanceDetails(object): + """ + The information about new BDS instance + """ + + def __init__(self, **kwargs): + """ + Initializes a new CreateBdsInstanceDetails 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 CreateBdsInstanceDetails. + :type compartment_id: str + + :param display_name: + The value to assign to the display_name property of this CreateBdsInstanceDetails. + :type display_name: str + + :param cluster_version: + The value to assign to the cluster_version property of this CreateBdsInstanceDetails. + :type cluster_version: str + + :param cluster_public_key: + The value to assign to the cluster_public_key property of this CreateBdsInstanceDetails. + :type cluster_public_key: str + + :param cluster_admin_password: + The value to assign to the cluster_admin_password property of this CreateBdsInstanceDetails. + :type cluster_admin_password: str + + :param is_high_availability: + The value to assign to the is_high_availability property of this CreateBdsInstanceDetails. + :type is_high_availability: bool + + :param is_secure: + The value to assign to the is_secure property of this CreateBdsInstanceDetails. + :type is_secure: bool + + :param network_config: + The value to assign to the network_config property of this CreateBdsInstanceDetails. + :type network_config: NetworkConfig + + :param nodes: + The value to assign to the nodes property of this CreateBdsInstanceDetails. + :type nodes: list[CreateNodeDetails] + + :param freeform_tags: + The value to assign to the freeform_tags property of this CreateBdsInstanceDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this CreateBdsInstanceDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'compartment_id': 'str', + 'display_name': 'str', + 'cluster_version': 'str', + 'cluster_public_key': 'str', + 'cluster_admin_password': 'str', + 'is_high_availability': 'bool', + 'is_secure': 'bool', + 'network_config': 'NetworkConfig', + 'nodes': 'list[CreateNodeDetails]', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'compartment_id': 'compartmentId', + 'display_name': 'displayName', + 'cluster_version': 'clusterVersion', + 'cluster_public_key': 'clusterPublicKey', + 'cluster_admin_password': 'clusterAdminPassword', + 'is_high_availability': 'isHighAvailability', + 'is_secure': 'isSecure', + 'network_config': 'networkConfig', + 'nodes': 'nodes', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._compartment_id = None + self._display_name = None + self._cluster_version = None + self._cluster_public_key = None + self._cluster_admin_password = None + self._is_high_availability = None + self._is_secure = None + self._network_config = None + self._nodes = None + self._freeform_tags = None + self._defined_tags = None + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this CreateBdsInstanceDetails. + The OCID of the compartment + + + :return: The compartment_id of this CreateBdsInstanceDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this CreateBdsInstanceDetails. + The OCID of the compartment + + + :param compartment_id: The compartment_id of this CreateBdsInstanceDetails. + :type: str + """ + self._compartment_id = compartment_id + + @property + def display_name(self): + """ + **[Required]** Gets the display_name of this CreateBdsInstanceDetails. + Name of the BDS instance + + + :return: The display_name of this CreateBdsInstanceDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this CreateBdsInstanceDetails. + Name of the BDS instance + + + :param display_name: The display_name of this CreateBdsInstanceDetails. + :type: str + """ + self._display_name = display_name + + @property + def cluster_version(self): + """ + **[Required]** Gets the cluster_version of this CreateBdsInstanceDetails. + Version of the Hadoop distribution + + + :return: The cluster_version of this CreateBdsInstanceDetails. + :rtype: str + """ + return self._cluster_version + + @cluster_version.setter + def cluster_version(self, cluster_version): + """ + Sets the cluster_version of this CreateBdsInstanceDetails. + Version of the Hadoop distribution + + + :param cluster_version: The cluster_version of this CreateBdsInstanceDetails. + :type: str + """ + self._cluster_version = cluster_version + + @property + def cluster_public_key(self): + """ + **[Required]** Gets the cluster_public_key of this CreateBdsInstanceDetails. + The SSH public key used to authenticate the cluster connection. + + + :return: The cluster_public_key of this CreateBdsInstanceDetails. + :rtype: str + """ + return self._cluster_public_key + + @cluster_public_key.setter + def cluster_public_key(self, cluster_public_key): + """ + Sets the cluster_public_key of this CreateBdsInstanceDetails. + The SSH public key used to authenticate the cluster connection. + + + :param cluster_public_key: The cluster_public_key of this CreateBdsInstanceDetails. + :type: str + """ + self._cluster_public_key = cluster_public_key + + @property + def cluster_admin_password(self): + """ + **[Required]** Gets the cluster_admin_password of this CreateBdsInstanceDetails. + Base-64 encoded password for Cloudera Manager admin user + + + :return: The cluster_admin_password of this CreateBdsInstanceDetails. + :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 CreateBdsInstanceDetails. + Base-64 encoded password for Cloudera Manager admin user + + + :param cluster_admin_password: The cluster_admin_password of this CreateBdsInstanceDetails. + :type: str + """ + self._cluster_admin_password = cluster_admin_password + + @property + def is_high_availability(self): + """ + **[Required]** Gets the is_high_availability of this CreateBdsInstanceDetails. + Boolean flag specifying whether or not the cluster is HA + + + :return: The is_high_availability of this CreateBdsInstanceDetails. + :rtype: bool + """ + return self._is_high_availability + + @is_high_availability.setter + def is_high_availability(self, is_high_availability): + """ + Sets the is_high_availability of this CreateBdsInstanceDetails. + Boolean flag specifying whether or not the cluster is HA + + + :param is_high_availability: The is_high_availability of this CreateBdsInstanceDetails. + :type: bool + """ + self._is_high_availability = is_high_availability + + @property + def is_secure(self): + """ + **[Required]** Gets the is_secure of this CreateBdsInstanceDetails. + Boolean flag specifying whether or not the cluster should be setup as secure. + + + :return: The is_secure of this CreateBdsInstanceDetails. + :rtype: bool + """ + return self._is_secure + + @is_secure.setter + def is_secure(self, is_secure): + """ + Sets the is_secure of this CreateBdsInstanceDetails. + Boolean flag specifying whether or not the cluster should be setup as secure. + + + :param is_secure: The is_secure of this CreateBdsInstanceDetails. + :type: bool + """ + self._is_secure = is_secure + + @property + def network_config(self): + """ + Gets the network_config of this CreateBdsInstanceDetails. + Additional configuration of customer's network. + + + :return: The network_config of this CreateBdsInstanceDetails. + :rtype: NetworkConfig + """ + return self._network_config + + @network_config.setter + def network_config(self, network_config): + """ + Sets the network_config of this CreateBdsInstanceDetails. + Additional configuration of customer's network. + + + :param network_config: The network_config of this CreateBdsInstanceDetails. + :type: NetworkConfig + """ + self._network_config = network_config + + @property + def nodes(self): + """ + **[Required]** Gets the nodes of this CreateBdsInstanceDetails. + The list of nodes in the BDS instance + + + :return: The nodes of this CreateBdsInstanceDetails. + :rtype: list[CreateNodeDetails] + """ + return self._nodes + + @nodes.setter + def nodes(self, nodes): + """ + Sets the nodes of this CreateBdsInstanceDetails. + The list of nodes in the BDS instance + + + :param nodes: The nodes of this CreateBdsInstanceDetails. + :type: list[CreateNodeDetails] + """ + self._nodes = nodes + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this CreateBdsInstanceDetails. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + Example: `{\"bar-key\": \"value\"}` + + + :return: The freeform_tags of this CreateBdsInstanceDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this CreateBdsInstanceDetails. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + Example: `{\"bar-key\": \"value\"}` + + + :param freeform_tags: The freeform_tags of this CreateBdsInstanceDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this CreateBdsInstanceDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. + Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + + :return: The defined_tags of this CreateBdsInstanceDetails. + :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 CreateBdsInstanceDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. + Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + + :param defined_tags: The defined_tags of this CreateBdsInstanceDetails. + :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/bds/models/create_node_details.py b/src/oci/bds/models/create_node_details.py new file mode 100644 index 0000000000..7baf86e090 --- /dev/null +++ b/src/oci/bds/models/create_node_details.py @@ -0,0 +1,164 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + + +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 CreateNodeDetails(object): + """ + The information about new node + """ + + def __init__(self, **kwargs): + """ + Initializes a new CreateNodeDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param node_type: + The value to assign to the node_type property of this CreateNodeDetails. + :type node_type: str + + :param shape: + The value to assign to the shape property of this CreateNodeDetails. + :type shape: str + + :param block_volume_size_in_gbs: + The value to assign to the block_volume_size_in_gbs property of this CreateNodeDetails. + :type block_volume_size_in_gbs: int + + :param subnet_id: + The value to assign to the subnet_id property of this CreateNodeDetails. + :type subnet_id: str + + """ + self.swagger_types = { + 'node_type': 'str', + 'shape': 'str', + 'block_volume_size_in_gbs': 'int', + 'subnet_id': 'str' + } + + self.attribute_map = { + 'node_type': 'nodeType', + 'shape': 'shape', + 'block_volume_size_in_gbs': 'blockVolumeSizeInGBs', + 'subnet_id': 'subnetId' + } + + self._node_type = None + self._shape = None + self._block_volume_size_in_gbs = None + self._subnet_id = None + + @property + def node_type(self): + """ + **[Required]** Gets the node_type of this CreateNodeDetails. + BDS instance node type + + + :return: The node_type of this CreateNodeDetails. + :rtype: str + """ + return self._node_type + + @node_type.setter + def node_type(self, node_type): + """ + Sets the node_type of this CreateNodeDetails. + BDS instance node type + + + :param node_type: The node_type of this CreateNodeDetails. + :type: str + """ + self._node_type = node_type + + @property + def shape(self): + """ + **[Required]** Gets the shape of this CreateNodeDetails. + Shape of the node + + + :return: The shape of this CreateNodeDetails. + :rtype: str + """ + return self._shape + + @shape.setter + def shape(self, shape): + """ + Sets the shape of this CreateNodeDetails. + Shape of the node + + + :param shape: The shape of this CreateNodeDetails. + :type: str + """ + self._shape = shape + + @property + def block_volume_size_in_gbs(self): + """ + **[Required]** Gets the block_volume_size_in_gbs of this CreateNodeDetails. + The size of block volume in GB that needs to be attached to a given node. + All the necessary details needed for attachment are managed by service itself. + + + :return: The block_volume_size_in_gbs of this CreateNodeDetails. + :rtype: int + """ + return self._block_volume_size_in_gbs + + @block_volume_size_in_gbs.setter + def block_volume_size_in_gbs(self, block_volume_size_in_gbs): + """ + Sets the block_volume_size_in_gbs of this CreateNodeDetails. + The size of block volume in GB that needs to be attached to a given node. + All the necessary details needed for attachment are managed by service itself. + + + :param block_volume_size_in_gbs: The block_volume_size_in_gbs of this CreateNodeDetails. + :type: int + """ + self._block_volume_size_in_gbs = block_volume_size_in_gbs + + @property + def subnet_id(self): + """ + **[Required]** Gets the subnet_id of this CreateNodeDetails. + The OCID of the subnet in which the node should be created + + + :return: The subnet_id of this CreateNodeDetails. + :rtype: str + """ + return self._subnet_id + + @subnet_id.setter + def subnet_id(self, subnet_id): + """ + Sets the subnet_id of this CreateNodeDetails. + The OCID of the subnet in which the node should be created + + + :param subnet_id: The subnet_id of this CreateNodeDetails. + :type: str + """ + self._subnet_id = subnet_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/bds/models/default_error.py b/src/oci/bds/models/default_error.py new file mode 100644 index 0000000000..0b018d585c --- /dev/null +++ b/src/oci/bds/models/default_error.py @@ -0,0 +1,100 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + + +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 DefaultError(object): + """ + Error Information. + """ + + def __init__(self, **kwargs): + """ + Initializes a new DefaultError 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 DefaultError. + :type code: str + + :param message: + The value to assign to the message property of this DefaultError. + :type message: str + + """ + self.swagger_types = { + 'code': 'str', + 'message': 'str' + } + + self.attribute_map = { + 'code': 'code', + 'message': 'message' + } + + self._code = None + self._message = None + + @property + def code(self): + """ + **[Required]** Gets the code of this DefaultError. + A short error code that defines the error, meant for programmatic parsing. + + + :return: The code of this DefaultError. + :rtype: str + """ + return self._code + + @code.setter + def code(self, code): + """ + Sets the code of this DefaultError. + A short error code that defines the error, meant for programmatic parsing. + + + :param code: The code of this DefaultError. + :type: str + """ + self._code = code + + @property + def message(self): + """ + **[Required]** Gets the message of this DefaultError. + A human-readable error string. + + + :return: The message of this DefaultError. + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """ + Sets the message of this DefaultError. + A human-readable error string. + + + :param message: The message of this DefaultError. + :type: str + """ + self._message = message + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/bds/models/kerberos_details.py b/src/oci/bds/models/kerberos_details.py new file mode 100644 index 0000000000..d4a2dc9203 --- /dev/null +++ b/src/oci/bds/models/kerberos_details.py @@ -0,0 +1,100 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + + +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 KerberosDetails(object): + """ + Details about Kerberos principals + """ + + def __init__(self, **kwargs): + """ + Initializes a new KerberosDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param principal_name: + The value to assign to the principal_name property of this KerberosDetails. + :type principal_name: str + + :param keytab_file: + The value to assign to the keytab_file property of this KerberosDetails. + :type keytab_file: str + + """ + self.swagger_types = { + 'principal_name': 'str', + 'keytab_file': 'str' + } + + self.attribute_map = { + 'principal_name': 'principalName', + 'keytab_file': 'keytabFile' + } + + self._principal_name = None + self._keytab_file = None + + @property + def principal_name(self): + """ + **[Required]** Gets the principal_name of this KerberosDetails. + Name of the Kerberos principal + + + :return: The principal_name of this KerberosDetails. + :rtype: str + """ + return self._principal_name + + @principal_name.setter + def principal_name(self, principal_name): + """ + Sets the principal_name of this KerberosDetails. + Name of the Kerberos principal + + + :param principal_name: The principal_name of this KerberosDetails. + :type: str + """ + self._principal_name = principal_name + + @property + def keytab_file(self): + """ + **[Required]** Gets the keytab_file of this KerberosDetails. + Location of the keytab file + + + :return: The keytab_file of this KerberosDetails. + :rtype: str + """ + return self._keytab_file + + @keytab_file.setter + def keytab_file(self, keytab_file): + """ + Sets the keytab_file of this KerberosDetails. + Location of the keytab file + + + :param keytab_file: The keytab_file of this KerberosDetails. + :type: str + """ + self._keytab_file = keytab_file + + 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/network_config.py b/src/oci/bds/models/network_config.py new file mode 100644 index 0000000000..53361df021 --- /dev/null +++ b/src/oci/bds/models/network_config.py @@ -0,0 +1,100 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + + +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 NetworkConfig(object): + """ + Additional configuration of customer's network. + """ + + def __init__(self, **kwargs): + """ + Initializes a new NetworkConfig object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param is_nat_gateway_required: + The value to assign to the is_nat_gateway_required property of this NetworkConfig. + :type is_nat_gateway_required: bool + + :param cidr_block: + The value to assign to the cidr_block property of this NetworkConfig. + :type cidr_block: str + + """ + self.swagger_types = { + 'is_nat_gateway_required': 'bool', + 'cidr_block': 'str' + } + + self.attribute_map = { + 'is_nat_gateway_required': 'isNatGatewayRequired', + 'cidr_block': 'cidrBlock' + } + + self._is_nat_gateway_required = None + self._cidr_block = None + + @property + def is_nat_gateway_required(self): + """ + Gets the is_nat_gateway_required of this NetworkConfig. + A boolean flag whether to configure a NAT gateway. + + + :return: The is_nat_gateway_required of this NetworkConfig. + :rtype: bool + """ + return self._is_nat_gateway_required + + @is_nat_gateway_required.setter + def is_nat_gateway_required(self, is_nat_gateway_required): + """ + Sets the is_nat_gateway_required of this NetworkConfig. + A boolean flag whether to configure a NAT gateway. + + + :param is_nat_gateway_required: The is_nat_gateway_required of this NetworkConfig. + :type: bool + """ + self._is_nat_gateway_required = is_nat_gateway_required + + @property + def cidr_block(self): + """ + Gets the cidr_block of this NetworkConfig. + The CIDR IP address block of the VCN. + + + :return: The cidr_block of this NetworkConfig. + :rtype: str + """ + return self._cidr_block + + @cidr_block.setter + def cidr_block(self, cidr_block): + """ + Sets the cidr_block of this NetworkConfig. + The CIDR IP address block of the VCN. + + + :param cidr_block: The cidr_block of this NetworkConfig. + :type: str + """ + self._cidr_block = cidr_block + + 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 new file mode 100644 index 0000000000..fcbbe46566 --- /dev/null +++ b/src/oci/bds/models/node.py @@ -0,0 +1,571 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + + +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 Node(object): + """ + Specific info about a node + """ + + #: A constant which can be used with the lifecycle_state property of a Node. + #: This constant has a value of "CREATING" + LIFECYCLE_STATE_CREATING = "CREATING" + + #: A constant which can be used with the lifecycle_state property of a Node. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a Node. + #: This constant has a value of "INACTIVE" + LIFECYCLE_STATE_INACTIVE = "INACTIVE" + + #: A constant which can be used with the lifecycle_state property of a Node. + #: This constant has a value of "UPDATING" + LIFECYCLE_STATE_UPDATING = "UPDATING" + + #: A constant which can be used with the lifecycle_state property of a Node. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + #: A constant which can be used with the lifecycle_state property of a Node. + #: This constant has a value of "DELETED" + LIFECYCLE_STATE_DELETED = "DELETED" + + #: A constant which can be used with the lifecycle_state property of a Node. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + #: A constant which can be used with the node_type property of a Node. + #: This constant has a value of "MASTER" + NODE_TYPE_MASTER = "MASTER" + + #: A constant which can be used with the node_type property of a Node. + #: This constant has a value of "EDGE" + NODE_TYPE_EDGE = "EDGE" + + #: A constant which can be used with the node_type property of a Node. + #: This constant has a value of "UTILITY" + NODE_TYPE_UTILITY = "UTILITY" + + #: A constant which can be used with the node_type property of a Node. + #: This constant has a value of "WORKER" + NODE_TYPE_WORKER = "WORKER" + + #: A constant which can be used with the node_type property of a Node. + #: This constant has a value of "BURSTING" + NODE_TYPE_BURSTING = "BURSTING" + + #: A constant which can be used with the node_type property of a Node. + #: This constant has a value of "CLOUD_SQL" + NODE_TYPE_CLOUD_SQL = "CLOUD_SQL" + + def __init__(self, **kwargs): + """ + Initializes a new Node object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param instance_id: + The value to assign to the instance_id property of this Node. + :type instance_id: str + + :param display_name: + The value to assign to the display_name property of this Node. + :type display_name: str + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this Node. + Allowed values for this property are: "CREATING", "ACTIVE", "INACTIVE", "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 node_type: + The value to assign to the node_type property of this Node. + Allowed values for this property are: "MASTER", "EDGE", "UTILITY", "WORKER", "BURSTING", "CLOUD_SQL", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type node_type: str + + :param shape: + The value to assign to the shape property of this Node. + :type shape: str + + :param attached_block_volumes: + The value to assign to the attached_block_volumes property of this Node. + :type attached_block_volumes: list[VolumeAttachmentDetail] + + :param subnet_id: + The value to assign to the subnet_id property of this Node. + :type subnet_id: str + + :param ip_address: + The value to assign to the ip_address property of this Node. + :type ip_address: str + + :param hostname: + The value to assign to the hostname property of this Node. + :type hostname: str + + :param image_id: + The value to assign to the image_id property of this Node. + :type image_id: str + + :param ssh_fingerprint: + The value to assign to the ssh_fingerprint property of this Node. + :type ssh_fingerprint: str + + :param availability_domain: + The value to assign to the availability_domain property of this Node. + :type availability_domain: str + + :param fault_domain: + The value to assign to the fault_domain property of this Node. + :type fault_domain: str + + :param time_created: + The value to assign to the time_created property of this Node. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this Node. + :type time_updated: datetime + + """ + self.swagger_types = { + 'instance_id': 'str', + 'display_name': 'str', + 'lifecycle_state': 'str', + 'node_type': 'str', + 'shape': 'str', + 'attached_block_volumes': 'list[VolumeAttachmentDetail]', + 'subnet_id': 'str', + 'ip_address': 'str', + 'hostname': 'str', + 'image_id': 'str', + 'ssh_fingerprint': 'str', + 'availability_domain': 'str', + 'fault_domain': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime' + } + + self.attribute_map = { + 'instance_id': 'instanceId', + 'display_name': 'displayName', + 'lifecycle_state': 'lifecycleState', + 'node_type': 'nodeType', + 'shape': 'shape', + 'attached_block_volumes': 'attachedBlockVolumes', + 'subnet_id': 'subnetId', + 'ip_address': 'ipAddress', + 'hostname': 'hostname', + 'image_id': 'imageId', + 'ssh_fingerprint': 'sshFingerprint', + 'availability_domain': 'availabilityDomain', + 'fault_domain': 'faultDomain', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated' + } + + self._instance_id = None + self._display_name = None + self._lifecycle_state = None + self._node_type = None + self._shape = None + self._attached_block_volumes = None + self._subnet_id = None + self._ip_address = None + self._hostname = None + self._image_id = None + self._ssh_fingerprint = None + self._availability_domain = None + self._fault_domain = None + self._time_created = None + self._time_updated = None + + @property + def instance_id(self): + """ + **[Required]** Gets the instance_id of this Node. + The OCID of the underlying compute instance + + + :return: The instance_id of this Node. + :rtype: str + """ + return self._instance_id + + @instance_id.setter + def instance_id(self, instance_id): + """ + Sets the instance_id of this Node. + The OCID of the underlying compute instance + + + :param instance_id: The instance_id of this Node. + :type: str + """ + self._instance_id = instance_id + + @property + def display_name(self): + """ + **[Required]** Gets the display_name of this Node. + The name of the node + + + :return: The display_name of this Node. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this Node. + The name of the node + + + :param display_name: The display_name of this Node. + :type: str + """ + self._display_name = display_name + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this Node. + The state of the node + + Allowed values for this property are: "CREATING", "ACTIVE", "INACTIVE", "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 Node. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this Node. + The state of the node + + + :param lifecycle_state: The lifecycle_state of this Node. + :type: str + """ + allowed_values = ["CREATING", "ACTIVE", "INACTIVE", "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 node_type(self): + """ + **[Required]** Gets the node_type of this Node. + BDS instance node type + + Allowed values for this property are: "MASTER", "EDGE", "UTILITY", "WORKER", "BURSTING", "CLOUD_SQL", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The node_type of this Node. + :rtype: str + """ + return self._node_type + + @node_type.setter + def node_type(self, node_type): + """ + Sets the node_type of this Node. + BDS instance node type + + + :param node_type: The node_type of this Node. + :type: str + """ + allowed_values = ["MASTER", "EDGE", "UTILITY", "WORKER", "BURSTING", "CLOUD_SQL"] + if not value_allowed_none_or_none_sentinel(node_type, allowed_values): + node_type = 'UNKNOWN_ENUM_VALUE' + self._node_type = node_type + + @property + def shape(self): + """ + **[Required]** Gets the shape of this Node. + Shape of the node + + + :return: The shape of this Node. + :rtype: str + """ + return self._shape + + @shape.setter + def shape(self, shape): + """ + Sets the shape of this Node. + Shape of the node + + + :param shape: The shape of this Node. + :type: str + """ + self._shape = shape + + @property + def attached_block_volumes(self): + """ + Gets the attached_block_volumes of this Node. + The list of block volumes attached to a given node. + + + :return: The attached_block_volumes of this Node. + :rtype: list[VolumeAttachmentDetail] + """ + return self._attached_block_volumes + + @attached_block_volumes.setter + def attached_block_volumes(self, attached_block_volumes): + """ + Sets the attached_block_volumes of this Node. + The list of block volumes attached to a given node. + + + :param attached_block_volumes: The attached_block_volumes of this Node. + :type: list[VolumeAttachmentDetail] + """ + self._attached_block_volumes = attached_block_volumes + + @property + def subnet_id(self): + """ + **[Required]** Gets the subnet_id of this Node. + The OCID of the subnet in which the node should be created + + + :return: The subnet_id of this Node. + :rtype: str + """ + return self._subnet_id + + @subnet_id.setter + def subnet_id(self, subnet_id): + """ + Sets the subnet_id of this Node. + The OCID of the subnet in which the node should be created + + + :param subnet_id: The subnet_id of this Node. + :type: str + """ + self._subnet_id = subnet_id + + @property + def ip_address(self): + """ + **[Required]** Gets the ip_address of this Node. + IP address of the node + + + :return: The ip_address of this Node. + :rtype: str + """ + return self._ip_address + + @ip_address.setter + def ip_address(self, ip_address): + """ + Sets the ip_address of this Node. + IP address of the node + + + :param ip_address: The ip_address of this Node. + :type: str + """ + self._ip_address = ip_address + + @property + def hostname(self): + """ + Gets the hostname of this Node. + The fully-qualified hostname (FQDN) of the node + + + :return: The hostname of this Node. + :rtype: str + """ + return self._hostname + + @hostname.setter + def hostname(self, hostname): + """ + Sets the hostname of this Node. + The fully-qualified hostname (FQDN) of the node + + + :param hostname: The hostname of this Node. + :type: str + """ + self._hostname = hostname + + @property + def image_id(self): + """ + Gets the image_id of this Node. + The OCID of the image from which the node was created + + + :return: The image_id of this Node. + :rtype: str + """ + return self._image_id + + @image_id.setter + def image_id(self, image_id): + """ + Sets the image_id of this Node. + The OCID of the image from which the node was created + + + :param image_id: The image_id of this Node. + :type: str + """ + self._image_id = image_id + + @property + def ssh_fingerprint(self): + """ + **[Required]** Gets the ssh_fingerprint of this Node. + The fingerprint of the SSH key used for node access + + + :return: The ssh_fingerprint of this Node. + :rtype: str + """ + return self._ssh_fingerprint + + @ssh_fingerprint.setter + def ssh_fingerprint(self, ssh_fingerprint): + """ + Sets the ssh_fingerprint of this Node. + The fingerprint of the SSH key used for node access + + + :param ssh_fingerprint: The ssh_fingerprint of this Node. + :type: str + """ + self._ssh_fingerprint = ssh_fingerprint + + @property + def availability_domain(self): + """ + **[Required]** Gets the availability_domain of this Node. + The name of the availability domain the node is running in + + + :return: The availability_domain of this Node. + :rtype: str + """ + return self._availability_domain + + @availability_domain.setter + def availability_domain(self, availability_domain): + """ + Sets the availability_domain of this Node. + The name of the availability domain the node is running in + + + :param availability_domain: The availability_domain of this Node. + :type: str + """ + self._availability_domain = availability_domain + + @property + def fault_domain(self): + """ + **[Required]** Gets the fault_domain of this Node. + The name of the fault domain the node is running in + + + :return: The fault_domain of this Node. + :rtype: str + """ + return self._fault_domain + + @fault_domain.setter + def fault_domain(self, fault_domain): + """ + Sets the fault_domain of this Node. + The name of the fault domain the node is running in + + + :param fault_domain: The fault_domain of this Node. + :type: str + """ + self._fault_domain = fault_domain + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this Node. + The time the node was created. An RFC3339 formatted datetime string + + + :return: The time_created of this Node. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this Node. + The time the node was created. An RFC3339 formatted datetime string + + + :param time_created: The time_created of this Node. + :type: datetime + """ + self._time_created = time_created + + @property + def time_updated(self): + """ + Gets the time_updated of this Node. + The time the BDS instance was updated. An RFC3339 formatted datetime string + + + :return: The time_updated of this Node. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this Node. + The time the BDS instance was updated. An RFC3339 formatted datetime string + + + :param time_updated: The time_updated of this Node. + :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/remove_cloud_sql_details.py b/src/oci/bds/models/remove_cloud_sql_details.py new file mode 100644 index 0000000000..189a44cb30 --- /dev/null +++ b/src/oci/bds/models/remove_cloud_sql_details.py @@ -0,0 +1,69 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + + +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 RemoveCloudSqlDetails(object): + """ + The information about removed Cloud SQL capability + """ + + def __init__(self, **kwargs): + """ + Initializes a new RemoveCloudSqlDetails 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 RemoveCloudSqlDetails. + :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 RemoveCloudSqlDetails. + Base-64 encoded password for Cloudera Manager admin user + + + :return: The cluster_admin_password of this RemoveCloudSqlDetails. + :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 RemoveCloudSqlDetails. + Base-64 encoded password for Cloudera Manager admin user + + + :param cluster_admin_password: The cluster_admin_password of this RemoveCloudSqlDetails. + :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/update_bds_instance_details.py b/src/oci/bds/models/update_bds_instance_details.py new file mode 100644 index 0000000000..febfc1f2fc --- /dev/null +++ b/src/oci/bds/models/update_bds_instance_details.py @@ -0,0 +1,135 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + + +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 UpdateBdsInstanceDetails(object): + """ + The information about to-be-updated BDS instance + """ + + def __init__(self, **kwargs): + """ + Initializes a new UpdateBdsInstanceDetails 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 UpdateBdsInstanceDetails. + :type display_name: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this UpdateBdsInstanceDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this UpdateBdsInstanceDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'display_name': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'display_name': 'displayName', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._display_name = None + self._freeform_tags = None + self._defined_tags = None + + @property + def display_name(self): + """ + Gets the display_name of this UpdateBdsInstanceDetails. + Name of the BDS instance + + + :return: The display_name of this UpdateBdsInstanceDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this UpdateBdsInstanceDetails. + Name of the BDS instance + + + :param display_name: The display_name of this UpdateBdsInstanceDetails. + :type: str + """ + self._display_name = display_name + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this UpdateBdsInstanceDetails. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + Example: `{\"bar-key\": \"value\"}` + + + :return: The freeform_tags of this UpdateBdsInstanceDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this UpdateBdsInstanceDetails. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + Example: `{\"bar-key\": \"value\"}` + + + :param freeform_tags: The freeform_tags of this UpdateBdsInstanceDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this UpdateBdsInstanceDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. + Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + + :return: The defined_tags of this UpdateBdsInstanceDetails. + :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 UpdateBdsInstanceDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. + Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + + :param defined_tags: The defined_tags of this UpdateBdsInstanceDetails. + :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/bds/models/volume_attachment_detail.py b/src/oci/bds/models/volume_attachment_detail.py new file mode 100644 index 0000000000..130105179d --- /dev/null +++ b/src/oci/bds/models/volume_attachment_detail.py @@ -0,0 +1,100 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + + +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 VolumeAttachmentDetail(object): + """ + A detail of the attached block volume. + """ + + def __init__(self, **kwargs): + """ + Initializes a new VolumeAttachmentDetail object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param volume_attachment_id: + The value to assign to the volume_attachment_id property of this VolumeAttachmentDetail. + :type volume_attachment_id: str + + :param volume_size_in_gbs: + The value to assign to the volume_size_in_gbs property of this VolumeAttachmentDetail. + :type volume_size_in_gbs: int + + """ + self.swagger_types = { + 'volume_attachment_id': 'str', + 'volume_size_in_gbs': 'int' + } + + self.attribute_map = { + 'volume_attachment_id': 'volumeAttachmentId', + 'volume_size_in_gbs': 'volumeSizeInGBs' + } + + self._volume_attachment_id = None + self._volume_size_in_gbs = None + + @property + def volume_attachment_id(self): + """ + **[Required]** Gets the volume_attachment_id of this VolumeAttachmentDetail. + The OCID of the volume attachment. + + + :return: The volume_attachment_id of this VolumeAttachmentDetail. + :rtype: str + """ + return self._volume_attachment_id + + @volume_attachment_id.setter + def volume_attachment_id(self, volume_attachment_id): + """ + Sets the volume_attachment_id of this VolumeAttachmentDetail. + The OCID of the volume attachment. + + + :param volume_attachment_id: The volume_attachment_id of this VolumeAttachmentDetail. + :type: str + """ + self._volume_attachment_id = volume_attachment_id + + @property + def volume_size_in_gbs(self): + """ + **[Required]** Gets the volume_size_in_gbs of this VolumeAttachmentDetail. + The size of the volume in GBs. + + + :return: The volume_size_in_gbs of this VolumeAttachmentDetail. + :rtype: int + """ + return self._volume_size_in_gbs + + @volume_size_in_gbs.setter + def volume_size_in_gbs(self, volume_size_in_gbs): + """ + Sets the volume_size_in_gbs of this VolumeAttachmentDetail. + The size of the volume in GBs. + + + :param volume_size_in_gbs: The volume_size_in_gbs of this VolumeAttachmentDetail. + :type: int + """ + self._volume_size_in_gbs = volume_size_in_gbs + + 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 new file mode 100644 index 0000000000..32572609c7 --- /dev/null +++ b/src/oci/bds/models/work_request.py @@ -0,0 +1,411 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + + +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): + """ + A description of workrequest status + """ + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "CREATE_BDS" + OPERATION_TYPE_CREATE_BDS = "CREATE_BDS" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "UPDATE_BDS" + OPERATION_TYPE_UPDATE_BDS = "UPDATE_BDS" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "DELETE_BDS" + OPERATION_TYPE_DELETE_BDS = "DELETE_BDS" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "ADD_BLOCK_STORAGE" + OPERATION_TYPE_ADD_BLOCK_STORAGE = "ADD_BLOCK_STORAGE" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "ADD_WORKER_NODES" + OPERATION_TYPE_ADD_WORKER_NODES = "ADD_WORKER_NODES" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "ADD_CLOUD_SQL" + OPERATION_TYPE_ADD_CLOUD_SQL = "ADD_CLOUD_SQL" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "REMOVE_CLOUD_SQL" + OPERATION_TYPE_REMOVE_CLOUD_SQL = "REMOVE_CLOUD_SQL" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "CHANGE_COMPARTMENT_FOR_BDS" + OPERATION_TYPE_CHANGE_COMPARTMENT_FOR_BDS = "CHANGE_COMPARTMENT_FOR_BDS" + + #: 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 "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 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 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_WORKER_NODES", "ADD_CLOUD_SQL", "REMOVE_CLOUD_SQL", "CHANGE_COMPARTMENT_FOR_BDS", '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", "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 resources: + The value to assign to the resources property of this WorkRequest. + :type resources: list[WorkRequestResource] + + :param percent_complete: + The value to assign to the percent_complete property of this WorkRequest. + :type percent_complete: float + + :param time_accepted: + The value to assign to the time_accepted property of this WorkRequest. + :type time_accepted: datetime + + :param time_started: + The value to assign to the time_started property of this WorkRequest. + :type time_started: datetime + + :param time_finished: + The value to assign to the time_finished property of this WorkRequest. + :type time_finished: datetime + + """ + self.swagger_types = { + 'id': 'str', + 'compartment_id': 'str', + 'operation_type': 'str', + 'status': 'str', + 'resources': 'list[WorkRequestResource]', + 'percent_complete': 'float', + 'time_accepted': 'datetime', + 'time_started': 'datetime', + 'time_finished': 'datetime' + } + + self.attribute_map = { + 'id': 'id', + 'compartment_id': 'compartmentId', + 'operation_type': 'operationType', + 'status': 'status', + 'resources': 'resources', + 'percent_complete': 'percentComplete', + 'time_accepted': 'timeAccepted', + 'time_started': 'timeStarted', + 'time_finished': 'timeFinished' + } + + self._id = None + self._compartment_id = None + self._operation_type = None + self._status = None + self._resources = None + self._percent_complete = None + self._time_accepted = None + self._time_started = None + self._time_finished = None + + @property + def id(self): + """ + **[Required]** Gets the id of this WorkRequest. + The id of the work request. + + + :return: The id of this WorkRequest. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this WorkRequest. + The id of the work request. + + + :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. Work requests should be scoped to + the same compartment as the resource the work request affects. If the work request affects multiple resources, + and those resources are not in the same compartment, it is up to the service team to pick the primary + resource whose compartment should be used + + + :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. Work requests should be scoped to + the same compartment as the resource the work request affects. If the work request affects multiple resources, + and those resources are not in the same compartment, it is up to the service team to pick the primary + resource whose compartment should be used + + + :param compartment_id: The compartment_id of this WorkRequest. + :type: str + """ + self._compartment_id = compartment_id + + @property + def operation_type(self): + """ + **[Required]** Gets the operation_type of this WorkRequest. + Type of the work request + + Allowed values for this property are: "CREATE_BDS", "UPDATE_BDS", "DELETE_BDS", "ADD_BLOCK_STORAGE", "ADD_WORKER_NODES", "ADD_CLOUD_SQL", "REMOVE_CLOUD_SQL", "CHANGE_COMPARTMENT_FOR_BDS", '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. + Type of the work request + + + :param operation_type: The operation_type of this WorkRequest. + :type: str + """ + allowed_values = ["CREATE_BDS", "UPDATE_BDS", "DELETE_BDS", "ADD_BLOCK_STORAGE", "ADD_WORKER_NODES", "ADD_CLOUD_SQL", "REMOVE_CLOUD_SQL", "CHANGE_COMPARTMENT_FOR_BDS"] + 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. + Status of current work request. + + Allowed values for this property are: "ACCEPTED", "IN_PROGRESS", "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. + Status of current work request. + + + :param status: The status of this WorkRequest. + :type: str + """ + allowed_values = ["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"] + if not value_allowed_none_or_none_sentinel(status, allowed_values): + status = 'UNKNOWN_ENUM_VALUE' + self._status = status + + @property + def resources(self): + """ + **[Required]** Gets the resources of this WorkRequest. + The resources affected by this work request. + + + :return: The resources of this WorkRequest. + :rtype: list[WorkRequestResource] + """ + return self._resources + + @resources.setter + def resources(self, resources): + """ + Sets the resources of this WorkRequest. + The resources affected by this work request. + + + :param resources: The resources of this WorkRequest. + :type: list[WorkRequestResource] + """ + self._resources = resources + + @property + def percent_complete(self): + """ + **[Required]** Gets the percent_complete of this WorkRequest. + Percentage of the request completed. + + + :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. + Percentage of the request completed. + + + :param percent_complete: The percent_complete of this WorkRequest. + :type: float + """ + self._percent_complete = percent_complete + + @property + def time_accepted(self): + """ + **[Required]** Gets the time_accepted of this WorkRequest. + The date and time the request was created, as described in + `RFC 3339`__, section 14.29. + + __ https://tools.ietf.org/rfc/rfc3339 + + + :return: The time_accepted of this WorkRequest. + :rtype: datetime + """ + return self._time_accepted + + @time_accepted.setter + def time_accepted(self, time_accepted): + """ + Sets the time_accepted of this WorkRequest. + The date and time the request was created, as described in + `RFC 3339`__, section 14.29. + + __ https://tools.ietf.org/rfc/rfc3339 + + + :param time_accepted: The time_accepted of this WorkRequest. + :type: datetime + """ + self._time_accepted = time_accepted + + @property + def time_started(self): + """ + Gets the time_started of this WorkRequest. + The date and time the request was started, as described in `RFC 3339`__, + section 14.29. + + __ https://tools.ietf.org/rfc/rfc3339 + + + :return: The time_started of this WorkRequest. + :rtype: datetime + """ + return self._time_started + + @time_started.setter + def time_started(self, time_started): + """ + Sets the time_started of this WorkRequest. + The date and time the request was started, as described in `RFC 3339`__, + section 14.29. + + __ https://tools.ietf.org/rfc/rfc3339 + + + :param time_started: The time_started of this WorkRequest. + :type: datetime + """ + self._time_started = time_started + + @property + def time_finished(self): + """ + Gets the time_finished of this WorkRequest. + The date and time the object was finished, as described in `RFC 3339`__. + + __ https://tools.ietf.org/rfc/rfc3339 + + + :return: The time_finished of this WorkRequest. + :rtype: datetime + """ + return self._time_finished + + @time_finished.setter + def time_finished(self, time_finished): + """ + Sets the time_finished of this WorkRequest. + The date and time the object was finished, as described in `RFC 3339`__. + + __ https://tools.ietf.org/rfc/rfc3339 + + + :param time_finished: The time_finished of this WorkRequest. + :type: datetime + """ + self._time_finished = time_finished + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/bds/models/work_request_error.py b/src/oci/bds/models/work_request_error.py new file mode 100644 index 0000000000..493ebc12a9 --- /dev/null +++ b/src/oci/bds/models/work_request_error.py @@ -0,0 +1,133 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class WorkRequestError(object): + """ + An error encountered while executing 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 occured. Error codes are listed on + (https://docs.cloud.oracle.com/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 occured. Error codes are listed on + (https://docs.cloud.oracle.com/Content/API/References/apierrors.htm) + + + :param code: The code of this WorkRequestError. + :type: str + """ + self._code = code + + @property + def message(self): + """ + **[Required]** Gets the message of this WorkRequestError. + A human readable description of the issue encountered. + + + :return: The message of this WorkRequestError. + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """ + Sets the message of this WorkRequestError. + A human readable description of the issue encountered. + + + :param message: The message of this WorkRequestError. + :type: str + """ + self._message = message + + @property + def timestamp(self): + """ + **[Required]** Gets the timestamp of this WorkRequestError. + The time the error occured. An RFC3339 formatted datetime string. + + + :return: The timestamp of this WorkRequestError. + :rtype: datetime + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """ + Sets the timestamp of this WorkRequestError. + The time the error occured. An RFC3339 formatted datetime string. + + + :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/bds/models/work_request_log_entry.py b/src/oci/bds/models/work_request_log_entry.py new file mode 100644 index 0000000000..966040686f --- /dev/null +++ b/src/oci/bds/models/work_request_log_entry.py @@ -0,0 +1,100 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class WorkRequestLogEntry(object): + """ + A log message from the execution of 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. + 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. + Human-readable log message. + + + :param message: The message of this WorkRequestLogEntry. + :type: str + """ + self._message = message + + @property + def timestamp(self): + """ + **[Required]** Gets the timestamp of this WorkRequestLogEntry. + The time the log message was written. An RFC3339 formatted datetime string + + + :return: The timestamp of this WorkRequestLogEntry. + :rtype: datetime + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """ + Sets the timestamp of this WorkRequestLogEntry. + The time the log message was written. An RFC3339 formatted datetime string + + + :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/bds/models/work_request_resource.py b/src/oci/bds/models/work_request_resource.py new file mode 100644 index 0000000000..7c22be25c1 --- /dev/null +++ b/src/oci/bds/models/work_request_resource.py @@ -0,0 +1,196 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class WorkRequestResource(object): + """ + A resource created or operated on by a work request. + """ + + #: A constant which can be used with the action_type property of a WorkRequestResource. + #: This constant has a value of "CREATED" + ACTION_TYPE_CREATED = "CREATED" + + #: A constant which can be used with the action_type property of a WorkRequestResource. + #: This constant has a value of "UPDATED" + ACTION_TYPE_UPDATED = "UPDATED" + + #: A constant which can be used with the action_type property of a WorkRequestResource. + #: This constant has a value of "DELETED" + ACTION_TYPE_DELETED = "DELETED" + + #: A constant which can be used with the action_type property of a WorkRequestResource. + #: This constant has a value of "IN_PROGRESS" + ACTION_TYPE_IN_PROGRESS = "IN_PROGRESS" + + #: A constant which can be used with the action_type property of a WorkRequestResource. + #: This constant has a value of "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", "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. + The resource type the work request affects. + + + :return: The entity_type of this WorkRequestResource. + :rtype: str + """ + return self._entity_type + + @entity_type.setter + def entity_type(self, entity_type): + """ + Sets the entity_type of this WorkRequestResource. + The resource type 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 work tracked in the work request. + A resource being created, updated, or deleted will remain in the IN_PROGRESS state until + work is complete for that resource at which point it will transition to CREATED, UPDATED, + or DELETED, respectively. + + Allowed values for this property are: "CREATED", "UPDATED", "DELETED", "IN_PROGRESS", "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 work tracked in the work request. + A resource being created, updated, or deleted will remain in the IN_PROGRESS state until + work is complete for that resource at which point it will transition to CREATED, UPDATED, + or DELETED, respectively. + + + :param action_type: The action_type of this WorkRequestResource. + :type: str + """ + allowed_values = ["CREATED", "UPDATED", "DELETED", "IN_PROGRESS", "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. + The OCID of the resource the work request affects. + + + :return: The identifier of this WorkRequestResource. + :rtype: str + """ + return self._identifier + + @identifier.setter + def identifier(self, identifier): + """ + Sets the identifier of this WorkRequestResource. + The OCID of the resource the work request affects. + + + :param identifier: The identifier of this WorkRequestResource. + :type: str + """ + self._identifier = identifier + + @property + def entity_uri(self): + """ + Gets the entity_uri of this WorkRequestResource. + The URI path that the user can do a GET on to access the resource metadata + + + :return: The entity_uri of this WorkRequestResource. + :rtype: str + """ + return self._entity_uri + + @entity_uri.setter + def entity_uri(self, entity_uri): + """ + Sets the entity_uri of this WorkRequestResource. + The URI path that the user can do a GET on 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/budget/budget_client.py b/src/oci/budget/budget_client.py index 5d282da6e3..a649ac777e 100644 --- a/src/oci/budget/budget_client.py +++ b/src/oci/budget/budget_client.py @@ -82,7 +82,6 @@ def __init__(self, config, **kwargs): def create_alert_rule(self, budget_id, create_alert_rule_details, **kwargs): """ - Creates a new Alert Rule Creates a new Alert Rule. @@ -171,7 +170,6 @@ def create_alert_rule(self, budget_id, create_alert_rule_details, **kwargs): def create_budget(self, create_budget_details, **kwargs): """ - Creates a new Budget Creates a new Budget. @@ -245,7 +243,6 @@ def create_budget(self, create_budget_details, **kwargs): def delete_alert_rule(self, budget_id, alert_rule_id, **kwargs): """ - Delete an Alert Rule Deletes a specified Alert Rule resource. @@ -329,7 +326,6 @@ def delete_alert_rule(self, budget_id, alert_rule_id, **kwargs): def delete_budget(self, budget_id, **kwargs): """ - Delete a Budget Deletes a specified Budget resource @@ -409,7 +405,6 @@ def delete_budget(self, budget_id, **kwargs): def get_alert_rule(self, budget_id, alert_rule_id, **kwargs): """ - Get an Alert Rule for a specified budget Gets an Alert Rule for a specified Budget. @@ -486,7 +481,6 @@ def get_alert_rule(self, budget_id, alert_rule_id, **kwargs): def get_budget(self, budget_id, **kwargs): """ - Returns a Budget Gets a Budget by identifier @@ -559,7 +553,6 @@ def get_budget(self, budget_id, **kwargs): def list_alert_rules(self, budget_id, **kwargs): """ - Gets a list of all Alert Rules for a Budget Returns a list of Alert Rules for a specified Budget. @@ -699,7 +692,6 @@ def list_alert_rules(self, budget_id, **kwargs): def list_budgets(self, compartment_id, **kwargs): """ - Returns a list of Budgets Gets a list of Budgets in a compartment. By default, ListBudgets returns budgets of 'COMPARTMENT' target type and the budget records with only ONE target compartment OCID. @@ -854,7 +846,6 @@ def list_budgets(self, compartment_id, **kwargs): def update_alert_rule(self, budget_id, alert_rule_id, update_alert_rule_details, **kwargs): """ - Updates an Alert Rule Update an Alert Rule for the budget identified by the OCID. @@ -945,7 +936,6 @@ def update_alert_rule(self, budget_id, alert_rule_id, update_alert_rule_details, def update_budget(self, budget_id, update_budget_details, **kwargs): """ - Updates a Budget Update a Budget identified by the OCID diff --git a/src/oci/container_engine/container_engine_client.py b/src/oci/container_engine/container_engine_client.py index c37a43107f..fed954c77a 100644 --- a/src/oci/container_engine/container_engine_client.py +++ b/src/oci/container_engine/container_engine_client.py @@ -85,7 +85,6 @@ def __init__(self, config, **kwargs): def create_cluster(self, create_cluster_details, **kwargs): """ Create a new cluster. - Create a new cluster. :param CreateClusterDetails create_cluster_details: (required) @@ -154,7 +153,6 @@ def create_cluster(self, create_cluster_details, **kwargs): def create_kubeconfig(self, cluster_id, **kwargs): """ - Create the cluster kubeconfig. Create the Kubeconfig YAML for a cluster. @@ -235,7 +233,6 @@ def create_kubeconfig(self, cluster_id, **kwargs): def create_node_pool(self, create_node_pool_details, **kwargs): """ Create a new node pool. - Create a new node pool. :param CreateNodePoolDetails create_node_pool_details: (required) @@ -305,7 +302,6 @@ def create_node_pool(self, create_node_pool_details, **kwargs): def delete_cluster(self, cluster_id, **kwargs): """ Delete a cluster. - Delete a cluster. :param str cluster_id: (required) @@ -384,7 +380,6 @@ def delete_cluster(self, cluster_id, **kwargs): def delete_node_pool(self, node_pool_id, **kwargs): """ Delete a node pool. - Delete a node pool. :param str node_pool_id: (required) @@ -462,7 +457,6 @@ def delete_node_pool(self, node_pool_id, **kwargs): def delete_work_request(self, work_request_id, **kwargs): """ - Cancel a work request. Cancel a work request that has not started. @@ -541,7 +535,6 @@ def delete_work_request(self, work_request_id, **kwargs): def get_cluster(self, cluster_id, **kwargs): """ - Get cluster details. Get the details of a cluster. @@ -615,7 +608,6 @@ def get_cluster(self, cluster_id, **kwargs): def get_cluster_options(self, cluster_option_id, **kwargs): """ - Get cluster options. Get options available for clusters. @@ -700,7 +692,6 @@ def get_cluster_options(self, cluster_option_id, **kwargs): def get_node_pool(self, node_pool_id, **kwargs): """ - Get node pool details. Get the details of a node pool. @@ -774,7 +765,6 @@ def get_node_pool(self, node_pool_id, **kwargs): def get_node_pool_options(self, node_pool_option_id, **kwargs): """ - Get node pool options. Get options available for node pools. @@ -859,7 +849,6 @@ def get_node_pool_options(self, node_pool_option_id, **kwargs): def get_work_request(self, work_request_id, **kwargs): """ - Get work request details. Get the details of a work request. @@ -933,7 +922,6 @@ def get_work_request(self, work_request_id, **kwargs): def list_clusters(self, compartment_id, **kwargs): """ - List all cluster objects. List all the cluster objects in a compartment. @@ -1067,7 +1055,6 @@ def list_clusters(self, compartment_id, **kwargs): def list_node_pools(self, compartment_id, **kwargs): """ - List all node pools. List all the node pools in a compartment, and optionally filter by cluster. @@ -1191,7 +1178,6 @@ def list_node_pools(self, compartment_id, **kwargs): def list_work_request_errors(self, compartment_id, work_request_id, **kwargs): """ - Get work request errors. Get the errors of a work request. @@ -1275,7 +1261,6 @@ def list_work_request_errors(self, compartment_id, work_request_id, **kwargs): def list_work_request_logs(self, compartment_id, work_request_id, **kwargs): """ - Get work request logs. Get the logs of a work request. @@ -1359,7 +1344,6 @@ def list_work_request_logs(self, compartment_id, work_request_id, **kwargs): def list_work_requests(self, compartment_id, **kwargs): """ - List all work requests. List all work requests in a compartment. @@ -1512,7 +1496,6 @@ def list_work_requests(self, compartment_id, **kwargs): def update_cluster(self, cluster_id, update_cluster_details, **kwargs): """ - Update cluster details. Update the details of a cluster. @@ -1596,7 +1579,6 @@ def update_cluster(self, cluster_id, update_cluster_details, **kwargs): def update_node_pool(self, node_pool_id, update_node_pool_details, **kwargs): """ - Update node pool details. Update the details of a node pool. diff --git a/src/oci/container_engine/models/__init__.py b/src/oci/container_engine/models/__init__.py index 6d56c7ecd2..111a146756 100644 --- a/src/oci/container_engine/models/__init__.py +++ b/src/oci/container_engine/models/__init__.py @@ -4,6 +4,7 @@ from __future__ import absolute_import from .add_on_options import AddOnOptions +from .admission_controller_options import AdmissionControllerOptions from .cluster import Cluster from .cluster_create_options import ClusterCreateOptions from .cluster_endpoints import ClusterEndpoints @@ -28,6 +29,7 @@ from .node_source_via_image_details import NodeSourceViaImageDetails from .node_source_via_image_option import NodeSourceViaImageOption from .update_cluster_details import UpdateClusterDetails +from .update_cluster_options_details import UpdateClusterOptionsDetails from .update_node_pool_details import UpdateNodePoolDetails from .update_node_pool_node_config_details import UpdateNodePoolNodeConfigDetails from .work_request import WorkRequest @@ -39,6 +41,7 @@ # Maps type names to classes for container_engine services. container_engine_type_mapping = { "AddOnOptions": AddOnOptions, + "AdmissionControllerOptions": AdmissionControllerOptions, "Cluster": Cluster, "ClusterCreateOptions": ClusterCreateOptions, "ClusterEndpoints": ClusterEndpoints, @@ -63,6 +66,7 @@ "NodeSourceViaImageDetails": NodeSourceViaImageDetails, "NodeSourceViaImageOption": NodeSourceViaImageOption, "UpdateClusterDetails": UpdateClusterDetails, + "UpdateClusterOptionsDetails": UpdateClusterOptionsDetails, "UpdateNodePoolDetails": UpdateNodePoolDetails, "UpdateNodePoolNodeConfigDetails": UpdateNodePoolNodeConfigDetails, "WorkRequest": WorkRequest, diff --git a/src/oci/container_engine/models/admission_controller_options.py b/src/oci/container_engine/models/admission_controller_options.py new file mode 100644 index 0000000000..990c8a149a --- /dev/null +++ b/src/oci/container_engine/models/admission_controller_options.py @@ -0,0 +1,69 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + + +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 AdmissionControllerOptions(object): + """ + The properties that define supported admission controllers. + """ + + def __init__(self, **kwargs): + """ + Initializes a new AdmissionControllerOptions object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param is_pod_security_policy_enabled: + The value to assign to the is_pod_security_policy_enabled property of this AdmissionControllerOptions. + :type is_pod_security_policy_enabled: bool + + """ + self.swagger_types = { + 'is_pod_security_policy_enabled': 'bool' + } + + self.attribute_map = { + 'is_pod_security_policy_enabled': 'isPodSecurityPolicyEnabled' + } + + self._is_pod_security_policy_enabled = None + + @property + def is_pod_security_policy_enabled(self): + """ + Gets the is_pod_security_policy_enabled of this AdmissionControllerOptions. + Whether or not to enable the Pod Security Policy admission controller. + + + :return: The is_pod_security_policy_enabled of this AdmissionControllerOptions. + :rtype: bool + """ + return self._is_pod_security_policy_enabled + + @is_pod_security_policy_enabled.setter + def is_pod_security_policy_enabled(self, is_pod_security_policy_enabled): + """ + Sets the is_pod_security_policy_enabled of this AdmissionControllerOptions. + Whether or not to enable the Pod Security Policy admission controller. + + + :param is_pod_security_policy_enabled: The is_pod_security_policy_enabled of this AdmissionControllerOptions. + :type: bool + """ + self._is_pod_security_policy_enabled = is_pod_security_policy_enabled + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/container_engine/models/cluster_create_options.py b/src/oci/container_engine/models/cluster_create_options.py index 003b2a81ed..f6e387131d 100644 --- a/src/oci/container_engine/models/cluster_create_options.py +++ b/src/oci/container_engine/models/cluster_create_options.py @@ -29,22 +29,29 @@ def __init__(self, **kwargs): The value to assign to the add_ons property of this ClusterCreateOptions. :type add_ons: AddOnOptions + :param admission_controller_options: + The value to assign to the admission_controller_options property of this ClusterCreateOptions. + :type admission_controller_options: AdmissionControllerOptions + """ self.swagger_types = { 'service_lb_subnet_ids': 'list[str]', 'kubernetes_network_config': 'KubernetesNetworkConfig', - 'add_ons': 'AddOnOptions' + 'add_ons': 'AddOnOptions', + 'admission_controller_options': 'AdmissionControllerOptions' } self.attribute_map = { 'service_lb_subnet_ids': 'serviceLbSubnetIds', 'kubernetes_network_config': 'kubernetesNetworkConfig', - 'add_ons': 'addOns' + 'add_ons': 'addOns', + 'admission_controller_options': 'admissionControllerOptions' } self._service_lb_subnet_ids = None self._kubernetes_network_config = None self._add_ons = None + self._admission_controller_options = None @property def service_lb_subnet_ids(self): @@ -118,6 +125,30 @@ def add_ons(self, add_ons): """ self._add_ons = add_ons + @property + def admission_controller_options(self): + """ + Gets the admission_controller_options of this ClusterCreateOptions. + Configurable cluster admission controllers + + + :return: The admission_controller_options of this ClusterCreateOptions. + :rtype: AdmissionControllerOptions + """ + return self._admission_controller_options + + @admission_controller_options.setter + def admission_controller_options(self, admission_controller_options): + """ + Sets the admission_controller_options of this ClusterCreateOptions. + Configurable cluster admission controllers + + + :param admission_controller_options: The admission_controller_options of this ClusterCreateOptions. + :type: AdmissionControllerOptions + """ + self._admission_controller_options = admission_controller_options + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/container_engine/models/update_cluster_details.py b/src/oci/container_engine/models/update_cluster_details.py index ffb6e7352f..6886437f6d 100644 --- a/src/oci/container_engine/models/update_cluster_details.py +++ b/src/oci/container_engine/models/update_cluster_details.py @@ -25,19 +25,26 @@ def __init__(self, **kwargs): The value to assign to the kubernetes_version property of this UpdateClusterDetails. :type kubernetes_version: str + :param options: + The value to assign to the options property of this UpdateClusterDetails. + :type options: UpdateClusterOptionsDetails + """ self.swagger_types = { 'name': 'str', - 'kubernetes_version': 'str' + 'kubernetes_version': 'str', + 'options': 'UpdateClusterOptionsDetails' } self.attribute_map = { 'name': 'name', - 'kubernetes_version': 'kubernetesVersion' + 'kubernetes_version': 'kubernetesVersion', + 'options': 'options' } self._name = None self._kubernetes_version = None + self._options = None @property def name(self): @@ -87,6 +94,26 @@ def kubernetes_version(self, kubernetes_version): """ self._kubernetes_version = kubernetes_version + @property + def options(self): + """ + Gets the options of this UpdateClusterDetails. + + :return: The options of this UpdateClusterDetails. + :rtype: UpdateClusterOptionsDetails + """ + return self._options + + @options.setter + def options(self, options): + """ + Sets the options of this UpdateClusterDetails. + + :param options: The options of this UpdateClusterDetails. + :type: UpdateClusterOptionsDetails + """ + self._options = options + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/container_engine/models/update_cluster_options_details.py b/src/oci/container_engine/models/update_cluster_options_details.py new file mode 100644 index 0000000000..64fc2f4db3 --- /dev/null +++ b/src/oci/container_engine/models/update_cluster_options_details.py @@ -0,0 +1,69 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + + +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 UpdateClusterOptionsDetails(object): + """ + The properties that define extra options updating a cluster. + """ + + def __init__(self, **kwargs): + """ + Initializes a new UpdateClusterOptionsDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param admission_controller_options: + The value to assign to the admission_controller_options property of this UpdateClusterOptionsDetails. + :type admission_controller_options: AdmissionControllerOptions + + """ + self.swagger_types = { + 'admission_controller_options': 'AdmissionControllerOptions' + } + + self.attribute_map = { + 'admission_controller_options': 'admissionControllerOptions' + } + + self._admission_controller_options = None + + @property + def admission_controller_options(self): + """ + Gets the admission_controller_options of this UpdateClusterOptionsDetails. + Configurable cluster admission controllers + + + :return: The admission_controller_options of this UpdateClusterOptionsDetails. + :rtype: AdmissionControllerOptions + """ + return self._admission_controller_options + + @admission_controller_options.setter + def admission_controller_options(self, admission_controller_options): + """ + Sets the admission_controller_options of this UpdateClusterOptionsDetails. + Configurable cluster admission controllers + + + :param admission_controller_options: The admission_controller_options of this UpdateClusterOptionsDetails. + :type: AdmissionControllerOptions + """ + self._admission_controller_options = admission_controller_options + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/core/blockstorage_client.py b/src/oci/core/blockstorage_client.py index 1a986f48e4..c1efb550b9 100644 --- a/src/oci/core/blockstorage_client.py +++ b/src/oci/core/blockstorage_client.py @@ -88,7 +88,6 @@ def __init__(self, config, **kwargs): def change_boot_volume_backup_compartment(self, boot_volume_backup_id, change_boot_volume_backup_compartment_details, **kwargs): """ - ChangeBootVolumeBackupCompartment Moves a boot volume backup into a different compartment within the same tenancy. For information about moving resources between compartments, see `Moving Resources to a Different Compartment`__. @@ -169,7 +168,6 @@ def change_boot_volume_backup_compartment(self, boot_volume_backup_id, change_bo def change_boot_volume_compartment(self, boot_volume_id, change_boot_volume_compartment_details, **kwargs): """ - ChangeBootVolumeCompartment Moves a boot volume into a different compartment within the same tenancy. For information about moving resources between compartments, see `Moving Resources to a Different Compartment`__. @@ -250,7 +248,6 @@ def change_boot_volume_compartment(self, boot_volume_id, change_boot_volume_comp def change_volume_backup_compartment(self, volume_backup_id, change_volume_backup_compartment_details, **kwargs): """ - ChangeVolumeBackupCompartment Moves a volume backup into a different compartment within the same tenancy. For information about moving resources between compartments, see `Moving Resources to a Different Compartment`__. @@ -331,7 +328,6 @@ def change_volume_backup_compartment(self, volume_backup_id, change_volume_backu def change_volume_compartment(self, volume_id, change_volume_compartment_details, **kwargs): """ - ChangeVolumeCompartment Moves a volume into a different compartment within the same tenancy. For information about moving resources between compartments, see `Moving Resources to a Different Compartment`__. @@ -412,7 +408,6 @@ def change_volume_compartment(self, volume_id, change_volume_compartment_details def change_volume_group_backup_compartment(self, volume_group_backup_id, change_volume_group_backup_compartment_details, **kwargs): """ - ChangeVolumeGroupBackupCompartment Moves a volume group backup into a different compartment within the same tenancy. For information about moving resources between compartments, see `Moving Resources to a Different Compartment`__. @@ -493,7 +488,6 @@ def change_volume_group_backup_compartment(self, volume_group_backup_id, change_ def change_volume_group_compartment(self, volume_group_id, change_volume_group_compartment_details, **kwargs): """ - ChangeVolumeGroupCompartment Moves a volume group into a different compartment within the same tenancy. For information about moving resources between compartments, see `Moving Resources to a Different Compartment`__. @@ -574,7 +568,6 @@ def change_volume_group_compartment(self, volume_group_id, change_volume_group_c def copy_boot_volume_backup(self, boot_volume_backup_id, copy_boot_volume_backup_details, **kwargs): """ - CreateBootVolumeBackupCopy Creates a boot volume backup copy in specified region. For general information about volume backups, see `Overview of Boot Volume Backups`__ @@ -667,7 +660,6 @@ def copy_boot_volume_backup(self, boot_volume_backup_id, copy_boot_volume_backup def copy_volume_backup(self, volume_backup_id, copy_volume_backup_details, **kwargs): """ - CreateVolumeBackupCopy Creates a volume backup copy in specified region. For general information about volume backups, see `Overview of Block Volume Service Backups`__ @@ -760,7 +752,6 @@ def copy_volume_backup(self, volume_backup_id, copy_volume_backup_details, **kwa def create_boot_volume(self, create_boot_volume_details, **kwargs): """ - CreateBootVolume Creates a new boot volume in the specified compartment from an existing boot volume or a boot volume backup. For general information about boot volumes, see `Boot Volumes`__. You may optionally specify a *display name* for the volume, which is simply a friendly name or @@ -834,7 +825,6 @@ def create_boot_volume(self, create_boot_volume_details, **kwargs): def create_boot_volume_backup(self, create_boot_volume_backup_details, **kwargs): """ - CreateBootVolumeBackup Creates a new boot volume backup of the specified boot volume. For general information about boot volume backups, see `Overview of Boot Volume Backups`__ @@ -910,7 +900,6 @@ def create_boot_volume_backup(self, create_boot_volume_backup_details, **kwargs) def create_volume(self, create_volume_details, **kwargs): """ - CreateVolume Creates a new volume in the specified compartment. Volumes can be created in sizes ranging from 50 GB (51200 MB) to 32 TB (33554432 MB), in 1 GB (1024 MB) increments. By default, volumes are 1 TB (1048576 MB). For general information about block volumes, see @@ -996,7 +985,6 @@ def create_volume(self, create_volume_details, **kwargs): def create_volume_backup(self, create_volume_backup_details, **kwargs): """ - CreateVolumeBackup Creates a new backup of the specified volume. For general information about volume backups, see `Overview of Block Volume Service Backups`__ @@ -1072,7 +1060,6 @@ def create_volume_backup(self, create_volume_backup_details, **kwargs): def create_volume_backup_policy(self, create_volume_backup_policy_details, **kwargs): """ - CreateVolumeBackupPolicy Creates a new user defined backup policy. For more information about Oracle defined backup policies and user defined backup policies, @@ -1152,7 +1139,6 @@ def create_volume_backup_policy(self, create_volume_backup_policy_details, **kwa def create_volume_backup_policy_assignment(self, create_volume_backup_policy_assignment_details, **kwargs): """ - CreateVolumeBackupPolicyAssignment Assigns a volume backup policy to the specified volume. Note that a given volume can only have one backup policy assigned to it. If this operation is used for a volume that already has a different backup policy assigned, the prior backup policy will be silently unassigned. @@ -1208,7 +1194,6 @@ def create_volume_backup_policy_assignment(self, create_volume_backup_policy_ass def create_volume_group(self, create_volume_group_details, **kwargs): """ - CreateVolumeGroup Creates a new volume group in the specified compartment. A volume group is a collection of volumes and may be created from a list of volumes, cloning an existing volume group, or by restoring a volume group backup. A volume group can contain up to 64 volumes. @@ -1285,7 +1270,6 @@ def create_volume_group(self, create_volume_group_details, **kwargs): def create_volume_group_backup(self, create_volume_group_backup_details, **kwargs): """ - CreateVolumeGroupBackup Creates a new backup volume group of the specified volume group. For more information, see `Volume Groups`__. @@ -1357,7 +1341,6 @@ def create_volume_group_backup(self, create_volume_group_backup_details, **kwarg def delete_boot_volume(self, boot_volume_id, **kwargs): """ - DeleteBootVolume Deletes the specified boot volume. The volume cannot have an active connection to an instance. To disconnect the boot volume from a connected instance, see `Disconnecting From a Boot Volume`__. @@ -1435,7 +1418,6 @@ def delete_boot_volume(self, boot_volume_id, **kwargs): def delete_boot_volume_backup(self, boot_volume_backup_id, **kwargs): """ - DeleteBootVolumeBackup Deletes a boot volume backup. @@ -1508,7 +1490,6 @@ def delete_boot_volume_backup(self, boot_volume_backup_id, **kwargs): def delete_boot_volume_kms_key(self, boot_volume_id, **kwargs): """ - DeleteBootVolumeKmsKey Removes the specified boot volume's assigned Key Management encryption key. @@ -1581,7 +1562,6 @@ def delete_boot_volume_kms_key(self, boot_volume_id, **kwargs): def delete_volume(self, volume_id, **kwargs): """ - DeleteVolume Deletes the specified volume. The volume cannot have an active connection to an instance. To disconnect the volume from a connected instance, see `Disconnecting From a Volume`__. @@ -1659,7 +1639,6 @@ def delete_volume(self, volume_id, **kwargs): def delete_volume_backup(self, volume_backup_id, **kwargs): """ - DeleteVolumeBackup Deletes a volume backup. @@ -1732,7 +1711,6 @@ def delete_volume_backup(self, volume_backup_id, **kwargs): def delete_volume_backup_policy(self, policy_id, **kwargs): """ - DeleteVolumeBackupPolicy Deletes a user defined backup policy. For more information about user defined backup policies, see `Policy-Based Backups`__. @@ -1817,7 +1795,6 @@ def delete_volume_backup_policy(self, policy_id, **kwargs): def delete_volume_backup_policy_assignment(self, policy_assignment_id, **kwargs): """ - DeleteVolumeBackupPolicyAssignment Deletes a volume backup policy assignment. @@ -1890,7 +1867,6 @@ def delete_volume_backup_policy_assignment(self, policy_assignment_id, **kwargs) def delete_volume_group(self, volume_group_id, **kwargs): """ - DeleteVolumeGroup Deletes the specified volume group. Individual volumes are not deleted, only the volume group is deleted. For more information, see `Volume Groups`__. @@ -1966,7 +1942,6 @@ def delete_volume_group(self, volume_group_id, **kwargs): def delete_volume_group_backup(self, volume_group_backup_id, **kwargs): """ - DeleteVolumeGroupBackup Deletes a volume group backup. This operation deletes all the backups in the volume group. For more information, see `Volume Groups`__. __ https://docs.cloud.oracle.com/Content/Block/Concepts/volumegroups.htm @@ -2041,7 +2016,6 @@ def delete_volume_group_backup(self, volume_group_backup_id, **kwargs): def delete_volume_kms_key(self, volume_id, **kwargs): """ - DeleteVolumeKmsKey Removes the specified volume's assigned Key Management encryption key. @@ -2114,7 +2088,6 @@ def delete_volume_kms_key(self, volume_id, **kwargs): def get_boot_volume(self, boot_volume_id, **kwargs): """ - GetBootVolume Gets information for the specified boot volume. @@ -2178,7 +2151,6 @@ def get_boot_volume(self, boot_volume_id, **kwargs): def get_boot_volume_backup(self, boot_volume_backup_id, **kwargs): """ - GetBootVolumeBackup Gets information for the specified boot volume backup. @@ -2242,7 +2214,6 @@ def get_boot_volume_backup(self, boot_volume_backup_id, **kwargs): def get_boot_volume_kms_key(self, boot_volume_id, **kwargs): """ - GetBootVolumeKmsKey Gets the Key Management encryption key assigned to the specified boot volume. @@ -2317,7 +2288,6 @@ def get_boot_volume_kms_key(self, boot_volume_id, **kwargs): def get_volume(self, volume_id, **kwargs): """ - GetVolume Gets information for the specified volume. @@ -2381,7 +2351,6 @@ def get_volume(self, volume_id, **kwargs): def get_volume_backup(self, volume_backup_id, **kwargs): """ - GetVolumeBackup Gets information for the specified volume backup. @@ -2445,7 +2414,6 @@ def get_volume_backup(self, volume_backup_id, **kwargs): def get_volume_backup_policy(self, policy_id, **kwargs): """ - GetVolumeBackupPolicy Gets information for the specified volume backup policy. @@ -2509,7 +2477,6 @@ def get_volume_backup_policy(self, policy_id, **kwargs): def get_volume_backup_policy_asset_assignment(self, asset_id, **kwargs): """ - GetVolumeBackupPolicyAssetAssignment Gets the volume backup policy assignment for the specified volume. The `assetId` query parameter is required, and the returned list will contain at most one item, since volume can only have one volume backup policy assigned at a time. @@ -2593,7 +2560,6 @@ def get_volume_backup_policy_asset_assignment(self, asset_id, **kwargs): def get_volume_backup_policy_assignment(self, policy_assignment_id, **kwargs): """ - GetVolumeBackupPolicyAssignment Gets information for the specified volume backup policy assignment. @@ -2657,7 +2623,6 @@ def get_volume_backup_policy_assignment(self, policy_assignment_id, **kwargs): def get_volume_group(self, volume_group_id, **kwargs): """ - GetVolumeGroup Gets information for the specified volume group. For more information, see `Volume Groups`__. __ https://docs.cloud.oracle.com/Content/Block/Concepts/volumegroups.htm @@ -2723,7 +2688,6 @@ def get_volume_group(self, volume_group_id, **kwargs): def get_volume_group_backup(self, volume_group_backup_id, **kwargs): """ - GetVolumeGroupBackup Gets information for the specified volume group backup. For more information, see `Volume Groups`__. __ https://docs.cloud.oracle.com/Content/Block/Concepts/volumegroups.htm @@ -2789,7 +2753,6 @@ def get_volume_group_backup(self, volume_group_backup_id, **kwargs): def get_volume_kms_key(self, volume_id, **kwargs): """ - GetVolumeKmsKey Gets the Key Management encryption key assigned to the specified volume. @@ -2864,7 +2827,6 @@ def get_volume_kms_key(self, volume_id, **kwargs): def list_boot_volume_backups(self, compartment_id, **kwargs): """ - ListBootVolumeBackups Lists the boot volume backups in the specified compartment. You can filter the results by boot volume. @@ -3013,7 +2975,6 @@ def list_boot_volume_backups(self, compartment_id, **kwargs): def list_boot_volumes(self, availability_domain, compartment_id, **kwargs): """ - ListBootVolumes Lists the boot volumes in the specified compartment and availability domain. @@ -3108,7 +3069,6 @@ def list_boot_volumes(self, availability_domain, compartment_id, **kwargs): def list_volume_backup_policies(self, **kwargs): """ - ListVolumeBackupPolicies Lists all the volume backup policies available in the specified compartment. For more information about Oracle defined backup policies and user defined backup policies, @@ -3197,7 +3157,6 @@ def list_volume_backup_policies(self, **kwargs): def list_volume_backups(self, compartment_id, **kwargs): """ - ListVolumeBackups Lists the volume backups in the specified compartment. You can filter the results by volume. @@ -3346,7 +3305,6 @@ def list_volume_backups(self, compartment_id, **kwargs): def list_volume_group_backups(self, compartment_id, **kwargs): """ - ListVolumeGroupBackups Lists the volume group backups in the specified compartment. You can filter the results by volume group. For more information, see `Volume Groups`__. @@ -3479,7 +3437,6 @@ def list_volume_group_backups(self, compartment_id, **kwargs): def list_volume_groups(self, compartment_id, **kwargs): """ - ListVolumeGroups Lists the volume groups in the specified compartment and availability domain. For more information, see `Volume Groups`__. @@ -3628,7 +3585,6 @@ def list_volume_groups(self, compartment_id, **kwargs): def list_volumes(self, compartment_id, **kwargs): """ - ListVolumes Lists the volumes in the specified compartment and availability domain. @@ -3779,7 +3735,6 @@ def list_volumes(self, compartment_id, **kwargs): def update_boot_volume(self, boot_volume_id, update_boot_volume_details, **kwargs): """ - UpdateBootVolume Updates the specified boot volume's display name, defined tags, and free-form tags. @@ -3859,7 +3814,6 @@ def update_boot_volume(self, boot_volume_id, update_boot_volume_details, **kwarg def update_boot_volume_backup(self, boot_volume_backup_id, update_boot_volume_backup_details, **kwargs): """ - UpdateBootVolumeBackup Updates the display name for the specified boot volume backup. Avoid entering confidential information. @@ -3940,7 +3894,6 @@ def update_boot_volume_backup(self, boot_volume_backup_id, update_boot_volume_ba def update_boot_volume_kms_key(self, boot_volume_id, update_boot_volume_kms_key_details, **kwargs): """ - UpdateBootVolumeKmsKey Updates the specified volume with a new Key Management master encryption key. @@ -4020,7 +3973,6 @@ def update_boot_volume_kms_key(self, boot_volume_id, update_boot_volume_kms_key_ def update_volume(self, volume_id, update_volume_details, **kwargs): """ - UpdateVolume Updates the specified volume's display name. Avoid entering confidential information. @@ -4101,7 +4053,6 @@ def update_volume(self, volume_id, update_volume_details, **kwargs): def update_volume_backup(self, volume_backup_id, update_volume_backup_details, **kwargs): """ - UpdateVolumeBackup Updates the display name for the specified volume backup. Avoid entering confidential information. @@ -4182,7 +4133,6 @@ def update_volume_backup(self, volume_backup_id, update_volume_backup_details, * def update_volume_backup_policy(self, policy_id, update_volume_backup_policy_details, **kwargs): """ - UpdateVolumeBackupPolicy Updates a user defined backup policy. For more information about user defined backup policies, see `Policy-Based Backups`__. @@ -4285,7 +4235,6 @@ def update_volume_backup_policy(self, policy_id, update_volume_backup_policy_det def update_volume_group(self, volume_group_id, update_volume_group_details, **kwargs): """ - UpdateVolumeGroup Updates the set of volumes in a volume group along with the display name. Use this operation to add or remove volumes in a volume group. Specify the full list of volume IDs to include in the volume group. If the volume ID is not specified in the call, it will be removed from the volume group. @@ -4372,7 +4321,6 @@ def update_volume_group(self, volume_group_id, update_volume_group_details, **kw def update_volume_group_backup(self, volume_group_backup_id, update_volume_group_backup_details, **kwargs): """ - UpdateVolumeGroupBackup Updates the display name for the specified volume group backup. For more information, see `Volume Groups`__. __ https://docs.cloud.oracle.com/Content/Block/Concepts/volumegroups.htm @@ -4454,7 +4402,6 @@ def update_volume_group_backup(self, volume_group_backup_id, update_volume_group def update_volume_kms_key(self, volume_id, update_volume_kms_key_details, **kwargs): """ - UpdateVolumeKmsKey Updates the specified volume with a new Key Management master encryption key. diff --git a/src/oci/core/compute_client.py b/src/oci/core/compute_client.py index bbd47f0549..7e5e636812 100644 --- a/src/oci/core/compute_client.py +++ b/src/oci/core/compute_client.py @@ -88,7 +88,6 @@ def __init__(self, config, **kwargs): def add_image_shape_compatibility_entry(self, image_id, shape_name, **kwargs): """ - AddImageShapeCompatibilityEntry Adds a shape to the compatible shapes list for the image. @@ -158,7 +157,6 @@ def add_image_shape_compatibility_entry(self, image_id, shape_name, **kwargs): def attach_boot_volume(self, attach_boot_volume_details, **kwargs): """ - AttachBootVolume Attaches the specified boot volume to the specified instance. @@ -227,7 +225,6 @@ def attach_boot_volume(self, attach_boot_volume_details, **kwargs): def attach_vnic(self, attach_vnic_details, **kwargs): """ - AttachVnic Creates a secondary VNIC and attaches it to the specified instance. For more information about secondary VNICs, see `Virtual Network Interface Cards (VNICs)`__. @@ -300,7 +297,6 @@ def attach_vnic(self, attach_vnic_details, **kwargs): def attach_volume(self, attach_volume_details, **kwargs): """ - AttachVolume Attaches the specified storage volume to the specified instance. @@ -369,7 +365,6 @@ def attach_volume(self, attach_volume_details, **kwargs): def capture_console_history(self, capture_console_history_details, **kwargs): """ - CaptureConsoleHistory Captures the most recent serial console data (up to a megabyte) for the specified instance. @@ -454,7 +449,6 @@ def capture_console_history(self, capture_console_history_details, **kwargs): def change_dedicated_vm_host_compartment(self, dedicated_vm_host_id, change_dedicated_vm_host_compartment_details, **kwargs): """ - ChangeDedicatedVmHostCompartment Moves a dedicated virtual machine host from one compartment to another. @@ -549,7 +543,6 @@ def change_dedicated_vm_host_compartment(self, dedicated_vm_host_id, change_dedi def change_image_compartment(self, image_id, change_image_compartment_details, **kwargs): """ - ChangeImageCompartment Moves an image into a different compartment within the same tenancy. For information about moving resources between compartments, see `Moving Resources to a Different Compartment`__. @@ -650,7 +643,6 @@ def change_image_compartment(self, image_id, change_image_compartment_details, * def change_instance_compartment(self, instance_id, change_instance_compartment_details, **kwargs): """ - ChangeInstanceCompartment Moves an instance into a different compartment within the same tenancy. For information about moving resources between compartments, see `Moving Resources to a Different Compartment`__. @@ -752,7 +744,6 @@ def change_instance_compartment(self, instance_id, change_instance_compartment_d def create_app_catalog_subscription(self, create_app_catalog_subscription_details, **kwargs): """ - CreateAppCatalogSubscription Create a subscription for listing resource version for a compartment. It will take some time to propagate to all regions. @@ -821,7 +812,6 @@ def create_app_catalog_subscription(self, create_app_catalog_subscription_detail def create_dedicated_vm_host(self, create_dedicated_vm_host_details, **kwargs): """ - CreateDedicatedVmHost Creates a new dedicated virtual machine host in the specified compartment and the specified availability domain. Dedicated virtual machine hosts enable you to run your Compute virtual machine (VM) instances on dedicated servers that are a single tenant and not shared with other customers. @@ -901,7 +891,6 @@ def create_dedicated_vm_host(self, create_dedicated_vm_host_details, **kwargs): def create_image(self, create_image_details, **kwargs): """ - CreateImage Creates a boot disk image for the specified instance or imports an exported image from the Oracle Cloud Infrastructure Object Storage service. When creating a new image, you must provide the OCID of the instance you want to use as the basis for the image, and @@ -997,7 +986,6 @@ def create_image(self, create_image_details, **kwargs): def create_instance_console_connection(self, create_instance_console_connection_details, **kwargs): """ - CreateInstanceConsoleConnection Creates a new console connection to the specified instance. After the console connection has been created and is available, you connect to the console using SSH. @@ -1072,7 +1060,6 @@ def create_instance_console_connection(self, create_instance_console_connection_ def delete_app_catalog_subscription(self, listing_id, compartment_id, resource_version, **kwargs): """ - DeleteAppCatalogSubscription Delete a subscription for a listing resource version for a compartment. @@ -1139,7 +1126,6 @@ def delete_app_catalog_subscription(self, listing_id, compartment_id, resource_v def delete_console_history(self, instance_console_history_id, **kwargs): """ - DeleteConsoleHistory Deletes the specified console history metadata and the console history data. @@ -1212,7 +1198,6 @@ def delete_console_history(self, instance_console_history_id, **kwargs): def delete_dedicated_vm_host(self, dedicated_vm_host_id, **kwargs): """ - DeleteDedicatedVmHost Deletes the specified dedicated virtual machine host. If any VM instances are assigned to the dedicated virtual machine host, @@ -1287,7 +1272,6 @@ def delete_dedicated_vm_host(self, dedicated_vm_host_id, **kwargs): def delete_image(self, image_id, **kwargs): """ - DeleteImage Deletes an image. @@ -1362,7 +1346,6 @@ def delete_image(self, image_id, **kwargs): def delete_instance_console_connection(self, instance_console_connection_id, **kwargs): """ - DeleteInstanceConsoleConnection Deletes the specified instance console connection. @@ -1435,7 +1418,6 @@ def delete_instance_console_connection(self, instance_console_connection_id, **k def detach_boot_volume(self, boot_volume_attachment_id, **kwargs): """ - DetachBootVolume Detaches a boot volume from an instance. You must specify the OCID of the boot volume attachment. This is an asynchronous operation. The attachment's `lifecycleState` will change to DETACHING temporarily @@ -1511,7 +1493,6 @@ def detach_boot_volume(self, boot_volume_attachment_id, **kwargs): def detach_vnic(self, vnic_attachment_id, **kwargs): """ - DetachVnic Detaches and deletes the specified secondary VNIC. This operation cannot be used on the instance's primary VNIC. When you terminate an instance, all attached VNICs (primary @@ -1595,7 +1576,6 @@ def detach_vnic(self, vnic_attachment_id, **kwargs): def detach_volume(self, volume_attachment_id, **kwargs): """ - DetachVolume Detaches a storage volume from an instance. You must specify the OCID of the volume attachment. This is an asynchronous operation. The attachment's `lifecycleState` will change to DETACHING temporarily @@ -1671,7 +1651,6 @@ def detach_volume(self, volume_attachment_id, **kwargs): def export_image(self, image_id, export_image_details, **kwargs): """ - ExportImage Exports the specified image to the Oracle Cloud Infrastructure Object Storage service. You can use the Object Storage URL, or the namespace, bucket name, and object name when specifying the location to export to. @@ -1778,7 +1757,6 @@ def export_image(self, image_id, export_image_details, **kwargs): def get_app_catalog_listing(self, listing_id, **kwargs): """ - GetAppCatalogListing Gets the specified listing. @@ -1842,7 +1820,6 @@ def get_app_catalog_listing(self, listing_id, **kwargs): def get_app_catalog_listing_agreements(self, listing_id, resource_version, **kwargs): """ - GetAppCatalogListingAgreements Retrieves the agreements for a particular resource version of a listing. @@ -1910,7 +1887,6 @@ def get_app_catalog_listing_agreements(self, listing_id, resource_version, **kwa def get_app_catalog_listing_resource_version(self, listing_id, resource_version, **kwargs): """ - GetAppCatalogListingResourceVersion Gets the specified listing resource version. @@ -1978,7 +1954,6 @@ def get_app_catalog_listing_resource_version(self, listing_id, resource_version, def get_boot_volume_attachment(self, boot_volume_attachment_id, **kwargs): """ - GetBootVolumeAttachment Gets information about the specified boot volume attachment. @@ -2042,7 +2017,6 @@ def get_boot_volume_attachment(self, boot_volume_attachment_id, **kwargs): def get_console_history(self, instance_console_history_id, **kwargs): """ - GetConsoleHistory Shows the metadata for the specified console history. See :func:`capture_console_history` for details about using the console history operations. @@ -2108,7 +2082,6 @@ def get_console_history(self, instance_console_history_id, **kwargs): def get_console_history_content(self, instance_console_history_id, **kwargs): """ - GetConsoleHistoryContent Gets the actual console history data (not the metadata). See :func:`capture_console_history` for details about using the console history operations. @@ -2193,7 +2166,6 @@ def get_console_history_content(self, instance_console_history_id, **kwargs): def get_dedicated_vm_host(self, dedicated_vm_host_id, **kwargs): """ - GetDedicatedVmHost Gets information about the specified dedicated virtual machine host. @@ -2267,7 +2239,6 @@ def get_dedicated_vm_host(self, dedicated_vm_host_id, **kwargs): def get_image(self, image_id, **kwargs): """ - GetImage Gets the specified image. @@ -2333,7 +2304,6 @@ def get_image(self, image_id, **kwargs): def get_instance(self, instance_id, **kwargs): """ - GetInstance Gets information about the specified instance. @@ -2397,7 +2367,6 @@ def get_instance(self, instance_id, **kwargs): def get_instance_console_connection(self, instance_console_connection_id, **kwargs): """ - GetInstanceConsoleConnection Gets the specified instance console connection's information. @@ -2461,7 +2430,6 @@ def get_instance_console_connection(self, instance_console_connection_id, **kwar def get_vnic_attachment(self, vnic_attachment_id, **kwargs): """ - GetVnicAttachment Gets the information for the specified VNIC attachment. @@ -2525,7 +2493,6 @@ def get_vnic_attachment(self, vnic_attachment_id, **kwargs): def get_volume_attachment(self, volume_attachment_id, **kwargs): """ - GetVolumeAttachment Gets information about the specified volume attachment. @@ -2589,7 +2556,6 @@ def get_volume_attachment(self, volume_attachment_id, **kwargs): def get_windows_instance_initial_credentials(self, instance_id, **kwargs): """ - GetWindowsInstanceInitialCredentials Gets the generated credentials for the instance. Only works for instances that require a password to log in, such as Windows. For certain operating systems, users will be forced to change the initial credentials. @@ -2654,7 +2620,6 @@ def get_windows_instance_initial_credentials(self, instance_id, **kwargs): def instance_action(self, instance_id, action, **kwargs): """ - InstanceAction Performs one of the following power actions on the specified instance: - **START** - Powers on the instance. @@ -2770,7 +2735,6 @@ def instance_action(self, instance_id, action, **kwargs): def launch_instance(self, launch_instance_details, **kwargs): """ - LaunchInstance Creates a new instance in the specified compartment and the specified availability domain. For general information about instances, see `Overview of the Compute Service`__. @@ -2874,7 +2838,6 @@ def launch_instance(self, launch_instance_details, **kwargs): def list_app_catalog_listing_resource_versions(self, listing_id, **kwargs): """ - ListAppCatalogListingResourceVersions Gets all resource versions for a particular listing. @@ -2982,7 +2945,6 @@ def list_app_catalog_listing_resource_versions(self, listing_id, **kwargs): def list_app_catalog_listings(self, **kwargs): """ - ListAppCatalogListings Lists the published listings. @@ -3090,7 +3052,6 @@ def list_app_catalog_listings(self, **kwargs): def list_app_catalog_subscriptions(self, compartment_id, **kwargs): """ - ListAppCatalogSubscriptions Lists subscriptions for a compartment. @@ -3215,7 +3176,6 @@ def list_app_catalog_subscriptions(self, compartment_id, **kwargs): def list_boot_volume_attachments(self, availability_domain, compartment_id, **kwargs): """ - ListBootVolumeAttachments Lists the boot volume attachments in the specified compartment. You can filter the list by specifying an instance OCID, boot volume OCID, or both. @@ -3316,7 +3276,6 @@ def list_boot_volume_attachments(self, availability_domain, compartment_id, **kw def list_console_histories(self, compartment_id, **kwargs): """ - ListConsoleHistories Lists the console history metadata for the specified compartment or instance. @@ -3462,7 +3421,6 @@ def list_console_histories(self, compartment_id, **kwargs): def list_dedicated_vm_host_instance_shapes(self, compartment_id, **kwargs): """ - ListDedicatedVmHostInstanceShapes Lists the shapes that can be used to launch a virtual machine instance on a dedicated virtual machine host within the specified compartment. You can filter the list by compatibility with a specific dedicated virtual machine host shape. @@ -3566,7 +3524,6 @@ def list_dedicated_vm_host_instance_shapes(self, compartment_id, **kwargs): def list_dedicated_vm_host_instances(self, compartment_id, dedicated_vm_host_id, **kwargs): """ - ListDedicatedVmHostInstances Returns the list of instances on the dedicated virtual machine hosts that match the specified criteria. @@ -3715,7 +3672,6 @@ def list_dedicated_vm_host_instances(self, compartment_id, dedicated_vm_host_id, def list_dedicated_vm_host_shapes(self, compartment_id, **kwargs): """ - ListDedicatedVmHostShapes Lists the shapes that can be used to launch a dedicated virtual machine host within the specified compartment. @@ -3818,7 +3774,6 @@ def list_dedicated_vm_host_shapes(self, compartment_id, **kwargs): def list_dedicated_vm_hosts(self, compartment_id, **kwargs): """ - ListDedicatedVmHosts Returns the list of dedicated virtual machine hosts that match the specified criteria in the specified compartment. You can limit the list by specifying a dedicated virtual machine host display name. The list will include all the identically-named @@ -3979,7 +3934,6 @@ def list_dedicated_vm_hosts(self, compartment_id, **kwargs): def list_images(self, compartment_id, **kwargs): """ - ListImages Lists the available images in the specified compartment, including both `Oracle-provided images`__ and `custom images`__ that have @@ -4146,7 +4100,6 @@ def list_images(self, compartment_id, **kwargs): def list_instance_console_connections(self, compartment_id, **kwargs): """ - ListInstanceConsoleConnections Lists the console connections for the specified compartment or instance. For more information about console access, see `Accessing the Console`__. @@ -4239,7 +4192,6 @@ def list_instance_console_connections(self, compartment_id, **kwargs): def list_instance_devices(self, instance_id, **kwargs): """ - ListInstanceDevices Gets a list of all the devices for given instance. You can optionally filter results by device availability. @@ -4385,7 +4337,6 @@ def list_instance_devices(self, instance_id, **kwargs): def list_instances(self, compartment_id, **kwargs): """ - ListInstances Lists the instances in the specified compartment and the specified availability domain. You can filter the results by specifying an instance name (the list will include all the identically-named instances in the compartment). @@ -4533,7 +4484,6 @@ def list_instances(self, compartment_id, **kwargs): def list_shapes(self, compartment_id, **kwargs): """ - ListShapes Lists the shapes that can be used to launch an instance within the specified compartment. You can filter the list by compatibility with a specific image. @@ -4632,7 +4582,6 @@ def list_shapes(self, compartment_id, **kwargs): def list_vnic_attachments(self, compartment_id, **kwargs): """ - ListVnicAttachments Lists the VNIC attachments in the specified compartment. A VNIC attachment resides in the same compartment as the attached instance. The list can be filtered by instance, VNIC, or availability domain. @@ -4735,7 +4684,6 @@ def list_vnic_attachments(self, compartment_id, **kwargs): def list_volume_attachments(self, compartment_id, **kwargs): """ - ListVolumeAttachments Lists the volume attachments in the specified compartment. You can filter the list by specifying an instance OCID, volume OCID, or both. @@ -4840,7 +4788,6 @@ def list_volume_attachments(self, compartment_id, **kwargs): def remove_image_shape_compatibility_entry(self, image_id, shape_name, **kwargs): """ - RemoveImageShapeCompatibilityEntry Removes a shape from the compatible shapes list for the image. @@ -4908,7 +4855,6 @@ def remove_image_shape_compatibility_entry(self, image_id, shape_name, **kwargs) def terminate_instance(self, instance_id, **kwargs): """ - TerminateInstance Terminates the specified instance. Any attached VNICs and volumes are automatically detached when the instance terminates. @@ -5000,7 +4946,6 @@ def terminate_instance(self, instance_id, **kwargs): def update_console_history(self, instance_console_history_id, update_console_history_details, **kwargs): """ - UpdateConsoleHistory Updates the specified console history metadata. @@ -5080,7 +5025,6 @@ def update_console_history(self, instance_console_history_id, update_console_his def update_dedicated_vm_host(self, dedicated_vm_host_id, update_dedicated_vm_host_details, **kwargs): """ - UpdateDedicatedVmHost Updates the displayName, freeformTags, and definedTags attributes for the specified dedicated virtual machine host. If an attribute value is not included, it will not be updated. @@ -5178,7 +5122,6 @@ def update_dedicated_vm_host(self, dedicated_vm_host_id, update_dedicated_vm_hos def update_image(self, image_id, update_image_details, **kwargs): """ - UpdateImage Updates the display name of the image. Avoid entering confidential information. @@ -5271,7 +5214,6 @@ def update_image(self, image_id, update_image_details, **kwargs): def update_instance(self, instance_id, update_instance_details, **kwargs): """ - UpdateInstance Updates certain fields on the specified instance. Fields that are not provided in the request will not be updated. Avoid entering confidential information. diff --git a/src/oci/core/compute_management_client.py b/src/oci/core/compute_management_client.py index a225461373..b44515509b 100644 --- a/src/oci/core/compute_management_client.py +++ b/src/oci/core/compute_management_client.py @@ -88,7 +88,6 @@ def __init__(self, config, **kwargs): def attach_load_balancer(self, instance_pool_id, attach_load_balancer_details, **kwargs): """ - AttachLoadBalancer Attach a load balancer to the instance pool. @@ -181,7 +180,6 @@ def attach_load_balancer(self, instance_pool_id, attach_load_balancer_details, * def change_cluster_network_compartment(self, cluster_network_id, change_cluster_network_compartment_details, **kwargs): """ - ChangeClusterNetworkCompartment Moves a cluster network into a different compartment within the same tenancy. For information about moving resources between compartments, see `Moving Resources to a Different Compartment`__. @@ -285,7 +283,6 @@ def change_cluster_network_compartment(self, cluster_network_id, change_cluster_ def change_instance_configuration_compartment(self, instance_configuration_id, change_instance_configuration_compartment_details, **kwargs): """ - ChangeInstanceConfigurationCompartment Moves an instance configuration into a different compartment within the same tenancy. For information about moving resources between compartments, see `Moving Resources to a Different Compartment`__. @@ -395,7 +392,6 @@ def change_instance_configuration_compartment(self, instance_configuration_id, c def change_instance_pool_compartment(self, instance_pool_id, change_instance_pool_compartment_details, **kwargs): """ - ChangeInstancePoolCompartment Moves an instance pool into a different compartment within the same tenancy. For information about moving resources between compartments, see `Moving Resources to a Different Compartment`__. @@ -499,7 +495,6 @@ def change_instance_pool_compartment(self, instance_pool_id, change_instance_poo def create_cluster_network(self, create_cluster_network_details, **kwargs): """ - CreateClusterNetwork Creates a cluster network. For more information about cluster networks, see `Managing Cluster Networks`__. @@ -571,7 +566,6 @@ def create_cluster_network(self, create_cluster_network_details, **kwargs): def create_instance_configuration(self, create_instance_configuration, **kwargs): """ - CreateInstanceConfiguration Creates an instance configuration. An instance configuration is a template that defines the settings to use when creating Compute instances. @@ -641,7 +635,6 @@ def create_instance_configuration(self, create_instance_configuration, **kwargs) def create_instance_pool(self, create_instance_pool_details, **kwargs): """ - CreateInstancePool Create an instance pool. @@ -710,7 +703,6 @@ def create_instance_pool(self, create_instance_pool_details, **kwargs): def delete_instance_configuration(self, instance_configuration_id, **kwargs): """ - DeleteInstanceConfiguration Deletes an instance configuration. @@ -783,7 +775,6 @@ def delete_instance_configuration(self, instance_configuration_id, **kwargs): def detach_load_balancer(self, instance_pool_id, detach_load_balancer_details, **kwargs): """ - DetachLoadBalancer Detach a load balancer from the instance pool. @@ -876,7 +867,6 @@ def detach_load_balancer(self, instance_pool_id, detach_load_balancer_details, * def get_cluster_network(self, cluster_network_id, **kwargs): """ - GetClusterNetwork Gets information about the specified cluster network. @@ -942,7 +932,6 @@ def get_cluster_network(self, cluster_network_id, **kwargs): def get_instance_configuration(self, instance_configuration_id, **kwargs): """ - GetInstanceConfiguration Gets the specified instance configuration @@ -1006,7 +995,6 @@ def get_instance_configuration(self, instance_configuration_id, **kwargs): def get_instance_pool(self, instance_pool_id, **kwargs): """ - GetInstancePool Gets the specified instance pool @@ -1072,7 +1060,6 @@ def get_instance_pool(self, instance_pool_id, **kwargs): def get_instance_pool_load_balancer_attachment(self, instance_pool_id, instance_pool_load_balancer_attachment_id, **kwargs): """ - GetLoadBalancerAttachment Gets information about a load balancer that is attached to the specified instance pool. @@ -1142,7 +1129,6 @@ def get_instance_pool_load_balancer_attachment(self, instance_pool_id, instance_ def launch_instance_configuration(self, instance_configuration_id, instance_configuration, **kwargs): """ - LaunchInstanceConfiguration Launches an instance from an instance configuration. If the instance configuration does not include all of the parameters that are @@ -1232,7 +1218,6 @@ def launch_instance_configuration(self, instance_configuration_id, instance_conf def list_cluster_network_instances(self, compartment_id, cluster_network_id, **kwargs): """ - ListClusterNetworkInstances Lists the instances in the specified cluster network. @@ -1374,7 +1359,6 @@ def list_cluster_network_instances(self, compartment_id, cluster_network_id, **k def list_cluster_networks(self, compartment_id, **kwargs): """ - ListClusterNetworks Lists the cluster networks in the specified compartment. @@ -1514,7 +1498,6 @@ def list_cluster_networks(self, compartment_id, **kwargs): def list_instance_configurations(self, compartment_id, **kwargs): """ - ListInstanceConfigurations Lists the instance configurations in the specified compartment. @@ -1634,7 +1617,6 @@ def list_instance_configurations(self, compartment_id, **kwargs): def list_instance_pool_instances(self, compartment_id, instance_pool_id, **kwargs): """ - ListInstancePoolInstances List the instances in the specified instance pool. @@ -1776,7 +1758,6 @@ def list_instance_pool_instances(self, compartment_id, instance_pool_id, **kwarg def list_instance_pools(self, compartment_id, **kwargs): """ - ListInstancePools Lists the instance pools in the specified compartment. @@ -1915,7 +1896,6 @@ def list_instance_pools(self, compartment_id, **kwargs): def reset_instance_pool(self, instance_pool_id, **kwargs): """ - ResetInstancePool Performs the reset (power off and power on) action on the specified instance pool, which performs the action on all the instances in the pool. @@ -2004,7 +1984,6 @@ def reset_instance_pool(self, instance_pool_id, **kwargs): def softreset_instance_pool(self, instance_pool_id, **kwargs): """ - SoftresetInstancePool Performs the softreset (ACPI shutdown and power on) action on the specified instance pool, which performs the action on all the instances in the pool. @@ -2093,7 +2072,6 @@ def softreset_instance_pool(self, instance_pool_id, **kwargs): def start_instance_pool(self, instance_pool_id, **kwargs): """ - StartInstancePool Performs the start (power on) action on the specified instance pool, which performs the action on all the instances in the pool. @@ -2182,7 +2160,6 @@ def start_instance_pool(self, instance_pool_id, **kwargs): def stop_instance_pool(self, instance_pool_id, **kwargs): """ - StopInstancePool Performs the stop (power off) action on the specified instance pool, which performs the action on all the instances in the pool. @@ -2271,7 +2248,6 @@ def stop_instance_pool(self, instance_pool_id, **kwargs): def terminate_cluster_network(self, cluster_network_id, **kwargs): """ - TerminateClusterNetwork Terminates the specified cluster network. When you delete a cluster network, all of its resources are permanently deleted, @@ -2349,7 +2325,6 @@ def terminate_cluster_network(self, cluster_network_id, **kwargs): def terminate_instance_pool(self, instance_pool_id, **kwargs): """ - TerminateInstancePool Terminate the specified instance pool. @@ -2424,7 +2399,6 @@ def terminate_instance_pool(self, instance_pool_id, **kwargs): def update_cluster_network(self, cluster_network_id, update_cluster_network_details, **kwargs): """ - UpdateClusterNetwork Updates the specified cluster network. The OCID of the cluster network remains the same. @@ -2517,7 +2491,6 @@ def update_cluster_network(self, cluster_network_id, update_cluster_network_deta def update_instance_configuration(self, instance_configuration_id, update_instance_configuration_details, **kwargs): """ - UpdateInstanceConfiguration Updates the free-form tags, defined tags, and display name of an instance configuration. @@ -2608,7 +2581,6 @@ def update_instance_configuration(self, instance_configuration_id, update_instan def update_instance_pool(self, instance_pool_id, update_instance_pool_details, **kwargs): """ - UpdateInstancePool Update the specified instance pool. The OCID of the instance pool remains the same. diff --git a/src/oci/core/virtual_network_client.py b/src/oci/core/virtual_network_client.py index 9f0d849346..2bd54c7934 100644 --- a/src/oci/core/virtual_network_client.py +++ b/src/oci/core/virtual_network_client.py @@ -88,7 +88,6 @@ def __init__(self, config, **kwargs): def add_network_security_group_security_rules(self, network_security_group_id, add_network_security_group_security_rules_details, **kwargs): """ - AddNetworkSecurityGroupSecurityRules Adds one or more security rules to the specified network security group. @@ -159,7 +158,6 @@ def add_network_security_group_security_rules(self, network_security_group_id, a def attach_service_id(self, service_gateway_id, attach_service_details, **kwargs): """ - AttachService Adds the specified :class:`Service` to the list of enabled `Service` objects for the specified gateway. You must also set up a route rule with the `cidrBlock` of the `Service` as the rule's destination and the service gateway as the rule's @@ -250,7 +248,6 @@ def attach_service_id(self, service_gateway_id, attach_service_details, **kwargs def bulk_add_virtual_circuit_public_prefixes(self, virtual_circuit_id, bulk_add_virtual_circuit_public_prefixes_details, **kwargs): """ - BulkAddVirtualCircuitPublicPrefixes Adds one or more customer public IP prefixes to the specified public virtual circuit. Use this operation (and not :func:`update_virtual_circuit`) to add prefixes to the virtual circuit. Oracle must verify the customer's ownership @@ -320,7 +317,6 @@ def bulk_add_virtual_circuit_public_prefixes(self, virtual_circuit_id, bulk_add_ def bulk_delete_virtual_circuit_public_prefixes(self, virtual_circuit_id, bulk_delete_virtual_circuit_public_prefixes_details, **kwargs): """ - BulkDeleteVirtualCircuitPublicPrefixes Removes one or more customer public IP prefixes from the specified public virtual circuit. Use this operation (and not :func:`update_virtual_circuit`) to remove prefixes from the virtual circuit. When the virtual circuit's state switches @@ -390,7 +386,6 @@ def bulk_delete_virtual_circuit_public_prefixes(self, virtual_circuit_id, bulk_d def change_cpe_compartment(self, cpe_id, change_cpe_compartment_details, **kwargs): """ - ChangeCpeCompartment Moves a CPE object into a different compartment within the same tenancy. For information about moving resources between compartments, see `Moving Resources to a Different Compartment`__. @@ -482,7 +477,6 @@ def change_cpe_compartment(self, cpe_id, change_cpe_compartment_details, **kwarg def change_cross_connect_compartment(self, cross_connect_id, change_cross_connect_compartment_details, **kwargs): """ - ChangeCrossConnectCompartment Moves a cross-connect into a different compartment within the same tenancy. For information about moving resources between compartments, see `Moving Resources to a Different Compartment`__. @@ -574,7 +568,6 @@ def change_cross_connect_compartment(self, cross_connect_id, change_cross_connec def change_cross_connect_group_compartment(self, cross_connect_group_id, change_cross_connect_group_compartment_details, **kwargs): """ - ChangeCrossConnectGroupCompartment Moves a cross-connect group into a different compartment within the same tenancy. For information about moving resources between compartments, see `Moving Resources to a Different Compartment`__. @@ -666,7 +659,6 @@ def change_cross_connect_group_compartment(self, cross_connect_group_id, change_ def change_dhcp_options_compartment(self, dhcp_id, change_dhcp_options_compartment_details, **kwargs): """ - ChangeDhcpOptionsCompartment Moves a set of DHCP options into a different compartment within the same tenancy. For information about moving resources between compartments, see `Moving Resources to a Different Compartment`__. @@ -758,7 +750,6 @@ def change_dhcp_options_compartment(self, dhcp_id, change_dhcp_options_compartme def change_drg_compartment(self, drg_id, change_drg_compartment_details, **kwargs): """ - ChangeDrgCompartment Moves a DRG into a different compartment within the same tenancy. For information about moving resources between compartments, see `Moving Resources to a Different Compartment`__. @@ -850,7 +841,6 @@ def change_drg_compartment(self, drg_id, change_drg_compartment_details, **kwarg def change_internet_gateway_compartment(self, ig_id, change_internet_gateway_compartment_details, **kwargs): """ - ChangeInternetGatewayCompartment Moves an internet gateway into a different compartment within the same tenancy. For information about moving resources between compartments, see `Moving Resources to a Different Compartment`__. @@ -942,7 +932,6 @@ def change_internet_gateway_compartment(self, ig_id, change_internet_gateway_com def change_ip_sec_connection_compartment(self, ipsc_id, change_ip_sec_connection_compartment_details, **kwargs): """ - ChangeIPSecConnectionCompartment Moves an IPSec connection into a different compartment within the same tenancy. For information about moving resources between compartments, see `Moving Resources to a Different Compartment`__. @@ -1034,7 +1023,6 @@ def change_ip_sec_connection_compartment(self, ipsc_id, change_ip_sec_connection def change_local_peering_gateway_compartment(self, local_peering_gateway_id, change_local_peering_gateway_compartment_details, **kwargs): """ - ChangeLocalPeeringGatewayCompartment Moves a local peering gateway into a different compartment within the same tenancy. For information about moving resources between compartments, see `Moving Resources to a Different Compartment`__. @@ -1126,7 +1114,6 @@ def change_local_peering_gateway_compartment(self, local_peering_gateway_id, cha def change_nat_gateway_compartment(self, nat_gateway_id, change_nat_gateway_compartment_details, **kwargs): """ - ChangeNatGatewayCompartment Moves a NAT gateway into a different compartment within the same tenancy. For information about moving resources between compartments, see `Moving Resources to a Different Compartment`__. @@ -1220,7 +1207,6 @@ def change_nat_gateway_compartment(self, nat_gateway_id, change_nat_gateway_comp def change_network_security_group_compartment(self, network_security_group_id, change_network_security_group_compartment_details, **kwargs): """ - ChangeNetworkSecurityGroupCompartment Moves a network security group into a different compartment within the same tenancy. For information about moving resources between compartments, see `Moving Resources to a Different Compartment`__. @@ -1313,7 +1299,6 @@ def change_network_security_group_compartment(self, network_security_group_id, c def change_public_ip_compartment(self, public_ip_id, change_public_ip_compartment_details, **kwargs): """ - ChangePublicIpCompartment Moves a public IP into a different compartment within the same tenancy. For information about moving resources between compartments, see `Moving Resources to a Different Compartment`__. @@ -1408,7 +1393,6 @@ def change_public_ip_compartment(self, public_ip_id, change_public_ip_compartmen def change_remote_peering_connection_compartment(self, remote_peering_connection_id, change_remote_peering_connection_compartment_details, **kwargs): """ - ChangeRemotePeeringConnectionCompartment Moves a remote peering connection (RPC) into a different compartment within the same tenancy. For information about moving resources between compartments, see `Moving Resources to a Different Compartment`__. @@ -1500,7 +1484,6 @@ def change_remote_peering_connection_compartment(self, remote_peering_connection def change_route_table_compartment(self, rt_id, change_route_table_compartment_details, **kwargs): """ - ChangeRouteTableCompartment Moves a route table into a different compartment within the same tenancy. For information about moving resources between compartments, see `Moving Resources to a Different Compartment`__. @@ -1592,7 +1575,6 @@ def change_route_table_compartment(self, rt_id, change_route_table_compartment_d def change_security_list_compartment(self, security_list_id, change_security_list_compartment_details, **kwargs): """ - ChangeSecurityListCompartment Moves a security list into a different compartment within the same tenancy. For information about moving resources between compartments, see `Moving Resources to a Different Compartment`__. @@ -1684,7 +1666,6 @@ def change_security_list_compartment(self, security_list_id, change_security_lis def change_service_gateway_compartment(self, service_gateway_id, change_service_gateway_compartment_details, **kwargs): """ - ChangeServiceGatewayCompartment Moves a service gateway into a different compartment within the same tenancy. For information about moving resources between compartments, see `Moving Resources to a Different Compartment`__. @@ -1778,7 +1759,6 @@ def change_service_gateway_compartment(self, service_gateway_id, change_service_ def change_subnet_compartment(self, subnet_id, change_subnet_compartment_details, **kwargs): """ - ChangeSubnetCompartment Moves a subnet into a different compartment within the same tenancy. For information about moving resources between compartments, see `Moving Resources to a Different Compartment`__. @@ -1870,7 +1850,6 @@ def change_subnet_compartment(self, subnet_id, change_subnet_compartment_details def change_vcn_compartment(self, vcn_id, change_vcn_compartment_details, **kwargs): """ - ChangeVcnCompartment Moves a VCN into a different compartment within the same tenancy. For information about moving resources between compartments, see `Moving Resources to a Different Compartment`__. @@ -1964,7 +1943,6 @@ def change_vcn_compartment(self, vcn_id, change_vcn_compartment_details, **kwarg def change_virtual_circuit_compartment(self, virtual_circuit_id, change_virtual_circuit_compartment_details, **kwargs): """ - ChangeVirtualCircuitCompartment Moves a virtual circuit into a different compartment within the same tenancy. For information about moving resources between compartments, see `Moving Resources to a Different Compartment`__. @@ -2056,7 +2034,6 @@ def change_virtual_circuit_compartment(self, virtual_circuit_id, change_virtual_ def connect_local_peering_gateways(self, local_peering_gateway_id, connect_local_peering_gateways_details, **kwargs): """ - ConnectLocalPeeringGateways Connects this local peering gateway (LPG) to another one in the same region. This operation must be called by the VCN administrator who is designated as @@ -2132,7 +2109,6 @@ def connect_local_peering_gateways(self, local_peering_gateway_id, connect_local def connect_remote_peering_connections(self, remote_peering_connection_id, connect_remote_peering_connections_details, **kwargs): """ - ConnectRemotePeeringConnections Connects this RPC to another one in a different region. This operation must be called by the VCN administrator who is designated as @@ -2208,7 +2184,6 @@ def connect_remote_peering_connections(self, remote_peering_connection_id, conne def create_cpe(self, create_cpe_details, **kwargs): """ - CreateCpe Creates a new virtual customer-premises equipment (CPE) object in the specified compartment. For more information, see `IPSec VPNs`__. @@ -2296,7 +2271,6 @@ def create_cpe(self, create_cpe_details, **kwargs): def create_cross_connect(self, create_cross_connect_details, **kwargs): """ - CreateCrossConnect Creates a new cross-connect. Oracle recommends you create each cross-connect in a :class:`CrossConnectGroup` so you can use link aggregation with the connection. @@ -2387,7 +2361,6 @@ def create_cross_connect(self, create_cross_connect_details, **kwargs): def create_cross_connect_group(self, create_cross_connect_group_details, **kwargs): """ - CreateCrossConnectGroup Creates a new cross-connect group to use with Oracle Cloud Infrastructure FastConnect. For more information, see `FastConnect Overview`__. @@ -2474,7 +2447,6 @@ def create_cross_connect_group(self, create_cross_connect_group_details, **kwarg def create_dhcp_options(self, create_dhcp_details, **kwargs): """ - CreateDhcpOptions Creates a new set of DHCP options for the specified VCN. For more information, see :class:`DhcpOptions`. @@ -2557,7 +2529,6 @@ def create_dhcp_options(self, create_dhcp_details, **kwargs): def create_drg(self, create_drg_details, **kwargs): """ - CreateDrg Creates a new dynamic routing gateway (DRG) in the specified compartment. For more information, see `Dynamic Routing Gateways (DRGs)`__. @@ -2641,7 +2612,6 @@ def create_drg(self, create_drg_details, **kwargs): def create_drg_attachment(self, create_drg_attachment_details, **kwargs): """ - CreateDrgAttachment Attaches the specified DRG to the specified VCN. A VCN can be attached to only one DRG at a time, and vice versa. The response includes a `DrgAttachment` object with its own OCID. For more information about DRGs, see @@ -2723,7 +2693,6 @@ def create_drg_attachment(self, create_drg_attachment_details, **kwargs): def create_internet_gateway(self, create_internet_gateway_details, **kwargs): """ - CreateInternetGateway Creates a new internet gateway for the specified VCN. For more information, see `Access to the Internet`__. @@ -2816,7 +2785,6 @@ def create_internet_gateway(self, create_internet_gateway_details, **kwargs): def create_ip_sec_connection(self, create_ip_sec_connection_details, **kwargs): """ - CreateIPSecConnection Creates a new IPSec connection between the specified DRG and CPE. For more information, see `IPSec VPNs`__. @@ -2918,7 +2886,6 @@ def create_ip_sec_connection(self, create_ip_sec_connection_details, **kwargs): def create_ipv6(self, create_ipv6_details, **kwargs): """ - CreateIpv6 Creates an IPv6 for the specified VNIC. @@ -2993,7 +2960,6 @@ def create_ipv6(self, create_ipv6_details, **kwargs): def create_local_peering_gateway(self, create_local_peering_gateway_details, **kwargs): """ - CreateLocalPeeringGateway Creates a new local peering gateway (LPG) for the specified VCN. @@ -3062,7 +3028,6 @@ def create_local_peering_gateway(self, create_local_peering_gateway_details, **k def create_nat_gateway(self, create_nat_gateway_details, **kwargs): """ - CreateNatGateway Creates a new NAT gateway for the specified VCN. You must also set up a route rule with the NAT gateway as the rule's target. See :class:`RouteTable`. @@ -3132,7 +3097,6 @@ def create_nat_gateway(self, create_nat_gateway_details, **kwargs): def create_network_security_group(self, create_network_security_group_details, **kwargs): """ - CreateNetworkSecurityGroup Creates a new network security group for the specified VCN. @@ -3201,7 +3165,6 @@ def create_network_security_group(self, create_network_security_group_details, * def create_private_ip(self, create_private_ip_details, **kwargs): """ - CreatePrivateIp Creates a secondary private IP for the specified VNIC. For more information about secondary private IPs, see `IP Addresses`__. @@ -3274,7 +3237,6 @@ def create_private_ip(self, create_private_ip_details, **kwargs): def create_public_ip(self, create_public_ip_details, **kwargs): """ - CreatePublicIp Creates a public IP. Use the `lifetime` property to specify whether it's an ephemeral or reserved public IP. For information about limits on how many you can create, see `Public IP Addresses`__. @@ -3365,7 +3327,6 @@ def create_public_ip(self, create_public_ip_details, **kwargs): def create_remote_peering_connection(self, create_remote_peering_connection_details, **kwargs): """ - CreateRemotePeeringConnection Creates a new remote peering connection (RPC) for the specified DRG. @@ -3434,7 +3395,6 @@ def create_remote_peering_connection(self, create_remote_peering_connection_deta def create_route_table(self, create_route_table_details, **kwargs): """ - CreateRouteTable Creates a new route table for the specified VCN. In the request you must also include at least one route rule for the new route table. For information on the number of rules you can have in a route table, see `Service Limits`__. For general information about route @@ -3522,7 +3482,6 @@ def create_route_table(self, create_route_table_details, **kwargs): def create_security_list(self, create_security_list_details, **kwargs): """ - CreateSecurityList Creates a new security list for the specified VCN. For more information about security lists, see `Security Lists`__. For information on the number of rules you can have in a security list, see @@ -3609,7 +3568,6 @@ def create_security_list(self, create_security_list_details, **kwargs): def create_service_gateway(self, create_service_gateway_details, **kwargs): """ - CreateServiceGateway Creates a new service gateway in the specified compartment. For the purposes of access control, you must provide the OCID of the compartment where you want @@ -3689,7 +3647,6 @@ def create_service_gateway(self, create_service_gateway_details, **kwargs): def create_subnet(self, create_subnet_details, **kwargs): """ - CreateSubnet Creates a new subnet in the specified VCN. You can't change the size of the subnet after creation, so it's important to think about the size of subnets you need before creating them. For more information, see `VCNs and Subnets`__. @@ -3797,7 +3754,6 @@ def create_subnet(self, create_subnet_details, **kwargs): def create_vcn(self, create_vcn_details, **kwargs): """ - CreateVcn Creates a new virtual cloud network (VCN). For more information, see `VCNs and Subnets`__. @@ -3901,7 +3857,6 @@ def create_vcn(self, create_vcn_details, **kwargs): def create_virtual_circuit(self, create_virtual_circuit_details, **kwargs): """ - CreateVirtualCircuit Creates a new virtual circuit to use with Oracle Cloud Infrastructure FastConnect. For more information, see `FastConnect Overview`__. @@ -3995,7 +3950,6 @@ def create_virtual_circuit(self, create_virtual_circuit_details, **kwargs): def delete_cpe(self, cpe_id, **kwargs): """ - DeleteCpe Deletes the specified CPE object. The CPE must not be connected to a DRG. This is an asynchronous operation. The CPE's `lifecycleState` will change to TERMINATING temporarily until the CPE is completely removed. @@ -4070,7 +4024,6 @@ def delete_cpe(self, cpe_id, **kwargs): def delete_cross_connect(self, cross_connect_id, **kwargs): """ - DeleteCrossConnect Deletes the specified cross-connect. It must not be mapped to a :class:`VirtualCircuit`. @@ -4144,7 +4097,6 @@ def delete_cross_connect(self, cross_connect_id, **kwargs): def delete_cross_connect_group(self, cross_connect_group_id, **kwargs): """ - DeleteCrossConnectGroup Deletes the specified cross-connect group. It must not contain any cross-connects, and it cannot be mapped to a :class:`VirtualCircuit`. @@ -4219,7 +4171,6 @@ def delete_cross_connect_group(self, cross_connect_group_id, **kwargs): def delete_dhcp_options(self, dhcp_id, **kwargs): """ - DeleteDhcpOptions Deletes the specified set of DHCP options, but only if it's not associated with a subnet. You can't delete a VCN's default set of DHCP options. @@ -4296,7 +4247,6 @@ def delete_dhcp_options(self, dhcp_id, **kwargs): def delete_drg(self, drg_id, **kwargs): """ - DeleteDrg Deletes the specified DRG. The DRG must not be attached to a VCN or be connected to your on-premise network. Also, there must not be a route table that lists the DRG as a target. This is an asynchronous operation. The DRG's `lifecycleState` will change to TERMINATING temporarily until the DRG is completely @@ -4372,7 +4322,6 @@ def delete_drg(self, drg_id, **kwargs): def delete_drg_attachment(self, drg_attachment_id, **kwargs): """ - DeleteDrgAttachment Detaches a DRG from a VCN by deleting the corresponding `DrgAttachment`. This is an asynchronous operation. The attachment's `lifecycleState` will change to DETACHING temporarily until the attachment is completely removed. @@ -4447,7 +4396,6 @@ def delete_drg_attachment(self, drg_attachment_id, **kwargs): def delete_internet_gateway(self, ig_id, **kwargs): """ - DeleteInternetGateway Deletes the specified internet gateway. The internet gateway does not have to be disabled, but there must not be a route table that lists it as a target. @@ -4524,7 +4472,6 @@ def delete_internet_gateway(self, ig_id, **kwargs): def delete_ip_sec_connection(self, ipsc_id, **kwargs): """ - DeleteIPSecConnection Deletes the specified IPSec connection. If your goal is to disable the IPSec VPN between your VCN and on-premises network, it's easiest to simply detach the DRG but keep all the IPSec VPN components intact. If you were to delete all the components and then later need to create an IPSec VPN again, you would @@ -4604,7 +4551,6 @@ def delete_ip_sec_connection(self, ipsc_id, **kwargs): def delete_ipv6(self, ipv6_id, **kwargs): """ - DeleteIpv6 Unassigns and deletes the specified IPv6. You must specify the object's OCID. The IPv6 address is returned to the subnet's pool of available addresses. @@ -4686,7 +4632,6 @@ def delete_ipv6(self, ipv6_id, **kwargs): def delete_local_peering_gateway(self, local_peering_gateway_id, **kwargs): """ - DeleteLocalPeeringGateway Deletes the specified local peering gateway (LPG). This is an asynchronous operation; the local peering gateway's `lifecycleState` changes to TERMINATING temporarily @@ -4762,7 +4707,6 @@ def delete_local_peering_gateway(self, local_peering_gateway_id, **kwargs): def delete_nat_gateway(self, nat_gateway_id, **kwargs): """ - DeleteNatGateway Deletes the specified NAT gateway. The NAT gateway does not have to be disabled, but there must not be a route rule that lists the NAT gateway as a target. @@ -4841,7 +4785,6 @@ def delete_nat_gateway(self, nat_gateway_id, **kwargs): def delete_network_security_group(self, network_security_group_id, **kwargs): """ - DeleteNetworkSecurityGroup Deletes the specified network security group. The group must not contain any VNICs. To get a list of the VNICs in a network security group, use @@ -4922,7 +4865,6 @@ def delete_network_security_group(self, network_security_group_id, **kwargs): def delete_private_ip(self, private_ip_id, **kwargs): """ - DeletePrivateIp Unassigns and deletes the specified private IP. You must specify the object's OCID. The private IP address is returned to the subnet's pool of available addresses. @@ -5007,7 +4949,6 @@ def delete_private_ip(self, private_ip_id, **kwargs): def delete_public_ip(self, public_ip_id, **kwargs): """ - DeletePublicIp Unassigns and deletes the specified public IP (either ephemeral or reserved). You must specify the object's OCID. The public IP address is returned to the Oracle Cloud Infrastructure public IP pool. @@ -5094,7 +5035,6 @@ def delete_public_ip(self, public_ip_id, **kwargs): def delete_remote_peering_connection(self, remote_peering_connection_id, **kwargs): """ - DeleteRemotePeeringConnection Deletes the remote peering connection (RPC). This is an asynchronous operation; the RPC's `lifecycleState` changes to TERMINATING temporarily @@ -5170,7 +5110,6 @@ def delete_remote_peering_connection(self, remote_peering_connection_id, **kwarg def delete_route_table(self, rt_id, **kwargs): """ - DeleteRouteTable Deletes the specified route table, but only if it's not associated with a subnet. You can't delete a VCN's default route table. @@ -5247,7 +5186,6 @@ def delete_route_table(self, rt_id, **kwargs): def delete_security_list(self, security_list_id, **kwargs): """ - DeleteSecurityList Deletes the specified security list, but only if it's not associated with a subnet. You can't delete a VCN's default security list. @@ -5324,7 +5262,6 @@ def delete_security_list(self, security_list_id, **kwargs): def delete_service_gateway(self, service_gateway_id, **kwargs): """ - DeleteServiceGateway Deletes the specified service gateway. There must not be a route table that lists the service gateway as a target. @@ -5400,7 +5337,6 @@ def delete_service_gateway(self, service_gateway_id, **kwargs): def delete_subnet(self, subnet_id, **kwargs): """ - DeleteSubnet Deletes the specified subnet, but only if there are no instances in the subnet. This is an asynchronous operation. The subnet's `lifecycleState` will change to TERMINATING temporarily. If there are any instances in the subnet, the state will instead change back to AVAILABLE. @@ -5475,7 +5411,6 @@ def delete_subnet(self, subnet_id, **kwargs): def delete_vcn(self, vcn_id, **kwargs): """ - DeleteVcn Deletes the specified VCN. The VCN must be empty and have no attached gateways. This is an asynchronous operation. The VCN's `lifecycleState` will change to TERMINATING temporarily until the VCN is completely removed. @@ -5552,7 +5487,6 @@ def delete_vcn(self, vcn_id, **kwargs): def delete_virtual_circuit(self, virtual_circuit_id, **kwargs): """ - DeleteVirtualCircuit Deletes the specified virtual circuit. **Important:** If you're using FastConnect via a provider, @@ -5629,7 +5563,6 @@ def delete_virtual_circuit(self, virtual_circuit_id, **kwargs): def detach_service_id(self, service_gateway_id, detach_service_details, **kwargs): """ - DetachService Removes the specified :class:`Service` from the list of enabled `Service` objects for the specified gateway. You do not need to remove any route rules that specify this `Service` object's `cidrBlock` as the destination CIDR. However, consider @@ -5722,7 +5655,6 @@ def detach_service_id(self, service_gateway_id, detach_service_details, **kwargs def get_cpe(self, cpe_id, **kwargs): """ - GetCpe Gets the specified CPE's information. @@ -5786,7 +5718,6 @@ def get_cpe(self, cpe_id, **kwargs): def get_cpe_device_config_content(self, cpe_id, **kwargs): """ - GetCpeDeviceConfigContent Renders a set of CPE configuration content that can help a network engineer configure the actual CPE device (for example, a hardware router) represented by the specified :class:`Cpe` object. @@ -5877,7 +5808,6 @@ def get_cpe_device_config_content(self, cpe_id, **kwargs): def get_cpe_device_shape(self, cpe_device_shape_id, **kwargs): """ - GetCpeDeviceShape Gets the detailed information about the specified CPE device type. This might include a set of questions that are specific to the particular CPE device type. The customer must supply answers to those questions (see :func:`update_tunnel_cpe_device_config`). @@ -5961,7 +5891,6 @@ def get_cpe_device_shape(self, cpe_device_shape_id, **kwargs): def get_cross_connect(self, cross_connect_id, **kwargs): """ - GetCrossConnect Gets the specified cross-connect's information. @@ -6025,7 +5954,6 @@ def get_cross_connect(self, cross_connect_id, **kwargs): def get_cross_connect_group(self, cross_connect_group_id, **kwargs): """ - GetCrossConnectGroups Gets the specified cross-connect group's information. @@ -6089,7 +6017,6 @@ def get_cross_connect_group(self, cross_connect_group_id, **kwargs): def get_cross_connect_letter_of_authority(self, cross_connect_id, **kwargs): """ - GetCrossConnectLetterOfAuthority Gets the Letter of Authority for the specified cross-connect. @@ -6153,7 +6080,6 @@ def get_cross_connect_letter_of_authority(self, cross_connect_id, **kwargs): def get_cross_connect_status(self, cross_connect_id, **kwargs): """ - GetCrossConnectStatus Gets the status of the specified cross-connect. @@ -6217,7 +6143,6 @@ def get_cross_connect_status(self, cross_connect_id, **kwargs): def get_dhcp_options(self, dhcp_id, **kwargs): """ - GetDhcpOptions Gets the specified set of DHCP options. @@ -6281,7 +6206,6 @@ def get_dhcp_options(self, dhcp_id, **kwargs): def get_drg(self, drg_id, **kwargs): """ - GetDrg Gets the specified DRG's information. @@ -6345,7 +6269,6 @@ def get_drg(self, drg_id, **kwargs): def get_drg_attachment(self, drg_attachment_id, **kwargs): """ - GetDrgAttachment Gets the information for the specified `DrgAttachment`. @@ -6409,7 +6332,6 @@ def get_drg_attachment(self, drg_attachment_id, **kwargs): def get_drg_redundancy_status(self, drg_id, **kwargs): """ - GetDrgRedundancyStatus Gets the redundancy status for the specified DRG. For more information, see `Redundancy Remedies`__. @@ -6486,7 +6408,6 @@ def get_drg_redundancy_status(self, drg_id, **kwargs): def get_fast_connect_provider_service(self, provider_service_id, **kwargs): """ - GetFastConnectProviderService Gets the specified provider service. For more information, see `FastConnect Overview`__. @@ -6553,7 +6474,6 @@ def get_fast_connect_provider_service(self, provider_service_id, **kwargs): def get_fast_connect_provider_service_key(self, provider_service_id, provider_service_key_name, **kwargs): """ - GetFastConnectProviderServiceKey Gets the specified provider service key's information. Use this operation to validate a provider service key. An invalid key returns a 404 error. @@ -6625,7 +6545,6 @@ def get_fast_connect_provider_service_key(self, provider_service_id, provider_se def get_internet_gateway(self, ig_id, **kwargs): """ - GetInternetGateway Gets the specified internet gateway's information. @@ -6689,7 +6608,6 @@ def get_internet_gateway(self, ig_id, **kwargs): def get_ip_sec_connection(self, ipsc_id, **kwargs): """ - GetIPSecConnection Gets the specified IPSec connection's basic information, including the static routes for the on-premises router. If you want the status of the connection (whether it's up or down), use :func:`get_ip_sec_connection_tunnel`. @@ -6755,7 +6673,6 @@ def get_ip_sec_connection(self, ipsc_id, **kwargs): def get_ip_sec_connection_device_config(self, ipsc_id, **kwargs): """ - GetIPSecConnectionDeviceConfig Deprecated. To get tunnel information, instead use: * :func:`get_ip_sec_connection_tunnel` @@ -6822,7 +6739,6 @@ def get_ip_sec_connection_device_config(self, ipsc_id, **kwargs): def get_ip_sec_connection_device_status(self, ipsc_id, **kwargs): """ - GetIPSecConnectionDeviceStatus Deprecated. To get the tunnel status, instead use :func:`get_ip_sec_connection_tunnel`. @@ -6887,7 +6803,6 @@ def get_ip_sec_connection_device_status(self, ipsc_id, **kwargs): def get_ip_sec_connection_tunnel(self, ipsc_id, tunnel_id, **kwargs): """ - GetIPSecConnectionTunnel Gets the specified tunnel's information. The resulting object does not include the tunnel's shared secret (pre-shared key). To retrieve that, use :func:`get_ip_sec_connection_tunnel_shared_secret`. @@ -6959,7 +6874,6 @@ def get_ip_sec_connection_tunnel(self, ipsc_id, tunnel_id, **kwargs): def get_ip_sec_connection_tunnel_shared_secret(self, ipsc_id, tunnel_id, **kwargs): """ - GetIPSecConnectionTunnelSharedSecret Gets the specified tunnel's shared secret (pre-shared key). To get other information about the tunnel, use :func:`get_ip_sec_connection_tunnel`. @@ -7030,7 +6944,6 @@ def get_ip_sec_connection_tunnel_shared_secret(self, ipsc_id, tunnel_id, **kwarg def get_ipsec_cpe_device_config_content(self, ipsc_id, **kwargs): """ - GetIpsecCpeDeviceConfigContent Renders a set of CPE configuration content for the specified IPSec connection (for all the tunnels in the connection). The content helps a network engineer configure the actual CPE device (for example, a hardware router) that the specified IPSec connection terminates on. @@ -7122,7 +7035,6 @@ def get_ipsec_cpe_device_config_content(self, ipsc_id, **kwargs): def get_ipv6(self, ipv6_id, **kwargs): """ - GetIpv6 Gets the specified IPv6. You must specify the object's OCID. Alternatively, you can get the object by using :func:`list_ipv6s` @@ -7201,7 +7113,6 @@ def get_ipv6(self, ipv6_id, **kwargs): def get_local_peering_gateway(self, local_peering_gateway_id, **kwargs): """ - GetLocalPeeringGateway Gets the specified local peering gateway's information. @@ -7265,7 +7176,6 @@ def get_local_peering_gateway(self, local_peering_gateway_id, **kwargs): def get_nat_gateway(self, nat_gateway_id, **kwargs): """ - GetNatGateway Gets the specified NAT gateway's information. @@ -7331,7 +7241,6 @@ def get_nat_gateway(self, nat_gateway_id, **kwargs): def get_network_security_group(self, network_security_group_id, **kwargs): """ - GetNetworkSecurityGroup Gets the specified network security group's information. To list the VNICs in an NSG, see @@ -7403,7 +7312,6 @@ def get_network_security_group(self, network_security_group_id, **kwargs): def get_private_ip(self, private_ip_id, **kwargs): """ - GetPrivateIp Gets the specified private IP. You must specify the object's OCID. Alternatively, you can get the object by using :func:`list_private_ips` @@ -7470,7 +7378,6 @@ def get_private_ip(self, private_ip_id, **kwargs): def get_public_ip(self, public_ip_id, **kwargs): """ - GetPublicIp Gets the specified public IP. You must specify the object's OCID. Alternatively, you can get the object by using :func:`get_public_ip_by_ip_address` @@ -7544,7 +7451,6 @@ def get_public_ip(self, public_ip_id, **kwargs): def get_public_ip_by_ip_address(self, get_public_ip_by_ip_address_details, **kwargs): """ - GetPublicIpByIpAddress Gets the public IP based on the public IP address (for example, 129.146.2.1). **Note:** If you're fetching a reserved public IP that is in the process of being @@ -7602,7 +7508,6 @@ def get_public_ip_by_ip_address(self, get_public_ip_by_ip_address_details, **kwa def get_public_ip_by_private_ip_id(self, get_public_ip_by_private_ip_id_details, **kwargs): """ - GetPublicIpByPrivateIpId Gets the public IP assigned to the specified private IP. You must specify the OCID of the private IP. If no public IP is assigned, a 404 is returned. @@ -7666,7 +7571,6 @@ def get_public_ip_by_private_ip_id(self, get_public_ip_by_private_ip_id_details, def get_remote_peering_connection(self, remote_peering_connection_id, **kwargs): """ - GetRemotePeeringConnection Get the specified remote peering connection's information. @@ -7730,7 +7634,6 @@ def get_remote_peering_connection(self, remote_peering_connection_id, **kwargs): def get_route_table(self, rt_id, **kwargs): """ - GetRouteTable Gets the specified route table's information. @@ -7794,7 +7697,6 @@ def get_route_table(self, rt_id, **kwargs): def get_security_list(self, security_list_id, **kwargs): """ - GetSecurityList Gets the specified security list's information. @@ -7858,7 +7760,6 @@ def get_security_list(self, security_list_id, **kwargs): def get_service(self, service_id, **kwargs): """ - GetService Gets the specified :class:`Service` object. @@ -7924,7 +7825,6 @@ def get_service(self, service_id, **kwargs): def get_service_gateway(self, service_gateway_id, **kwargs): """ - GetServiceGateway Gets the specified service gateway's information. @@ -7990,7 +7890,6 @@ def get_service_gateway(self, service_gateway_id, **kwargs): def get_subnet(self, subnet_id, **kwargs): """ - GetSubnet Gets the specified subnet's information. @@ -8054,7 +7953,6 @@ def get_subnet(self, subnet_id, **kwargs): def get_tunnel_cpe_device_config(self, ipsc_id, tunnel_id, **kwargs): """ - GetTunnelCpeDeviceConfig Gets the set of CPE configuration answers for the tunnel, which the customer provided in :func:`update_tunnel_cpe_device_config`. To get the full set of content for the tunnel (any answers merged with the template of other @@ -8138,7 +8036,6 @@ def get_tunnel_cpe_device_config(self, ipsc_id, tunnel_id, **kwargs): def get_tunnel_cpe_device_config_content(self, ipsc_id, tunnel_id, **kwargs): """ - GetTunnelCpeDeviceConfigContent Renders a set of CPE configuration content for the specified IPSec tunnel. The content helps a network engineer configure the actual CPE device (for example, a hardware router) that the specified IPSec tunnel terminates on. @@ -8235,7 +8132,6 @@ def get_tunnel_cpe_device_config_content(self, ipsc_id, tunnel_id, **kwargs): def get_vcn(self, vcn_id, **kwargs): """ - GetVcn Gets the specified VCN's information. @@ -8301,7 +8197,6 @@ def get_vcn(self, vcn_id, **kwargs): def get_virtual_circuit(self, virtual_circuit_id, **kwargs): """ - GetVirtualCircuit Gets the specified virtual circuit's information. @@ -8365,7 +8260,6 @@ def get_virtual_circuit(self, virtual_circuit_id, **kwargs): def get_vnic(self, vnic_id, **kwargs): """ - GetVnic Gets the information for the specified virtual network interface card (VNIC). You can get the VNIC OCID from the :func:`list_vnic_attachments` @@ -8432,7 +8326,6 @@ def get_vnic(self, vnic_id, **kwargs): def list_allowed_peer_regions_for_remote_peering(self, **kwargs): """ - ListAllowedPeerRegionsForRemotePeering Lists the regions that support remote VCN peering (which is peering across regions). For more information, see `VCN Peering`__. @@ -8484,7 +8377,6 @@ def list_allowed_peer_regions_for_remote_peering(self, **kwargs): def list_cpe_device_shapes(self, **kwargs): """ - ListCpeDeviceShapes Lists the CPE device types that the Networking service provides CPE configuration content for (example: Cisco ASA). The content helps a network engineer configure the actual CPE device represented by a :class:`Cpe` object. @@ -8581,7 +8473,6 @@ def list_cpe_device_shapes(self, **kwargs): def list_cpes(self, compartment_id, **kwargs): """ - ListCpes Lists the customer-premises equipment objects (CPEs) in the specified compartment. @@ -8665,7 +8556,6 @@ def list_cpes(self, compartment_id, **kwargs): def list_cross_connect_groups(self, compartment_id, **kwargs): """ - ListCrossConnectGroups Lists the cross-connect groups in the specified compartment. @@ -8804,7 +8694,6 @@ def list_cross_connect_groups(self, compartment_id, **kwargs): def list_cross_connect_locations(self, compartment_id, **kwargs): """ - ListCrossConnectLocations Lists the available FastConnect locations for cross-connect installation. You need this information so you can specify your desired location when you create a cross-connect. @@ -8889,7 +8778,6 @@ def list_cross_connect_locations(self, compartment_id, **kwargs): def list_cross_connects(self, compartment_id, **kwargs): """ - ListCrossConnects Lists the cross-connects in the specified compartment. You can filter the list by specifying the OCID of a cross-connect group. @@ -9034,7 +8922,6 @@ def list_cross_connects(self, compartment_id, **kwargs): def list_crossconnect_port_speed_shapes(self, compartment_id, **kwargs): """ - ListCrossConnectPortSpeedShapes Lists the available port speeds for cross-connects. You need this information so you can specify your desired port speed (that is, shape) when you create a cross-connect. @@ -9120,7 +9007,6 @@ def list_crossconnect_port_speed_shapes(self, compartment_id, **kwargs): def list_dhcp_options(self, compartment_id, vcn_id, **kwargs): """ - ListDhcpOptions Lists the sets of DHCP options in the specified VCN and specified compartment. The response includes the default set of options that automatically comes with each VCN, plus any other sets you've created. @@ -9267,7 +9153,6 @@ def list_dhcp_options(self, compartment_id, vcn_id, **kwargs): def list_drg_attachments(self, compartment_id, **kwargs): """ - ListDrgAttachments Lists the `DrgAttachment` objects for the specified compartment. You can filter the results by VCN or DRG. @@ -9364,7 +9249,6 @@ def list_drg_attachments(self, compartment_id, **kwargs): def list_drgs(self, compartment_id, **kwargs): """ - ListDrgs Lists the DRGs in the specified compartment. @@ -9448,7 +9332,6 @@ def list_drgs(self, compartment_id, **kwargs): def list_fast_connect_provider_services(self, compartment_id, **kwargs): """ - ListFastConnectProviderServices Lists the service offerings from supported providers. You need this information so you can specify your desired provider and service offering when you create a virtual circuit. @@ -9540,7 +9423,6 @@ def list_fast_connect_provider_services(self, compartment_id, **kwargs): def list_fast_connect_provider_virtual_circuit_bandwidth_shapes(self, provider_service_id, **kwargs): """ - ListFastConnectProviderVirtualCircuitBandwidthShapes Gets the list of available virtual circuit bandwidth levels for a provider. You need this information so you can specify your desired bandwidth level (shape) when you create a virtual circuit. @@ -9638,7 +9520,6 @@ def list_fast_connect_provider_virtual_circuit_bandwidth_shapes(self, provider_s def list_internet_gateways(self, compartment_id, vcn_id, **kwargs): """ - ListInternetGateways Lists the internet gateways in the specified VCN and the specified compartment. @@ -9783,7 +9664,6 @@ def list_internet_gateways(self, compartment_id, vcn_id, **kwargs): def list_ip_sec_connection_tunnels(self, ipsc_id, **kwargs): """ - ListIPSecConnectionTunnels Lists the tunnel information for the specified IPSec connection. @@ -9876,7 +9756,6 @@ def list_ip_sec_connection_tunnels(self, ipsc_id, **kwargs): def list_ip_sec_connections(self, compartment_id, **kwargs): """ - ListIPSecConnections Lists the IPSec connections for the specified compartment. You can filter the results by DRG or CPE. @@ -9971,7 +9850,6 @@ def list_ip_sec_connections(self, compartment_id, **kwargs): def list_ipv6s(self, **kwargs): """ - ListIpv6s Lists the :class:`Ipv6` objects based on one of these filters: @@ -10079,7 +9957,6 @@ def list_ipv6s(self, **kwargs): def list_local_peering_gateways(self, compartment_id, vcn_id, **kwargs): """ - ListLocalPeeringGateways Lists the local peering gateways (LPGs) for the specified VCN and compartment (the LPG's compartment). @@ -10170,7 +10047,6 @@ def list_local_peering_gateways(self, compartment_id, vcn_id, **kwargs): def list_nat_gateways(self, compartment_id, **kwargs): """ - ListNatGateways Lists the NAT gateways in the specified compartment. You may optionally specify a VCN OCID to filter the results by VCN. @@ -10317,7 +10193,6 @@ def list_nat_gateways(self, compartment_id, **kwargs): def list_network_security_group_security_rules(self, network_security_group_id, **kwargs): """ - ListNetworkSecurityGroupSecurityRules Lists the security rules in the specified network security group. @@ -10456,7 +10331,6 @@ def list_network_security_group_security_rules(self, network_security_group_id, def list_network_security_group_vnics(self, network_security_group_id, **kwargs): """ - ListNetworkSecurityGroupVnics Lists the VNICs in the specified network security group. @@ -10580,7 +10454,6 @@ def list_network_security_group_vnics(self, network_security_group_id, **kwargs) def list_network_security_groups(self, compartment_id, **kwargs): """ - ListNetworkSecurityGroups Lists the network security groups in the specified compartment. @@ -10726,7 +10599,6 @@ def list_network_security_groups(self, compartment_id, **kwargs): def list_private_ips(self, **kwargs): """ - ListPrivateIps Lists the :class:`PrivateIp` objects based on one of these filters: @@ -10832,7 +10704,6 @@ def list_private_ips(self, **kwargs): def list_public_ips(self, scope, compartment_id, **kwargs): """ - ListPublicIps Lists the :class:`PublicIp` objects in the specified compartment. You can filter the list by using query parameters. @@ -10977,7 +10848,6 @@ def list_public_ips(self, scope, compartment_id, **kwargs): def list_remote_peering_connections(self, compartment_id, **kwargs): """ - ListRemotePeeringConnections Lists the remote peering connections (RPCs) for the specified DRG and compartment (the RPC's compartment). @@ -11067,7 +10937,6 @@ def list_remote_peering_connections(self, compartment_id, **kwargs): def list_route_tables(self, compartment_id, vcn_id, **kwargs): """ - ListRouteTables Lists the route tables in the specified VCN and specified compartment. The response includes the default route table that automatically comes with each VCN, plus any route tables you've created. @@ -11214,7 +11083,6 @@ def list_route_tables(self, compartment_id, vcn_id, **kwargs): def list_security_lists(self, compartment_id, vcn_id, **kwargs): """ - ListSecurityLists Lists the security lists in the specified VCN and compartment. @@ -11359,7 +11227,6 @@ def list_security_lists(self, compartment_id, vcn_id, **kwargs): def list_service_gateways(self, compartment_id, **kwargs): """ - ListServiceGateways Lists the service gateways in the specified compartment. You may optionally specify a VCN OCID to filter the results by VCN. @@ -11501,7 +11368,6 @@ def list_service_gateways(self, compartment_id, **kwargs): def list_services(self, **kwargs): """ - ListServices Lists the available :class:`Service` objects that you can enable for a service gateway in this region. @@ -11580,7 +11446,6 @@ def list_services(self, **kwargs): def list_subnets(self, compartment_id, vcn_id, **kwargs): """ - ListSubnets Lists the subnets in the specified VCN and the specified compartment. @@ -11725,7 +11590,6 @@ def list_subnets(self, compartment_id, vcn_id, **kwargs): def list_vcns(self, compartment_id, **kwargs): """ - ListVcns Lists the virtual cloud networks (VCNs) in the specified compartment. @@ -11864,7 +11728,6 @@ def list_vcns(self, compartment_id, **kwargs): def list_virtual_circuit_bandwidth_shapes(self, compartment_id, **kwargs): """ - ListVirtualCircuitBandwidthShapes The deprecated operation lists available bandwidth levels for virtual circuits. For the compartment ID, provide the OCID of your tenancy (the root compartment). @@ -11948,7 +11811,6 @@ def list_virtual_circuit_bandwidth_shapes(self, compartment_id, **kwargs): def list_virtual_circuit_public_prefixes(self, virtual_circuit_id, **kwargs): """ - ListVirtualCircuitPublicPrefixes Lists the public IP prefixes and their details for the specified public virtual circuit. @@ -12037,7 +11899,6 @@ def list_virtual_circuit_public_prefixes(self, virtual_circuit_id, **kwargs): def list_virtual_circuits(self, compartment_id, **kwargs): """ - ListVirtualCircuits Lists the virtual circuits in the specified compartment. @@ -12176,7 +12037,6 @@ def list_virtual_circuits(self, compartment_id, **kwargs): def remove_network_security_group_security_rules(self, network_security_group_id, remove_network_security_group_security_rules_details, **kwargs): """ - RemoveNetworkSecurityGroupSecurityRules Removes one or more security rules from the specified network security group. @@ -12246,7 +12106,6 @@ def remove_network_security_group_security_rules(self, network_security_group_id def update_cpe(self, cpe_id, update_cpe_details, **kwargs): """ - UpdateCpe Updates the specified CPE's display name or tags. Avoid entering confidential information. @@ -12327,7 +12186,6 @@ def update_cpe(self, cpe_id, update_cpe_details, **kwargs): def update_cross_connect(self, cross_connect_id, update_cross_connect_details, **kwargs): """ - UpdateCrossConnect Updates the specified cross-connect. @@ -12407,7 +12265,6 @@ def update_cross_connect(self, cross_connect_id, update_cross_connect_details, * def update_cross_connect_group(self, cross_connect_group_id, update_cross_connect_group_details, **kwargs): """ - UpdateCrossConnectGroup Updates the specified cross-connect group's display name. Avoid entering confidential information. @@ -12488,7 +12345,6 @@ def update_cross_connect_group(self, cross_connect_group_id, update_cross_connec def update_dhcp_options(self, dhcp_id, update_dhcp_details, **kwargs): """ - UpdateDhcpOptions Updates the specified set of DHCP options. You can update the display name or the options themselves. Avoid entering confidential information. @@ -12571,7 +12427,6 @@ def update_dhcp_options(self, dhcp_id, update_dhcp_details, **kwargs): def update_drg(self, drg_id, update_drg_details, **kwargs): """ - UpdateDrg Updates the specified DRG's display name or tags. Avoid entering confidential information. @@ -12651,7 +12506,6 @@ def update_drg(self, drg_id, update_drg_details, **kwargs): def update_drg_attachment(self, drg_attachment_id, update_drg_attachment_details, **kwargs): """ - UpdateDrgAttachment Updates the display name for the specified `DrgAttachment`. Avoid entering confidential information. @@ -12732,7 +12586,6 @@ def update_drg_attachment(self, drg_attachment_id, update_drg_attachment_details def update_internet_gateway(self, ig_id, update_internet_gateway_details, **kwargs): """ - UpdateInternetGateway Updates the specified internet gateway. You can disable/enable it, or change its display name or tags. Avoid entering confidential information. @@ -12816,7 +12669,6 @@ def update_internet_gateway(self, ig_id, update_internet_gateway_details, **kwar def update_ip_sec_connection(self, ipsc_id, update_ip_sec_connection_details, **kwargs): """ - UpdateIPSecConnection Updates the specified IPSec connection. To update an individual IPSec tunnel's attributes, use @@ -12899,7 +12751,6 @@ def update_ip_sec_connection(self, ipsc_id, update_ip_sec_connection_details, ** def update_ip_sec_connection_tunnel(self, ipsc_id, tunnel_id, update_ip_sec_connection_tunnel_details, **kwargs): """ - UpdateIPSecConnectionTunnelDetails Updates the specified tunnel. This operation lets you change tunnel attributes such as the routing type (BGP dynamic routing or static routing). Here are some important notes: @@ -13002,7 +12853,6 @@ def update_ip_sec_connection_tunnel(self, ipsc_id, tunnel_id, update_ip_sec_conn def update_ip_sec_connection_tunnel_shared_secret(self, ipsc_id, tunnel_id, update_ip_sec_connection_tunnel_shared_secret_details, **kwargs): """ - UpdateIPSecConnectionTunnelSharedSecret Updates the shared secret (pre-shared key) for the specified tunnel. **Important:** If you change the shared secret, the tunnel will go down while it's reprovisioned. @@ -13090,7 +12940,6 @@ def update_ip_sec_connection_tunnel_shared_secret(self, ipsc_id, tunnel_id, upda def update_ipv6(self, ipv6_id, update_ipv6_details, **kwargs): """ - UpdateIpv6 Updates the specified IPv6. You must specify the object's OCID. Use this operation if you want to: @@ -13184,7 +13033,6 @@ def update_ipv6(self, ipv6_id, update_ipv6_details, **kwargs): def update_local_peering_gateway(self, local_peering_gateway_id, update_local_peering_gateway_details, **kwargs): """ - UpdateLocalPeeringGateway Updates the specified local peering gateway (LPG). @@ -13264,7 +13112,6 @@ def update_local_peering_gateway(self, local_peering_gateway_id, update_local_pe def update_nat_gateway(self, nat_gateway_id, update_nat_gateway_details, **kwargs): """ - UpdateNatGateway Updates the specified NAT gateway. @@ -13346,7 +13193,6 @@ def update_nat_gateway(self, nat_gateway_id, update_nat_gateway_details, **kwarg def update_network_security_group(self, network_security_group_id, update_network_security_group_details, **kwargs): """ - UpdateNetworkSecurityGroup Updates the specified network security group. To add or remove an existing VNIC from the group, use @@ -13442,7 +13288,6 @@ def update_network_security_group(self, network_security_group_id, update_networ def update_network_security_group_security_rules(self, network_security_group_id, update_network_security_group_security_rules_details, **kwargs): """ - UpdateNetworkSecurityGroupSecurityRules Updates one or more security rules in the specified network security group. @@ -13514,7 +13359,6 @@ def update_network_security_group_security_rules(self, network_security_group_id def update_private_ip(self, private_ip_id, update_private_ip_details, **kwargs): """ - UpdatePrivateIp Updates the specified private IP. You must specify the object's OCID. Use this operation if you want to: @@ -13603,7 +13447,6 @@ def update_private_ip(self, private_ip_id, update_private_ip_details, **kwargs): def update_public_ip(self, public_ip_id, update_public_ip_details, **kwargs): """ - UpdatePublicIp Updates the specified public IP. You must specify the object's OCID. Use this operation if you want to: * Assign a reserved public IP in your pool to a private IP. @@ -13723,7 +13566,6 @@ def update_public_ip(self, public_ip_id, update_public_ip_details, **kwargs): def update_remote_peering_connection(self, remote_peering_connection_id, update_remote_peering_connection_details, **kwargs): """ - UpdateRemotePeeringConnection Updates the specified remote peering connection (RPC). @@ -13803,7 +13645,6 @@ def update_remote_peering_connection(self, remote_peering_connection_id, update_ def update_route_table(self, rt_id, update_route_table_details, **kwargs): """ - UpdateRouteTable Updates the specified route table's display name or route rules. Avoid entering confidential information. @@ -13886,7 +13727,6 @@ def update_route_table(self, rt_id, update_route_table_details, **kwargs): def update_security_list(self, security_list_id, update_security_list_details, **kwargs): """ - UpdateSecurityList Updates the specified security list's display name or rules. Avoid entering confidential information. @@ -13970,7 +13810,6 @@ def update_security_list(self, security_list_id, update_security_list_details, * def update_service_gateway(self, service_gateway_id, update_service_gateway_details, **kwargs): """ - UpdateServiceGateway Updates the specified service gateway. The information you provide overwrites the existing attributes of the gateway. @@ -14053,7 +13892,6 @@ def update_service_gateway(self, service_gateway_id, update_service_gateway_deta def update_subnet(self, subnet_id, update_subnet_details, **kwargs): """ - UpdateSubnet Updates the specified subnet. @@ -14133,7 +13971,6 @@ def update_subnet(self, subnet_id, update_subnet_details, **kwargs): def update_tunnel_cpe_device_config(self, ipsc_id, tunnel_id, update_tunnel_cpe_device_config_details, **kwargs): """ - UpdateTunnelCpeDeviceConfig Creates or updates the set of CPE configuration answers for the specified tunnel. The answers correlate to the questions that are specific to the CPE device type (see the `parameters` attribute of :class:`CpeDeviceShapeDetail`). @@ -14238,7 +14075,6 @@ def update_tunnel_cpe_device_config(self, ipsc_id, tunnel_id, update_tunnel_cpe_ def update_vcn(self, vcn_id, update_vcn_details, **kwargs): """ - UpdateVcn Updates the specified VCN. @@ -14320,7 +14156,6 @@ def update_vcn(self, vcn_id, update_vcn_details, **kwargs): def update_virtual_circuit(self, virtual_circuit_id, update_virtual_circuit_details, **kwargs): """ - UpdateVirtualCircuit Updates the specified virtual circuit. This can be called by either the customer who owns the virtual circuit, or the provider (when provisioning or de-provisioning the virtual @@ -14425,7 +14260,6 @@ def update_virtual_circuit(self, virtual_circuit_id, update_virtual_circuit_deta def update_vnic(self, vnic_id, update_vnic_details, **kwargs): """ - UpdateVnic Updates the specified VNIC. diff --git a/src/oci/data_catalog/data_catalog_client.py b/src/oci/data_catalog/data_catalog_client.py index 04f038255f..80c5b4d5b2 100644 --- a/src/oci/data_catalog/data_catalog_client.py +++ b/src/oci/data_catalog/data_catalog_client.py @@ -83,7 +83,6 @@ def __init__(self, config, **kwargs): def change_catalog_compartment(self, change_catalog_compartment_details, catalog_id, **kwargs): """ Moves a resource into a different compartment. When provided, 'If-Match' is checked against 'ETag' values of the resource. - Moves a resource into a different compartment. When provided, 'If-Match' is checked against 'ETag' values of the resource. :param ChangeCatalogCompartmentDetails change_catalog_compartment_details: (required) @@ -167,7 +166,6 @@ def change_catalog_compartment(self, change_catalog_compartment_details, catalog def create_attribute(self, catalog_id, data_asset_key, entity_key, create_attribute_details, **kwargs): """ - Create a new entity attribute. Creates a new entity attribute. @@ -264,7 +262,6 @@ def create_attribute(self, catalog_id, data_asset_key, entity_key, create_attrib def create_attribute_tag(self, catalog_id, data_asset_key, entity_key, attribute_key, create_attribute_tag_details, **kwargs): """ - Create a new entity attribute tag. Creates a new entity attribute tag. @@ -365,7 +362,6 @@ def create_attribute_tag(self, catalog_id, data_asset_key, entity_key, attribute def create_catalog(self, create_catalog_details, **kwargs): """ - Creates a new data catalog. Creates a new data catalog instance that includes a console and an API URL for managing metadata operations. For more information, please see the documentation. @@ -438,7 +434,6 @@ def create_catalog(self, create_catalog_details, **kwargs): def create_connection(self, catalog_id, data_asset_key, create_connection_details, **kwargs): """ - Create a new connection. Creates a new connection. @@ -532,7 +527,6 @@ def create_connection(self, catalog_id, data_asset_key, create_connection_detail def create_data_asset(self, catalog_id, create_data_asset_details, **kwargs): """ Create a new data asset. - Create a new data asset. :param str catalog_id: (required) @@ -620,7 +614,6 @@ def create_data_asset(self, catalog_id, create_data_asset_details, **kwargs): def create_data_asset_tag(self, catalog_id, data_asset_key, create_data_asset_tag_details, **kwargs): """ - Create a new data asset tag. Creates a new data asset tag. @@ -713,7 +706,6 @@ def create_data_asset_tag(self, catalog_id, data_asset_key, create_data_asset_ta def create_entity(self, catalog_id, data_asset_key, create_entity_details, **kwargs): """ - Create a new data entity. Creates a new data entity. @@ -806,7 +798,6 @@ def create_entity(self, catalog_id, data_asset_key, create_entity_details, **kwa def create_entity_tag(self, catalog_id, data_asset_key, entity_key, create_entity_tag_details, **kwargs): """ - Create a new entity tag. Creates a new entity tag. @@ -903,7 +894,6 @@ def create_entity_tag(self, catalog_id, data_asset_key, entity_key, create_entit def create_folder(self, catalog_id, data_asset_key, create_folder_details, **kwargs): """ - Create a new folder. Creates a new folder. @@ -996,7 +986,6 @@ def create_folder(self, catalog_id, data_asset_key, create_folder_details, **kwa def create_folder_tag(self, catalog_id, data_asset_key, folder_key, create_folder_tag_details, **kwargs): """ - Create a new folder tag. Creates a new folder tag. @@ -1093,7 +1082,6 @@ def create_folder_tag(self, catalog_id, data_asset_key, folder_key, create_folde def create_glossary(self, catalog_id, create_glossary_details, **kwargs): """ - Create a new glossary. Creates a new glossary. @@ -1182,7 +1170,6 @@ def create_glossary(self, catalog_id, create_glossary_details, **kwargs): def create_job(self, catalog_id, create_job_details, **kwargs): """ - Create a new job. Creates a new job. @@ -1271,7 +1258,6 @@ def create_job(self, catalog_id, create_job_details, **kwargs): def create_job_definition(self, catalog_id, create_job_definition_details, **kwargs): """ - Create a new job definition. Creates a new job definition. @@ -1360,7 +1346,6 @@ def create_job_definition(self, catalog_id, create_job_definition_details, **kwa def create_job_execution(self, catalog_id, job_key, create_job_execution_details, **kwargs): """ - Create a new job execution. Creates a new job execution. @@ -1454,7 +1439,6 @@ def create_job_execution(self, catalog_id, job_key, create_job_execution_details def create_term(self, catalog_id, glossary_key, create_term_details, **kwargs): """ Create a new term within a glossary. - Create a new term within a glossary. :param str catalog_id: (required) @@ -1546,7 +1530,6 @@ def create_term(self, catalog_id, glossary_key, create_term_details, **kwargs): def create_term_relationship(self, catalog_id, glossary_key, term_key, create_term_relationship_details, **kwargs): """ - Create a new term relationship for this term within a glossary. Creates a new term relationship for this term within a glossary. @@ -1643,7 +1626,6 @@ def create_term_relationship(self, catalog_id, glossary_key, term_key, create_te def delete_attribute(self, catalog_id, data_asset_key, entity_key, attribute_key, **kwargs): """ - Delete a specific entity attribute. Deletes a specific entity attribute. @@ -1735,7 +1717,6 @@ def delete_attribute(self, catalog_id, data_asset_key, entity_key, attribute_key def delete_attribute_tag(self, catalog_id, data_asset_key, entity_key, attribute_key, tag_key, **kwargs): """ - Delete a specific entity attribute tag. Deletes a specific entity attribute tag. @@ -1831,7 +1812,6 @@ def delete_attribute_tag(self, catalog_id, data_asset_key, entity_key, attribute def delete_catalog(self, catalog_id, **kwargs): """ - Delete a provisioned data catalog. Deletes a data catalog resource by identifier. @@ -1911,7 +1891,6 @@ def delete_catalog(self, catalog_id, **kwargs): def delete_connection(self, catalog_id, data_asset_key, connection_key, **kwargs): """ - Delete a specific connection of a data asset. Deletes a specific connection of a data asset. @@ -1999,7 +1978,6 @@ def delete_connection(self, catalog_id, data_asset_key, connection_key, **kwargs def delete_data_asset(self, catalog_id, data_asset_key, **kwargs): """ - Delete a specific data asset identified by it's key. Deletes a specific data asset identified by it's key. @@ -2083,7 +2061,6 @@ def delete_data_asset(self, catalog_id, data_asset_key, **kwargs): def delete_data_asset_tag(self, catalog_id, data_asset_key, tag_key, **kwargs): """ - Delete a specific data asset tag. Deletes a specific data asset tag. @@ -2171,7 +2148,6 @@ def delete_data_asset_tag(self, catalog_id, data_asset_key, tag_key, **kwargs): def delete_entity(self, catalog_id, data_asset_key, entity_key, **kwargs): """ - Delete a specific data entity. Deletes a specific data entity. @@ -2259,7 +2235,6 @@ def delete_entity(self, catalog_id, data_asset_key, entity_key, **kwargs): def delete_entity_tag(self, catalog_id, data_asset_key, entity_key, tag_key, **kwargs): """ - Delete a specific entity tag. Deletes a specific entity tag. @@ -2351,7 +2326,6 @@ def delete_entity_tag(self, catalog_id, data_asset_key, entity_key, tag_key, **k def delete_folder(self, catalog_id, data_asset_key, folder_key, **kwargs): """ - Delete a specific folder of a data asset identified by it's key. Deletes a specific folder of a data asset identified by it's key. @@ -2439,7 +2413,6 @@ def delete_folder(self, catalog_id, data_asset_key, folder_key, **kwargs): def delete_folder_tag(self, catalog_id, data_asset_key, folder_key, tag_key, **kwargs): """ - Delete a specific folder tag. Deletes a specific folder tag. @@ -2531,7 +2504,6 @@ def delete_folder_tag(self, catalog_id, data_asset_key, folder_key, tag_key, **k def delete_glossary(self, catalog_id, glossary_key, **kwargs): """ - Delete a specific glossary identified by it's key. Deletes a specific glossary identified by it's key. @@ -2615,7 +2587,6 @@ def delete_glossary(self, catalog_id, glossary_key, **kwargs): def delete_job(self, catalog_id, job_key, **kwargs): """ - Delete a specific job identified by it's key. Deletes a specific job identified by it's key. @@ -2699,7 +2670,6 @@ def delete_job(self, catalog_id, job_key, **kwargs): def delete_job_definition(self, catalog_id, job_definition_key, **kwargs): """ - Delete a specific job definition identified by it's key. Deletes a specific job definition identified by it's key. @@ -2783,7 +2753,6 @@ def delete_job_definition(self, catalog_id, job_definition_key, **kwargs): def delete_term(self, catalog_id, glossary_key, term_key, **kwargs): """ - Delete a specific glossary term. Deletes a specific glossary term. @@ -2871,7 +2840,6 @@ def delete_term(self, catalog_id, glossary_key, term_key, **kwargs): def delete_term_relationship(self, catalog_id, glossary_key, term_key, term_relationship_key, **kwargs): """ - Delete a specific glossary term relationship. Deletes a specific glossary term relationship. @@ -2963,7 +2931,6 @@ def delete_term_relationship(self, catalog_id, glossary_key, term_key, term_rela def expand_tree_for_glossary(self, catalog_id, glossary_key, **kwargs): """ - Glossaries contain nested hierarchies of parent and child terms. Returns an expanded tree of this glossary. Returns the fully expanded tree hierarchy of parent and child terms in this glossary. @@ -3051,7 +3018,6 @@ def expand_tree_for_glossary(self, catalog_id, glossary_key, **kwargs): def export_glossary(self, catalog_id, glossary_key, **kwargs): """ - Glossaries can be exported as csv or json formats. Returns the succesfully exported glossary in the format requested. Export the glossary and the terms and return the exported glossary as csv or json. @@ -3150,7 +3116,6 @@ def export_glossary(self, catalog_id, glossary_key, **kwargs): def get_attribute(self, catalog_id, data_asset_key, entity_key, attribute_key, **kwargs): """ - Get a specific entity attribute by key. Gets a specific entity attribute by key. @@ -3256,7 +3221,6 @@ def get_attribute(self, catalog_id, data_asset_key, entity_key, attribute_key, * def get_attribute_tag(self, catalog_id, data_asset_key, entity_key, attribute_key, tag_key, **kwargs): """ - Get a specific entity attribute tag by key. Gets a specific entity attribute tag by key. @@ -3366,7 +3330,6 @@ def get_attribute_tag(self, catalog_id, data_asset_key, entity_key, attribute_ke def get_catalog(self, catalog_id, **kwargs): """ - Get data catalog. Gets a data catalog by identifier. @@ -3439,7 +3402,6 @@ def get_catalog(self, catalog_id, **kwargs): def get_connection(self, catalog_id, data_asset_key, connection_key, **kwargs): """ - Get a specific data asset connection by key. Gets a specific data asset connection by key. @@ -3541,7 +3503,6 @@ def get_connection(self, catalog_id, data_asset_key, connection_key, **kwargs): def get_data_asset(self, catalog_id, data_asset_key, **kwargs): """ - Get a specific data asset for the given key within a data catalog. Gets a specific data asset for the given key within a data catalog. @@ -3639,7 +3600,6 @@ def get_data_asset(self, catalog_id, data_asset_key, **kwargs): def get_data_asset_tag(self, catalog_id, data_asset_key, tag_key, **kwargs): """ - Get a specific data asset tag by key. Gets a specific data asset tag by key. @@ -3741,7 +3701,6 @@ def get_data_asset_tag(self, catalog_id, data_asset_key, tag_key, **kwargs): def get_entity(self, catalog_id, data_asset_key, entity_key, **kwargs): """ - Get a specific data entity by key for a data asset. Gets a specific data entity by key for a data asset. @@ -3843,7 +3802,6 @@ def get_entity(self, catalog_id, data_asset_key, entity_key, **kwargs): def get_entity_tag(self, catalog_id, data_asset_key, entity_key, tag_key, **kwargs): """ - Get a specific entity tag by key. Gets a specific entity tag by key. @@ -3949,7 +3907,6 @@ def get_entity_tag(self, catalog_id, data_asset_key, entity_key, tag_key, **kwar def get_folder(self, catalog_id, data_asset_key, folder_key, **kwargs): """ - Get a specific data asset folder by key. Gets a specific data asset folder by key. @@ -4051,7 +4008,6 @@ def get_folder(self, catalog_id, data_asset_key, folder_key, **kwargs): def get_folder_tag(self, catalog_id, data_asset_key, folder_key, tag_key, **kwargs): """ - Get a specific folder tag by key. Gets a specific folder tag by key. @@ -4157,7 +4113,6 @@ def get_folder_tag(self, catalog_id, data_asset_key, folder_key, tag_key, **kwar def get_glossary(self, catalog_id, glossary_key, **kwargs): """ - Get a specific glossary by key within a data catalog. Gets a specific glossary by key within a data catalog. @@ -4255,7 +4210,6 @@ def get_glossary(self, catalog_id, glossary_key, **kwargs): def get_job(self, catalog_id, job_key, **kwargs): """ - Get a specific job by key within a data catalog. Gets a specific job by key within a data catalog. @@ -4353,7 +4307,6 @@ def get_job(self, catalog_id, job_key, **kwargs): def get_job_definition(self, catalog_id, job_definition_key, **kwargs): """ - Get a specific job definition by key within a data catalog. Gets a specific job definition by key within a data catalog. @@ -4451,7 +4404,6 @@ def get_job_definition(self, catalog_id, job_definition_key, **kwargs): def get_job_execution(self, catalog_id, job_key, job_execution_key, **kwargs): """ - Get a specific job execution by key. Gets a specific job execution by key. @@ -4553,7 +4505,6 @@ def get_job_execution(self, catalog_id, job_key, job_execution_key, **kwargs): def get_job_log(self, catalog_id, job_key, job_execution_key, job_log_key, **kwargs): """ - Get a specific job log by key. Gets a specific job log by key. @@ -4659,7 +4610,6 @@ def get_job_log(self, catalog_id, job_key, job_execution_key, job_log_key, **kwa def get_job_metrics(self, catalog_id, job_key, job_execution_key, job_metrics_key, **kwargs): """ - Get a specific job metric by key. Gets a specific job metric by key. @@ -4765,7 +4715,6 @@ def get_job_metrics(self, catalog_id, job_key, job_execution_key, job_metrics_ke def get_term(self, catalog_id, glossary_key, term_key, **kwargs): """ - Get a specific glossary term by key. Gets a specific glossary term by key. @@ -4867,7 +4816,6 @@ def get_term(self, catalog_id, glossary_key, term_key, **kwargs): def get_term_relationship(self, catalog_id, glossary_key, term_key, term_relationship_key, **kwargs): """ - Get a specific glossary term relationship by key. Gets a specific glossary term relationship by key. @@ -4973,7 +4921,6 @@ def get_term_relationship(self, catalog_id, glossary_key, term_key, term_relatio def get_type(self, catalog_id, type_key, **kwargs): """ - Get a specific type by key within a data catalog. Gets a specific type by key within a data catalog. @@ -5071,7 +5018,6 @@ def get_type(self, catalog_id, type_key, **kwargs): def get_work_request(self, work_request_id, **kwargs): """ - Get work request status. Gets the status of the work request with the given OCID. @@ -5144,7 +5090,6 @@ def get_work_request(self, work_request_id, **kwargs): def import_connection(self, catalog_id, data_asset_key, import_connection_details, **kwargs): """ - Import connections from an Oracle wallet file that contains relevant metadata for creating connections. Import new connection for this data asset. @@ -5246,7 +5191,6 @@ def import_connection(self, catalog_id, data_asset_key, import_connection_detail def import_glossary(self, catalog_id, glossary_key, import_glossary_details, **kwargs): """ - Glossaries can be imported from csv or json file formats. Returns the succesfully imported glossary. Import the glossary and the terms from csv or json files and return the imported glossary resource. @@ -5349,7 +5293,6 @@ def import_glossary(self, catalog_id, glossary_key, import_glossary_details, **k def list_attribute_tags(self, catalog_id, data_asset_key, entity_key, attribute_key, **kwargs): """ Returns a list of all tags for an entity attribute. - Returns a list of all tags for an entity attribute. :param str catalog_id: (required) @@ -5525,7 +5468,6 @@ def list_attribute_tags(self, catalog_id, data_asset_key, entity_key, attribute_ def list_attributes(self, catalog_id, data_asset_key, entity_key, **kwargs): """ Returns a list of all attributes of an data entity. - Returns a list of all attributes of an data entity. :param str catalog_id: (required) @@ -5743,7 +5685,6 @@ def list_attributes(self, catalog_id, data_asset_key, entity_key, **kwargs): def list_catalogs(self, compartment_id, **kwargs): """ - Lists all the data catalogs in the specified compartment. Returns a list of all the data catalogs in the specified compartment. @@ -5859,7 +5800,6 @@ def list_catalogs(self, compartment_id, **kwargs): def list_connections(self, catalog_id, data_asset_key, **kwargs): """ - Returns a list of all connections for a data asset. Returns a list of all Connections for a data asset. @@ -6047,7 +5987,6 @@ def list_connections(self, catalog_id, data_asset_key, **kwargs): def list_data_asset_tags(self, catalog_id, data_asset_key, **kwargs): """ Returns a list of all tags for a data asset. - Returns a list of all tags for a data asset. :param str catalog_id: (required) @@ -6215,7 +6154,6 @@ def list_data_asset_tags(self, catalog_id, data_asset_key, **kwargs): def list_data_assets(self, catalog_id, **kwargs): """ Returns a list of data assets within a data catalog. - Returns a list of data assets within a data catalog. :param str catalog_id: (required) @@ -6391,7 +6329,6 @@ def list_data_assets(self, catalog_id, **kwargs): def list_entities(self, catalog_id, data_asset_key, **kwargs): """ Returns a list of all entities of a data asset. - Returns a list of all entities of a data asset. :param str catalog_id: (required) @@ -6608,7 +6545,6 @@ def list_entities(self, catalog_id, data_asset_key, **kwargs): def list_entity_tags(self, catalog_id, data_asset_key, entity_key, **kwargs): """ Returns a list of all tags for a data entity. - Returns a list of all tags for a data entity. :param str catalog_id: (required) @@ -6780,7 +6716,6 @@ def list_entity_tags(self, catalog_id, data_asset_key, entity_key, **kwargs): def list_folder_tags(self, catalog_id, data_asset_key, folder_key, **kwargs): """ Returns a list of all tags for a folder. - Returns a list of all tags for a folder. :param str catalog_id: (required) @@ -6951,7 +6886,6 @@ def list_folder_tags(self, catalog_id, data_asset_key, folder_key, **kwargs): def list_folders(self, catalog_id, data_asset_key, **kwargs): """ - Returns a list of all folders for a data asset. Returns a list of all folders. @@ -7147,7 +7081,6 @@ def list_folders(self, catalog_id, data_asset_key, **kwargs): def list_glossaries(self, catalog_id, **kwargs): """ Returns a list of all glossaries within a data catalog. - Returns a list of all glossaries within a data catalog. :param str catalog_id: (required) @@ -7313,7 +7246,6 @@ def list_glossaries(self, catalog_id, **kwargs): def list_job_definitions(self, catalog_id, **kwargs): """ Returns a list of job definitions within a data catalog. - Returns a list of job definitions within a data catalog. :param str catalog_id: (required) @@ -7504,7 +7436,6 @@ def list_job_definitions(self, catalog_id, **kwargs): def list_job_executions(self, catalog_id, job_key, **kwargs): """ Returns a list of job executions for a job. - Returns a list of job executions for a job. :param str catalog_id: (required) @@ -7730,7 +7661,6 @@ def list_job_executions(self, catalog_id, job_key, **kwargs): def list_job_logs(self, catalog_id, job_key, job_execution_key, **kwargs): """ Returns a list of job logs. - Returns a list of job logs. :param str catalog_id: (required) @@ -7904,7 +7834,6 @@ def list_job_logs(self, catalog_id, job_key, job_execution_key, **kwargs): def list_job_metrics(self, catalog_id, job_key, job_execution_key, **kwargs): """ Returns a list of job metrics. - Returns a list of job metrics. :param str catalog_id: (required) @@ -8106,7 +8035,6 @@ def list_job_metrics(self, catalog_id, job_key, job_execution_key, **kwargs): def list_jobs(self, catalog_id, **kwargs): """ Returns a list of jobs within a data catalog. - Returns a list of jobs within a data catalog. :param str catalog_id: (required) @@ -8326,7 +8254,6 @@ def list_jobs(self, catalog_id, **kwargs): def list_tags(self, catalog_id, **kwargs): """ Returns a list of all user created tags in the system. - Returns a list of all user created tags in the system. :param str catalog_id: (required) @@ -8467,7 +8394,6 @@ def list_tags(self, catalog_id, **kwargs): def list_term_relationships(self, catalog_id, glossary_key, term_key, **kwargs): """ - Returns a list of all term relationships for a term within a glossary. Returns a list of all term relationships within a glossary. @@ -8618,7 +8544,6 @@ def list_term_relationships(self, catalog_id, glossary_key, term_key, **kwargs): def list_terms(self, catalog_id, glossary_key, **kwargs): """ Returns a list of all terms within a glossary. - Returns a list of all terms within a glossary. :param str catalog_id: (required) @@ -8784,7 +8709,6 @@ def list_terms(self, catalog_id, glossary_key, **kwargs): def list_types(self, catalog_id, **kwargs): """ Returns a list of all types within a data catalog. - Returns a list of all types within a data catalog. :param str catalog_id: (required) @@ -8950,7 +8874,6 @@ def list_types(self, catalog_id, **kwargs): def list_work_request_errors(self, work_request_id, **kwargs): """ - Lists work request errors. Returns a (paginated) list of errors for a given work request. @@ -9067,7 +8990,6 @@ def list_work_request_errors(self, work_request_id, **kwargs): def list_work_request_logs(self, work_request_id, **kwargs): """ - Lists work request logs. Returns a (paginated) list of logs for a given work request. @@ -9184,7 +9106,6 @@ def list_work_request_logs(self, work_request_id, **kwargs): def list_work_requests(self, compartment_id, **kwargs): """ - List work requests. Lists the work requests in a compartment. @@ -9262,7 +9183,6 @@ def list_work_requests(self, compartment_id, **kwargs): def object_stats(self, catalog_id, **kwargs): """ - Returns stats on objects in the repository. Returns stats on objects by type in the repository. @@ -9379,7 +9299,6 @@ def object_stats(self, catalog_id, **kwargs): def parse_connection(self, catalog_id, data_asset_key, parse_connection_details, **kwargs): """ - Parse connection from a request payload that contains data asset references. Parse data asset references through connections from this data asset. @@ -9484,7 +9403,6 @@ def parse_connection(self, catalog_id, data_asset_key, parse_connection_details, def search_criteria(self, catalog_id, **kwargs): """ Returns a list of search results within a data catalog. - Returns a list of search results within a data catalog. :param str catalog_id: (required) @@ -9628,7 +9546,6 @@ def search_criteria(self, catalog_id, **kwargs): def test_connection(self, catalog_id, data_asset_key, connection_key, **kwargs): """ - Test the connection credentials to the parent data asset. Test the connection by connecting to the data asset using credentials in the metadata. @@ -9720,7 +9637,6 @@ def test_connection(self, catalog_id, data_asset_key, connection_key, **kwargs): def update_attribute(self, catalog_id, data_asset_key, entity_key, attribute_key, update_attribute_details, **kwargs): """ - Update a specific data asset attribute. Updates a specific data asset attribute. @@ -9819,7 +9735,6 @@ def update_attribute(self, catalog_id, data_asset_key, entity_key, attribute_key def update_catalog(self, catalog_id, update_catalog_details, **kwargs): """ - Update the data catalog identified by the id. Updates the data catalog. @@ -9906,7 +9821,6 @@ def update_catalog(self, catalog_id, update_catalog_details, **kwargs): def update_connection(self, catalog_id, data_asset_key, connection_key, update_connection_details, **kwargs): """ - Update a specific connection of a data asset. Updates a specific connection of a data asset. @@ -10001,7 +9915,6 @@ def update_connection(self, catalog_id, data_asset_key, connection_key, update_c def update_data_asset(self, catalog_id, data_asset_key, update_data_asset_details, **kwargs): """ - Update a specific data asset identified by the given key. Updates a specific data asset identified by the given key. @@ -10092,7 +10005,6 @@ def update_data_asset(self, catalog_id, data_asset_key, update_data_asset_detail def update_entity(self, catalog_id, data_asset_key, entity_key, update_entity_details, **kwargs): """ - Update a specific data entity. Updates a specific data entity. @@ -10187,7 +10099,6 @@ def update_entity(self, catalog_id, data_asset_key, entity_key, update_entity_de def update_folder(self, catalog_id, data_asset_key, folder_key, update_folder_details, **kwargs): """ - Update a specific folder of a data asset. Updates a specific folder of a data asset. @@ -10282,7 +10193,6 @@ def update_folder(self, catalog_id, data_asset_key, folder_key, update_folder_de def update_glossary(self, catalog_id, glossary_key, update_glossary_details, **kwargs): """ - Update a specific glossary identified by the given key. Updates a specific glossary identified by the given key. @@ -10373,7 +10283,6 @@ def update_glossary(self, catalog_id, glossary_key, update_glossary_details, **k def update_job(self, catalog_id, job_key, update_job_details, **kwargs): """ - Update a specific job identified by the given key. Updates a specific job identified by the given key. @@ -10465,7 +10374,6 @@ def update_job(self, catalog_id, job_key, update_job_details, **kwargs): def update_job_definition(self, catalog_id, job_definition_key, update_job_definition_details, **kwargs): """ Update a specific job definition identified by the given key. - Update a specific job definition identified by the given key. :param str catalog_id: (required) @@ -10555,7 +10463,6 @@ def update_job_definition(self, catalog_id, job_definition_key, update_job_defin def update_term(self, catalog_id, glossary_key, term_key, update_term_details, **kwargs): """ - Update a specific glossary term. Updates a specific glossary term. @@ -10650,7 +10557,6 @@ def update_term(self, catalog_id, glossary_key, term_key, update_term_details, * def update_term_relationship(self, catalog_id, glossary_key, term_key, term_relationship_key, update_term_relationship_details, **kwargs): """ - Update a specific glossary term relationship. Updates a specific glossary term relationship. @@ -10749,7 +10655,6 @@ def update_term_relationship(self, catalog_id, glossary_key, term_key, term_rela def upload_credentials(self, catalog_id, data_asset_key, connection_key, upload_credentials_details, **kwargs): """ - Upload connection credentials file and metadata for this connection for update. Upload connection credentails and metadata for this connection. @@ -10856,7 +10761,6 @@ def upload_credentials(self, catalog_id, data_asset_key, connection_key, upload_ def users(self, catalog_id, **kwargs): """ Returns active users in the system. - Returns active users in the system. :param str catalog_id: (required) @@ -10972,7 +10876,6 @@ def users(self, catalog_id, **kwargs): def validate_connection(self, catalog_id, data_asset_key, validate_connection_details, **kwargs): """ - Validate connection from a request payload that contains connection metadata. Validate connection by connecting to the data asset using credentials in metadata. diff --git a/src/oci/data_flow/data_flow_client.py b/src/oci/data_flow/data_flow_client.py index 34bac28208..dd231e83e2 100644 --- a/src/oci/data_flow/data_flow_client.py +++ b/src/oci/data_flow/data_flow_client.py @@ -82,7 +82,6 @@ def __init__(self, config, **kwargs): def create_application(self, create_application_details, **kwargs): """ - Create an application. Creates an application. @@ -156,7 +155,6 @@ def create_application(self, create_application_details, **kwargs): def create_run(self, create_run_details, **kwargs): """ - Create a run. Creates a run for an application. @@ -230,7 +228,6 @@ def create_run(self, create_run_details, **kwargs): def delete_application(self, application_id, **kwargs): """ - Delete the application. Deletes an application using an `applicationId`. @@ -309,7 +306,6 @@ def delete_application(self, application_id, **kwargs): def delete_run(self, run_id, **kwargs): """ - Cancels the specified run. Cancels the specified run if it has not already completed or was previously cancelled. If a run is in progress, the executing job will be killed. @@ -389,7 +385,6 @@ def delete_run(self, run_id, **kwargs): def get_application(self, application_id, **kwargs): """ - Get the application. Retrieves an application using an `applicationId`. @@ -463,7 +458,6 @@ def get_application(self, application_id, **kwargs): def get_run(self, run_id, **kwargs): """ - Get the run. Retrieves the run for the specified `runId`. @@ -537,7 +531,6 @@ def get_run(self, run_id, **kwargs): def get_run_log(self, run_id, name, **kwargs): """ - Get the gzipped content of the run log. Retrieves the content of an run log. @@ -615,7 +608,6 @@ def get_run_log(self, run_id, name, **kwargs): def list_applications(self, compartment_id, **kwargs): """ - List the applications. Lists all applications in the specified compartment. @@ -738,7 +730,6 @@ def list_applications(self, compartment_id, **kwargs): def list_run_logs(self, run_id, **kwargs): """ - List the run log summaries. Retrieves summaries of the run's logs. @@ -829,7 +820,6 @@ def list_run_logs(self, run_id, **kwargs): def list_runs(self, compartment_id, **kwargs): """ - List the runs. Lists all runs of an application in the specified compartment. @@ -976,7 +966,6 @@ def list_runs(self, compartment_id, **kwargs): def update_application(self, update_application_details, application_id, **kwargs): """ - Update the application. Updates an application using an `applicationId`. @@ -1062,7 +1051,6 @@ def update_application(self, update_application_details, application_id, **kwarg def update_run(self, update_run_details, run_id, **kwargs): """ - Update the run. Updates a run using a `runId`. diff --git a/src/oci/data_flow/models/update_application_details.py b/src/oci/data_flow/models/update_application_details.py index f7e2482fbf..ff1b71d0a9 100644 --- a/src/oci/data_flow/models/update_application_details.py +++ b/src/oci/data_flow/models/update_application_details.py @@ -12,11 +12,44 @@ class UpdateApplicationDetails(object): The update application details. """ + #: A constant which can be used with the language property of a UpdateApplicationDetails. + #: This constant has a value of "SCALA" + LANGUAGE_SCALA = "SCALA" + + #: A constant which can be used with the language property of a UpdateApplicationDetails. + #: This constant has a value of "JAVA" + LANGUAGE_JAVA = "JAVA" + + #: A constant which can be used with the language property of a UpdateApplicationDetails. + #: This constant has a value of "PYTHON" + LANGUAGE_PYTHON = "PYTHON" + + #: A constant which can be used with the language property of a UpdateApplicationDetails. + #: This constant has a value of "SQL" + LANGUAGE_SQL = "SQL" + def __init__(self, **kwargs): """ Initializes a new UpdateApplicationDetails object with values from keyword arguments. The following keyword arguments are supported (corresponding to the getters/setters of this class): + :param class_name: + The value to assign to the class_name property of this UpdateApplicationDetails. + :type class_name: str + + :param file_uri: + The value to assign to the file_uri property of this UpdateApplicationDetails. + :type file_uri: str + + :param spark_version: + The value to assign to the spark_version property of this UpdateApplicationDetails. + :type spark_version: str + + :param language: + The value to assign to the language property of this UpdateApplicationDetails. + Allowed values for this property are: "SCALA", "JAVA", "PYTHON", "SQL" + :type language: str + :param arguments: The value to assign to the arguments property of this UpdateApplicationDetails. :type arguments: list[str] @@ -67,6 +100,10 @@ def __init__(self, **kwargs): """ self.swagger_types = { + 'class_name': 'str', + 'file_uri': 'str', + 'spark_version': 'str', + 'language': 'str', 'arguments': 'list[str]', 'configuration': 'dict(str, str)', 'defined_tags': 'dict(str, dict(str, object))', @@ -82,6 +119,10 @@ def __init__(self, **kwargs): } self.attribute_map = { + 'class_name': 'className', + 'file_uri': 'fileUri', + 'spark_version': 'sparkVersion', + 'language': 'language', 'arguments': 'arguments', 'configuration': 'configuration', 'defined_tags': 'definedTags', @@ -96,6 +137,10 @@ def __init__(self, **kwargs): 'warehouse_bucket_uri': 'warehouseBucketUri' } + self._class_name = None + self._file_uri = None + self._spark_version = None + self._language = None self._arguments = None self._configuration = None self._defined_tags = None @@ -109,6 +154,112 @@ def __init__(self, **kwargs): self._parameters = None self._warehouse_bucket_uri = None + @property + def class_name(self): + """ + Gets the class_name of this UpdateApplicationDetails. + The class for the application. + + + :return: The class_name of this UpdateApplicationDetails. + :rtype: str + """ + return self._class_name + + @class_name.setter + def class_name(self, class_name): + """ + Sets the class_name of this UpdateApplicationDetails. + The class for the application. + + + :param class_name: The class_name of this UpdateApplicationDetails. + :type: str + """ + self._class_name = class_name + + @property + def file_uri(self): + """ + Gets the file_uri of this UpdateApplicationDetails. + An Oracle Cloud Infrastructure URI of the file containing the application to execute. + See https://docs.cloud.oracle.com/iaas/Content/API/SDKDocs/hdfsconnector.htm#uriformat + + + :return: The file_uri of this UpdateApplicationDetails. + :rtype: str + """ + return self._file_uri + + @file_uri.setter + def file_uri(self, file_uri): + """ + Sets the file_uri of this UpdateApplicationDetails. + An Oracle Cloud Infrastructure URI of the file containing the application to execute. + See https://docs.cloud.oracle.com/iaas/Content/API/SDKDocs/hdfsconnector.htm#uriformat + + + :param file_uri: The file_uri of this UpdateApplicationDetails. + :type: str + """ + self._file_uri = file_uri + + @property + def spark_version(self): + """ + Gets the spark_version of this UpdateApplicationDetails. + The Spark version utilized to run the application. + + + :return: The spark_version of this UpdateApplicationDetails. + :rtype: str + """ + return self._spark_version + + @spark_version.setter + def spark_version(self, spark_version): + """ + Sets the spark_version of this UpdateApplicationDetails. + The Spark version utilized to run the application. + + + :param spark_version: The spark_version of this UpdateApplicationDetails. + :type: str + """ + self._spark_version = spark_version + + @property + def language(self): + """ + Gets the language of this UpdateApplicationDetails. + The Spark language. + + Allowed values for this property are: "SCALA", "JAVA", "PYTHON", "SQL" + + + :return: The language of this UpdateApplicationDetails. + :rtype: str + """ + return self._language + + @language.setter + def language(self, language): + """ + Sets the language of this UpdateApplicationDetails. + The Spark language. + + + :param language: The language of this UpdateApplicationDetails. + :type: str + """ + allowed_values = ["SCALA", "JAVA", "PYTHON", "SQL"] + if not value_allowed_none_or_none_sentinel(language, allowed_values): + raise ValueError( + "Invalid value for `language`, must be None or one of {0}" + .format(allowed_values) + ) + self._language = language + @property def arguments(self): """ diff --git a/src/oci/data_science/data_science_client.py b/src/oci/data_science/data_science_client.py index b04ecbaa67..a3cc8a7b1a 100644 --- a/src/oci/data_science/data_science_client.py +++ b/src/oci/data_science/data_science_client.py @@ -82,7 +82,6 @@ def __init__(self, config, **kwargs): def activate_model(self, model_id, **kwargs): """ - ActivateModel Activates the model. @@ -166,7 +165,6 @@ def activate_model(self, model_id, **kwargs): def activate_notebook_session(self, notebook_session_id, **kwargs): """ - ActivateNotebookSession Activates the notebook session. @@ -248,7 +246,6 @@ def activate_notebook_session(self, notebook_session_id, **kwargs): def cancel_work_request(self, work_request_id, **kwargs): """ - CancelWorkRequest Cancels a work request that has not started. @@ -330,7 +327,6 @@ def cancel_work_request(self, work_request_id, **kwargs): def change_model_compartment(self, model_id, change_model_compartment_details, **kwargs): """ - ChangeModelCompartment Moves a model resource into a different compartment. @@ -424,7 +420,6 @@ def change_model_compartment(self, model_id, change_model_compartment_details, * def change_notebook_session_compartment(self, notebook_session_id, change_notebook_session_compartment_details, **kwargs): """ - ChangeNotebookSessionCompartment Moves a notebook session resource into a different compartment. @@ -518,7 +513,6 @@ def change_notebook_session_compartment(self, notebook_session_id, change_notebo def change_project_compartment(self, project_id, change_project_compartment_details, **kwargs): """ - ChangeProjectCompartment Moves a project resource into a different compartment. @@ -612,7 +606,6 @@ def change_project_compartment(self, project_id, change_project_compartment_deta def create_model(self, create_model_details, **kwargs): """ - CreateModel Creates a new model. @@ -682,7 +675,6 @@ def create_model(self, create_model_details, **kwargs): def create_model_artifact(self, model_id, model_artifact, **kwargs): """ - CreateModelArtifact Creates model artifact for specified model. @@ -796,7 +788,6 @@ def create_model_artifact(self, model_id, model_artifact, **kwargs): def create_model_provenance(self, model_id, create_model_provenance_details, **kwargs): """ - CreateModelProvenance Creates provenance information for the specified model. @@ -883,7 +874,6 @@ def create_model_provenance(self, model_id, create_model_provenance_details, **k def create_notebook_session(self, create_notebook_session_details, **kwargs): """ - CreateNotebookSession Creates a new notebook session. @@ -953,7 +943,6 @@ def create_notebook_session(self, create_notebook_session_details, **kwargs): def create_project(self, create_project_details, **kwargs): """ - CreateProject Creates a new project. @@ -1023,7 +1012,6 @@ def create_project(self, create_project_details, **kwargs): def deactivate_model(self, model_id, **kwargs): """ - DeactivateModel Deactivates the model. @@ -1107,7 +1095,6 @@ def deactivate_model(self, model_id, **kwargs): def deactivate_notebook_session(self, notebook_session_id, **kwargs): """ - DeactivateNotebookSession Deactivates the notebook session. @@ -1189,7 +1176,6 @@ def deactivate_notebook_session(self, notebook_session_id, **kwargs): def delete_model(self, model_id, **kwargs): """ - DeleteModel Deletes the specified model. @@ -1271,7 +1257,6 @@ def delete_model(self, model_id, **kwargs): def delete_notebook_session(self, notebook_session_id, **kwargs): """ - DeleteNotebookSession Deletes the specified notebook session. Any unsaved work in this notebook session will be lost. @@ -1353,7 +1338,6 @@ def delete_notebook_session(self, notebook_session_id, **kwargs): def delete_project(self, project_id, **kwargs): """ - DeleteProject Deletes the specified project. This operation will fail unless all associated resources (such as notebook sessions or models) are in a DELETED state. You must delete all associated resources before deleting a project. @@ -1435,7 +1419,6 @@ def delete_project(self, project_id, **kwargs): def get_model(self, model_id, **kwargs): """ - GetModel Gets the specified model's information. @@ -1510,7 +1493,6 @@ def get_model(self, model_id, **kwargs): def get_model_artifact_content(self, model_id, **kwargs): """ - GetModelArtifactContent Downloads model artifact content for specified model. @@ -1593,7 +1575,6 @@ def get_model_artifact_content(self, model_id, **kwargs): def get_model_provenance(self, model_id, **kwargs): """ - GetModelProvenance Gets provenance information for specified model. @@ -1668,7 +1649,6 @@ def get_model_provenance(self, model_id, **kwargs): def get_notebook_session(self, notebook_session_id, **kwargs): """ - GetNotebookSession Gets the specified notebook session's information. @@ -1743,7 +1723,6 @@ def get_notebook_session(self, notebook_session_id, **kwargs): def get_project(self, project_id, **kwargs): """ - GetProject Gets the specified project's information. @@ -1818,7 +1797,6 @@ def get_project(self, project_id, **kwargs): def get_work_request(self, work_request_id, **kwargs): """ - GetWorkRequest Gets the specified work request's information. @@ -1893,7 +1871,6 @@ def get_work_request(self, work_request_id, **kwargs): def head_model_artifact(self, model_id, **kwargs): """ - HeadModelArtifact Gets model artifact metadata for specified model. @@ -1966,7 +1943,6 @@ def head_model_artifact(self, model_id, **kwargs): def list_models(self, compartment_id, **kwargs): """ - ListModels Lists models in the specified compartment. @@ -2129,7 +2105,6 @@ def list_models(self, compartment_id, **kwargs): def list_notebook_session_shapes(self, compartment_id, **kwargs): """ - ListNotebookSessionShapes Lists the valid notebook session shapes. @@ -2221,7 +2196,6 @@ def list_notebook_session_shapes(self, compartment_id, **kwargs): def list_notebook_sessions(self, compartment_id, **kwargs): """ - ListNotebookSessions Lists notebook sessions in the specified compartment. @@ -2385,7 +2359,6 @@ def list_notebook_sessions(self, compartment_id, **kwargs): def list_projects(self, compartment_id, **kwargs): """ - ListProjects Lists projects in the specified compartment. @@ -2542,7 +2515,6 @@ def list_projects(self, compartment_id, **kwargs): def list_work_request_errors(self, work_request_id, **kwargs): """ - ListWorkRequestErrors Lists work request errors for the specified work request. @@ -2617,7 +2589,6 @@ def list_work_request_errors(self, work_request_id, **kwargs): def list_work_request_logs(self, work_request_id, **kwargs): """ - ListWorkRequestLogs Lists work request logs for the specified work request. @@ -2692,7 +2663,6 @@ def list_work_request_logs(self, work_request_id, **kwargs): def list_work_requests(self, compartment_id, **kwargs): """ - ListWorkRequests Lists work requests in the specified compartment. @@ -2847,7 +2817,6 @@ def list_work_requests(self, compartment_id, **kwargs): def update_model(self, model_id, update_model_details, **kwargs): """ - UpdateModel Updates the properties of a model. You can update the `displayName`, `description`, `freeformTags`, and `definedTags` properties. @@ -2936,7 +2905,6 @@ def update_model(self, model_id, update_model_details, **kwargs): def update_model_provenance(self, model_id, update_model_provenance_details, **kwargs): """ - UpdateModelProvenance Updates provenance information for the specified model. @@ -3025,7 +2993,6 @@ def update_model_provenance(self, model_id, update_model_provenance_details, **k def update_notebook_session(self, notebook_session_id, update_notebook_session_details, **kwargs): """ - UpdateNotebookSession Updates the properties of a notebook session. You can update the `displayName`, `freeformTags`, and `definedTags` properties. When the notebook session is in the INACTIVE lifecycle state, you can update `notebookSessionConfigurationDetails` and change `shape`, `subnetId`, and `blockStorageSizeInGBs`. Changes to the `notebookSessionConfigurationDetails` will take effect the next time the `ActivateNotebookSession` action is invoked on the notebook session resource. @@ -3117,7 +3084,6 @@ def update_notebook_session(self, notebook_session_id, update_notebook_session_d def update_project(self, project_id, update_project_details, **kwargs): """ - UpdateProject Updates the properties of a project. You can update the `displayName`, `description`, `freeformTags`, and `definedTags` properties. diff --git a/src/oci/database/database_client.py b/src/oci/database/database_client.py index f8fedf1828..52966ce605 100644 --- a/src/oci/database/database_client.py +++ b/src/oci/database/database_client.py @@ -84,7 +84,6 @@ def __init__(self, config, **kwargs): def activate_exadata_infrastructure(self, exadata_infrastructure_id, activate_exadata_infrastructure_details, **kwargs): """ - Activate ExadataInfrastructure Activates the specified Exadata infrastructure. @@ -175,7 +174,6 @@ def activate_exadata_infrastructure(self, exadata_infrastructure_id, activate_ex def change_autonomous_container_database_compartment(self, change_compartment_details, autonomous_container_database_id, **kwargs): """ - ChangeAutonomousContainerDatabaseCompartment Move the Autonomous Container Database and its dependent resources to the specified compartment. For more information about moving Autonomous Container Databases, see `Moving Database Resources to a Different Compartment`__. @@ -275,7 +273,6 @@ def change_autonomous_container_database_compartment(self, change_compartment_de def change_autonomous_database_compartment(self, change_compartment_details, autonomous_database_id, **kwargs): """ - ChangeAutonomousDatabaseCompartment Move the Autonomous Database and its dependent resources to the specified compartment. For more information about moving Autonomous Databases, see `Moving Database Resources to a Different Compartment`__. @@ -375,7 +372,6 @@ def change_autonomous_database_compartment(self, change_compartment_details, aut def change_autonomous_exadata_infrastructure_compartment(self, change_compartment_details, autonomous_exadata_infrastructure_id, **kwargs): """ - ChangeAutonomousExadataInfrastructureCompartment Move the Autonomous Exadata Infrastructure and its dependent resources to the specified compartment. For more information about moving Autonomous Exadata Infrastructures, see `Moving Database Resources to a Different Compartment`__. @@ -475,7 +471,6 @@ def change_autonomous_exadata_infrastructure_compartment(self, change_compartmen def change_backup_destination_compartment(self, change_compartment_details, backup_destination_id, **kwargs): """ - ChangeBackupDestinationCompartment Move the backup destination and its dependent resources to the specified compartment. For more information about moving backup destinations, see `Moving Database Resources to a Different Compartment`__. @@ -575,7 +570,6 @@ def change_backup_destination_compartment(self, change_compartment_details, back def change_db_system_compartment(self, change_compartment_details, db_system_id, **kwargs): """ - ChangeDbSystemCompartment Move the DB system and its dependent resources to the specified compartment. For more information about moving DB systems, see `Moving Database Resources to a Different Compartment`__. @@ -675,7 +669,6 @@ def change_db_system_compartment(self, change_compartment_details, db_system_id, def change_exadata_infrastructure_compartment(self, change_exadata_infrastructure_compartment_details, exadata_infrastructure_id, **kwargs): """ - ChangeExadataInfrastructureCompartment To move an Exadata infrastructure and its dependent resources to another compartment, use the :func:`change_exadata_infrastructure_compartment` operation. @@ -772,7 +765,6 @@ def change_exadata_infrastructure_compartment(self, change_exadata_infrastructur def change_vm_cluster_compartment(self, change_vm_cluster_compartment_details, vm_cluster_id, **kwargs): """ - ChangeVmClusterCompartment To move a VM cluster and its dependent resources to another compartment, use the :func:`change_vm_cluster_compartment` operation. @@ -869,7 +861,6 @@ def change_vm_cluster_compartment(self, change_vm_cluster_compartment_details, v def complete_external_backup_job(self, backup_id, complete_external_backup_job_details, **kwargs): """ - CompleteExternalBackupJob Changes the status of the standalone backup resource to `ACTIVE` after the backup is created from the on-premises database and placed in Oracle Cloud Infrastructure Object Storage. **Note:** This API is used by an Oracle Cloud Infrastructure Python script that is packaged with the Oracle Cloud Infrastructure CLI. Oracle recommends that you use the script instead using the API directly. See `Migrating an On-Premises Database to Oracle Cloud Infrastructure by Creating a Backup in the Cloud`__ for more information. @@ -966,7 +957,6 @@ def complete_external_backup_job(self, backup_id, complete_external_backup_job_d def create_autonomous_container_database(self, create_autonomous_container_database_details, **kwargs): """ - CreateAutonomousContainerDatabase Create a new Autonomous Container Database in the specified Autonomous Exadata Infrastructure. @@ -1035,7 +1025,6 @@ def create_autonomous_container_database(self, create_autonomous_container_datab def create_autonomous_data_warehouse(self, create_autonomous_data_warehouse_details, **kwargs): """ - Creates a new Autonomous Data Warehouse. **Deprecated.** To create a new Autonomous Data Warehouse, use the :func:`create_autonomous_database` operation and specify `DW` as the workload type. @@ -1104,7 +1093,6 @@ def create_autonomous_data_warehouse(self, create_autonomous_data_warehouse_deta def create_autonomous_data_warehouse_backup(self, create_autonomous_data_warehouse_backup_details, **kwargs): """ - Creates a new Autonomous Data Warehouse backup for the specified database. **Deprecated.** To create a new Autonomous Data Warehouse backup for a specified database, use the :func:`create_autonomous_database_backup` operation. @@ -1174,7 +1162,6 @@ def create_autonomous_data_warehouse_backup(self, create_autonomous_data_warehou def create_autonomous_database(self, create_autonomous_database_details, **kwargs): """ Creates a new Autonomous Database. - Creates a new Autonomous Database. :param CreateAutonomousDatabaseBase create_autonomous_database_details: (required) @@ -1247,7 +1234,6 @@ def create_autonomous_database(self, create_autonomous_database_details, **kwarg def create_autonomous_database_backup(self, create_autonomous_database_backup_details, **kwargs): """ - Creates a new Autonomous Database backup for the specified database. Creates a new Autonomous Database backup for the specified database based on the provided request parameters. @@ -1321,7 +1307,6 @@ def create_autonomous_database_backup(self, create_autonomous_database_backup_de def create_backup(self, create_backup_details, **kwargs): """ - CreateBackup Creates a new backup in the specified database based on the request parameters you provide. If you previously used RMAN or dbcli to configure backups and then you switch to using the Console or the API for backups, a new backup configuration is created and associated with your database. This means that you can no longer rely on your previously configured unmanaged backups to work. @@ -1390,7 +1375,6 @@ def create_backup(self, create_backup_details, **kwargs): def create_backup_destination(self, create_backup_destination_details, **kwargs): """ - CreateBackupDestination Creates a backup destination. @@ -1464,7 +1448,6 @@ def create_backup_destination(self, create_backup_destination_details, **kwargs) def create_console_connection(self, create_console_connection_details, db_node_id, **kwargs): """ - CreateConsoleConnection Creates a new console connection to the specified dbNode. After the console connection has been created and is available, you connect to the console using SSH. @@ -1552,7 +1535,6 @@ def create_console_connection(self, create_console_connection_details, db_node_i def create_data_guard_association(self, database_id, create_data_guard_association_details, **kwargs): """ - Creates a Data Guard association. Creates a new Data Guard association. A Data Guard association represents the replication relationship between the specified database and a peer database. For more information, see `Using Oracle Data Guard`__. @@ -1648,7 +1630,6 @@ def create_data_guard_association(self, database_id, create_data_guard_associati def create_database(self, create_new_database_details, **kwargs): """ - CreateDatabase Creates a new database in the specified Database Home. If the database version is provided, it must match the version of the Database Home. Applies only to Exadata DB systems. @@ -1722,7 +1703,6 @@ def create_database(self, create_new_database_details, **kwargs): def create_db_home(self, create_db_home_with_db_system_id_details, **kwargs): """ - CreateDbHome Creates a new Database Home in the specified DB system based on the request parameters you provide. Applies only to bare metal and Exadata DB systems. @@ -1791,7 +1771,6 @@ def create_db_home(self, create_db_home_with_db_system_id_details, **kwargs): def create_exadata_infrastructure(self, create_exadata_infrastructure_details, **kwargs): """ - CreateExadataInfrastructure Create Exadata infrastructure. @@ -1865,7 +1844,6 @@ def create_exadata_infrastructure(self, create_exadata_infrastructure_details, * def create_external_backup_job(self, create_external_backup_job_details, **kwargs): """ - CreateExternalBackupJob Creates a new backup resource and returns the information the caller needs to back up an on-premises Oracle Database to Oracle Cloud Infrastructure. **Note:** This API is used by an Oracle Cloud Infrastructure Python script that is packaged with the Oracle Cloud Infrastructure CLI. Oracle recommends that you use the script instead using the API directly. See `Migrating an On-Premises Database to Oracle Cloud Infrastructure by Creating a Backup in the Cloud`__ for more information. @@ -1938,7 +1916,6 @@ def create_external_backup_job(self, create_external_backup_job_details, **kwarg def create_vm_cluster(self, create_vm_cluster_details, **kwargs): """ - CreateVmCluster Creates a VM cluster. @@ -2012,7 +1989,6 @@ def create_vm_cluster(self, create_vm_cluster_details, **kwargs): def create_vm_cluster_network(self, exadata_infrastructure_id, vm_cluster_network_details, **kwargs): """ - CreateVmClusterNetwork Creates the VM cluster network. @@ -2103,7 +2079,6 @@ def create_vm_cluster_network(self, exadata_infrastructure_id, vm_cluster_networ def db_node_action(self, db_node_id, action, **kwargs): """ - DbNodeAction Performs one of the following power actions on the specified DB node: - start - power on - stop - power off @@ -2215,7 +2190,6 @@ def db_node_action(self, db_node_id, action, **kwargs): def delete_autonomous_data_warehouse(self, autonomous_data_warehouse_id, **kwargs): """ - Deletes the specified Autonomous Data Warehouse. **Deprecated.** To delete an Autonomous Data Warehouse, use the :func:`delete_autonomous_database` operation. @@ -2291,7 +2265,6 @@ def delete_autonomous_data_warehouse(self, autonomous_data_warehouse_id, **kwarg def delete_autonomous_database(self, autonomous_database_id, **kwargs): """ Deletes the specified Autonomous Database. - Deletes the specified Autonomous Database. :param str autonomous_database_id: (required) @@ -2370,7 +2343,6 @@ def delete_autonomous_database(self, autonomous_database_id, **kwargs): def delete_backup(self, backup_id, **kwargs): """ - DeleteBackup Deletes a full backup. You cannot delete automatic backups using this API. @@ -2445,7 +2417,6 @@ def delete_backup(self, backup_id, **kwargs): def delete_backup_destination(self, backup_destination_id, **kwargs): """ - DeleteBackupDestination Deletes a backup destination. @@ -2525,7 +2496,6 @@ def delete_backup_destination(self, backup_destination_id, **kwargs): def delete_console_connection(self, db_node_id, console_connection_id, **kwargs): """ - DeleteConsoleConnection Deletes the specified Db node console connection. @@ -2604,7 +2574,6 @@ def delete_console_connection(self, db_node_id, console_connection_id, **kwargs) def delete_database(self, database_id, **kwargs): """ - DeleteDatabase Deletes the database. Applies only to Exadata DB systems. The data in this database is local to the DB system and will be lost when the database is deleted. Oracle recommends that you back up any data in the DB system prior to deleting it. You can use the `performFinalBackup` parameter to have the Exadata DB system database backed up before it is deleted. @@ -2701,7 +2670,6 @@ def delete_database(self, database_id, **kwargs): def delete_db_home(self, db_home_id, **kwargs): """ - DeleteDbHome Deletes a Database Home. Applies only to bare metal and Exadata DB systems. The Database Home and its database data are local to the DB system, and on a bare metal DB system, both are lost when you delete the Database Home. Oracle recommends that you back up any data on the DB system before you delete it. You can use the `performFinalBackup` parameter with this operation on bare metal DB systems. @@ -2795,7 +2763,6 @@ def delete_db_home(self, db_home_id, **kwargs): def delete_exadata_infrastructure(self, exadata_infrastructure_id, **kwargs): """ - Deletes the specified Exadata infrastructure. Deletes the Exadata infrastructure. @@ -2876,7 +2843,6 @@ def delete_exadata_infrastructure(self, exadata_infrastructure_id, **kwargs): def delete_vm_cluster(self, vm_cluster_id, **kwargs): """ Deletes the specified VM cluster. - Deletes the specified VM cluster. :param str vm_cluster_id: (required) @@ -2956,7 +2922,6 @@ def delete_vm_cluster(self, vm_cluster_id, **kwargs): def delete_vm_cluster_network(self, exadata_infrastructure_id, vm_cluster_network_id, **kwargs): """ Deletes the specified VM cluster network. - Deletes the specified VM cluster network. :param str exadata_infrastructure_id: (required) @@ -3041,7 +3006,6 @@ def delete_vm_cluster_network(self, exadata_infrastructure_id, vm_cluster_networ def deregister_autonomous_database_data_safe(self, autonomous_database_id, **kwargs): """ - Asynchronously deregisters Data Safe for this Autonomous Database. Asynchronously deregisters this Autonomous Database with Data Safe. @@ -3115,7 +3079,6 @@ def deregister_autonomous_database_data_safe(self, autonomous_database_id, **kwa def download_exadata_infrastructure_config_file(self, exadata_infrastructure_id, **kwargs): """ Downloads the configuration file for the specified Exadata infrastructure. - Downloads the configuration file for the specified Exadata infrastructure. :param str exadata_infrastructure_id: (required) @@ -3201,7 +3164,6 @@ def download_exadata_infrastructure_config_file(self, exadata_infrastructure_id, def download_vm_cluster_network_config_file(self, exadata_infrastructure_id, vm_cluster_network_id, **kwargs): """ Downloads the configuration file for the specified VM Cluster Network. - Downloads the configuration file for the specified VM Cluster Network. :param str exadata_infrastructure_id: (required) @@ -3292,7 +3254,6 @@ def download_vm_cluster_network_config_file(self, exadata_infrastructure_id, vm_ def failover_data_guard_association(self, database_id, data_guard_association_id, failover_data_guard_association_details, **kwargs): """ - Performs a failover to transition a standby database into the primary database role. Performs a failover to transition the standby database identified by the `databaseId` parameter into the specified Data Guard association's primary role after the existing primary database fails or becomes unreachable. @@ -3384,7 +3345,6 @@ def failover_data_guard_association(self, database_id, data_guard_association_id def generate_autonomous_data_warehouse_wallet(self, autonomous_data_warehouse_id, generate_autonomous_data_warehouse_wallet_details, **kwargs): """ - Creates and downloads a wallet for the specified Autonomous Data Warehouse. **Deprecated.** To create and download a wallet for an Autonomous Data Warehouse, use the :func:`generate_autonomous_database_wallet` operation. @@ -3476,7 +3436,6 @@ def generate_autonomous_data_warehouse_wallet(self, autonomous_data_warehouse_id def generate_autonomous_database_wallet(self, autonomous_database_id, generate_autonomous_database_wallet_details, **kwargs): """ Creates and downloads a wallet for the specified Autonomous Database. - Creates and downloads a wallet for the specified Autonomous Database. :param str autonomous_database_id: (required) @@ -3567,7 +3526,6 @@ def generate_autonomous_database_wallet(self, autonomous_database_id, generate_a def generate_recommended_vm_cluster_network(self, exadata_infrastructure_id, generate_recommended_network_details, **kwargs): """ Generates a recommended VM cluster network configuration. - Generates a recommended VM cluster network configuration. :param str exadata_infrastructure_id: (required) @@ -3657,7 +3615,6 @@ def generate_recommended_vm_cluster_network(self, exadata_infrastructure_id, gen def get_autonomous_container_database(self, autonomous_container_database_id, **kwargs): """ - GetAutonomousContainerDatabase Gets information about the specified Autonomous Container Database. @@ -3723,7 +3680,6 @@ def get_autonomous_container_database(self, autonomous_container_database_id, ** def get_autonomous_data_warehouse(self, autonomous_data_warehouse_id, **kwargs): """ - Gets the details of the specified Autonomous Data Warehouse. **Deprecated.** To get the details of an Autonomous Data Warehouse, use the :func:`get_autonomous_database` operation. @@ -3789,7 +3745,6 @@ def get_autonomous_data_warehouse(self, autonomous_data_warehouse_id, **kwargs): def get_autonomous_data_warehouse_backup(self, autonomous_data_warehouse_backup_id, **kwargs): """ - Gets information about the specified Autonomous Data Warehouse backup. **Deprecated.** To get information about a specified Autonomous Data Warehouse backup, use the :func:`get_autonomous_database_backup` operation. @@ -3856,7 +3811,6 @@ def get_autonomous_data_warehouse_backup(self, autonomous_data_warehouse_backup_ def get_autonomous_database(self, autonomous_database_id, **kwargs): """ Gets the details of the specified Autonomous Database. - Gets the details of the specified Autonomous Database. :param str autonomous_database_id: (required) @@ -3931,7 +3885,6 @@ def get_autonomous_database(self, autonomous_database_id, **kwargs): def get_autonomous_database_backup(self, autonomous_database_backup_id, **kwargs): """ Gets information about the specified Autonomous Database backup. - Gets information about the specified Autonomous Database backup. :param str autonomous_database_backup_id: (required) @@ -4005,7 +3958,6 @@ def get_autonomous_database_backup(self, autonomous_database_backup_id, **kwargs def get_autonomous_database_regional_wallet(self, **kwargs): """ - Get the regional wallet details for Autonomous Databases. Gets the Autonomous Database regional wallet details. @@ -4063,7 +4015,6 @@ def get_autonomous_database_regional_wallet(self, **kwargs): def get_autonomous_database_wallet(self, autonomous_database_id, **kwargs): """ - Get the wallet for the specified Autonomous Database. Gets the wallet details for the specified Autonomous Database. @@ -4138,7 +4089,6 @@ def get_autonomous_database_wallet(self, autonomous_database_id, **kwargs): def get_autonomous_exadata_infrastructure(self, autonomous_exadata_infrastructure_id, **kwargs): """ - GetAutonomousExadataInfrastructure Gets information about the specified Autonomous Exadata Infrastructure. @@ -4204,7 +4154,6 @@ def get_autonomous_exadata_infrastructure(self, autonomous_exadata_infrastructur def get_backup(self, backup_id, **kwargs): """ - GetBackup Gets information about the specified backup. @@ -4270,7 +4219,6 @@ def get_backup(self, backup_id, **kwargs): def get_backup_destination(self, backup_destination_id, **kwargs): """ - GetBackupDestination Gets information about the specified backup destination. @@ -4345,7 +4293,6 @@ def get_backup_destination(self, backup_destination_id, **kwargs): def get_console_connection(self, db_node_id, console_connection_id, **kwargs): """ - GetConsoleConnection Gets the specified Db node console connection's information. @@ -4415,7 +4362,6 @@ def get_console_connection(self, db_node_id, console_connection_id, **kwargs): def get_data_guard_association(self, database_id, data_guard_association_id, **kwargs): """ - Gets configuration information for the specified database and Data Guard association. Gets the specified Data Guard association's configuration information. @@ -4487,7 +4433,6 @@ def get_data_guard_association(self, database_id, data_guard_association_id, **k def get_database(self, database_id, **kwargs): """ - GetDatabase Gets information about a specific database. @@ -4553,7 +4498,6 @@ def get_database(self, database_id, **kwargs): def get_db_home(self, db_home_id, **kwargs): """ - GetDbHome Gets information about the specified Database Home. @@ -4619,7 +4563,6 @@ def get_db_home(self, db_home_id, **kwargs): def get_db_home_patch(self, db_home_id, patch_id, **kwargs): """ - GetDbHomePatch Gets information about a specified patch package. @@ -4691,7 +4634,6 @@ def get_db_home_patch(self, db_home_id, patch_id, **kwargs): def get_db_home_patch_history_entry(self, db_home_id, patch_history_entry_id, **kwargs): """ - GetDbHomePatchHistoryEntry Gets the patch history details for the specified patchHistoryEntryId @@ -4763,7 +4705,6 @@ def get_db_home_patch_history_entry(self, db_home_id, patch_history_entry_id, ** def get_db_node(self, db_node_id, **kwargs): """ - GetDbNode Gets information about the specified database node. @@ -4829,7 +4770,6 @@ def get_db_node(self, db_node_id, **kwargs): def get_db_system(self, db_system_id, **kwargs): """ - GetDbSystem Gets information about the specified DB system. @@ -4895,7 +4835,6 @@ def get_db_system(self, db_system_id, **kwargs): def get_db_system_patch(self, db_system_id, patch_id, **kwargs): """ - GetDbSystemPatch Gets information about a specified patch package. @@ -4967,7 +4906,6 @@ def get_db_system_patch(self, db_system_id, patch_id, **kwargs): def get_db_system_patch_history_entry(self, db_system_id, patch_history_entry_id, **kwargs): """ - GetDbSystemPatchHistoryEntry Gets the patch history details for the specified patchHistoryEntryId. @@ -5039,7 +4977,6 @@ def get_db_system_patch_history_entry(self, db_system_id, patch_history_entry_id def get_exadata_infrastructure(self, exadata_infrastructure_id, **kwargs): """ - GetExadataInfrastructure Gets information about the specified Exadata infrastructure. @@ -5263,7 +5200,6 @@ def get_exadata_iorm_config(self, db_system_id, **kwargs): def get_external_backup_job(self, backup_id, **kwargs): """ - GetExternalBackupJob Gets information about the specified external backup job. **Note:** This API is used by an Oracle Cloud Infrastructure Python script that is packaged with the Oracle Cloud Infrastructure CLI. Oracle recommends that you use the script instead using the API directly. See `Migrating an On-Premises Database to Oracle Cloud Infrastructure by Creating a Backup in the Cloud`__ for more information. @@ -5333,7 +5269,6 @@ def get_external_backup_job(self, backup_id, **kwargs): def get_maintenance_run(self, maintenance_run_id, **kwargs): """ - GetMaintenanceRun Gets information about the specified Maintenance Run. @@ -5397,7 +5332,6 @@ def get_maintenance_run(self, maintenance_run_id, **kwargs): def get_vm_cluster(self, vm_cluster_id, **kwargs): """ - GetVmCluster Gets information about the specified VM cluster. @@ -5472,7 +5406,6 @@ def get_vm_cluster(self, vm_cluster_id, **kwargs): def get_vm_cluster_network(self, exadata_infrastructure_id, vm_cluster_network_id, **kwargs): """ - GetVmClusterNetwork Gets information about the specified VM cluster network. @@ -5553,7 +5486,6 @@ def get_vm_cluster_network(self, exadata_infrastructure_id, vm_cluster_network_i def launch_autonomous_exadata_infrastructure(self, launch_autonomous_exadata_infrastructure_details, **kwargs): """ - LaunchAutonomousExadataInfrastructure Launches a new Autonomous Exadata Infrastructure in the specified compartment and availability domain. @@ -5622,7 +5554,6 @@ def launch_autonomous_exadata_infrastructure(self, launch_autonomous_exadata_inf def launch_db_system(self, launch_db_system_details, **kwargs): """ - LaunchDbSystem Creates a new DB system in the specified compartment and availability domain. The Oracle Database edition that you specify applies to all the databases on that DB system. The selected edition cannot be changed. @@ -5701,7 +5632,6 @@ def launch_db_system(self, launch_db_system_details, **kwargs): def list_autonomous_container_databases(self, compartment_id, **kwargs): """ - ListAutonomousContainerDatabases Gets a list of the Autonomous Container Databases in the specified compartment. @@ -5836,7 +5766,6 @@ def list_autonomous_container_databases(self, compartment_id, **kwargs): def list_autonomous_data_warehouse_backups(self, **kwargs): """ - Gets a list of Autonomous Data Warehouse backups. **Deprecated.** To get a list of Autonomous Data Warehouse backups, use the :func:`list_autonomous_database_backups` operation. @@ -5967,7 +5896,6 @@ def list_autonomous_data_warehouse_backups(self, **kwargs): def list_autonomous_data_warehouses(self, compartment_id, **kwargs): """ - Gets a list of Autonomous Data Warehouses. **Deprecated.** To get a list of Autonomous Data Warehouses, use the :func:`list_autonomous_databases` operation and specify `DW` as the workload type. @@ -6090,7 +6018,6 @@ def list_autonomous_data_warehouses(self, compartment_id, **kwargs): def list_autonomous_database_backups(self, **kwargs): """ - Gets a list of Autonomous Database backups. Gets a list of Autonomous Database backups based on either the `autonomousDatabaseId` or `compartmentId` specified as a query parameter. @@ -6227,7 +6154,6 @@ def list_autonomous_database_backups(self, **kwargs): def list_autonomous_databases(self, compartment_id, **kwargs): """ - Gets a list of Autonomous Database. Gets a list of Autonomous Databases. @@ -6388,7 +6314,6 @@ def list_autonomous_databases(self, compartment_id, **kwargs): def list_autonomous_db_preview_versions(self, compartment_id, **kwargs): """ - Gets a list of supported Autonomous Database versions. Gets a list of supported Autonomous Database versions. Note that preview version software is only available for databases with `shared Exadata infrastructure`__. @@ -6502,7 +6427,6 @@ def list_autonomous_db_preview_versions(self, compartment_id, **kwargs): def list_autonomous_db_versions(self, compartment_id, **kwargs): """ Gets a list of supported Autonomous Database versions. - Gets a list of supported Autonomous Database versions. :param str compartment_id: (required) @@ -6609,7 +6533,6 @@ def list_autonomous_db_versions(self, compartment_id, **kwargs): def list_autonomous_exadata_infrastructure_shapes(self, availability_domain, compartment_id, **kwargs): """ - ListAutonomousExadataInfrastructureShapes Gets a list of the shapes that can be used to launch a new Autonomous Exadata Infrastructure DB system. The shape determines resources to allocate to the DB system (CPU cores, memory and storage). @@ -6693,7 +6616,6 @@ def list_autonomous_exadata_infrastructure_shapes(self, availability_domain, com def list_autonomous_exadata_infrastructures(self, compartment_id, **kwargs): """ - ListAutonomousExadataInfrastructures Gets a list of the Autonomous Exadata Infrastructures in the specified compartment. @@ -6821,7 +6743,6 @@ def list_autonomous_exadata_infrastructures(self, compartment_id, **kwargs): def list_backup_destination(self, compartment_id, **kwargs): """ - ListBackupDestination Gets a list of backup destinations in the specified compartment. @@ -6906,7 +6827,6 @@ def list_backup_destination(self, compartment_id, **kwargs): def list_backups(self, **kwargs): """ - ListBackups Gets a list of backups based on the databaseId or compartmentId specified. Either one of the query parameters must be provided. @@ -6988,7 +6908,6 @@ def list_backups(self, **kwargs): def list_console_connections(self, db_node_id, **kwargs): """ - ListConsoleConnections Lists the console connections for the specified Db node. @@ -7055,7 +6974,6 @@ def list_console_connections(self, db_node_id, **kwargs): def list_data_guard_associations(self, database_id, **kwargs): """ Lists all Data Guard associations for the specified database. - Lists all Data Guard associations for the specified database. :param str database_id: (required) @@ -7139,7 +7057,6 @@ def list_data_guard_associations(self, database_id, **kwargs): def list_databases(self, compartment_id, **kwargs): """ - ListDatabases Gets a list of the databases in the specified Database Home. @@ -7274,7 +7191,6 @@ def list_databases(self, compartment_id, **kwargs): def list_db_home_patch_history_entries(self, db_home_id, **kwargs): """ - ListDbHomePatchHistoryEntries Gets history of the actions taken for patches for the specified Database Home. @@ -7359,7 +7275,6 @@ def list_db_home_patch_history_entries(self, db_home_id, **kwargs): def list_db_home_patches(self, db_home_id, **kwargs): """ - ListDbHomePatches Lists patches applicable to the requested Database Home. @@ -7444,7 +7359,6 @@ def list_db_home_patches(self, db_home_id, **kwargs): def list_db_homes(self, compartment_id, **kwargs): """ - ListDbHomes Gets a list of Database Homes in the specified DB system and compartment. A Database Home is a directory where Oracle Database software is installed. @@ -7586,7 +7500,6 @@ def list_db_homes(self, compartment_id, **kwargs): def list_db_nodes(self, compartment_id, **kwargs): """ - ListDbNodes Gets a list of database nodes in the specified DB system and compartment. A database node is a server running database software. @@ -7716,7 +7629,6 @@ def list_db_nodes(self, compartment_id, **kwargs): def list_db_system_patch_history_entries(self, db_system_id, **kwargs): """ - ListDbSystemPatchHistoryEntries Gets the history of the patch actions performed on the specified DB system. @@ -7801,7 +7713,6 @@ def list_db_system_patch_history_entries(self, db_system_id, **kwargs): def list_db_system_patches(self, db_system_id, **kwargs): """ - ListDbSystemPatches Lists the patches applicable to the requested DB system. @@ -7886,7 +7797,6 @@ def list_db_system_patches(self, db_system_id, **kwargs): def list_db_system_shapes(self, compartment_id, **kwargs): """ - ListDbSystemShapes Gets a list of the shapes that can be used to launch a new DB system. The shape determines resources to allocate to the DB system - CPU cores and memory for VM shapes; CPU cores, memory and storage for non-VM (or bare metal) shapes. @@ -7965,7 +7875,6 @@ def list_db_system_shapes(self, compartment_id, **kwargs): def list_db_systems(self, compartment_id, **kwargs): """ - ListDbSystems Gets a list of the DB systems in the specified compartment. You can specify a backupId to list only the DB systems that support creating a database using this backup in this compartment. @@ -8100,7 +8009,6 @@ def list_db_systems(self, compartment_id, **kwargs): def list_db_versions(self, compartment_id, **kwargs): """ - ListDbVersions Gets a list of supported Oracle Database versions. @@ -8202,7 +8110,6 @@ def list_db_versions(self, compartment_id, **kwargs): def list_exadata_infrastructures(self, compartment_id, **kwargs): """ - ListExadataInfrastructures Gets a list of the Exadata infrastructure in the specified compartment. @@ -8329,7 +8236,6 @@ def list_exadata_infrastructures(self, compartment_id, **kwargs): def list_gi_versions(self, compartment_id, **kwargs): """ - ListGiVersions Gets a list of supported GI versions for VM Cluster. @@ -8422,7 +8328,6 @@ def list_gi_versions(self, compartment_id, **kwargs): def list_maintenance_runs(self, compartment_id, **kwargs): """ - ListMaintenanceRuns Gets a list of the Maintenance Runs in the specified compartment. @@ -8578,7 +8483,6 @@ def list_maintenance_runs(self, compartment_id, **kwargs): def list_vm_cluster_networks(self, exadata_infrastructure_id, compartment_id, **kwargs): """ - ListVmClusterNetworks Gets a list of the VM cluster networks in the specified compartment. @@ -8722,7 +8626,6 @@ def list_vm_cluster_networks(self, exadata_infrastructure_id, compartment_id, ** def list_vm_clusters(self, compartment_id, **kwargs): """ - ListVmClusters Gets a list of the VM clusters in the specified compartment. @@ -8855,7 +8758,6 @@ def list_vm_clusters(self, compartment_id, **kwargs): def register_autonomous_database_data_safe(self, autonomous_database_id, **kwargs): """ Asynchronously registers this Autonomous Database with Data Safe. - Asynchronously registers this Autonomous Database with Data Safe. :param str autonomous_database_id: (required) @@ -8927,7 +8829,6 @@ def register_autonomous_database_data_safe(self, autonomous_database_id, **kwarg def reinstate_data_guard_association(self, database_id, data_guard_association_id, reinstate_data_guard_association_details, **kwargs): """ - Reinstates a database to a Data Guard association standby role. Reinstates the database identified by the `databaseId` parameter into the standby role in a Data Guard association. @@ -9016,7 +8917,6 @@ def reinstate_data_guard_association(self, database_id, data_guard_association_i def restart_autonomous_container_database(self, autonomous_container_database_id, **kwargs): """ Rolling restarts the specified Autonomous Container Database. - Rolling restarts the specified Autonomous Container Database. :param str autonomous_container_database_id: (required) @@ -9097,7 +8997,6 @@ def restart_autonomous_container_database(self, autonomous_container_database_id def restart_autonomous_database(self, autonomous_database_id, **kwargs): """ - Restarts the specified Autonomous Database. Restarts the specified Autonomous Database. Restart supported only for databases using dedicated Exadata infrastructure. @@ -9174,7 +9073,6 @@ def restart_autonomous_database(self, autonomous_database_id, **kwargs): def restore_autonomous_data_warehouse(self, autonomous_data_warehouse_id, restore_autonomous_data_warehouse_details, **kwargs): """ - Restores an Autonomous Data Warehouse based on the provided request parameters. **Deprecated.** To restore an Autonomous Data Warehouse, use the :func:`restore_autonomous_database` operation. @@ -9257,7 +9155,6 @@ def restore_autonomous_data_warehouse(self, autonomous_data_warehouse_id, restor def restore_autonomous_database(self, autonomous_database_id, restore_autonomous_database_details, **kwargs): """ Restores an Autonomous Database based on the provided request parameters. - Restores an Autonomous Database based on the provided request parameters. :param str autonomous_database_id: (required) @@ -9338,7 +9235,6 @@ def restore_autonomous_database(self, autonomous_database_id, restore_autonomous def restore_database(self, database_id, restore_database_details, **kwargs): """ - RestoreDatabase Restore a Database based on the request parameters you provide. @@ -9420,7 +9316,6 @@ def restore_database(self, database_id, restore_database_details, **kwargs): def start_autonomous_data_warehouse(self, autonomous_data_warehouse_id, **kwargs): """ - Starts the specified autonomous Data Warehouse. **Deprecated.** To start an Autonomous Data Warehouse, use the :func:`start_autonomous_database` operation. @@ -9498,7 +9393,6 @@ def start_autonomous_data_warehouse(self, autonomous_data_warehouse_id, **kwargs def start_autonomous_database(self, autonomous_database_id, **kwargs): """ Starts the specified Autonomous Database. - Starts the specified Autonomous Database. :param str autonomous_database_id: (required) @@ -9574,7 +9468,6 @@ def start_autonomous_database(self, autonomous_database_id, **kwargs): def stop_autonomous_data_warehouse(self, autonomous_data_warehouse_id, **kwargs): """ - Stops the specified Autonomous Data Warehouse. **Deprecated.** To stop an Autonomous Data Warehouse, use the :func:`stop_autonomous_database` operation. @@ -9652,7 +9545,6 @@ def stop_autonomous_data_warehouse(self, autonomous_data_warehouse_id, **kwargs) def stop_autonomous_database(self, autonomous_database_id, **kwargs): """ Stops the specified Autonomous Database. - Stops the specified Autonomous Database. :param str autonomous_database_id: (required) @@ -9733,7 +9625,6 @@ def stop_autonomous_database(self, autonomous_database_id, **kwargs): def switchover_data_guard_association(self, database_id, data_guard_association_id, switchover_data_guard_association_details, **kwargs): """ - Performs a switchover to transition the primary database of a Data Guard association into a standby role. Performs a switchover to transition the primary database of a Data Guard association into a standby role. The standby database associated with the `dataGuardAssociationId` assumes the primary database role. @@ -9824,7 +9715,6 @@ def switchover_data_guard_association(self, database_id, data_guard_association_ def terminate_autonomous_container_database(self, autonomous_container_database_id, **kwargs): """ - TerminiateAutonomousContainerDatabase Terminates an Autonomous Container Database, which permanently deletes the container database and any databases within the container database. The database data is local to the Autonomous Exadata Infrastructure and will be lost when the container database is terminated. Oracle recommends that you back up any data in the Autonomous Container Database prior to terminating it. @@ -9899,7 +9789,6 @@ def terminate_autonomous_container_database(self, autonomous_container_database_ def terminate_autonomous_exadata_infrastructure(self, autonomous_exadata_infrastructure_id, **kwargs): """ - TerminateAutonomousExadataInfrastructure Terminates an Autonomous Exadata Infrastructure, which permanently deletes the Exadata Infrastructure and any container databases and databases contained in the Exadata Infrastructure. The database data is local to the Autonomous Exadata Infrastructure and will be lost when the system is terminated. Oracle recommends that you back up any data in the Autonomous Exadata Infrastructure prior to terminating it. @@ -9974,7 +9863,6 @@ def terminate_autonomous_exadata_infrastructure(self, autonomous_exadata_infrast def terminate_db_system(self, db_system_id, **kwargs): """ - TerminateDbSystem Terminates a DB system and permanently deletes it and any databases running on it, and any storage volumes attached to it. The database data is local to the DB system and will be lost when the system is terminated. Oracle recommends that you back up any data in the DB system prior to terminating it. @@ -10049,7 +9937,6 @@ def terminate_db_system(self, db_system_id, **kwargs): def update_autonomous_container_database(self, autonomous_container_database_id, update_autonomous_container_database_details, **kwargs): """ - UpdateAutonomousContainerDatabase Updates the properties of an Autonomous Container Database, such as the OCPU core count and storage size. @@ -10131,7 +10018,6 @@ def update_autonomous_container_database(self, autonomous_container_database_id, def update_autonomous_data_warehouse(self, autonomous_data_warehouse_id, update_autonomous_data_warehouse_details, **kwargs): """ - Updates the specified Autonomous Data Warehouse with new CPU core count and size. **Deprecated.** To update the CPU core count and storage size of an Autonomous Data Warehouse, use the :func:`update_autonomous_database` operation. @@ -10213,7 +10099,6 @@ def update_autonomous_data_warehouse(self, autonomous_data_warehouse_id, update_ def update_autonomous_database(self, autonomous_database_id, update_autonomous_database_details, **kwargs): """ - Updates the specified Autonomous Database with new OCPU core count and size. Updates one or more attributes of the specified Autonomous Database. See the UpdateAutonomousDatabaseDetails resource for a full list of attributes that can be updated. @@ -10300,7 +10185,6 @@ def update_autonomous_database(self, autonomous_database_id, update_autonomous_d def update_autonomous_database_regional_wallet(self, update_autonomous_database_wallet_details, **kwargs): """ - Update the regional wallet for Autonomous Database. Updates the Autonomous Database regional wallet. @@ -10362,7 +10246,6 @@ def update_autonomous_database_regional_wallet(self, update_autonomous_database_ def update_autonomous_database_wallet(self, autonomous_database_id, update_autonomous_database_wallet_details, **kwargs): """ Updates the wallet for the specified Autonomous Database. - Updates the wallet for the specified Autonomous Database. :param str autonomous_database_id: (required) @@ -10439,7 +10322,6 @@ def update_autonomous_database_wallet(self, autonomous_database_id, update_auton def update_autonomous_exadata_infrastructure(self, autonomous_exadata_infrastructure_id, update_autonomous_exadata_infrastructures_details, **kwargs): """ - UpdateAutonomousExadataInfrastructure Updates the properties of an Autonomous Exadata Infrastructure, such as the CPU core count. @@ -10521,7 +10403,6 @@ def update_autonomous_exadata_infrastructure(self, autonomous_exadata_infrastruc def update_backup_destination(self, backup_destination_id, update_backup_destination_details, **kwargs): """ - Updates the specified backup destination. If no database is associated with the backup destination: - For a RECOVERY_APPLIANCE backup destination, updates the connection string and/or the list of VPC users. - For an NFS backup destination, updates the NFS location. @@ -10611,7 +10492,6 @@ def update_backup_destination(self, backup_destination_id, update_backup_destina def update_database(self, database_id, update_database_details, **kwargs): """ - UpdateDatabase Update a Database based on the request parameters you provide. @@ -10693,7 +10573,6 @@ def update_database(self, database_id, update_database_details, **kwargs): def update_db_home(self, db_home_id, update_db_home_details, **kwargs): """ - UpdateDbHome Patches the specified dbHome. @@ -10775,7 +10654,6 @@ def update_db_home(self, db_home_id, update_db_home_details, **kwargs): def update_db_system(self, db_system_id, update_db_system_details, **kwargs): """ - UpdateDbSystem Updates the properties of a DB system, such as the CPU core count. @@ -10857,7 +10735,6 @@ def update_db_system(self, db_system_id, update_db_system_details, **kwargs): def update_exadata_infrastructure(self, exadata_infrastructure_id, update_exadata_infrastructure_details, **kwargs): """ - Updates the specified Exadata Infrastructure Updates the Exadata infrastructure. @@ -11030,7 +10907,6 @@ def update_exadata_iorm_config(self, db_system_id, exadata_iorm_config_update_de def update_maintenance_run(self, maintenance_run_id, update_maintenance_run_details, **kwargs): """ - UpdateMaintenanceRun Updates the properties of a Maintenance Run, such as the state of a Maintenance Run. @@ -11111,7 +10987,6 @@ def update_maintenance_run(self, maintenance_run_id, update_maintenance_run_deta def update_vm_cluster(self, vm_cluster_id, update_vm_cluster_details, **kwargs): """ Updates the specified VM cluster. - Updates the specified VM cluster. :param str vm_cluster_id: (required) @@ -11198,7 +11073,6 @@ def update_vm_cluster(self, vm_cluster_id, update_vm_cluster_details, **kwargs): def update_vm_cluster_network(self, exadata_infrastructure_id, vm_cluster_network_id, update_vm_cluster_network_details, **kwargs): """ Updates the specified VM cluster network. - Updates the specified VM cluster network. :param str exadata_infrastructure_id: (required) @@ -11291,7 +11165,6 @@ def update_vm_cluster_network(self, exadata_infrastructure_id, vm_cluster_networ def validate_vm_cluster_network(self, exadata_infrastructure_id, vm_cluster_network_id, **kwargs): """ Validates the specified VM cluster network. - Validates the specified VM cluster network. :param str exadata_infrastructure_id: (required) diff --git a/src/oci/dts/appliance_export_job_client.py b/src/oci/dts/appliance_export_job_client.py index 44b16cf8ca..3283b67740 100644 --- a/src/oci/dts/appliance_export_job_client.py +++ b/src/oci/dts/appliance_export_job_client.py @@ -82,7 +82,6 @@ def __init__(self, config, **kwargs): def change_appliance_export_job_compartment(self, appliance_export_job_id, change_appliance_export_job_compartment_details, **kwargs): """ - Move a job into a different compartment. When provided, if-Match is matched against ETag values of the resource. Moves a ApplianceExportJob into a different compartment. @@ -176,7 +175,6 @@ def change_appliance_export_job_compartment(self, appliance_export_job_id, chang def create_appliance_export_job(self, create_appliance_export_job_details, **kwargs): """ - Creates a new Appliance Export Job Creates a new Appliance Export Job that corresponds with customer's logical dataset @@ -252,7 +250,6 @@ def create_appliance_export_job(self, create_appliance_export_job_details, **kwa def delete_appliance_export_job(self, appliance_export_job_id, **kwargs): """ deletes a Appliance Export Job - deletes a Appliance Export Job :param str appliance_export_job_id: (required) @@ -330,7 +327,6 @@ def delete_appliance_export_job(self, appliance_export_job_id, **kwargs): def get_appliance_export_job(self, appliance_export_job_id, **kwargs): """ Describes a Appliance Export Job in detail - Describes a Appliance Export Job in detail :param str appliance_export_job_id: (required) @@ -404,7 +400,6 @@ def get_appliance_export_job(self, appliance_export_job_id, **kwargs): def list_appliance_export_jobs(self, compartment_id, **kwargs): """ Lists Appliance Export Jobs in a given compartment - Lists Appliance Export Jobs in a given compartment :param str compartment_id: (required) @@ -511,7 +506,6 @@ def list_appliance_export_jobs(self, compartment_id, **kwargs): def update_appliance_export_job(self, appliance_export_job_id, update_appliance_export_job_details, **kwargs): """ - Updates an Appliance Export Job Updates a Appliance Export Job that corresponds with customer's logical dataset. diff --git a/src/oci/dts/shipping_vendors_client.py b/src/oci/dts/shipping_vendors_client.py index ace7b3c74f..8847eac7db 100644 --- a/src/oci/dts/shipping_vendors_client.py +++ b/src/oci/dts/shipping_vendors_client.py @@ -83,7 +83,6 @@ def __init__(self, config, **kwargs): def list_shipping_vendors(self, **kwargs): """ Lists available shipping vendors for Transfer Package delivery - Lists available shipping vendors for Transfer Package delivery :param obj retry_strategy: (optional) diff --git a/src/oci/dts/transfer_appliance_client.py b/src/oci/dts/transfer_appliance_client.py index 3bb2210aca..b3476b4524 100644 --- a/src/oci/dts/transfer_appliance_client.py +++ b/src/oci/dts/transfer_appliance_client.py @@ -83,7 +83,6 @@ def __init__(self, config, **kwargs): def create_transfer_appliance(self, id, **kwargs): """ Create a new Transfer Appliance - Create a new Transfer Appliance :param str id: (required) @@ -163,7 +162,6 @@ def create_transfer_appliance(self, id, **kwargs): def create_transfer_appliance_admin_credentials(self, id, transfer_appliance_label, admin_public_key, **kwargs): """ Creates an X.509 certificate from a public key - Creates an X.509 certificate from a public key :param str id: (required) @@ -235,7 +233,6 @@ def create_transfer_appliance_admin_credentials(self, id, transfer_appliance_lab def delete_transfer_appliance(self, id, transfer_appliance_label, **kwargs): """ deletes a transfer Appliance - deletes a transfer Appliance :param str id: (required) @@ -301,7 +298,6 @@ def delete_transfer_appliance(self, id, transfer_appliance_label, **kwargs): def get_transfer_appliance(self, id, transfer_appliance_label, **kwargs): """ Describes a transfer appliance in detail - Describes a transfer appliance in detail :param str id: (required) @@ -369,7 +365,6 @@ def get_transfer_appliance(self, id, transfer_appliance_label, **kwargs): def get_transfer_appliance_certificate_authority_certificate(self, id, transfer_appliance_label, **kwargs): """ Gets the x.509 certificate for the Transfer Appliance's dedicated Certificate Authority (CA) - Gets the x.509 certificate for the Transfer Appliance's dedicated Certificate Authority (CA) :param str id: (required) @@ -436,7 +431,6 @@ def get_transfer_appliance_certificate_authority_certificate(self, id, transfer_ def get_transfer_appliance_encryption_passphrase(self, id, transfer_appliance_label, **kwargs): """ - Describes a transfer appliance encryptionPassphrase Describes a transfer appliance encryptionPassphrase in detail @@ -505,7 +499,6 @@ def get_transfer_appliance_encryption_passphrase(self, id, transfer_appliance_la def list_transfer_appliances(self, id, **kwargs): """ Lists Transfer Appliances associated with a transferJob - Lists Transfer Appliances associated with a transferJob :param str id: (required) @@ -592,7 +585,6 @@ def list_transfer_appliances(self, id, **kwargs): def update_transfer_appliance(self, id, transfer_appliance_label, update_transfer_appliance_details, **kwargs): """ Updates a Transfer Appliance - Updates a Transfer Appliance :param str id: (required) diff --git a/src/oci/dts/transfer_appliance_entitlement_client.py b/src/oci/dts/transfer_appliance_entitlement_client.py index 1f335c58fd..d81963d79c 100644 --- a/src/oci/dts/transfer_appliance_entitlement_client.py +++ b/src/oci/dts/transfer_appliance_entitlement_client.py @@ -82,7 +82,6 @@ def __init__(self, config, **kwargs): def create_transfer_appliance_entitlement(self, create_transfer_appliance_entitlement_details, **kwargs): """ - Create the Transfer Appliance Entitlement Create the Entitlement to use a Transfer Appliance. It requires some offline process of review and signatures before request is granted. @@ -158,7 +157,6 @@ def create_transfer_appliance_entitlement(self, create_transfer_appliance_entitl def get_transfer_appliance_entitlement(self, id, **kwargs): """ Describes the Transfer Appliance Entitlement in detail - Describes the Transfer Appliance Entitlement in detail :param str id: (required) @@ -243,7 +241,6 @@ def get_transfer_appliance_entitlement(self, id, **kwargs): def list_transfer_appliance_entitlement(self, compartment_id, **kwargs): """ Lists Transfer Transfer Appliance Entitlement - Lists Transfer Transfer Appliance Entitlement :param str compartment_id: (required) diff --git a/src/oci/dts/transfer_device_client.py b/src/oci/dts/transfer_device_client.py index 7feef92804..0af3984732 100644 --- a/src/oci/dts/transfer_device_client.py +++ b/src/oci/dts/transfer_device_client.py @@ -83,7 +83,6 @@ def __init__(self, config, **kwargs): def create_transfer_device(self, id, create_transfer_device_details, **kwargs): """ Create a new Transfer Device - Create a new Transfer Device :param str id: (required) @@ -162,7 +161,6 @@ def create_transfer_device(self, id, create_transfer_device_details, **kwargs): def delete_transfer_device(self, id, transfer_device_label, **kwargs): """ deletes a transfer Device - deletes a transfer Device :param str id: (required) @@ -227,7 +225,6 @@ def delete_transfer_device(self, id, transfer_device_label, **kwargs): def get_transfer_device(self, id, transfer_device_label, **kwargs): """ - Describes a transfer Device in detail Describes a transfer package in detail @@ -296,7 +293,6 @@ def get_transfer_device(self, id, transfer_device_label, **kwargs): def list_transfer_devices(self, id, **kwargs): """ Lists Transfer Devices associated with a transferJob - Lists Transfer Devices associated with a transferJob :param str id: (required) @@ -388,7 +384,6 @@ def list_transfer_devices(self, id, **kwargs): def update_transfer_device(self, id, transfer_device_label, update_transfer_device_details, **kwargs): """ Updates a Transfer Device - Updates a Transfer Device :param str id: (required) diff --git a/src/oci/dts/transfer_job_client.py b/src/oci/dts/transfer_job_client.py index 5e72e14e50..8af28182bf 100644 --- a/src/oci/dts/transfer_job_client.py +++ b/src/oci/dts/transfer_job_client.py @@ -82,7 +82,6 @@ def __init__(self, config, **kwargs): def change_transfer_job_compartment(self, transfer_job_id, change_transfer_job_compartment_details, **kwargs): """ - Move a job into a different compartment. When provided, if-Match is matched against ETag values of the resource. Moves a TransferJob into a different compartment. @@ -176,7 +175,6 @@ def change_transfer_job_compartment(self, transfer_job_id, change_transfer_job_c def create_transfer_job(self, create_transfer_job_details, **kwargs): """ - Create a new Transfer Job Create a new Transfer Job that corresponds with customer's logical dataset e.g. a DB or a filesystem. @@ -247,7 +245,6 @@ def create_transfer_job(self, create_transfer_job_details, **kwargs): def delete_transfer_job(self, id, **kwargs): """ deletes a transfer job - deletes a transfer job :param str id: (required) @@ -319,7 +316,6 @@ def delete_transfer_job(self, id, **kwargs): def get_transfer_job(self, id, **kwargs): """ Describes a transfer job in detail - Describes a transfer job in detail :param str id: (required) @@ -393,7 +389,6 @@ def get_transfer_job(self, id, **kwargs): def list_transfer_jobs(self, compartment_id, **kwargs): """ Lists Transfer Jobs in a given compartment - Lists Transfer Jobs in a given compartment :param str compartment_id: (required) @@ -500,7 +495,6 @@ def list_transfer_jobs(self, compartment_id, **kwargs): def update_transfer_job(self, id, update_transfer_job_details, **kwargs): """ - Updates a Transfer Job Updates a Transfer Job that corresponds with customer's logical dataset e.g. a DB or a filesystem. diff --git a/src/oci/dts/transfer_package_client.py b/src/oci/dts/transfer_package_client.py index 5843f63379..33abd65983 100644 --- a/src/oci/dts/transfer_package_client.py +++ b/src/oci/dts/transfer_package_client.py @@ -83,7 +83,6 @@ def __init__(self, config, **kwargs): def attach_devices_to_transfer_package(self, id, transfer_package_label, attach_devices_details, **kwargs): """ Attaches Devices to a Transfer Package - Attaches Devices to a Transfer Package :param str id: (required) @@ -154,7 +153,6 @@ def attach_devices_to_transfer_package(self, id, transfer_package_label, attach_ def create_transfer_package(self, id, **kwargs): """ Create a new Transfer Package - Create a new Transfer Package :param str id: (required) @@ -234,7 +232,6 @@ def create_transfer_package(self, id, **kwargs): def delete_transfer_package(self, id, transfer_package_label, **kwargs): """ deletes a transfer Package - deletes a transfer Package :param str id: (required) @@ -300,7 +297,6 @@ def delete_transfer_package(self, id, transfer_package_label, **kwargs): def detach_devices_from_transfer_package(self, id, transfer_package_label, detach_devices_details, **kwargs): """ Detaches Devices from a Transfer Package - Detaches Devices from a Transfer Package :param str id: (required) @@ -370,7 +366,6 @@ def detach_devices_from_transfer_package(self, id, transfer_package_label, detac def get_transfer_package(self, id, transfer_package_label, **kwargs): """ - Describes a transfer Package in detail Describes a transfer package in detail @@ -439,7 +434,6 @@ def get_transfer_package(self, id, transfer_package_label, **kwargs): def list_transfer_packages(self, id, **kwargs): """ Lists Transfer Packages associated with a transferJob - Lists Transfer Packages associated with a transferJob :param str id: (required) @@ -531,7 +525,6 @@ def list_transfer_packages(self, id, **kwargs): def update_transfer_package(self, id, transfer_package_label, update_transfer_package_details, **kwargs): """ Updates a Transfer Package - Updates a Transfer Package :param str id: (required) diff --git a/src/oci/email/email_client.py b/src/oci/email/email_client.py index 49759a8c4a..590fbbe962 100644 --- a/src/oci/email/email_client.py +++ b/src/oci/email/email_client.py @@ -86,7 +86,6 @@ def __init__(self, config, **kwargs): def change_sender_compartment(self, sender_id, change_sender_compartment_details, **kwargs): """ - Moves a sender into a different compartment. Moves a sender into a different compartment. When provided, If-Match is checked against ETag values of the resource. @@ -170,7 +169,6 @@ def change_sender_compartment(self, sender_id, change_sender_compartment_details def create_sender(self, create_sender_details, **kwargs): """ Creates a sender for a tenancy in a given compartment. - Creates a sender for a tenancy in a given compartment. :param CreateSenderDetails create_sender_details: (required) @@ -232,7 +230,6 @@ def create_sender(self, create_sender_details, **kwargs): def create_suppression(self, create_suppression_details, **kwargs): """ - Creates an email suppression for a tenancy. Adds recipient email addresses to the suppression list for a tenancy. Addresses added to the suppression list via the API are denoted as \"MANUAL\" in the `reason` field. *Note:* All email addresses added to the @@ -298,7 +295,6 @@ def create_suppression(self, create_suppression_details, **kwargs): def delete_sender(self, sender_id, **kwargs): """ - Deletes a sender for a tenancy in a given compartment. Deletes an approved sender for a tenancy in a given compartment for a provided `senderId`. @@ -377,7 +373,6 @@ def delete_sender(self, sender_id, **kwargs): def delete_suppression(self, suppression_id, **kwargs): """ - Deletes a suppressed email address. Removes a suppressed recipient email address from the suppression list for a tenancy in a given compartment for a provided `suppressionId`. @@ -449,7 +444,6 @@ def delete_suppression(self, suppression_id, **kwargs): def get_sender(self, sender_id, **kwargs): """ - Gets an approved sender. Gets an approved sender for a given `senderId`. @@ -522,7 +516,6 @@ def get_sender(self, sender_id, **kwargs): def get_suppression(self, suppression_id, **kwargs): """ - Get a suppressed email address. Gets the details of a suppressed recipient email address for a given `suppressionId`. Each suppression is given a unique OCID. @@ -596,7 +589,6 @@ def get_suppression(self, suppression_id, **kwargs): def list_senders(self, compartment_id, **kwargs): """ - Get a list of approved sender summaries. Gets a collection of approved sender email addresses and sender IDs. @@ -732,7 +724,6 @@ def list_senders(self, compartment_id, **kwargs): def list_suppressions(self, compartment_id, **kwargs): """ - Get a summary of suppressed email addresses. Gets a list of suppressed recipient email addresses for a user. The `compartmentId` for suppressions must be a tenancy OCID. The returned list is sorted by creation time in descending order. @@ -880,7 +871,6 @@ def list_suppressions(self, compartment_id, **kwargs): def update_sender(self, sender_id, update_sender_details, **kwargs): """ - Updates the tags for a given sender. Replaces the set of tags for a sender with the tags provided. If either freeform or defined tags are omitted, the tags for that set remain the same. Each set must include the full set of tags for the sender, partial updates are not permitted. diff --git a/src/oci/events/events_client.py b/src/oci/events/events_client.py index 9c15b10890..d7ff3468d0 100644 --- a/src/oci/events/events_client.py +++ b/src/oci/events/events_client.py @@ -83,7 +83,6 @@ def __init__(self, config, **kwargs): def change_rule_compartment(self, rule_id, change_rule_compartment_details, **kwargs): """ - Moves a rule into a different compartment. When provided, If-Match is checked against ETag values of the resource. Moves a rule into a different compartment within the same tenancy. For information about moving resources between compartments, see `Moving Resources to a Different Compartment`__. @@ -182,7 +181,6 @@ def change_rule_compartment(self, rule_id, change_rule_compartment_details, **kw def create_rule(self, create_rule_details, **kwargs): """ - Creates a new rule Creates a new rule. @@ -257,7 +255,6 @@ def create_rule(self, create_rule_details, **kwargs): def delete_rule(self, rule_id, **kwargs): """ - Deletes a rule Deletes a rule. @@ -338,7 +335,6 @@ def delete_rule(self, rule_id, **kwargs): def get_rule(self, rule_id, **kwargs): """ - Retrieves a rule Retrieves a rule. @@ -415,7 +411,6 @@ def get_rule(self, rule_id, **kwargs): def list_rules(self, compartment_id, **kwargs): """ Lists rules for this compartment. - Lists rules for this compartment. :param str compartment_id: (required) @@ -561,7 +556,6 @@ def list_rules(self, compartment_id, **kwargs): def update_rule(self, rule_id, update_rule_details, **kwargs): """ - Updates a rule Updates a rule. diff --git a/src/oci/file_storage/file_storage_client.py b/src/oci/file_storage/file_storage_client.py index cc9a03c471..8b2580dada 100644 --- a/src/oci/file_storage/file_storage_client.py +++ b/src/oci/file_storage/file_storage_client.py @@ -82,7 +82,6 @@ def __init__(self, config, **kwargs): def change_file_system_compartment(self, file_system_id, change_file_system_compartment_details, **kwargs): """ - ChangeFileSystemCompartment Moves a file system and its associated snapshots into a different compartment within the same tenancy. For information about moving resources between compartments, see `Moving Resources to a Different Compartment`__ __ https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes @@ -170,7 +169,6 @@ def change_file_system_compartment(self, file_system_id, change_file_system_comp def change_mount_target_compartment(self, mount_target_id, change_mount_target_compartment_details, **kwargs): """ - ChangeMountTargetCompartment Moves a mount target and its associated export set into a different compartment within the same tenancy. For information about moving resources between compartments, see `Moving Resources to a Different Compartment`__ __ https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes @@ -258,7 +256,6 @@ def change_mount_target_compartment(self, mount_target_id, change_mount_target_c def create_export(self, create_export_details, **kwargs): """ - CreateExport Creates a new export in the specified export set, path, and file system. @@ -334,7 +331,6 @@ def create_export(self, create_export_details, **kwargs): def create_file_system(self, create_file_system_details, **kwargs): """ - CreateFileSystem Creates a new file system in the specified compartment and availability domain. Instances can mount file systems in another availability domain, but doing so might increase @@ -441,7 +437,6 @@ def create_file_system(self, create_file_system_details, **kwargs): def create_mount_target(self, create_mount_target_details, **kwargs): """ - CreateMountTarget Creates a new mount target in the specified compartment and subnet. You can associate a file system with a mount target only when they exist in the same availability domain. Instances @@ -550,7 +545,6 @@ def create_mount_target(self, create_mount_target_details, **kwargs): def create_snapshot(self, create_snapshot_details, **kwargs): """ - CreateSnapshot Creates a new snapshot of the specified file system. You can access the snapshot at `.snapshot/`. @@ -626,7 +620,6 @@ def create_snapshot(self, create_snapshot_details, **kwargs): def delete_export(self, export_id, **kwargs): """ - DeleteExport Deletes the specified export. @@ -707,7 +700,6 @@ def delete_export(self, export_id, **kwargs): def delete_file_system(self, file_system_id, **kwargs): """ - DeleteFileSystem Deletes the specified file system. Before you delete the file system, verify that no remaining export resources still reference it. Deleting a file system also deletes all of its snapshots. @@ -790,7 +782,6 @@ def delete_file_system(self, file_system_id, **kwargs): def delete_mount_target(self, mount_target_id, **kwargs): """ - DeleteMountTarget Deletes the specified mount target. This operation also deletes the mount target's VNICs. @@ -872,7 +863,6 @@ def delete_mount_target(self, mount_target_id, **kwargs): def delete_snapshot(self, snapshot_id, **kwargs): """ - DeleteSnapshot Deletes the specified snapshot. @@ -953,7 +943,6 @@ def delete_snapshot(self, snapshot_id, **kwargs): def get_export(self, export_id, **kwargs): """ - GetExport Gets the specified export's information. @@ -1027,7 +1016,6 @@ def get_export(self, export_id, **kwargs): def get_export_set(self, export_set_id, **kwargs): """ - GetExportSet Gets the specified export set's information. @@ -1101,7 +1089,6 @@ def get_export_set(self, export_set_id, **kwargs): def get_file_system(self, file_system_id, **kwargs): """ - GetFileSystem Gets the specified file system's information. @@ -1175,7 +1162,6 @@ def get_file_system(self, file_system_id, **kwargs): def get_mount_target(self, mount_target_id, **kwargs): """ - GetMountTarget Gets the specified mount target's information. @@ -1249,7 +1235,6 @@ def get_mount_target(self, mount_target_id, **kwargs): def get_snapshot(self, snapshot_id, **kwargs): """ - GetSnapshot Gets the specified snapshot's information. @@ -1323,7 +1308,6 @@ def get_snapshot(self, snapshot_id, **kwargs): def list_export_sets(self, compartment_id, availability_domain, **kwargs): """ - ListExportSets Lists the export set resources in the specified compartment. @@ -1484,7 +1468,6 @@ def list_export_sets(self, compartment_id, availability_domain, **kwargs): def list_exports(self, **kwargs): """ - ListExports Lists export resources by compartment, file system, or export set. You must specify an export set ID, a file system ID, and / or a compartment ID. @@ -1645,7 +1628,6 @@ def list_exports(self, **kwargs): def list_file_systems(self, compartment_id, availability_domain, **kwargs): """ - ListFileSystems Lists the file system resources in the specified compartment. @@ -1806,7 +1788,6 @@ def list_file_systems(self, compartment_id, availability_domain, **kwargs): def list_mount_targets(self, compartment_id, availability_domain, **kwargs): """ - ListMountTargets Lists the mount target resources in the specified compartment. @@ -1972,7 +1953,6 @@ def list_mount_targets(self, compartment_id, availability_domain, **kwargs): def list_snapshots(self, file_system_id, **kwargs): """ - ListSnapshots Lists snapshots of the specified file system. @@ -2103,7 +2083,6 @@ def list_snapshots(self, file_system_id, **kwargs): def update_export(self, export_id, update_export_details, **kwargs): """ - UpdateExport Updates the specified export's information. @@ -2191,7 +2170,6 @@ def update_export(self, export_id, update_export_details, **kwargs): def update_export_set(self, export_set_id, update_export_set_details, **kwargs): """ - UpdateExportSet Updates the specified export set's information. @@ -2279,7 +2257,6 @@ def update_export_set(self, export_set_id, update_export_set_details, **kwargs): def update_file_system(self, file_system_id, update_file_system_details, **kwargs): """ - UpdateFileSystem Updates the specified file system's information. You can use this operation to rename a file system. @@ -2368,7 +2345,6 @@ def update_file_system(self, file_system_id, update_file_system_details, **kwarg def update_mount_target(self, mount_target_id, update_mount_target_details, **kwargs): """ - UpdateMountTarget Updates the specified mount target's information. @@ -2456,7 +2432,6 @@ def update_mount_target(self, mount_target_id, update_mount_target_details, **kw def update_snapshot(self, snapshot_id, update_snapshot_details, **kwargs): """ - UpdateSnapshot Updates the specified snapshot's information. diff --git a/src/oci/functions/functions_invoke_client.py b/src/oci/functions/functions_invoke_client.py index ea5dd1c1ac..e873c76bce 100644 --- a/src/oci/functions/functions_invoke_client.py +++ b/src/oci/functions/functions_invoke_client.py @@ -83,7 +83,6 @@ def __init__(self, config, **kwargs): def invoke_function(self, function_id, **kwargs): """ Invokes a function - Invokes a function :param str function_id: (required) diff --git a/src/oci/functions/functions_management_client.py b/src/oci/functions/functions_management_client.py index c0b347c129..57ca8976d5 100644 --- a/src/oci/functions/functions_management_client.py +++ b/src/oci/functions/functions_management_client.py @@ -82,7 +82,6 @@ def __init__(self, config, **kwargs): def change_application_compartment(self, application_id, change_application_compartment_details, **kwargs): """ - Moves an application into a different compartment. When provided, If-Match is checked against ETag values of the resource. Moves an application into a different compartment within the same tenancy. For information about moving resources between compartments, see `Moving Resources Between Compartments`__. @@ -171,7 +170,6 @@ def change_application_compartment(self, application_id, change_application_comp def create_application(self, create_application_details, **kwargs): """ - Creates a new application Creates a new application. @@ -235,7 +233,6 @@ def create_application(self, create_application_details, **kwargs): def create_function(self, create_function_details, **kwargs): """ - Creates a new function Creates a new function. @@ -299,7 +296,6 @@ def create_function(self, create_function_details, **kwargs): def delete_application(self, application_id, **kwargs): """ - Deletes an application Deletes an application. @@ -380,7 +376,6 @@ def delete_application(self, application_id, **kwargs): def delete_function(self, function_id, **kwargs): """ - Deletes a function Deletes a function. @@ -461,7 +456,6 @@ def delete_function(self, function_id, **kwargs): def get_application(self, application_id, **kwargs): """ - Retrieves an application Retrieves an application. @@ -537,7 +531,6 @@ def get_application(self, application_id, **kwargs): def get_function(self, function_id, **kwargs): """ - Retrieves a function Retrieves a function. @@ -613,7 +606,6 @@ def get_function(self, function_id, **kwargs): def list_applications(self, compartment_id, **kwargs): """ - Lists applications for a compartment Lists applications for a compartment. @@ -758,7 +750,6 @@ def list_applications(self, compartment_id, **kwargs): def list_functions(self, application_id, **kwargs): """ - Lists functions for an application Lists functions for an application. @@ -904,7 +895,6 @@ def list_functions(self, application_id, **kwargs): def update_application(self, application_id, update_application_details, **kwargs): """ Modifies an application - Modifies an application :param str application_id: (required) @@ -992,7 +982,6 @@ def update_application(self, application_id, update_application_details, **kwarg def update_function(self, function_id, update_function_details, **kwargs): """ Modifies a function - Modifies a function :param str function_id: (required) diff --git a/src/oci/healthchecks/health_checks_client.py b/src/oci/healthchecks/health_checks_client.py index bba04f78d2..5a02509167 100644 --- a/src/oci/healthchecks/health_checks_client.py +++ b/src/oci/healthchecks/health_checks_client.py @@ -84,7 +84,6 @@ def __init__(self, config, **kwargs): def change_http_monitor_compartment(self, monitor_id, change_http_monitor_compartment_details, **kwargs): """ - Moves a monitor into a different compartment. Moves a monitor into a different compartment. When provided, `If-Match` is checked against ETag values of the resource. @@ -182,7 +181,6 @@ def change_http_monitor_compartment(self, monitor_id, change_http_monitor_compar def change_ping_monitor_compartment(self, monitor_id, change_ping_monitor_compartment_details, **kwargs): """ - Moves a monitor into a different compartment. Moves a monitor into a different compartment. When provided, `If-Match` is checked against ETag values of the resource. @@ -280,7 +278,6 @@ def change_ping_monitor_compartment(self, monitor_id, change_ping_monitor_compar def create_http_monitor(self, create_http_monitor_details, **kwargs): """ - Creates an HTTP monitor. Creates an HTTP monitor. Vantage points will be automatically selected if not specified, and probes will be initiated from each vantage point to each of the targets at the frequency specified by `intervalInSeconds`. @@ -358,7 +355,6 @@ def create_http_monitor(self, create_http_monitor_details, **kwargs): def create_on_demand_http_probe(self, create_on_demand_http_probe_details, **kwargs): """ - Creates an on-demand HTTP probe. Creates an on-demand HTTP probe. The location response header contains the URL for fetching the probe results. @@ -425,7 +421,6 @@ def create_on_demand_http_probe(self, create_on_demand_http_probe_details, **kwa def create_on_demand_ping_probe(self, create_on_demand_ping_probe_details, **kwargs): """ - Creates an on-demand Ping probe. Creates an on-demand ping probe. The location response header contains the URL for fetching probe results. @@ -492,7 +487,6 @@ def create_on_demand_ping_probe(self, create_on_demand_ping_probe_details, **kwa def create_ping_monitor(self, create_ping_monitor_details, **kwargs): """ - Creates a Ping monitor. Creates a ping monitor. Vantage points will be automatically selected if not specified, and probes will be initiated from each vantage point to each of the targets at the frequency specified by `intervalInSeconds`. @@ -570,7 +564,6 @@ def create_ping_monitor(self, create_ping_monitor_details, **kwargs): def delete_http_monitor(self, monitor_id, **kwargs): """ - Deletes the HTTP monitor. Deletes the HTTP monitor and its configuration. All future probes of this monitor are stopped. Results associated with the monitor are not deleted. @@ -651,7 +644,6 @@ def delete_http_monitor(self, monitor_id, **kwargs): def delete_ping_monitor(self, monitor_id, **kwargs): """ - Deletes the Ping monitor configuration. Deletes the ping monitor and its configuration. All future probes of this monitor are stopped. Results associated with the monitor are not deleted. @@ -732,7 +724,6 @@ def delete_ping_monitor(self, monitor_id, **kwargs): def get_http_monitor(self, monitor_id, **kwargs): """ - Gets the HTTP monitor configuration. Gets the configuration for the specified monitor. @@ -814,7 +805,6 @@ def get_http_monitor(self, monitor_id, **kwargs): def get_ping_monitor(self, monitor_id, **kwargs): """ - Returns the Ping monitor configuration. Gets the configuration for the specified ping monitor. @@ -896,7 +886,6 @@ def get_ping_monitor(self, monitor_id, **kwargs): def list_health_checks_vantage_points(self, **kwargs): """ - Returns information about available vantage points.\n Gets information about all vantage points available to the user. @@ -1010,7 +999,6 @@ def list_health_checks_vantage_points(self, **kwargs): def list_http_monitors(self, compartment_id, **kwargs): """ - Gets HTTP monitors. Gets a list of HTTP monitors. @@ -1128,7 +1116,6 @@ def list_http_monitors(self, compartment_id, **kwargs): def list_http_probe_results(self, probe_configuration_id, **kwargs): """ - Gets the HTTP probe results for the specified monitor or on-demand probe. Gets the HTTP probe results for the specified probe or monitor, where the `probeConfigurationId` is the OCID of either a monitor or an on-demand probe. @@ -1250,7 +1237,6 @@ def list_http_probe_results(self, probe_configuration_id, **kwargs): def list_ping_monitors(self, compartment_id, **kwargs): """ - Returns Ping monitors. Gets a list of configured ping monitors. Results are paginated based on `page` and `limit`. The `opc-next-page` header provides @@ -1371,7 +1357,6 @@ def list_ping_monitors(self, compartment_id, **kwargs): def list_ping_probe_results(self, probe_configuration_id, **kwargs): """ - Returns the Ping probe results for the specified monitor or on-demand probe. Returns the results for the specified probe, where the `probeConfigurationId` is the OCID of either a monitor or an on-demand probe. @@ -1497,7 +1482,6 @@ def list_ping_probe_results(self, probe_configuration_id, **kwargs): def update_http_monitor(self, monitor_id, update_http_monitor_details, **kwargs): """ - Updates the HTTP monitor configuration. Updates the configuration of the specified HTTP monitor. Only the fields specified in the request body will be updated; all other configuration properties will remain unchanged. @@ -1586,7 +1570,6 @@ def update_http_monitor(self, monitor_id, update_http_monitor_details, **kwargs) def update_ping_monitor(self, monitor_id, update_ping_monitor_details, **kwargs): """ - Updates the Ping monitor configuration. Updates the configuration of the specified ping monitor. Only the fields specified in the request body will be updated; all other configuration properties will remain unchanged. diff --git a/src/oci/identity/identity_client.py b/src/oci/identity/identity_client.py index 71b4b4bc54..7ead98cec3 100644 --- a/src/oci/identity/identity_client.py +++ b/src/oci/identity/identity_client.py @@ -81,7 +81,6 @@ def __init__(self, config, **kwargs): def activate_mfa_totp_device(self, user_id, mfa_totp_device_id, mfa_totp_token, **kwargs): """ - ActivateMfaTotpDevice Activates the specified MFA TOTP device for the user. Activation requires manual interaction with the Console. @@ -176,7 +175,6 @@ def activate_mfa_totp_device(self, user_id, mfa_totp_device_id, mfa_totp_token, def add_user_to_group(self, add_user_to_group_details, **kwargs): """ - AddUserToGroup Adds the specified user to the specified group and returns a `UserGroupMembership` object with its own OCID. After you send your request, the new object's `lifecycleState` will temporarily be CREATING. Before using the @@ -248,7 +246,6 @@ def add_user_to_group(self, add_user_to_group_details, **kwargs): def assemble_effective_tag_set(self, compartment_id, **kwargs): """ - AssembleEffectiveTagSet Assembles tag defaults in the specified compartment and any parent compartments to determine the tags to apply. Tag defaults from parent compartments do not override tag defaults referencing the same tag in a compartment lower down the hierarchy. This set of tag defaults @@ -327,7 +324,6 @@ def assemble_effective_tag_set(self, compartment_id, **kwargs): def change_tag_namespace_compartment(self, tag_namespace_id, change_tag_namespace_compartment_detail, **kwargs): """ - changes compartment of a tag namespace. Moves the specified tag namespace to the specified compartment within the same tenancy. To move the tag namespace, you must have the manage tag-namespaces permission on both compartments. @@ -416,7 +412,6 @@ def change_tag_namespace_compartment(self, tag_namespace_id, change_tag_namespac def create_auth_token(self, create_auth_token_details, user_id, **kwargs): """ - CreateAuthToken Creates a new auth token for the specified user. For information about what auth tokens are for, see `Managing User Credentials`__. @@ -511,7 +506,6 @@ def create_auth_token(self, create_auth_token_details, user_id, **kwargs): def create_compartment(self, create_compartment_details, **kwargs): """ - CreateCompartment Creates a new compartment in the specified compartment. **Important:** Compartments cannot be deleted. @@ -601,7 +595,6 @@ def create_compartment(self, create_compartment_details, **kwargs): def create_customer_secret_key(self, create_customer_secret_key_details, user_id, **kwargs): """ - CreateCustomerSecretKey Creates a new secret key for the specified user. Secret keys are used for authentication with the Object Storage Service's Amazon S3 compatible API. For information, see `Managing User Credentials`__. @@ -697,7 +690,6 @@ def create_customer_secret_key(self, create_customer_secret_key_details, user_id def create_dynamic_group(self, create_dynamic_group_details, **kwargs): """ - CreateDynamicGroup Creates a new dynamic group in your tenancy. You must specify your tenancy's OCID as the compartment ID in the request object (remember that the tenancy @@ -786,7 +778,6 @@ def create_dynamic_group(self, create_dynamic_group_details, **kwargs): def create_group(self, create_group_details, **kwargs): """ - CreateGroup Creates a new group in your tenancy. You must specify your tenancy's OCID as the compartment ID in the request object (remember that the tenancy @@ -878,7 +869,6 @@ def create_group(self, create_group_details, **kwargs): def create_identity_provider(self, create_identity_provider_details, **kwargs): """ - CreateIdentityProvider Creates a new identity provider in your tenancy. For more information, see `Identity Providers and Federation`__. @@ -967,7 +957,6 @@ def create_identity_provider(self, create_identity_provider_details, **kwargs): def create_idp_group_mapping(self, create_idp_group_mapping_details, identity_provider_id, **kwargs): """ - CreateIdpGroupMapping Creates a single mapping between an IdP group and an IAM Service :class:`Group`. @@ -1052,7 +1041,6 @@ def create_idp_group_mapping(self, create_idp_group_mapping_details, identity_pr def create_mfa_totp_device(self, user_id, **kwargs): """ - CreateMfaTotpDevice Creates a new MFA TOTP device for the user. A user can have one MFA TOTP device. @@ -1131,7 +1119,6 @@ def create_mfa_totp_device(self, user_id, **kwargs): def create_network_source(self, create_network_source_details, **kwargs): """ - CreateNetworkSource Creates a new network source in your tenancy. You must specify your tenancy's OCID as the compartment ID in the request object (remember that the tenancy @@ -1221,7 +1208,6 @@ def create_network_source(self, create_network_source_details, **kwargs): def create_o_auth_client_credential(self, user_id, create_o_auth2_client_credential_details, **kwargs): """ Creates Oauth token for the user - Creates Oauth token for the user :param str user_id: (required) @@ -1304,7 +1290,6 @@ def create_o_auth_client_credential(self, user_id, create_o_auth2_client_credent def create_or_reset_ui_password(self, user_id, **kwargs): """ - CreateOrResetUIPassword Creates a new Console one-time password for the specified user. For more information about user credentials, see `User Credentials`__. @@ -1395,7 +1380,6 @@ def create_or_reset_ui_password(self, user_id, **kwargs): def create_policy(self, create_policy_details, **kwargs): """ - CreatePolicy Creates a new policy in the specified compartment (either the tenancy or another of your compartments). If you're new to policies, see `Getting Started with Policies`__. @@ -1484,7 +1468,6 @@ def create_policy(self, create_policy_details, **kwargs): def create_region_subscription(self, create_region_subscription_details, tenancy_id, **kwargs): """ - CreateRegionSubscription Creates a subscription to a region for a tenancy. @@ -1568,7 +1551,6 @@ def create_region_subscription(self, create_region_subscription_details, tenancy def create_smtp_credential(self, create_smtp_credential_details, user_id, **kwargs): """ - CreateSmtpCredential Creates a new SMTP credential for the specified user. An SMTP credential has an SMTP user name and an SMTP password. You must specify a *description* for the SMTP credential (although it can be an empty string). It does not have to be unique, and you can change it anytime with @@ -1655,7 +1637,6 @@ def create_smtp_credential(self, create_smtp_credential_details, user_id, **kwar def create_swift_password(self, create_swift_password_details, user_id, **kwargs): """ - CreateSwiftPassword **Deprecated. Use :func:`create_auth_token` instead.** Creates a new Swift password for the specified user. For information about what Swift passwords are for, see @@ -1752,7 +1733,6 @@ def create_swift_password(self, create_swift_password_details, user_id, **kwargs def create_tag(self, tag_namespace_id, create_tag_details, **kwargs): """ - CreateTag Creates a new tag in the specified tag namespace. The tag requires either the OCID or the name of the tag namespace that will contain this @@ -1857,7 +1837,6 @@ def create_tag(self, tag_namespace_id, create_tag_details, **kwargs): def create_tag_default(self, create_tag_default_details, **kwargs): """ - CreateTagDefault Creates a new tag default in the specified compartment for the specified tag definition. If you specify that a value is required, a value is set during resource creation (either by @@ -1939,7 +1918,6 @@ def create_tag_default(self, create_tag_default_details, **kwargs): def create_tag_namespace(self, create_tag_namespace_details, **kwargs): """ - CreateTagNamespace Creates a new tag namespace in the specified compartment. You must specify the compartment ID in the request object (remember that the tenancy is simply the root @@ -2021,7 +1999,6 @@ def create_tag_namespace(self, create_tag_namespace_details, **kwargs): def create_user(self, create_user_details, **kwargs): """ - CreateUser Creates a new user in your tenancy. For conceptual information about users, your tenancy, and other IAM Service components, see `Overview of the IAM Service`__. @@ -2128,7 +2105,6 @@ def create_user(self, create_user_details, **kwargs): def delete_api_key(self, user_id, fingerprint, **kwargs): """ - DeleteApiKey Deletes the specified API signing key for the specified user. Every user has permission to use this operation to delete a key for *their own user ID*. An @@ -2210,7 +2186,6 @@ def delete_api_key(self, user_id, fingerprint, **kwargs): def delete_auth_token(self, user_id, auth_token_id, **kwargs): """ - DeleteAuthToken Deletes the specified auth token for the specified user. @@ -2287,7 +2262,6 @@ def delete_auth_token(self, user_id, auth_token_id, **kwargs): def delete_compartment(self, compartment_id, **kwargs): """ - DeleteCompartment Deletes the specified compartment. The compartment must be empty. @@ -2360,7 +2334,6 @@ def delete_compartment(self, compartment_id, **kwargs): def delete_customer_secret_key(self, user_id, customer_secret_key_id, **kwargs): """ - DeleteCustomerSecretKey Deletes the specified secret key for the specified user. @@ -2437,7 +2410,6 @@ def delete_customer_secret_key(self, user_id, customer_secret_key_id, **kwargs): def delete_dynamic_group(self, dynamic_group_id, **kwargs): """ - DeleteDynamicGroup Deletes the specified dynamic group. @@ -2510,7 +2482,6 @@ def delete_dynamic_group(self, dynamic_group_id, **kwargs): def delete_group(self, group_id, **kwargs): """ - DeleteGroup Deletes the specified group. The group must be empty. @@ -2583,7 +2554,6 @@ def delete_group(self, group_id, **kwargs): def delete_identity_provider(self, identity_provider_id, **kwargs): """ - DeleteIdentityProvider Deletes the specified identity provider. The identity provider must not have any group mappings (see :class:`IdpGroupMapping`). @@ -2657,7 +2627,6 @@ def delete_identity_provider(self, identity_provider_id, **kwargs): def delete_idp_group_mapping(self, identity_provider_id, mapping_id, **kwargs): """ - DeleteIdpGroupMapping Deletes the specified group mapping. @@ -2734,7 +2703,6 @@ def delete_idp_group_mapping(self, identity_provider_id, mapping_id, **kwargs): def delete_mfa_totp_device(self, user_id, mfa_totp_device_id, **kwargs): """ - DeleteMfaTotpDevice Deletes the specified MFA TOTP device for the specified user. @@ -2811,7 +2779,6 @@ def delete_mfa_totp_device(self, user_id, mfa_totp_device_id, **kwargs): def delete_network_source(self, network_source_id, **kwargs): """ - DeleteNetworkSource Deletes the specified network source @@ -2885,7 +2852,6 @@ def delete_network_source(self, network_source_id, **kwargs): def delete_o_auth_client_credential(self, user_id, oauth2_client_credential_id, **kwargs): """ Delete Oauth token for the user - Delete Oauth token for the user :param str user_id: (required) @@ -2961,7 +2927,6 @@ def delete_o_auth_client_credential(self, user_id, oauth2_client_credential_id, def delete_policy(self, policy_id, **kwargs): """ - DeletePolicy Deletes the specified policy. The deletion takes effect typically within 10 seconds. @@ -3034,7 +2999,6 @@ def delete_policy(self, policy_id, **kwargs): def delete_smtp_credential(self, user_id, smtp_credential_id, **kwargs): """ - DeleteSmtpCredential Deletes the specified SMTP credential for the specified user. @@ -3111,7 +3075,6 @@ def delete_smtp_credential(self, user_id, smtp_credential_id, **kwargs): def delete_swift_password(self, user_id, swift_password_id, **kwargs): """ - DeleteSwiftPassword **Deprecated. Use :func:`delete_auth_token` instead.** Deletes the specified Swift password for the specified user. @@ -3190,7 +3153,6 @@ def delete_swift_password(self, user_id, swift_password_id, **kwargs): def delete_tag(self, tag_namespace_id, tag_name, **kwargs): """ - DeleteTag Deletes the specified tag definition. This operation triggers a process that removes the tag from all resources in your tenancy. @@ -3284,7 +3246,6 @@ def delete_tag(self, tag_namespace_id, tag_name, **kwargs): def delete_tag_default(self, tag_default_id, **kwargs): """ - DeleteTagDefault Deletes the the specified tag default. @@ -3363,7 +3324,6 @@ def delete_tag_default(self, tag_default_id, **kwargs): def delete_tag_namespace(self, tag_namespace_id, **kwargs): """ - DeleteTagNamespace Deletes the specified tag namespace. Only an empty tag namespace can be deleted. To delete a tag namespace, first delete all its tag definitions. @@ -3445,7 +3405,6 @@ def delete_tag_namespace(self, tag_namespace_id, **kwargs): def delete_user(self, user_id, **kwargs): """ - DeleteUser Deletes the specified user. The user must not be in any groups. @@ -3518,7 +3477,6 @@ def delete_user(self, user_id, **kwargs): def generate_totp_seed(self, user_id, mfa_totp_device_id, **kwargs): """ - GenerateTotpSeed Generate seed for the MFA TOTP device. @@ -3597,7 +3555,6 @@ def generate_totp_seed(self, user_id, mfa_totp_device_id, **kwargs): def get_authentication_policy(self, compartment_id, **kwargs): """ - GetAuthenticationPolicy Gets the authentication policy for the given tenancy. You must specify your tenant\u2019s OCID as the value for the compartment ID (remember that the tenancy is simply the root compartment). @@ -3662,7 +3619,6 @@ def get_authentication_policy(self, compartment_id, **kwargs): def get_compartment(self, compartment_id, **kwargs): """ - GetCompartment Gets the specified compartment's information. This operation does not return a list of all the resources inside the compartment. There is no single @@ -3733,7 +3689,6 @@ def get_compartment(self, compartment_id, **kwargs): def get_dynamic_group(self, dynamic_group_id, **kwargs): """ - GetDynamicGroup Gets the specified dynamic group's information. @@ -3797,7 +3752,6 @@ def get_dynamic_group(self, dynamic_group_id, **kwargs): def get_group(self, group_id, **kwargs): """ - GetGroup Gets the specified group's information. This operation does not return a list of all the users in the group. To do that, use @@ -3865,7 +3819,6 @@ def get_group(self, group_id, **kwargs): def get_identity_provider(self, identity_provider_id, **kwargs): """ - GetIdentityProvider Gets the specified identity provider's information. @@ -3929,7 +3882,6 @@ def get_identity_provider(self, identity_provider_id, **kwargs): def get_idp_group_mapping(self, identity_provider_id, mapping_id, **kwargs): """ - GetIdpGroupMapping Gets the specified group mapping. @@ -3997,7 +3949,6 @@ def get_idp_group_mapping(self, identity_provider_id, mapping_id, **kwargs): def get_mfa_totp_device(self, user_id, mfa_totp_device_id, **kwargs): """ - GetMfaTotpDevice Get the specified MFA TOTP device for the specified user. @@ -4065,7 +4016,6 @@ def get_mfa_totp_device(self, user_id, mfa_totp_device_id, **kwargs): def get_network_source(self, network_source_id, **kwargs): """ - GetNetworkSource Gets the specified network source's information. @@ -4129,7 +4079,6 @@ def get_network_source(self, network_source_id, **kwargs): def get_policy(self, policy_id, **kwargs): """ - GetPolicy Gets the specified policy's information. @@ -4193,7 +4142,6 @@ def get_policy(self, policy_id, **kwargs): def get_tag(self, tag_namespace_id, tag_name, **kwargs): """ - GetTag Gets the specified tag's information. @@ -4261,7 +4209,6 @@ def get_tag(self, tag_namespace_id, tag_name, **kwargs): def get_tag_default(self, tag_default_id, **kwargs): """ - GetTagDefault Retrieves the specified tag default. @@ -4325,7 +4272,6 @@ def get_tag_default(self, tag_default_id, **kwargs): def get_tag_namespace(self, tag_namespace_id, **kwargs): """ - GetTagNamespace Gets the specified tag namespace's information. @@ -4389,7 +4335,6 @@ def get_tag_namespace(self, tag_namespace_id, **kwargs): def get_tagging_work_request(self, work_request_id, **kwargs): """ - GetTaggingWorkRequest Gets details on a specified work request. The workRequestID is returned in the opc-workrequest-id header for any asynchronous operation in the Identity and Access Management service. @@ -4454,7 +4399,6 @@ def get_tagging_work_request(self, work_request_id, **kwargs): def get_tenancy(self, tenancy_id, **kwargs): """ - GetTenancy Get the specified tenancy's information. @@ -4518,7 +4462,6 @@ def get_tenancy(self, tenancy_id, **kwargs): def get_user(self, user_id, **kwargs): """ - GetUser Gets the specified user's information. @@ -4582,7 +4525,6 @@ def get_user(self, user_id, **kwargs): def get_user_group_membership(self, user_group_membership_id, **kwargs): """ - GetUserGroupMembership Gets the specified UserGroupMembership's information. @@ -4646,7 +4588,6 @@ def get_user_group_membership(self, user_group_membership_id, **kwargs): def get_user_ui_password_information(self, user_id, **kwargs): """ - GetUserUIPasswordInformation Gets the specified user's console password information. The returned object contains the user's OCID, but not the password itself. The actual password is returned only when created or reset. @@ -4711,7 +4652,6 @@ def get_user_ui_password_information(self, user_id, **kwargs): def get_work_request(self, work_request_id, **kwargs): """ - GetWorkRequest Gets details on a specified work request. The workRequestID is returned in the opc-workrequest-id header for any asynchronous operation in the Identity and Access Management service. @@ -4776,7 +4716,6 @@ def get_work_request(self, work_request_id, **kwargs): def list_api_keys(self, user_id, **kwargs): """ - ListApiKeys Lists the API signing keys for the specified user. A user can have a maximum of three keys. Every user has permission to use this API call for *their own user ID*. An administrator in your @@ -4843,7 +4782,6 @@ def list_api_keys(self, user_id, **kwargs): def list_auth_tokens(self, user_id, **kwargs): """ - ListAuthTokens Lists the auth tokens for the specified user. The returned object contains the token's OCID, but not the token itself. The actual token is returned only upon creation. @@ -4908,7 +4846,6 @@ def list_auth_tokens(self, user_id, **kwargs): def list_availability_domains(self, compartment_id, **kwargs): """ - ListAvailabilityDomains Lists the availability domains in your tenancy. Specify the OCID of either the tenancy or another of your compartments as the value for the compartment ID (remember that the tenancy is simply the root compartment). See `Where to Get the Tenancy's OCID and User's OCID`__. @@ -4973,7 +4910,6 @@ def list_availability_domains(self, compartment_id, **kwargs): def list_compartments(self, compartment_id, **kwargs): """ - ListCompartments Lists the compartments in a specified compartment. The members of the list returned depends on the values set for several parameters. @@ -5093,7 +5029,6 @@ def list_compartments(self, compartment_id, **kwargs): def list_cost_tracking_tags(self, compartment_id, **kwargs): """ - ListCostTrackingTags Lists all the tags enabled for cost-tracking in the specified tenancy. For information about cost-tracking tags, see `Using Cost-tracking Tags`__. @@ -5168,7 +5103,6 @@ def list_cost_tracking_tags(self, compartment_id, **kwargs): def list_customer_secret_keys(self, user_id, **kwargs): """ - ListCustomerSecretKeys Lists the secret keys for the specified user. The returned object contains the secret key's OCID, but not the secret key itself. The actual secret key is returned only upon creation. @@ -5233,7 +5167,6 @@ def list_customer_secret_keys(self, user_id, **kwargs): def list_dynamic_groups(self, compartment_id, **kwargs): """ - ListDynamicGroups Lists the dynamic groups in your tenancy. You must specify your tenancy's OCID as the value for the compartment ID (remember that the tenancy is simply the root compartment). See `Where to Get the Tenancy's OCID and User's OCID`__. @@ -5309,7 +5242,6 @@ def list_dynamic_groups(self, compartment_id, **kwargs): def list_fault_domains(self, compartment_id, availability_domain, **kwargs): """ - ListFaultDomains Lists the Fault Domains in your tenancy. Specify the OCID of either the tenancy or another of your compartments as the value for the compartment ID (remember that the tenancy is simply the root compartment). See `Where to Get the Tenancy's OCID and User's OCID`__. @@ -5376,7 +5308,6 @@ def list_fault_domains(self, compartment_id, availability_domain, **kwargs): def list_groups(self, compartment_id, **kwargs): """ - ListGroups Lists the groups in your tenancy. You must specify your tenancy's OCID as the value for the compartment ID (remember that the tenancy is simply the root compartment). See `Where to Get the Tenancy's OCID and User's OCID`__. @@ -5452,7 +5383,6 @@ def list_groups(self, compartment_id, **kwargs): def list_identity_provider_groups(self, identity_provider_id, **kwargs): """ - Gets the identity provider groups. Lists the identity provider groups. @@ -5535,7 +5465,6 @@ def list_identity_provider_groups(self, identity_provider_id, **kwargs): def list_identity_providers(self, protocol, compartment_id, **kwargs): """ - ListIdentityProviders Lists all the identity providers in your tenancy. You must specify the identity provider type (e.g., `SAML2` for identity providers using the SAML2.0 protocol). You must specify your tenancy's OCID as the value for the compartment ID (remember that the tenancy is simply the root compartment). @@ -5618,7 +5547,6 @@ def list_identity_providers(self, protocol, compartment_id, **kwargs): def list_idp_group_mappings(self, identity_provider_id, **kwargs): """ - ListIdpGroupMappings Lists the group mappings for the specified identity provider. @@ -5701,7 +5629,6 @@ def list_idp_group_mappings(self, identity_provider_id, **kwargs): def list_mfa_totp_devices(self, user_id, **kwargs): """ - ListMfaTotpDevices Lists the MFA TOTP devices for the specified user. The returned object contains the device's OCID, but not the seed. The seed is returned only upon creation or when the IAM service regenerates the MFA seed for the device. @@ -5821,7 +5748,6 @@ def list_mfa_totp_devices(self, user_id, **kwargs): def list_network_sources(self, compartment_id, **kwargs): """ - ListNetworkSources Lists the network sources in your tenancy. You must specify your tenancy's OCID as the value for the compartment ID (remember that the tenancy is simply the root compartment). See `Where to Get the Tenancy's OCID and User's OCID`__. @@ -5898,7 +5824,6 @@ def list_network_sources(self, compartment_id, **kwargs): def list_o_auth_client_credentials(self, user_id, **kwargs): """ List of Oauth tokens for the user - List of Oauth tokens for the user :param str user_id: (required) @@ -5994,7 +5919,6 @@ def list_o_auth_client_credentials(self, user_id, **kwargs): def list_policies(self, compartment_id, **kwargs): """ - ListPolicies Lists the policies in the specified compartment (either the tenancy or another of your compartments). See `Where to Get the Tenancy's OCID and User's OCID`__. @@ -6072,7 +5996,6 @@ def list_policies(self, compartment_id, **kwargs): def list_region_subscriptions(self, tenancy_id, **kwargs): """ - ListRegionSubscriptions Lists the region subscriptions for the specified tenancy. @@ -6136,7 +6059,6 @@ def list_region_subscriptions(self, tenancy_id, **kwargs): def list_regions(self, **kwargs): """ - ListRegions Lists all the regions offered by Oracle Cloud Infrastructure. @@ -6185,7 +6107,6 @@ def list_regions(self, **kwargs): def list_smtp_credentials(self, user_id, **kwargs): """ - ListSmtpCredentials Lists the SMTP credentials for the specified user. The returned object contains the credential's OCID, the SMTP user name but not the SMTP password. The SMTP password is returned only upon creation. @@ -6250,7 +6171,6 @@ def list_smtp_credentials(self, user_id, **kwargs): def list_swift_passwords(self, user_id, **kwargs): """ - ListSwiftPasswords **Deprecated. Use :func:`list_auth_tokens` instead.** Lists the Swift passwords for the specified user. The returned object contains the password's OCID, but not @@ -6317,7 +6237,6 @@ def list_swift_passwords(self, user_id, **kwargs): def list_tag_defaults(self, **kwargs): """ - ListTagDefaults Lists the tag defaults for tag definitions in the specified compartment. @@ -6414,7 +6333,6 @@ def list_tag_defaults(self, **kwargs): def list_tag_namespaces(self, compartment_id, **kwargs): """ - ListTagNamespaces Lists the tag namespaces in the specified compartment. @@ -6506,7 +6424,6 @@ def list_tag_namespaces(self, compartment_id, **kwargs): def list_tagging_work_request_errors(self, work_request_id, **kwargs): """ - ListTaggingWorkRequestErrors Gets the errors for a work request. @@ -6589,7 +6506,6 @@ def list_tagging_work_request_errors(self, work_request_id, **kwargs): def list_tagging_work_request_logs(self, work_request_id, **kwargs): """ - ListTaggingWorkRequestLogs Gets the logs for a work request. @@ -6672,7 +6588,6 @@ def list_tagging_work_request_logs(self, work_request_id, **kwargs): def list_tagging_work_requests(self, compartment_id, **kwargs): """ - ListTaggingWorkRequests Lists the tagging work requests in compartment. @@ -6749,7 +6664,6 @@ def list_tagging_work_requests(self, compartment_id, **kwargs): def list_tags(self, tag_namespace_id, **kwargs): """ - ListTags Lists the tag definitions in the specified tag namespace. @@ -6846,7 +6760,6 @@ def list_tags(self, tag_namespace_id, **kwargs): def list_user_group_memberships(self, compartment_id, **kwargs): """ - ListUserGroupMemberships Lists the `UserGroupMembership` objects in your tenancy. You must specify your tenancy's OCID as the value for the compartment ID (see `Where to Get the Tenancy's OCID and User's OCID`__). @@ -6939,7 +6852,6 @@ def list_user_group_memberships(self, compartment_id, **kwargs): def list_users(self, compartment_id, **kwargs): """ - ListUsers Lists the users in your tenancy. You must specify your tenancy's OCID as the value for the compartment ID (remember that the tenancy is simply the root compartment). See `Where to Get the Tenancy's OCID and User's OCID`__. @@ -7025,7 +6937,6 @@ def list_users(self, compartment_id, **kwargs): def list_work_requests(self, compartment_id, **kwargs): """ - ListWorkRequests Lists the work requests in compartment. @@ -7102,7 +7013,6 @@ def list_work_requests(self, compartment_id, **kwargs): def move_compartment(self, compartment_id, move_compartment_details, **kwargs): """ - Moves a compartment tree to a different parent compartment. When provided,\nIf-Match is checked against ETag values of the resource.\n Move the compartment to a different parent compartment in the same tenancy. When you move a compartment, all its contents (subcompartments and resources) are moved with it. Note that the `CompartmentId` that you specify in the path is the compartment that you want to move. @@ -7206,7 +7116,6 @@ def move_compartment(self, compartment_id, move_compartment_details, **kwargs): def recover_compartment(self, compartment_id, **kwargs): """ - RecoverCompartment Recover the compartment from DELETED state to ACTIVE state. @@ -7287,7 +7196,6 @@ def recover_compartment(self, compartment_id, **kwargs): def remove_user_from_group(self, user_group_membership_id, **kwargs): """ - RemoveUserFromGroup Removes a user from a group by deleting the corresponding `UserGroupMembership`. @@ -7360,7 +7268,6 @@ def remove_user_from_group(self, user_group_membership_id, **kwargs): def reset_idp_scim_client(self, identity_provider_id, **kwargs): """ - ResetIdpScimClient Resets the OAuth2 client credentials for the SCIM client associated with this identity provider. @@ -7424,7 +7331,6 @@ def reset_idp_scim_client(self, identity_provider_id, **kwargs): def update_auth_token(self, user_id, auth_token_id, update_auth_token_details, **kwargs): """ - UpdateAuthToken Updates the specified auth token's description. @@ -7508,7 +7414,6 @@ def update_auth_token(self, user_id, auth_token_id, update_auth_token_details, * def update_authentication_policy(self, compartment_id, update_authentication_policy_details, **kwargs): """ - UpdateAuthenticationPolicy Updates authentication policy for the specified tenancy @@ -7588,7 +7493,6 @@ def update_authentication_policy(self, compartment_id, update_authentication_pol def update_compartment(self, compartment_id, update_compartment_details, **kwargs): """ - UpdateCompartment Updates the specified compartment's description or name. You can't update the root compartment. @@ -7668,7 +7572,6 @@ def update_compartment(self, compartment_id, update_compartment_details, **kwarg def update_customer_secret_key(self, user_id, customer_secret_key_id, update_customer_secret_key_details, **kwargs): """ - UpdateCustomerSecretKey Updates the specified secret key's description. @@ -7752,7 +7655,6 @@ def update_customer_secret_key(self, user_id, customer_secret_key_id, update_cus def update_dynamic_group(self, dynamic_group_id, update_dynamic_group_details, **kwargs): """ - UpdateDynamicGroup Updates the specified dynamic group. @@ -7832,7 +7734,6 @@ def update_dynamic_group(self, dynamic_group_id, update_dynamic_group_details, * def update_group(self, group_id, update_group_details, **kwargs): """ - UpdateGroup Updates the specified group. @@ -7912,7 +7813,6 @@ def update_group(self, group_id, update_group_details, **kwargs): def update_identity_provider(self, identity_provider_id, update_identity_provider_details, **kwargs): """ - UpdateIdentityProvider Updates the specified identity provider. @@ -7992,7 +7892,6 @@ def update_identity_provider(self, identity_provider_id, update_identity_provide def update_idp_group_mapping(self, identity_provider_id, mapping_id, update_idp_group_mapping_details, **kwargs): """ - UpdateIdpGroupMapping Updates the specified group mapping. @@ -8076,7 +7975,6 @@ def update_idp_group_mapping(self, identity_provider_id, mapping_id, update_idp_ def update_network_source(self, network_source_id, update_network_source_details, **kwargs): """ - UpdateNetworkSource Updates the specified network source. @@ -8157,7 +8055,6 @@ def update_network_source(self, network_source_id, update_network_source_details def update_o_auth_client_credential(self, user_id, oauth2_client_credential_id, update_o_auth2_client_credential_details, **kwargs): """ Updates Oauth token for the user - Updates Oauth token for the user :param str user_id: (required) @@ -8240,7 +8137,6 @@ def update_o_auth_client_credential(self, user_id, oauth2_client_credential_id, def update_policy(self, policy_id, update_policy_details, **kwargs): """ - UpdatePolicy Updates the specified policy. You can update the description or the policy statements themselves. Policy changes take effect typically within 10 seconds. @@ -8322,7 +8218,6 @@ def update_policy(self, policy_id, update_policy_details, **kwargs): def update_smtp_credential(self, user_id, smtp_credential_id, update_smtp_credential_details, **kwargs): """ - UpdateSmtpCredential Updates the specified SMTP credential's description. @@ -8406,7 +8301,6 @@ def update_smtp_credential(self, user_id, smtp_credential_id, update_smtp_creden def update_swift_password(self, user_id, swift_password_id, update_swift_password_details, **kwargs): """ - UpdateSwiftPassword **Deprecated. Use :func:`update_auth_token` instead.** Updates the specified Swift password's description. @@ -8492,7 +8386,6 @@ def update_swift_password(self, user_id, swift_password_id, update_swift_passwor def update_tag(self, tag_namespace_id, tag_name, update_tag_details, **kwargs): """ - UpdateTag Updates the specified tag definition. Setting `validator` determines the value type. Tags can use either a static value or a @@ -8585,7 +8478,6 @@ def update_tag(self, tag_namespace_id, tag_name, update_tag_details, **kwargs): def update_tag_default(self, tag_default_id, update_tag_default_details, **kwargs): """ - UpdateTagDefault Updates the specified tag default. If you specify that a value is required, a value is set during resource creation (either by the user creating the resource or another tag defualt). If no value is set, resource creation is blocked. @@ -8676,7 +8568,6 @@ def update_tag_default(self, tag_default_id, update_tag_default_details, **kwarg def update_tag_namespace(self, tag_namespace_id, update_tag_namespace_details, **kwargs): """ - UpdateTagNamespace Updates the the specified tag namespace. You can't update the namespace name. Updating `isRetired` to 'true' retires the namespace and all the tag definitions in the namespace. Reactivating a @@ -8755,7 +8646,6 @@ def update_tag_namespace(self, tag_namespace_id, update_tag_namespace_details, * def update_user(self, user_id, update_user_details, **kwargs): """ - UpdateUser Updates the description of the specified user. @@ -8835,7 +8725,6 @@ def update_user(self, user_id, update_user_details, **kwargs): def update_user_capabilities(self, user_id, update_user_capabilities_details, **kwargs): """ - UpdateUserCapabilities Updates the capabilities of the specified user. @@ -8915,7 +8804,6 @@ def update_user_capabilities(self, user_id, update_user_capabilities_details, ** def update_user_state(self, user_id, update_state_details, **kwargs): """ - UpdateUserState Updates the state of the specified user. @@ -8995,7 +8883,6 @@ def update_user_state(self, user_id, update_state_details, **kwargs): def upload_api_key(self, user_id, create_api_key_details, **kwargs): """ - UploadApiKey Uploads an API signing key for the specified user. Every user has permission to use this operation to upload a key for *their own user ID*. An diff --git a/src/oci/integration/integration_instance_client.py b/src/oci/integration/integration_instance_client.py index 46ecd07f2d..73f6681843 100644 --- a/src/oci/integration/integration_instance_client.py +++ b/src/oci/integration/integration_instance_client.py @@ -83,7 +83,6 @@ def __init__(self, config, **kwargs): def change_integration_instance_compartment(self, integration_instance_id, change_integration_instance_compartment_details, **kwargs): """ Change the compartment for an integration instance - Change the compartment for an integration instance :param str integration_instance_id: (required) @@ -167,7 +166,6 @@ def change_integration_instance_compartment(self, integration_instance_id, chang def create_integration_instance(self, create_integration_instance_details, **kwargs): """ - Creates a new Integration Instance Creates a new Integration Instance. @@ -240,7 +238,6 @@ def create_integration_instance(self, create_integration_instance_details, **kwa def delete_integration_instance(self, integration_instance_id, **kwargs): """ - Delete a provisioned Integration Instance Deletes an Integration Instance resource by identifier. @@ -320,7 +317,6 @@ def delete_integration_instance(self, integration_instance_id, **kwargs): def get_integration_instance(self, integration_instance_id, **kwargs): """ - Get Integration Instance Gets a IntegrationInstance by identifier @@ -393,7 +389,6 @@ def get_integration_instance(self, integration_instance_id, **kwargs): def get_work_request(self, work_request_id, **kwargs): """ - Get Work Request Status Gets the status of the work request with the given ID. @@ -466,7 +461,6 @@ def get_work_request(self, work_request_id, **kwargs): def list_integration_instances(self, compartment_id, **kwargs): """ - Gets a list of all Integration Instances in a compartment Returns a list of Integration Instances. @@ -595,7 +589,6 @@ def list_integration_instances(self, compartment_id, **kwargs): def list_work_request_errors(self, compartment_id, work_request_id, **kwargs): """ - Get work request errors. Get the errors of a work request. @@ -688,7 +681,6 @@ def list_work_request_errors(self, compartment_id, work_request_id, **kwargs): def list_work_request_logs(self, compartment_id, work_request_id, **kwargs): """ - Get work request logs. Get the logs of a work request. @@ -781,7 +773,6 @@ def list_work_request_logs(self, compartment_id, work_request_id, **kwargs): def list_work_requests(self, compartment_id, **kwargs): """ - List Work Requests Lists the work requests in a compartment. @@ -864,7 +855,6 @@ def list_work_requests(self, compartment_id, **kwargs): def update_integration_instance(self, integration_instance_id, update_integration_instance_details, **kwargs): """ - Update the Integration Instance identified by the id Updates the Integration Instance. diff --git a/src/oci/key_management/kms_crypto_client.py b/src/oci/key_management/kms_crypto_client.py index e4c9dd9cb0..620e6ce359 100644 --- a/src/oci/key_management/kms_crypto_client.py +++ b/src/oci/key_management/kms_crypto_client.py @@ -80,7 +80,6 @@ def __init__(self, config, service_endpoint, **kwargs): def decrypt(self, decrypt_data_details, **kwargs): """ - Decrypt Decrypts data using the given `DecryptDataDetails`__ resource. __ https://docs.cloud.oracle.com/api/#/en/key/release/datatypes/DecryptDataDetails @@ -147,7 +146,6 @@ def decrypt(self, decrypt_data_details, **kwargs): def encrypt(self, encrypt_data_details, **kwargs): """ - Encrypt Encrypts data using the given `EncryptDataDetails`__ resource. Plaintext included in the example request is a base64-encoded value of a UTF-8 string. @@ -215,7 +213,6 @@ def encrypt(self, encrypt_data_details, **kwargs): def generate_data_encryption_key(self, generate_key_details, **kwargs): """ - GenerateDataEncryptionKey Generates a key that you can use to encrypt or decrypt data. diff --git a/src/oci/key_management/kms_management_client.py b/src/oci/key_management/kms_management_client.py index 8da14f6bd5..f500ade19c 100644 --- a/src/oci/key_management/kms_management_client.py +++ b/src/oci/key_management/kms_management_client.py @@ -80,7 +80,6 @@ def __init__(self, config, service_endpoint, **kwargs): def cancel_key_deletion(self, key_id, **kwargs): """ - Cancels the scheduled deletion of a key. Cancels the scheduled deletion of the specified key. Canceling a scheduled deletion restores the key's lifecycle state to what it was before its scheduled deletion. @@ -183,7 +182,6 @@ def cancel_key_deletion(self, key_id, **kwargs): def cancel_key_version_deletion(self, key_id, key_version_id, **kwargs): """ - Cancels the scheduled deletion of a key version. Cancels the scheduled deletion of the specified key version. Canceling a scheduled deletion restores the key version to its lifecycle state from before its scheduled deletion. @@ -290,7 +288,6 @@ def cancel_key_version_deletion(self, key_id, key_version_id, **kwargs): def change_key_compartment(self, key_id, change_key_compartment_details, **kwargs): """ - Moves a key into a different compartment. Moves a key into a different compartment within the same tenancy. For information about moving resources between compartments, see `Moving Resources to a Different Compartment`__. @@ -398,7 +395,6 @@ def change_key_compartment(self, key_id, change_key_compartment_details, **kwarg def create_key(self, create_key_details, **kwargs): """ - Creates a new key. Creates a new master encryption key. As a management operation, this call is subject to a Key Management limit that applies to the total @@ -480,7 +476,6 @@ def create_key(self, create_key_details, **kwargs): def create_key_version(self, key_id, **kwargs): """ - Creates a new key version resource and rotates the key to use it for encryption. Generates a new `KeyVersion`__ resource that provides new cryptographic material for a master encryption key. The key must be in an ENABLED state to be rotated. @@ -575,7 +570,6 @@ def create_key_version(self, key_id, **kwargs): def disable_key(self, key_id, **kwargs): """ - Disables a key so it cannot be used for cryptographic operations. Disables a master encryption key so it can no longer be used for encryption, decryption, or generating new data encryption keys. @@ -677,7 +671,6 @@ def disable_key(self, key_id, **kwargs): def enable_key(self, key_id, **kwargs): """ - Enables a key so it can be used for cryptographic operations. Enables a master encryption key so it can be used for encryption, decryption, or generating new data encryption keys. @@ -779,7 +772,6 @@ def enable_key(self, key_id, **kwargs): def get_key(self, key_id, **kwargs): """ - Gets details about a key. Gets information about the specified master encryption key. As a management operation, this call is subject to a Key Management limit that applies to the total number @@ -859,7 +851,6 @@ def get_key(self, key_id, **kwargs): def get_key_version(self, key_id, key_version_id, **kwargs): """ - Gets details about a key version. Gets information about the specified key version. As a management operation, this call is subject to a Key Management limit that applies to the total number @@ -943,7 +934,6 @@ def get_key_version(self, key_id, key_version_id, **kwargs): def get_wrapping_key(self, **kwargs): """ - Gets details about the RSA wrapping key. The RSA wrapping key is used to wrap/unwrap the AES key to be imported to KMS. There will be only one RSA wrapping key per vault. Returns the RSA wrapping key associated with the vault in the endpoint. @@ -1003,7 +993,6 @@ def get_wrapping_key(self, **kwargs): def import_key(self, import_key_details, **kwargs): """ - Imports the given wrapped/encrypted AES key Imports the given wrapped/encrypted AES key. @@ -1080,7 +1069,6 @@ def import_key(self, import_key_details, **kwargs): def import_key_version(self, key_id, import_key_version_details, **kwargs): """ - Imports the given key as a new KeyVersion for the specified key and rotates the key to use it for encryption. Imports the given key version. @@ -1172,7 +1160,6 @@ def import_key_version(self, key_id, import_key_version_details, **kwargs): def list_key_versions(self, key_id, **kwargs): """ - Lists all key versions for a key. Lists all `KeyVersion`__ resources for the specified master encryption key. @@ -1302,7 +1289,6 @@ def list_key_versions(self, key_id, **kwargs): def list_keys(self, compartment_id, **kwargs): """ - Lists keys in the specified vault and compartment. Lists the master encryption keys in the specified vault and compartment. As a management operation, this call is subject to a Key Management limit that applies to the total number @@ -1418,7 +1404,6 @@ def list_keys(self, compartment_id, **kwargs): def schedule_key_deletion(self, key_id, schedule_key_deletion_details, **kwargs): """ - Schedules the deletion of a key. Schedules the deletion of the specified key. This sets the lifecycle state of the key to `PENDING_DELETION` and then deletes it after the specified retention period ends. @@ -1525,7 +1510,6 @@ def schedule_key_deletion(self, key_id, schedule_key_deletion_details, **kwargs) def schedule_key_version_deletion(self, key_id, key_version_id, schedule_key_version_deletion_details, **kwargs): """ - Schedules the deletion of a key version. Schedules the deletion of the specified key version. This sets the lifecycle state of the key version to `PENDING_DELETION` and then deletes it after the specified retention period ends. @@ -1636,7 +1620,6 @@ def schedule_key_version_deletion(self, key_id, key_version_id, schedule_key_ver def update_key(self, key_id, update_key_details, **kwargs): """ - Updates a key's properties. Updates the properties of a master encryption key. Specifically, you can update the `displayName`, `freeformTags`, and `definedTags` properties. Furthermore, the key must in an ENABLED or CREATING state to be updated. diff --git a/src/oci/key_management/kms_vault_client.py b/src/oci/key_management/kms_vault_client.py index 7ab3b44658..948af3a2f9 100644 --- a/src/oci/key_management/kms_vault_client.py +++ b/src/oci/key_management/kms_vault_client.py @@ -82,7 +82,6 @@ def __init__(self, config, **kwargs): def cancel_vault_deletion(self, vault_id, **kwargs): """ - Cancels the scheduled deletion of a vault. Cancels the scheduled deletion of the specified vault. Canceling a scheduled deletion restores the vault and all keys in it to their respective states from before their scheduled deletion. All keys that were scheduled for deletion prior to vault @@ -186,7 +185,6 @@ def cancel_vault_deletion(self, vault_id, **kwargs): def change_vault_compartment(self, vault_id, change_vault_compartment_details, **kwargs): """ - Moves a vault into a different compartment. Moves a vault into a different compartment within the same tenancy. For information about moving resources between compartments, see `Moving Resources to a Different Compartment`__. @@ -294,7 +292,6 @@ def change_vault_compartment(self, vault_id, change_vault_compartment_details, * def create_vault(self, create_vault_details, **kwargs): """ - Creates a new vault. Creates a new vault. The type of vault you create determines key placement, pricing, and available options. Options include storage isolation, a dedicated service endpoint instead of a shared service endpoint for API calls, and either a dedicated hardware security module @@ -379,7 +376,6 @@ def create_vault(self, create_vault_details, **kwargs): def get_vault(self, vault_id, **kwargs): """ - Gets details about a vault. Gets the specified vault's configuration information. As a provisioning operation, this call is subject to a Key Management limit that applies to @@ -459,7 +455,6 @@ def get_vault(self, vault_id, **kwargs): def list_vaults(self, compartment_id, **kwargs): """ - Lists vaults in the compartment. Lists the vaults in the specified compartment. As a provisioning operation, this call is subject to a Key Management limit that applies to @@ -575,7 +570,6 @@ def list_vaults(self, compartment_id, **kwargs): def schedule_vault_deletion(self, vault_id, schedule_vault_deletion_details, **kwargs): """ - Schedules the deletion of a vault. Schedules the deletion of the specified vault. This sets the lifecycle state of the vault and all keys in it that are not already scheduled for deletion to PENDING_DELETION and then deletes them after the retention period ends. The lifecycle state and time of deletion for keys already scheduled for deletion won't @@ -685,7 +679,6 @@ def schedule_vault_deletion(self, vault_id, schedule_vault_deletion_details, **k def update_vault(self, vault_id, update_vault_details, **kwargs): """ - Updates the properties of a vault. Updates the properties of a vault. Specifically, you can update the `displayName`, `freeformTags`, and `definedTags` properties. Furthermore, the vault must be in an ACTIVE or CREATING state to be updated. diff --git a/src/oci/limits/limits_client.py b/src/oci/limits/limits_client.py index 19c1b656cf..f11c4ea35a 100644 --- a/src/oci/limits/limits_client.py +++ b/src/oci/limits/limits_client.py @@ -82,7 +82,6 @@ def __init__(self, config, **kwargs): def get_resource_availability(self, service_name, limit_name, compartment_id, **kwargs): """ - Get the availability and usage within a compartment for a given resource limit.\n For a given compartmentId, resource limit name, and scope, returns the following: - the number of available resources associated with the given limit - the usage in the selected compartment for the given limit @@ -180,7 +179,6 @@ def get_resource_availability(self, service_name, limit_name, compartment_id, ** def list_limit_definitions(self, compartment_id, **kwargs): """ - Get the list of resource limits for a service. Includes a list of resource limits that are currently supported. If the 'areQuotasSupported' property is true, you can create quota policies on top of this limit at the compartment level. @@ -299,7 +297,6 @@ def list_limit_definitions(self, compartment_id, **kwargs): def list_limit_values(self, compartment_id, service_name, **kwargs): """ - Get the full list of resource limit values for the given service. Includes a full list of resource limits belonging to a given service. @@ -434,7 +431,6 @@ def list_limit_values(self, compartment_id, service_name, **kwargs): def list_services(self, compartment_id, **kwargs): """ - Returns the list of supported services that have resource limits exposed. Returns the list of supported services. This will include the programmatic service name, along with the friendly service name. diff --git a/src/oci/limits/quotas_client.py b/src/oci/limits/quotas_client.py index f492c43e0c..4487e71476 100644 --- a/src/oci/limits/quotas_client.py +++ b/src/oci/limits/quotas_client.py @@ -82,7 +82,6 @@ def __init__(self, config, **kwargs): def create_quota(self, create_quota_details, **kwargs): """ - Creates quota Creates a new quota with the details supplied. @@ -157,7 +156,6 @@ def create_quota(self, create_quota_details, **kwargs): def delete_quota(self, quota_id, **kwargs): """ - Deletes quota Deletes the quota corresponding to the given OCID. @@ -236,7 +234,6 @@ def delete_quota(self, quota_id, **kwargs): def get_quota(self, quota_id, **kwargs): """ - Gets quota Gets the quota for the OCID specified. @@ -310,7 +307,6 @@ def get_quota(self, quota_id, **kwargs): def list_quotas(self, compartment_id, **kwargs): """ - Lists quotas Lists all quotas on resources from the given compartment @@ -436,7 +432,6 @@ def list_quotas(self, compartment_id, **kwargs): def update_quota(self, quota_id, update_quota_details, **kwargs): """ - Updates quota Updates the quota corresponding to given OCID with the details supplied. diff --git a/src/oci/load_balancer/load_balancer_client.py b/src/oci/load_balancer/load_balancer_client.py index 773ef3350e..728163f650 100644 --- a/src/oci/load_balancer/load_balancer_client.py +++ b/src/oci/load_balancer/load_balancer_client.py @@ -83,7 +83,6 @@ def __init__(self, config, **kwargs): def change_load_balancer_compartment(self, load_balancer_id, change_load_balancer_compartment_details, **kwargs): """ - ChangeLoadBalancerCompartment Moves a load balancer into a different compartment within the same tenancy. For information about moving resources between compartments, see `Moving Resources to a Different Compartment`__. @@ -185,7 +184,6 @@ def change_load_balancer_compartment(self, load_balancer_id, change_load_balance def create_backend(self, create_backend_details, load_balancer_id, backend_set_name, **kwargs): """ - CreateBackend Adds a backend server to a backend set. @@ -281,7 +279,6 @@ def create_backend(self, create_backend_details, load_balancer_id, backend_set_n def create_backend_set(self, create_backend_set_details, load_balancer_id, **kwargs): """ - CreateBackendSet Adds a backend set to a load balancer. @@ -371,7 +368,6 @@ def create_backend_set(self, create_backend_set_details, load_balancer_id, **kwa def create_certificate(self, create_certificate_details, load_balancer_id, **kwargs): """ - CreateCertificate Creates an asynchronous request to add an SSL certificate bundle. @@ -461,7 +457,6 @@ def create_certificate(self, create_certificate_details, load_balancer_id, **kwa def create_hostname(self, create_hostname_details, load_balancer_id, **kwargs): """ - CreateHostname Adds a hostname resource to the specified load balancer. For more information, see `Managing Request Routing`__. @@ -554,7 +549,6 @@ def create_hostname(self, create_hostname_details, load_balancer_id, **kwargs): def create_listener(self, create_listener_details, load_balancer_id, **kwargs): """ - CreateListener Adds a listener to a load balancer. @@ -644,7 +638,6 @@ def create_listener(self, create_listener_details, load_balancer_id, **kwargs): def create_load_balancer(self, create_load_balancer_details, **kwargs): """ - CreateLoadBalancer Creates a new load balancer in the specified compartment. For general information about load balancers, see `Overview of the Load Balancing Service`__. @@ -748,7 +741,6 @@ def create_load_balancer(self, create_load_balancer_details, **kwargs): def create_path_route_set(self, create_path_route_set_details, load_balancer_id, **kwargs): """ - CreatePathRouteSet Adds a path route set to a load balancer. For more information, see `Managing Request Routing`__. @@ -841,7 +833,6 @@ def create_path_route_set(self, create_path_route_set_details, load_balancer_id, def create_rule_set(self, load_balancer_id, create_rule_set_details, **kwargs): """ - CreateRuleSet Creates a new rule set associated with the specified load balancer. For more information, see `Managing Rule Sets`__. @@ -923,7 +914,6 @@ def create_rule_set(self, load_balancer_id, create_rule_set_details, **kwargs): def delete_backend(self, load_balancer_id, backend_set_name, backend_name, **kwargs): """ - DeleteBackend Removes a backend server from a given load balancer and backend set. @@ -1009,7 +999,6 @@ def delete_backend(self, load_balancer_id, backend_set_name, backend_name, **kwa def delete_backend_set(self, load_balancer_id, backend_set_name, **kwargs): """ - DeleteBackendSet Deletes the specified backend set. Note that deleting a backend set removes its backend servers from the load balancer. Before you can delete a backend set, you must remove it from any active listeners. @@ -1091,7 +1080,6 @@ def delete_backend_set(self, load_balancer_id, backend_set_name, **kwargs): def delete_certificate(self, load_balancer_id, certificate_name, **kwargs): """ - DeleteCertificate Deletes an SSL certificate bundle from a load balancer. @@ -1172,7 +1160,6 @@ def delete_certificate(self, load_balancer_id, certificate_name, **kwargs): def delete_hostname(self, load_balancer_id, name, **kwargs): """ - DeleteHostname Deletes a hostname resource from the specified load balancer. @@ -1252,7 +1239,6 @@ def delete_hostname(self, load_balancer_id, name, **kwargs): def delete_listener(self, load_balancer_id, listener_name, **kwargs): """ - DeleteListener Deletes a listener from a load balancer. @@ -1332,7 +1318,6 @@ def delete_listener(self, load_balancer_id, listener_name, **kwargs): def delete_load_balancer(self, load_balancer_id, **kwargs): """ - DeleteLoadBalancer Stops a load balancer and removes it from service. @@ -1406,7 +1391,6 @@ def delete_load_balancer(self, load_balancer_id, **kwargs): def delete_path_route_set(self, load_balancer_id, path_route_set_name, **kwargs): """ - DeletePathRouteSet Deletes a path route set from the specified load balancer. To delete a path route rule from a path route set, use the @@ -1489,7 +1473,6 @@ def delete_path_route_set(self, load_balancer_id, path_route_set_name, **kwargs) def delete_rule_set(self, load_balancer_id, rule_set_name, **kwargs): """ - DeleteRuleSet Deletes a rule set from the specified load balancer. To delete a rule from a rule set, use the @@ -1572,7 +1555,6 @@ def delete_rule_set(self, load_balancer_id, rule_set_name, **kwargs): def get_backend(self, load_balancer_id, backend_set_name, backend_name, **kwargs): """ - GetBackend Gets the specified backend server's configuration information. @@ -1660,7 +1642,6 @@ def get_backend(self, load_balancer_id, backend_set_name, backend_name, **kwargs def get_backend_health(self, load_balancer_id, backend_set_name, backend_name, **kwargs): """ - BackendHealth Gets the current health status of the specified backend server. @@ -1748,7 +1729,6 @@ def get_backend_health(self, load_balancer_id, backend_set_name, backend_name, * def get_backend_set(self, load_balancer_id, backend_set_name, **kwargs): """ - GetBackendSet Gets the specified backend set's configuration information. @@ -1830,7 +1810,6 @@ def get_backend_set(self, load_balancer_id, backend_set_name, **kwargs): def get_backend_set_health(self, load_balancer_id, backend_set_name, **kwargs): """ - BackendSetHealth Gets the health status for the specified backend set. @@ -1912,7 +1891,6 @@ def get_backend_set_health(self, load_balancer_id, backend_set_name, **kwargs): def get_health_checker(self, load_balancer_id, backend_set_name, **kwargs): """ - GetHealthChecker Gets the health check policy information for a given load balancer and backend set. @@ -1994,7 +1972,6 @@ def get_health_checker(self, load_balancer_id, backend_set_name, **kwargs): def get_hostname(self, load_balancer_id, name, **kwargs): """ - GetHostname Gets the specified hostname resource's configuration information. @@ -2076,7 +2053,6 @@ def get_hostname(self, load_balancer_id, name, **kwargs): def get_load_balancer(self, load_balancer_id, **kwargs): """ - GetLoadBalancer Gets the specified load balancer's configuration information. @@ -2152,7 +2128,6 @@ def get_load_balancer(self, load_balancer_id, **kwargs): def get_load_balancer_health(self, load_balancer_id, **kwargs): """ - LoadBalancerHealth Gets the health status for the specified load balancer. @@ -2228,7 +2203,6 @@ def get_load_balancer_health(self, load_balancer_id, **kwargs): def get_path_route_set(self, load_balancer_id, path_route_set_name, **kwargs): """ - GetPathRouteSet Gets the specified path route set's configuration information. @@ -2310,7 +2284,6 @@ def get_path_route_set(self, load_balancer_id, path_route_set_name, **kwargs): def get_rule_set(self, load_balancer_id, rule_set_name, **kwargs): """ - GetRuleSet Gets the specified set of rules. @@ -2392,7 +2365,6 @@ def get_rule_set(self, load_balancer_id, rule_set_name, **kwargs): def get_work_request(self, work_request_id, **kwargs): """ - GetWorkRequest Gets the details of a work request. @@ -2468,7 +2440,6 @@ def get_work_request(self, work_request_id, **kwargs): def list_backend_sets(self, load_balancer_id, **kwargs): """ - ListBackendSets Lists all backend sets associated with a given load balancer. @@ -2544,7 +2515,6 @@ def list_backend_sets(self, load_balancer_id, **kwargs): def list_backends(self, load_balancer_id, backend_set_name, **kwargs): """ - ListBackends Lists the backend servers for a given load balancer and backend set. @@ -2626,7 +2596,6 @@ def list_backends(self, load_balancer_id, backend_set_name, **kwargs): def list_certificates(self, load_balancer_id, **kwargs): """ - ListCertificates Lists all SSL certificates bundles associated with a given load balancer. @@ -2703,7 +2672,6 @@ def list_certificates(self, load_balancer_id, **kwargs): def list_hostnames(self, load_balancer_id, **kwargs): """ - ListHostnames Lists all hostname resources associated with the specified load balancer. @@ -2780,7 +2748,6 @@ def list_hostnames(self, load_balancer_id, **kwargs): def list_listener_rules(self, load_balancer_id, listener_name, **kwargs): """ - ListListenerRules Lists all of the rules from all of the rule sets associated with the specified listener. The response organizes the rules in the following order: @@ -2866,7 +2833,6 @@ def list_listener_rules(self, load_balancer_id, listener_name, **kwargs): def list_load_balancer_healths(self, compartment_id, **kwargs): """ - ListLoadBalancerHealths Lists the summary health statuses for all load balancers in the specified compartment. @@ -2957,7 +2923,6 @@ def list_load_balancer_healths(self, compartment_id, **kwargs): def list_load_balancers(self, compartment_id, **kwargs): """ - ListLoadBalancers Lists all load balancers in the specified compartment. @@ -3107,7 +3072,6 @@ def list_load_balancers(self, compartment_id, **kwargs): def list_path_route_sets(self, load_balancer_id, **kwargs): """ - ListPathRouteSets Lists all path route sets associated with the specified load balancer. @@ -3184,7 +3148,6 @@ def list_path_route_sets(self, load_balancer_id, **kwargs): def list_policies(self, compartment_id, **kwargs): """ - ListPolicies Lists the available load balancer policies. @@ -3275,7 +3238,6 @@ def list_policies(self, compartment_id, **kwargs): def list_protocols(self, compartment_id, **kwargs): """ - ListProtocols Lists all supported traffic protocols. @@ -3366,7 +3328,6 @@ def list_protocols(self, compartment_id, **kwargs): def list_rule_sets(self, load_balancer_id, **kwargs): """ - ListRuleSets Lists all rule sets associated with the specified load balancer. @@ -3442,7 +3403,6 @@ def list_rule_sets(self, load_balancer_id, **kwargs): def list_shapes(self, compartment_id, **kwargs): """ - ListShapes Lists the valid load balancer shapes. @@ -3533,7 +3493,6 @@ def list_shapes(self, compartment_id, **kwargs): def list_work_requests(self, load_balancer_id, **kwargs): """ - ListWorkRequests Lists the work requests for a given load balancer. @@ -3635,7 +3594,6 @@ def list_work_requests(self, load_balancer_id, **kwargs): def update_backend(self, update_backend_details, load_balancer_id, backend_set_name, backend_name, **kwargs): """ - UpdateBackend Updates the configuration of a backend server within the specified backend set. @@ -3737,7 +3695,6 @@ def update_backend(self, update_backend_details, load_balancer_id, backend_set_n def update_backend_set(self, update_backend_set_details, load_balancer_id, backend_set_name, **kwargs): """ - UpdateBackendSet Updates a backend set. @@ -3833,7 +3790,6 @@ def update_backend_set(self, update_backend_set_details, load_balancer_id, backe def update_health_checker(self, health_checker, load_balancer_id, backend_set_name, **kwargs): """ - UpdateHealthChecker Updates the health check policy for a given load balancer and backend set. @@ -3929,7 +3885,6 @@ def update_health_checker(self, health_checker, load_balancer_id, backend_set_na def update_hostname(self, update_hostname_details, load_balancer_id, name, **kwargs): """ - UpdateHostname Overwrites an existing hostname resource on the specified load balancer. Use this operation to change a virtual hostname. @@ -4016,7 +3971,6 @@ def update_hostname(self, update_hostname_details, load_balancer_id, name, **kwa def update_listener(self, update_listener_details, load_balancer_id, listener_name, **kwargs): """ - UpdateListener Updates a listener for a given load balancer. @@ -4112,7 +4066,6 @@ def update_listener(self, update_listener_details, load_balancer_id, listener_na def update_load_balancer(self, update_load_balancer_details, load_balancer_id, **kwargs): """ - UpdateLoadBalancer Updates a load balancer's configuration. @@ -4202,7 +4155,6 @@ def update_load_balancer(self, update_load_balancer_details, load_balancer_id, * def update_network_security_groups(self, update_network_security_groups_details, load_balancer_id, **kwargs): """ - UpdateNetworkSecurityGroups Updates the network security groups associated with the specified load balancer. @@ -4292,7 +4244,6 @@ def update_network_security_groups(self, update_network_security_groups_details, def update_path_route_set(self, update_path_route_set_details, load_balancer_id, path_route_set_name, **kwargs): """ - UpdatePathRouteSet Overwrites an existing path route set on the specified load balancer. Use this operation to add, delete, or alter path route rules in a path route set. @@ -4393,7 +4344,6 @@ def update_path_route_set(self, update_path_route_set_details, load_balancer_id, def update_rule_set(self, load_balancer_id, rule_set_name, update_rule_set_details, **kwargs): """ - UpdateRuleSet Overwrites an existing set of rules on the specified load balancer. Use this operation to add or alter the rules in a rule set. diff --git a/src/oci/marketplace/marketplace_client.py b/src/oci/marketplace/marketplace_client.py index 76f067eb36..107245a374 100644 --- a/src/oci/marketplace/marketplace_client.py +++ b/src/oci/marketplace/marketplace_client.py @@ -82,7 +82,6 @@ def __init__(self, config, **kwargs): def create_accepted_agreement(self, create_accepted_agreement_details, **kwargs): """ - Accepts a terms of use agreement for a listing. Accepts a terms of use agreement for a specific package version of a listing. You must accept all terms of use for a package before you can deploy the package. @@ -157,7 +156,6 @@ def create_accepted_agreement(self, create_accepted_agreement_details, **kwargs) def delete_accepted_agreement(self, accepted_agreement_id, signature, **kwargs): """ - Removes an accepted terms of use agreement. Removes a previously accepted terms of use agreement from the list of agreements that Marketplace checks before initiating a deployment. Listings in the Marketplace that require acceptance of the specified terms of use can no longer be deployed, but existing deployments aren't affected. @@ -248,7 +246,6 @@ def delete_accepted_agreement(self, accepted_agreement_id, signature, **kwargs): def get_accepted_agreement(self, accepted_agreement_id, **kwargs): """ - Gets the details of a terms of use agreement. Gets the details of a specific, previously accepted terms of use agreement. @@ -322,7 +319,6 @@ def get_accepted_agreement(self, accepted_agreement_id, **kwargs): def get_agreement(self, listing_id, package_version, agreement_id, **kwargs): """ - Gets a terms of use agreement for a package. Returns a terms of use agreement for a package with a time-based signature that can be used to accept the agreement. @@ -405,7 +401,6 @@ def get_agreement(self, listing_id, package_version, agreement_id, **kwargs): def get_listing(self, listing_id, **kwargs): """ - Gets the details of a listing. Gets detailed information about a listing, including the listing's name, version, description, and resources. @@ -480,7 +475,6 @@ def get_listing(self, listing_id, **kwargs): def get_package(self, listing_id, package_version, **kwargs): """ - Get the details of a specific package version. Get the details of the specified version of a package, including information needed to launch the package. @@ -558,7 +552,6 @@ def get_package(self, listing_id, package_version, **kwargs): def list_accepted_agreements(self, compartment_id, **kwargs): """ - Gets the list of accepted terms of use agreements in the specified compartment. Lists the terms of use agreements that have been accepted in the specified compartment. You can filter results by specifying query parameters. @@ -688,7 +681,6 @@ def list_accepted_agreements(self, compartment_id, **kwargs): def list_agreements(self, listing_id, package_version, **kwargs): """ - Lists terms of use agreements for a package. Returns the terms of use agreements that must be accepted before you can deploy the specified version of a package. @@ -782,7 +774,6 @@ def list_agreements(self, listing_id, package_version, **kwargs): def list_categories(self, **kwargs): """ - Gets a list of listing categories. Gets the list of all the categories for listings published to Oracle Cloud Infrastructure Marketplace. Categories apply to the software product provided by the listing. @@ -858,7 +849,6 @@ def list_categories(self, **kwargs): def list_listings(self, **kwargs): """ - Gets a list of listings. Gets a list of listings from Oracle Cloud Infrastructure Marketplace by searching keywords and filtering according to listing attributes. @@ -1012,7 +1002,6 @@ def list_listings(self, **kwargs): def list_packages(self, listing_id, **kwargs): """ Gets the list of packages for a listing. - Gets the list of packages for a listing. :param str listing_id: (required) @@ -1141,7 +1130,6 @@ def list_packages(self, listing_id, **kwargs): def list_publishers(self, **kwargs): """ - Gets a list of publishers. Gets the list of all the publishers of listings available in Oracle Cloud Infrastructure Marketplace. @@ -1221,7 +1209,6 @@ def list_publishers(self, **kwargs): def update_accepted_agreement(self, accepted_agreement_id, update_accepted_agreement_details, **kwargs): """ - Updates an accepted terms of use agreement. Updates the display name or tags associated with a listing's previously accepted terms of use agreement. diff --git a/src/oci/monitoring/monitoring_client.py b/src/oci/monitoring/monitoring_client.py index 8acdb16607..3fa537304e 100644 --- a/src/oci/monitoring/monitoring_client.py +++ b/src/oci/monitoring/monitoring_client.py @@ -184,7 +184,6 @@ def change_alarm_compartment(self, alarm_id, change_alarm_compartment_details, * def create_alarm(self, create_alarm_details, **kwargs): """ - Creates a new alarm in the specified compartment.\n Creates a new alarm in the specified compartment. For important limits information, see `Limits on Monitoring`__. @@ -266,7 +265,6 @@ def create_alarm(self, create_alarm_details, **kwargs): def delete_alarm(self, alarm_id, **kwargs): """ - Deletes an alarm.\n Deletes the specified alarm. For important limits information, see `Limits on Monitoring`__. @@ -885,7 +883,6 @@ def list_alarms_status(self, compartment_id, **kwargs): def list_metrics(self, compartment_id, list_metrics_details, **kwargs): """ - List metrics based on matching criteria. Returns metric definitions that match the criteria specified in the request. Compartment OCID required. For information about metrics, see `Metrics Overview`__. For important limits information, see `Limits on Monitoring`__. @@ -1001,7 +998,6 @@ def list_metrics(self, compartment_id, list_metrics_details, **kwargs): def post_metric_data(self, post_metric_data_details, **kwargs): """ - Publishes raw metric data points to the Monitoring service. \n Publishes raw metric data points to the Monitoring service. For more information about publishing metrics, see `Publishing Custom Metrics`__. For important limits information, see `Limits on Monitoring`__. @@ -1086,7 +1082,6 @@ def post_metric_data(self, post_metric_data_details, **kwargs): def remove_alarm_suppression(self, alarm_id, **kwargs): """ - Removes any existing suppression for the specified alarm.\n Removes any existing suppression for the specified alarm. For important limits information, see `Limits on Monitoring`__. @@ -1174,7 +1169,6 @@ def remove_alarm_suppression(self, alarm_id, **kwargs): def summarize_metrics_data(self, compartment_id, summarize_metrics_data_details, **kwargs): """ - Summarizes and returns metrics data filtered using the provided query expression and compartmentId. Returns aggregated data that match the criteria specified in the request. Compartment OCID required. For information on metric queries, see `Building Metric Queries`__. For important limits information, see `Limits on Monitoring`__. @@ -1270,7 +1264,6 @@ def summarize_metrics_data(self, compartment_id, summarize_metrics_data_details, def update_alarm(self, alarm_id, update_alarm_details, **kwargs): """ - Updates an alarm.\n Updates the specified alarm. For important limits information, see `Limits on Monitoring`__. diff --git a/src/oci/nosql/nosql_client.py b/src/oci/nosql/nosql_client.py index 9cc753114d..013065daeb 100644 --- a/src/oci/nosql/nosql_client.py +++ b/src/oci/nosql/nosql_client.py @@ -86,7 +86,6 @@ def __init__(self, config, **kwargs): def change_table_compartment(self, table_name_or_id, change_table_compartment_details, **kwargs): """ Change a table's compartment. - Change a table's compartment. :param str table_name_or_id: (required) @@ -183,7 +182,6 @@ def change_table_compartment(self, table_name_or_id, change_table_compartment_de def create_index(self, table_name_or_id, create_index_details, **kwargs): """ - Create a new index. Create a new index on the table identified by tableNameOrId. @@ -273,7 +271,6 @@ def create_index(self, table_name_or_id, create_index_details, **kwargs): def create_table(self, create_table_details, **kwargs): """ Create a new table. - Create a new table. :param CreateTableDetails create_table_details: (required) @@ -346,7 +343,6 @@ def create_table(self, create_table_details, **kwargs): def delete_index(self, table_name_or_id, index_name, **kwargs): """ - Delete an index. Delete an index from the table identified by tableNameOrId. @@ -449,7 +445,6 @@ def delete_index(self, table_name_or_id, index_name, **kwargs): def delete_row(self, table_name_or_id, key, **kwargs): """ Delete a single row from the table, by primary key. - Delete a single row from the table, by primary key. :param str table_name_or_id: (required) @@ -560,7 +555,6 @@ def delete_row(self, table_name_or_id, key, **kwargs): def delete_table(self, table_name_or_id, **kwargs): """ Delete a table by tableNameOrId. - Delete a table by tableNameOrId. :param str table_name_or_id: (required) @@ -658,7 +652,6 @@ def delete_table(self, table_name_or_id, **kwargs): def delete_work_request(self, work_request_id, **kwargs): """ Cancel a work request operation with the given ID. - Cancel a work request operation with the given ID. :param str work_request_id: (required) @@ -738,7 +731,6 @@ def delete_work_request(self, work_request_id, **kwargs): def get_index(self, table_name_or_id, index_name, **kwargs): """ Get information about a single index. - Get information about a single index. :param str table_name_or_id: (required) @@ -828,7 +820,6 @@ def get_index(self, table_name_or_id, index_name, **kwargs): def get_row(self, table_name_or_id, key, **kwargs): """ Get a single row from the table by primary key. - Get a single row from the table by primary key. :param str table_name_or_id: (required) @@ -938,7 +929,6 @@ def get_row(self, table_name_or_id, key, **kwargs): def get_table(self, table_name_or_id, **kwargs): """ Get table info by identifier. - Get table info by identifier. :param str table_name_or_id: (required) @@ -1024,7 +1014,6 @@ def get_table(self, table_name_or_id, **kwargs): def get_work_request(self, work_request_id, **kwargs): """ Get the status of the work request with the given ID. - Get the status of the work request with the given ID. :param str work_request_id: (required) @@ -1097,7 +1086,6 @@ def get_work_request(self, work_request_id, **kwargs): def list_indexes(self, table_name_or_id, **kwargs): """ Get a list of indexes on a table. - Get a list of indexes on a table. :param str table_name_or_id: (required) @@ -1245,7 +1233,6 @@ def list_indexes(self, table_name_or_id, **kwargs): def list_table_usage(self, table_name_or_id, **kwargs): """ Get table usage info. - Get table usage info. :param str table_name_or_id: (required) @@ -1355,7 +1342,6 @@ def list_table_usage(self, table_name_or_id, **kwargs): def list_tables(self, compartment_id, **kwargs): """ Get a list of tables in a compartment. - Get a list of tables in a compartment. :param str compartment_id: (required) @@ -1484,7 +1470,6 @@ def list_tables(self, compartment_id, **kwargs): def list_work_request_errors(self, work_request_id, **kwargs): """ - List work request errors Return a (paginated) list of errors for a given work request. @@ -1575,7 +1560,6 @@ def list_work_request_errors(self, work_request_id, **kwargs): def list_work_request_logs(self, work_request_id, **kwargs): """ - Lists work request logs Return a (paginated) list of logs for a given work request. @@ -1667,7 +1651,6 @@ def list_work_request_logs(self, work_request_id, **kwargs): def list_work_requests(self, compartment_id, **kwargs): """ List the work requests in a compartment. - List the work requests in a compartment. :param str compartment_id: (required) @@ -1746,7 +1729,6 @@ def list_work_requests(self, compartment_id, **kwargs): def prepare_statement(self, compartment_id, statement, **kwargs): """ - Prepare a SQL statement for use in a query with variable substitution.\n Prepare a SQL statement for use in a query with variable substitution. @@ -1819,7 +1801,6 @@ def prepare_statement(self, compartment_id, statement, **kwargs): def query(self, query_details, **kwargs): """ Execute a SQL query. - Execute a SQL query. :param QueryDetails query_details: (required) @@ -1900,7 +1881,6 @@ def query(self, query_details, **kwargs): def summarize_statement(self, compartment_id, statement, **kwargs): """ Check the syntax and return a brief summary of a SQL statement. - Check the syntax and return a brief summary of a SQL statement. :param str compartment_id: (required) @@ -1972,7 +1952,6 @@ def summarize_statement(self, compartment_id, statement, **kwargs): def update_row(self, table_name_or_id, update_row_details, **kwargs): """ Write a single row into the table. - Write a single row into the table. :param str table_name_or_id: (required) @@ -2058,7 +2037,6 @@ def update_row(self, table_name_or_id, update_row_details, **kwargs): def update_table(self, table_name_or_id, update_table_details, **kwargs): """ - Alter the table identified by tableNameOrId. Alter the table identified by tableNameOrId, changing schema, limits, or tags diff --git a/src/oci/object_storage/models/__init__.py b/src/oci/object_storage/models/__init__.py index 7beeca537b..9f1a5ad801 100644 --- a/src/oci/object_storage/models/__init__.py +++ b/src/oci/object_storage/models/__init__.py @@ -11,6 +11,9 @@ from .create_bucket_details import CreateBucketDetails from .create_multipart_upload_details import CreateMultipartUploadDetails from .create_preauthenticated_request_details import CreatePreauthenticatedRequestDetails +from .create_replication_policy_details import CreateReplicationPolicyDetails +from .create_retention_rule_details import CreateRetentionRuleDetails +from .duration import Duration from .list_objects import ListObjects from .multipart_upload import MultipartUpload from .multipart_upload_part_summary import MultipartUploadPartSummary @@ -24,9 +27,17 @@ from .preauthenticated_request_summary import PreauthenticatedRequestSummary from .put_object_lifecycle_policy_details import PutObjectLifecyclePolicyDetails from .rename_object_details import RenameObjectDetails +from .replication_policy import ReplicationPolicy +from .replication_policy_summary import ReplicationPolicySummary +from .replication_source import ReplicationSource from .restore_objects_details import RestoreObjectsDetails +from .retention_rule import RetentionRule +from .retention_rule_collection import RetentionRuleCollection +from .retention_rule_details import RetentionRuleDetails +from .retention_rule_summary import RetentionRuleSummary from .update_bucket_details import UpdateBucketDetails from .update_namespace_metadata_details import UpdateNamespaceMetadataDetails +from .update_retention_rule_details import UpdateRetentionRuleDetails from .work_request import WorkRequest from .work_request_error import WorkRequestError from .work_request_log_entry import WorkRequestLogEntry @@ -43,6 +54,9 @@ "CreateBucketDetails": CreateBucketDetails, "CreateMultipartUploadDetails": CreateMultipartUploadDetails, "CreatePreauthenticatedRequestDetails": CreatePreauthenticatedRequestDetails, + "CreateReplicationPolicyDetails": CreateReplicationPolicyDetails, + "CreateRetentionRuleDetails": CreateRetentionRuleDetails, + "Duration": Duration, "ListObjects": ListObjects, "MultipartUpload": MultipartUpload, "MultipartUploadPartSummary": MultipartUploadPartSummary, @@ -56,9 +70,17 @@ "PreauthenticatedRequestSummary": PreauthenticatedRequestSummary, "PutObjectLifecyclePolicyDetails": PutObjectLifecyclePolicyDetails, "RenameObjectDetails": RenameObjectDetails, + "ReplicationPolicy": ReplicationPolicy, + "ReplicationPolicySummary": ReplicationPolicySummary, + "ReplicationSource": ReplicationSource, "RestoreObjectsDetails": RestoreObjectsDetails, + "RetentionRule": RetentionRule, + "RetentionRuleCollection": RetentionRuleCollection, + "RetentionRuleDetails": RetentionRuleDetails, + "RetentionRuleSummary": RetentionRuleSummary, "UpdateBucketDetails": UpdateBucketDetails, "UpdateNamespaceMetadataDetails": UpdateNamespaceMetadataDetails, + "UpdateRetentionRuleDetails": UpdateRetentionRuleDetails, "WorkRequest": WorkRequest, "WorkRequestError": WorkRequestError, "WorkRequestLogEntry": WorkRequestLogEntry, diff --git a/src/oci/object_storage/models/bucket.py b/src/oci/object_storage/models/bucket.py index 5f69da90c0..a8b24d67b6 100644 --- a/src/oci/object_storage/models/bucket.py +++ b/src/oci/object_storage/models/bucket.py @@ -114,6 +114,14 @@ def __init__(self, **kwargs): The value to assign to the approximate_size property of this Bucket. :type approximate_size: int + :param replication_enabled: + The value to assign to the replication_enabled property of this Bucket. + :type replication_enabled: bool + + :param is_read_only: + The value to assign to the is_read_only property of this Bucket. + :type is_read_only: bool + :param id: The value to assign to the id property of this Bucket. :type id: str @@ -136,6 +144,8 @@ def __init__(self, **kwargs): 'object_lifecycle_policy_etag': 'str', 'approximate_count': 'int', 'approximate_size': 'int', + 'replication_enabled': 'bool', + 'is_read_only': 'bool', 'id': 'str' } @@ -156,6 +166,8 @@ def __init__(self, **kwargs): 'object_lifecycle_policy_etag': 'objectLifecyclePolicyEtag', 'approximate_count': 'approximateCount', 'approximate_size': 'approximateSize', + 'replication_enabled': 'replicationEnabled', + 'is_read_only': 'isReadOnly', 'id': 'id' } @@ -175,6 +187,8 @@ def __init__(self, **kwargs): self._object_lifecycle_policy_etag = None self._approximate_count = None self._approximate_size = None + self._replication_enabled = None + self._is_read_only = None self._id = None @property @@ -279,7 +293,9 @@ def metadata(self, metadata): def created_by(self): """ **[Required]** Gets the created_by of this Bucket. - The OCID of the user who created the bucket. + The `OCID`__ of the user who created the bucket. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm :return: The created_by of this Bucket. @@ -291,7 +307,9 @@ def created_by(self): def created_by(self, created_by): """ Sets the created_by of this Bucket. - The OCID of the user who created the bucket. + The `OCID`__ of the user who created the bucket. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm :param created_by: The created_by of this Bucket. @@ -303,9 +321,9 @@ def created_by(self, created_by): def time_created(self): """ **[Required]** Gets the time_created of this Bucket. - The date and time the bucket was created, as described in `RFC 2616`__, section 14.29. + The date and time the bucket was created, as described in `RFC 2616`__. - __ https://tools.ietf.org/rfc/rfc2616 + __ https://tools.ietf.org/html/rfc2616#section-14.29 :return: The time_created of this Bucket. @@ -317,9 +335,9 @@ def time_created(self): def time_created(self, time_created): """ Sets the time_created of this Bucket. - The date and time the bucket was created, as described in `RFC 2616`__, section 14.29. + The date and time the bucket was created, as described in `RFC 2616`__. - __ https://tools.ietf.org/rfc/rfc2616 + __ https://tools.ietf.org/html/rfc2616#section-14.29 :param time_created: The time_created of this Bucket. @@ -525,8 +543,10 @@ def defined_tags(self, defined_tags): def kms_key_id(self): """ Gets the kms_key_id of this Bucket. - The OCID of a master encryption key used to call the Key Management service to generate a data encryption key - or to encrypt or decrypt a data encryption key. + The `OCID`__ of a master encryption key used to call the Key Management + service to generate a data encryption key or to encrypt or decrypt a data encryption key. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm :return: The kms_key_id of this Bucket. @@ -538,8 +558,10 @@ def kms_key_id(self): def kms_key_id(self, kms_key_id): """ Sets the kms_key_id of this Bucket. - The OCID of a master encryption key used to call the Key Management service to generate a data encryption key - or to encrypt or decrypt a data encryption key. + The `OCID`__ of a master encryption key used to call the Key Management + service to generate a data encryption key or to encrypt or decrypt a data encryption key. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm :param kms_key_id: The kms_key_id of this Bucket. @@ -623,11 +645,65 @@ def approximate_size(self, approximate_size): """ self._approximate_size = approximate_size + @property + def replication_enabled(self): + """ + Gets the replication_enabled of this Bucket. + Whether or not this bucket is a replication source. By default, `replicationEnabled` is set to `false`. This will + be set to 'true' when you create a replication policy for the bucket. + + + :return: The replication_enabled of this Bucket. + :rtype: bool + """ + return self._replication_enabled + + @replication_enabled.setter + def replication_enabled(self, replication_enabled): + """ + Sets the replication_enabled of this Bucket. + Whether or not this bucket is a replication source. By default, `replicationEnabled` is set to `false`. This will + be set to 'true' when you create a replication policy for the bucket. + + + :param replication_enabled: The replication_enabled of this Bucket. + :type: bool + """ + self._replication_enabled = replication_enabled + + @property + def is_read_only(self): + """ + Gets the is_read_only of this Bucket. + Whether or not this bucket is read only. By default, `isReadOnly` is set to `false`. This will + be set to 'true' when this bucket is configured as a destination in a replication policy. + + + :return: The is_read_only of this Bucket. + :rtype: bool + """ + return self._is_read_only + + @is_read_only.setter + def is_read_only(self, is_read_only): + """ + Sets the is_read_only of this Bucket. + Whether or not this bucket is read only. By default, `isReadOnly` is set to `false`. This will + be set to 'true' when this bucket is configured as a destination in a replication policy. + + + :param is_read_only: The is_read_only of this Bucket. + :type: bool + """ + self._is_read_only = is_read_only + @property def id(self): """ Gets the id of this Bucket. - The OCID of the bucket which is a Oracle assigned unique identifier for this resource type (bucket). + The `OCID`__ of the bucket. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm :return: The id of this Bucket. @@ -639,7 +715,9 @@ def id(self): def id(self, id): """ Sets the id of this Bucket. - The OCID of the bucket which is a Oracle assigned unique identifier for this resource type (bucket). + The `OCID`__ of the bucket. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm :param id: The id of this Bucket. diff --git a/src/oci/object_storage/models/bucket_summary.py b/src/oci/object_storage/models/bucket_summary.py index 85c9b6f33a..a7e6147b70 100644 --- a/src/oci/object_storage/models/bucket_summary.py +++ b/src/oci/object_storage/models/bucket_summary.py @@ -163,7 +163,9 @@ def compartment_id(self, compartment_id): def created_by(self): """ **[Required]** Gets the created_by of this BucketSummary. - The OCID of the user who created the bucket. + The `OCID`__ of the user who created the bucket. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm :return: The created_by of this BucketSummary. @@ -175,7 +177,9 @@ def created_by(self): def created_by(self, created_by): """ Sets the created_by of this BucketSummary. - The OCID of the user who created the bucket. + The `OCID`__ of the user who created the bucket. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm :param created_by: The created_by of this BucketSummary. @@ -187,9 +191,9 @@ def created_by(self, created_by): def time_created(self): """ **[Required]** Gets the time_created of this BucketSummary. - The date and time the bucket was created, as described in `RFC 2616`__, section 14.29. + The date and time the bucket was created, as described in `RFC 2616`__. - __ https://tools.ietf.org/rfc/rfc2616 + __ https://tools.ietf.org/html/rfc2616#section-14.29 :return: The time_created of this BucketSummary. @@ -201,9 +205,9 @@ def time_created(self): def time_created(self, time_created): """ Sets the time_created of this BucketSummary. - The date and time the bucket was created, as described in `RFC 2616`__, section 14.29. + The date and time the bucket was created, as described in `RFC 2616`__. - __ https://tools.ietf.org/rfc/rfc2616 + __ https://tools.ietf.org/html/rfc2616#section-14.29 :param time_created: The time_created of this BucketSummary. diff --git a/src/oci/object_storage/models/create_bucket_details.py b/src/oci/object_storage/models/create_bucket_details.py index f0a3688406..758761c57d 100644 --- a/src/oci/object_storage/models/create_bucket_details.py +++ b/src/oci/object_storage/models/create_bucket_details.py @@ -118,7 +118,7 @@ def __init__(self, **kwargs): def name(self): """ **[Required]** Gets the name of this CreateBucketDetails. - The name of the bucket. Valid characters are uppercase or lowercase letters, numbers, and dashes. + The name of the bucket. Valid characters are uppercase or lowercase letters, numbers, hyphens, underscores, and periods. Bucket names must be unique within an Object Storage namespace. Avoid entering confidential information. example: Example: my-new-bucket1 @@ -132,7 +132,7 @@ def name(self): def name(self, name): """ Sets the name of this CreateBucketDetails. - The name of the bucket. Valid characters are uppercase or lowercase letters, numbers, and dashes. + The name of the bucket. Valid characters are uppercase or lowercase letters, numbers, hyphens, underscores, and periods. Bucket names must be unique within an Object Storage namespace. Avoid entering confidential information. example: Example: my-new-bucket1 @@ -368,8 +368,10 @@ def defined_tags(self, defined_tags): def kms_key_id(self): """ Gets the kms_key_id of this CreateBucketDetails. - The OCID of a master encryption key used to call the Key Management service to generate a data - encryption key or to encrypt or decrypt a data encryption key. + The `OCID`__ of a master encryption key used to call the Key + Management service to generate a data encryption key or to encrypt or decrypt a data encryption key. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm :return: The kms_key_id of this CreateBucketDetails. @@ -381,8 +383,10 @@ def kms_key_id(self): def kms_key_id(self, kms_key_id): """ Sets the kms_key_id of this CreateBucketDetails. - The OCID of a master encryption key used to call the Key Management service to generate a data - encryption key or to encrypt or decrypt a data encryption key. + The `OCID`__ of a master encryption key used to call the Key + Management service to generate a data encryption key or to encrypt or decrypt a data encryption key. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm :param kms_key_id: The kms_key_id of this CreateBucketDetails. diff --git a/src/oci/object_storage/models/create_multipart_upload_details.py b/src/oci/object_storage/models/create_multipart_upload_details.py index 93e755d719..1552b428c1 100644 --- a/src/oci/object_storage/models/create_multipart_upload_details.py +++ b/src/oci/object_storage/models/create_multipart_upload_details.py @@ -108,7 +108,10 @@ def object(self, object): def content_type(self): """ Gets the content_type of this CreateMultipartUploadDetails. - The content type of the object to upload. + The optional Content-Type header that defines the standard MIME type format of the object to upload. + Specifying values for this header has no effect on Object Storage behavior. Programs that read the object + determine what to do based on the value provided. For example, you could use this header to identify and + perform special operations on text only objects. :return: The content_type of this CreateMultipartUploadDetails. @@ -120,7 +123,10 @@ def content_type(self): def content_type(self, content_type): """ Sets the content_type of this CreateMultipartUploadDetails. - The content type of the object to upload. + The optional Content-Type header that defines the standard MIME type format of the object to upload. + Specifying values for this header has no effect on Object Storage behavior. Programs that read the object + determine what to do based on the value provided. For example, you could use this header to identify and + perform special operations on text only objects. :param content_type: The content_type of this CreateMultipartUploadDetails. @@ -132,7 +138,10 @@ def content_type(self, content_type): def content_language(self): """ Gets the content_language of this CreateMultipartUploadDetails. - The content language of the object to upload. + The optional Content-Language header that defines the content language of the object to upload. Specifying + values for this header has no effect on Object Storage behavior. Programs that read the object determine what + to do based on the value provided. For example, you could use this header to identify and differentiate objects + based on a particular language. :return: The content_language of this CreateMultipartUploadDetails. @@ -144,7 +153,10 @@ def content_language(self): def content_language(self, content_language): """ Sets the content_language of this CreateMultipartUploadDetails. - The content language of the object to upload. + The optional Content-Language header that defines the content language of the object to upload. Specifying + values for this header has no effect on Object Storage behavior. Programs that read the object determine what + to do based on the value provided. For example, you could use this header to identify and differentiate objects + based on a particular language. :param content_language: The content_language of this CreateMultipartUploadDetails. @@ -156,7 +168,11 @@ def content_language(self, content_language): def content_encoding(self): """ Gets the content_encoding of this CreateMultipartUploadDetails. - The content encoding of the object to upload. + The optional Content-Encoding header that defines the content encodings that were applied to the object to + upload. Specifying values for this header has no effect on Object Storage behavior. Programs that read the + object determine what to do based on the value provided. For example, you could use this header to determine + what decoding mechanisms need to be applied to obtain the media-type specified by the Content-Type header of + the object. :return: The content_encoding of this CreateMultipartUploadDetails. @@ -168,7 +184,11 @@ def content_encoding(self): def content_encoding(self, content_encoding): """ Sets the content_encoding of this CreateMultipartUploadDetails. - The content encoding of the object to upload. + The optional Content-Encoding header that defines the content encodings that were applied to the object to + upload. Specifying values for this header has no effect on Object Storage behavior. Programs that read the + object determine what to do based on the value provided. For example, you could use this header to determine + what decoding mechanisms need to be applied to obtain the media-type specified by the Content-Type header of + the object. :param content_encoding: The content_encoding of this CreateMultipartUploadDetails. @@ -180,7 +200,10 @@ def content_encoding(self, content_encoding): def content_disposition(self): """ Gets the content_disposition of this CreateMultipartUploadDetails. - The Content-Disposition header value to be returned in GetObjectReponse. + The optional Content-Disposition header that defines presentational information for the object to be + returned in GetObject and HeadObject responses. Specifying values for this header has no effect on Object + Storage behavior. Programs that read the object determine what to do based on the value provided. + For example, you could use this header to let users download objects with custom filenames in a browser. :return: The content_disposition of this CreateMultipartUploadDetails. @@ -192,7 +215,10 @@ def content_disposition(self): def content_disposition(self, content_disposition): """ Sets the content_disposition of this CreateMultipartUploadDetails. - The Content-Disposition header value to be returned in GetObjectReponse. + The optional Content-Disposition header that defines presentational information for the object to be + returned in GetObject and HeadObject responses. Specifying values for this header has no effect on Object + Storage behavior. Programs that read the object determine what to do based on the value provided. + For example, you could use this header to let users download objects with custom filenames in a browser. :param content_disposition: The content_disposition of this CreateMultipartUploadDetails. @@ -204,7 +230,10 @@ def content_disposition(self, content_disposition): def cache_control(self): """ Gets the cache_control of this CreateMultipartUploadDetails. - The cache-control header value to be returned in GetObjectReponse. + The optional Cache-Control header that defines the caching behavior value to be returned in GetObject and + HeadObject responses. Specifying values for this header has no effect on Object Storage behavior. Programs + that read the object determine what to do based on the value provided. + For example, you could use this header to identify objects that require caching restrictions. :return: The cache_control of this CreateMultipartUploadDetails. @@ -216,7 +245,10 @@ def cache_control(self): def cache_control(self, cache_control): """ Sets the cache_control of this CreateMultipartUploadDetails. - The cache-control header value to be returned in GetObjectReponse. + The optional Cache-Control header that defines the caching behavior value to be returned in GetObject and + HeadObject responses. Specifying values for this header has no effect on Object Storage behavior. Programs + that read the object determine what to do based on the value provided. + For example, you could use this header to identify objects that require caching restrictions. :param cache_control: The cache_control of this CreateMultipartUploadDetails. diff --git a/src/oci/object_storage/models/create_preauthenticated_request_details.py b/src/oci/object_storage/models/create_preauthenticated_request_details.py index 4da11fa689..d780edc297 100644 --- a/src/oci/object_storage/models/create_preauthenticated_request_details.py +++ b/src/oci/object_storage/models/create_preauthenticated_request_details.py @@ -159,7 +159,7 @@ def time_expires(self): The expiration date for the pre-authenticated request as per `RFC 3339`__. After this date the pre-authenticated request will no longer be valid. - __ https://tools.ietf.org/rfc/rfc3339 + __ https://tools.ietf.org/html/rfc3339 :return: The time_expires of this CreatePreauthenticatedRequestDetails. @@ -174,7 +174,7 @@ def time_expires(self, time_expires): The expiration date for the pre-authenticated request as per `RFC 3339`__. After this date the pre-authenticated request will no longer be valid. - __ https://tools.ietf.org/rfc/rfc3339 + __ https://tools.ietf.org/html/rfc3339 :param time_expires: The time_expires of this CreatePreauthenticatedRequestDetails. diff --git a/src/oci/object_storage/models/create_replication_policy_details.py b/src/oci/object_storage/models/create_replication_policy_details.py new file mode 100644 index 0000000000..24fa060f34 --- /dev/null +++ b/src/oci/object_storage/models/create_replication_policy_details.py @@ -0,0 +1,133 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + + +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 CreateReplicationPolicyDetails(object): + """ + The details to create a replication policy. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CreateReplicationPolicyDetails 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 CreateReplicationPolicyDetails. + :type name: str + + :param destination_region_name: + The value to assign to the destination_region_name property of this CreateReplicationPolicyDetails. + :type destination_region_name: str + + :param destination_bucket_name: + The value to assign to the destination_bucket_name property of this CreateReplicationPolicyDetails. + :type destination_bucket_name: str + + """ + self.swagger_types = { + 'name': 'str', + 'destination_region_name': 'str', + 'destination_bucket_name': 'str' + } + + self.attribute_map = { + 'name': 'name', + 'destination_region_name': 'destinationRegionName', + 'destination_bucket_name': 'destinationBucketName' + } + + self._name = None + self._destination_region_name = None + self._destination_bucket_name = None + + @property + def name(self): + """ + **[Required]** Gets the name of this CreateReplicationPolicyDetails. + The name of the policy. + + + :return: The name of this CreateReplicationPolicyDetails. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this CreateReplicationPolicyDetails. + The name of the policy. + + + :param name: The name of this CreateReplicationPolicyDetails. + :type: str + """ + self._name = name + + @property + def destination_region_name(self): + """ + **[Required]** Gets the destination_region_name of this CreateReplicationPolicyDetails. + The destination region to replicate to, for example \"us-ashburn-1\". + + + :return: The destination_region_name of this CreateReplicationPolicyDetails. + :rtype: str + """ + return self._destination_region_name + + @destination_region_name.setter + def destination_region_name(self, destination_region_name): + """ + Sets the destination_region_name of this CreateReplicationPolicyDetails. + The destination region to replicate to, for example \"us-ashburn-1\". + + + :param destination_region_name: The destination_region_name of this CreateReplicationPolicyDetails. + :type: str + """ + self._destination_region_name = destination_region_name + + @property + def destination_bucket_name(self): + """ + **[Required]** Gets the destination_bucket_name of this CreateReplicationPolicyDetails. + The bucket to replicate to in the destination region. Replication policy creation does not automatically + create a destination bucket. Create the destination bucket before creating the policy. + + + :return: The destination_bucket_name of this CreateReplicationPolicyDetails. + :rtype: str + """ + return self._destination_bucket_name + + @destination_bucket_name.setter + def destination_bucket_name(self, destination_bucket_name): + """ + Sets the destination_bucket_name of this CreateReplicationPolicyDetails. + The bucket to replicate to in the destination region. Replication policy creation does not automatically + create a destination bucket. Create the destination bucket before creating the policy. + + + :param destination_bucket_name: The destination_bucket_name of this CreateReplicationPolicyDetails. + :type: str + """ + self._destination_bucket_name = destination_bucket_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/object_storage/models/create_retention_rule_details.py b/src/oci/object_storage/models/create_retention_rule_details.py new file mode 100644 index 0000000000..62af8fe086 --- /dev/null +++ b/src/oci/object_storage/models/create_retention_rule_details.py @@ -0,0 +1,137 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + + +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 CreateRetentionRuleDetails(object): + """ + The details to create a retention rule. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CreateRetentionRuleDetails 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 CreateRetentionRuleDetails. + :type display_name: str + + :param duration: + The value to assign to the duration property of this CreateRetentionRuleDetails. + :type duration: Duration + + :param time_rule_locked: + The value to assign to the time_rule_locked property of this CreateRetentionRuleDetails. + :type time_rule_locked: datetime + + """ + self.swagger_types = { + 'display_name': 'str', + 'duration': 'Duration', + 'time_rule_locked': 'datetime' + } + + self.attribute_map = { + 'display_name': 'displayName', + 'duration': 'duration', + 'time_rule_locked': 'timeRuleLocked' + } + + self._display_name = None + self._duration = None + self._time_rule_locked = None + + @property + def display_name(self): + """ + Gets the display_name of this CreateRetentionRuleDetails. + A user-specified name for the retention rule. Names can be helpful in identifying retention rules. + + + :return: The display_name of this CreateRetentionRuleDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this CreateRetentionRuleDetails. + A user-specified name for the retention rule. Names can be helpful in identifying retention rules. + + + :param display_name: The display_name of this CreateRetentionRuleDetails. + :type: str + """ + self._display_name = display_name + + @property + def duration(self): + """ + Gets the duration of this CreateRetentionRuleDetails. + + :return: The duration of this CreateRetentionRuleDetails. + :rtype: Duration + """ + return self._duration + + @duration.setter + def duration(self, duration): + """ + Sets the duration of this CreateRetentionRuleDetails. + + :param duration: The duration of this CreateRetentionRuleDetails. + :type: Duration + """ + self._duration = duration + + @property + def time_rule_locked(self): + """ + Gets the time_rule_locked of this CreateRetentionRuleDetails. + The date and time as per `RFC 3339`__ after which this rule is locked + and can only be deleted by deleting the bucket. Once a rule is locked, only increases in the duration are + allowed and no other properties can be changed. This property cannot be updated for rules that are in a + locked state. Specifying it when a duration is not specified is considered an error. + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_rule_locked of this CreateRetentionRuleDetails. + :rtype: datetime + """ + return self._time_rule_locked + + @time_rule_locked.setter + def time_rule_locked(self, time_rule_locked): + """ + Sets the time_rule_locked of this CreateRetentionRuleDetails. + The date and time as per `RFC 3339`__ after which this rule is locked + and can only be deleted by deleting the bucket. Once a rule is locked, only increases in the duration are + allowed and no other properties can be changed. This property cannot be updated for rules that are in a + locked state. Specifying it when a duration is not specified is considered an error. + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_rule_locked: The time_rule_locked of this CreateRetentionRuleDetails. + :type: datetime + """ + self._time_rule_locked = time_rule_locked + + 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/object_storage/models/duration.py b/src/oci/object_storage/models/duration.py new file mode 100644 index 0000000000..f364317b9e --- /dev/null +++ b/src/oci/object_storage/models/duration.py @@ -0,0 +1,120 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + + +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 Duration(object): + """ + The amount of time that objects in the bucket should be preserved for and which is calculated in relation to + each object's Last-Modified timestamp. If duration is not present, then there is no time limit and the objects + in the bucket will be preserved indefinitely. + """ + + #: A constant which can be used with the time_unit property of a Duration. + #: This constant has a value of "YEARS" + TIME_UNIT_YEARS = "YEARS" + + #: A constant which can be used with the time_unit property of a Duration. + #: This constant has a value of "DAYS" + TIME_UNIT_DAYS = "DAYS" + + def __init__(self, **kwargs): + """ + Initializes a new Duration object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param time_amount: + The value to assign to the time_amount property of this Duration. + :type time_amount: int + + :param time_unit: + The value to assign to the time_unit property of this Duration. + Allowed values for this property are: "YEARS", "DAYS", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type time_unit: str + + """ + self.swagger_types = { + 'time_amount': 'int', + 'time_unit': 'str' + } + + self.attribute_map = { + 'time_amount': 'timeAmount', + 'time_unit': 'timeUnit' + } + + self._time_amount = None + self._time_unit = None + + @property + def time_amount(self): + """ + **[Required]** Gets the time_amount of this Duration. + The timeAmount is interpreted in units defined by the timeUnit parameter, and is calculated in relation + to each object's Last-Modified timestamp. + + + :return: The time_amount of this Duration. + :rtype: int + """ + return self._time_amount + + @time_amount.setter + def time_amount(self, time_amount): + """ + Sets the time_amount of this Duration. + The timeAmount is interpreted in units defined by the timeUnit parameter, and is calculated in relation + to each object's Last-Modified timestamp. + + + :param time_amount: The time_amount of this Duration. + :type: int + """ + self._time_amount = time_amount + + @property + def time_unit(self): + """ + **[Required]** Gets the time_unit of this Duration. + The unit that should be used to interpret timeAmount. + + Allowed values for this property are: "YEARS", "DAYS", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The time_unit of this Duration. + :rtype: str + """ + return self._time_unit + + @time_unit.setter + def time_unit(self, time_unit): + """ + Sets the time_unit of this Duration. + The unit that should be used to interpret timeAmount. + + + :param time_unit: The time_unit of this Duration. + :type: str + """ + allowed_values = ["YEARS", "DAYS"] + if not value_allowed_none_or_none_sentinel(time_unit, allowed_values): + time_unit = 'UNKNOWN_ENUM_VALUE' + self._time_unit = time_unit + + 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/object_storage/models/list_objects.py b/src/oci/object_storage/models/list_objects.py index 20570db4b0..fcf95b2848 100644 --- a/src/oci/object_storage/models/list_objects.py +++ b/src/oci/object_storage/models/list_objects.py @@ -102,7 +102,7 @@ def prefixes(self, prefixes): def next_start_with(self): """ Gets the next_start_with of this ListObjects. - The name of the object to use in the 'startWith' parameter to obtain the next page of + The name of the object to use in the 'start' parameter to obtain the next page of a truncated ListObjects response. Avoid entering confidential information. Example: test/object1.log @@ -116,7 +116,7 @@ def next_start_with(self): def next_start_with(self, next_start_with): """ Sets the next_start_with of this ListObjects. - The name of the object to use in the 'startWith' parameter to obtain the next page of + The name of the object to use in the 'start' parameter to obtain the next page of a truncated ListObjects response. Avoid entering confidential information. Example: test/object1.log diff --git a/src/oci/object_storage/models/multipart_upload.py b/src/oci/object_storage/models/multipart_upload.py index 881af96b27..abe2e7049d 100644 --- a/src/oci/object_storage/models/multipart_upload.py +++ b/src/oci/object_storage/models/multipart_upload.py @@ -171,9 +171,9 @@ def upload_id(self, upload_id): def time_created(self): """ **[Required]** Gets the time_created of this MultipartUpload. - The date and time the upload was created, as described in `RFC 2616`__, section 14.29. + The date and time the upload was created, as described in `RFC 2616`__. - __ https://tools.ietf.org/rfc/rfc2616 + __ https://tools.ietf.org/html/rfc2616#section-14.29 :return: The time_created of this MultipartUpload. @@ -185,9 +185,9 @@ def time_created(self): def time_created(self, time_created): """ Sets the time_created of this MultipartUpload. - The date and time the upload was created, as described in `RFC 2616`__, section 14.29. + The date and time the upload was created, as described in `RFC 2616`__. - __ https://tools.ietf.org/rfc/rfc2616 + __ https://tools.ietf.org/html/rfc2616#section-14.29 :param time_created: The time_created of this MultipartUpload. diff --git a/src/oci/object_storage/models/object_lifecycle_policy.py b/src/oci/object_storage/models/object_lifecycle_policy.py index e4396aef7d..9b3ed1bd5d 100644 --- a/src/oci/object_storage/models/object_lifecycle_policy.py +++ b/src/oci/object_storage/models/object_lifecycle_policy.py @@ -44,9 +44,9 @@ def time_created(self): """ Gets the time_created of this ObjectLifecyclePolicy. The date and time the object lifecycle policy was created, as described in - `RFC 3339`__, section 14.29. + `RFC 3339`__. - __ https://tools.ietf.org/rfc/rfc3339 + __ https://tools.ietf.org/html/rfc3339 :return: The time_created of this ObjectLifecyclePolicy. @@ -59,9 +59,9 @@ def time_created(self, time_created): """ Sets the time_created of this ObjectLifecyclePolicy. The date and time the object lifecycle policy was created, as described in - `RFC 3339`__, section 14.29. + `RFC 3339`__. - __ https://tools.ietf.org/rfc/rfc3339 + __ https://tools.ietf.org/html/rfc3339 :param time_created: The time_created of this ObjectLifecyclePolicy. diff --git a/src/oci/object_storage/models/object_lifecycle_rule.py b/src/oci/object_storage/models/object_lifecycle_rule.py index f85bfe3d4b..0a67d7027d 100644 --- a/src/oci/object_storage/models/object_lifecycle_rule.py +++ b/src/oci/object_storage/models/object_lifecycle_rule.py @@ -225,8 +225,6 @@ def is_enabled(self, is_enabled): def object_name_filter(self): """ Gets the object_name_filter of this ObjectLifecycleRule. - A filter limiting object names that the rule will apply to. - :return: The object_name_filter of this ObjectLifecycleRule. :rtype: ObjectNameFilter @@ -237,8 +235,6 @@ def object_name_filter(self): def object_name_filter(self, object_name_filter): """ Sets the object_name_filter of this ObjectLifecycleRule. - A filter limiting object names that the rule will apply to. - :param object_name_filter: The object_name_filter of this ObjectLifecycleRule. :type: ObjectNameFilter diff --git a/src/oci/object_storage/models/object_summary.py b/src/oci/object_storage/models/object_summary.py index 317c6754e0..eb16490fef 100644 --- a/src/oci/object_storage/models/object_summary.py +++ b/src/oci/object_storage/models/object_summary.py @@ -142,9 +142,9 @@ def md5(self, md5): def time_created(self): """ Gets the time_created of this ObjectSummary. - The date and time the object was created, as described in `RFC 2616`__, section 14.29. + The date and time the object was created, as described in `RFC 2616`__. - __ https://tools.ietf.org/rfc/rfc2616 + __ https://tools.ietf.org/html/rfc2616#section-14.29 :return: The time_created of this ObjectSummary. @@ -156,9 +156,9 @@ def time_created(self): def time_created(self, time_created): """ Sets the time_created of this ObjectSummary. - The date and time the object was created, as described in `RFC 2616`__, section 14.29. + The date and time the object was created, as described in `RFC 2616`__. - __ https://tools.ietf.org/rfc/rfc2616 + __ https://tools.ietf.org/html/rfc2616#section-14.29 :param time_created: The time_created of this ObjectSummary. diff --git a/src/oci/object_storage/models/preauthenticated_request.py b/src/oci/object_storage/models/preauthenticated_request.py index d63ae6219a..806ba0df34 100644 --- a/src/oci/object_storage/models/preauthenticated_request.py +++ b/src/oci/object_storage/models/preauthenticated_request.py @@ -180,6 +180,7 @@ def object_name(self): Gets the object_name of this PreauthenticatedRequest. The name of the object that is being granted access to by the pre-authenticated request. Avoid entering confidential information. The object name can be null and if so, the pre-authenticated request grants access to the entire bucket. + Example: test/object1.log :return: The object_name of this PreauthenticatedRequest. @@ -193,6 +194,7 @@ def object_name(self, object_name): Sets the object_name of this PreauthenticatedRequest. The name of the object that is being granted access to by the pre-authenticated request. Avoid entering confidential information. The object name can be null and if so, the pre-authenticated request grants access to the entire bucket. + Example: test/object1.log :param object_name: The object_name of this PreauthenticatedRequest. @@ -237,7 +239,7 @@ def time_expires(self): The expiration date for the pre-authenticated request as per `RFC 3339`__. After this date the pre-authenticated request will no longer be valid. - __ https://tools.ietf.org/rfc/rfc3339 + __ https://tools.ietf.org/html/rfc3339 :return: The time_expires of this PreauthenticatedRequest. @@ -252,7 +254,7 @@ def time_expires(self, time_expires): The expiration date for the pre-authenticated request as per `RFC 3339`__. After this date the pre-authenticated request will no longer be valid. - __ https://tools.ietf.org/rfc/rfc3339 + __ https://tools.ietf.org/html/rfc3339 :param time_expires: The time_expires of this PreauthenticatedRequest. @@ -267,7 +269,7 @@ def time_created(self): The date when the pre-authenticated request was created as per specification `RFC 3339`__. - __ https://tools.ietf.org/rfc/rfc3339 + __ https://tools.ietf.org/html/rfc3339 :return: The time_created of this PreauthenticatedRequest. @@ -282,7 +284,7 @@ def time_created(self, time_created): The date when the pre-authenticated request was created as per specification `RFC 3339`__. - __ https://tools.ietf.org/rfc/rfc3339 + __ https://tools.ietf.org/html/rfc3339 :param time_created: The time_created of this PreauthenticatedRequest. diff --git a/src/oci/object_storage/models/preauthenticated_request_summary.py b/src/oci/object_storage/models/preauthenticated_request_summary.py index 7ec844f70a..90511abcba 100644 --- a/src/oci/object_storage/models/preauthenticated_request_summary.py +++ b/src/oci/object_storage/models/preauthenticated_request_summary.py @@ -195,7 +195,7 @@ def time_expires(self): **[Required]** Gets the time_expires of this PreauthenticatedRequestSummary. The expiration date for the pre-authenticated request as per `RFC 3339`__. After this date the pre-authenticated request will no longer be valid. - __ https://tools.ietf.org/rfc/rfc3339 + __ https://tools.ietf.org/html/rfc3339 :return: The time_expires of this PreauthenticatedRequestSummary. @@ -209,7 +209,7 @@ def time_expires(self, time_expires): Sets the time_expires of this PreauthenticatedRequestSummary. The expiration date for the pre-authenticated request as per `RFC 3339`__. After this date the pre-authenticated request will no longer be valid. - __ https://tools.ietf.org/rfc/rfc3339 + __ https://tools.ietf.org/html/rfc3339 :param time_expires: The time_expires of this PreauthenticatedRequestSummary. @@ -223,7 +223,7 @@ def time_created(self): **[Required]** Gets the time_created of this PreauthenticatedRequestSummary. The date when the pre-authenticated request was created as per `RFC 3339`__. - __ https://tools.ietf.org/rfc/rfc3339 + __ https://tools.ietf.org/html/rfc3339 :return: The time_created of this PreauthenticatedRequestSummary. @@ -237,7 +237,7 @@ def time_created(self, time_created): Sets the time_created of this PreauthenticatedRequestSummary. The date when the pre-authenticated request was created as per `RFC 3339`__. - __ https://tools.ietf.org/rfc/rfc3339 + __ https://tools.ietf.org/html/rfc3339 :param time_created: The time_created of this PreauthenticatedRequestSummary. diff --git a/src/oci/object_storage/models/replication_policy.py b/src/oci/object_storage/models/replication_policy.py new file mode 100644 index 0000000000..0624da6630 --- /dev/null +++ b/src/oci/object_storage/models/replication_policy.py @@ -0,0 +1,310 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + + +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 ReplicationPolicy(object): + """ + The details of a replication policy. + """ + + #: A constant which can be used with the status property of a ReplicationPolicy. + #: This constant has a value of "ACTIVE" + STATUS_ACTIVE = "ACTIVE" + + #: A constant which can be used with the status property of a ReplicationPolicy. + #: This constant has a value of "CLIENT_ERROR" + STATUS_CLIENT_ERROR = "CLIENT_ERROR" + + def __init__(self, **kwargs): + """ + Initializes a new ReplicationPolicy 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 ReplicationPolicy. + :type id: str + + :param name: + The value to assign to the name property of this ReplicationPolicy. + :type name: str + + :param destination_region_name: + The value to assign to the destination_region_name property of this ReplicationPolicy. + :type destination_region_name: str + + :param destination_bucket_name: + The value to assign to the destination_bucket_name property of this ReplicationPolicy. + :type destination_bucket_name: str + + :param time_created: + The value to assign to the time_created property of this ReplicationPolicy. + :type time_created: datetime + + :param time_last_sync: + The value to assign to the time_last_sync property of this ReplicationPolicy. + :type time_last_sync: datetime + + :param status: + The value to assign to the status property of this ReplicationPolicy. + Allowed values for this property are: "ACTIVE", "CLIENT_ERROR", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type status: str + + :param status_message: + The value to assign to the status_message property of this ReplicationPolicy. + :type status_message: str + + """ + self.swagger_types = { + 'id': 'str', + 'name': 'str', + 'destination_region_name': 'str', + 'destination_bucket_name': 'str', + 'time_created': 'datetime', + 'time_last_sync': 'datetime', + 'status': 'str', + 'status_message': 'str' + } + + self.attribute_map = { + 'id': 'id', + 'name': 'name', + 'destination_region_name': 'destinationRegionName', + 'destination_bucket_name': 'destinationBucketName', + 'time_created': 'timeCreated', + 'time_last_sync': 'timeLastSync', + 'status': 'status', + 'status_message': 'statusMessage' + } + + self._id = None + self._name = None + self._destination_region_name = None + self._destination_bucket_name = None + self._time_created = None + self._time_last_sync = None + self._status = None + self._status_message = None + + @property + def id(self): + """ + **[Required]** Gets the id of this ReplicationPolicy. + The id of the replication policy. + + + :return: The id of this ReplicationPolicy. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this ReplicationPolicy. + The id of the replication policy. + + + :param id: The id of this ReplicationPolicy. + :type: str + """ + self._id = id + + @property + def name(self): + """ + **[Required]** Gets the name of this ReplicationPolicy. + The name of the policy. + + + :return: The name of this ReplicationPolicy. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this ReplicationPolicy. + The name of the policy. + + + :param name: The name of this ReplicationPolicy. + :type: str + """ + self._name = name + + @property + def destination_region_name(self): + """ + **[Required]** Gets the destination_region_name of this ReplicationPolicy. + The destination region to replicate to, for example \"us-ashburn-1\". + + + :return: The destination_region_name of this ReplicationPolicy. + :rtype: str + """ + return self._destination_region_name + + @destination_region_name.setter + def destination_region_name(self, destination_region_name): + """ + Sets the destination_region_name of this ReplicationPolicy. + The destination region to replicate to, for example \"us-ashburn-1\". + + + :param destination_region_name: The destination_region_name of this ReplicationPolicy. + :type: str + """ + self._destination_region_name = destination_region_name + + @property + def destination_bucket_name(self): + """ + **[Required]** Gets the destination_bucket_name of this ReplicationPolicy. + The bucket to replicate to in the destination region. Replication policy creation does not automatically + create a destination bucket. Create the destination bucket before creating the policy. + + + :return: The destination_bucket_name of this ReplicationPolicy. + :rtype: str + """ + return self._destination_bucket_name + + @destination_bucket_name.setter + def destination_bucket_name(self, destination_bucket_name): + """ + Sets the destination_bucket_name of this ReplicationPolicy. + The bucket to replicate to in the destination region. Replication policy creation does not automatically + create a destination bucket. Create the destination bucket before creating the policy. + + + :param destination_bucket_name: The destination_bucket_name of this ReplicationPolicy. + :type: str + """ + self._destination_bucket_name = destination_bucket_name + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this ReplicationPolicy. + The date when the replication policy was created as per `RFC 3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_created of this ReplicationPolicy. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this ReplicationPolicy. + The date when the replication policy was created as per `RFC 3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_created: The time_created of this ReplicationPolicy. + :type: datetime + """ + self._time_created = time_created + + @property + def time_last_sync(self): + """ + **[Required]** Gets the time_last_sync of this ReplicationPolicy. + Changes made to the source bucket before this time has been replicated. + + + :return: The time_last_sync of this ReplicationPolicy. + :rtype: datetime + """ + return self._time_last_sync + + @time_last_sync.setter + def time_last_sync(self, time_last_sync): + """ + Sets the time_last_sync of this ReplicationPolicy. + Changes made to the source bucket before this time has been replicated. + + + :param time_last_sync: The time_last_sync of this ReplicationPolicy. + :type: datetime + """ + self._time_last_sync = time_last_sync + + @property + def status(self): + """ + **[Required]** Gets the status of this ReplicationPolicy. + The replication status of the policy. If the status is CLIENT_ERROR, once the user fixes the issue + described in the status message, the status will become ACTIVE. + + Allowed values for this property are: "ACTIVE", "CLIENT_ERROR", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The status of this ReplicationPolicy. + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """ + Sets the status of this ReplicationPolicy. + The replication status of the policy. If the status is CLIENT_ERROR, once the user fixes the issue + described in the status message, the status will become ACTIVE. + + + :param status: The status of this ReplicationPolicy. + :type: str + """ + allowed_values = ["ACTIVE", "CLIENT_ERROR"] + if not value_allowed_none_or_none_sentinel(status, allowed_values): + status = 'UNKNOWN_ENUM_VALUE' + self._status = status + + @property + def status_message(self): + """ + **[Required]** Gets the status_message of this ReplicationPolicy. + A human-readable description of the status. + + + :return: The status_message of this ReplicationPolicy. + :rtype: str + """ + return self._status_message + + @status_message.setter + def status_message(self, status_message): + """ + Sets the status_message of this ReplicationPolicy. + A human-readable description of the status. + + + :param status_message: The status_message of this ReplicationPolicy. + :type: str + """ + self._status_message = status_message + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/object_storage/models/replication_policy_summary.py b/src/oci/object_storage/models/replication_policy_summary.py new file mode 100644 index 0000000000..3b6572f455 --- /dev/null +++ b/src/oci/object_storage/models/replication_policy_summary.py @@ -0,0 +1,310 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + + +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 ReplicationPolicySummary(object): + """ + The summary of a replication policy. + """ + + #: A constant which can be used with the status property of a ReplicationPolicySummary. + #: This constant has a value of "ACTIVE" + STATUS_ACTIVE = "ACTIVE" + + #: A constant which can be used with the status property of a ReplicationPolicySummary. + #: This constant has a value of "CLIENT_ERROR" + STATUS_CLIENT_ERROR = "CLIENT_ERROR" + + def __init__(self, **kwargs): + """ + Initializes a new ReplicationPolicySummary 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 ReplicationPolicySummary. + :type id: str + + :param name: + The value to assign to the name property of this ReplicationPolicySummary. + :type name: str + + :param destination_region_name: + The value to assign to the destination_region_name property of this ReplicationPolicySummary. + :type destination_region_name: str + + :param destination_bucket_name: + The value to assign to the destination_bucket_name property of this ReplicationPolicySummary. + :type destination_bucket_name: str + + :param time_created: + The value to assign to the time_created property of this ReplicationPolicySummary. + :type time_created: datetime + + :param time_last_sync: + The value to assign to the time_last_sync property of this ReplicationPolicySummary. + :type time_last_sync: datetime + + :param status: + The value to assign to the status property of this ReplicationPolicySummary. + Allowed values for this property are: "ACTIVE", "CLIENT_ERROR", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type status: str + + :param status_message: + The value to assign to the status_message property of this ReplicationPolicySummary. + :type status_message: str + + """ + self.swagger_types = { + 'id': 'str', + 'name': 'str', + 'destination_region_name': 'str', + 'destination_bucket_name': 'str', + 'time_created': 'datetime', + 'time_last_sync': 'datetime', + 'status': 'str', + 'status_message': 'str' + } + + self.attribute_map = { + 'id': 'id', + 'name': 'name', + 'destination_region_name': 'destinationRegionName', + 'destination_bucket_name': 'destinationBucketName', + 'time_created': 'timeCreated', + 'time_last_sync': 'timeLastSync', + 'status': 'status', + 'status_message': 'statusMessage' + } + + self._id = None + self._name = None + self._destination_region_name = None + self._destination_bucket_name = None + self._time_created = None + self._time_last_sync = None + self._status = None + self._status_message = None + + @property + def id(self): + """ + **[Required]** Gets the id of this ReplicationPolicySummary. + The id of the replication policy. + + + :return: The id of this ReplicationPolicySummary. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this ReplicationPolicySummary. + The id of the replication policy. + + + :param id: The id of this ReplicationPolicySummary. + :type: str + """ + self._id = id + + @property + def name(self): + """ + **[Required]** Gets the name of this ReplicationPolicySummary. + The name of the policy. + + + :return: The name of this ReplicationPolicySummary. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this ReplicationPolicySummary. + The name of the policy. + + + :param name: The name of this ReplicationPolicySummary. + :type: str + """ + self._name = name + + @property + def destination_region_name(self): + """ + **[Required]** Gets the destination_region_name of this ReplicationPolicySummary. + The destination region to replicate to, for example \"us-ashburn-1\". + + + :return: The destination_region_name of this ReplicationPolicySummary. + :rtype: str + """ + return self._destination_region_name + + @destination_region_name.setter + def destination_region_name(self, destination_region_name): + """ + Sets the destination_region_name of this ReplicationPolicySummary. + The destination region to replicate to, for example \"us-ashburn-1\". + + + :param destination_region_name: The destination_region_name of this ReplicationPolicySummary. + :type: str + """ + self._destination_region_name = destination_region_name + + @property + def destination_bucket_name(self): + """ + **[Required]** Gets the destination_bucket_name of this ReplicationPolicySummary. + The bucket to replicate to in the destination region. Replication policy creation does not automatically + create a destination bucket. Create the destination bucket before creating the policy. + + + :return: The destination_bucket_name of this ReplicationPolicySummary. + :rtype: str + """ + return self._destination_bucket_name + + @destination_bucket_name.setter + def destination_bucket_name(self, destination_bucket_name): + """ + Sets the destination_bucket_name of this ReplicationPolicySummary. + The bucket to replicate to in the destination region. Replication policy creation does not automatically + create a destination bucket. Create the destination bucket before creating the policy. + + + :param destination_bucket_name: The destination_bucket_name of this ReplicationPolicySummary. + :type: str + """ + self._destination_bucket_name = destination_bucket_name + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this ReplicationPolicySummary. + The date when the replication policy was created as per `RFC 3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_created of this ReplicationPolicySummary. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this ReplicationPolicySummary. + The date when the replication policy was created as per `RFC 3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_created: The time_created of this ReplicationPolicySummary. + :type: datetime + """ + self._time_created = time_created + + @property + def time_last_sync(self): + """ + **[Required]** Gets the time_last_sync of this ReplicationPolicySummary. + Changes made to the source bucket before this time has been replicated. + + + :return: The time_last_sync of this ReplicationPolicySummary. + :rtype: datetime + """ + return self._time_last_sync + + @time_last_sync.setter + def time_last_sync(self, time_last_sync): + """ + Sets the time_last_sync of this ReplicationPolicySummary. + Changes made to the source bucket before this time has been replicated. + + + :param time_last_sync: The time_last_sync of this ReplicationPolicySummary. + :type: datetime + """ + self._time_last_sync = time_last_sync + + @property + def status(self): + """ + **[Required]** Gets the status of this ReplicationPolicySummary. + The replication status of the policy. If the status is CLIENT_ERROR, once the user fixes the issue + described in the status message, the status will become ACTIVE. + + Allowed values for this property are: "ACTIVE", "CLIENT_ERROR", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The status of this ReplicationPolicySummary. + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """ + Sets the status of this ReplicationPolicySummary. + The replication status of the policy. If the status is CLIENT_ERROR, once the user fixes the issue + described in the status message, the status will become ACTIVE. + + + :param status: The status of this ReplicationPolicySummary. + :type: str + """ + allowed_values = ["ACTIVE", "CLIENT_ERROR"] + if not value_allowed_none_or_none_sentinel(status, allowed_values): + status = 'UNKNOWN_ENUM_VALUE' + self._status = status + + @property + def status_message(self): + """ + **[Required]** Gets the status_message of this ReplicationPolicySummary. + A human-readable description of the status. + + + :return: The status_message of this ReplicationPolicySummary. + :rtype: str + """ + return self._status_message + + @status_message.setter + def status_message(self, status_message): + """ + Sets the status_message of this ReplicationPolicySummary. + A human-readable description of the status. + + + :param status_message: The status_message of this ReplicationPolicySummary. + :type: str + """ + self._status_message = status_message + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/object_storage/models/replication_source.py b/src/oci/object_storage/models/replication_source.py new file mode 100644 index 0000000000..1ee10b5e66 --- /dev/null +++ b/src/oci/object_storage/models/replication_source.py @@ -0,0 +1,131 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + + +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 ReplicationSource(object): + """ + The details of a replication source bucket that replicates to a target destination bucket. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ReplicationSource object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param policy_name: + The value to assign to the policy_name property of this ReplicationSource. + :type policy_name: str + + :param source_region_name: + The value to assign to the source_region_name property of this ReplicationSource. + :type source_region_name: str + + :param source_bucket_name: + The value to assign to the source_bucket_name property of this ReplicationSource. + :type source_bucket_name: str + + """ + self.swagger_types = { + 'policy_name': 'str', + 'source_region_name': 'str', + 'source_bucket_name': 'str' + } + + self.attribute_map = { + 'policy_name': 'policyName', + 'source_region_name': 'sourceRegionName', + 'source_bucket_name': 'sourceBucketName' + } + + self._policy_name = None + self._source_region_name = None + self._source_bucket_name = None + + @property + def policy_name(self): + """ + **[Required]** Gets the policy_name of this ReplicationSource. + The name of the policy. + + + :return: The policy_name of this ReplicationSource. + :rtype: str + """ + return self._policy_name + + @policy_name.setter + def policy_name(self, policy_name): + """ + Sets the policy_name of this ReplicationSource. + The name of the policy. + + + :param policy_name: The policy_name of this ReplicationSource. + :type: str + """ + self._policy_name = policy_name + + @property + def source_region_name(self): + """ + **[Required]** Gets the source_region_name of this ReplicationSource. + The source region replicating data from, for example \"us-ashburn-1\". + + + :return: The source_region_name of this ReplicationSource. + :rtype: str + """ + return self._source_region_name + + @source_region_name.setter + def source_region_name(self, source_region_name): + """ + Sets the source_region_name of this ReplicationSource. + The source region replicating data from, for example \"us-ashburn-1\". + + + :param source_region_name: The source_region_name of this ReplicationSource. + :type: str + """ + self._source_region_name = source_region_name + + @property + def source_bucket_name(self): + """ + **[Required]** Gets the source_bucket_name of this ReplicationSource. + The source bucket replicating data from. + + + :return: The source_bucket_name of this ReplicationSource. + :rtype: str + """ + return self._source_bucket_name + + @source_bucket_name.setter + def source_bucket_name(self, source_bucket_name): + """ + Sets the source_bucket_name of this ReplicationSource. + The source bucket replicating data from. + + + :param source_bucket_name: The source_bucket_name of this ReplicationSource. + :type: str + """ + self._source_bucket_name = source_bucket_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/object_storage/models/retention_rule.py b/src/oci/object_storage/models/retention_rule.py new file mode 100644 index 0000000000..08ecfb14cf --- /dev/null +++ b/src/oci/object_storage/models/retention_rule.py @@ -0,0 +1,265 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + + +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 RetentionRule(object): + """ + The details of a retention rule. + """ + + def __init__(self, **kwargs): + """ + Initializes a new RetentionRule 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 RetentionRule. + :type id: str + + :param display_name: + The value to assign to the display_name property of this RetentionRule. + :type display_name: str + + :param duration: + The value to assign to the duration property of this RetentionRule. + :type duration: Duration + + :param etag: + The value to assign to the etag property of this RetentionRule. + :type etag: str + + :param time_rule_locked: + The value to assign to the time_rule_locked property of this RetentionRule. + :type time_rule_locked: datetime + + :param time_created: + The value to assign to the time_created property of this RetentionRule. + :type time_created: datetime + + :param time_modified: + The value to assign to the time_modified property of this RetentionRule. + :type time_modified: datetime + + """ + self.swagger_types = { + 'id': 'str', + 'display_name': 'str', + 'duration': 'Duration', + 'etag': 'str', + 'time_rule_locked': 'datetime', + 'time_created': 'datetime', + 'time_modified': 'datetime' + } + + self.attribute_map = { + 'id': 'id', + 'display_name': 'displayName', + 'duration': 'duration', + 'etag': 'etag', + 'time_rule_locked': 'timeRuleLocked', + 'time_created': 'timeCreated', + 'time_modified': 'timeModified' + } + + self._id = None + self._display_name = None + self._duration = None + self._etag = None + self._time_rule_locked = None + self._time_created = None + self._time_modified = None + + @property + def id(self): + """ + **[Required]** Gets the id of this RetentionRule. + Unique identifier for the retention rule. + + + :return: The id of this RetentionRule. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this RetentionRule. + Unique identifier for the retention rule. + + + :param id: The id of this RetentionRule. + :type: str + """ + self._id = id + + @property + def display_name(self): + """ + **[Required]** Gets the display_name of this RetentionRule. + User specified name for the retention rule. + + + :return: The display_name of this RetentionRule. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this RetentionRule. + User specified name for the retention rule. + + + :param display_name: The display_name of this RetentionRule. + :type: str + """ + self._display_name = display_name + + @property + def duration(self): + """ + Gets the duration of this RetentionRule. + + :return: The duration of this RetentionRule. + :rtype: Duration + """ + return self._duration + + @duration.setter + def duration(self, duration): + """ + Sets the duration of this RetentionRule. + + :param duration: The duration of this RetentionRule. + :type: Duration + """ + self._duration = duration + + @property + def etag(self): + """ + **[Required]** Gets the etag of this RetentionRule. + The entity tag (ETag) for the retention rule. + + + :return: The etag of this RetentionRule. + :rtype: str + """ + return self._etag + + @etag.setter + def etag(self, etag): + """ + Sets the etag of this RetentionRule. + The entity tag (ETag) for the retention rule. + + + :param etag: The etag of this RetentionRule. + :type: str + """ + self._etag = etag + + @property + def time_rule_locked(self): + """ + Gets the time_rule_locked of this RetentionRule. + The date and time as per `RFC 3339`__ after which this rule becomes locked. + and can only be deleted by deleting the bucket. + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_rule_locked of this RetentionRule. + :rtype: datetime + """ + return self._time_rule_locked + + @time_rule_locked.setter + def time_rule_locked(self, time_rule_locked): + """ + Sets the time_rule_locked of this RetentionRule. + The date and time as per `RFC 3339`__ after which this rule becomes locked. + and can only be deleted by deleting the bucket. + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_rule_locked: The time_rule_locked of this RetentionRule. + :type: datetime + """ + self._time_rule_locked = time_rule_locked + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this RetentionRule. + The date and time that the retention rule was created as per `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_created of this RetentionRule. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this RetentionRule. + The date and time that the retention rule was created as per `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_created: The time_created of this RetentionRule. + :type: datetime + """ + self._time_created = time_created + + @property + def time_modified(self): + """ + **[Required]** Gets the time_modified of this RetentionRule. + The date and time that the retention rule was modified as per `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_modified of this RetentionRule. + :rtype: datetime + """ + return self._time_modified + + @time_modified.setter + def time_modified(self, time_modified): + """ + Sets the time_modified of this RetentionRule. + The date and time that the retention rule was modified as per `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_modified: The time_modified of this RetentionRule. + :type: datetime + """ + self._time_modified = time_modified + + 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/object_storage/models/retention_rule_collection.py b/src/oci/object_storage/models/retention_rule_collection.py new file mode 100644 index 0000000000..655cafe268 --- /dev/null +++ b/src/oci/object_storage/models/retention_rule_collection.py @@ -0,0 +1,69 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + + +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 RetentionRuleCollection(object): + """ + Retention rule collection. + """ + + def __init__(self, **kwargs): + """ + Initializes a new RetentionRuleCollection 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 RetentionRuleCollection. + :type items: list[RetentionRuleSummary] + + """ + self.swagger_types = { + 'items': 'list[RetentionRuleSummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this RetentionRuleCollection. + An array of retention rule summaries. + + + :return: The items of this RetentionRuleCollection. + :rtype: list[RetentionRuleSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this RetentionRuleCollection. + An array of retention rule summaries. + + + :param items: The items of this RetentionRuleCollection. + :type: list[RetentionRuleSummary] + """ + 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/object_storage/models/retention_rule_details.py b/src/oci/object_storage/models/retention_rule_details.py new file mode 100644 index 0000000000..99b5e351ad --- /dev/null +++ b/src/oci/object_storage/models/retention_rule_details.py @@ -0,0 +1,137 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + + +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 RetentionRuleDetails(object): + """ + The details to create or update a retention rule. + """ + + def __init__(self, **kwargs): + """ + Initializes a new RetentionRuleDetails 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 RetentionRuleDetails. + :type display_name: str + + :param duration: + The value to assign to the duration property of this RetentionRuleDetails. + :type duration: Duration + + :param time_rule_locked: + The value to assign to the time_rule_locked property of this RetentionRuleDetails. + :type time_rule_locked: datetime + + """ + self.swagger_types = { + 'display_name': 'str', + 'duration': 'Duration', + 'time_rule_locked': 'datetime' + } + + self.attribute_map = { + 'display_name': 'displayName', + 'duration': 'duration', + 'time_rule_locked': 'timeRuleLocked' + } + + self._display_name = None + self._duration = None + self._time_rule_locked = None + + @property + def display_name(self): + """ + Gets the display_name of this RetentionRuleDetails. + A user-specified name for the retention rule. Names can be helpful in identifying retention rules. + + + :return: The display_name of this RetentionRuleDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this RetentionRuleDetails. + A user-specified name for the retention rule. Names can be helpful in identifying retention rules. + + + :param display_name: The display_name of this RetentionRuleDetails. + :type: str + """ + self._display_name = display_name + + @property + def duration(self): + """ + Gets the duration of this RetentionRuleDetails. + + :return: The duration of this RetentionRuleDetails. + :rtype: Duration + """ + return self._duration + + @duration.setter + def duration(self, duration): + """ + Sets the duration of this RetentionRuleDetails. + + :param duration: The duration of this RetentionRuleDetails. + :type: Duration + """ + self._duration = duration + + @property + def time_rule_locked(self): + """ + Gets the time_rule_locked of this RetentionRuleDetails. + The date and time as per `RFC 3339`__ after which this rule is locked + and can only be deleted by deleting the bucket. Once a rule is locked, only increases in the duration are + allowed and no other properties can be changed. This property cannot be updated for rules that are in a + locked state. Specifying it when a duration is not specified is considered an error. + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_rule_locked of this RetentionRuleDetails. + :rtype: datetime + """ + return self._time_rule_locked + + @time_rule_locked.setter + def time_rule_locked(self, time_rule_locked): + """ + Sets the time_rule_locked of this RetentionRuleDetails. + The date and time as per `RFC 3339`__ after which this rule is locked + and can only be deleted by deleting the bucket. Once a rule is locked, only increases in the duration are + allowed and no other properties can be changed. This property cannot be updated for rules that are in a + locked state. Specifying it when a duration is not specified is considered an error. + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_rule_locked: The time_rule_locked of this RetentionRuleDetails. + :type: datetime + """ + self._time_rule_locked = time_rule_locked + + 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/object_storage/models/retention_rule_summary.py b/src/oci/object_storage/models/retention_rule_summary.py new file mode 100644 index 0000000000..8f845007b9 --- /dev/null +++ b/src/oci/object_storage/models/retention_rule_summary.py @@ -0,0 +1,265 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + + +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 RetentionRuleSummary(object): + """ + The summary of a retention rule. + """ + + def __init__(self, **kwargs): + """ + Initializes a new RetentionRuleSummary 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 RetentionRuleSummary. + :type id: str + + :param display_name: + The value to assign to the display_name property of this RetentionRuleSummary. + :type display_name: str + + :param duration: + The value to assign to the duration property of this RetentionRuleSummary. + :type duration: Duration + + :param etag: + The value to assign to the etag property of this RetentionRuleSummary. + :type etag: str + + :param time_rule_locked: + The value to assign to the time_rule_locked property of this RetentionRuleSummary. + :type time_rule_locked: datetime + + :param time_created: + The value to assign to the time_created property of this RetentionRuleSummary. + :type time_created: datetime + + :param time_modified: + The value to assign to the time_modified property of this RetentionRuleSummary. + :type time_modified: datetime + + """ + self.swagger_types = { + 'id': 'str', + 'display_name': 'str', + 'duration': 'Duration', + 'etag': 'str', + 'time_rule_locked': 'datetime', + 'time_created': 'datetime', + 'time_modified': 'datetime' + } + + self.attribute_map = { + 'id': 'id', + 'display_name': 'displayName', + 'duration': 'duration', + 'etag': 'etag', + 'time_rule_locked': 'timeRuleLocked', + 'time_created': 'timeCreated', + 'time_modified': 'timeModified' + } + + self._id = None + self._display_name = None + self._duration = None + self._etag = None + self._time_rule_locked = None + self._time_created = None + self._time_modified = None + + @property + def id(self): + """ + **[Required]** Gets the id of this RetentionRuleSummary. + Unique identifier for the retention rule. + + + :return: The id of this RetentionRuleSummary. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this RetentionRuleSummary. + Unique identifier for the retention rule. + + + :param id: The id of this RetentionRuleSummary. + :type: str + """ + self._id = id + + @property + def display_name(self): + """ + **[Required]** Gets the display_name of this RetentionRuleSummary. + User specified name for the retention rule. + + + :return: The display_name of this RetentionRuleSummary. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this RetentionRuleSummary. + User specified name for the retention rule. + + + :param display_name: The display_name of this RetentionRuleSummary. + :type: str + """ + self._display_name = display_name + + @property + def duration(self): + """ + Gets the duration of this RetentionRuleSummary. + + :return: The duration of this RetentionRuleSummary. + :rtype: Duration + """ + return self._duration + + @duration.setter + def duration(self, duration): + """ + Sets the duration of this RetentionRuleSummary. + + :param duration: The duration of this RetentionRuleSummary. + :type: Duration + """ + self._duration = duration + + @property + def etag(self): + """ + **[Required]** Gets the etag of this RetentionRuleSummary. + The entity tag (ETag) for the retention rule. + + + :return: The etag of this RetentionRuleSummary. + :rtype: str + """ + return self._etag + + @etag.setter + def etag(self, etag): + """ + Sets the etag of this RetentionRuleSummary. + The entity tag (ETag) for the retention rule. + + + :param etag: The etag of this RetentionRuleSummary. + :type: str + """ + self._etag = etag + + @property + def time_rule_locked(self): + """ + Gets the time_rule_locked of this RetentionRuleSummary. + The date and time as per `RFC 3339`__ after which this rule becomes locked. + and can only be deleted by deleting the bucket. + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_rule_locked of this RetentionRuleSummary. + :rtype: datetime + """ + return self._time_rule_locked + + @time_rule_locked.setter + def time_rule_locked(self, time_rule_locked): + """ + Sets the time_rule_locked of this RetentionRuleSummary. + The date and time as per `RFC 3339`__ after which this rule becomes locked. + and can only be deleted by deleting the bucket. + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_rule_locked: The time_rule_locked of this RetentionRuleSummary. + :type: datetime + """ + self._time_rule_locked = time_rule_locked + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this RetentionRuleSummary. + The date and time that the retention rule was created as per `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_created of this RetentionRuleSummary. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this RetentionRuleSummary. + The date and time that the retention rule was created as per `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_created: The time_created of this RetentionRuleSummary. + :type: datetime + """ + self._time_created = time_created + + @property + def time_modified(self): + """ + **[Required]** Gets the time_modified of this RetentionRuleSummary. + The date and time that the retention rule was modified as per `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_modified of this RetentionRuleSummary. + :rtype: datetime + """ + return self._time_modified + + @time_modified.setter + def time_modified(self, time_modified): + """ + Sets the time_modified of this RetentionRuleSummary. + The date and time that the retention rule was modified as per `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_modified: The time_modified of this RetentionRuleSummary. + :type: datetime + """ + self._time_modified = time_modified + + 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/object_storage/models/update_bucket_details.py b/src/oci/object_storage/models/update_bucket_details.py index 1b73290c70..badf663c23 100644 --- a/src/oci/object_storage/models/update_bucket_details.py +++ b/src/oci/object_storage/models/update_bucket_details.py @@ -157,7 +157,8 @@ def compartment_id(self, compartment_id): def name(self): """ Gets the name of this UpdateBucketDetails. - The name of the bucket. Avoid entering confidential information. + The name of the bucket. Valid characters are uppercase or lowercase letters, numbers, hyphens, underscores, and periods. + Bucket names must be unique within an Object Storage namespace. Avoid entering confidential information. Example: my-new-bucket1 @@ -170,7 +171,8 @@ def name(self): def name(self, name): """ Sets the name of this UpdateBucketDetails. - The name of the bucket. Avoid entering confidential information. + The name of the bucket. Valid characters are uppercase or lowercase letters, numbers, hyphens, underscores, and periods. + Bucket names must be unique within an Object Storage namespace. Avoid entering confidential information. Example: my-new-bucket1 @@ -341,9 +343,12 @@ def defined_tags(self, defined_tags): def kms_key_id(self): """ Gets the kms_key_id of this UpdateBucketDetails. - The OCID of the Key Management master encryption key to associate with the specified bucket. If this value - is empty, the Update operation will remove the associated key, if there is one, from the bucket. (The bucket - will continue to be encrypted, but with an encryption key managed by Oracle.) + The `OCID`__ of the Key Management master encryption key to associate + with the specified bucket. If this value is empty, the Update operation will remove the associated key, if + there is one, from the bucket. (The bucket will continue to be encrypted, but with an encryption key managed + by Oracle.) + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm :return: The kms_key_id of this UpdateBucketDetails. @@ -355,9 +360,12 @@ def kms_key_id(self): def kms_key_id(self, kms_key_id): """ Sets the kms_key_id of this UpdateBucketDetails. - The OCID of the Key Management master encryption key to associate with the specified bucket. If this value - is empty, the Update operation will remove the associated key, if there is one, from the bucket. (The bucket - will continue to be encrypted, but with an encryption key managed by Oracle.) + The `OCID`__ of the Key Management master encryption key to associate + with the specified bucket. If this value is empty, the Update operation will remove the associated key, if + there is one, from the bucket. (The bucket will continue to be encrypted, but with an encryption key managed + by Oracle.) + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm :param kms_key_id: The kms_key_id of this UpdateBucketDetails. diff --git a/src/oci/object_storage/models/update_retention_rule_details.py b/src/oci/object_storage/models/update_retention_rule_details.py new file mode 100644 index 0000000000..0c9f756457 --- /dev/null +++ b/src/oci/object_storage/models/update_retention_rule_details.py @@ -0,0 +1,137 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + + +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 UpdateRetentionRuleDetails(object): + """ + The details to update a retention rule. + """ + + def __init__(self, **kwargs): + """ + Initializes a new UpdateRetentionRuleDetails 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 UpdateRetentionRuleDetails. + :type display_name: str + + :param duration: + The value to assign to the duration property of this UpdateRetentionRuleDetails. + :type duration: Duration + + :param time_rule_locked: + The value to assign to the time_rule_locked property of this UpdateRetentionRuleDetails. + :type time_rule_locked: datetime + + """ + self.swagger_types = { + 'display_name': 'str', + 'duration': 'Duration', + 'time_rule_locked': 'datetime' + } + + self.attribute_map = { + 'display_name': 'displayName', + 'duration': 'duration', + 'time_rule_locked': 'timeRuleLocked' + } + + self._display_name = None + self._duration = None + self._time_rule_locked = None + + @property + def display_name(self): + """ + Gets the display_name of this UpdateRetentionRuleDetails. + A user-specified name for the retention rule. Names can be helpful in identifying retention rules. + + + :return: The display_name of this UpdateRetentionRuleDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this UpdateRetentionRuleDetails. + A user-specified name for the retention rule. Names can be helpful in identifying retention rules. + + + :param display_name: The display_name of this UpdateRetentionRuleDetails. + :type: str + """ + self._display_name = display_name + + @property + def duration(self): + """ + Gets the duration of this UpdateRetentionRuleDetails. + + :return: The duration of this UpdateRetentionRuleDetails. + :rtype: Duration + """ + return self._duration + + @duration.setter + def duration(self, duration): + """ + Sets the duration of this UpdateRetentionRuleDetails. + + :param duration: The duration of this UpdateRetentionRuleDetails. + :type: Duration + """ + self._duration = duration + + @property + def time_rule_locked(self): + """ + Gets the time_rule_locked of this UpdateRetentionRuleDetails. + The date and time as per `RFC 3339`__ after which this rule is locked + and can only be deleted by deleting the bucket. Once a rule is locked, only increases in the duration are + allowed and no other properties can be changed. This property cannot be updated for rules that are in a + locked state. Specifying it when a duration is not specified is considered an error. + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_rule_locked of this UpdateRetentionRuleDetails. + :rtype: datetime + """ + return self._time_rule_locked + + @time_rule_locked.setter + def time_rule_locked(self, time_rule_locked): + """ + Sets the time_rule_locked of this UpdateRetentionRuleDetails. + The date and time as per `RFC 3339`__ after which this rule is locked + and can only be deleted by deleting the bucket. Once a rule is locked, only increases in the duration are + allowed and no other properties can be changed. This property cannot be updated for rules that are in a + locked state. Specifying it when a duration is not specified is considered an error. + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_rule_locked: The time_rule_locked of this UpdateRetentionRuleDetails. + :type: datetime + """ + self._time_rule_locked = time_rule_locked + + 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/object_storage/models/work_request.py b/src/oci/object_storage/models/work_request.py index ee8d9f1d5a..3cf23a7281 100644 --- a/src/oci/object_storage/models/work_request.py +++ b/src/oci/object_storage/models/work_request.py @@ -212,13 +212,15 @@ def id(self, id): def compartment_id(self): """ Gets the compartment_id of this WorkRequest. - The OCID of the compartment that contains the work request. Work requests are scoped to the same compartment - as the resource the work request affects. + The `OCID`__ of the compartment that contains the work request. Work + requests are scoped to the same compartment as the resource the work request affects. If the work request affects multiple resources and those resources are not in the same compartment, the OCID of the primary resource is used. For example, you can copy an object in a bucket in one compartment to a bucket in another compartment. In this case, the OCID of the source compartment is used. + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + :return: The compartment_id of this WorkRequest. :rtype: str @@ -229,13 +231,15 @@ def compartment_id(self): def compartment_id(self, compartment_id): """ Sets the compartment_id of this WorkRequest. - The OCID of the compartment that contains the work request. Work requests are scoped to the same compartment - as the resource the work request affects. + The `OCID`__ of the compartment that contains the work request. Work + requests are scoped to the same compartment as the resource the work request affects. If the work request affects multiple resources and those resources are not in the same compartment, the OCID of the primary resource is used. For example, you can copy an object in a bucket in one compartment to a bucket in another compartment. In this case, the OCID of the source compartment is used. + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + :param compartment_id: The compartment_id of this WorkRequest. :type: str @@ -291,9 +295,9 @@ def time_accepted(self): """ Gets the time_accepted of this WorkRequest. The date and time the work request was created, as described in - `RFC 3339`__, section 14.29. + `RFC 3339`__. - __ https://tools.ietf.org/rfc/rfc3339 + __ https://tools.ietf.org/html/rfc3339 :return: The time_accepted of this WorkRequest. @@ -306,9 +310,9 @@ def time_accepted(self, time_accepted): """ Sets the time_accepted of this WorkRequest. The date and time the work request was created, as described in - `RFC 3339`__, section 14.29. + `RFC 3339`__. - __ https://tools.ietf.org/rfc/rfc3339 + __ https://tools.ietf.org/html/rfc3339 :param time_accepted: The time_accepted of this WorkRequest. @@ -321,9 +325,9 @@ def time_started(self): """ Gets the time_started of this WorkRequest. The date and time the work request was started, as described in - `RFC 3339`__, section 14.29. + `RFC 3339`__. - __ https://tools.ietf.org/rfc/rfc3339 + __ https://tools.ietf.org/html/rfc3339 :return: The time_started of this WorkRequest. @@ -336,9 +340,9 @@ def time_started(self, time_started): """ Sets the time_started of this WorkRequest. The date and time the work request was started, as described in - `RFC 3339`__, section 14.29. + `RFC 3339`__. - __ https://tools.ietf.org/rfc/rfc3339 + __ https://tools.ietf.org/html/rfc3339 :param time_started: The time_started of this WorkRequest. @@ -351,9 +355,9 @@ def time_finished(self): """ Gets the time_finished of this WorkRequest. The date and time the work request was finished, as described in - `RFC 3339`__, section 14.29. + `RFC 3339`__. - __ https://tools.ietf.org/rfc/rfc3339 + __ https://tools.ietf.org/html/rfc3339 :return: The time_finished of this WorkRequest. @@ -366,9 +370,9 @@ def time_finished(self, time_finished): """ Sets the time_finished of this WorkRequest. The date and time the work request was finished, as described in - `RFC 3339`__, section 14.29. + `RFC 3339`__. - __ https://tools.ietf.org/rfc/rfc3339 + __ https://tools.ietf.org/html/rfc3339 :param time_finished: The time_finished of this WorkRequest. diff --git a/src/oci/object_storage/models/work_request_log_entry.py b/src/oci/object_storage/models/work_request_log_entry.py index a870ef78a5..e6019d3b29 100644 --- a/src/oci/object_storage/models/work_request_log_entry.py +++ b/src/oci/object_storage/models/work_request_log_entry.py @@ -68,9 +68,9 @@ def timestamp(self): """ Gets the timestamp of this WorkRequestLogEntry. The date and time the log message was written, as described in - `RFC 3339`__, section 14.29. + `RFC 3339`__. - __ https://tools.ietf.org/rfc/rfc3339 + __ https://tools.ietf.org/html/rfc3339 :return: The timestamp of this WorkRequestLogEntry. @@ -83,9 +83,9 @@ def timestamp(self, timestamp): """ Sets the timestamp of this WorkRequestLogEntry. The date and time the log message was written, as described in - `RFC 3339`__, section 14.29. + `RFC 3339`__. - __ https://tools.ietf.org/rfc/rfc3339 + __ https://tools.ietf.org/html/rfc3339 :param timestamp: The timestamp of this WorkRequestLogEntry. diff --git a/src/oci/object_storage/models/work_request_summary.py b/src/oci/object_storage/models/work_request_summary.py index a999a122fd..87408eb574 100644 --- a/src/oci/object_storage/models/work_request_summary.py +++ b/src/oci/object_storage/models/work_request_summary.py @@ -212,13 +212,15 @@ def id(self, id): def compartment_id(self): """ Gets the compartment_id of this WorkRequestSummary. - The OCID of the compartment that contains the work request. Work requests are scoped to the same compartment - as the resource the work request affects. + The `OCID`__ of the compartment that contains the work request. Work + requests are scoped to the same compartment as the resource the work request affects. If the work request affects multiple resources and those resources are not in the same compartment, the OCID of the primary resource is used. For example, you can copy an object in a bucket in one compartment to a bucket in another compartment. In this case, the OCID of the source compartment is used. + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + :return: The compartment_id of this WorkRequestSummary. :rtype: str @@ -229,13 +231,15 @@ def compartment_id(self): def compartment_id(self, compartment_id): """ Sets the compartment_id of this WorkRequestSummary. - The OCID of the compartment that contains the work request. Work requests are scoped to the same compartment - as the resource the work request affects. + The `OCID`__ of the compartment that contains the work request. Work + requests are scoped to the same compartment as the resource the work request affects. If the work request affects multiple resources and those resources are not in the same compartment, the OCID of the primary resource is used. For example, you can copy an object in a bucket in one compartment to a bucket in another compartment. In this case, the OCID of the source compartment is used. + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + :param compartment_id: The compartment_id of this WorkRequestSummary. :type: str @@ -291,9 +295,9 @@ def time_accepted(self): """ Gets the time_accepted of this WorkRequestSummary. The date and time the work request was created, as described in - `RFC 3339`__, section 14.29. + `RFC 3339`__. - __ https://tools.ietf.org/rfc/rfc3339 + __ https://tools.ietf.org/html/rfc3339 :return: The time_accepted of this WorkRequestSummary. @@ -306,9 +310,9 @@ def time_accepted(self, time_accepted): """ Sets the time_accepted of this WorkRequestSummary. The date and time the work request was created, as described in - `RFC 3339`__, section 14.29. + `RFC 3339`__. - __ https://tools.ietf.org/rfc/rfc3339 + __ https://tools.ietf.org/html/rfc3339 :param time_accepted: The time_accepted of this WorkRequestSummary. @@ -321,9 +325,9 @@ def time_started(self): """ Gets the time_started of this WorkRequestSummary. The date and time the work request was started, as described in - `RFC 3339`__, section 14.29. + `RFC 3339`__. - __ https://tools.ietf.org/rfc/rfc3339 + __ https://tools.ietf.org/html/rfc3339 :return: The time_started of this WorkRequestSummary. @@ -336,9 +340,9 @@ def time_started(self, time_started): """ Sets the time_started of this WorkRequestSummary. The date and time the work request was started, as described in - `RFC 3339`__, section 14.29. + `RFC 3339`__. - __ https://tools.ietf.org/rfc/rfc3339 + __ https://tools.ietf.org/html/rfc3339 :param time_started: The time_started of this WorkRequestSummary. @@ -351,9 +355,9 @@ def time_finished(self): """ Gets the time_finished of this WorkRequestSummary. The date and time the work request was finished, as described in - `RFC 3339`__, section 14.29. + `RFC 3339`__. - __ https://tools.ietf.org/rfc/rfc3339 + __ https://tools.ietf.org/html/rfc3339 :return: The time_finished of this WorkRequestSummary. @@ -366,9 +370,9 @@ def time_finished(self, time_finished): """ Sets the time_finished of this WorkRequestSummary. The date and time the work request was finished, as described in - `RFC 3339`__, section 14.29. + `RFC 3339`__. - __ https://tools.ietf.org/rfc/rfc3339 + __ https://tools.ietf.org/html/rfc3339 :param time_finished: The time_finished of this WorkRequestSummary. diff --git a/src/oci/object_storage/object_storage_client.py b/src/oci/object_storage/object_storage_client.py index ea199af01b..a660f315cb 100644 --- a/src/oci/object_storage/object_storage_client.py +++ b/src/oci/object_storage/object_storage_client.py @@ -18,6 +18,8 @@ class ObjectStorageClient(object): """ Common set of Object Storage and Archive Storage APIs for managing buckets, objects, and related resources. + For more information, see [Overview of Object Storage](/Content/Object/Concepts/objectstorageoverview.htm) and + [Overview of Archive Storage](/Content/Archive/Concepts/archivestorageoverview.htm). """ def __init__(self, config, **kwargs): @@ -82,7 +84,6 @@ def __init__(self, config, **kwargs): def abort_multipart_upload(self, namespace_name, bucket_name, object_name, upload_id, **kwargs): """ - Abort Multipart Upload Aborts an in-progress multipart upload and deletes all parts that have been uploaded. @@ -173,7 +174,6 @@ def abort_multipart_upload(self, namespace_name, bucket_name, object_name, uploa def cancel_work_request(self, work_request_id, **kwargs): """ - Cancel a work request Cancels a work request. @@ -244,7 +244,6 @@ def cancel_work_request(self, work_request_id, **kwargs): def commit_multipart_upload(self, namespace_name, bucket_name, object_name, upload_id, commit_multipart_upload_details, **kwargs): """ - Commit Multipart Upload Commits a multipart upload, which involves checking part numbers and entity tags (ETags) of the parts, to create an aggregate object. @@ -353,7 +352,6 @@ def commit_multipart_upload(self, namespace_name, bucket_name, object_name, uplo def copy_object(self, namespace_name, bucket_name, copy_object_details, **kwargs): """ - Creates a copy object request. Creates a request to copy an object within a region or to another region. @@ -434,7 +432,6 @@ def copy_object(self, namespace_name, bucket_name, copy_object_details, **kwargs def create_bucket(self, namespace_name, create_bucket_details, **kwargs): """ - Create Bucket Creates a bucket in the given namespace with a bucket name and optional user-defined metadata. Avoid entering confidential information in bucket names. @@ -513,7 +510,6 @@ def create_bucket(self, namespace_name, create_bucket_details, **kwargs): def create_multipart_upload(self, namespace_name, bucket_name, create_multipart_upload_details, **kwargs): """ - Create Multipart Upload Starts a new multipart upload to a specific object in the given bucket in the given namespace. @@ -525,7 +521,7 @@ def create_multipart_upload(self, namespace_name, bucket_name, create_multipart_ Example: `my-new-bucket1` :param CreateMultipartUploadDetails create_multipart_upload_details: (required) - Request object for creating a multi-part upload. + Request object for creating a multipart upload. :param str if_match: (optional) The entity tag (ETag) to match. For creating and committing a multipart upload to an object, this is the entity tag of the target object. @@ -609,7 +605,6 @@ def create_multipart_upload(self, namespace_name, bucket_name, create_multipart_ def create_preauthenticated_request(self, namespace_name, bucket_name, create_preauthenticated_request_details, **kwargs): """ - Create Preauthenticated Request Creates a pre-authenticated request specific to the bucket. @@ -690,13 +685,9 @@ def create_preauthenticated_request(self, namespace_name, bucket_name, create_pr body=create_preauthenticated_request_details, response_type="PreauthenticatedRequest") - def delete_bucket(self, namespace_name, bucket_name, **kwargs): + def create_replication_policy(self, namespace_name, bucket_name, create_replication_policy_details, **kwargs): """ - DELETE Bucket - Deletes a bucket if the bucket is already empty. If the bucket is not empty, use - :func:`delete_object` first. In addition, - you cannot delete a bucket that has a multipart upload in progress or a pre-authenticated - request associated with that bucket. + Creates a replication policy for the specified bucket. :param str namespace_name: (required) @@ -706,9 +697,8 @@ def delete_bucket(self, namespace_name, bucket_name, **kwargs): The name of the bucket. Avoid entering confidential information. Example: `my-new-bucket1` - :param str if_match: (optional) - The entity tag (ETag) to match. For creating and committing a multipart upload to an object, this is the entity tag of the target object. - For uploading a part, this is the entity tag of the target part. + :param CreateReplicationPolicyDetails create_replication_policy_details: (required) + The replication policy. :param str opc_client_request_id: (optional) The client request ID for tracing. @@ -721,22 +711,21 @@ def delete_bucket(self, namespace_name, bucket_name, **kwargs): To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. - :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.object_storage.models.ReplicationPolicy` :rtype: :class:`~oci.response.Response` """ - resource_path = "/n/{namespaceName}/b/{bucketName}" - method = "DELETE" + resource_path = "/n/{namespaceName}/b/{bucketName}/replicationPolicies" + method = "POST" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", - "if_match", "opc_client_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "delete_bucket got unknown kwargs: {!r}".format(extra_kwargs)) + "create_replication_policy got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "namespaceName": namespace_name, @@ -752,7 +741,6 @@ def delete_bucket(self, namespace_name, bucket_name, **kwargs): header_params = { "accept": "application/json", "content-type": "application/json", - "if-match": kwargs.get("if_match", missing), "opc-client-request-id": kwargs.get("opc_client_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} @@ -767,18 +755,22 @@ def delete_bucket(self, namespace_name, bucket_name, **kwargs): resource_path=resource_path, method=method, path_params=path_params, - header_params=header_params) + header_params=header_params, + body=create_replication_policy_details, + response_type="ReplicationPolicy") else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, - header_params=header_params) + header_params=header_params, + body=create_replication_policy_details, + response_type="ReplicationPolicy") - def delete_object(self, namespace_name, bucket_name, object_name, **kwargs): + def create_retention_rule(self, namespace_name, bucket_name, create_retention_rule_details, **kwargs): """ - DELETE Object - Deletes an object. + Creates a new retention rule in the specified bucket. The new rule will take effect typically within 30 seconds. + Note that a maximum of 100 rules are supported on a bucket. :param str namespace_name: (required) @@ -788,13 +780,8 @@ def delete_object(self, namespace_name, bucket_name, object_name, **kwargs): The name of the bucket. Avoid entering confidential information. Example: `my-new-bucket1` - :param str object_name: (required) - The name of the object. Avoid entering confidential information. - Example: `test/object1.log` - - :param str if_match: (optional) - The entity tag (ETag) to match. For creating and committing a multipart upload to an object, this is the entity tag of the target object. - For uploading a part, this is the entity tag of the target part. + :param CreateRetentionRuleDetails create_retention_rule_details: (required) + The retention rule to create for the bucket. :param str opc_client_request_id: (optional) The client request ID for tracing. @@ -807,27 +794,25 @@ def delete_object(self, namespace_name, bucket_name, object_name, **kwargs): To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. - :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.object_storage.models.RetentionRule` :rtype: :class:`~oci.response.Response` """ - resource_path = "/n/{namespaceName}/b/{bucketName}/o/{objectName}" - method = "DELETE" + resource_path = "/n/{namespaceName}/b/{bucketName}/retentionRules" + method = "POST" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", - "if_match", "opc_client_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "delete_object got unknown kwargs: {!r}".format(extra_kwargs)) + "create_retention_rule got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "namespaceName": namespace_name, - "bucketName": bucket_name, - "objectName": object_name + "bucketName": bucket_name } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -839,7 +824,6 @@ def delete_object(self, namespace_name, bucket_name, object_name, **kwargs): header_params = { "accept": "application/json", "content-type": "application/json", - "if-match": kwargs.get("if_match", missing), "opc-client-request-id": kwargs.get("opc_client_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} @@ -854,18 +838,24 @@ def delete_object(self, namespace_name, bucket_name, object_name, **kwargs): resource_path=resource_path, method=method, path_params=path_params, - header_params=header_params) + header_params=header_params, + body=create_retention_rule_details, + response_type="RetentionRule") else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, - header_params=header_params) + header_params=header_params, + body=create_retention_rule_details, + response_type="RetentionRule") - def delete_object_lifecycle_policy(self, namespace_name, bucket_name, **kwargs): + def delete_bucket(self, namespace_name, bucket_name, **kwargs): """ - Delete object lifecycle policy - Deletes the object lifecycle policy for the bucket. + Deletes a bucket if the bucket is already empty. If the bucket is not empty, use + :func:`delete_object` first. In addition, + you cannot delete a bucket that has a multipart upload in progress or a pre-authenticated + request associated with that bucket. :param str namespace_name: (required) @@ -875,13 +865,13 @@ def delete_object_lifecycle_policy(self, namespace_name, bucket_name, **kwargs): The name of the bucket. Avoid entering confidential information. Example: `my-new-bucket1` - :param str opc_client_request_id: (optional) - The client request ID for tracing. - :param str if_match: (optional) The entity tag (ETag) to match. For creating and committing a multipart upload to an object, this is the entity tag of the target object. For uploading a part, this is the entity tag of the target part. + :param str opc_client_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. @@ -893,19 +883,19 @@ def delete_object_lifecycle_policy(self, namespace_name, bucket_name, **kwargs): :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` """ - resource_path = "/n/{namespaceName}/b/{bucketName}/l" + resource_path = "/n/{namespaceName}/b/{bucketName}" method = "DELETE" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", - "opc_client_request_id", - "if_match" + "if_match", + "opc_client_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "delete_object_lifecycle_policy got unknown kwargs: {!r}".format(extra_kwargs)) + "delete_bucket got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "namespaceName": namespace_name, @@ -921,8 +911,8 @@ def delete_object_lifecycle_policy(self, namespace_name, bucket_name, **kwargs): header_params = { "accept": "application/json", "content-type": "application/json", - "opc-client-request-id": kwargs.get("opc_client_request_id", missing), - "if-match": kwargs.get("if_match", missing) + "if-match": kwargs.get("if_match", missing), + "opc-client-request-id": kwargs.get("opc_client_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} @@ -944,10 +934,9 @@ def delete_object_lifecycle_policy(self, namespace_name, bucket_name, **kwargs): path_params=path_params, header_params=header_params) - def delete_preauthenticated_request(self, namespace_name, bucket_name, par_id, **kwargs): + def delete_object(self, namespace_name, bucket_name, object_name, **kwargs): """ - DELETE Preauthenticated Request - Deletes the pre-authenticated request for the bucket. + Deletes an object. :param str namespace_name: (required) @@ -957,9 +946,13 @@ def delete_preauthenticated_request(self, namespace_name, bucket_name, par_id, * The name of the bucket. Avoid entering confidential information. Example: `my-new-bucket1` - :param str par_id: (required) - The unique identifier for the pre-authenticated request. This can be used to manage operations against - the pre-authenticated request, such as GET or DELETE. + :param str object_name: (required) + The name of the object. Avoid entering confidential information. + Example: `test/object1.log` + + :param str if_match: (optional) + The entity tag (ETag) to match. For creating and committing a multipart upload to an object, this is the entity tag of the target object. + For uploading a part, this is the entity tag of the target part. :param str opc_client_request_id: (optional) The client request ID for tracing. @@ -975,23 +968,24 @@ def delete_preauthenticated_request(self, namespace_name, bucket_name, par_id, * :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` """ - resource_path = "/n/{namespaceName}/b/{bucketName}/p/{parId}" + resource_path = "/n/{namespaceName}/b/{bucketName}/o/{objectName}" method = "DELETE" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", + "if_match", "opc_client_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "delete_preauthenticated_request got unknown kwargs: {!r}".format(extra_kwargs)) + "delete_object got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "namespaceName": namespace_name, "bucketName": bucket_name, - "parId": par_id + "objectName": object_name } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -1003,6 +997,7 @@ def delete_preauthenticated_request(self, namespace_name, bucket_name, par_id, * header_params = { "accept": "application/json", "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), "opc-client-request-id": kwargs.get("opc_client_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} @@ -1025,10 +1020,9 @@ def delete_preauthenticated_request(self, namespace_name, bucket_name, par_id, * path_params=path_params, header_params=header_params) - def get_bucket(self, namespace_name, bucket_name, **kwargs): + def delete_object_lifecycle_policy(self, namespace_name, bucket_name, **kwargs): """ - GET Bucket - Gets the current representation of the given bucket in the given Object Storage namespace. + Deletes the object lifecycle policy for the bucket. :param str namespace_name: (required) @@ -1038,24 +1032,12 @@ def get_bucket(self, namespace_name, bucket_name, **kwargs): The name of the bucket. Avoid entering confidential information. Example: `my-new-bucket1` - :param str if_match: (optional) - The entity tag (ETag) to match. For creating and committing a multipart upload to an object, this is the entity tag of the target object. - For uploading a part, this is the entity tag of the target part. - - :param str if_none_match: (optional) - The entity tag (ETag) to avoid matching. The only valid value is '*', which indicates that the request should fail if the object - already exists. For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a - part, this is the entity tag of the target part. - :param str opc_client_request_id: (optional) The client request ID for tracing. - :param list[str] fields: (optional) - Bucket summary includes the 'namespace', 'name', 'compartmentId', 'createdBy', 'timeCreated', - and 'etag' fields. This parameter can also include 'approximateCount' (approximate number of objects) and 'approximateSize' - (total approximate size in bytes of all objects). For example 'approximateCount,approximateSize'. - - Allowed values are: "approximateCount", "approximateSize" + :param str if_match: (optional) + The entity tag (ETag) to match. For creating and committing a multipart upload to an object, this is the entity tag of the target object. + For uploading a part, this is the entity tag of the target part. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. @@ -1065,24 +1047,22 @@ def get_bucket(self, namespace_name, bucket_name, **kwargs): To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.object_storage.models.Bucket` + :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` """ - resource_path = "/n/{namespaceName}/b/{bucketName}" - method = "GET" + resource_path = "/n/{namespaceName}/b/{bucketName}/l" + method = "DELETE" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", - "if_match", - "if_none_match", "opc_client_request_id", - "fields" + "if_match" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "get_bucket got unknown kwargs: {!r}".format(extra_kwargs)) + "delete_object_lifecycle_policy got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "namespaceName": namespace_name, @@ -1095,25 +1075,11 @@ def get_bucket(self, namespace_name, bucket_name, **kwargs): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) - if 'fields' in kwargs: - fields_allowed_values = ["approximateCount", "approximateSize"] - for fields_item in kwargs['fields']: - if fields_item not in fields_allowed_values: - raise ValueError( - "Invalid value for `fields`, must be one of {0}".format(fields_allowed_values) - ) - - query_params = { - "fields": self.base_client.generate_collection_format_param(kwargs.get("fields", missing), 'csv') - } - query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} - header_params = { "accept": "application/json", "content-type": "application/json", - "if-match": kwargs.get("if_match", missing), - "if-none-match": kwargs.get("if_none_match", missing), - "opc-client-request-id": kwargs.get("opc_client_request_id", missing) + "opc-client-request-id": kwargs.get("opc_client_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} @@ -1127,37 +1093,33 @@ def get_bucket(self, namespace_name, bucket_name, **kwargs): resource_path=resource_path, method=method, path_params=path_params, - query_params=query_params, - header_params=header_params, - response_type="Bucket") + header_params=header_params) 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="Bucket") + header_params=header_params) - def get_namespace(self, **kwargs): + def delete_preauthenticated_request(self, namespace_name, bucket_name, par_id, **kwargs): """ - GET Namespace Name - Each Oracle Cloud Infrastructure tenant is assigned one unique and uneditable Object Storage namespace. The namespace - is a system-generated string assigned during account creation. For some older tenancies, the namespace string may be - the tenancy name in all lower-case letters. You cannot edit a namespace. + Deletes the pre-authenticated request for the bucket. - GetNamespace returns the name of the Object Storage namespace for the user making the request. - If an optional compartmentId query parameter is provided, GetNamespace returns the namespace name of the corresponding - tenancy, provided the user has access to it. + :param str namespace_name: (required) + The Object Storage namespace used for the request. + + :param str bucket_name: (required) + The name of the bucket. Avoid entering confidential information. + Example: `my-new-bucket1` + + :param str par_id: (required) + The unique identifier for the pre-authenticated request. This can be used to manage operations against + the pre-authenticated request, such as GET or DELETE. :param str opc_client_request_id: (optional) The client request ID for tracing. - :param str compartment_id: (optional) - This is an optional field representing the tenancy OCID or the compartment OCID within the tenancy whose Object Storage namespace - name has to be retrieved. - :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. @@ -1166,27 +1128,33 @@ def get_namespace(self, **kwargs): To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. - :return: A :class:`~oci.response.Response` object with data of type str + :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` """ - resource_path = "/n" - method = "GET" + resource_path = "/n/{namespaceName}/b/{bucketName}/p/{parId}" + method = "DELETE" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", - "opc_client_request_id", - "compartment_id" + "opc_client_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "get_namespace got unknown kwargs: {!r}".format(extra_kwargs)) + "delete_preauthenticated_request got unknown kwargs: {!r}".format(extra_kwargs)) - query_params = { - "compartmentId": kwargs.get("compartment_id", missing) + path_params = { + "namespaceName": namespace_name, + "bucketName": bucket_name, + "parId": par_id } - query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) header_params = { "accept": "application/json", @@ -1204,34 +1172,30 @@ def get_namespace(self, **kwargs): self.base_client.call_api, resource_path=resource_path, method=method, - query_params=query_params, - header_params=header_params, - response_type="str") + path_params=path_params, + header_params=header_params) else: return self.base_client.call_api( resource_path=resource_path, method=method, - query_params=query_params, - header_params=header_params, - response_type="str") + path_params=path_params, + header_params=header_params) - def get_namespace_metadata(self, namespace_name, **kwargs): + def delete_replication_policy(self, namespace_name, bucket_name, replication_id, **kwargs): """ - GET Namespace Metadata - Gets the metadata for the Object Storage namespace, which contains defaultS3CompartmentId and - defaultSwiftCompartmentId. - - Any user with the OBJECTSTORAGE_NAMESPACE_READ permission will be able to see the current metadata. If you are - not authorized, talk to an administrator. If you are an administrator who needs to write policies - to give users access, see - `Getting Started with Policies`__. - - __ https://docs.cloud.oracle.com/Content/Identity/Concepts/policygetstarted.htm + Deletes the replication policy associated with the source bucket. :param str namespace_name: (required) The Object Storage namespace used for the request. + :param str bucket_name: (required) + The name of the bucket. Avoid entering confidential information. + Example: `my-new-bucket1` + + :param str replication_id: (required) + The ID of the replication policy. + :param str opc_client_request_id: (optional) The client request ID for tracing. @@ -1243,11 +1207,11 @@ def get_namespace_metadata(self, namespace_name, **kwargs): To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.object_storage.models.NamespaceMetadata` + :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` """ - resource_path = "/n/{namespaceName}" - method = "GET" + resource_path = "/n/{namespaceName}/b/{bucketName}/replicationPolicies/{replicationId}" + method = "DELETE" # Don't accept unknown kwargs expected_kwargs = [ @@ -1257,10 +1221,12 @@ def get_namespace_metadata(self, namespace_name, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "get_namespace_metadata got unknown kwargs: {!r}".format(extra_kwargs)) + "delete_replication_policy got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { - "namespaceName": namespace_name + "namespaceName": namespace_name, + "bucketName": bucket_name, + "replicationId": replication_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -1286,20 +1252,17 @@ def get_namespace_metadata(self, namespace_name, **kwargs): resource_path=resource_path, method=method, path_params=path_params, - header_params=header_params, - response_type="NamespaceMetadata") + header_params=header_params) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, - header_params=header_params, - response_type="NamespaceMetadata") + header_params=header_params) - def get_object(self, namespace_name, bucket_name, object_name, **kwargs): + def delete_retention_rule(self, namespace_name, bucket_name, retention_rule_id, **kwargs): """ - GET Object - Gets the metadata and body of an object. + Deletes the specified rule. The deletion takes effect typically within 30 seconds. :param str namespace_name: (required) @@ -1309,28 +1272,16 @@ def get_object(self, namespace_name, bucket_name, object_name, **kwargs): The name of the bucket. Avoid entering confidential information. Example: `my-new-bucket1` - :param str object_name: (required) - The name of the object. Avoid entering confidential information. - Example: `test/object1.log` + :param str retention_rule_id: (required) + The ID of the retention rule. :param str if_match: (optional) The entity tag (ETag) to match. For creating and committing a multipart upload to an object, this is the entity tag of the target object. For uploading a part, this is the entity tag of the target part. - :param str if_none_match: (optional) - The entity tag (ETag) to avoid matching. The only valid value is '*', which indicates that the request should fail if the object - already exists. For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a - part, this is the entity tag of the target part. - :param str opc_client_request_id: (optional) The client request ID for tracing. - :param str range: (optional) - Optional byte range to fetch, as described in `RFC 7233`__, section 2.1. - Note that only a single range of bytes is supported. - - __ https://tools.ietf.org/rfc/rfc7233 - :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. @@ -1339,29 +1290,27 @@ def get_object(self, namespace_name, bucket_name, object_name, **kwargs): To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. - :return: A :class:`~oci.response.Response` object with data of type stream + :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` """ - resource_path = "/n/{namespaceName}/b/{bucketName}/o/{objectName}" - method = "GET" + resource_path = "/n/{namespaceName}/b/{bucketName}/retentionRules/{retentionRuleId}" + method = "DELETE" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", "if_match", - "if_none_match", - "opc_client_request_id", - "range" + "opc_client_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "get_object got unknown kwargs: {!r}".format(extra_kwargs)) + "delete_retention_rule got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "namespaceName": namespace_name, "bucketName": bucket_name, - "objectName": object_name + "retentionRuleId": retention_rule_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -1374,9 +1323,7 @@ def get_object(self, namespace_name, bucket_name, object_name, **kwargs): "accept": "application/json", "content-type": "application/json", "if-match": kwargs.get("if_match", missing), - "if-none-match": kwargs.get("if_none_match", missing), - "opc-client-request-id": kwargs.get("opc_client_request_id", missing), - "range": kwargs.get("range", missing) + "opc-client-request-id": kwargs.get("opc_client_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} @@ -1390,20 +1337,17 @@ def get_object(self, namespace_name, bucket_name, object_name, **kwargs): resource_path=resource_path, method=method, path_params=path_params, - header_params=header_params, - response_type="stream") + header_params=header_params) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, - header_params=header_params, - response_type="stream") + header_params=header_params) - def get_object_lifecycle_policy(self, namespace_name, bucket_name, **kwargs): + def get_bucket(self, namespace_name, bucket_name, **kwargs): """ - GET object lifecycle policy - Gets the object lifecycle policy for the bucket. + Gets the current representation of the given bucket in the given Object Storage namespace. :param str namespace_name: (required) @@ -1413,9 +1357,25 @@ def get_object_lifecycle_policy(self, namespace_name, bucket_name, **kwargs): The name of the bucket. Avoid entering confidential information. Example: `my-new-bucket1` + :param str if_match: (optional) + The entity tag (ETag) to match. For creating and committing a multipart upload to an object, this is the entity tag of the target object. + For uploading a part, this is the entity tag of the target part. + + :param str if_none_match: (optional) + The entity tag (ETag) to avoid matching. The only valid value is '*', which indicates that the request should fail if the object + already exists. For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a + part, this is the entity tag of the target part. + :param str opc_client_request_id: (optional) The client request ID for tracing. + :param list[str] fields: (optional) + Bucket summary includes the 'namespace', 'name', 'compartmentId', 'createdBy', 'timeCreated', + and 'etag' fields. This parameter can also include 'approximateCount' (approximate number of objects) and 'approximateSize' + (total approximate size in bytes of all objects). For example 'approximateCount,approximateSize'. + + Allowed values are: "approximateCount", "approximateSize" + :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. @@ -1424,21 +1384,24 @@ def get_object_lifecycle_policy(self, namespace_name, bucket_name, **kwargs): To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.object_storage.models.ObjectLifecyclePolicy` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.object_storage.models.Bucket` :rtype: :class:`~oci.response.Response` """ - resource_path = "/n/{namespaceName}/b/{bucketName}/l" + resource_path = "/n/{namespaceName}/b/{bucketName}" method = "GET" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", - "opc_client_request_id" + "if_match", + "if_none_match", + "opc_client_request_id", + "fields" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "get_object_lifecycle_policy got unknown kwargs: {!r}".format(extra_kwargs)) + "get_bucket got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "namespaceName": namespace_name, @@ -1451,9 +1414,24 @@ def get_object_lifecycle_policy(self, namespace_name, bucket_name, **kwargs): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + if 'fields' in kwargs: + fields_allowed_values = ["approximateCount", "approximateSize"] + for fields_item in kwargs['fields']: + if fields_item not in fields_allowed_values: + raise ValueError( + "Invalid value for `fields`, must be one of {0}".format(fields_allowed_values) + ) + + query_params = { + "fields": self.base_client.generate_collection_format_param(kwargs.get("fields", missing), 'csv') + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + header_params = { "accept": "application/json", "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "if-none-match": kwargs.get("if_none_match", missing), "opc-client-request-id": kwargs.get("opc_client_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} @@ -1468,36 +1446,39 @@ def get_object_lifecycle_policy(self, namespace_name, bucket_name, **kwargs): resource_path=resource_path, method=method, path_params=path_params, + query_params=query_params, header_params=header_params, - response_type="ObjectLifecyclePolicy") + response_type="Bucket") 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="ObjectLifecyclePolicy") + response_type="Bucket") - def get_preauthenticated_request(self, namespace_name, bucket_name, par_id, **kwargs): + def get_namespace(self, **kwargs): """ - GET Preauthenticated Request - Gets the pre-authenticated request for the bucket. - - - :param str namespace_name: (required) - The Object Storage namespace used for the request. + Each Oracle Cloud Infrastructure tenant is assigned one unique and uneditable Object Storage namespace. The namespace + is a system-generated string assigned during account creation. For some older tenancies, the namespace string may be + the tenancy name in all lower-case letters. You cannot edit a namespace. - :param str bucket_name: (required) - The name of the bucket. Avoid entering confidential information. - Example: `my-new-bucket1` + GetNamespace returns the name of the Object Storage namespace for the user making the request. + If an optional compartmentId query parameter is provided, GetNamespace returns the namespace name of the corresponding + tenancy, provided the user has access to it. - :param str par_id: (required) - The unique identifier for the pre-authenticated request. This can be used to manage operations against - the pre-authenticated request, such as GET or DELETE. :param str opc_client_request_id: (optional) The client request ID for tracing. + :param str compartment_id: (optional) + This is an optional field representing either the tenancy `OCID`__ or the compartment + `OCID`__ within the tenancy whose Object Storage namespace is to be retrieved. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. @@ -1506,33 +1487,27 @@ def get_preauthenticated_request(self, namespace_name, bucket_name, par_id, **kw To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.object_storage.models.PreauthenticatedRequestSummary` + :return: A :class:`~oci.response.Response` object with data of type str :rtype: :class:`~oci.response.Response` """ - resource_path = "/n/{namespaceName}/b/{bucketName}/p/{parId}" + resource_path = "/n" method = "GET" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", - "opc_client_request_id" + "opc_client_request_id", + "compartment_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "get_preauthenticated_request got unknown kwargs: {!r}".format(extra_kwargs)) + "get_namespace got unknown kwargs: {!r}".format(extra_kwargs)) - path_params = { - "namespaceName": namespace_name, - "bucketName": bucket_name, - "parId": par_id + query_params = { + "compartmentId": kwargs.get("compartment_id", missing) } - - 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('Parameter {} cannot be None, whitespace or empty string'.format(k)) + 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", @@ -1550,25 +1525,32 @@ def get_preauthenticated_request(self, namespace_name, bucket_name, par_id, **kw 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="PreauthenticatedRequestSummary") + response_type="str") 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="PreauthenticatedRequestSummary") + response_type="str") - def get_work_request(self, work_request_id, **kwargs): + def get_namespace_metadata(self, namespace_name, **kwargs): """ - GET Work Request Status - Gets the status of the work request for the given ID. + Gets the metadata for the Object Storage namespace, which contains defaultS3CompartmentId and + defaultSwiftCompartmentId. + Any user with the OBJECTSTORAGE_NAMESPACE_READ permission will be able to see the current metadata. If you are + not authorized, talk to an administrator. If you are an administrator who needs to write policies + to give users access, see + `Getting Started with Policies`__. - :param str work_request_id: (required) - The ID of the asynchronous request. + __ https://docs.cloud.oracle.com/Content/Identity/Concepts/policygetstarted.htm + + + :param str namespace_name: (required) + The Object Storage namespace used for the request. :param str opc_client_request_id: (optional) The client request ID for tracing. @@ -1581,10 +1563,10 @@ def get_work_request(self, work_request_id, **kwargs): To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.object_storage.models.WorkRequest` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.object_storage.models.NamespaceMetadata` :rtype: :class:`~oci.response.Response` """ - resource_path = "/workRequests/{workRequestId}" + resource_path = "/n/{namespaceName}" method = "GET" # Don't accept unknown kwargs @@ -1595,10 +1577,10 @@ def get_work_request(self, work_request_id, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "get_work_request got unknown kwargs: {!r}".format(extra_kwargs)) + "get_namespace_metadata got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { - "workRequestId": work_request_id + "namespaceName": namespace_name } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -1625,19 +1607,18 @@ def get_work_request(self, work_request_id, **kwargs): method=method, path_params=path_params, header_params=header_params, - response_type="WorkRequest") + response_type="NamespaceMetadata") else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, - response_type="WorkRequest") + response_type="NamespaceMetadata") - def head_bucket(self, namespace_name, bucket_name, **kwargs): + def get_object(self, namespace_name, bucket_name, object_name, **kwargs): """ - HEAD Bucket - Efficiently checks to see if a bucket exists and gets the current entity tag (ETag) for the bucket. + Gets the metadata and body of an object. :param str namespace_name: (required) @@ -1647,6 +1628,10 @@ def head_bucket(self, namespace_name, bucket_name, **kwargs): The name of the bucket. Avoid entering confidential information. Example: `my-new-bucket1` + :param str object_name: (required) + The name of the object. Avoid entering confidential information. + Example: `test/object1.log` + :param str if_match: (optional) The entity tag (ETag) to match. For creating and committing a multipart upload to an object, this is the entity tag of the target object. For uploading a part, this is the entity tag of the target part. @@ -1659,6 +1644,12 @@ def head_bucket(self, namespace_name, bucket_name, **kwargs): :param str opc_client_request_id: (optional) The client request ID for tracing. + :param str range: (optional) + Optional byte range to fetch, as described in `RFC 7233`__. + Note that only a single range of bytes is supported. + + __ https://tools.ietf.org/html/rfc7233#section-2.1 + :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. @@ -1667,27 +1658,29 @@ def head_bucket(self, namespace_name, bucket_name, **kwargs): To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. - :return: A :class:`~oci.response.Response` object with data of type None + :return: A :class:`~oci.response.Response` object with data of type stream :rtype: :class:`~oci.response.Response` """ - resource_path = "/n/{namespaceName}/b/{bucketName}" - method = "HEAD" + resource_path = "/n/{namespaceName}/b/{bucketName}/o/{objectName}" + method = "GET" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", "if_match", "if_none_match", - "opc_client_request_id" + "opc_client_request_id", + "range" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "head_bucket got unknown kwargs: {!r}".format(extra_kwargs)) + "get_object got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "namespaceName": namespace_name, - "bucketName": bucket_name + "bucketName": bucket_name, + "objectName": object_name } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -1701,7 +1694,8 @@ def head_bucket(self, namespace_name, bucket_name, **kwargs): "content-type": "application/json", "if-match": kwargs.get("if_match", missing), "if-none-match": kwargs.get("if_none_match", missing), - "opc-client-request-id": kwargs.get("opc_client_request_id", missing) + "opc-client-request-id": kwargs.get("opc_client_request_id", missing), + "range": kwargs.get("range", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} @@ -1715,18 +1709,19 @@ def head_bucket(self, namespace_name, bucket_name, **kwargs): resource_path=resource_path, method=method, path_params=path_params, - header_params=header_params) + header_params=header_params, + response_type="stream") else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, - header_params=header_params) + header_params=header_params, + response_type="stream") - def head_object(self, namespace_name, bucket_name, object_name, **kwargs): + def get_object_lifecycle_policy(self, namespace_name, bucket_name, **kwargs): """ - HEAD Object - Gets the user-defined metadata and entity tag (ETag) for an object. + Gets the object lifecycle policy for the bucket. :param str namespace_name: (required) @@ -1736,19 +1731,6 @@ def head_object(self, namespace_name, bucket_name, object_name, **kwargs): The name of the bucket. Avoid entering confidential information. Example: `my-new-bucket1` - :param str object_name: (required) - The name of the object. Avoid entering confidential information. - Example: `test/object1.log` - - :param str if_match: (optional) - The entity tag (ETag) to match. For creating and committing a multipart upload to an object, this is the entity tag of the target object. - For uploading a part, this is the entity tag of the target part. - - :param str if_none_match: (optional) - The entity tag (ETag) to avoid matching. The only valid value is '*', which indicates that the request should fail if the object - already exists. For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a - part, this is the entity tag of the target part. - :param str opc_client_request_id: (optional) The client request ID for tracing. @@ -1760,28 +1742,25 @@ def head_object(self, namespace_name, bucket_name, object_name, **kwargs): To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. - :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.object_storage.models.ObjectLifecyclePolicy` :rtype: :class:`~oci.response.Response` """ - resource_path = "/n/{namespaceName}/b/{bucketName}/o/{objectName}" - method = "HEAD" + resource_path = "/n/{namespaceName}/b/{bucketName}/l" + method = "GET" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", - "if_match", - "if_none_match", "opc_client_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "head_object got unknown kwargs: {!r}".format(extra_kwargs)) + "get_object_lifecycle_policy got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "namespaceName": namespace_name, - "bucketName": bucket_name, - "objectName": object_name + "bucketName": bucket_name } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -1793,8 +1772,6 @@ def head_object(self, namespace_name, bucket_name, object_name, **kwargs): header_params = { "accept": "application/json", "content-type": "application/json", - "if-match": kwargs.get("if_match", missing), - "if-none-match": kwargs.get("if_none_match", missing), "opc-client-request-id": kwargs.get("opc_client_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} @@ -1809,45 +1786,31 @@ def head_object(self, namespace_name, bucket_name, object_name, **kwargs): resource_path=resource_path, method=method, path_params=path_params, - header_params=header_params) + header_params=header_params, + response_type="ObjectLifecyclePolicy") else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, - header_params=header_params) + header_params=header_params, + response_type="ObjectLifecyclePolicy") - def list_buckets(self, namespace_name, compartment_id, **kwargs): + def get_preauthenticated_request(self, namespace_name, bucket_name, par_id, **kwargs): """ - List Buckets - Gets a list of all BucketSummary items in a compartment. A BucketSummary contains only summary fields for the bucket - and does not contain fields like the user-defined metadata. - - To use this and other API operations, you must be authorized in an IAM policy. If you are not authorized, - talk to an administrator. If you are an administrator who needs to write policies to give users access, see - `Getting Started with Policies`__. - - __ https://docs.cloud.oracle.com/Content/Identity/Concepts/policygetstarted.htm + Gets the pre-authenticated request for the bucket. :param str namespace_name: (required) The Object Storage namespace used for the request. - :param str compartment_id: (required) - The ID of the compartment in which to list buckets. - - :param int limit: (optional) - The maximum number of items to return. - - :param str page: (optional) - The page at which to start retrieving results. - - :param list[str] fields: (optional) - Bucket summary in list of buckets includes the 'namespace', 'name', 'compartmentId', 'createdBy', 'timeCreated', - and 'etag' fields. This parameter can also include 'tags' (freeformTags and definedTags). The only supported value - of this parameter is 'tags' for now. Example 'tags'. + :param str bucket_name: (required) + The name of the bucket. Avoid entering confidential information. + Example: `my-new-bucket1` - Allowed values are: "tags" + :param str par_id: (required) + The unique identifier for the pre-authenticated request. This can be used to manage operations against + the pre-authenticated request, such as GET or DELETE. :param str opc_client_request_id: (optional) The client request ID for tracing. @@ -1860,18 +1823,530 @@ def list_buckets(self, namespace_name, compartment_id, **kwargs): To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. - :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.object_storage.models.BucketSummary` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.object_storage.models.PreauthenticatedRequestSummary` :rtype: :class:`~oci.response.Response` """ - resource_path = "/n/{namespaceName}/b" + resource_path = "/n/{namespaceName}/b/{bucketName}/p/{parId}" method = "GET" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", - "limit", - "page", - "fields", + "opc_client_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "get_preauthenticated_request got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "namespaceName": namespace_name, + "bucketName": bucket_name, + "parId": par_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('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-client-request-id": kwargs.get("opc_client_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.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + 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="PreauthenticatedRequestSummary") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="PreauthenticatedRequestSummary") + + def get_replication_policy(self, namespace_name, bucket_name, replication_id, **kwargs): + """ + Get the replication policy. + + + :param str namespace_name: (required) + The Object Storage namespace used for the request. + + :param str bucket_name: (required) + The name of the bucket. Avoid entering confidential information. + Example: `my-new-bucket1` + + :param str replication_id: (required) + The ID of the replication policy. + + :param str opc_client_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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. 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`. + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.object_storage.models.ReplicationPolicy` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/n/{namespaceName}/b/{bucketName}/replicationPolicies/{replicationId}" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "opc_client_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "get_replication_policy got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "namespaceName": namespace_name, + "bucketName": bucket_name, + "replicationId": replication_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('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-client-request-id": kwargs.get("opc_client_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.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + 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="ReplicationPolicy") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="ReplicationPolicy") + + def get_retention_rule(self, namespace_name, bucket_name, retention_rule_id, **kwargs): + """ + Get the specified retention rule. + + + :param str namespace_name: (required) + The Object Storage namespace used for the request. + + :param str bucket_name: (required) + The name of the bucket. Avoid entering confidential information. + Example: `my-new-bucket1` + + :param str retention_rule_id: (required) + The ID of the retention rule. + + :param str opc_client_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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. 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`. + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.object_storage.models.RetentionRule` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/n/{namespaceName}/b/{bucketName}/retentionRules/{retentionRuleId}" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "opc_client_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "get_retention_rule got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "namespaceName": namespace_name, + "bucketName": bucket_name, + "retentionRuleId": retention_rule_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('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-client-request-id": kwargs.get("opc_client_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.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + 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="RetentionRule") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="RetentionRule") + + def get_work_request(self, work_request_id, **kwargs): + """ + Gets the status of the work request for the given ID. + + + :param str work_request_id: (required) + The ID of the asynchronous request. + + :param str opc_client_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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. 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`. + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.object_storage.models.WorkRequest` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/workRequests/{workRequestId}" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "opc_client_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "get_work_request got unknown kwargs: {!r}".format(extra_kwargs)) + + 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('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-client-request-id": kwargs.get("opc_client_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.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + 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") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="WorkRequest") + + def head_bucket(self, namespace_name, bucket_name, **kwargs): + """ + Efficiently checks to see if a bucket exists and gets the current entity tag (ETag) for the bucket. + + + :param str namespace_name: (required) + The Object Storage namespace used for the request. + + :param str bucket_name: (required) + The name of the bucket. Avoid entering confidential information. + Example: `my-new-bucket1` + + :param str if_match: (optional) + The entity tag (ETag) to match. For creating and committing a multipart upload to an object, this is the entity tag of the target object. + For uploading a part, this is the entity tag of the target part. + + :param str if_none_match: (optional) + The entity tag (ETag) to avoid matching. The only valid value is '*', which indicates that the request should fail if the object + already exists. For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a + part, this is the entity tag of the target part. + + :param str opc_client_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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. 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`. + + :return: A :class:`~oci.response.Response` object with data of type None + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/n/{namespaceName}/b/{bucketName}" + method = "HEAD" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "if_match", + "if_none_match", + "opc_client_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "head_bucket got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "namespaceName": namespace_name, + "bucketName": bucket_name + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "if-none-match": kwargs.get("if_none_match", missing), + "opc-client-request-id": kwargs.get("opc_client_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.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + 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) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + + def head_object(self, namespace_name, bucket_name, object_name, **kwargs): + """ + Gets the user-defined metadata and entity tag (ETag) for an object. + + + :param str namespace_name: (required) + The Object Storage namespace used for the request. + + :param str bucket_name: (required) + The name of the bucket. Avoid entering confidential information. + Example: `my-new-bucket1` + + :param str object_name: (required) + The name of the object. Avoid entering confidential information. + Example: `test/object1.log` + + :param str if_match: (optional) + The entity tag (ETag) to match. For creating and committing a multipart upload to an object, this is the entity tag of the target object. + For uploading a part, this is the entity tag of the target part. + + :param str if_none_match: (optional) + The entity tag (ETag) to avoid matching. The only valid value is '*', which indicates that the request should fail if the object + already exists. For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a + part, this is the entity tag of the target part. + + :param str opc_client_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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. 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`. + + :return: A :class:`~oci.response.Response` object with data of type None + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/n/{namespaceName}/b/{bucketName}/o/{objectName}" + method = "HEAD" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "if_match", + "if_none_match", + "opc_client_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "head_object got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "namespaceName": namespace_name, + "bucketName": bucket_name, + "objectName": object_name + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "if-none-match": kwargs.get("if_none_match", missing), + "opc-client-request-id": kwargs.get("opc_client_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.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + 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) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + + def list_buckets(self, namespace_name, compartment_id, **kwargs): + """ + Gets a list of all BucketSummary items in a compartment. A BucketSummary contains only summary fields for the bucket + and does not contain fields like the user-defined metadata. + + To use this and other API operations, you must be authorized in an IAM policy. If you are not authorized, + talk to an administrator. If you are an administrator who needs to write policies to give users access, see + `Getting Started with Policies`__. + + __ https://docs.cloud.oracle.com/Content/Identity/Concepts/policygetstarted.htm + + + :param str namespace_name: (required) + The Object Storage namespace used for the request. + + :param str compartment_id: (required) + The ID of the compartment in which to list buckets. + + :param int limit: (optional) + The maximum number of items to return. + + :param str page: (optional) + The page at which to start retrieving results. + + :param list[str] fields: (optional) + Bucket summary in list of buckets includes the 'namespace', 'name', 'compartmentId', 'createdBy', 'timeCreated', + and 'etag' fields. This parameter can also include 'tags' (freeformTags and definedTags). The only supported value + of this parameter is 'tags' for now. Example 'tags'. + + Allowed values are: "tags" + + :param str opc_client_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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. 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`. + + :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.object_storage.models.BucketSummary` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/n/{namespaceName}/b" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "limit", + "page", + "fields", "opc_client_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] @@ -1880,7 +2355,212 @@ def list_buckets(self, namespace_name, compartment_id, **kwargs): "list_buckets got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { - "namespaceName": namespace_name + "namespaceName": namespace_name + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + if 'fields' in kwargs: + fields_allowed_values = ["tags"] + for fields_item in kwargs['fields']: + if fields_item not in fields_allowed_values: + raise ValueError( + "Invalid value for `fields`, must be one of {0}".format(fields_allowed_values) + ) + + query_params = { + "compartmentId": compartment_id, + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", missing), + "fields": self.base_client.generate_collection_format_param(kwargs.get("fields", missing), 'csv') + } + 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-client-request-id": kwargs.get("opc_client_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.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + 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[BucketSummary]") + 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[BucketSummary]") + + def list_multipart_upload_parts(self, namespace_name, bucket_name, object_name, upload_id, **kwargs): + """ + Lists the parts of an in-progress multipart upload. + + + :param str namespace_name: (required) + The Object Storage namespace used for the request. + + :param str bucket_name: (required) + The name of the bucket. Avoid entering confidential information. + Example: `my-new-bucket1` + + :param str object_name: (required) + The name of the object. Avoid entering confidential information. + Example: `test/object1.log` + + :param str upload_id: (required) + The upload ID for a multipart upload. + + :param int limit: (optional) + The maximum number of items to return. + + :param str page: (optional) + The page at which to start retrieving results. + + :param str opc_client_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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. 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`. + + :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.object_storage.models.MultipartUploadPartSummary` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/n/{namespaceName}/b/{bucketName}/u/{objectName}" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "limit", + "page", + "opc_client_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_multipart_upload_parts got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "namespaceName": namespace_name, + "bucketName": bucket_name, + "objectName": object_name + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + query_params = { + "uploadId": upload_id, + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", missing) + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-client-request-id": kwargs.get("opc_client_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.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + 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[MultipartUploadPartSummary]") + 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[MultipartUploadPartSummary]") + + def list_multipart_uploads(self, namespace_name, bucket_name, **kwargs): + """ + Lists all of the in-progress multipart uploads for the given bucket in the given Object Storage namespace. + + + :param str namespace_name: (required) + The Object Storage namespace used for the request. + + :param str bucket_name: (required) + The name of the bucket. Avoid entering confidential information. + Example: `my-new-bucket1` + + :param int limit: (optional) + The maximum number of items to return. + + :param str page: (optional) + The page at which to start retrieving results. + + :param str opc_client_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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. 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`. + + :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.object_storage.models.MultipartUpload` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/n/{namespaceName}/b/{bucketName}/u" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "limit", + "page", + "opc_client_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_multipart_uploads got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "namespaceName": namespace_name, + "bucketName": bucket_name } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -1889,19 +2569,9 @@ def list_buckets(self, namespace_name, compartment_id, **kwargs): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) - if 'fields' in kwargs: - fields_allowed_values = ["tags"] - for fields_item in kwargs['fields']: - if fields_item not in fields_allowed_values: - raise ValueError( - "Invalid value for `fields`, must be one of {0}".format(fields_allowed_values) - ) - query_params = { - "compartmentId": compartment_id, "limit": kwargs.get("limit", missing), - "page": kwargs.get("page", missing), - "fields": self.base_client.generate_collection_format_param(kwargs.get("fields", missing), 'csv') + "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} @@ -1924,7 +2594,7 @@ def list_buckets(self, namespace_name, compartment_id, **kwargs): path_params=path_params, query_params=query_params, header_params=header_params, - response_type="list[BucketSummary]") + response_type="list[MultipartUpload]") else: return self.base_client.call_api( resource_path=resource_path, @@ -1932,12 +2602,17 @@ def list_buckets(self, namespace_name, compartment_id, **kwargs): path_params=path_params, query_params=query_params, header_params=header_params, - response_type="list[BucketSummary]") + response_type="list[MultipartUpload]") - def list_multipart_upload_parts(self, namespace_name, bucket_name, object_name, upload_id, **kwargs): + def list_objects(self, namespace_name, bucket_name, **kwargs): """ - List Multipart Upload Parts - Lists the parts of an in-progress multipart upload. + Lists the objects in a bucket. + + To use this and other API operations, you must be authorized in an IAM policy. If you are not authorized, + talk to an administrator. If you are an administrator who needs to write policies to give users access, see + `Getting Started with Policies`__. + + __ https://docs.cloud.oracle.com/Content/Identity/Concepts/policygetstarted.htm :param str namespace_name: (required) @@ -1947,12 +2622,130 @@ def list_multipart_upload_parts(self, namespace_name, bucket_name, object_name, The name of the bucket. Avoid entering confidential information. Example: `my-new-bucket1` - :param str object_name: (required) - The name of the object. Avoid entering confidential information. - Example: `test/object1.log` + :param str prefix: (optional) + The string to use for matching against the start of object names in a list query. - :param str upload_id: (required) - The upload ID for a multipart upload. + :param str start: (optional) + Object names returned by a list query must be greater or equal to this parameter. + + :param str end: (optional) + Object names returned by a list query must be strictly less than this parameter. + + :param int limit: (optional) + The maximum number of items to return. + + :param str delimiter: (optional) + When this parameter is set, only objects whose names do not contain the delimiter character + (after an optionally specified prefix) are returned in the objects key of the response body. + Scanned objects whose names contain the delimiter have the part of their name up to the first + occurrence of the delimiter (including the optional prefix) returned as a set of prefixes. + Note that only '/' is a supported delimiter character at this time. + + :param str fields: (optional) + Object summary in list of objects includes the 'name' field. This parameter can also include 'size' + (object size in bytes), 'etag', 'md5', and 'timeCreated' (object creation date and time) fields. + Value of this parameter should be a comma-separated, case-insensitive list of those field names. + For example 'name,etag,timeCreated,md5'. + + Allowed values are: "name", "size", "etag", "timeCreated", "md5" + + :param str opc_client_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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. 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`. + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.object_storage.models.ListObjects` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/n/{namespaceName}/b/{bucketName}/o" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "prefix", + "start", + "end", + "limit", + "delimiter", + "fields", + "opc_client_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_objects got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "namespaceName": namespace_name, + "bucketName": bucket_name + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + query_params = { + "prefix": kwargs.get("prefix", missing), + "start": kwargs.get("start", missing), + "end": kwargs.get("end", missing), + "limit": kwargs.get("limit", missing), + "delimiter": kwargs.get("delimiter", missing), + "fields": kwargs.get("fields", 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-client-request-id": kwargs.get("opc_client_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.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + 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="ListObjects") + 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="ListObjects") + + def list_preauthenticated_requests(self, namespace_name, bucket_name, **kwargs): + """ + Lists pre-authenticated requests for the bucket. + + + :param str namespace_name: (required) + The Object Storage namespace used for the request. + + :param str bucket_name: (required) + The name of the bucket. Avoid entering confidential information. + Example: `my-new-bucket1` + + :param str object_name_prefix: (optional) + User-specified object name prefixes can be used to query and return a list of pre-authenticated requests. :param int limit: (optional) The maximum number of items to return. @@ -1971,15 +2764,16 @@ def list_multipart_upload_parts(self, namespace_name, bucket_name, object_name, To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. - :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.object_storage.models.MultipartUploadPartSummary` + :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.object_storage.models.PreauthenticatedRequestSummary` :rtype: :class:`~oci.response.Response` """ - resource_path = "/n/{namespaceName}/b/{bucketName}/u/{objectName}" + resource_path = "/n/{namespaceName}/b/{bucketName}/p" method = "GET" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", + "object_name_prefix", "limit", "page", "opc_client_request_id" @@ -1987,12 +2781,11 @@ def list_multipart_upload_parts(self, namespace_name, bucket_name, object_name, extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "list_multipart_upload_parts got unknown kwargs: {!r}".format(extra_kwargs)) + "list_preauthenticated_requests got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "namespaceName": namespace_name, - "bucketName": bucket_name, - "objectName": object_name + "bucketName": bucket_name } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -2002,7 +2795,7 @@ def list_multipart_upload_parts(self, namespace_name, bucket_name, object_name, raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) query_params = { - "uploadId": upload_id, + "objectNamePrefix": kwargs.get("object_name_prefix", missing), "limit": kwargs.get("limit", missing), "page": kwargs.get("page", missing) } @@ -2027,7 +2820,7 @@ def list_multipart_upload_parts(self, namespace_name, bucket_name, object_name, path_params=path_params, query_params=query_params, header_params=header_params, - response_type="list[MultipartUploadPartSummary]") + response_type="list[PreauthenticatedRequestSummary]") else: return self.base_client.call_api( resource_path=resource_path, @@ -2035,12 +2828,11 @@ def list_multipart_upload_parts(self, namespace_name, bucket_name, object_name, path_params=path_params, query_params=query_params, header_params=header_params, - response_type="list[MultipartUploadPartSummary]") + response_type="list[PreauthenticatedRequestSummary]") - def list_multipart_uploads(self, namespace_name, bucket_name, **kwargs): + def list_replication_policies(self, namespace_name, bucket_name, **kwargs): """ - List Multipart Uploads - Lists all of the in-progress multipart uploads for the given bucket in the given Object Storage namespace. + List the replication policies associated with a bucket. :param str namespace_name: (required) @@ -2050,14 +2842,14 @@ def list_multipart_uploads(self, namespace_name, bucket_name, **kwargs): The name of the bucket. Avoid entering confidential information. Example: `my-new-bucket1` - :param int limit: (optional) - The maximum number of items to return. + :param str opc_client_request_id: (optional) + The client request ID for tracing. :param str page: (optional) The page at which to start retrieving results. - :param str opc_client_request_id: (optional) - The client request ID for tracing. + :param int limit: (optional) + The maximum number of items to return. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. @@ -2067,23 +2859,23 @@ def list_multipart_uploads(self, namespace_name, bucket_name, **kwargs): To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. - :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.object_storage.models.MultipartUpload` + :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.object_storage.models.ReplicationPolicySummary` :rtype: :class:`~oci.response.Response` """ - resource_path = "/n/{namespaceName}/b/{bucketName}/u" + resource_path = "/n/{namespaceName}/b/{bucketName}/replicationPolicies" method = "GET" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", - "limit", + "opc_client_request_id", "page", - "opc_client_request_id" + "limit" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "list_multipart_uploads got unknown kwargs: {!r}".format(extra_kwargs)) + "list_replication_policies got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "namespaceName": namespace_name, @@ -2097,8 +2889,8 @@ def list_multipart_uploads(self, namespace_name, bucket_name, **kwargs): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) query_params = { - "limit": kwargs.get("limit", missing), - "page": kwargs.get("page", missing) + "page": kwargs.get("page", missing), + "limit": kwargs.get("limit", missing) } query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} @@ -2121,7 +2913,7 @@ def list_multipart_uploads(self, namespace_name, bucket_name, **kwargs): path_params=path_params, query_params=query_params, header_params=header_params, - response_type="list[MultipartUpload]") + response_type="list[ReplicationPolicySummary]") else: return self.base_client.call_api( resource_path=resource_path, @@ -2129,18 +2921,11 @@ def list_multipart_uploads(self, namespace_name, bucket_name, **kwargs): path_params=path_params, query_params=query_params, header_params=header_params, - response_type="list[MultipartUpload]") + response_type="list[ReplicationPolicySummary]") - def list_objects(self, namespace_name, bucket_name, **kwargs): + def list_replication_sources(self, namespace_name, bucket_name, **kwargs): """ - List Objects - Lists the objects in a bucket. - - To use this and other API operations, you must be authorized in an IAM policy. If you are not authorized, - talk to an administrator. If you are an administrator who needs to write policies to give users access, see - `Getting Started with Policies`__. - - __ https://docs.cloud.oracle.com/Content/Identity/Concepts/policygetstarted.htm + List the replication sources of a destination bucket. :param str namespace_name: (required) @@ -2150,36 +2935,15 @@ def list_objects(self, namespace_name, bucket_name, **kwargs): The name of the bucket. Avoid entering confidential information. Example: `my-new-bucket1` - :param str prefix: (optional) - The string to use for matching against the start of object names in a list query. - - :param str start: (optional) - Object names returned by a list query must be greater or equal to this parameter. + :param str opc_client_request_id: (optional) + The client request ID for tracing. - :param str end: (optional) - Object names returned by a list query must be strictly less than this parameter. + :param str page: (optional) + The page at which to start retrieving results. :param int limit: (optional) The maximum number of items to return. - :param str delimiter: (optional) - When this parameter is set, only objects whose names do not contain the delimiter character - (after an optionally specified prefix) are returned in the objects key of the response body. - Scanned objects whose names contain the delimiter have the part of their name up to the first - occurrence of the delimiter (including the optional prefix) returned as a set of prefixes. - Note that only '/' is a supported delimiter character at this time. - - :param str fields: (optional) - Object summary in list of objects includes the 'name' field. This parameter can also include 'size' - (object size in bytes), 'etag', 'md5', and 'timeCreated' (object creation date and time) fields. - Value of this parameter should be a comma-separated, case-insensitive list of those field names. - For example 'name,etag,timeCreated,md5'. - - Allowed values are: "name", "size", "etag", "timeCreated", "md5" - - :param str opc_client_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. @@ -2188,27 +2952,23 @@ def list_objects(self, namespace_name, bucket_name, **kwargs): To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.object_storage.models.ListObjects` + :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.object_storage.models.ReplicationSource` :rtype: :class:`~oci.response.Response` """ - resource_path = "/n/{namespaceName}/b/{bucketName}/o" + resource_path = "/n/{namespaceName}/b/{bucketName}/replicationSources" method = "GET" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", - "prefix", - "start", - "end", - "limit", - "delimiter", - "fields", - "opc_client_request_id" + "opc_client_request_id", + "page", + "limit" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "list_objects got unknown kwargs: {!r}".format(extra_kwargs)) + "list_replication_sources got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "namespaceName": namespace_name, @@ -2222,12 +2982,8 @@ def list_objects(self, namespace_name, bucket_name, **kwargs): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) query_params = { - "prefix": kwargs.get("prefix", missing), - "start": kwargs.get("start", missing), - "end": kwargs.get("end", missing), - "limit": kwargs.get("limit", missing), - "delimiter": kwargs.get("delimiter", missing), - "fields": kwargs.get("fields", missing) + "page": kwargs.get("page", missing), + "limit": kwargs.get("limit", missing) } query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} @@ -2250,7 +3006,7 @@ def list_objects(self, namespace_name, bucket_name, **kwargs): path_params=path_params, query_params=query_params, header_params=header_params, - response_type="ListObjects") + response_type="list[ReplicationSource]") else: return self.base_client.call_api( resource_path=resource_path, @@ -2258,12 +3014,12 @@ def list_objects(self, namespace_name, bucket_name, **kwargs): path_params=path_params, query_params=query_params, header_params=header_params, - response_type="ListObjects") + response_type="list[ReplicationSource]") - def list_preauthenticated_requests(self, namespace_name, bucket_name, **kwargs): + def list_retention_rules(self, namespace_name, bucket_name, **kwargs): """ - List Preauthenticated Requests - Lists pre-authenticated requests for the bucket. + List the retention rules for a bucket. The retention rules are sorted based on creation time, + with the most recently created retention rule returned first. :param str namespace_name: (required) @@ -2273,18 +3029,9 @@ def list_preauthenticated_requests(self, namespace_name, bucket_name, **kwargs): The name of the bucket. Avoid entering confidential information. Example: `my-new-bucket1` - :param str object_name_prefix: (optional) - User-specified object name prefixes can be used to query and return a list of pre-authenticated requests. - - :param int limit: (optional) - The maximum number of items to return. - :param str page: (optional) The page at which to start retrieving results. - :param str opc_client_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. @@ -2293,24 +3040,21 @@ def list_preauthenticated_requests(self, namespace_name, bucket_name, **kwargs): To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. - :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.object_storage.models.PreauthenticatedRequestSummary` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.object_storage.models.RetentionRuleCollection` :rtype: :class:`~oci.response.Response` """ - resource_path = "/n/{namespaceName}/b/{bucketName}/p" + resource_path = "/n/{namespaceName}/b/{bucketName}/retentionRules" method = "GET" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", - "object_name_prefix", - "limit", - "page", - "opc_client_request_id" + "page" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "list_preauthenticated_requests got unknown kwargs: {!r}".format(extra_kwargs)) + "list_retention_rules got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "namespaceName": namespace_name, @@ -2324,18 +3068,14 @@ def list_preauthenticated_requests(self, namespace_name, bucket_name, **kwargs): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) query_params = { - "objectNamePrefix": kwargs.get("object_name_prefix", 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-client-request-id": kwargs.get("opc_client_request_id", missing) + "content-type": "application/json" } - 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.retry_strategy if kwargs.get('retry_strategy'): @@ -2349,7 +3089,7 @@ def list_preauthenticated_requests(self, namespace_name, bucket_name, **kwargs): path_params=path_params, query_params=query_params, header_params=header_params, - response_type="list[PreauthenticatedRequestSummary]") + response_type="RetentionRuleCollection") else: return self.base_client.call_api( resource_path=resource_path, @@ -2357,11 +3097,10 @@ def list_preauthenticated_requests(self, namespace_name, bucket_name, **kwargs): path_params=path_params, query_params=query_params, header_params=header_params, - response_type="list[PreauthenticatedRequestSummary]") + response_type="RetentionRuleCollection") def list_work_request_errors(self, work_request_id, **kwargs): """ - List Work Request Errors Lists the errors of the work request with the given ID. @@ -2450,7 +3189,6 @@ def list_work_request_errors(self, work_request_id, **kwargs): def list_work_request_logs(self, work_request_id, **kwargs): """ - List Work Request Logs Lists the logs of the work request with the given ID. @@ -2539,7 +3277,6 @@ def list_work_request_logs(self, work_request_id, **kwargs): def list_work_requests(self, compartment_id, **kwargs): """ - List Work Requests Lists the work requests in a compartment. @@ -2615,11 +3352,91 @@ def list_work_requests(self, compartment_id, **kwargs): header_params=header_params, response_type="list[WorkRequestSummary]") + def make_bucket_writable(self, namespace_name, bucket_name, **kwargs): + """ + Stops replication to the destination bucket and removes the replication policy. When the replication + policy was created, this destination bucket became read-only except for new and changed objects replicated + automatically from the source bucket. MakeBucketWritable removes the replication policy. This bucket is no + longer the target for replication and is now writable, allowing users to make changes to bucket contents. + + + :param str namespace_name: (required) + The Object Storage namespace used for the request. + + :param str bucket_name: (required) + The name of the bucket. Avoid entering confidential information. + Example: `my-new-bucket1` + + :param str opc_client_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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. 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`. + + :return: A :class:`~oci.response.Response` object with data of type None + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/n/{namespaceName}/b/{bucketName}/actions/makeBucketWritable" + method = "POST" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "opc_client_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "make_bucket_writable got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "namespaceName": namespace_name, + "bucketName": bucket_name + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-client-request-id": kwargs.get("opc_client_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.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + 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) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + def put_object(self, namespace_name, bucket_name, object_name, put_object_body, **kwargs): """ - PUT Object - Creates a new object or overwrites an existing one. See `Special Instructions for Object Storage - PUT`__ for request signature requirements. + Creates a new object or overwrites an existing object with the same name. The maximum object size allowed by + PutObject is 50 GiB. + + See `Special Instructions for Object Storage PUT`__ + for request signature requirements. __ https://docs.cloud.oracle.com/Content/API/Concepts/signingrequests.htm#ObjectStoragePut @@ -2657,26 +3474,43 @@ def put_object(self, namespace_name, bucket_name, object_name, put_object_body, 100-continue :param str content_md5: (optional) - The base-64 encoded MD5 hash of the body. If the Content-MD5 header is present, Object Storage performs an integrity check - on the body of the HTTP request by computing the MD5 hash for the body and comparing it to the MD5 hash supplied in the header. - If the two hashes do not match, the object is rejected and an HTTP-400 Unmatched Content MD5 error is returned with the message: + The optional base-64 header that defines the encoded MD5 hash of the body. If the optional Content-MD5 header is present, Object + Storage performs an integrity check on the body of the HTTP request by computing the MD5 hash for the body and comparing it to the + MD5 hash supplied in the header. If the two hashes do not match, the object is rejected and an HTTP-400 Unmatched Content MD5 error + is returned with the message: \"The computed MD5 of the request body (ACTUAL_MD5) does not match the Content-MD5 header (HEADER_MD5)\" :param str content_type: (optional) - The content type of the object. Defaults to 'application/octet-stream' if not overridden during the PutObject call. + The optional Content-Type header that defines the standard MIME type format of the object. Content type defaults to + 'application/octet-stream' if not specified in the PutObject call. Specifying values for this header has no effect + on Object Storage behavior. Programs that read the object determine what to do based on the value provided. For example, + you could use this header to identify and perform special operations on text only objects. :param str content_language: (optional) - The content language of the object. + The optional Content-Language header that defines the content language of the object to upload. Specifying + values for this header has no effect on Object Storage behavior. Programs that read the object determine what + to do based on the value provided. For example, you could use this header to identify and differentiate objects + based on a particular language. :param str content_encoding: (optional) - The content encoding of the object. + The optional Content-Encoding header that defines the content encodings that were applied to the object to + upload. Specifying values for this header has no effect on Object Storage behavior. Programs that read the + object determine what to do based on the value provided. For example, you could use this header to determine + what decoding mechanisms need to be applied to obtain the media-type specified by the Content-Type header of + the object. :param str content_disposition: (optional) - The Content-Disposition header value to be returned in GetObjectReponse. + The optional Content-Disposition header that defines presentational information for the object to be + returned in GetObject and HeadObject responses. Specifying values for this header has no effect on Object + Storage behavior. Programs that read the object determine what to do based on the value provided. + For example, you could use this header to let users download objects with custom filenames in a browser. :param str cache_control: (optional) - The cache-control header value to be returned in GetObjectReponse. + The optional Cache-Control header that defines the caching behavior value to be returned in GetObject and + HeadObject responses. Specifying values for this header has no effect on Object Storage behavior. Programs + that read the object determine what to do based on the value provided. + For example, you could use this header to identify objects that require caching restrictions. :param dict(str, str) opc_meta: (optional) Optional user-defined metadata key and value. @@ -2791,7 +3625,6 @@ def put_object(self, namespace_name, bucket_name, object_name, put_object_body, def put_object_lifecycle_policy(self, namespace_name, bucket_name, put_object_lifecycle_policy_details, **kwargs): """ - Put object lifecycle policy. Creates or replaces the object lifecycle policy for the bucket. @@ -2887,7 +3720,6 @@ def put_object_lifecycle_policy(self, namespace_name, bucket_name, put_object_li def reencrypt_bucket(self, namespace_name, bucket_name, **kwargs): """ - Re-encrypt Bucket Data Encryption Key Re-encrypts the unique data encryption key that encrypts each object written to the bucket by using the most recent version of the master encryption key assigned to the bucket. (All data encryption keys are encrypted by a master encryption key. Master encryption keys are assigned to buckets and managed by Oracle by default, but you can assign @@ -2976,7 +3808,6 @@ def reencrypt_bucket(self, namespace_name, bucket_name, **kwargs): def rename_object(self, namespace_name, bucket_name, rename_object_details, **kwargs): """ - Rename Object Rename an object in the given Object Storage namespace. @@ -3057,7 +3888,6 @@ def rename_object(self, namespace_name, bucket_name, rename_object_details, **kw def restore_objects(self, namespace_name, bucket_name, restore_objects_details, **kwargs): """ - Restore Objects Restores one or more objects specified by the objectName parameter. By default objects will be restored for 24 hours. Duration can be configured using the hours parameter. @@ -3139,7 +3969,6 @@ def restore_objects(self, namespace_name, bucket_name, restore_objects_details, def update_bucket(self, namespace_name, bucket_name, update_bucket_details, **kwargs): """ - POST Bucket Performs a partial or full update of a bucket's user-defined metadata. Use UpdateBucket to move a bucket from one compartment to another within the same tenancy. Supply the compartmentID @@ -3234,7 +4063,6 @@ def update_bucket(self, namespace_name, bucket_name, update_bucket_details, **kw def update_namespace_metadata(self, namespace_name, update_namespace_metadata_details, **kwargs): """ - PUT Namespace By default, buckets created using the Amazon S3 Compatibility API or the Swift API are created in the root compartment of the Oracle Cloud Infrastructure tenancy. @@ -3316,9 +4144,100 @@ def update_namespace_metadata(self, namespace_name, update_namespace_metadata_de body=update_namespace_metadata_details, response_type="NamespaceMetadata") + def update_retention_rule(self, namespace_name, bucket_name, retention_rule_id, update_retention_rule_details, **kwargs): + """ + Updates the specified retention rule. Rule changes take effect typically within 30 seconds. + + + :param str namespace_name: (required) + The Object Storage namespace used for the request. + + :param str bucket_name: (required) + The name of the bucket. Avoid entering confidential information. + Example: `my-new-bucket1` + + :param str retention_rule_id: (required) + The ID of the retention rule. + + :param UpdateRetentionRuleDetails update_retention_rule_details: (required) + Request object for updating the retention rule. + + :param str if_match: (optional) + The entity tag (ETag) to match. For creating and committing a multipart upload to an object, this is the entity tag of the target object. + For uploading a part, this is the entity tag of the target part. + + :param str opc_client_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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. 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`. + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.object_storage.models.RetentionRule` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/n/{namespaceName}/b/{bucketName}/retentionRules/{retentionRuleId}" + method = "PUT" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "if_match", + "opc_client_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "update_retention_rule got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "namespaceName": namespace_name, + "bucketName": bucket_name, + "retentionRuleId": retention_rule_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('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "opc-client-request-id": kwargs.get("opc_client_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.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + 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_retention_rule_details, + response_type="RetentionRule") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=update_retention_rule_details, + response_type="RetentionRule") + def upload_part(self, namespace_name, bucket_name, object_name, upload_id, upload_part_num, upload_part_body, **kwargs): """ - Upload Multipart Object Part Uploads a single part of a multipart upload. @@ -3361,9 +4280,10 @@ def upload_part(self, namespace_name, bucket_name, object_name, upload_id, uploa 100-continue :param str content_md5: (optional) - The base-64 encoded MD5 hash of the body. If the Content-MD5 header is present, Object Storage performs an integrity check - on the body of the HTTP request by computing the MD5 hash for the body and comparing it to the MD5 hash supplied in the header. - If the two hashes do not match, the object is rejected and an HTTP-400 Unmatched Content MD5 error is returned with the message: + The optional base-64 header that defines the encoded MD5 hash of the body. If the optional Content-MD5 header is present, Object + Storage performs an integrity check on the body of the HTTP request by computing the MD5 hash for the body and comparing it to the + MD5 hash supplied in the header. If the two hashes do not match, the object is rejected and an HTTP-400 Unmatched Content MD5 error + is returned with the message: \"The computed MD5 of the request body (ACTUAL_MD5) does not match the Content-MD5 header (HEADER_MD5)\" diff --git a/src/oci/oce/oce_instance_client.py b/src/oci/oce/oce_instance_client.py index ec0de0a2e2..d9384ea112 100644 --- a/src/oci/oce/oce_instance_client.py +++ b/src/oci/oce/oce_instance_client.py @@ -82,7 +82,6 @@ def __init__(self, config, **kwargs): def change_oce_instance_compartment(self, oce_instance_id, change_oce_instance_compartment_details, **kwargs): """ - Moves a OceInstance into a different compartment. When provided, If-Match is checked against ETag values of the OceInstance. Moves a OceInstance into a different compartment @@ -178,7 +177,6 @@ def change_oce_instance_compartment(self, oce_instance_id, change_oce_instance_c def create_oce_instance(self, create_oce_instance_details, **kwargs): """ - Creates a new OceInstance Creates a new OceInstance. @@ -250,7 +248,6 @@ def create_oce_instance(self, create_oce_instance_details, **kwargs): def delete_oce_instance(self, oce_instance_id, **kwargs): """ - Delete a provisioned OceInstance Deletes a OceInstance resource by identifier @@ -330,7 +327,6 @@ def delete_oce_instance(self, oce_instance_id, **kwargs): def get_oce_instance(self, oce_instance_id, **kwargs): """ - Get OceInstance Gets a OceInstance by identifier @@ -403,7 +399,6 @@ def get_oce_instance(self, oce_instance_id, **kwargs): def get_work_request(self, work_request_id, **kwargs): """ - GET Work Request Status Gets the status of the work request with the given ID. @@ -476,7 +471,6 @@ def get_work_request(self, work_request_id, **kwargs): def list_oce_instances(self, compartment_id, **kwargs): """ - Gets a list of all OceInstances in a compartment Returns a list of OceInstances. @@ -603,7 +597,6 @@ def list_oce_instances(self, compartment_id, **kwargs): def list_work_request_errors(self, work_request_id, **kwargs): """ - Lists work request errors Return a (paginated) list of errors for a given work request. @@ -692,7 +685,6 @@ def list_work_request_errors(self, work_request_id, **kwargs): def list_work_request_logs(self, work_request_id, **kwargs): """ - Lists work request logs Return a (paginated) list of logs for a given work request. @@ -781,7 +773,6 @@ def list_work_request_logs(self, work_request_id, **kwargs): def list_work_requests(self, compartment_id, **kwargs): """ - List Work Requests Lists the work requests in a compartment. @@ -864,7 +855,6 @@ def list_work_requests(self, compartment_id, **kwargs): def update_oce_instance(self, oce_instance_id, update_oce_instance_details, **kwargs): """ - Update the OceInstance identified by the id Updates the OceInstance diff --git a/src/oci/oda/oda_client.py b/src/oci/oda/oda_client.py index f6b6b37b3b..f907de6ce6 100644 --- a/src/oci/oda/oda_client.py +++ b/src/oci/oda/oda_client.py @@ -82,7 +82,6 @@ def __init__(self, config, **kwargs): def change_oda_instance_compartment(self, oda_instance_id, change_oda_instance_compartment_details, **kwargs): """ - Moves an Digital Assistant instance into a different compartment. Moves an Digital Assistant instance into a different compartment. When provided, If-Match is checked against ETag values of the resource. @@ -181,7 +180,6 @@ def change_oda_instance_compartment(self, oda_instance_id, change_oda_instance_c def create_oda_instance(self, create_oda_instance_details, **kwargs): """ - Create Digital Assistant Instance Starts an asynchronous job to create a Digital Assistant instance. To monitor the status of the job, take the `opc-work-request-id` response @@ -259,7 +257,6 @@ def create_oda_instance(self, create_oda_instance_details, **kwargs): def delete_oda_instance(self, oda_instance_id, **kwargs): """ - Delete Digital Assistant Instance Starts an asynchronous job to delete the specified Digital Assistant instance. To monitor the status of the job, take the `opc-work-request-id` response header value and use it to call `GET /workRequests/{workRequestID}`. @@ -341,7 +338,6 @@ def delete_oda_instance(self, oda_instance_id, **kwargs): def get_oda_instance(self, oda_instance_id, **kwargs): """ - Get Digital Assistant Instance Gets the specified Digital Assistant instance. @@ -414,7 +410,6 @@ def get_oda_instance(self, oda_instance_id, **kwargs): def get_work_request(self, work_request_id, **kwargs): """ - Get Work Request Gets information about the work request with the specified ID, including its status. You can use this operation to monitor the status of jobs that you @@ -490,7 +485,6 @@ def get_work_request(self, work_request_id, **kwargs): def list_oda_instances(self, compartment_id, **kwargs): """ - Get Compartment's Digital Assistant Instances Returns a page of Digital Assistant instances that belong to the specified compartment. @@ -629,7 +623,6 @@ def list_oda_instances(self, compartment_id, **kwargs): def list_work_request_errors(self, work_request_id, **kwargs): """ - List Work Request Errors Returns a page of errors for the specified work request. If the `opc-next-page` header appears in the response, then @@ -757,7 +750,6 @@ def list_work_request_errors(self, work_request_id, **kwargs): def list_work_request_logs(self, work_request_id, **kwargs): """ - List Work Request Log Messages Returns a page of of log messages for a given work request. If the `opc-next-page` header appears in the response, then @@ -885,7 +877,6 @@ def list_work_request_logs(self, work_request_id, **kwargs): def list_work_requests(self, compartment_id, **kwargs): """ - List Compartment's Work Requests Returns a page of work requests for the specified compartment. If the `opc-next-page` header appears in the response, then @@ -1007,7 +998,6 @@ def list_work_requests(self, compartment_id, **kwargs): def start_oda_instance(self, oda_instance_id, **kwargs): """ - Starts an inactive Digital Assistant instance. Starts an inactive Digital Assistant instance. Once active, the instance will be accessible and metering of requests will be started again. @@ -1101,7 +1091,6 @@ def start_oda_instance(self, oda_instance_id, **kwargs): def stop_oda_instance(self, oda_instance_id, **kwargs): """ - Stops an active Digital Assistant instance. Stops an active Digital Assistant instance. Once inactive, the instance will not be accessible and metering of requests will be stopped until the instance is started again. Data associated with the instance is not affected. @@ -1196,7 +1185,6 @@ def stop_oda_instance(self, oda_instance_id, **kwargs): def update_oda_instance(self, oda_instance_id, update_oda_instance_details, **kwargs): """ - Update Digital Assistant Instance Updates the specified Digital Assistant instance with the information in the request body. diff --git a/src/oci/os_management/os_management_client.py b/src/oci/os_management/os_management_client.py index 9e62f3475e..5a5fefe980 100644 --- a/src/oci/os_management/os_management_client.py +++ b/src/oci/os_management/os_management_client.py @@ -82,7 +82,6 @@ def __init__(self, config, **kwargs): def add_packages_to_software_source(self, software_source_id, add_packages_to_software_source_details, **kwargs): """ - Adds packages to a Software Source Adds a given list of Software Packages to a specific Software Source. @@ -158,7 +157,6 @@ def add_packages_to_software_source(self, software_source_id, add_packages_to_so def attach_child_software_source_to_managed_instance(self, managed_instance_id, attach_child_software_source_to_managed_instance_details, **kwargs): """ - Add a software source to a managed instance Adds a child software source to a managed instance. After the software source has been added, then packages from that software source can be installed on the managed instance. @@ -247,7 +245,6 @@ def attach_child_software_source_to_managed_instance(self, managed_instance_id, def attach_managed_instance_to_managed_instance_group(self, managed_instance_group_id, managed_instance_id, **kwargs): """ - Add a Managed Instance to a Managed Instance Group Adds a Managed Instance to a Managed Instance Group. After the Managed Instance has been added, then operations can be performed on the Managed Instance Group which will then apply to all Managed Instances in the @@ -342,7 +339,6 @@ def attach_managed_instance_to_managed_instance_group(self, managed_instance_gro def attach_parent_software_source_to_managed_instance(self, managed_instance_id, attach_parent_software_source_to_managed_instance_details, **kwargs): """ - Add a software source to a managed instance Adds a parent software source to a managed instance. After the software source has been added, then packages from that software source can be installed on the managed instance. Software sources that have this @@ -432,7 +428,6 @@ def attach_parent_software_source_to_managed_instance(self, managed_instance_id, def change_managed_instance_group_compartment(self, managed_instance_group_id, change_managed_instance_group_compartment_details, **kwargs): """ - Moves a resource into a different compartment Moves a resource into a different compartment. When provided, If-Match is checked against ETag values of the resource. @@ -529,7 +524,6 @@ def change_managed_instance_group_compartment(self, managed_instance_group_id, c def change_scheduled_job_compartment(self, scheduled_job_id, change_scheduled_job_compartment_details, **kwargs): """ - Moves a resource into a different compartment Moves a resource into a different compartment. When provided, If-Match is checked against ETag values of the resource. @@ -626,7 +620,6 @@ def change_scheduled_job_compartment(self, scheduled_job_id, change_scheduled_jo def change_software_source_compartment(self, software_source_id, change_software_source_compartment_details, **kwargs): """ - Moves a resource into a different compartment Moves a resource into a different compartment. When provided, If-Match is checked against ETag values of the resource. @@ -723,7 +716,6 @@ def change_software_source_compartment(self, software_source_id, change_software def create_managed_instance_group(self, create_managed_instance_group_details, **kwargs): """ - Create a Managed Instance Group Creates a new Managed Instance Group on the management system. This will not contain any managed instances after it is first created, and they must be added later. @@ -799,7 +791,6 @@ def create_managed_instance_group(self, create_managed_instance_group_details, * def create_scheduled_job(self, create_scheduled_job_details, **kwargs): """ - Create a Scheduled Job Creates a new Scheduled Job to perform a specific package operation on a set of managed instances or managed instance groups. Can be created as a one-time execution in the future, or as a recurring execution @@ -876,7 +867,6 @@ def create_scheduled_job(self, create_scheduled_job_details, **kwargs): def create_software_source(self, create_software_source_details, **kwargs): """ - Create a custom Software Source Creates a new custom Software Source on the management system. This will not contain any packages after it is first created, and they must be added later. @@ -952,7 +942,6 @@ def create_software_source(self, create_software_source_details, **kwargs): def delete_managed_instance_group(self, managed_instance_group_id, **kwargs): """ - Delete a Managed Instance Group Deletes a Managed Instance Group from the management system @@ -1032,7 +1021,6 @@ def delete_managed_instance_group(self, managed_instance_group_id, **kwargs): def delete_scheduled_job(self, scheduled_job_id, **kwargs): """ - Cancel (delete) a Scheduled Job Cancels an existing Scheduled Job on the management system @@ -1112,7 +1100,6 @@ def delete_scheduled_job(self, scheduled_job_id, **kwargs): def delete_software_source(self, software_source_id, **kwargs): """ - Delete a custom Software Source Deletes a custom Software Source on the management system @@ -1192,7 +1179,6 @@ def delete_software_source(self, software_source_id, **kwargs): def detach_child_software_source_from_managed_instance(self, managed_instance_id, detach_child_software_source_from_managed_instance_details, **kwargs): """ - Removes a child software source from a managed instance Removes a child software source from a managed instance. Packages will no longer be able to be installed from these software sources. @@ -1280,7 +1266,6 @@ def detach_child_software_source_from_managed_instance(self, managed_instance_id def detach_managed_instance_from_managed_instance_group(self, managed_instance_group_id, managed_instance_id, **kwargs): """ - Removes a Managed Instance from a Managed Instance Group Removes a Managed Instance from a Managed Instance Group. @@ -1372,7 +1357,6 @@ def detach_managed_instance_from_managed_instance_group(self, managed_instance_g def detach_parent_software_source_from_managed_instance(self, managed_instance_id, detach_parent_software_source_from_managed_instance_details, **kwargs): """ - Removes a parent software source from a managed instance Removes a software source from a managed instance. All child software sources will also be removed from the managed instance. Packages will no longer be able to be installed from these software sources. @@ -1460,7 +1444,6 @@ def detach_parent_software_source_from_managed_instance(self, managed_instance_i def get_erratum(self, erratum_id, **kwargs): """ - Gets an erratum by identifier Returns a specific erratum. @@ -1533,7 +1516,6 @@ def get_erratum(self, erratum_id, **kwargs): def get_managed_instance(self, managed_instance_id, **kwargs): """ - Gets a Managed Instance by identifier Returns a specific Managed Instance. @@ -1606,7 +1588,6 @@ def get_managed_instance(self, managed_instance_id, **kwargs): def get_managed_instance_group(self, managed_instance_group_id, **kwargs): """ - Gets the details for a Managed Instance Group Returns a specific Managed Instance Group. @@ -1679,7 +1660,6 @@ def get_managed_instance_group(self, managed_instance_group_id, **kwargs): def get_scheduled_job(self, scheduled_job_id, **kwargs): """ - Gets a Scheduled Job Gets the detailed information for the Scheduled Job with the given ID. @@ -1752,7 +1732,6 @@ def get_scheduled_job(self, scheduled_job_id, **kwargs): def get_software_package(self, software_source_id, software_package_name, **kwargs): """ - Gets a Software Package by identifier Returns a specific Software Package. @@ -1829,7 +1808,6 @@ def get_software_package(self, software_source_id, software_package_name, **kwar def get_software_source(self, software_source_id, **kwargs): """ - Gets a Software Source by identifier Returns a specific Software Source. @@ -1902,7 +1880,6 @@ def get_software_source(self, software_source_id, **kwargs): def get_work_request(self, work_request_id, **kwargs): """ - Get Work Request Gets the detailed information for the work request with the given ID. @@ -1975,7 +1952,6 @@ def get_work_request(self, work_request_id, **kwargs): def install_all_package_updates_on_managed_instance(self, managed_instance_id, **kwargs): """ - Update all packages on a managed instance Install all of the available package updates for the managed instance. @@ -2057,7 +2033,6 @@ def install_all_package_updates_on_managed_instance(self, managed_instance_id, * def install_package_on_managed_instance(self, managed_instance_id, software_package_name, **kwargs): """ - Install a package on a managed instance Installs a package on a managed instance. @@ -2149,7 +2124,6 @@ def install_package_on_managed_instance(self, managed_instance_id, software_pack def install_package_update_on_managed_instance(self, managed_instance_id, software_package_name, **kwargs): """ - Update a package on a managed instance Updates a package on a managed instance. @@ -2241,7 +2215,6 @@ def install_package_update_on_managed_instance(self, managed_instance_id, softwa def list_available_packages_for_managed_instance(self, managed_instance_id, **kwargs): """ - Gets a list of all packages available for install on the Managed Instance Returns a list of packages available for install on the Managed Instance. @@ -2370,7 +2343,6 @@ def list_available_packages_for_managed_instance(self, managed_instance_id, **kw def list_available_software_sources_for_managed_instance(self, managed_instance_id, **kwargs): """ - Gets a list of all software sources available for the Managed Instance. These only include software sources that are not already added to the managed instance, but can be added. Returns a list of available software sources for a Managed Instance. @@ -2499,7 +2471,6 @@ def list_available_software_sources_for_managed_instance(self, managed_instance_ def list_available_updates_for_managed_instance(self, managed_instance_id, **kwargs): """ - Gets a list of all updates available for the Managed Instance Returns a list of available updates for a Managed Instance. @@ -2628,7 +2599,6 @@ def list_available_updates_for_managed_instance(self, managed_instance_id, **kwa def list_managed_instance_groups(self, compartment_id, **kwargs): """ - Gets a list of all Managed Instance Groups Returns a list of all Managed Instance Groups. @@ -2755,7 +2725,6 @@ def list_managed_instance_groups(self, compartment_id, **kwargs): def list_managed_instances(self, compartment_id, **kwargs): """ - Gets a list of all Managed Instances Returns a list of all Managed Instances. @@ -2868,7 +2837,6 @@ def list_managed_instances(self, compartment_id, **kwargs): def list_packages_installed_on_managed_instance(self, managed_instance_id, **kwargs): """ - Gets a list of all packages installed on the Managed Instance Returns a list of installed packages on the Managed Instance. @@ -2997,7 +2965,6 @@ def list_packages_installed_on_managed_instance(self, managed_instance_id, **kwa def list_scheduled_jobs(self, compartment_id, **kwargs): """ - Gets a list of the current Scheduled Jobs Returns a list of all of the currently active Scheduled Jobs in the system @@ -3148,7 +3115,6 @@ def list_scheduled_jobs(self, compartment_id, **kwargs): def list_software_source_packages(self, software_source_id, **kwargs): """ - Lists Software Packages Lists Software Packages in a Software Source @@ -3277,7 +3243,6 @@ def list_software_source_packages(self, software_source_id, **kwargs): def list_software_sources(self, compartment_id, **kwargs): """ - Gets a list of all Software Sources Returns a list of all Software Sources. @@ -3404,7 +3369,6 @@ def list_software_sources(self, compartment_id, **kwargs): def list_upcoming_scheduled_jobs(self, compartment_id, time_end, **kwargs): """ - Gets a list of the upcoming Scheduled Jobs Returns a list of all of the Scheduled Jobs whose next execution time is at or before the specified time. @@ -3547,7 +3511,6 @@ def list_upcoming_scheduled_jobs(self, compartment_id, time_end, **kwargs): def list_work_request_errors(self, work_request_id, **kwargs): """ - List Work Request Errors Gets the errors for the work request with the given ID. @@ -3664,7 +3627,6 @@ def list_work_request_errors(self, work_request_id, **kwargs): def list_work_request_logs(self, work_request_id, **kwargs): """ - List Work Request Logs Lists the log entries for the work request with the given ID. @@ -3781,7 +3743,6 @@ def list_work_request_logs(self, work_request_id, **kwargs): def list_work_requests(self, compartment_id, **kwargs): """ - List Work Requests Lists the work requests in a compartment. @@ -3899,7 +3860,6 @@ def list_work_requests(self, compartment_id, **kwargs): def remove_package_from_managed_instance(self, managed_instance_id, software_package_name, **kwargs): """ - Removes a package from a managed instance Removes an installed package from a managed instance. @@ -3991,7 +3951,6 @@ def remove_package_from_managed_instance(self, managed_instance_id, software_pac def remove_packages_from_software_source(self, software_source_id, remove_packages_from_software_source_details, **kwargs): """ - Removes packages from a Software Source Removes a given list of Software Packages from a specific Software Source. @@ -4067,7 +4026,6 @@ def remove_packages_from_software_source(self, software_source_id, remove_packag def run_scheduled_job_now(self, scheduled_job_id, **kwargs): """ - Triggers a Scheduled Job to execute immediately This will trigger an already created Scheduled Job to being executing immediately instead of waiting for its next regularly scheduled time. @@ -4159,7 +4117,6 @@ def run_scheduled_job_now(self, scheduled_job_id, **kwargs): def search_software_packages(self, **kwargs): """ - Search Software Packages Searches all of the available Software Sources and returns any/all Software Packages matching the search criteria. @@ -4280,7 +4237,6 @@ def search_software_packages(self, **kwargs): def skip_next_scheduled_job_execution(self, scheduled_job_id, **kwargs): """ - Forces a Scheduled Job to skip its next execution This will force an already created Scheduled Job to skip its next regularly scheduled execution @@ -4372,7 +4328,6 @@ def skip_next_scheduled_job_execution(self, scheduled_job_id, **kwargs): def update_managed_instance_group(self, managed_instance_group_id, update_managed_instance_group_details, **kwargs): """ - Updates the Managed Instance Group identified by the id Updates a specific Managed Instance Group. @@ -4459,7 +4414,6 @@ def update_managed_instance_group(self, managed_instance_group_id, update_manage def update_scheduled_job(self, scheduled_job_id, update_scheduled_job_details, **kwargs): """ - Update the Scheduled Job identified by the id Updates an existing Scheduled Job on the management system. @@ -4546,7 +4500,6 @@ def update_scheduled_job(self, scheduled_job_id, update_scheduled_job_details, * def update_software_source(self, software_source_id, update_software_source_details, **kwargs): """ - Update the custom Software Source identified by the id Updates an existing custom Software Source on the management system. diff --git a/src/oci/resource_manager/resource_manager_client.py b/src/oci/resource_manager/resource_manager_client.py index b6c7cbb87b..e1f6691a22 100644 --- a/src/oci/resource_manager/resource_manager_client.py +++ b/src/oci/resource_manager/resource_manager_client.py @@ -82,7 +82,6 @@ def __init__(self, config, **kwargs): def cancel_job(self, job_id, **kwargs): """ - Cancel a Job Indicates the intention to cancel the specified job. Cancellation of the job is not immediate, and may be delayed, or may not happen at all. @@ -165,7 +164,6 @@ def cancel_job(self, job_id, **kwargs): def change_stack_compartment(self, stack_id, change_stack_compartment_details, **kwargs): """ - Moves a Stack and it's associated Jobs into a different compartment. When provided, If-Match is checked against ETag values of the Stack. Moves a Stack and it's associated Jobs into a different compartment. @@ -262,7 +260,6 @@ def change_stack_compartment(self, stack_id, change_stack_compartment_details, * def create_job(self, create_job_details, **kwargs): """ - Create a Job. Creates a job. @@ -337,7 +334,6 @@ def create_job(self, create_job_details, **kwargs): def create_stack(self, create_stack_details, **kwargs): """ - Creates a Stack. Creates a stack in the specified comparment. Specify the compartment using the compartment ID. For more information, see `Create a Stack`__. @@ -416,7 +412,6 @@ def create_stack(self, create_stack_details, **kwargs): def delete_stack(self, stack_id, **kwargs): """ - Deletes a stack Deletes the specified stack object. @@ -497,7 +492,6 @@ def delete_stack(self, stack_id, **kwargs): def get_job(self, job_id, **kwargs): """ - Get details of a specific job. Returns the specified job along with the job details. @@ -573,7 +567,6 @@ def get_job(self, job_id, **kwargs): def get_job_logs(self, job_id, **kwargs): """ - Gets log entries for a job Returns log entries for the specified job in JSON format. @@ -714,7 +707,6 @@ def get_job_logs(self, job_id, **kwargs): def get_job_logs_content(self, job_id, **kwargs): """ - Gets the raw logs for a job. Returns raw log file for the specified job in text format. Returns a maximum of 100,000 log entries. @@ -791,7 +783,6 @@ def get_job_logs_content(self, job_id, **kwargs): def get_job_tf_config(self, job_id, **kwargs): """ - Get zipped Terraform configuration used for a specific job. Returns the Terraform configuration file for the specified job in .zip format. Returns an error if no zip file is found. @@ -868,7 +859,6 @@ def get_job_tf_config(self, job_id, **kwargs): def get_job_tf_state(self, job_id, **kwargs): """ - Get Terraform state output from a specified job. Returns the Terraform state for the specified job. @@ -944,7 +934,6 @@ def get_job_tf_state(self, job_id, **kwargs): def get_stack(self, stack_id, **kwargs): """ - Gets a stack by ID. Gets a stack using the stack ID. @@ -1020,7 +1009,6 @@ def get_stack(self, stack_id, **kwargs): def get_stack_tf_config(self, stack_id, **kwargs): """ - Gets the stack's zipped Terraform configuration Returns the Terraform configuration file in .zip format for the specified stack. Returns an error if no zip file is found. @@ -1097,7 +1085,6 @@ def get_stack_tf_config(self, stack_id, **kwargs): def get_stack_tf_state(self, stack_id, **kwargs): """ - Get Terraform state of the specified stack. Returns the Terraform state for the specified stack. @@ -1173,7 +1160,6 @@ def get_stack_tf_state(self, stack_id, **kwargs): def get_work_request(self, work_request_id, **kwargs): """ - Get Work Request Return the given work request. @@ -1249,7 +1235,6 @@ def get_work_request(self, work_request_id, **kwargs): def list_jobs(self, **kwargs): """ - List all jobs related to a stack or compartment. By default, the list is ordered by time created.\nYou can alter the ordering by using `SortByQueryParam` and `SortOrderQueryParam`.\n Returns a list of jobs in a stack or compartment, ordered by time created. - To list all jobs in a stack, provide the stack `OCID`__. @@ -1417,7 +1402,6 @@ def list_jobs(self, **kwargs): def list_stacks(self, **kwargs): """ - Returns a stack or list of stacks. Returns a list of stacks. - If called using the compartment ID, returns all stacks in the specified compartment. - If called using the stack ID, returns the specified stack. @@ -1570,7 +1554,6 @@ def list_stacks(self, **kwargs): def list_terraform_versions(self, **kwargs): """ - Lists supported Terraform versions. Returns a list of supported Terraform versions for use with stacks. @@ -1642,7 +1625,6 @@ def list_terraform_versions(self, **kwargs): def list_work_request_errors(self, work_request_id, **kwargs): """ - Lists work request errors Return a (paginated) list of errors for a given work request. @@ -1761,7 +1743,6 @@ def list_work_request_errors(self, work_request_id, **kwargs): def list_work_request_logs(self, work_request_id, **kwargs): """ - Lists work request logs Return a (paginated) list of logs for a given work request. @@ -1880,7 +1861,6 @@ def list_work_request_logs(self, work_request_id, **kwargs): def list_work_requests(self, compartment_id, **kwargs): """ - Lists work requests Lists the work requests in a given compartment or for a given resource. @@ -1974,7 +1954,6 @@ def list_work_requests(self, compartment_id, **kwargs): def update_job(self, job_id, update_job_details, **kwargs): """ - Update a Job. Updates the specified job. @@ -2062,7 +2041,6 @@ def update_job(self, job_id, update_job_details, **kwargs): def update_stack(self, stack_id, update_stack_details, **kwargs): """ - Updates a stack Updates the specified stack object. Use `UpdateStack` when you update your Terraform configuration and want your changes to be reflected in the execution plan. diff --git a/src/oci/resource_search/resource_search_client.py b/src/oci/resource_search/resource_search_client.py index f285c7e354..68c5d4a574 100644 --- a/src/oci/resource_search/resource_search_client.py +++ b/src/oci/resource_search/resource_search_client.py @@ -82,7 +82,6 @@ def __init__(self, config, **kwargs): def get_resource_type(self, name, **kwargs): """ - Gets the resource type definition. Gets detailed information about a resource type by using the resource type name. @@ -156,7 +155,6 @@ def get_resource_type(self, name, **kwargs): def list_resource_types(self, **kwargs): """ - Lists the types of resources available for querying. Lists all resource types that you can search or query for. @@ -231,7 +229,6 @@ def list_resource_types(self, **kwargs): def search_resources(self, search_details, **kwargs): """ - Finds resources in your cloud network. Queries any and all compartments in the tenancy to find resources that match the specified criteria. Results include resources that you have permission to view and can span different resource types. You can also sort results based on a specified resource attribute. diff --git a/src/oci/secrets/__init__.py b/src/oci/secrets/__init__.py new file mode 100644 index 0000000000..df165d09ec --- /dev/null +++ b/src/oci/secrets/__init__.py @@ -0,0 +1,11 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + +from __future__ import absolute_import + + +from .secrets_client import SecretsClient +from .secrets_client_composite_operations import SecretsClientCompositeOperations +from . import models + +__all__ = ["SecretsClient", "SecretsClientCompositeOperations", "models"] diff --git a/src/oci/secrets/models/__init__.py b/src/oci/secrets/models/__init__.py new file mode 100644 index 0000000000..e4c7aa179f --- /dev/null +++ b/src/oci/secrets/models/__init__.py @@ -0,0 +1,17 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + +from __future__ import absolute_import + +from .base64_secret_bundle_content_details import Base64SecretBundleContentDetails +from .secret_bundle import SecretBundle +from .secret_bundle_content_details import SecretBundleContentDetails +from .secret_bundle_version_summary import SecretBundleVersionSummary + +# Maps type names to classes for secrets services. +secrets_type_mapping = { + "Base64SecretBundleContentDetails": Base64SecretBundleContentDetails, + "SecretBundle": SecretBundle, + "SecretBundleContentDetails": SecretBundleContentDetails, + "SecretBundleVersionSummary": SecretBundleVersionSummary +} diff --git a/src/oci/secrets/models/base64_secret_bundle_content_details.py b/src/oci/secrets/models/base64_secret_bundle_content_details.py new file mode 100644 index 0000000000..5db38c25f2 --- /dev/null +++ b/src/oci/secrets/models/base64_secret_bundle_content_details.py @@ -0,0 +1,79 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + +from .secret_bundle_content_details import SecretBundleContentDetails +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 Base64SecretBundleContentDetails(SecretBundleContentDetails): + """ + The contents of the secret. + """ + + def __init__(self, **kwargs): + """ + Initializes a new Base64SecretBundleContentDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.secrets.models.Base64SecretBundleContentDetails.content_type` attribute + of this class is ``BASE64`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param content_type: + The value to assign to the content_type property of this Base64SecretBundleContentDetails. + Allowed values for this property are: "BASE64" + :type content_type: str + + :param content: + The value to assign to the content property of this Base64SecretBundleContentDetails. + :type content: str + + """ + self.swagger_types = { + 'content_type': 'str', + 'content': 'str' + } + + self.attribute_map = { + 'content_type': 'contentType', + 'content': 'content' + } + + self._content_type = None + self._content = None + self._content_type = 'BASE64' + + @property + def content(self): + """ + Gets the content of this Base64SecretBundleContentDetails. + The base64-encoded content of the secret. + + + :return: The content of this Base64SecretBundleContentDetails. + :rtype: str + """ + return self._content + + @content.setter + def content(self, content): + """ + Sets the content of this Base64SecretBundleContentDetails. + The base64-encoded content of the secret. + + + :param content: The content of this Base64SecretBundleContentDetails. + :type: str + """ + self._content = content + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/secrets/models/secret_bundle.py b/src/oci/secrets/models/secret_bundle.py new file mode 100644 index 0000000000..a147b9a4a5 --- /dev/null +++ b/src/oci/secrets/models/secret_bundle.py @@ -0,0 +1,353 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + + +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 SecretBundle(object): + """ + The contents of the secret, properties of the secret (and secret version), and user-provided contextual metadata for the secret. + """ + + #: A constant which can be used with the stages property of a SecretBundle. + #: This constant has a value of "CURRENT" + STAGES_CURRENT = "CURRENT" + + #: A constant which can be used with the stages property of a SecretBundle. + #: This constant has a value of "PENDING" + STAGES_PENDING = "PENDING" + + #: A constant which can be used with the stages property of a SecretBundle. + #: This constant has a value of "LATEST" + STAGES_LATEST = "LATEST" + + #: A constant which can be used with the stages property of a SecretBundle. + #: This constant has a value of "PREVIOUS" + STAGES_PREVIOUS = "PREVIOUS" + + #: A constant which can be used with the stages property of a SecretBundle. + #: This constant has a value of "DEPRECATED" + STAGES_DEPRECATED = "DEPRECATED" + + def __init__(self, **kwargs): + """ + Initializes a new SecretBundle object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param secret_id: + The value to assign to the secret_id property of this SecretBundle. + :type secret_id: str + + :param time_created: + The value to assign to the time_created property of this SecretBundle. + :type time_created: datetime + + :param version_number: + The value to assign to the version_number property of this SecretBundle. + :type version_number: int + + :param version_name: + The value to assign to the version_name property of this SecretBundle. + :type version_name: str + + :param secret_bundle_content: + The value to assign to the secret_bundle_content property of this SecretBundle. + :type secret_bundle_content: SecretBundleContentDetails + + :param time_of_deletion: + The value to assign to the time_of_deletion property of this SecretBundle. + :type time_of_deletion: datetime + + :param time_of_expiry: + The value to assign to the time_of_expiry property of this SecretBundle. + :type time_of_expiry: datetime + + :param stages: + The value to assign to the stages property of this SecretBundle. + Allowed values for items in this list are: "CURRENT", "PENDING", "LATEST", "PREVIOUS", "DEPRECATED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type stages: list[str] + + :param metadata: + The value to assign to the metadata property of this SecretBundle. + :type metadata: dict(str, object) + + """ + self.swagger_types = { + 'secret_id': 'str', + 'time_created': 'datetime', + 'version_number': 'int', + 'version_name': 'str', + 'secret_bundle_content': 'SecretBundleContentDetails', + 'time_of_deletion': 'datetime', + 'time_of_expiry': 'datetime', + 'stages': 'list[str]', + 'metadata': 'dict(str, object)' + } + + self.attribute_map = { + 'secret_id': 'secretId', + 'time_created': 'timeCreated', + 'version_number': 'versionNumber', + 'version_name': 'versionName', + 'secret_bundle_content': 'secretBundleContent', + 'time_of_deletion': 'timeOfDeletion', + 'time_of_expiry': 'timeOfExpiry', + 'stages': 'stages', + 'metadata': 'metadata' + } + + self._secret_id = None + self._time_created = None + self._version_number = None + self._version_name = None + self._secret_bundle_content = None + self._time_of_deletion = None + self._time_of_expiry = None + self._stages = None + self._metadata = None + + @property + def secret_id(self): + """ + **[Required]** Gets the secret_id of this SecretBundle. + The OCID of the secret. + + + :return: The secret_id of this SecretBundle. + :rtype: str + """ + return self._secret_id + + @secret_id.setter + def secret_id(self, secret_id): + """ + Sets the secret_id of this SecretBundle. + The OCID of the secret. + + + :param secret_id: The secret_id of this SecretBundle. + :type: str + """ + self._secret_id = secret_id + + @property + def time_created(self): + """ + Gets the time_created of this SecretBundle. + The time when the secret bundle was created. + + + :return: The time_created of this SecretBundle. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this SecretBundle. + The time when the secret bundle was created. + + + :param time_created: The time_created of this SecretBundle. + :type: datetime + """ + self._time_created = time_created + + @property + def version_number(self): + """ + **[Required]** Gets the version_number of this SecretBundle. + The version number of the secret. + + + :return: The version_number of this SecretBundle. + :rtype: int + """ + return self._version_number + + @version_number.setter + def version_number(self, version_number): + """ + Sets the version_number of this SecretBundle. + The version number of the secret. + + + :param version_number: The version_number of this SecretBundle. + :type: int + """ + self._version_number = version_number + + @property + def version_name(self): + """ + Gets the version_name of this SecretBundle. + The name of the secret version. Labels are unique across the different versions of a particular secret. + + + :return: The version_name of this SecretBundle. + :rtype: str + """ + return self._version_name + + @version_name.setter + def version_name(self, version_name): + """ + Sets the version_name of this SecretBundle. + The name of the secret version. Labels are unique across the different versions of a particular secret. + + + :param version_name: The version_name of this SecretBundle. + :type: str + """ + self._version_name = version_name + + @property + def secret_bundle_content(self): + """ + Gets the secret_bundle_content of this SecretBundle. + + :return: The secret_bundle_content of this SecretBundle. + :rtype: SecretBundleContentDetails + """ + return self._secret_bundle_content + + @secret_bundle_content.setter + def secret_bundle_content(self, secret_bundle_content): + """ + Sets the secret_bundle_content of this SecretBundle. + + :param secret_bundle_content: The secret_bundle_content of this SecretBundle. + :type: SecretBundleContentDetails + """ + self._secret_bundle_content = secret_bundle_content + + @property + def time_of_deletion(self): + """ + Gets the time_of_deletion of this SecretBundle. + An optional property indicating when to delete the secret version, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_of_deletion of this SecretBundle. + :rtype: datetime + """ + return self._time_of_deletion + + @time_of_deletion.setter + def time_of_deletion(self, time_of_deletion): + """ + Sets the time_of_deletion of this SecretBundle. + An optional property indicating when to delete the secret version, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_of_deletion: The time_of_deletion of this SecretBundle. + :type: datetime + """ + self._time_of_deletion = time_of_deletion + + @property + def time_of_expiry(self): + """ + Gets the time_of_expiry of this SecretBundle. + An optional property indicating when the secret version will expire, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_of_expiry of this SecretBundle. + :rtype: datetime + """ + return self._time_of_expiry + + @time_of_expiry.setter + def time_of_expiry(self, time_of_expiry): + """ + Sets the time_of_expiry of this SecretBundle. + An optional property indicating when the secret version will expire, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_of_expiry: The time_of_expiry of this SecretBundle. + :type: datetime + """ + self._time_of_expiry = time_of_expiry + + @property + def stages(self): + """ + Gets the stages of this SecretBundle. + A list of possible rotation states for the secret version. + + Allowed values for items in this list are: "CURRENT", "PENDING", "LATEST", "PREVIOUS", "DEPRECATED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The stages of this SecretBundle. + :rtype: list[str] + """ + return self._stages + + @stages.setter + def stages(self, stages): + """ + Sets the stages of this SecretBundle. + A list of possible rotation states for the secret version. + + + :param stages: The stages of this SecretBundle. + :type: list[str] + """ + allowed_values = ["CURRENT", "PENDING", "LATEST", "PREVIOUS", "DEPRECATED"] + if stages: + stages[:] = ['UNKNOWN_ENUM_VALUE' if not value_allowed_none_or_none_sentinel(x, allowed_values) else x for x in stages] + self._stages = stages + + @property + def metadata(self): + """ + Gets the metadata of this SecretBundle. + Customer-provided contextual metadata for the secret. + + + :return: The metadata of this SecretBundle. + :rtype: dict(str, object) + """ + return self._metadata + + @metadata.setter + def metadata(self, metadata): + """ + Sets the metadata of this SecretBundle. + Customer-provided contextual metadata for the secret. + + + :param metadata: The metadata of this SecretBundle. + :type: dict(str, object) + """ + 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/secrets/models/secret_bundle_content_details.py b/src/oci/secrets/models/secret_bundle_content_details.py new file mode 100644 index 0000000000..2e317171c1 --- /dev/null +++ b/src/oci/secrets/models/secret_bundle_content_details.py @@ -0,0 +1,98 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + + +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 SecretBundleContentDetails(object): + """ + The contents of the secret. + """ + + #: A constant which can be used with the content_type property of a SecretBundleContentDetails. + #: This constant has a value of "BASE64" + CONTENT_TYPE_BASE64 = "BASE64" + + def __init__(self, **kwargs): + """ + Initializes a new SecretBundleContentDetails 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.secrets.models.Base64SecretBundleContentDetails` + + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param content_type: + The value to assign to the content_type property of this SecretBundleContentDetails. + Allowed values for this property are: "BASE64", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type content_type: str + + """ + self.swagger_types = { + 'content_type': 'str' + } + + self.attribute_map = { + 'content_type': 'contentType' + } + + self._content_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['contentType'] + + if type == 'BASE64': + return 'Base64SecretBundleContentDetails' + else: + return 'SecretBundleContentDetails' + + @property + def content_type(self): + """ + **[Required]** Gets the content_type of this SecretBundleContentDetails. + The formatting type of the secret contents. + + Allowed values for this property are: "BASE64", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The content_type of this SecretBundleContentDetails. + :rtype: str + """ + return self._content_type + + @content_type.setter + def content_type(self, content_type): + """ + Sets the content_type of this SecretBundleContentDetails. + The formatting type of the secret contents. + + + :param content_type: The content_type of this SecretBundleContentDetails. + :type: str + """ + allowed_values = ["BASE64"] + if not value_allowed_none_or_none_sentinel(content_type, allowed_values): + content_type = 'UNKNOWN_ENUM_VALUE' + self._content_type = content_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/secrets/models/secret_bundle_version_summary.py b/src/oci/secrets/models/secret_bundle_version_summary.py new file mode 100644 index 0000000000..244547b756 --- /dev/null +++ b/src/oci/secrets/models/secret_bundle_version_summary.py @@ -0,0 +1,295 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + + +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 SecretBundleVersionSummary(object): + """ + The properties of the secret bundle. (Secret bundle version summary objects do not include the actual contents of the secret.) + """ + + #: A constant which can be used with the stages property of a SecretBundleVersionSummary. + #: This constant has a value of "CURRENT" + STAGES_CURRENT = "CURRENT" + + #: A constant which can be used with the stages property of a SecretBundleVersionSummary. + #: This constant has a value of "PENDING" + STAGES_PENDING = "PENDING" + + #: A constant which can be used with the stages property of a SecretBundleVersionSummary. + #: This constant has a value of "LATEST" + STAGES_LATEST = "LATEST" + + #: A constant which can be used with the stages property of a SecretBundleVersionSummary. + #: This constant has a value of "PREVIOUS" + STAGES_PREVIOUS = "PREVIOUS" + + #: A constant which can be used with the stages property of a SecretBundleVersionSummary. + #: This constant has a value of "DEPRECATED" + STAGES_DEPRECATED = "DEPRECATED" + + def __init__(self, **kwargs): + """ + Initializes a new SecretBundleVersionSummary object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param secret_id: + The value to assign to the secret_id property of this SecretBundleVersionSummary. + :type secret_id: str + + :param time_created: + The value to assign to the time_created property of this SecretBundleVersionSummary. + :type time_created: datetime + + :param version_number: + The value to assign to the version_number property of this SecretBundleVersionSummary. + :type version_number: int + + :param version_name: + The value to assign to the version_name property of this SecretBundleVersionSummary. + :type version_name: str + + :param time_of_deletion: + The value to assign to the time_of_deletion property of this SecretBundleVersionSummary. + :type time_of_deletion: datetime + + :param time_of_expiry: + The value to assign to the time_of_expiry property of this SecretBundleVersionSummary. + :type time_of_expiry: datetime + + :param stages: + The value to assign to the stages property of this SecretBundleVersionSummary. + Allowed values for items in this list are: "CURRENT", "PENDING", "LATEST", "PREVIOUS", "DEPRECATED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type stages: list[str] + + """ + self.swagger_types = { + 'secret_id': 'str', + 'time_created': 'datetime', + 'version_number': 'int', + 'version_name': 'str', + 'time_of_deletion': 'datetime', + 'time_of_expiry': 'datetime', + 'stages': 'list[str]' + } + + self.attribute_map = { + 'secret_id': 'secretId', + 'time_created': 'timeCreated', + 'version_number': 'versionNumber', + 'version_name': 'versionName', + 'time_of_deletion': 'timeOfDeletion', + 'time_of_expiry': 'timeOfExpiry', + 'stages': 'stages' + } + + self._secret_id = None + self._time_created = None + self._version_number = None + self._version_name = None + self._time_of_deletion = None + self._time_of_expiry = None + self._stages = None + + @property + def secret_id(self): + """ + **[Required]** Gets the secret_id of this SecretBundleVersionSummary. + The OCID of the secret. + + + :return: The secret_id of this SecretBundleVersionSummary. + :rtype: str + """ + return self._secret_id + + @secret_id.setter + def secret_id(self, secret_id): + """ + Sets the secret_id of this SecretBundleVersionSummary. + The OCID of the secret. + + + :param secret_id: The secret_id of this SecretBundleVersionSummary. + :type: str + """ + self._secret_id = secret_id + + @property + def time_created(self): + """ + Gets the time_created of this SecretBundleVersionSummary. + The time when the secret bundle was created. + + + :return: The time_created of this SecretBundleVersionSummary. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this SecretBundleVersionSummary. + The time when the secret bundle was created. + + + :param time_created: The time_created of this SecretBundleVersionSummary. + :type: datetime + """ + self._time_created = time_created + + @property + def version_number(self): + """ + **[Required]** Gets the version_number of this SecretBundleVersionSummary. + The version number of the secret. + + + :return: The version_number of this SecretBundleVersionSummary. + :rtype: int + """ + return self._version_number + + @version_number.setter + def version_number(self, version_number): + """ + Sets the version_number of this SecretBundleVersionSummary. + The version number of the secret. + + + :param version_number: The version_number of this SecretBundleVersionSummary. + :type: int + """ + self._version_number = version_number + + @property + def version_name(self): + """ + Gets the version_name of this SecretBundleVersionSummary. + The version name of the secret bundle, as provided when the secret was created or last rotated. + + + :return: The version_name of this SecretBundleVersionSummary. + :rtype: str + """ + return self._version_name + + @version_name.setter + def version_name(self, version_name): + """ + Sets the version_name of this SecretBundleVersionSummary. + The version name of the secret bundle, as provided when the secret was created or last rotated. + + + :param version_name: The version_name of this SecretBundleVersionSummary. + :type: str + """ + self._version_name = version_name + + @property + def time_of_deletion(self): + """ + Gets the time_of_deletion of this SecretBundleVersionSummary. + An optional property indicating when to delete the secret version, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_of_deletion of this SecretBundleVersionSummary. + :rtype: datetime + """ + return self._time_of_deletion + + @time_of_deletion.setter + def time_of_deletion(self, time_of_deletion): + """ + Sets the time_of_deletion of this SecretBundleVersionSummary. + An optional property indicating when to delete the secret version, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_of_deletion: The time_of_deletion of this SecretBundleVersionSummary. + :type: datetime + """ + self._time_of_deletion = time_of_deletion + + @property + def time_of_expiry(self): + """ + Gets the time_of_expiry of this SecretBundleVersionSummary. + An optional property indicating when the secret version will expire, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_of_expiry of this SecretBundleVersionSummary. + :rtype: datetime + """ + return self._time_of_expiry + + @time_of_expiry.setter + def time_of_expiry(self, time_of_expiry): + """ + Sets the time_of_expiry of this SecretBundleVersionSummary. + An optional property indicating when the secret version will expire, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_of_expiry: The time_of_expiry of this SecretBundleVersionSummary. + :type: datetime + """ + self._time_of_expiry = time_of_expiry + + @property + def stages(self): + """ + Gets the stages of this SecretBundleVersionSummary. + A list of possible rotation states for the secret bundle. + + Allowed values for items in this list are: "CURRENT", "PENDING", "LATEST", "PREVIOUS", "DEPRECATED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The stages of this SecretBundleVersionSummary. + :rtype: list[str] + """ + return self._stages + + @stages.setter + def stages(self, stages): + """ + Sets the stages of this SecretBundleVersionSummary. + A list of possible rotation states for the secret bundle. + + + :param stages: The stages of this SecretBundleVersionSummary. + :type: list[str] + """ + allowed_values = ["CURRENT", "PENDING", "LATEST", "PREVIOUS", "DEPRECATED"] + if stages: + stages[:] = ['UNKNOWN_ENUM_VALUE' if not value_allowed_none_or_none_sentinel(x, allowed_values) else x for x in stages] + self._stages = stages + + 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/secrets/secrets_client.py b/src/oci/secrets/secrets_client.py new file mode 100644 index 0000000000..77f51b09f8 --- /dev/null +++ b/src/oci/secrets/secrets_client.py @@ -0,0 +1,307 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + +from __future__ import absolute_import + +from oci._vendor import requests # noqa: F401 +from oci._vendor import six + +from oci import retry # 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 +from .models import secrets_type_mapping +missing = Sentinel("Missing") + + +class SecretsClient(object): + """ + API for retrieving secrets from vaults. + """ + + 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 `__. + """ + validate_config(config, signer=kwargs.get('signer')) + if 'signer' in kwargs: + signer = kwargs['signer'] + 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'), + 'timeout': kwargs.get('timeout'), + 'base_path': '/20190301', + 'service_endpoint_template': 'https://secrets.vaults.{region}.oci.{secondLevelDomain}', + 'skip_deserialization': kwargs.get('skip_deserialization', False) + } + self.base_client = BaseClient("secrets", config, signer, secrets_type_mapping, **base_client_init_kwargs) + self.retry_strategy = kwargs.get('retry_strategy') + + def get_secret_bundle(self, secret_id, **kwargs): + """ + Gets a secret bundle that matches either the specified `stage`, `label`, or `versionNumber` parameter. + If none of these parameters are provided, the bundle for the secret version marked as `CURRENT` will be returned. + + + :param str secret_id: (required) + The OCID of the secret. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :param int version_number: (optional) + The version number of the secret. + + :param str secret_version_name: (optional) + The name of the secret. (This might be referred to as the name of the secret version. Names are unique across the different versions of a secret.) + + :param str stage: (optional) + The rotation state of the secret version. + + Allowed values are: "CURRENT", "PENDING", "LATEST", "PREVIOUS", "DEPRECATED" + + :param obj 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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. 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`. + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.secrets.models.SecretBundle` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/secretbundles/{secretId}" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "opc_request_id", + "version_number", + "secret_version_name", + "stage" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "get_secret_bundle got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "secretId": secret_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('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + if 'stage' in kwargs: + stage_allowed_values = ["CURRENT", "PENDING", "LATEST", "PREVIOUS", "DEPRECATED"] + if kwargs['stage'] not in stage_allowed_values: + raise ValueError( + "Invalid value for `stage`, must be one of {0}".format(stage_allowed_values) + ) + + query_params = { + "versionNumber": kwargs.get("version_number", missing), + "secretVersionName": kwargs.get("secret_version_name", missing), + "stage": kwargs.get("stage", 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.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + 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="SecretBundle") + 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="SecretBundle") + + def list_secret_bundle_versions(self, secret_id, **kwargs): + """ + Lists all secret bundle versions for the specified secret. + + + :param str secret_id: (required) + The OCID of the secret. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :param int limit: (optional) + The maximum number of items to return in a paginated \"List\" call. For information about pagination, see + `List Pagination`__. + + __ https://docs.cloud.oracle.com/#API/Concepts/usingapi.htm#List_Pagination + + :param str page: (optional) + The value of the `opc-next-page` response header from the previous \"List\" call. For information about + pagination, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/#API/Concepts/usingapi.htm#List_Pagination + + :param str sort_by: (optional) + The field to sort by. You can specify only one sort order. The default + order for `VERSION_NUMBER` is ascending. + + Allowed values are: "VERSION_NUMBER" + + :param str sort_order: (optional) + The sort order to use, either ascending (`ASC`) or descending (`DESC`). + + Allowed values are: "ASC", "DESC" + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. 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`. + + :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.secrets.models.SecretBundleVersionSummary` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/secretbundles/{secretId}/versions" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "opc_request_id", + "limit", + "page", + "sort_by", + "sort_order" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_secret_bundle_versions got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "secretId": secret_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('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + if 'sort_by' in kwargs: + sort_by_allowed_values = ["VERSION_NUMBER"] + if kwargs['sort_by'] not in sort_by_allowed_values: + raise ValueError( + "Invalid value for `sort_by`, must be one of {0}".format(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( + "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) + ) + + query_params = { + "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.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + 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[SecretBundleVersionSummary]") + 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[SecretBundleVersionSummary]") diff --git a/src/oci/secrets/secrets_client_composite_operations.py b/src/oci/secrets/secrets_client_composite_operations.py new file mode 100644 index 0000000000..699cee18bc --- /dev/null +++ b/src/oci/secrets/secrets_client_composite_operations.py @@ -0,0 +1,23 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + +import oci # noqa: F401 +from oci.util import WAIT_RESOURCE_NOT_FOUND # noqa: F401 + + +class SecretsClientCompositeOperations(object): + """ + This class provides a wrapper around :py:class:`~oci.secrets.SecretsClient` 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 SecretsClientCompositeOperations object + + :param SecretsClient client: + The service client which will be wrapped by this object + """ + self.client = client diff --git a/src/oci/streaming/stream_admin_client.py b/src/oci/streaming/stream_admin_client.py index 86b9c499ac..fc44ef13ca 100644 --- a/src/oci/streaming/stream_admin_client.py +++ b/src/oci/streaming/stream_admin_client.py @@ -82,7 +82,6 @@ def __init__(self, config, **kwargs): def change_connect_harness_compartment(self, connect_harness_id, change_connect_harness_compartment_details, **kwargs): """ - Moves a resource into a different compartment. Moves a resource into a different compartment. When provided, If-Match is checked against ETag values of the resource. @@ -165,7 +164,6 @@ def change_connect_harness_compartment(self, connect_harness_id, change_connect_ def change_stream_compartment(self, stream_id, change_stream_compartment_details, **kwargs): """ Moves a resource into a different compartment. - Moves a resource into a different compartment. When provided, If-Match is checked against ETag values of the resource. The stream will also be moved into the default stream pool in the destination compartment. @@ -248,7 +246,6 @@ def change_stream_compartment(self, stream_id, change_stream_compartment_details def change_stream_pool_compartment(self, stream_pool_id, change_stream_pool_compartment_details, **kwargs): """ - Moves a resource into a different compartment. Moves a resource into a different compartment. When provided, If-Match is checked against ETag values of the resource. @@ -330,7 +327,6 @@ def change_stream_pool_compartment(self, stream_pool_id, change_stream_pool_comp def create_archiver(self, stream_id, create_archiver_details, **kwargs): """ - Create a new stream archiver for the specified stream. Starts the provisioning of a new stream archiver. To track the progress of the provisioning, you can periodically call :func:`get_archiver`. In the response, the `lifecycleState` parameter of the :class:`Archiver` object tells you its current state. @@ -418,7 +414,6 @@ def create_archiver(self, stream_id, create_archiver_details, **kwargs): def create_connect_harness(self, create_connect_harness_details, **kwargs): """ - Create a connect harness Starts the provisioning of a new connect harness. To track the progress of the provisioning, you can periodically call :class:`ConnectHarness` object tells you its current state. @@ -490,7 +485,6 @@ def create_connect_harness(self, create_connect_harness_details, **kwargs): def create_stream(self, create_stream_details, **kwargs): """ - Creates a stream. Starts the provisioning of a new stream. The stream will be created in the given compartment id or stream pool id, depending on which parameter is specified. Compartment id and stream pool id cannot be specified at the same time. @@ -558,7 +552,6 @@ def create_stream(self, create_stream_details, **kwargs): def create_stream_pool(self, create_stream_pool_details, **kwargs): """ - Creates a stream pool. Starts the provisioning of a new stream pool. To track the progress of the provisioning, you can periodically call GetStreamPool. In the response, the `lifecycleState` parameter of the object tells you its current state. @@ -631,7 +624,6 @@ def create_stream_pool(self, create_stream_pool_details, **kwargs): def delete_connect_harness(self, connect_harness_id, **kwargs): """ - Deletes a connect harness. Deletes a connect harness and its content. Connect harness contents are deleted immediately. The service retains records of the connect harness itself for 90 days after deletion. The `lifecycleState` parameter of the `ConnectHarness` object changes to `DELETING` and the connect harness becomes inaccessible for read or write operations. To verify that a connect harness has been deleted, make a :func:`get_connect_harness` request. If the call returns the connect harness's @@ -712,7 +704,6 @@ def delete_connect_harness(self, connect_harness_id, **kwargs): def delete_stream(self, stream_id, **kwargs): """ - Deletes a stream. Deletes a stream and its content. Stream contents are deleted immediately. The service retains records of the stream itself for 90 days after deletion. The `lifecycleState` parameter of the `Stream` object changes to `DELETING` and the stream becomes inaccessible for read or write operations. To verify that a stream has been deleted, make a :func:`get_stream` request. If the call returns the stream's @@ -793,7 +784,6 @@ def delete_stream(self, stream_id, **kwargs): def delete_stream_pool(self, stream_pool_id, **kwargs): """ - Deletes a stream pool. Deletes a stream pool. All containing streams will also be deleted. The default stream pool of a compartment cannot be deleted. @@ -872,7 +862,6 @@ def delete_stream_pool(self, stream_pool_id, **kwargs): def get_archiver(self, stream_id, **kwargs): """ Returns the current state of the stream archiver. - Returns the current state of the stream archiver. :param str stream_id: (required) @@ -945,7 +934,6 @@ def get_archiver(self, stream_id, **kwargs): def get_connect_harness(self, connect_harness_id, **kwargs): """ - Gets a connectharness Gets detailed information about a connect harness. @@ -1019,7 +1007,6 @@ def get_connect_harness(self, connect_harness_id, **kwargs): def get_stream(self, stream_id, **kwargs): """ - Gets a stream Gets detailed information about a stream, including the number of partitions. @@ -1093,7 +1080,6 @@ def get_stream(self, stream_id, **kwargs): def get_stream_pool(self, stream_pool_id, **kwargs): """ - Gets the stream pool Gets detailed information about the stream pool, such as Kafka settings. @@ -1167,7 +1153,6 @@ def get_stream_pool(self, stream_pool_id, **kwargs): def list_connect_harnesses(self, compartment_id, **kwargs): """ - Lists the connectharnesses. Lists the connectharness. @@ -1299,7 +1284,6 @@ def list_connect_harnesses(self, compartment_id, **kwargs): def list_stream_pools(self, compartment_id, **kwargs): """ List the stream pools for a given compartment ID. - List the stream pools for a given compartment ID. :param str compartment_id: (required) @@ -1430,7 +1414,6 @@ def list_stream_pools(self, compartment_id, **kwargs): def list_streams(self, **kwargs): """ Lists the streams in the given compartment id. - Lists the streams in the given compartment id. If the compartment id is specified, it will list streams in the compartment, regardless of their stream pool. If the stream pool id is specified, the action will be scoped to that stream pool. The compartment id and stream pool id cannot be specified at the same time. @@ -1570,7 +1553,6 @@ def list_streams(self, **kwargs): def start_archiver(self, stream_id, **kwargs): """ Start the archiver for the specified stream. - Start the archiver for the specified stream. :param str stream_id: (required) @@ -1649,7 +1631,6 @@ def start_archiver(self, stream_id, **kwargs): def stop_archiver(self, stream_id, **kwargs): """ Stop the archiver for the specified stream. - Stop the archiver for the specified stream. :param str stream_id: (required) @@ -1810,7 +1791,6 @@ def update_archiver(self, stream_id, update_archiver_details, **kwargs): def update_connect_harness(self, connect_harness_id, update_connect_harness_details, **kwargs): """ - Updates a connect harness. Updates the tags applied to the connect harness. @@ -1894,7 +1874,6 @@ def update_connect_harness(self, connect_harness_id, update_connect_harness_deta def update_stream(self, stream_id, update_stream_details, **kwargs): """ - Updates a stream. Updates the stream. Only specified values will be updated. @@ -1978,7 +1957,6 @@ def update_stream(self, stream_id, update_stream_details, **kwargs): def update_stream_pool(self, stream_pool_id, update_stream_pool_details, **kwargs): """ - Updates the stream pool. Updates the specified stream pool. diff --git a/src/oci/streaming/stream_client.py b/src/oci/streaming/stream_client.py index 9b064ce376..17f81e6e1b 100644 --- a/src/oci/streaming/stream_client.py +++ b/src/oci/streaming/stream_client.py @@ -80,7 +80,6 @@ def __init__(self, config, service_endpoint, **kwargs): def consumer_commit(self, stream_id, cursor, **kwargs): """ - Commits processed offsets to consumer group state. Provides a mechanism to manually commit offsets, if not using commit-on-get consumer semantics. This commits offsets assicated with the provided cursor, extends the timeout on each of the affected partitions, and returns an updated cursor. @@ -165,7 +164,6 @@ def consumer_commit(self, stream_id, cursor, **kwargs): def consumer_heartbeat(self, stream_id, cursor, **kwargs): """ - Extends the reservation timeout on partitions reserved by the provided cursor. Allows long-running processes to extend the timeout on partitions reserved by a consumer instance. @@ -249,7 +247,6 @@ def consumer_heartbeat(self, stream_id, cursor, **kwargs): def create_cursor(self, stream_id, create_cursor_details, **kwargs): """ - Creates a cursor for the specified stream. A cursor is used to consume a stream. Creates a cursor. Cursors are used to consume a stream, starting from a specific point in the partition and going forward from there. You can create a cursor based on an offset, a time, the trim horizon, or the most recent message in the stream. As the oldest message inside the retention period boundary, using the trim horizon effectively lets you consume all messages in the stream. A cursor based @@ -332,7 +329,6 @@ def create_cursor(self, stream_id, create_cursor_details, **kwargs): def create_group_cursor(self, stream_id, create_group_cursor_details, **kwargs): """ - Creates a group-cursor for the specified stream. A cursor is used to consume a stream. Creates a group-cursor. @@ -412,7 +408,6 @@ def create_group_cursor(self, stream_id, create_group_cursor_details, **kwargs): def get_group(self, stream_id, group_name, **kwargs): """ Returns the current state of a consumer group. - Returns the current state of a consumer group. :param str stream_id: (required) @@ -489,7 +484,6 @@ def get_group(self, stream_id, group_name, **kwargs): def get_messages(self, stream_id, cursor, **kwargs): """ - Gets messages from a stream. Returns messages from the specified stream using the specified cursor as the starting point for consumption. By default, the number of messages returned is undefined, but the service returns as many as possible. To get messages, you must first obtain a cursor using the :func:`create_cursor` operation. In the response, retrieve the value of the 'opc-next-cursor' header to pass as a parameter to get the next batch of messages in the stream. @@ -581,7 +575,6 @@ def get_messages(self, stream_id, cursor, **kwargs): def put_messages(self, stream_id, put_messages_details, **kwargs): """ - Puts messages in a stream. Emits messages to a stream. There's no limit to the number of messages in a request, but the total size of a message or request must be 1 MiB or less. The service calculates the partition ID from the message key and stores messages that share a key on the same partition. If a message does not contain a key or if the key is null, the service generates a message key for you. @@ -665,7 +658,6 @@ def put_messages(self, stream_id, put_messages_details, **kwargs): def update_group(self, stream_id, group_name, update_group_details, **kwargs): """ - Forcefully changes the committed location of a group on a stream. Forcefully changes the current location of a group as a whole; reseting processing location of all consumers to a particular location in the stream. diff --git a/src/oci/vault/__init__.py b/src/oci/vault/__init__.py new file mode 100644 index 0000000000..3549e7278c --- /dev/null +++ b/src/oci/vault/__init__.py @@ -0,0 +1,11 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + +from __future__ import absolute_import + + +from .vaults_client import VaultsClient +from .vaults_client_composite_operations import VaultsClientCompositeOperations +from . import models + +__all__ = ["VaultsClient", "VaultsClientCompositeOperations", "models"] diff --git a/src/oci/vault/models/__init__.py b/src/oci/vault/models/__init__.py new file mode 100644 index 0000000000..c1d93bfa1a --- /dev/null +++ b/src/oci/vault/models/__init__.py @@ -0,0 +1,37 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + +from __future__ import absolute_import + +from .base64_secret_content_details import Base64SecretContentDetails +from .change_secret_compartment_details import ChangeSecretCompartmentDetails +from .create_secret_details import CreateSecretDetails +from .schedule_secret_deletion_details import ScheduleSecretDeletionDetails +from .schedule_secret_version_deletion_details import ScheduleSecretVersionDeletionDetails +from .secret import Secret +from .secret_content_details import SecretContentDetails +from .secret_expiry_rule import SecretExpiryRule +from .secret_reuse_rule import SecretReuseRule +from .secret_rule import SecretRule +from .secret_summary import SecretSummary +from .secret_version import SecretVersion +from .secret_version_summary import SecretVersionSummary +from .update_secret_details import UpdateSecretDetails + +# Maps type names to classes for vault services. +vault_type_mapping = { + "Base64SecretContentDetails": Base64SecretContentDetails, + "ChangeSecretCompartmentDetails": ChangeSecretCompartmentDetails, + "CreateSecretDetails": CreateSecretDetails, + "ScheduleSecretDeletionDetails": ScheduleSecretDeletionDetails, + "ScheduleSecretVersionDeletionDetails": ScheduleSecretVersionDeletionDetails, + "Secret": Secret, + "SecretContentDetails": SecretContentDetails, + "SecretExpiryRule": SecretExpiryRule, + "SecretReuseRule": SecretReuseRule, + "SecretRule": SecretRule, + "SecretSummary": SecretSummary, + "SecretVersion": SecretVersion, + "SecretVersionSummary": SecretVersionSummary, + "UpdateSecretDetails": UpdateSecretDetails +} diff --git a/src/oci/vault/models/base64_secret_content_details.py b/src/oci/vault/models/base64_secret_content_details.py new file mode 100644 index 0000000000..37a03119de --- /dev/null +++ b/src/oci/vault/models/base64_secret_content_details.py @@ -0,0 +1,94 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + +from .secret_content_details import SecretContentDetails +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 Base64SecretContentDetails(SecretContentDetails): + """ + Base64-encoded secret content. + """ + + def __init__(self, **kwargs): + """ + Initializes a new Base64SecretContentDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.vault.models.Base64SecretContentDetails.content_type` attribute + of this class is ``BASE64`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param content_type: + The value to assign to the content_type property of this Base64SecretContentDetails. + Allowed values for this property are: "BASE64" + :type content_type: str + + :param name: + The value to assign to the name property of this Base64SecretContentDetails. + :type name: str + + :param stage: + The value to assign to the stage property of this Base64SecretContentDetails. + Allowed values for this property are: "CURRENT", "PENDING" + :type stage: str + + :param content: + The value to assign to the content property of this Base64SecretContentDetails. + :type content: str + + """ + self.swagger_types = { + 'content_type': 'str', + 'name': 'str', + 'stage': 'str', + 'content': 'str' + } + + self.attribute_map = { + 'content_type': 'contentType', + 'name': 'name', + 'stage': 'stage', + 'content': 'content' + } + + self._content_type = None + self._name = None + self._stage = None + self._content = None + self._content_type = 'BASE64' + + @property + def content(self): + """ + Gets the content of this Base64SecretContentDetails. + The base64-encoded content of the secret. + + + :return: The content of this Base64SecretContentDetails. + :rtype: str + """ + return self._content + + @content.setter + def content(self, content): + """ + Sets the content of this Base64SecretContentDetails. + The base64-encoded content of the secret. + + + :param content: The content of this Base64SecretContentDetails. + :type: str + """ + self._content = content + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/vault/models/change_secret_compartment_details.py b/src/oci/vault/models/change_secret_compartment_details.py new file mode 100644 index 0000000000..d547e1f9a2 --- /dev/null +++ b/src/oci/vault/models/change_secret_compartment_details.py @@ -0,0 +1,75 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + + +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 ChangeSecretCompartmentDetails(object): + """ + Specifies the updated compartment OCID for the secret. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ChangeSecretCompartmentDetails 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 ChangeSecretCompartmentDetails. + :type compartment_id: str + + """ + self.swagger_types = { + 'compartment_id': 'str' + } + + self.attribute_map = { + 'compartment_id': 'compartmentId' + } + + self._compartment_id = None + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this ChangeSecretCompartmentDetails. + The `OCID`__ of the compartment + into which the resource should be moved. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :return: The compartment_id of this ChangeSecretCompartmentDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this ChangeSecretCompartmentDetails. + The `OCID`__ of the compartment + into which the resource should be moved. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :param compartment_id: The compartment_id of this ChangeSecretCompartmentDetails. + :type: str + """ + self._compartment_id = compartment_id + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/vault/models/create_secret_details.py b/src/oci/vault/models/create_secret_details.py new file mode 100644 index 0000000000..55f64f38a5 --- /dev/null +++ b/src/oci/vault/models/create_secret_details.py @@ -0,0 +1,364 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + + +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 CreateSecretDetails(object): + """ + The details of the secret that you want to create. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CreateSecretDetails 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 CreateSecretDetails. + :type compartment_id: str + + :param defined_tags: + The value to assign to the defined_tags property of this CreateSecretDetails. + :type defined_tags: dict(str, dict(str, object)) + + :param description: + The value to assign to the description property of this CreateSecretDetails. + :type description: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this CreateSecretDetails. + :type freeform_tags: dict(str, str) + + :param key_id: + The value to assign to the key_id property of this CreateSecretDetails. + :type key_id: str + + :param metadata: + The value to assign to the metadata property of this CreateSecretDetails. + :type metadata: dict(str, object) + + :param secret_content: + The value to assign to the secret_content property of this CreateSecretDetails. + :type secret_content: SecretContentDetails + + :param secret_name: + The value to assign to the secret_name property of this CreateSecretDetails. + :type secret_name: str + + :param secret_rules: + The value to assign to the secret_rules property of this CreateSecretDetails. + :type secret_rules: list[SecretRule] + + :param vault_id: + The value to assign to the vault_id property of this CreateSecretDetails. + :type vault_id: str + + """ + self.swagger_types = { + 'compartment_id': 'str', + 'defined_tags': 'dict(str, dict(str, object))', + 'description': 'str', + 'freeform_tags': 'dict(str, str)', + 'key_id': 'str', + 'metadata': 'dict(str, object)', + 'secret_content': 'SecretContentDetails', + 'secret_name': 'str', + 'secret_rules': 'list[SecretRule]', + 'vault_id': 'str' + } + + self.attribute_map = { + 'compartment_id': 'compartmentId', + 'defined_tags': 'definedTags', + 'description': 'description', + 'freeform_tags': 'freeformTags', + 'key_id': 'keyId', + 'metadata': 'metadata', + 'secret_content': 'secretContent', + 'secret_name': 'secretName', + 'secret_rules': 'secretRules', + 'vault_id': 'vaultId' + } + + self._compartment_id = None + self._defined_tags = None + self._description = None + self._freeform_tags = None + self._key_id = None + self._metadata = None + self._secret_content = None + self._secret_name = None + self._secret_rules = None + self._vault_id = None + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this CreateSecretDetails. + The OCID of the compartment where you want to create the secret. + + + :return: The compartment_id of this CreateSecretDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this CreateSecretDetails. + The OCID of the compartment where you want to create the secret. + + + :param compartment_id: The compartment_id of this CreateSecretDetails. + :type: str + """ + self._compartment_id = compartment_id + + @property + def defined_tags(self): + """ + Gets the defined_tags of this CreateSecretDetails. + 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/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this CreateSecretDetails. + :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 CreateSecretDetails. + 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/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this CreateSecretDetails. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def description(self): + """ + Gets the description of this CreateSecretDetails. + A brief description of the secret. Avoid entering confidential information. + + + :return: The description of this CreateSecretDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this CreateSecretDetails. + A brief description of the secret. Avoid entering confidential information. + + + :param description: The description of this CreateSecretDetails. + :type: str + """ + self._description = description + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this CreateSecretDetails. + 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/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this CreateSecretDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this CreateSecretDetails. + 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/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this CreateSecretDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def key_id(self): + """ + Gets the key_id of this CreateSecretDetails. + The OCID of the master encryption key that is used to encrypt the secret. + + + :return: The key_id of this CreateSecretDetails. + :rtype: str + """ + return self._key_id + + @key_id.setter + def key_id(self, key_id): + """ + Sets the key_id of this CreateSecretDetails. + The OCID of the master encryption key that is used to encrypt the secret. + + + :param key_id: The key_id of this CreateSecretDetails. + :type: str + """ + self._key_id = key_id + + @property + def metadata(self): + """ + Gets the metadata of this CreateSecretDetails. + Additional metadata that you can use to provide context about how to use the secret during rotation or + other administrative tasks. For example, for a secret that you use to connect to a database, the additional + metadata might specify the connection endpoint and the connection string. Provide additional metadata as key-value pairs. + + + :return: The metadata of this CreateSecretDetails. + :rtype: dict(str, object) + """ + return self._metadata + + @metadata.setter + def metadata(self, metadata): + """ + Sets the metadata of this CreateSecretDetails. + Additional metadata that you can use to provide context about how to use the secret during rotation or + other administrative tasks. For example, for a secret that you use to connect to a database, the additional + metadata might specify the connection endpoint and the connection string. Provide additional metadata as key-value pairs. + + + :param metadata: The metadata of this CreateSecretDetails. + :type: dict(str, object) + """ + self._metadata = metadata + + @property + def secret_content(self): + """ + **[Required]** Gets the secret_content of this CreateSecretDetails. + + :return: The secret_content of this CreateSecretDetails. + :rtype: SecretContentDetails + """ + return self._secret_content + + @secret_content.setter + def secret_content(self, secret_content): + """ + Sets the secret_content of this CreateSecretDetails. + + :param secret_content: The secret_content of this CreateSecretDetails. + :type: SecretContentDetails + """ + self._secret_content = secret_content + + @property + def secret_name(self): + """ + **[Required]** Gets the secret_name of this CreateSecretDetails. + A user-friendly name for the secret. Secret names should be unique within a vault. Avoid entering confidential information. Valid characters are uppercase or lowercase letters, numbers, hyphens, underscores, and periods. + + + :return: The secret_name of this CreateSecretDetails. + :rtype: str + """ + return self._secret_name + + @secret_name.setter + def secret_name(self, secret_name): + """ + Sets the secret_name of this CreateSecretDetails. + A user-friendly name for the secret. Secret names should be unique within a vault. Avoid entering confidential information. Valid characters are uppercase or lowercase letters, numbers, hyphens, underscores, and periods. + + + :param secret_name: The secret_name of this CreateSecretDetails. + :type: str + """ + self._secret_name = secret_name + + @property + def secret_rules(self): + """ + Gets the secret_rules of this CreateSecretDetails. + A list of rules to control how the secret is used and managed. + + + :return: The secret_rules of this CreateSecretDetails. + :rtype: list[SecretRule] + """ + return self._secret_rules + + @secret_rules.setter + def secret_rules(self, secret_rules): + """ + Sets the secret_rules of this CreateSecretDetails. + A list of rules to control how the secret is used and managed. + + + :param secret_rules: The secret_rules of this CreateSecretDetails. + :type: list[SecretRule] + """ + self._secret_rules = secret_rules + + @property + def vault_id(self): + """ + **[Required]** Gets the vault_id of this CreateSecretDetails. + The OCID of the vault where you want to create the secret. + + + :return: The vault_id of this CreateSecretDetails. + :rtype: str + """ + return self._vault_id + + @vault_id.setter + def vault_id(self, vault_id): + """ + Sets the vault_id of this CreateSecretDetails. + The OCID of the vault where you want to create the secret. + + + :param vault_id: The vault_id of this CreateSecretDetails. + :type: str + """ + self._vault_id = vault_id + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/vault/models/schedule_secret_deletion_details.py b/src/oci/vault/models/schedule_secret_deletion_details.py new file mode 100644 index 0000000000..3e0c7b7e5f --- /dev/null +++ b/src/oci/vault/models/schedule_secret_deletion_details.py @@ -0,0 +1,73 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + + +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 ScheduleSecretDeletionDetails(object): + """ + Details for scheduling the deletion of the specified secret. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ScheduleSecretDeletionDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param time_of_deletion: + The value to assign to the time_of_deletion property of this ScheduleSecretDeletionDetails. + :type time_of_deletion: datetime + + """ + self.swagger_types = { + 'time_of_deletion': 'datetime' + } + + self.attribute_map = { + 'time_of_deletion': 'timeOfDeletion' + } + + self._time_of_deletion = None + + @property + def time_of_deletion(self): + """ + Gets the time_of_deletion of this ScheduleSecretDeletionDetails. + An optional property indicating when to delete the secret version, expressed in `RFC 3339`__ timestamp format. + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_of_deletion of this ScheduleSecretDeletionDetails. + :rtype: datetime + """ + return self._time_of_deletion + + @time_of_deletion.setter + def time_of_deletion(self, time_of_deletion): + """ + Sets the time_of_deletion of this ScheduleSecretDeletionDetails. + An optional property indicating when to delete the secret version, expressed in `RFC 3339`__ timestamp format. + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_of_deletion: The time_of_deletion of this ScheduleSecretDeletionDetails. + :type: datetime + """ + self._time_of_deletion = time_of_deletion + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/vault/models/schedule_secret_version_deletion_details.py b/src/oci/vault/models/schedule_secret_version_deletion_details.py new file mode 100644 index 0000000000..aeab9b3e5d --- /dev/null +++ b/src/oci/vault/models/schedule_secret_version_deletion_details.py @@ -0,0 +1,75 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + + +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 ScheduleSecretVersionDeletionDetails(object): + """ + Schedules the deletion of the specified secret version. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ScheduleSecretVersionDeletionDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param time_of_deletion: + The value to assign to the time_of_deletion property of this ScheduleSecretVersionDeletionDetails. + :type time_of_deletion: datetime + + """ + self.swagger_types = { + 'time_of_deletion': 'datetime' + } + + self.attribute_map = { + 'time_of_deletion': 'timeOfDeletion' + } + + self._time_of_deletion = None + + @property + def time_of_deletion(self): + """ + Gets the time_of_deletion of this ScheduleSecretVersionDeletionDetails. + An optional property indicating when to delete the secret version, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_of_deletion of this ScheduleSecretVersionDeletionDetails. + :rtype: datetime + """ + return self._time_of_deletion + + @time_of_deletion.setter + def time_of_deletion(self, time_of_deletion): + """ + Sets the time_of_deletion of this ScheduleSecretVersionDeletionDetails. + An optional property indicating when to delete the secret version, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_of_deletion: The time_of_deletion of this ScheduleSecretVersionDeletionDetails. + :type: datetime + """ + self._time_of_deletion = time_of_deletion + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/vault/models/secret.py b/src/oci/vault/models/secret.py new file mode 100644 index 0000000000..18c8abe2d5 --- /dev/null +++ b/src/oci/vault/models/secret.py @@ -0,0 +1,616 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + + +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 Secret(object): + """ + The details of the secret. Secret details do not contain the contents of the secret itself. + """ + + #: A constant which can be used with the lifecycle_state property of a Secret. + #: This constant has a value of "CREATING" + LIFECYCLE_STATE_CREATING = "CREATING" + + #: A constant which can be used with the lifecycle_state property of a Secret. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a Secret. + #: This constant has a value of "UPDATING" + LIFECYCLE_STATE_UPDATING = "UPDATING" + + #: A constant which can be used with the lifecycle_state property of a Secret. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + #: A constant which can be used with the lifecycle_state property of a Secret. + #: This constant has a value of "DELETED" + LIFECYCLE_STATE_DELETED = "DELETED" + + #: A constant which can be used with the lifecycle_state property of a Secret. + #: This constant has a value of "SCHEDULING_DELETION" + LIFECYCLE_STATE_SCHEDULING_DELETION = "SCHEDULING_DELETION" + + #: A constant which can be used with the lifecycle_state property of a Secret. + #: This constant has a value of "PENDING_DELETION" + LIFECYCLE_STATE_PENDING_DELETION = "PENDING_DELETION" + + #: A constant which can be used with the lifecycle_state property of a Secret. + #: This constant has a value of "CANCELLING_DELETION" + LIFECYCLE_STATE_CANCELLING_DELETION = "CANCELLING_DELETION" + + #: A constant which can be used with the lifecycle_state property of a Secret. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + def __init__(self, **kwargs): + """ + Initializes a new Secret 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 Secret. + :type compartment_id: str + + :param current_version_number: + The value to assign to the current_version_number property of this Secret. + :type current_version_number: int + + :param defined_tags: + The value to assign to the defined_tags property of this Secret. + :type defined_tags: dict(str, dict(str, object)) + + :param description: + The value to assign to the description property of this Secret. + :type description: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this Secret. + :type freeform_tags: dict(str, str) + + :param id: + The value to assign to the id property of this Secret. + :type id: str + + :param key_id: + The value to assign to the key_id property of this Secret. + :type key_id: str + + :param lifecycle_details: + The value to assign to the lifecycle_details property of this Secret. + :type lifecycle_details: str + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this Secret. + Allowed values for this property are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "SCHEDULING_DELETION", "PENDING_DELETION", "CANCELLING_DELETION", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param metadata: + The value to assign to the metadata property of this Secret. + :type metadata: dict(str, object) + + :param secret_name: + The value to assign to the secret_name property of this Secret. + :type secret_name: str + + :param secret_rules: + The value to assign to the secret_rules property of this Secret. + :type secret_rules: list[SecretRule] + + :param time_created: + The value to assign to the time_created property of this Secret. + :type time_created: datetime + + :param time_of_current_version_expiry: + The value to assign to the time_of_current_version_expiry property of this Secret. + :type time_of_current_version_expiry: datetime + + :param time_of_deletion: + The value to assign to the time_of_deletion property of this Secret. + :type time_of_deletion: datetime + + :param vault_id: + The value to assign to the vault_id property of this Secret. + :type vault_id: str + + """ + self.swagger_types = { + 'compartment_id': 'str', + 'current_version_number': 'int', + 'defined_tags': 'dict(str, dict(str, object))', + 'description': 'str', + 'freeform_tags': 'dict(str, str)', + 'id': 'str', + 'key_id': 'str', + 'lifecycle_details': 'str', + 'lifecycle_state': 'str', + 'metadata': 'dict(str, object)', + 'secret_name': 'str', + 'secret_rules': 'list[SecretRule]', + 'time_created': 'datetime', + 'time_of_current_version_expiry': 'datetime', + 'time_of_deletion': 'datetime', + 'vault_id': 'str' + } + + self.attribute_map = { + 'compartment_id': 'compartmentId', + 'current_version_number': 'currentVersionNumber', + 'defined_tags': 'definedTags', + 'description': 'description', + 'freeform_tags': 'freeformTags', + 'id': 'id', + 'key_id': 'keyId', + 'lifecycle_details': 'lifecycleDetails', + 'lifecycle_state': 'lifecycleState', + 'metadata': 'metadata', + 'secret_name': 'secretName', + 'secret_rules': 'secretRules', + 'time_created': 'timeCreated', + 'time_of_current_version_expiry': 'timeOfCurrentVersionExpiry', + 'time_of_deletion': 'timeOfDeletion', + 'vault_id': 'vaultId' + } + + self._compartment_id = None + self._current_version_number = None + self._defined_tags = None + self._description = None + self._freeform_tags = None + self._id = None + self._key_id = None + self._lifecycle_details = None + self._lifecycle_state = None + self._metadata = None + self._secret_name = None + self._secret_rules = None + self._time_created = None + self._time_of_current_version_expiry = None + self._time_of_deletion = None + self._vault_id = None + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this Secret. + The OCID of the compartment where you want to create the secret. + + + :return: The compartment_id of this Secret. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this Secret. + The OCID of the compartment where you want to create the secret. + + + :param compartment_id: The compartment_id of this Secret. + :type: str + """ + self._compartment_id = compartment_id + + @property + def current_version_number(self): + """ + Gets the current_version_number of this Secret. + The version number of the secret version that's currently in use. + + + :return: The current_version_number of this Secret. + :rtype: int + """ + return self._current_version_number + + @current_version_number.setter + def current_version_number(self, current_version_number): + """ + Sets the current_version_number of this Secret. + The version number of the secret version that's currently in use. + + + :param current_version_number: The current_version_number of this Secret. + :type: int + """ + self._current_version_number = current_version_number + + @property + def defined_tags(self): + """ + Gets the defined_tags of this Secret. + 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/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this Secret. + :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 Secret. + 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/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this Secret. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def description(self): + """ + Gets the description of this Secret. + A brief description of the secret. Avoid entering confidential information. + + + :return: The description of this Secret. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this Secret. + A brief description of the secret. Avoid entering confidential information. + + + :param description: The description of this Secret. + :type: str + """ + self._description = description + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this Secret. + 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/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this Secret. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this Secret. + 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/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this Secret. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def id(self): + """ + **[Required]** Gets the id of this Secret. + The OCID of the secret. + + + :return: The id of this Secret. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this Secret. + The OCID of the secret. + + + :param id: The id of this Secret. + :type: str + """ + self._id = id + + @property + def key_id(self): + """ + Gets the key_id of this Secret. + The OCID of the master encryption key that is used to encrypt the secret. + + + :return: The key_id of this Secret. + :rtype: str + """ + return self._key_id + + @key_id.setter + def key_id(self, key_id): + """ + Sets the key_id of this Secret. + The OCID of the master encryption key that is used to encrypt the secret. + + + :param key_id: The key_id of this Secret. + :type: str + """ + self._key_id = key_id + + @property + def lifecycle_details(self): + """ + Gets the lifecycle_details of this Secret. + Additional information about the current lifecycle state of the secret. + + + :return: The lifecycle_details of this Secret. + :rtype: str + """ + return self._lifecycle_details + + @lifecycle_details.setter + def lifecycle_details(self, lifecycle_details): + """ + Sets the lifecycle_details of this Secret. + Additional information about the current lifecycle state of the secret. + + + :param lifecycle_details: The lifecycle_details of this Secret. + :type: str + """ + self._lifecycle_details = lifecycle_details + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this Secret. + The current lifecycle state of the secret. + + Allowed values for this property are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "SCHEDULING_DELETION", "PENDING_DELETION", "CANCELLING_DELETION", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this Secret. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this Secret. + The current lifecycle state of the secret. + + + :param lifecycle_state: The lifecycle_state of this Secret. + :type: str + """ + allowed_values = ["CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "SCHEDULING_DELETION", "PENDING_DELETION", "CANCELLING_DELETION", "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 metadata(self): + """ + Gets the metadata of this Secret. + Additional metadata that you can use to provide context about how to use the secret or during rotation or + other administrative tasks. For example, for a secret that you use to connect to a database, the additional + metadata might specify the connection endpoint and the connection string. Provide additional metadata as key-value pairs. + + + :return: The metadata of this Secret. + :rtype: dict(str, object) + """ + return self._metadata + + @metadata.setter + def metadata(self, metadata): + """ + Sets the metadata of this Secret. + Additional metadata that you can use to provide context about how to use the secret or during rotation or + other administrative tasks. For example, for a secret that you use to connect to a database, the additional + metadata might specify the connection endpoint and the connection string. Provide additional metadata as key-value pairs. + + + :param metadata: The metadata of this Secret. + :type: dict(str, object) + """ + self._metadata = metadata + + @property + def secret_name(self): + """ + **[Required]** Gets the secret_name of this Secret. + The user-friendly name of the secret. Avoid entering confidential information. + + + :return: The secret_name of this Secret. + :rtype: str + """ + return self._secret_name + + @secret_name.setter + def secret_name(self, secret_name): + """ + Sets the secret_name of this Secret. + The user-friendly name of the secret. Avoid entering confidential information. + + + :param secret_name: The secret_name of this Secret. + :type: str + """ + self._secret_name = secret_name + + @property + def secret_rules(self): + """ + Gets the secret_rules of this Secret. + A list of rules that control how the secret is used and managed. + + + :return: The secret_rules of this Secret. + :rtype: list[SecretRule] + """ + return self._secret_rules + + @secret_rules.setter + def secret_rules(self, secret_rules): + """ + Sets the secret_rules of this Secret. + A list of rules that control how the secret is used and managed. + + + :param secret_rules: The secret_rules of this Secret. + :type: list[SecretRule] + """ + self._secret_rules = secret_rules + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this Secret. + A property indicating when the secret was created, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_created of this Secret. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this Secret. + A property indicating when the secret was created, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_created: The time_created of this Secret. + :type: datetime + """ + self._time_created = time_created + + @property + def time_of_current_version_expiry(self): + """ + Gets the time_of_current_version_expiry of this Secret. + An optional property indicating when the current secret version will expire, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_of_current_version_expiry of this Secret. + :rtype: datetime + """ + return self._time_of_current_version_expiry + + @time_of_current_version_expiry.setter + def time_of_current_version_expiry(self, time_of_current_version_expiry): + """ + Sets the time_of_current_version_expiry of this Secret. + An optional property indicating when the current secret version will expire, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_of_current_version_expiry: The time_of_current_version_expiry of this Secret. + :type: datetime + """ + self._time_of_current_version_expiry = time_of_current_version_expiry + + @property + def time_of_deletion(self): + """ + Gets the time_of_deletion of this Secret. + An optional property indicating when to delete the secret, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_of_deletion of this Secret. + :rtype: datetime + """ + return self._time_of_deletion + + @time_of_deletion.setter + def time_of_deletion(self, time_of_deletion): + """ + Sets the time_of_deletion of this Secret. + An optional property indicating when to delete the secret, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_of_deletion: The time_of_deletion of this Secret. + :type: datetime + """ + self._time_of_deletion = time_of_deletion + + @property + def vault_id(self): + """ + **[Required]** Gets the vault_id of this Secret. + The OCID of the vault where the secret exists. + + + :return: The vault_id of this Secret. + :rtype: str + """ + return self._vault_id + + @vault_id.setter + def vault_id(self, vault_id): + """ + Sets the vault_id of this Secret. + The OCID of the vault where the secret exists. + + + :param vault_id: The vault_id of this Secret. + :type: str + """ + self._vault_id = vault_id + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/vault/models/secret_content_details.py b/src/oci/vault/models/secret_content_details.py new file mode 100644 index 0000000000..5ee7db8470 --- /dev/null +++ b/src/oci/vault/models/secret_content_details.py @@ -0,0 +1,186 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + + +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 SecretContentDetails(object): + """ + The content of the secret and metadata to help identify it. + """ + + #: A constant which can be used with the content_type property of a SecretContentDetails. + #: This constant has a value of "BASE64" + CONTENT_TYPE_BASE64 = "BASE64" + + #: A constant which can be used with the stage property of a SecretContentDetails. + #: This constant has a value of "CURRENT" + STAGE_CURRENT = "CURRENT" + + #: A constant which can be used with the stage property of a SecretContentDetails. + #: This constant has a value of "PENDING" + STAGE_PENDING = "PENDING" + + def __init__(self, **kwargs): + """ + Initializes a new SecretContentDetails 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.vault.models.Base64SecretContentDetails` + + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param content_type: + The value to assign to the content_type property of this SecretContentDetails. + Allowed values for this property are: "BASE64" + :type content_type: str + + :param name: + The value to assign to the name property of this SecretContentDetails. + :type name: str + + :param stage: + The value to assign to the stage property of this SecretContentDetails. + Allowed values for this property are: "CURRENT", "PENDING" + :type stage: str + + """ + self.swagger_types = { + 'content_type': 'str', + 'name': 'str', + 'stage': 'str' + } + + self.attribute_map = { + 'content_type': 'contentType', + 'name': 'name', + 'stage': 'stage' + } + + self._content_type = None + self._name = None + self._stage = 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['contentType'] + + if type == 'BASE64': + return 'Base64SecretContentDetails' + else: + return 'SecretContentDetails' + + @property + def content_type(self): + """ + **[Required]** Gets the content_type of this SecretContentDetails. + The base64-encoded content of the secret. + + Allowed values for this property are: "BASE64" + + + :return: The content_type of this SecretContentDetails. + :rtype: str + """ + return self._content_type + + @content_type.setter + def content_type(self, content_type): + """ + Sets the content_type of this SecretContentDetails. + The base64-encoded content of the secret. + + + :param content_type: The content_type of this SecretContentDetails. + :type: str + """ + allowed_values = ["BASE64"] + if not value_allowed_none_or_none_sentinel(content_type, allowed_values): + raise ValueError( + "Invalid value for `content_type`, must be None or one of {0}" + .format(allowed_values) + ) + self._content_type = content_type + + @property + def name(self): + """ + Gets the name of this SecretContentDetails. + Names should be unique within a secret. Valid characters are uppercase or lowercase letters, numbers, hyphens, underscores, and periods. + + + :return: The name of this SecretContentDetails. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this SecretContentDetails. + Names should be unique within a secret. Valid characters are uppercase or lowercase letters, numbers, hyphens, underscores, and periods. + + + :param name: The name of this SecretContentDetails. + :type: str + """ + self._name = name + + @property + def stage(self): + """ + Gets the stage of this SecretContentDetails. + The rotation state of the secret content. The default is `CURRENT`, meaning that the secret is currently in use. A secret version + that you mark as `PENDING` is staged and available for use, but you don't yet want to rotate it into current, active use. For example, + you might create or update a secret and mark its rotation state as `PENDING` if you haven't yet updated the secret on the target system. + When creating a secret, only the value `CURRENT` is applicable, although the value `LATEST` is also automatically applied. When updating + a secret, you can specify a version's rotation state as either `CURRENT` or `PENDING`. + + Allowed values for this property are: "CURRENT", "PENDING" + + + :return: The stage of this SecretContentDetails. + :rtype: str + """ + return self._stage + + @stage.setter + def stage(self, stage): + """ + Sets the stage of this SecretContentDetails. + The rotation state of the secret content. The default is `CURRENT`, meaning that the secret is currently in use. A secret version + that you mark as `PENDING` is staged and available for use, but you don't yet want to rotate it into current, active use. For example, + you might create or update a secret and mark its rotation state as `PENDING` if you haven't yet updated the secret on the target system. + When creating a secret, only the value `CURRENT` is applicable, although the value `LATEST` is also automatically applied. When updating + a secret, you can specify a version's rotation state as either `CURRENT` or `PENDING`. + + + :param stage: The stage of this SecretContentDetails. + :type: str + """ + allowed_values = ["CURRENT", "PENDING"] + if not value_allowed_none_or_none_sentinel(stage, allowed_values): + raise ValueError( + "Invalid value for `stage`, must be None or one of {0}" + .format(allowed_values) + ) + self._stage = stage + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/vault/models/secret_expiry_rule.py b/src/oci/vault/models/secret_expiry_rule.py new file mode 100644 index 0000000000..40876c1df5 --- /dev/null +++ b/src/oci/vault/models/secret_expiry_rule.py @@ -0,0 +1,169 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + +from .secret_rule import SecretRule +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 SecretExpiryRule(SecretRule): + """ + A rule that helps enforce the expiration of a secret's contents. + """ + + def __init__(self, **kwargs): + """ + Initializes a new SecretExpiryRule object with values from keyword arguments. The default value of the :py:attr:`~oci.vault.models.SecretExpiryRule.rule_type` attribute + of this class is ``SECRET_EXPIRY_RULE`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param rule_type: + The value to assign to the rule_type property of this SecretExpiryRule. + Allowed values for this property are: "SECRET_EXPIRY_RULE", "SECRET_REUSE_RULE" + :type rule_type: str + + :param secret_version_expiry_interval: + The value to assign to the secret_version_expiry_interval property of this SecretExpiryRule. + :type secret_version_expiry_interval: str + + :param time_of_absolute_expiry: + The value to assign to the time_of_absolute_expiry property of this SecretExpiryRule. + :type time_of_absolute_expiry: datetime + + :param is_secret_content_retrieval_blocked_on_expiry: + The value to assign to the is_secret_content_retrieval_blocked_on_expiry property of this SecretExpiryRule. + :type is_secret_content_retrieval_blocked_on_expiry: bool + + """ + self.swagger_types = { + 'rule_type': 'str', + 'secret_version_expiry_interval': 'str', + 'time_of_absolute_expiry': 'datetime', + 'is_secret_content_retrieval_blocked_on_expiry': 'bool' + } + + self.attribute_map = { + 'rule_type': 'ruleType', + 'secret_version_expiry_interval': 'secretVersionExpiryInterval', + 'time_of_absolute_expiry': 'timeOfAbsoluteExpiry', + 'is_secret_content_retrieval_blocked_on_expiry': 'isSecretContentRetrievalBlockedOnExpiry' + } + + self._rule_type = None + self._secret_version_expiry_interval = None + self._time_of_absolute_expiry = None + self._is_secret_content_retrieval_blocked_on_expiry = None + self._rule_type = 'SECRET_EXPIRY_RULE' + + @property + def secret_version_expiry_interval(self): + """ + Gets the secret_version_expiry_interval of this SecretExpiryRule. + A property indicating how long the secret contents will be considered valid, expressed in + `ISO 8601`__ format. The secret needs to be + updated when the secret content expires. No enforcement mechanism exists at this time, but audit logs + record the expiration on the appropriate date, according to the time interval specified in the rule. + The timer resets after you update the secret contents. + The minimum value is 1 day and the maximum value is 90 days for this property. Currently, only intervals expressed in days are supported. + For example, pass `P3D` to have the secret version expire every 3 days. + + __ https://en.wikipedia.org/wiki/ISO_8601#Time_intervals + + + :return: The secret_version_expiry_interval of this SecretExpiryRule. + :rtype: str + """ + return self._secret_version_expiry_interval + + @secret_version_expiry_interval.setter + def secret_version_expiry_interval(self, secret_version_expiry_interval): + """ + Sets the secret_version_expiry_interval of this SecretExpiryRule. + A property indicating how long the secret contents will be considered valid, expressed in + `ISO 8601`__ format. The secret needs to be + updated when the secret content expires. No enforcement mechanism exists at this time, but audit logs + record the expiration on the appropriate date, according to the time interval specified in the rule. + The timer resets after you update the secret contents. + The minimum value is 1 day and the maximum value is 90 days for this property. Currently, only intervals expressed in days are supported. + For example, pass `P3D` to have the secret version expire every 3 days. + + __ https://en.wikipedia.org/wiki/ISO_8601#Time_intervals + + + :param secret_version_expiry_interval: The secret_version_expiry_interval of this SecretExpiryRule. + :type: str + """ + self._secret_version_expiry_interval = secret_version_expiry_interval + + @property + def time_of_absolute_expiry(self): + """ + Gets the time_of_absolute_expiry of this SecretExpiryRule. + An optional property indicating the absolute time when this secret will expire, expressed in `RFC 3339`__ timestamp format. + The minimum number of days from current time is 1 day and the maximum number of days from current time is 365 days. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_of_absolute_expiry of this SecretExpiryRule. + :rtype: datetime + """ + return self._time_of_absolute_expiry + + @time_of_absolute_expiry.setter + def time_of_absolute_expiry(self, time_of_absolute_expiry): + """ + Sets the time_of_absolute_expiry of this SecretExpiryRule. + An optional property indicating the absolute time when this secret will expire, expressed in `RFC 3339`__ timestamp format. + The minimum number of days from current time is 1 day and the maximum number of days from current time is 365 days. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_of_absolute_expiry: The time_of_absolute_expiry of this SecretExpiryRule. + :type: datetime + """ + self._time_of_absolute_expiry = time_of_absolute_expiry + + @property + def is_secret_content_retrieval_blocked_on_expiry(self): + """ + Gets the is_secret_content_retrieval_blocked_on_expiry of this SecretExpiryRule. + A property indicating whether to block retrieval of the secret content, on expiry. The default is false. + If the secret has already expired and you would like to retrieve the secret contents, + you need to edit the secret rule to disable this property, to allow reading the secret content. + + + :return: The is_secret_content_retrieval_blocked_on_expiry of this SecretExpiryRule. + :rtype: bool + """ + return self._is_secret_content_retrieval_blocked_on_expiry + + @is_secret_content_retrieval_blocked_on_expiry.setter + def is_secret_content_retrieval_blocked_on_expiry(self, is_secret_content_retrieval_blocked_on_expiry): + """ + Sets the is_secret_content_retrieval_blocked_on_expiry of this SecretExpiryRule. + A property indicating whether to block retrieval of the secret content, on expiry. The default is false. + If the secret has already expired and you would like to retrieve the secret contents, + you need to edit the secret rule to disable this property, to allow reading the secret content. + + + :param is_secret_content_retrieval_blocked_on_expiry: The is_secret_content_retrieval_blocked_on_expiry of this SecretExpiryRule. + :type: bool + """ + self._is_secret_content_retrieval_blocked_on_expiry = is_secret_content_retrieval_blocked_on_expiry + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/vault/models/secret_reuse_rule.py b/src/oci/vault/models/secret_reuse_rule.py new file mode 100644 index 0000000000..c8ae5b4105 --- /dev/null +++ b/src/oci/vault/models/secret_reuse_rule.py @@ -0,0 +1,79 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + +from .secret_rule import SecretRule +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 SecretReuseRule(SecretRule): + """ + A rule that disallows reuse of previously used secret content by the specified secret. + """ + + def __init__(self, **kwargs): + """ + Initializes a new SecretReuseRule object with values from keyword arguments. The default value of the :py:attr:`~oci.vault.models.SecretReuseRule.rule_type` attribute + of this class is ``SECRET_REUSE_RULE`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param rule_type: + The value to assign to the rule_type property of this SecretReuseRule. + Allowed values for this property are: "SECRET_EXPIRY_RULE", "SECRET_REUSE_RULE" + :type rule_type: str + + :param is_enforced_on_deleted_secret_versions: + The value to assign to the is_enforced_on_deleted_secret_versions property of this SecretReuseRule. + :type is_enforced_on_deleted_secret_versions: bool + + """ + self.swagger_types = { + 'rule_type': 'str', + 'is_enforced_on_deleted_secret_versions': 'bool' + } + + self.attribute_map = { + 'rule_type': 'ruleType', + 'is_enforced_on_deleted_secret_versions': 'isEnforcedOnDeletedSecretVersions' + } + + self._rule_type = None + self._is_enforced_on_deleted_secret_versions = None + self._rule_type = 'SECRET_REUSE_RULE' + + @property + def is_enforced_on_deleted_secret_versions(self): + """ + Gets the is_enforced_on_deleted_secret_versions of this SecretReuseRule. + A property indicating whether the rule is applied even if the secret version with the content you are trying to reuse was deleted. + + + :return: The is_enforced_on_deleted_secret_versions of this SecretReuseRule. + :rtype: bool + """ + return self._is_enforced_on_deleted_secret_versions + + @is_enforced_on_deleted_secret_versions.setter + def is_enforced_on_deleted_secret_versions(self, is_enforced_on_deleted_secret_versions): + """ + Sets the is_enforced_on_deleted_secret_versions of this SecretReuseRule. + A property indicating whether the rule is applied even if the secret version with the content you are trying to reuse was deleted. + + + :param is_enforced_on_deleted_secret_versions: The is_enforced_on_deleted_secret_versions of this SecretReuseRule. + :type: bool + """ + self._is_enforced_on_deleted_secret_versions = is_enforced_on_deleted_secret_versions + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/vault/models/secret_rule.py b/src/oci/vault/models/secret_rule.py new file mode 100644 index 0000000000..58865ea413 --- /dev/null +++ b/src/oci/vault/models/secret_rule.py @@ -0,0 +1,106 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + + +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 SecretRule(object): + """ + A rule that you can apply to a secret to enforce certain conditions on the secret's usage and management. + """ + + #: A constant which can be used with the rule_type property of a SecretRule. + #: This constant has a value of "SECRET_EXPIRY_RULE" + RULE_TYPE_SECRET_EXPIRY_RULE = "SECRET_EXPIRY_RULE" + + #: A constant which can be used with the rule_type property of a SecretRule. + #: This constant has a value of "SECRET_REUSE_RULE" + RULE_TYPE_SECRET_REUSE_RULE = "SECRET_REUSE_RULE" + + def __init__(self, **kwargs): + """ + Initializes a new SecretRule 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.vault.models.SecretExpiryRule` + * :class:`~oci.vault.models.SecretReuseRule` + + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param rule_type: + The value to assign to the rule_type property of this SecretRule. + Allowed values for this property are: "SECRET_EXPIRY_RULE", "SECRET_REUSE_RULE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type rule_type: str + + """ + self.swagger_types = { + 'rule_type': 'str' + } + + self.attribute_map = { + 'rule_type': 'ruleType' + } + + self._rule_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['ruleType'] + + if type == 'SECRET_EXPIRY_RULE': + return 'SecretExpiryRule' + + if type == 'SECRET_REUSE_RULE': + return 'SecretReuseRule' + else: + return 'SecretRule' + + @property + def rule_type(self): + """ + **[Required]** Gets the rule_type of this SecretRule. + The type of rule, which either controls when the secret contents expire or whether they can be reused. + + Allowed values for this property are: "SECRET_EXPIRY_RULE", "SECRET_REUSE_RULE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The rule_type of this SecretRule. + :rtype: str + """ + return self._rule_type + + @rule_type.setter + def rule_type(self, rule_type): + """ + Sets the rule_type of this SecretRule. + The type of rule, which either controls when the secret contents expire or whether they can be reused. + + + :param rule_type: The rule_type of this SecretRule. + :type: str + """ + allowed_values = ["SECRET_EXPIRY_RULE", "SECRET_REUSE_RULE"] + if not value_allowed_none_or_none_sentinel(rule_type, allowed_values): + rule_type = 'UNKNOWN_ENUM_VALUE' + self._rule_type = rule_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/vault/models/secret_summary.py b/src/oci/vault/models/secret_summary.py new file mode 100644 index 0000000000..c2b3bd8596 --- /dev/null +++ b/src/oci/vault/models/secret_summary.py @@ -0,0 +1,519 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + + +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 SecretSummary(object): + """ + The details of the secret, excluding the contents of the secret. + """ + + #: A constant which can be used with the lifecycle_state property of a SecretSummary. + #: This constant has a value of "CREATING" + LIFECYCLE_STATE_CREATING = "CREATING" + + #: A constant which can be used with the lifecycle_state property of a SecretSummary. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a SecretSummary. + #: This constant has a value of "UPDATING" + LIFECYCLE_STATE_UPDATING = "UPDATING" + + #: A constant which can be used with the lifecycle_state property of a SecretSummary. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + #: A constant which can be used with the lifecycle_state property of a SecretSummary. + #: This constant has a value of "DELETED" + LIFECYCLE_STATE_DELETED = "DELETED" + + #: A constant which can be used with the lifecycle_state property of a SecretSummary. + #: This constant has a value of "SCHEDULING_DELETION" + LIFECYCLE_STATE_SCHEDULING_DELETION = "SCHEDULING_DELETION" + + #: A constant which can be used with the lifecycle_state property of a SecretSummary. + #: This constant has a value of "PENDING_DELETION" + LIFECYCLE_STATE_PENDING_DELETION = "PENDING_DELETION" + + #: A constant which can be used with the lifecycle_state property of a SecretSummary. + #: This constant has a value of "CANCELLING_DELETION" + LIFECYCLE_STATE_CANCELLING_DELETION = "CANCELLING_DELETION" + + #: A constant which can be used with the lifecycle_state property of a SecretSummary. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + def __init__(self, **kwargs): + """ + Initializes a new SecretSummary 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 SecretSummary. + :type compartment_id: str + + :param defined_tags: + The value to assign to the defined_tags property of this SecretSummary. + :type defined_tags: dict(str, dict(str, object)) + + :param description: + The value to assign to the description property of this SecretSummary. + :type description: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this SecretSummary. + :type freeform_tags: dict(str, str) + + :param key_id: + The value to assign to the key_id property of this SecretSummary. + :type key_id: str + + :param id: + The value to assign to the id property of this SecretSummary. + :type id: str + + :param lifecycle_details: + The value to assign to the lifecycle_details property of this SecretSummary. + :type lifecycle_details: str + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this SecretSummary. + Allowed values for this property are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "SCHEDULING_DELETION", "PENDING_DELETION", "CANCELLING_DELETION", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param secret_name: + The value to assign to the secret_name property of this SecretSummary. + :type secret_name: str + + :param time_created: + The value to assign to the time_created property of this SecretSummary. + :type time_created: datetime + + :param time_of_current_version_expiry: + The value to assign to the time_of_current_version_expiry property of this SecretSummary. + :type time_of_current_version_expiry: datetime + + :param time_of_deletion: + The value to assign to the time_of_deletion property of this SecretSummary. + :type time_of_deletion: datetime + + :param vault_id: + The value to assign to the vault_id property of this SecretSummary. + :type vault_id: str + + """ + self.swagger_types = { + 'compartment_id': 'str', + 'defined_tags': 'dict(str, dict(str, object))', + 'description': 'str', + 'freeform_tags': 'dict(str, str)', + 'key_id': 'str', + 'id': 'str', + 'lifecycle_details': 'str', + 'lifecycle_state': 'str', + 'secret_name': 'str', + 'time_created': 'datetime', + 'time_of_current_version_expiry': 'datetime', + 'time_of_deletion': 'datetime', + 'vault_id': 'str' + } + + self.attribute_map = { + 'compartment_id': 'compartmentId', + 'defined_tags': 'definedTags', + 'description': 'description', + 'freeform_tags': 'freeformTags', + 'key_id': 'keyId', + 'id': 'id', + 'lifecycle_details': 'lifecycleDetails', + 'lifecycle_state': 'lifecycleState', + 'secret_name': 'secretName', + 'time_created': 'timeCreated', + 'time_of_current_version_expiry': 'timeOfCurrentVersionExpiry', + 'time_of_deletion': 'timeOfDeletion', + 'vault_id': 'vaultId' + } + + self._compartment_id = None + self._defined_tags = None + self._description = None + self._freeform_tags = None + self._key_id = None + self._id = None + self._lifecycle_details = None + self._lifecycle_state = None + self._secret_name = None + self._time_created = None + self._time_of_current_version_expiry = None + self._time_of_deletion = None + self._vault_id = None + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this SecretSummary. + The OCID of the compartment that contains the secret. + + + :return: The compartment_id of this SecretSummary. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this SecretSummary. + The OCID of the compartment that contains the secret. + + + :param compartment_id: The compartment_id of this SecretSummary. + :type: str + """ + self._compartment_id = compartment_id + + @property + def defined_tags(self): + """ + Gets the defined_tags of this SecretSummary. + 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/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this SecretSummary. + :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 SecretSummary. + 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/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this SecretSummary. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def description(self): + """ + Gets the description of this SecretSummary. + A brief description of the secret. + + + :return: The description of this SecretSummary. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this SecretSummary. + A brief description of the secret. + + + :param description: The description of this SecretSummary. + :type: str + """ + self._description = description + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this SecretSummary. + 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/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this SecretSummary. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this SecretSummary. + 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/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this SecretSummary. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def key_id(self): + """ + Gets the key_id of this SecretSummary. + The OCID of the master encryption key that is used to encrypt the secret. + + + :return: The key_id of this SecretSummary. + :rtype: str + """ + return self._key_id + + @key_id.setter + def key_id(self, key_id): + """ + Sets the key_id of this SecretSummary. + The OCID of the master encryption key that is used to encrypt the secret. + + + :param key_id: The key_id of this SecretSummary. + :type: str + """ + self._key_id = key_id + + @property + def id(self): + """ + **[Required]** Gets the id of this SecretSummary. + The OCID of the secret. + + + :return: The id of this SecretSummary. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this SecretSummary. + The OCID of the secret. + + + :param id: The id of this SecretSummary. + :type: str + """ + self._id = id + + @property + def lifecycle_details(self): + """ + Gets the lifecycle_details of this SecretSummary. + Additional information about the secret's current lifecycle state. + + + :return: The lifecycle_details of this SecretSummary. + :rtype: str + """ + return self._lifecycle_details + + @lifecycle_details.setter + def lifecycle_details(self, lifecycle_details): + """ + Sets the lifecycle_details of this SecretSummary. + Additional information about the secret's current lifecycle state. + + + :param lifecycle_details: The lifecycle_details of this SecretSummary. + :type: str + """ + self._lifecycle_details = lifecycle_details + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this SecretSummary. + The current lifecycle state of the secret. + + Allowed values for this property are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "SCHEDULING_DELETION", "PENDING_DELETION", "CANCELLING_DELETION", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this SecretSummary. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this SecretSummary. + The current lifecycle state of the secret. + + + :param lifecycle_state: The lifecycle_state of this SecretSummary. + :type: str + """ + allowed_values = ["CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "SCHEDULING_DELETION", "PENDING_DELETION", "CANCELLING_DELETION", "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 secret_name(self): + """ + **[Required]** Gets the secret_name of this SecretSummary. + The name of the secret. + + + :return: The secret_name of this SecretSummary. + :rtype: str + """ + return self._secret_name + + @secret_name.setter + def secret_name(self, secret_name): + """ + Sets the secret_name of this SecretSummary. + The name of the secret. + + + :param secret_name: The secret_name of this SecretSummary. + :type: str + """ + self._secret_name = secret_name + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this SecretSummary. + A property indicating when the secret was created, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_created of this SecretSummary. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this SecretSummary. + A property indicating when the secret was created, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_created: The time_created of this SecretSummary. + :type: datetime + """ + self._time_created = time_created + + @property + def time_of_current_version_expiry(self): + """ + Gets the time_of_current_version_expiry of this SecretSummary. + An optional property indicating when the current secret version will expire, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_of_current_version_expiry of this SecretSummary. + :rtype: datetime + """ + return self._time_of_current_version_expiry + + @time_of_current_version_expiry.setter + def time_of_current_version_expiry(self, time_of_current_version_expiry): + """ + Sets the time_of_current_version_expiry of this SecretSummary. + An optional property indicating when the current secret version will expire, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_of_current_version_expiry: The time_of_current_version_expiry of this SecretSummary. + :type: datetime + """ + self._time_of_current_version_expiry = time_of_current_version_expiry + + @property + def time_of_deletion(self): + """ + Gets the time_of_deletion of this SecretSummary. + An optional property indicating when to delete the secret, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_of_deletion of this SecretSummary. + :rtype: datetime + """ + return self._time_of_deletion + + @time_of_deletion.setter + def time_of_deletion(self, time_of_deletion): + """ + Sets the time_of_deletion of this SecretSummary. + An optional property indicating when to delete the secret, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_of_deletion: The time_of_deletion of this SecretSummary. + :type: datetime + """ + self._time_of_deletion = time_of_deletion + + @property + def vault_id(self): + """ + **[Required]** Gets the vault_id of this SecretSummary. + The OCID of the Vault in which the secret exists + + + :return: The vault_id of this SecretSummary. + :rtype: str + """ + return self._vault_id + + @vault_id.setter + def vault_id(self, vault_id): + """ + Sets the vault_id of this SecretSummary. + The OCID of the Vault in which the secret exists + + + :param vault_id: The vault_id of this SecretSummary. + :type: str + """ + self._vault_id = vault_id + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/vault/models/secret_version.py b/src/oci/vault/models/secret_version.py new file mode 100644 index 0000000000..d98d08f284 --- /dev/null +++ b/src/oci/vault/models/secret_version.py @@ -0,0 +1,354 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + + +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 SecretVersion(object): + """ + The details of the secret version, excluding the contents of the secret. + """ + + #: A constant which can be used with the content_type property of a SecretVersion. + #: This constant has a value of "BASE64" + CONTENT_TYPE_BASE64 = "BASE64" + + #: A constant which can be used with the stages property of a SecretVersion. + #: This constant has a value of "CURRENT" + STAGES_CURRENT = "CURRENT" + + #: A constant which can be used with the stages property of a SecretVersion. + #: This constant has a value of "PENDING" + STAGES_PENDING = "PENDING" + + #: A constant which can be used with the stages property of a SecretVersion. + #: This constant has a value of "LATEST" + STAGES_LATEST = "LATEST" + + #: A constant which can be used with the stages property of a SecretVersion. + #: This constant has a value of "PREVIOUS" + STAGES_PREVIOUS = "PREVIOUS" + + #: A constant which can be used with the stages property of a SecretVersion. + #: This constant has a value of "DEPRECATED" + STAGES_DEPRECATED = "DEPRECATED" + + def __init__(self, **kwargs): + """ + Initializes a new SecretVersion object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param content_type: + The value to assign to the content_type property of this SecretVersion. + Allowed values for this property are: "BASE64", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type content_type: str + + :param name: + The value to assign to the name property of this SecretVersion. + :type name: str + + :param secret_id: + The value to assign to the secret_id property of this SecretVersion. + :type secret_id: str + + :param stages: + The value to assign to the stages property of this SecretVersion. + Allowed values for items in this list are: "CURRENT", "PENDING", "LATEST", "PREVIOUS", "DEPRECATED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type stages: list[str] + + :param time_created: + The value to assign to the time_created property of this SecretVersion. + :type time_created: datetime + + :param time_of_deletion: + The value to assign to the time_of_deletion property of this SecretVersion. + :type time_of_deletion: datetime + + :param time_of_current_version_expiry: + The value to assign to the time_of_current_version_expiry property of this SecretVersion. + :type time_of_current_version_expiry: datetime + + :param version_number: + The value to assign to the version_number property of this SecretVersion. + :type version_number: int + + """ + self.swagger_types = { + 'content_type': 'str', + 'name': 'str', + 'secret_id': 'str', + 'stages': 'list[str]', + 'time_created': 'datetime', + 'time_of_deletion': 'datetime', + 'time_of_current_version_expiry': 'datetime', + 'version_number': 'int' + } + + self.attribute_map = { + 'content_type': 'contentType', + 'name': 'name', + 'secret_id': 'secretId', + 'stages': 'stages', + 'time_created': 'timeCreated', + 'time_of_deletion': 'timeOfDeletion', + 'time_of_current_version_expiry': 'timeOfCurrentVersionExpiry', + 'version_number': 'versionNumber' + } + + self._content_type = None + self._name = None + self._secret_id = None + self._stages = None + self._time_created = None + self._time_of_deletion = None + self._time_of_current_version_expiry = None + self._version_number = None + + @property + def content_type(self): + """ + Gets the content_type of this SecretVersion. + The content type of the secret version's secret contents. + + Allowed values for this property are: "BASE64", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The content_type of this SecretVersion. + :rtype: str + """ + return self._content_type + + @content_type.setter + def content_type(self, content_type): + """ + Sets the content_type of this SecretVersion. + The content type of the secret version's secret contents. + + + :param content_type: The content_type of this SecretVersion. + :type: str + """ + allowed_values = ["BASE64"] + if not value_allowed_none_or_none_sentinel(content_type, allowed_values): + content_type = 'UNKNOWN_ENUM_VALUE' + self._content_type = content_type + + @property + def name(self): + """ + Gets the name of this SecretVersion. + The name of the secret version. A name is unique across versions of a secret. + + + :return: The name of this SecretVersion. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this SecretVersion. + The name of the secret version. A name is unique across versions of a secret. + + + :param name: The name of this SecretVersion. + :type: str + """ + self._name = name + + @property + def secret_id(self): + """ + Gets the secret_id of this SecretVersion. + The OCID of the secret. + + + :return: The secret_id of this SecretVersion. + :rtype: str + """ + return self._secret_id + + @secret_id.setter + def secret_id(self, secret_id): + """ + Sets the secret_id of this SecretVersion. + The OCID of the secret. + + + :param secret_id: The secret_id of this SecretVersion. + :type: str + """ + self._secret_id = secret_id + + @property + def stages(self): + """ + Gets the stages of this SecretVersion. + A list of possible rotation states for the secret version. A secret version marked `CURRENT` is currently in use. A secret version + marked `PENDING` is staged and available for use, but has not been applied on the target system and, therefore, has not been rotated + into current, active use. The secret most recently uploaded to a vault is always marked `LATEST`. (The first version of a secret is + always marked as both `CURRENT` and `LATEST`.) A secret version marked `PREVIOUS` is the secret version that was most recently marked + `CURRENT`, before the last secret version rotation. A secret version marked `DEPRECATED` is neither current, pending, nor the previous + one in use. Only secret versions marked `DEPRECATED` can be scheduled for deletion. + + Allowed values for items in this list are: "CURRENT", "PENDING", "LATEST", "PREVIOUS", "DEPRECATED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The stages of this SecretVersion. + :rtype: list[str] + """ + return self._stages + + @stages.setter + def stages(self, stages): + """ + Sets the stages of this SecretVersion. + A list of possible rotation states for the secret version. A secret version marked `CURRENT` is currently in use. A secret version + marked `PENDING` is staged and available for use, but has not been applied on the target system and, therefore, has not been rotated + into current, active use. The secret most recently uploaded to a vault is always marked `LATEST`. (The first version of a secret is + always marked as both `CURRENT` and `LATEST`.) A secret version marked `PREVIOUS` is the secret version that was most recently marked + `CURRENT`, before the last secret version rotation. A secret version marked `DEPRECATED` is neither current, pending, nor the previous + one in use. Only secret versions marked `DEPRECATED` can be scheduled for deletion. + + + :param stages: The stages of this SecretVersion. + :type: list[str] + """ + allowed_values = ["CURRENT", "PENDING", "LATEST", "PREVIOUS", "DEPRECATED"] + if stages: + stages[:] = ['UNKNOWN_ENUM_VALUE' if not value_allowed_none_or_none_sentinel(x, allowed_values) else x for x in stages] + self._stages = stages + + @property + def time_created(self): + """ + Gets the time_created of this SecretVersion. + A optional property indicating when the secret version was created, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_created of this SecretVersion. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this SecretVersion. + A optional property indicating when the secret version was created, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_created: The time_created of this SecretVersion. + :type: datetime + """ + self._time_created = time_created + + @property + def time_of_deletion(self): + """ + Gets the time_of_deletion of this SecretVersion. + An optional property indicating when to delete the secret version, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_of_deletion of this SecretVersion. + :rtype: datetime + """ + return self._time_of_deletion + + @time_of_deletion.setter + def time_of_deletion(self, time_of_deletion): + """ + Sets the time_of_deletion of this SecretVersion. + An optional property indicating when to delete the secret version, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_of_deletion: The time_of_deletion of this SecretVersion. + :type: datetime + """ + self._time_of_deletion = time_of_deletion + + @property + def time_of_current_version_expiry(self): + """ + Gets the time_of_current_version_expiry of this SecretVersion. + An optional property indicating when the current secret version will expire, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_of_current_version_expiry of this SecretVersion. + :rtype: datetime + """ + return self._time_of_current_version_expiry + + @time_of_current_version_expiry.setter + def time_of_current_version_expiry(self, time_of_current_version_expiry): + """ + Sets the time_of_current_version_expiry of this SecretVersion. + An optional property indicating when the current secret version will expire, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_of_current_version_expiry: The time_of_current_version_expiry of this SecretVersion. + :type: datetime + """ + self._time_of_current_version_expiry = time_of_current_version_expiry + + @property + def version_number(self): + """ + Gets the version_number of this SecretVersion. + The version number of the secret. + + + :return: The version_number of this SecretVersion. + :rtype: int + """ + return self._version_number + + @version_number.setter + def version_number(self, version_number): + """ + Sets the version_number of this SecretVersion. + The version number of the secret. + + + :param version_number: The version_number of this SecretVersion. + :type: int + """ + self._version_number = version_number + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/vault/models/secret_version_summary.py b/src/oci/vault/models/secret_version_summary.py new file mode 100644 index 0000000000..969967a524 --- /dev/null +++ b/src/oci/vault/models/secret_version_summary.py @@ -0,0 +1,354 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + + +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 SecretVersionSummary(object): + """ + The secret version summary object, which doesn't include the contents of the secret. + """ + + #: A constant which can be used with the content_type property of a SecretVersionSummary. + #: This constant has a value of "BASE64" + CONTENT_TYPE_BASE64 = "BASE64" + + #: A constant which can be used with the stages property of a SecretVersionSummary. + #: This constant has a value of "CURRENT" + STAGES_CURRENT = "CURRENT" + + #: A constant which can be used with the stages property of a SecretVersionSummary. + #: This constant has a value of "PENDING" + STAGES_PENDING = "PENDING" + + #: A constant which can be used with the stages property of a SecretVersionSummary. + #: This constant has a value of "LATEST" + STAGES_LATEST = "LATEST" + + #: A constant which can be used with the stages property of a SecretVersionSummary. + #: This constant has a value of "PREVIOUS" + STAGES_PREVIOUS = "PREVIOUS" + + #: A constant which can be used with the stages property of a SecretVersionSummary. + #: This constant has a value of "DEPRECATED" + STAGES_DEPRECATED = "DEPRECATED" + + def __init__(self, **kwargs): + """ + Initializes a new SecretVersionSummary object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param content_type: + The value to assign to the content_type property of this SecretVersionSummary. + Allowed values for this property are: "BASE64", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type content_type: str + + :param name: + The value to assign to the name property of this SecretVersionSummary. + :type name: str + + :param secret_id: + The value to assign to the secret_id property of this SecretVersionSummary. + :type secret_id: str + + :param stages: + The value to assign to the stages property of this SecretVersionSummary. + Allowed values for items in this list are: "CURRENT", "PENDING", "LATEST", "PREVIOUS", "DEPRECATED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type stages: list[str] + + :param time_created: + The value to assign to the time_created property of this SecretVersionSummary. + :type time_created: datetime + + :param time_of_deletion: + The value to assign to the time_of_deletion property of this SecretVersionSummary. + :type time_of_deletion: datetime + + :param time_of_expiry: + The value to assign to the time_of_expiry property of this SecretVersionSummary. + :type time_of_expiry: datetime + + :param version_number: + The value to assign to the version_number property of this SecretVersionSummary. + :type version_number: int + + """ + self.swagger_types = { + 'content_type': 'str', + 'name': 'str', + 'secret_id': 'str', + 'stages': 'list[str]', + 'time_created': 'datetime', + 'time_of_deletion': 'datetime', + 'time_of_expiry': 'datetime', + 'version_number': 'int' + } + + self.attribute_map = { + 'content_type': 'contentType', + 'name': 'name', + 'secret_id': 'secretId', + 'stages': 'stages', + 'time_created': 'timeCreated', + 'time_of_deletion': 'timeOfDeletion', + 'time_of_expiry': 'timeOfExpiry', + 'version_number': 'versionNumber' + } + + self._content_type = None + self._name = None + self._secret_id = None + self._stages = None + self._time_created = None + self._time_of_deletion = None + self._time_of_expiry = None + self._version_number = None + + @property + def content_type(self): + """ + Gets the content_type of this SecretVersionSummary. + The content type of the secret version's secret contents. + + Allowed values for this property are: "BASE64", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The content_type of this SecretVersionSummary. + :rtype: str + """ + return self._content_type + + @content_type.setter + def content_type(self, content_type): + """ + Sets the content_type of this SecretVersionSummary. + The content type of the secret version's secret contents. + + + :param content_type: The content_type of this SecretVersionSummary. + :type: str + """ + allowed_values = ["BASE64"] + if not value_allowed_none_or_none_sentinel(content_type, allowed_values): + content_type = 'UNKNOWN_ENUM_VALUE' + self._content_type = content_type + + @property + def name(self): + """ + Gets the name of this SecretVersionSummary. + The name of the secret version. A name is unique across versions of a secret. + + + :return: The name of this SecretVersionSummary. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this SecretVersionSummary. + The name of the secret version. A name is unique across versions of a secret. + + + :param name: The name of this SecretVersionSummary. + :type: str + """ + self._name = name + + @property + def secret_id(self): + """ + **[Required]** Gets the secret_id of this SecretVersionSummary. + The OCID of the secret. + + + :return: The secret_id of this SecretVersionSummary. + :rtype: str + """ + return self._secret_id + + @secret_id.setter + def secret_id(self, secret_id): + """ + Sets the secret_id of this SecretVersionSummary. + The OCID of the secret. + + + :param secret_id: The secret_id of this SecretVersionSummary. + :type: str + """ + self._secret_id = secret_id + + @property + def stages(self): + """ + Gets the stages of this SecretVersionSummary. + A list of possible rotation states for the secret version. A secret version marked `CURRENT` is currently in use. A secret version + marked `PENDING` is staged and available for use, but has not been applied on the target system and, therefore, has not been rotated + into current, active use. The secret most recently uploaded to a vault is always marked `LATEST`. (The first version of a secret is + always marked as both `CURRENT` and `LATEST`.) A secret version marked `PREVIOUS` is the secret version that was most recently marked + `CURRENT`, before the last secret version rotation. A secret version marked `DEPRECATED` is neither current, pending, nor the previous + one in use. Only secret versions marked `DEPRECATED` can be scheduled for deletion. + + Allowed values for items in this list are: "CURRENT", "PENDING", "LATEST", "PREVIOUS", "DEPRECATED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The stages of this SecretVersionSummary. + :rtype: list[str] + """ + return self._stages + + @stages.setter + def stages(self, stages): + """ + Sets the stages of this SecretVersionSummary. + A list of possible rotation states for the secret version. A secret version marked `CURRENT` is currently in use. A secret version + marked `PENDING` is staged and available for use, but has not been applied on the target system and, therefore, has not been rotated + into current, active use. The secret most recently uploaded to a vault is always marked `LATEST`. (The first version of a secret is + always marked as both `CURRENT` and `LATEST`.) A secret version marked `PREVIOUS` is the secret version that was most recently marked + `CURRENT`, before the last secret version rotation. A secret version marked `DEPRECATED` is neither current, pending, nor the previous + one in use. Only secret versions marked `DEPRECATED` can be scheduled for deletion. + + + :param stages: The stages of this SecretVersionSummary. + :type: list[str] + """ + allowed_values = ["CURRENT", "PENDING", "LATEST", "PREVIOUS", "DEPRECATED"] + if stages: + stages[:] = ['UNKNOWN_ENUM_VALUE' if not value_allowed_none_or_none_sentinel(x, allowed_values) else x for x in stages] + self._stages = stages + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this SecretVersionSummary. + A optional property indicating when the secret version was created, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_created of this SecretVersionSummary. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this SecretVersionSummary. + A optional property indicating when the secret version was created, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_created: The time_created of this SecretVersionSummary. + :type: datetime + """ + self._time_created = time_created + + @property + def time_of_deletion(self): + """ + Gets the time_of_deletion of this SecretVersionSummary. + An optional property indicating when to delete the secret version, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_of_deletion of this SecretVersionSummary. + :rtype: datetime + """ + return self._time_of_deletion + + @time_of_deletion.setter + def time_of_deletion(self, time_of_deletion): + """ + Sets the time_of_deletion of this SecretVersionSummary. + An optional property indicating when to delete the secret version, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_of_deletion: The time_of_deletion of this SecretVersionSummary. + :type: datetime + """ + self._time_of_deletion = time_of_deletion + + @property + def time_of_expiry(self): + """ + Gets the time_of_expiry of this SecretVersionSummary. + An optional property indicating when the secret version will expire, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_of_expiry of this SecretVersionSummary. + :rtype: datetime + """ + return self._time_of_expiry + + @time_of_expiry.setter + def time_of_expiry(self, time_of_expiry): + """ + Sets the time_of_expiry of this SecretVersionSummary. + An optional property indicating when the secret version will expire, expressed in `RFC 3339`__ timestamp format. + Example: `2019-04-03T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_of_expiry: The time_of_expiry of this SecretVersionSummary. + :type: datetime + """ + self._time_of_expiry = time_of_expiry + + @property + def version_number(self): + """ + **[Required]** Gets the version_number of this SecretVersionSummary. + The version number of the secret. + + + :return: The version_number of this SecretVersionSummary. + :rtype: int + """ + return self._version_number + + @version_number.setter + def version_number(self, version_number): + """ + Sets the version_number of this SecretVersionSummary. + The version number of the secret. + + + :param version_number: The version_number of this SecretVersionSummary. + :type: int + """ + self._version_number = version_number + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/vault/models/update_secret_details.py b/src/oci/vault/models/update_secret_details.py new file mode 100644 index 0000000000..a762aa6cb9 --- /dev/null +++ b/src/oci/vault/models/update_secret_details.py @@ -0,0 +1,275 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + + +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 UpdateSecretDetails(object): + """ + Details for updating a secret. + """ + + def __init__(self, **kwargs): + """ + Initializes a new UpdateSecretDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param current_version_number: + The value to assign to the current_version_number property of this UpdateSecretDetails. + :type current_version_number: int + + :param defined_tags: + The value to assign to the defined_tags property of this UpdateSecretDetails. + :type defined_tags: dict(str, dict(str, object)) + + :param description: + The value to assign to the description property of this UpdateSecretDetails. + :type description: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this UpdateSecretDetails. + :type freeform_tags: dict(str, str) + + :param metadata: + The value to assign to the metadata property of this UpdateSecretDetails. + :type metadata: dict(str, object) + + :param secret_content: + The value to assign to the secret_content property of this UpdateSecretDetails. + :type secret_content: SecretContentDetails + + :param secret_rules: + The value to assign to the secret_rules property of this UpdateSecretDetails. + :type secret_rules: list[SecretRule] + + """ + self.swagger_types = { + 'current_version_number': 'int', + 'defined_tags': 'dict(str, dict(str, object))', + 'description': 'str', + 'freeform_tags': 'dict(str, str)', + 'metadata': 'dict(str, object)', + 'secret_content': 'SecretContentDetails', + 'secret_rules': 'list[SecretRule]' + } + + self.attribute_map = { + 'current_version_number': 'currentVersionNumber', + 'defined_tags': 'definedTags', + 'description': 'description', + 'freeform_tags': 'freeformTags', + 'metadata': 'metadata', + 'secret_content': 'secretContent', + 'secret_rules': 'secretRules' + } + + self._current_version_number = None + self._defined_tags = None + self._description = None + self._freeform_tags = None + self._metadata = None + self._secret_content = None + self._secret_rules = None + + @property + def current_version_number(self): + """ + Gets the current_version_number of this UpdateSecretDetails. + Details to update the secret version of the specified secret. The secret contents, + version number, and rules can't be specified at the same time. + Updating the secret contents automatically creates a new secret version. + + + :return: The current_version_number of this UpdateSecretDetails. + :rtype: int + """ + return self._current_version_number + + @current_version_number.setter + def current_version_number(self, current_version_number): + """ + Sets the current_version_number of this UpdateSecretDetails. + Details to update the secret version of the specified secret. The secret contents, + version number, and rules can't be specified at the same time. + Updating the secret contents automatically creates a new secret version. + + + :param current_version_number: The current_version_number of this UpdateSecretDetails. + :type: int + """ + self._current_version_number = current_version_number + + @property + def defined_tags(self): + """ + Gets the defined_tags of this UpdateSecretDetails. + 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/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this UpdateSecretDetails. + :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 UpdateSecretDetails. + 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/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this UpdateSecretDetails. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def description(self): + """ + Gets the description of this UpdateSecretDetails. + A brief description of the secret. Avoid entering confidential information. + + + :return: The description of this UpdateSecretDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this UpdateSecretDetails. + A brief description of the secret. Avoid entering confidential information. + + + :param description: The description of this UpdateSecretDetails. + :type: str + """ + self._description = description + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this UpdateSecretDetails. + 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/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this UpdateSecretDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this UpdateSecretDetails. + 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/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this UpdateSecretDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def metadata(self): + """ + Gets the metadata of this UpdateSecretDetails. + Additional metadata that you can use to provide context about how to use the secret or during rotation or + other administrative tasks. For example, for a secret that you use to connect to a database, the additional + metadata might specify the connection endpoint and the connection string. Provide additional metadata as key-value pairs. + + + :return: The metadata of this UpdateSecretDetails. + :rtype: dict(str, object) + """ + return self._metadata + + @metadata.setter + def metadata(self, metadata): + """ + Sets the metadata of this UpdateSecretDetails. + Additional metadata that you can use to provide context about how to use the secret or during rotation or + other administrative tasks. For example, for a secret that you use to connect to a database, the additional + metadata might specify the connection endpoint and the connection string. Provide additional metadata as key-value pairs. + + + :param metadata: The metadata of this UpdateSecretDetails. + :type: dict(str, object) + """ + self._metadata = metadata + + @property + def secret_content(self): + """ + Gets the secret_content of this UpdateSecretDetails. + + :return: The secret_content of this UpdateSecretDetails. + :rtype: SecretContentDetails + """ + return self._secret_content + + @secret_content.setter + def secret_content(self, secret_content): + """ + Sets the secret_content of this UpdateSecretDetails. + + :param secret_content: The secret_content of this UpdateSecretDetails. + :type: SecretContentDetails + """ + self._secret_content = secret_content + + @property + def secret_rules(self): + """ + Gets the secret_rules of this UpdateSecretDetails. + A list of rules to control how the secret is used and managed. + + + :return: The secret_rules of this UpdateSecretDetails. + :rtype: list[SecretRule] + """ + return self._secret_rules + + @secret_rules.setter + def secret_rules(self, secret_rules): + """ + Sets the secret_rules of this UpdateSecretDetails. + A list of rules to control how the secret is used and managed. + + + :param secret_rules: The secret_rules of this UpdateSecretDetails. + :type: list[SecretRule] + """ + self._secret_rules = secret_rules + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/vault/vaults_client.py b/src/oci/vault/vaults_client.py new file mode 100644 index 0000000000..252c1e6598 --- /dev/null +++ b/src/oci/vault/vaults_client.py @@ -0,0 +1,1105 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + +from __future__ import absolute_import + +from oci._vendor import requests # noqa: F401 +from oci._vendor import six + +from oci import retry # 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 +from .models import vault_type_mapping +missing = Sentinel("Missing") + + +class VaultsClient(object): + """ + API for managing secrets. + """ + + 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 `__. + """ + validate_config(config, signer=kwargs.get('signer')) + if 'signer' in kwargs: + signer = kwargs['signer'] + 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'), + 'timeout': kwargs.get('timeout'), + 'base_path': '/20180608', + 'service_endpoint_template': 'https://vaults.{region}.oci.{secondLevelDomain}', + 'skip_deserialization': kwargs.get('skip_deserialization', False) + } + self.base_client = BaseClient("vaults", config, signer, vault_type_mapping, **base_client_init_kwargs) + self.retry_strategy = kwargs.get('retry_strategy') + + def cancel_secret_deletion(self, secret_id, **kwargs): + """ + Cancels the pending deletion of the specified secret. Canceling + a scheduled deletion restores the secret's lifecycle state to what + it was before you scheduled the secret for deletion. + + + :param str secret_id: (required) + The OCID of the secret. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call for a + resource, set the `if-match` parameter to the value of the etag from a + previous GET or POST response for that resource. The resource will be + updated or deleted only if the etag you provide matches the resource's + current etag value. + + :param str opc_request_id: (optional) + Unique identifier for the request. If provided, the returned request ID + will include this value. Otherwise, a random request ID will be + generated by the service. + + :param obj 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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. 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`. + + :return: A :class:`~oci.response.Response` object with data of type None + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/secrets/{secretId}/actions/cancelDeletion" + method = "POST" + + # Don't accept unknown kwargs + expected_kwargs = [ + "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( + "cancel_secret_deletion got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "secretId": secret_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('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + 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.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + 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) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + + def cancel_secret_version_deletion(self, secret_id, secret_version_number, **kwargs): + """ + Cancels the scheduled deletion of a secret version. + + + :param str secret_id: (required) + The OCID of the secret. + + :param int secret_version_number: (required) + The version number of the secret. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call for a + resource, set the `if-match` parameter to the value of the etag from a + previous GET or POST response for that resource. The resource will be + updated or deleted only if the etag you provide matches the resource's + current etag value. + + :param str opc_request_id: (optional) + Unique identifier for the request. If provided, the returned request ID + will include this value. Otherwise, a random request ID will be + generated by the service. + + :param obj 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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. 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`. + + :return: A :class:`~oci.response.Response` object with data of type None + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/secrets/{secretId}/version/{secretVersionNumber}/actions/cancelDeletion" + method = "POST" + + # Don't accept unknown kwargs + expected_kwargs = [ + "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( + "cancel_secret_version_deletion got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "secretId": secret_id, + "secretVersionNumber": secret_version_number + } + + 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('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + 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.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + 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) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + + def change_secret_compartment(self, secret_id, change_secret_compartment_details, **kwargs): + """ + Moves a secret into a different compartment within the same tenancy. For information about + moving resources between compartments, see `Moving Resources to a Different Compartment`__. + + When provided, if-match is checked against the ETag values of the secret. + + __ https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes + + + :param str secret_id: (required) + The OCID of the secret. + + :param ChangeSecretCompartmentDetails change_secret_compartment_details: (required) + The updated compartment details. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call for a + resource, set the `if-match` parameter to the value of the etag from a + previous GET or POST response for that resource. The resource will be + updated or deleted only if the etag you provide matches the resource's + current etag value. + + :param str opc_request_id: (optional) + Unique identifier for the request. If provided, the returned request ID + will include this value. Otherwise, a random request ID will be + generated by the service. + + :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 (e.g., if a resource has been + deleted and purged from the system, then a retry of the original + creation request may be rejected). + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. 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`. + + :return: A :class:`~oci.response.Response` object with data of type None + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/secrets/{secretId}/actions/changeCompartment" + method = "POST" + + # Don't accept unknown kwargs + expected_kwargs = [ + "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( + "change_secret_compartment got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "secretId": secret_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('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + 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.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=change_secret_compartment_details) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=change_secret_compartment_details) + + def create_secret(self, create_secret_details, **kwargs): + """ + Creates a new secret according to the details of the request. + + This operation is not supported by the Oracle Cloud Infrastructure Terraform Provider. + + + :param CreateSecretDetails create_secret_details: (required) + Request to create a new secret. + + :param str opc_request_id: (optional) + Unique identifier for the request. If provided, the returned request ID + will include this value. Otherwise, a random request ID will be + generated by the service. + + :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 (e.g., if a resource has been + deleted and purged from the system, then a retry of the original + creation request may be rejected). + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. 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`. + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.vault.models.Secret` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/secrets" + method = "POST" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "opc_request_id", + "opc_retry_token" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "create_secret got unknown kwargs: {!r}".format(extra_kwargs)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing), + "opc-retry-token": kwargs.get("opc_retry_token", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + header_params=header_params, + body=create_secret_details, + response_type="Secret") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + header_params=header_params, + body=create_secret_details, + response_type="Secret") + + def get_secret(self, secret_id, **kwargs): + """ + Gets information about the specified secret. + + + :param str secret_id: (required) + The OCID of the secret. + + :param str opc_request_id: (optional) + Unique identifier for the request. If provided, the returned request ID + will include this value. Otherwise, a random request ID will be + generated by the service. + + :param obj 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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. 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`. + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.vault.models.Secret` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/secrets/{secretId}" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "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( + "get_secret got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "secretId": secret_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('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + 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.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + 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="Secret") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="Secret") + + def get_secret_version(self, secret_id, secret_version_number, **kwargs): + """ + Gets information about the specified version of a secret. + + + :param str secret_id: (required) + The OCID of the secret. + + :param int secret_version_number: (required) + The version number of the secret. + + :param str opc_request_id: (optional) + Unique identifier for the request. If provided, the returned request ID + will include this value. Otherwise, a random request ID will be + generated by the service. + + :param obj 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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. 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`. + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.vault.models.SecretVersion` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/secrets/{secretId}/version/{secretVersionNumber}" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "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( + "get_secret_version got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "secretId": secret_id, + "secretVersionNumber": secret_version_number + } + + 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('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + 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.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + 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="SecretVersion") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="SecretVersion") + + def list_secret_versions(self, secret_id, **kwargs): + """ + Lists all secret versions for the specified secret. + + + :param str secret_id: (required) + The OCID of the secret. + + :param int limit: (optional) + The maximum number of items to return in a paginated \"List\" call. + + :param str page: (optional) + The value of the `opc-next-page` response header + from the previous \"List\" call. + + :param str opc_request_id: (optional) + Unique identifier for the request. If provided, the returned request ID + will include this value. Otherwise, a random request ID will be + generated by the service. + + :param str sort_by: (optional) + The field to sort by. Only one sort order may be provided. Time created is default ordered as descending. Display name is default ordered as ascending. + + Allowed values are: "VERSION_NUMBER" + + :param str sort_order: (optional) + The sort order to use, either ascending (`ASC`) or descending (`DESC`). + + Allowed values are: "ASC", "DESC" + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. 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`. + + :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.vault.models.SecretVersionSummary` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/secrets/{secretId}/versions" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "limit", + "page", + "opc_request_id", + "sort_by", + "sort_order" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_secret_versions got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "secretId": secret_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('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + if 'sort_by' in kwargs: + sort_by_allowed_values = ["VERSION_NUMBER"] + if kwargs['sort_by'] not in sort_by_allowed_values: + raise ValueError( + "Invalid value for `sort_by`, must be one of {0}".format(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( + "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) + ) + + query_params = { + "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.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + 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[SecretVersionSummary]") + 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[SecretVersionSummary]") + + def list_secrets(self, compartment_id, **kwargs): + """ + Lists all secrets in the specified vault and compartment. + + + :param str compartment_id: (required) + The OCID of the compartment. + + :param str name: (optional) + The secret name. + + :param int limit: (optional) + The maximum number of items to return in a paginated \"List\" call. + + :param str page: (optional) + The value of the `opc-next-page` response header + from the previous \"List\" call. + + :param str opc_request_id: (optional) + Unique identifier for the request. If provided, the returned request ID + will include this value. Otherwise, a random request ID will be + generated by the service. + + :param str sort_by: (optional) + The field to sort by. You can specify only one sort order. The default order for + `TIMECREATED` is descending. The default order for `NAME` is ascending. + + Allowed values are: "TIMECREATED", "NAME" + + :param str sort_order: (optional) + The sort order to use, either ascending (`ASC`) or descending (`DESC`). + + Allowed values are: "ASC", "DESC" + + :param str vault_id: (optional) + The OCID of the vault. + + :param str lifecycle_state: (optional) + A filter that returns only resources that match the specified lifecycle state. The state value is case-insensitive. + + Allowed values are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "SCHEDULING_DELETION", "PENDING_DELETION", "CANCELLING_DELETION", "FAILED" + + :param obj 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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. 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`. + + :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.vault.models.SecretSummary` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/secrets" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "name", + "limit", + "page", + "opc_request_id", + "sort_by", + "sort_order", + "vault_id", + "lifecycle_state" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_secrets got unknown kwargs: {!r}".format(extra_kwargs)) + + if 'sort_by' in kwargs: + sort_by_allowed_values = ["TIMECREATED", "NAME"] + if kwargs['sort_by'] not in sort_by_allowed_values: + raise ValueError( + "Invalid value for `sort_by`, must be one of {0}".format(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( + "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) + ) + + if 'lifecycle_state' in kwargs: + lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "SCHEDULING_DELETION", "PENDING_DELETION", "CANCELLING_DELETION", "FAILED"] + if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: + raise ValueError( + "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) + ) + + query_params = { + "compartmentId": compartment_id, + "name": kwargs.get("name", missing), + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", missing), + "sortBy": kwargs.get("sort_by", missing), + "sortOrder": kwargs.get("sort_order", missing), + "vaultId": kwargs.get("vault_id", 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.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="list[SecretSummary]") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="list[SecretSummary]") + + def schedule_secret_deletion(self, secret_id, schedule_secret_deletion_details, **kwargs): + """ + Schedules the deletion of the specified secret. This sets the lifecycle state of the secret + to `PENDING_DELETION` and then deletes it after the specified retention period ends. + + + :param str secret_id: (required) + The OCID of the secret. + + :param ScheduleSecretDeletionDetails schedule_secret_deletion_details: (required) + Request to schedule the deletion of a secret. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call for a + resource, set the `if-match` parameter to the value of the etag from a + previous GET or POST response for that resource. The resource will be + updated or deleted only if the etag you provide matches the resource's + current etag value. + + :param str opc_request_id: (optional) + Unique identifier for the request. If provided, the returned request ID + will include this value. Otherwise, a random request ID will be + generated by the service. + + :param obj 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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. 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`. + + :return: A :class:`~oci.response.Response` object with data of type None + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/secrets/{secretId}/actions/scheduleDeletion" + method = "POST" + + # Don't accept unknown kwargs + expected_kwargs = [ + "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( + "schedule_secret_deletion got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "secretId": secret_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('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + 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.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + 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=schedule_secret_deletion_details) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=schedule_secret_deletion_details) + + def schedule_secret_version_deletion(self, secret_id, secret_version_number, schedule_secret_version_deletion_details, **kwargs): + """ + Schedules the deletion of the specified secret version. This deletes it after the specified retention period ends. You can only + delete a secret version if the secret version rotation state is marked as `DEPRECATED`. + + + :param str secret_id: (required) + The OCID of the secret. + + :param int secret_version_number: (required) + The version number of the secret. + + :param ScheduleSecretVersionDeletionDetails schedule_secret_version_deletion_details: (required) + Request to delete a secret version. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call for a + resource, set the `if-match` parameter to the value of the etag from a + previous GET or POST response for that resource. The resource will be + updated or deleted only if the etag you provide matches the resource's + current etag value. + + :param str opc_request_id: (optional) + Unique identifier for the request. If provided, the returned request ID + will include this value. Otherwise, a random request ID will be + generated by the service. + + :param obj 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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. 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`. + + :return: A :class:`~oci.response.Response` object with data of type None + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/secrets/{secretId}/version/{secretVersionNumber}/actions/scheduleDeletion" + method = "POST" + + # Don't accept unknown kwargs + expected_kwargs = [ + "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( + "schedule_secret_version_deletion got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "secretId": secret_id, + "secretVersionNumber": secret_version_number + } + + 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('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + 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.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + 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=schedule_secret_version_deletion_details) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=schedule_secret_version_deletion_details) + + def update_secret(self, secret_id, update_secret_details, **kwargs): + """ + Updates the properties of a secret. Specifically, you can update the version number of the secret to make + that version number the current version. You can also update a secret's description, its free-form or defined tags, rules + and the secret contents. Updating the secret content automatically creates a new secret version. You cannot, however, update the current secret version number and the secret contents and the rules at the + same time. Furthermore, the secret must in an `ACTIVE` lifecycle state to be updated. + + This operation is not supported by the Oracle Cloud Infrastructure Terraform Provider. + + + :param str secret_id: (required) + The OCID of the secret. + + :param UpdateSecretDetails update_secret_details: (required) + Request to update a secret. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call for a + resource, set the `if-match` parameter to the value of the etag from a + previous GET or POST response for that resource. The resource will be + updated or deleted only if the etag you provide matches the resource's + current etag value. + + :param str opc_request_id: (optional) + Unique identifier for the request. If provided, the returned request ID + will include this value. Otherwise, a random request ID will be + generated by the service. + + :param obj 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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. 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`. + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.vault.models.Secret` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/secrets/{secretId}" + method = "PUT" + + # Don't accept unknown kwargs + expected_kwargs = [ + "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( + "update_secret got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "secretId": secret_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('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + 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.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + 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_secret_details, + response_type="Secret") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=update_secret_details, + response_type="Secret") diff --git a/src/oci/vault/vaults_client_composite_operations.py b/src/oci/vault/vaults_client_composite_operations.py new file mode 100644 index 0000000000..b69451504e --- /dev/null +++ b/src/oci/vault/vaults_client_composite_operations.py @@ -0,0 +1,102 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + +import oci # noqa: F401 +from oci.util import WAIT_RESOURCE_NOT_FOUND # noqa: F401 + + +class VaultsClientCompositeOperations(object): + """ + This class provides a wrapper around :py:class:`~oci.vault.VaultsClient` 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 VaultsClientCompositeOperations object + + :param VaultsClient client: + The service client which will be wrapped by this object + """ + self.client = client + + def create_secret_and_wait_for_state(self, create_secret_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.vault.VaultsClient.create_secret` and waits for the :py:class:`~oci.vault.models.Secret` acted upon + to enter the given state(s). + + :param CreateSecretDetails create_secret_details: (required) + Request to create a new secret. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.vault.models.Secret.lifecycle_state` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.vault.VaultsClient.create_secret` + + :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_secret(create_secret_details, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.data.id + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_secret(wait_for_resource_id), + 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 Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def update_secret_and_wait_for_state(self, secret_id, update_secret_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.vault.VaultsClient.update_secret` and waits for the :py:class:`~oci.vault.models.Secret` acted upon + to enter the given state(s). + + :param str secret_id: (required) + The OCID of the secret. + + :param UpdateSecretDetails update_secret_details: (required) + Request to update a secret. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.vault.models.Secret.lifecycle_state` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.vault.VaultsClient.update_secret` + + :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_secret(secret_id, update_secret_details, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.data.id + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_secret(wait_for_resource_id), + 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 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 3d37ebc337..72272b391b 100644 --- a/src/oci/version.py +++ b/src/oci/version.py @@ -1,4 +1,4 @@ # coding: utf-8 # Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. -__version__ = "2.12.1" +__version__ = "2.12.2" diff --git a/src/oci/waas/redirect_client.py b/src/oci/waas/redirect_client.py index 7a040045b2..f8dc25f116 100644 --- a/src/oci/waas/redirect_client.py +++ b/src/oci/waas/redirect_client.py @@ -82,7 +82,6 @@ def __init__(self, config, **kwargs): def change_http_redirect_compartment(self, http_redirect_id, change_http_redirect_compartment_details, **kwargs): """ - Moves HTTP Redirect into a different compartment. Moves HTTP Redirect into a different compartment. When provided, If-Match is checked against ETag values of the WAAS policy. @@ -173,7 +172,6 @@ def change_http_redirect_compartment(self, http_redirect_id, change_http_redirec def create_http_redirect(self, create_http_redirect_details, **kwargs): """ Creates a new HTTP Redirect on the WAF edge. - Creates a new HTTP Redirect on the WAF edge. :param CreateHttpRedirectDetails create_http_redirect_details: (required) @@ -242,7 +240,6 @@ def create_http_redirect(self, create_http_redirect_details, **kwargs): def delete_http_redirect(self, http_redirect_id, **kwargs): """ Deletes a redirect. - Deletes a redirect. :param str http_redirect_id: (required) @@ -327,7 +324,6 @@ def delete_http_redirect(self, http_redirect_id, **kwargs): def get_http_redirect(self, http_redirect_id, **kwargs): """ - Returns the details of a redirect. Gets the details of a HTTP Redirect. @@ -402,7 +398,6 @@ def get_http_redirect(self, http_redirect_id, **kwargs): def list_http_redirects(self, compartment_id, **kwargs): """ - Returns the list of HTTP Redirects for the given compartment ID. Gets a list of HTTP Redirects. @@ -545,7 +540,6 @@ def list_http_redirects(self, compartment_id, **kwargs): def update_http_redirect(self, http_redirect_id, update_http_redirect_details, **kwargs): """ - Updates the details of a redirect. Updates the details of a HTTP Redirect, including target and tags. Only the fields specified in the request body will be updated; all other properties will remain unchanged. diff --git a/src/oci/waas/waas_client.py b/src/oci/waas/waas_client.py index a0aefde79d..1ffbe671b8 100644 --- a/src/oci/waas/waas_client.py +++ b/src/oci/waas/waas_client.py @@ -82,7 +82,6 @@ def __init__(self, config, **kwargs): def accept_recommendations(self, waas_policy_id, protection_rule_keys, **kwargs): """ - Accepts a list of recommended Web Application Firewall protection rules. Accepts a list of recommended Web Application Firewall protection rules. Web Application Firewall protection rule recommendations are sets of rules generated by observed traffic patterns through the Web Application Firewall and are meant to optimize the Web Application Firewall's security profile. Only the rules specified in the request body will be updated; all other rules will remain unchanged. Use the `GET /waasPolicies/{waasPolicyId}/wafConfig/recommendations` method to view a list of recommended Web Application Firewall protection rules. For more information, see `WAF Protection Rules`__. @@ -168,7 +167,6 @@ def accept_recommendations(self, waas_policy_id, protection_rule_keys, **kwargs) def cancel_work_request(self, work_request_id, **kwargs): """ - Cancels a work request. Cancels a specified work request. @@ -254,7 +252,6 @@ def cancel_work_request(self, work_request_id, **kwargs): def change_address_list_compartment(self, address_list_id, change_address_list_compartment_details, **kwargs): """ - Moves address list into a different compartment. Moves address list into a different compartment. When provided, If-Match is checked against ETag values of the address list. For information about moving resources between compartments, see `Moving Resources to a Different Compartment`__. @@ -348,7 +345,6 @@ def change_address_list_compartment(self, address_list_id, change_address_list_c def change_certificate_compartment(self, certificate_id, change_certificate_compartment_details, **kwargs): """ - Moves certificate into a different compartment. Moves certificate into a different compartment. When provided, If-Match is checked against ETag values of the certificate. For information about moving resources between compartments, see `Moving Resources to a Different Compartment`__. @@ -441,7 +437,6 @@ def change_certificate_compartment(self, certificate_id, change_certificate_comp def change_custom_protection_rule_compartment(self, custom_protection_rule_id, change_custom_protection_rule_compartment_details, **kwargs): """ - Moves Custom Protection rule into a different compartment. Moves a custom protection rule into a different compartment within the same tenancy. When provided, If-Match is checked against ETag values of the custom protection rule. For information about moving resources between compartments, see `Moving Resources to a Different Compartment`__. __ https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes @@ -533,7 +528,6 @@ def change_custom_protection_rule_compartment(self, custom_protection_rule_id, c def change_waas_policy_compartment(self, waas_policy_id, change_waas_policy_compartment_details, **kwargs): """ - Moves WAAS policy into a different compartment. Moves WAAS policy into a different compartment. When provided, If-Match is checked against ETag values of the WAAS policy. For information about moving resources between compartments, see `Moving Resources to a Different Compartment`__. @@ -626,7 +620,6 @@ def change_waas_policy_compartment(self, waas_policy_id, change_waas_policy_comp def create_address_list(self, create_address_list_details, **kwargs): """ - Creates an address list. Creates an address list in a set compartment and allows it to be used in a WAAS policy and referenced by access rules. Addresses can be IP addresses and CIDR notations. @@ -697,7 +690,6 @@ def create_address_list(self, create_address_list_details, **kwargs): def create_certificate(self, create_certificate_details, **kwargs): """ - Creates a certificate resource for the uploaded X.509 certificate. Allows an SSL certificate to be added to a WAAS policy. The Web Application Firewall terminates SSL connections to inspect requests in runtime, and then re-encrypts requests before sending them to the origin for fulfillment. For more information, see `WAF Settings`__. @@ -773,7 +765,6 @@ def create_certificate(self, create_certificate_details, **kwargs): def create_custom_protection_rule(self, create_custom_protection_rule_details, **kwargs): """ Creates a new custom protection rule in the specified compartment. - Creates a new custom protection rule in the specified compartment. Custom protection rules allow you to create rules in addition to the rulesets provided by the Web Application Firewall service, including rules from `ModSecurity`__. The syntax for custom rules is based on the ModSecurity syntax. For more information about custom protection rules, see `Custom Protection Rules`__. @@ -848,7 +839,6 @@ def create_custom_protection_rule(self, create_custom_protection_rule_details, * def create_waas_policy(self, create_waas_policy_details, **kwargs): """ - Creates a new policy in the specified compartment. Creates a new Web Application Acceleration and Security (WAAS) policy in the specified compartment. A WAAS policy must be established before creating Web Application Firewall (WAF) rules. To use WAF rules, your web application's origin servers must defined in the `WaasPolicy` schema. A domain name must be specified when creating a WAAS policy. The domain name should be different from the origins specified in your `WaasPolicy`. Once domain name is entered and stored, it is unchangeable. @@ -932,7 +922,6 @@ def create_waas_policy(self, create_waas_policy_details, **kwargs): def delete_address_list(self, address_list_id, **kwargs): """ - Deletes an address list. Deletes the address list from the compartment if it is not used. @@ -1018,7 +1007,6 @@ def delete_address_list(self, address_list_id, **kwargs): def delete_certificate(self, certificate_id, **kwargs): """ - Deletes a certificate. Deletes an SSL certificate from the WAAS service. @@ -1105,7 +1093,6 @@ def delete_certificate(self, certificate_id, **kwargs): def delete_custom_protection_rule(self, custom_protection_rule_id, **kwargs): """ Deletes a Custom Protection rule. - Deletes a Custom Protection rule. :param str custom_protection_rule_id: (required) @@ -1191,7 +1178,6 @@ def delete_custom_protection_rule(self, custom_protection_rule_id, **kwargs): def delete_waas_policy(self, waas_policy_id, **kwargs): """ Deletes a policy. - Deletes a policy. :param str waas_policy_id: (required) @@ -1276,7 +1262,6 @@ def delete_waas_policy(self, waas_policy_id, **kwargs): def get_address_list(self, address_list_id, **kwargs): """ - Returns the details of an address list. Gets the details of an address list. @@ -1351,7 +1336,6 @@ def get_address_list(self, address_list_id, **kwargs): def get_certificate(self, certificate_id, **kwargs): """ - Returns the details of a certificate. Gets the details of an SSL certificate. @@ -1426,7 +1410,6 @@ def get_certificate(self, certificate_id, **kwargs): def get_custom_protection_rule(self, custom_protection_rule_id, **kwargs): """ - Returns the details of a Custom Protection rule. Gets the details of a custom protection rule. @@ -1501,7 +1484,6 @@ def get_custom_protection_rule(self, custom_protection_rule_id, **kwargs): def get_device_fingerprint_challenge(self, waas_policy_id, **kwargs): """ - Returns the device fingerprint challenge settings for the Web Application Firewall. Gets the device fingerprint challenge settings in the Web Application Firewall configuration for a WAAS policy. @@ -1576,7 +1558,6 @@ def get_device_fingerprint_challenge(self, waas_policy_id, **kwargs): def get_human_interaction_challenge(self, waas_policy_id, **kwargs): """ - Returns the human interaction challenge settings for the Web Application Firewall. Gets the human interaction challenge settings in the Web Application Firewall configuration for a WAAS policy. @@ -1651,7 +1632,6 @@ def get_human_interaction_challenge(self, waas_policy_id, **kwargs): def get_js_challenge(self, waas_policy_id, **kwargs): """ - Returns the JavaScript challenge settings for the Web Application Firewall. Gets the JavaScript challenge settings in the Web Application Firewall configuration for a WAAS policy. @@ -1726,7 +1706,6 @@ def get_js_challenge(self, waas_policy_id, **kwargs): def get_policy_config(self, waas_policy_id, **kwargs): """ - Returns the general configuration for the policy. Gets the configuration of a WAAS policy. @@ -1801,7 +1780,6 @@ def get_policy_config(self, waas_policy_id, **kwargs): def get_protection_rule(self, waas_policy_id, protection_rule_key, **kwargs): """ - Returns the details of a single protection rule. Gets the details of a protection rule in the Web Application Firewall configuration for a WAAS policy. @@ -1880,7 +1858,6 @@ def get_protection_rule(self, waas_policy_id, protection_rule_key, **kwargs): def get_protection_settings(self, waas_policy_id, **kwargs): """ - Returns the protection settings for the Web Application Firewall. Gets the protection settings in the Web Application Firewall configuration for a WAAS policy. @@ -1955,7 +1932,6 @@ def get_protection_settings(self, waas_policy_id, **kwargs): def get_waas_policy(self, waas_policy_id, **kwargs): """ - Returns the details of a policy. Gets the details of a WAAS policy. @@ -2030,7 +2006,6 @@ def get_waas_policy(self, waas_policy_id, **kwargs): def get_waf_address_rate_limiting(self, waas_policy_id, **kwargs): """ - Returns the rate limiting settings for the Web Application Firewall. Gets the address rate limiting settings of the Web Application Firewall configuration for a WAAS policy. @@ -2105,7 +2080,6 @@ def get_waf_address_rate_limiting(self, waas_policy_id, **kwargs): def get_waf_config(self, waas_policy_id, **kwargs): """ - Returns the Web Application Firewall configuration. Gets the Web Application Firewall configuration details for a WAAS policy. @@ -2180,7 +2154,6 @@ def get_waf_config(self, waas_policy_id, **kwargs): def get_work_request(self, work_request_id, **kwargs): """ - Returns the details of a work request. Gets the details of a specified work request. @@ -2255,7 +2228,6 @@ def get_work_request(self, work_request_id, **kwargs): def list_access_rules(self, waas_policy_id, **kwargs): """ - Returns a list of access rules for the Web Application Firewall. Gets the currently configured access rules for the Web Application Firewall configuration of a specified WAAS policy. The order of the access rules is important. The rules will be checked in the order they are specified and the first matching rule will be used. @@ -2347,7 +2319,6 @@ def list_access_rules(self, waas_policy_id, **kwargs): def list_address_lists(self, compartment_id, **kwargs): """ - Returns a list of address lists. Gets a list of address lists that can be used in a WAAS policy. @@ -2490,7 +2461,6 @@ def list_address_lists(self, compartment_id, **kwargs): def list_caching_rules(self, waas_policy_id, **kwargs): """ - Returns the list of caching rules for the Web Application Firewall. Gets the currently configured caching rules for the Web Application Firewall configuration of a specified WAAS policy. The rules are processed in the order they are specified in and the first matching rule will be used when processing a request. @@ -2582,7 +2552,6 @@ def list_caching_rules(self, waas_policy_id, **kwargs): def list_captchas(self, waas_policy_id, **kwargs): """ - Returns a list of CAPTCHA configurations for the Web Application Firewall. Gets the list of currently configured CAPTCHA challenges in the Web Application Firewall configuration of a WAAS policy. @@ -2677,7 +2646,6 @@ def list_captchas(self, waas_policy_id, **kwargs): def list_certificates(self, compartment_id, **kwargs): """ - Returns a list of certificates. Gets a list of SSL certificates that can be used in a WAAS policy. @@ -2820,7 +2788,6 @@ def list_certificates(self, compartment_id, **kwargs): def list_custom_protection_rules(self, compartment_id, **kwargs): """ - Returns the list of Custom Protection rules for the given compartment. Gets a list of custom protection rules for the specified Web Application Firewall. @@ -2963,7 +2930,6 @@ def list_custom_protection_rules(self, compartment_id, **kwargs): def list_edge_subnets(self, **kwargs): """ - Returns a list of subnets corresponding the Web Application Firewall. Return the list of the tenant's edge node subnets. Use these CIDR blocks to restrict incoming traffic to your origin. These subnets are owned by OCI and forward traffic to customer origins. They are not associated with specific regions or compartments. @@ -3065,7 +3031,6 @@ def list_edge_subnets(self, **kwargs): def list_good_bots(self, waas_policy_id, **kwargs): """ - Returns the list of good bot configurations for the Web Application Firewall. Gets the list of good bots defined in the Web Application Firewall configuration for a WAAS policy. The list is sorted by `key`, in ascending order. @@ -3158,7 +3123,6 @@ def list_good_bots(self, waas_policy_id, **kwargs): def list_protection_rules(self, waas_policy_id, **kwargs): """ - Returns the list of protection rules for the Web Application Firewall. Gets the list of available protection rules for a WAAS policy. Use the `GetWafConfig` operation to view a list of currently configured protection rules for the Web Application Firewall, or use the `ListRecommendations` operation to get a list of recommended protection rules for the Web Application Firewall. The list is sorted by `key`, in ascending order. @@ -3270,7 +3234,6 @@ def list_protection_rules(self, waas_policy_id, **kwargs): def list_recommendations(self, waas_policy_id, **kwargs): """ - Returns the list of recommended Web Application Firewall protection rules. Gets the list of recommended Web Application Firewall protection rules. Use the `POST /waasPolicies/{waasPolicyId}/actions/acceptWafConfigRecommendations` method to accept recommended Web Application Firewall protection rules. For more information, see `WAF Protection Rules`__. @@ -3380,7 +3343,6 @@ def list_recommendations(self, waas_policy_id, **kwargs): def list_threat_feeds(self, waas_policy_id, **kwargs): """ - Returns a list of threat intelligence feeds. Gets the list of available web application threat intelligence feeds and the actions set for each feed. The list is sorted by `key`, in ascending order. @@ -3473,7 +3435,6 @@ def list_threat_feeds(self, waas_policy_id, **kwargs): def list_waas_policies(self, compartment_id, **kwargs): """ - Returns the list of policies for the given compartment. Gets a list of WAAS policies. @@ -3616,7 +3577,6 @@ def list_waas_policies(self, compartment_id, **kwargs): def list_waas_policy_custom_protection_rules(self, waas_policy_id, **kwargs): """ - Returns the list of custom protection rules for the Web Application Firewall. Gets the list of currently configured custom protection rules for a WAAS policy. @@ -3727,7 +3687,6 @@ def list_waas_policy_custom_protection_rules(self, waas_policy_id, **kwargs): def list_waf_blocked_requests(self, waas_policy_id, **kwargs): """ - Returns a list of requests blocked by the Web Application Firewall. Gets the number of blocked requests by a Web Application Firewall feature in five minute blocks, sorted by `timeObserved` in ascending order (starting from oldest data). @@ -3843,7 +3802,6 @@ def list_waf_blocked_requests(self, waas_policy_id, **kwargs): def list_waf_logs(self, waas_policy_id, **kwargs): """ - Returns a list of logs for the Web Application Firewall. Gets structured Web Application Firewall event logs for a WAAS policy. Sorted by the `timeObserved` in ascending order (starting from the oldest recorded event). @@ -4065,7 +4023,6 @@ def list_waf_logs(self, waas_policy_id, **kwargs): def list_waf_requests(self, waas_policy_id, **kwargs): """ - Returns a list of requests handled by the Web Application Firewall. Gets the number of requests managed by a Web Application Firewall over a specified period of time, including blocked requests. Sorted by `timeObserved` in ascending order (starting from oldest requests). @@ -4168,7 +4125,6 @@ def list_waf_requests(self, waas_policy_id, **kwargs): def list_waf_traffic(self, waas_policy_id, **kwargs): """ - Returns a list of traffic data for the Web Application Firewall. Gets the Web Application Firewall traffic data for a WAAS policy. Sorted by `timeObserved` in ascending order (starting from oldest data). @@ -4270,7 +4226,6 @@ def list_waf_traffic(self, waas_policy_id, **kwargs): def list_whitelists(self, waas_policy_id, **kwargs): """ - Returns a list of whitelists for the Web Application Firewall. Gets the list of whitelists defined in the Web Application Firewall configuration for a WAAS policy. @@ -4361,7 +4316,6 @@ def list_whitelists(self, waas_policy_id, **kwargs): def list_work_requests(self, waas_policy_id, compartment_id, **kwargs): """ - Returns a list of work requests. Gets a list of subnets (CIDR notation) from which the WAAS EDGE may make requests. The subnets are owned by OCI and forward traffic to your origins. Allow traffic from these subnets to your origins. They are not associated with specific regions or compartments. @@ -4475,7 +4429,6 @@ def list_work_requests(self, waas_policy_id, compartment_id, **kwargs): def purge_cache(self, waas_policy_id, **kwargs): """ - Accepts a list of resources to be purged. Performs a purge of the cache for each specified resource. If no resources are passed, the cache for the entire Web Application Firewall will be purged. For more information, see `Caching Rules`__. @@ -4561,7 +4514,6 @@ def purge_cache(self, waas_policy_id, **kwargs): def update_access_rules(self, waas_policy_id, access_rules, **kwargs): """ - Updates the list of access rules for the Web Application Firewall. Updates the list of access rules in the Web Application Firewall configuration for a specified WAAS policy. Access rules allow explicit actions to be defined and executed for requests that meet various conditions. A rule action can be set to allow, detect, or block requests. The detect setting allows the request to pass through the Web Application Firewall and is tagged with a `DETECT` flag in the Web Application Firewall's log. This operation can create, delete, update, and/or reorder access rules depending on the structure of the request body. @@ -4659,7 +4611,6 @@ def update_access_rules(self, waas_policy_id, access_rules, **kwargs): def update_address_list(self, address_list_id, **kwargs): """ - Updates the name and IP values of an address list. Updates the details of an address list. Only the fields specified in the request body will be updated; all other properties will remain unchanged. @@ -4745,7 +4696,6 @@ def update_address_list(self, address_list_id, **kwargs): def update_caching_rules(self, waas_policy_id, caching_rules_details, **kwargs): """ - Updates the list of caching rules for the Web Application Firewall. Updates the configuration for each specified caching rule. Caching rules WAF policies allow you to selectively cache content on Oracle Cloud Infrastructure's edge servers, such as webpages or certain file types. For more information about caching rules, see `Caching Rules`__. @@ -4843,7 +4793,6 @@ def update_caching_rules(self, waas_policy_id, caching_rules_details, **kwargs): def update_captchas(self, waas_policy_id, captchas, **kwargs): """ - Updates the list of CAPTCHA configurations for the Web Application Firewall. Updates the list of CAPTCHA challenges in the Web Application Firewall configuration for a WAAS policy. This operation can create, update, or delete CAPTCHAs depending on the structure of the request body. CAPTCHA challenges can be updated by changing the properties of the CAPTCHA object with the rule's key specified in the key field. CAPTCHA challenges can be reordered by changing the order of the CAPTCHA challenges in the list when updating. @@ -4942,7 +4891,6 @@ def update_captchas(self, waas_policy_id, captchas, **kwargs): def update_certificate(self, certificate_id, **kwargs): """ - Updates the display name, freeform tags, and defined tags of a certificate. It is not possible to update a certificate, only create and delete. Therefore, this operation can only update the display name, freeform tags, and defined tags of a certificate. @@ -5028,7 +4976,6 @@ def update_certificate(self, certificate_id, **kwargs): def update_custom_protection_rule(self, custom_protection_rule_id, update_custom_protection_rule_details, **kwargs): """ - Updates the details of a custom protection rule. Updates the configuration of a custom protection rule. Only the fields specified in the request body will be updated; all other properties will remain unchanged. @@ -5121,7 +5068,6 @@ def update_custom_protection_rule(self, custom_protection_rule_id, update_custom def update_device_fingerprint_challenge(self, waas_policy_id, update_device_fingerprint_challenge_details, **kwargs): """ - Updates the device fingerprint challenge settings for the Web Application Firewall. Updates the Device Fingerprint Challenge (DFC) settings in the Web Application Firewall configuration for a policy. The DFC generates a hashed signature of both virtual and real browsers based on 50+ attributes. These proprietary signatures are then leveraged for real-time correlation to identify and block malicious bots. The signature is based on a library of attributes detected via JavaScript listeners; the attributes include OS, screen resolution, fonts, UserAgent, IP address, etc. We are constantly making improvements and considering new libraries to include in our DFC build. We can also exclude attributes from the signature as needed. @@ -5216,7 +5162,6 @@ def update_device_fingerprint_challenge(self, waas_policy_id, update_device_fing def update_good_bots(self, waas_policy_id, good_bots, **kwargs): """ - Updates the list of good bot configurations for the Web Application Firewall. Updates the list of good bots in the Web Application Firewall configuration for a policy. Only the fields specified in the request body will be updated, all other configuration properties will remain unchanged. Good bots allows you to manage access for bots from known providers, such as Google or Baidu. For more information about good bots, see `Bot Management`__. @@ -5310,7 +5255,6 @@ def update_good_bots(self, waas_policy_id, good_bots, **kwargs): def update_human_interaction_challenge(self, waas_policy_id, update_human_interaction_challenge_details, **kwargs): """ - Updates the human interaction challenge settings for the Web Application Firewall. Updates the Human Interaction Challenge (HIC) settings in the Web Application Firewall configuration for a WAAS policy. HIC is a countermeasure that allows the proxy to check the user's browser for various behaviors that distinguish a human presence from a bot. @@ -5401,7 +5345,6 @@ def update_human_interaction_challenge(self, waas_policy_id, update_human_intera def update_js_challenge(self, waas_policy_id, update_js_challenge_details, **kwargs): """ - Updates the JavaScript challenge settings for the Web Application Firewall. Updates the JavaScript challenge settings in the Web Application Firewall configuration for a WAAS policy. JavaScript Challenge validates that the client can accept JavaScript with a binary decision. For more information, see `Bot Management`__. __ https://docs.cloud.oracle.com/iaas/Content/WAF/Tasks/botmanagement.htm @@ -5494,7 +5437,6 @@ def update_js_challenge(self, waas_policy_id, update_js_challenge_details, **kwa def update_policy_config(self, waas_policy_id, update_policy_config_details, **kwargs): """ - Updates the policy configuration. Updates the configuration for a WAAS policy. Only the fields specified in the request body will be updated; all other properties will remain unchanged. @@ -5585,7 +5527,6 @@ def update_policy_config(self, waas_policy_id, update_policy_config_details, **k def update_protection_rules(self, waas_policy_id, protection_rules, **kwargs): """ - Updates the list of protection rules for the Web Application Firewall. Updates the action for each specified protection rule. Requests can either be allowed, blocked, or trigger an alert if they meet the parameters of an applied rule. For more information on protection rules, see `WAF Protection Rules`__. This operation can update or disable protection rules depending on the structure of the request body. Protection rules can be updated by changing the properties of the protection rule object with the rule's key specified in the key field. @@ -5671,7 +5612,6 @@ def update_protection_rules(self, waas_policy_id, protection_rules, **kwargs): def update_protection_settings(self, waas_policy_id, update_protection_settings_details, **kwargs): """ - Updates the protection settings for the Web Application Firewall. Updates the protection settings in the Web Application Firewall configuration for a WAAS policy. Protection settings allow you define what action is taken when a request is blocked by the Web Application Firewall, such as returning a response code or block page. Only the fields specified in the request body will be updated; all other fields will remain unchanged. @@ -5762,7 +5702,6 @@ def update_protection_settings(self, waas_policy_id, update_protection_settings_ def update_threat_feeds(self, waas_policy_id, threat_feeds, **kwargs): """ - Updates the action for each threat intelligence feed. Updates the action to take when a request's IP address matches an address in the specified threat intelligence feed. Threat intelligence feeds are compiled lists of IP addresses with malicious reputations based on internet intelligence. Only the threat feeds specified in the request body will be updated; all other threat feeds will remain unchanged. @@ -5845,7 +5784,6 @@ def update_threat_feeds(self, waas_policy_id, threat_feeds, **kwargs): def update_waas_policy(self, waas_policy_id, update_waas_policy_details, **kwargs): """ - Updates the details of a policy. Updates the details of a WAAS policy, including origins and tags. Only the fields specified in the request body will be updated; all other properties will remain unchanged. To update platform provided resources such as `GoodBots`, `ProtectionRules`, and `ThreatFeeds`, first retrieve the list of available resources with the related list operation such as `GetThreatFeeds` or `GetProtectionRules`. The returned list will contain objects with `key` properties that can be used to update the resource during the `UpdateWaasPolicy` request. @@ -5938,7 +5876,6 @@ def update_waas_policy(self, waas_policy_id, update_waas_policy_details, **kwarg def update_waas_policy_custom_protection_rules(self, waas_policy_id, update_custom_protection_rules_details, **kwargs): """ - Updates the list of custom protection rules for the Web Application Firewall. Updates the action for each specified custom protection rule. Only the `DETECT` and `BLOCK` actions can be set. Disabled rules should not be included in the list. For more information on protection rules, see `WAF Protection Rules`__. __ https://docs.cloud.oracle.com/iaas/Content/WAF/Tasks/wafprotectionrules.htm @@ -6030,7 +5967,6 @@ def update_waas_policy_custom_protection_rules(self, waas_policy_id, update_cust def update_waf_address_rate_limiting(self, waas_policy_id, update_waf_address_rate_limiting_details, **kwargs): """ - Updates the rate limiting settings for the Web Application Firewall. Updates the address rate limiting settings in the Web Application Firewall configuration for a policy. Rate limiting allows you to configure a threshold for the number of requests from a unique IP address for the given period. You can also define the response code for the requests from the same address that exceed the threshold. @@ -6121,7 +6057,6 @@ def update_waf_address_rate_limiting(self, waas_policy_id, update_waf_address_ra def update_waf_config(self, waas_policy_id, update_waf_config_details, **kwargs): """ - Updates the Web Application Firewall configuration. Updates the Web Application Firewall configuration for a specified WAAS policy. To update platform provided resources such as `GoodBots`, `ProtectionRules`, and `ThreatFeeds`, @@ -6219,7 +6154,6 @@ def update_waf_config(self, waas_policy_id, update_waf_config_details, **kwargs) def update_whitelists(self, waas_policy_id, whitelists, **kwargs): """ - Updates the list of whitelists for the Web Application Firewall. Updates the list of IP addresses that bypass the Web Application Firewall for a WAAS policy. Supports single IP addresses, subnet masks (CIDR notation) and Address Lists. This operation can create, delete, update, and/or reorder whitelists depending on the structure of the request body. diff --git a/src/oci/work_requests/work_request_client.py b/src/oci/work_requests/work_request_client.py index e5e8a9b5af..ed327b3db2 100644 --- a/src/oci/work_requests/work_request_client.py +++ b/src/oci/work_requests/work_request_client.py @@ -88,7 +88,6 @@ def __init__(self, config, **kwargs): def get_work_request(self, work_request_id, **kwargs): """ Gets the details of a work request. - Gets the details of a work request. :param str work_request_id: (required) @@ -163,7 +162,6 @@ def get_work_request(self, work_request_id, **kwargs): def list_work_request_errors(self, work_request_id, **kwargs): """ - Lists work request errors Gets the errors for a work request. @@ -277,7 +275,6 @@ def list_work_request_errors(self, work_request_id, **kwargs): def list_work_request_logs(self, work_request_id, **kwargs): """ - Lists work request logs Gets the logs for a work request. @@ -391,7 +388,6 @@ def list_work_request_logs(self, work_request_id, **kwargs): def list_work_requests(self, compartment_id, **kwargs): """ - Lists work requests in a compartment or for a resource. Lists the work requests in a compartment or for a specified resource.