diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 794a0a03ec..2204b2947b 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -3,6 +3,27 @@ Change Log
All notable changes to this project will be documented in this file.
The format is based on `Keep a Changelog `_.
+====================
+2.119.0 - 2024-01-16
+====================
+
+Added
+-----
+* Support for resource id filter on the service work requests in the Container Instances service
+* Support for polyglot vulnerability audit in the Application Dependency Management service
+* Support for create, read, and update operations on peer databases in the Data Safe service
+* Support for dimension specific alarm suppressions in the Monitoring service
+* Support for calculating audit volume in the Data Safe service
+* Support for viewing schema accesses in data safe user assessments in the Data Safe service
+* Support for security feature usage in the Data Safe service
+* Support for viewing the top security findings in data safe security assessments in the Data Safe service
+* Support for additional filters in list findings operation in the Data Safe service
+* Support for updating risk level of the specified finding in the Data Safe service
+
+Breaking
+--------
+* Method `create_vulnerability_audit_and_wait_for_state` now waits on `oci.adm.models.VulnerabilityAudit` instead of `oci.adm.models.WorkRequest` in the Application Dependency Management service
+
====================
2.118.2 - 2024-01-11
====================
diff --git a/docs/api/data_safe.rst b/docs/api/data_safe.rst
index 551d75e059..11b5da6aba 100644
--- a/docs/api/data_safe.rst
+++ b/docs/api/data_safe.rst
@@ -120,6 +120,7 @@ Data Safe
oci.data_safe.models.CreateMaskingColumnDetails
oci.data_safe.models.CreateMaskingPolicyDetails
oci.data_safe.models.CreateOnPremConnectorDetails
+ oci.data_safe.models.CreatePeerTargetDatabaseDetails
oci.data_safe.models.CreateReportDefinitionDetails
oci.data_safe.models.CreateSdmMaskingPolicyDifferenceDetails
oci.data_safe.models.CreateSecurityAssessmentDetails
@@ -141,6 +142,12 @@ Data Safe
oci.data_safe.models.DatabaseSecurityConfig
oci.data_safe.models.DatabaseSecurityConfigCollection
oci.data_safe.models.DatabaseSecurityConfigSummary
+ oci.data_safe.models.DatabaseTableAccessEntry
+ oci.data_safe.models.DatabaseTableAccessEntryCollection
+ oci.data_safe.models.DatabaseTableAccessEntrySummary
+ oci.data_safe.models.DatabaseViewAccessEntry
+ oci.data_safe.models.DatabaseViewAccessEntryCollection
+ oci.data_safe.models.DatabaseViewAccessEntrySummary
oci.data_safe.models.DeleteRowsFormatEntry
oci.data_safe.models.DeterministicEncryptionDateFormatEntry
oci.data_safe.models.DeterministicEncryptionFormatEntry
@@ -168,7 +175,12 @@ Data Safe
oci.data_safe.models.EnableDataSafeConfigurationDetails
oci.data_safe.models.EntryDetails
oci.data_safe.models.Finding
+ oci.data_safe.models.FindingAnalyticsCollection
+ oci.data_safe.models.FindingAnalyticsDimensions
+ oci.data_safe.models.FindingAnalyticsSummary
oci.data_safe.models.FindingSummary
+ oci.data_safe.models.FindingsChangeAuditLogCollection
+ oci.data_safe.models.FindingsChangeAuditLogSummary
oci.data_safe.models.FirewallPolicyEntryDetails
oci.data_safe.models.FixedNumberFormatEntry
oci.data_safe.models.FixedStringFormatEntry
@@ -231,6 +243,9 @@ Data Safe
oci.data_safe.models.PatchSensitiveColumnDetails
oci.data_safe.models.PatchTargetAlertPolicyAssociationDetails
oci.data_safe.models.PatternFormatEntry
+ oci.data_safe.models.PeerTargetDatabase
+ oci.data_safe.models.PeerTargetDatabaseCollection
+ oci.data_safe.models.PeerTargetDatabaseSummary
oci.data_safe.models.PreserveOriginalDataFormatEntry
oci.data_safe.models.PrivateEndpoint
oci.data_safe.models.Profile
@@ -255,6 +270,8 @@ Data Safe
oci.data_safe.models.ReportDefinitionSummary
oci.data_safe.models.ReportDetails
oci.data_safe.models.ReportSummary
+ oci.data_safe.models.RoleGrantPathCollection
+ oci.data_safe.models.RoleGrantPathSummary
oci.data_safe.models.RoleSummary
oci.data_safe.models.RunSecurityAssessmentDetails
oci.data_safe.models.RunUserAssessmentDetails
@@ -273,6 +290,11 @@ Data Safe
oci.data_safe.models.SecurityAssessmentComparisonPerTarget
oci.data_safe.models.SecurityAssessmentStatistics
oci.data_safe.models.SecurityAssessmentSummary
+ oci.data_safe.models.SecurityFeatureAnalyticsCollection
+ oci.data_safe.models.SecurityFeatureAnalyticsDimensions
+ oci.data_safe.models.SecurityFeatureAnalyticsSummary
+ oci.data_safe.models.SecurityFeatureCollection
+ oci.data_safe.models.SecurityFeatureSummary
oci.data_safe.models.SecurityPolicy
oci.data_safe.models.SecurityPolicyCollection
oci.data_safe.models.SecurityPolicyDeployment
@@ -281,6 +303,9 @@ Data Safe
oci.data_safe.models.SecurityPolicyEntryState
oci.data_safe.models.SecurityPolicyEntryStateCollection
oci.data_safe.models.SecurityPolicyEntryStateSummary
+ oci.data_safe.models.SecurityPolicyReport
+ oci.data_safe.models.SecurityPolicyReportCollection
+ oci.data_safe.models.SecurityPolicyReportSummary
oci.data_safe.models.SecurityPolicySummary
oci.data_safe.models.SensitiveCategory
oci.data_safe.models.SensitiveColumn
@@ -347,12 +372,15 @@ Data Safe
oci.data_safe.models.UpdateColumnSourceTargetDetails
oci.data_safe.models.UpdateDataSafePrivateEndpointDetails
oci.data_safe.models.UpdateDatabaseSecurityConfigDetails
+ oci.data_safe.models.UpdateFindingDetails
oci.data_safe.models.UpdateLibraryMaskingFormatDetails
oci.data_safe.models.UpdateMaskingColumnDetails
oci.data_safe.models.UpdateMaskingPolicyDetails
oci.data_safe.models.UpdateOnPremConnectorDetails
oci.data_safe.models.UpdateOnPremConnectorWalletDetails
+ oci.data_safe.models.UpdatePeerTargetDatabaseDetails
oci.data_safe.models.UpdateReportDefinitionDetails
+ oci.data_safe.models.UpdateReportDetails
oci.data_safe.models.UpdateSdmMaskingPolicyDifferenceDetails
oci.data_safe.models.UpdateSecurityAssessmentDetails
oci.data_safe.models.UpdateSecurityPolicyDeploymentDetails
@@ -368,6 +396,8 @@ Data Safe
oci.data_safe.models.UpdateTargetAlertPolicyAssociationDetails
oci.data_safe.models.UpdateTargetDatabaseDetails
oci.data_safe.models.UpdateUserAssessmentDetails
+ oci.data_safe.models.UserAccessAnalyticsCollection
+ oci.data_safe.models.UserAccessAnalyticsSummary
oci.data_safe.models.UserAggregation
oci.data_safe.models.UserAssessment
oci.data_safe.models.UserAssessmentBaseLineDetails
diff --git a/docs/api/data_safe/models/oci.data_safe.models.CreatePeerTargetDatabaseDetails.rst b/docs/api/data_safe/models/oci.data_safe.models.CreatePeerTargetDatabaseDetails.rst
new file mode 100644
index 0000000000..e8e130e905
--- /dev/null
+++ b/docs/api/data_safe/models/oci.data_safe.models.CreatePeerTargetDatabaseDetails.rst
@@ -0,0 +1,11 @@
+CreatePeerTargetDatabaseDetails
+===============================
+
+.. currentmodule:: oci.data_safe.models
+
+.. autoclass:: CreatePeerTargetDatabaseDetails
+ :show-inheritance:
+ :special-members: __init__
+ :members:
+ :undoc-members:
+ :inherited-members:
\ No newline at end of file
diff --git a/docs/api/data_safe/models/oci.data_safe.models.DatabaseTableAccessEntry.rst b/docs/api/data_safe/models/oci.data_safe.models.DatabaseTableAccessEntry.rst
new file mode 100644
index 0000000000..2645a08d16
--- /dev/null
+++ b/docs/api/data_safe/models/oci.data_safe.models.DatabaseTableAccessEntry.rst
@@ -0,0 +1,11 @@
+DatabaseTableAccessEntry
+========================
+
+.. currentmodule:: oci.data_safe.models
+
+.. autoclass:: DatabaseTableAccessEntry
+ :show-inheritance:
+ :special-members: __init__
+ :members:
+ :undoc-members:
+ :inherited-members:
\ No newline at end of file
diff --git a/docs/api/data_safe/models/oci.data_safe.models.DatabaseTableAccessEntryCollection.rst b/docs/api/data_safe/models/oci.data_safe.models.DatabaseTableAccessEntryCollection.rst
new file mode 100644
index 0000000000..74eaa31ade
--- /dev/null
+++ b/docs/api/data_safe/models/oci.data_safe.models.DatabaseTableAccessEntryCollection.rst
@@ -0,0 +1,11 @@
+DatabaseTableAccessEntryCollection
+==================================
+
+.. currentmodule:: oci.data_safe.models
+
+.. autoclass:: DatabaseTableAccessEntryCollection
+ :show-inheritance:
+ :special-members: __init__
+ :members:
+ :undoc-members:
+ :inherited-members:
\ No newline at end of file
diff --git a/docs/api/data_safe/models/oci.data_safe.models.DatabaseTableAccessEntrySummary.rst b/docs/api/data_safe/models/oci.data_safe.models.DatabaseTableAccessEntrySummary.rst
new file mode 100644
index 0000000000..ca7414576b
--- /dev/null
+++ b/docs/api/data_safe/models/oci.data_safe.models.DatabaseTableAccessEntrySummary.rst
@@ -0,0 +1,11 @@
+DatabaseTableAccessEntrySummary
+===============================
+
+.. currentmodule:: oci.data_safe.models
+
+.. autoclass:: DatabaseTableAccessEntrySummary
+ :show-inheritance:
+ :special-members: __init__
+ :members:
+ :undoc-members:
+ :inherited-members:
\ No newline at end of file
diff --git a/docs/api/data_safe/models/oci.data_safe.models.DatabaseViewAccessEntry.rst b/docs/api/data_safe/models/oci.data_safe.models.DatabaseViewAccessEntry.rst
new file mode 100644
index 0000000000..131df1db68
--- /dev/null
+++ b/docs/api/data_safe/models/oci.data_safe.models.DatabaseViewAccessEntry.rst
@@ -0,0 +1,11 @@
+DatabaseViewAccessEntry
+=======================
+
+.. currentmodule:: oci.data_safe.models
+
+.. autoclass:: DatabaseViewAccessEntry
+ :show-inheritance:
+ :special-members: __init__
+ :members:
+ :undoc-members:
+ :inherited-members:
\ No newline at end of file
diff --git a/docs/api/data_safe/models/oci.data_safe.models.DatabaseViewAccessEntryCollection.rst b/docs/api/data_safe/models/oci.data_safe.models.DatabaseViewAccessEntryCollection.rst
new file mode 100644
index 0000000000..f903eeb0e5
--- /dev/null
+++ b/docs/api/data_safe/models/oci.data_safe.models.DatabaseViewAccessEntryCollection.rst
@@ -0,0 +1,11 @@
+DatabaseViewAccessEntryCollection
+=================================
+
+.. currentmodule:: oci.data_safe.models
+
+.. autoclass:: DatabaseViewAccessEntryCollection
+ :show-inheritance:
+ :special-members: __init__
+ :members:
+ :undoc-members:
+ :inherited-members:
\ No newline at end of file
diff --git a/docs/api/data_safe/models/oci.data_safe.models.DatabaseViewAccessEntrySummary.rst b/docs/api/data_safe/models/oci.data_safe.models.DatabaseViewAccessEntrySummary.rst
new file mode 100644
index 0000000000..66efea67be
--- /dev/null
+++ b/docs/api/data_safe/models/oci.data_safe.models.DatabaseViewAccessEntrySummary.rst
@@ -0,0 +1,11 @@
+DatabaseViewAccessEntrySummary
+==============================
+
+.. currentmodule:: oci.data_safe.models
+
+.. autoclass:: DatabaseViewAccessEntrySummary
+ :show-inheritance:
+ :special-members: __init__
+ :members:
+ :undoc-members:
+ :inherited-members:
\ No newline at end of file
diff --git a/docs/api/data_safe/models/oci.data_safe.models.FindingAnalyticsCollection.rst b/docs/api/data_safe/models/oci.data_safe.models.FindingAnalyticsCollection.rst
new file mode 100644
index 0000000000..15450ed6cb
--- /dev/null
+++ b/docs/api/data_safe/models/oci.data_safe.models.FindingAnalyticsCollection.rst
@@ -0,0 +1,11 @@
+FindingAnalyticsCollection
+==========================
+
+.. currentmodule:: oci.data_safe.models
+
+.. autoclass:: FindingAnalyticsCollection
+ :show-inheritance:
+ :special-members: __init__
+ :members:
+ :undoc-members:
+ :inherited-members:
\ No newline at end of file
diff --git a/docs/api/data_safe/models/oci.data_safe.models.FindingAnalyticsDimensions.rst b/docs/api/data_safe/models/oci.data_safe.models.FindingAnalyticsDimensions.rst
new file mode 100644
index 0000000000..01b76c9bcb
--- /dev/null
+++ b/docs/api/data_safe/models/oci.data_safe.models.FindingAnalyticsDimensions.rst
@@ -0,0 +1,11 @@
+FindingAnalyticsDimensions
+==========================
+
+.. currentmodule:: oci.data_safe.models
+
+.. autoclass:: FindingAnalyticsDimensions
+ :show-inheritance:
+ :special-members: __init__
+ :members:
+ :undoc-members:
+ :inherited-members:
\ No newline at end of file
diff --git a/docs/api/data_safe/models/oci.data_safe.models.FindingAnalyticsSummary.rst b/docs/api/data_safe/models/oci.data_safe.models.FindingAnalyticsSummary.rst
new file mode 100644
index 0000000000..6baea03f02
--- /dev/null
+++ b/docs/api/data_safe/models/oci.data_safe.models.FindingAnalyticsSummary.rst
@@ -0,0 +1,11 @@
+FindingAnalyticsSummary
+=======================
+
+.. currentmodule:: oci.data_safe.models
+
+.. autoclass:: FindingAnalyticsSummary
+ :show-inheritance:
+ :special-members: __init__
+ :members:
+ :undoc-members:
+ :inherited-members:
\ No newline at end of file
diff --git a/docs/api/data_safe/models/oci.data_safe.models.FindingsChangeAuditLogCollection.rst b/docs/api/data_safe/models/oci.data_safe.models.FindingsChangeAuditLogCollection.rst
new file mode 100644
index 0000000000..b75a077a83
--- /dev/null
+++ b/docs/api/data_safe/models/oci.data_safe.models.FindingsChangeAuditLogCollection.rst
@@ -0,0 +1,11 @@
+FindingsChangeAuditLogCollection
+================================
+
+.. currentmodule:: oci.data_safe.models
+
+.. autoclass:: FindingsChangeAuditLogCollection
+ :show-inheritance:
+ :special-members: __init__
+ :members:
+ :undoc-members:
+ :inherited-members:
\ No newline at end of file
diff --git a/docs/api/data_safe/models/oci.data_safe.models.FindingsChangeAuditLogSummary.rst b/docs/api/data_safe/models/oci.data_safe.models.FindingsChangeAuditLogSummary.rst
new file mode 100644
index 0000000000..ddddf0b516
--- /dev/null
+++ b/docs/api/data_safe/models/oci.data_safe.models.FindingsChangeAuditLogSummary.rst
@@ -0,0 +1,11 @@
+FindingsChangeAuditLogSummary
+=============================
+
+.. currentmodule:: oci.data_safe.models
+
+.. autoclass:: FindingsChangeAuditLogSummary
+ :show-inheritance:
+ :special-members: __init__
+ :members:
+ :undoc-members:
+ :inherited-members:
\ No newline at end of file
diff --git a/docs/api/data_safe/models/oci.data_safe.models.PeerTargetDatabase.rst b/docs/api/data_safe/models/oci.data_safe.models.PeerTargetDatabase.rst
new file mode 100644
index 0000000000..e34e406919
--- /dev/null
+++ b/docs/api/data_safe/models/oci.data_safe.models.PeerTargetDatabase.rst
@@ -0,0 +1,11 @@
+PeerTargetDatabase
+==================
+
+.. currentmodule:: oci.data_safe.models
+
+.. autoclass:: PeerTargetDatabase
+ :show-inheritance:
+ :special-members: __init__
+ :members:
+ :undoc-members:
+ :inherited-members:
\ No newline at end of file
diff --git a/docs/api/data_safe/models/oci.data_safe.models.PeerTargetDatabaseCollection.rst b/docs/api/data_safe/models/oci.data_safe.models.PeerTargetDatabaseCollection.rst
new file mode 100644
index 0000000000..0e80bb4eec
--- /dev/null
+++ b/docs/api/data_safe/models/oci.data_safe.models.PeerTargetDatabaseCollection.rst
@@ -0,0 +1,11 @@
+PeerTargetDatabaseCollection
+============================
+
+.. currentmodule:: oci.data_safe.models
+
+.. autoclass:: PeerTargetDatabaseCollection
+ :show-inheritance:
+ :special-members: __init__
+ :members:
+ :undoc-members:
+ :inherited-members:
\ No newline at end of file
diff --git a/docs/api/data_safe/models/oci.data_safe.models.PeerTargetDatabaseSummary.rst b/docs/api/data_safe/models/oci.data_safe.models.PeerTargetDatabaseSummary.rst
new file mode 100644
index 0000000000..ee8b67da68
--- /dev/null
+++ b/docs/api/data_safe/models/oci.data_safe.models.PeerTargetDatabaseSummary.rst
@@ -0,0 +1,11 @@
+PeerTargetDatabaseSummary
+=========================
+
+.. currentmodule:: oci.data_safe.models
+
+.. autoclass:: PeerTargetDatabaseSummary
+ :show-inheritance:
+ :special-members: __init__
+ :members:
+ :undoc-members:
+ :inherited-members:
\ No newline at end of file
diff --git a/docs/api/data_safe/models/oci.data_safe.models.RoleGrantPathCollection.rst b/docs/api/data_safe/models/oci.data_safe.models.RoleGrantPathCollection.rst
new file mode 100644
index 0000000000..ca0d7df050
--- /dev/null
+++ b/docs/api/data_safe/models/oci.data_safe.models.RoleGrantPathCollection.rst
@@ -0,0 +1,11 @@
+RoleGrantPathCollection
+=======================
+
+.. currentmodule:: oci.data_safe.models
+
+.. autoclass:: RoleGrantPathCollection
+ :show-inheritance:
+ :special-members: __init__
+ :members:
+ :undoc-members:
+ :inherited-members:
\ No newline at end of file
diff --git a/docs/api/data_safe/models/oci.data_safe.models.RoleGrantPathSummary.rst b/docs/api/data_safe/models/oci.data_safe.models.RoleGrantPathSummary.rst
new file mode 100644
index 0000000000..3df18b3b2e
--- /dev/null
+++ b/docs/api/data_safe/models/oci.data_safe.models.RoleGrantPathSummary.rst
@@ -0,0 +1,11 @@
+RoleGrantPathSummary
+====================
+
+.. currentmodule:: oci.data_safe.models
+
+.. autoclass:: RoleGrantPathSummary
+ :show-inheritance:
+ :special-members: __init__
+ :members:
+ :undoc-members:
+ :inherited-members:
\ No newline at end of file
diff --git a/docs/api/data_safe/models/oci.data_safe.models.SecurityFeatureAnalyticsCollection.rst b/docs/api/data_safe/models/oci.data_safe.models.SecurityFeatureAnalyticsCollection.rst
new file mode 100644
index 0000000000..50d5c17c8e
--- /dev/null
+++ b/docs/api/data_safe/models/oci.data_safe.models.SecurityFeatureAnalyticsCollection.rst
@@ -0,0 +1,11 @@
+SecurityFeatureAnalyticsCollection
+==================================
+
+.. currentmodule:: oci.data_safe.models
+
+.. autoclass:: SecurityFeatureAnalyticsCollection
+ :show-inheritance:
+ :special-members: __init__
+ :members:
+ :undoc-members:
+ :inherited-members:
\ No newline at end of file
diff --git a/docs/api/data_safe/models/oci.data_safe.models.SecurityFeatureAnalyticsDimensions.rst b/docs/api/data_safe/models/oci.data_safe.models.SecurityFeatureAnalyticsDimensions.rst
new file mode 100644
index 0000000000..fa2a3c7756
--- /dev/null
+++ b/docs/api/data_safe/models/oci.data_safe.models.SecurityFeatureAnalyticsDimensions.rst
@@ -0,0 +1,11 @@
+SecurityFeatureAnalyticsDimensions
+==================================
+
+.. currentmodule:: oci.data_safe.models
+
+.. autoclass:: SecurityFeatureAnalyticsDimensions
+ :show-inheritance:
+ :special-members: __init__
+ :members:
+ :undoc-members:
+ :inherited-members:
\ No newline at end of file
diff --git a/docs/api/data_safe/models/oci.data_safe.models.SecurityFeatureAnalyticsSummary.rst b/docs/api/data_safe/models/oci.data_safe.models.SecurityFeatureAnalyticsSummary.rst
new file mode 100644
index 0000000000..6e2bdd1746
--- /dev/null
+++ b/docs/api/data_safe/models/oci.data_safe.models.SecurityFeatureAnalyticsSummary.rst
@@ -0,0 +1,11 @@
+SecurityFeatureAnalyticsSummary
+===============================
+
+.. currentmodule:: oci.data_safe.models
+
+.. autoclass:: SecurityFeatureAnalyticsSummary
+ :show-inheritance:
+ :special-members: __init__
+ :members:
+ :undoc-members:
+ :inherited-members:
\ No newline at end of file
diff --git a/docs/api/data_safe/models/oci.data_safe.models.SecurityFeatureCollection.rst b/docs/api/data_safe/models/oci.data_safe.models.SecurityFeatureCollection.rst
new file mode 100644
index 0000000000..aeda64b37d
--- /dev/null
+++ b/docs/api/data_safe/models/oci.data_safe.models.SecurityFeatureCollection.rst
@@ -0,0 +1,11 @@
+SecurityFeatureCollection
+=========================
+
+.. currentmodule:: oci.data_safe.models
+
+.. autoclass:: SecurityFeatureCollection
+ :show-inheritance:
+ :special-members: __init__
+ :members:
+ :undoc-members:
+ :inherited-members:
\ No newline at end of file
diff --git a/docs/api/data_safe/models/oci.data_safe.models.SecurityFeatureSummary.rst b/docs/api/data_safe/models/oci.data_safe.models.SecurityFeatureSummary.rst
new file mode 100644
index 0000000000..6d8d56414d
--- /dev/null
+++ b/docs/api/data_safe/models/oci.data_safe.models.SecurityFeatureSummary.rst
@@ -0,0 +1,11 @@
+SecurityFeatureSummary
+======================
+
+.. currentmodule:: oci.data_safe.models
+
+.. autoclass:: SecurityFeatureSummary
+ :show-inheritance:
+ :special-members: __init__
+ :members:
+ :undoc-members:
+ :inherited-members:
\ No newline at end of file
diff --git a/docs/api/data_safe/models/oci.data_safe.models.SecurityPolicyReport.rst b/docs/api/data_safe/models/oci.data_safe.models.SecurityPolicyReport.rst
new file mode 100644
index 0000000000..5311c0098f
--- /dev/null
+++ b/docs/api/data_safe/models/oci.data_safe.models.SecurityPolicyReport.rst
@@ -0,0 +1,11 @@
+SecurityPolicyReport
+====================
+
+.. currentmodule:: oci.data_safe.models
+
+.. autoclass:: SecurityPolicyReport
+ :show-inheritance:
+ :special-members: __init__
+ :members:
+ :undoc-members:
+ :inherited-members:
\ No newline at end of file
diff --git a/docs/api/data_safe/models/oci.data_safe.models.SecurityPolicyReportCollection.rst b/docs/api/data_safe/models/oci.data_safe.models.SecurityPolicyReportCollection.rst
new file mode 100644
index 0000000000..48aefd660f
--- /dev/null
+++ b/docs/api/data_safe/models/oci.data_safe.models.SecurityPolicyReportCollection.rst
@@ -0,0 +1,11 @@
+SecurityPolicyReportCollection
+==============================
+
+.. currentmodule:: oci.data_safe.models
+
+.. autoclass:: SecurityPolicyReportCollection
+ :show-inheritance:
+ :special-members: __init__
+ :members:
+ :undoc-members:
+ :inherited-members:
\ No newline at end of file
diff --git a/docs/api/data_safe/models/oci.data_safe.models.SecurityPolicyReportSummary.rst b/docs/api/data_safe/models/oci.data_safe.models.SecurityPolicyReportSummary.rst
new file mode 100644
index 0000000000..1c5a5dc84e
--- /dev/null
+++ b/docs/api/data_safe/models/oci.data_safe.models.SecurityPolicyReportSummary.rst
@@ -0,0 +1,11 @@
+SecurityPolicyReportSummary
+===========================
+
+.. currentmodule:: oci.data_safe.models
+
+.. autoclass:: SecurityPolicyReportSummary
+ :show-inheritance:
+ :special-members: __init__
+ :members:
+ :undoc-members:
+ :inherited-members:
\ No newline at end of file
diff --git a/docs/api/data_safe/models/oci.data_safe.models.UpdateFindingDetails.rst b/docs/api/data_safe/models/oci.data_safe.models.UpdateFindingDetails.rst
new file mode 100644
index 0000000000..1cec019850
--- /dev/null
+++ b/docs/api/data_safe/models/oci.data_safe.models.UpdateFindingDetails.rst
@@ -0,0 +1,11 @@
+UpdateFindingDetails
+====================
+
+.. currentmodule:: oci.data_safe.models
+
+.. autoclass:: UpdateFindingDetails
+ :show-inheritance:
+ :special-members: __init__
+ :members:
+ :undoc-members:
+ :inherited-members:
\ No newline at end of file
diff --git a/docs/api/data_safe/models/oci.data_safe.models.UpdatePeerTargetDatabaseDetails.rst b/docs/api/data_safe/models/oci.data_safe.models.UpdatePeerTargetDatabaseDetails.rst
new file mode 100644
index 0000000000..13f855d45e
--- /dev/null
+++ b/docs/api/data_safe/models/oci.data_safe.models.UpdatePeerTargetDatabaseDetails.rst
@@ -0,0 +1,11 @@
+UpdatePeerTargetDatabaseDetails
+===============================
+
+.. currentmodule:: oci.data_safe.models
+
+.. autoclass:: UpdatePeerTargetDatabaseDetails
+ :show-inheritance:
+ :special-members: __init__
+ :members:
+ :undoc-members:
+ :inherited-members:
\ No newline at end of file
diff --git a/docs/api/data_safe/models/oci.data_safe.models.UpdateReportDetails.rst b/docs/api/data_safe/models/oci.data_safe.models.UpdateReportDetails.rst
new file mode 100644
index 0000000000..ca24019346
--- /dev/null
+++ b/docs/api/data_safe/models/oci.data_safe.models.UpdateReportDetails.rst
@@ -0,0 +1,11 @@
+UpdateReportDetails
+===================
+
+.. currentmodule:: oci.data_safe.models
+
+.. autoclass:: UpdateReportDetails
+ :show-inheritance:
+ :special-members: __init__
+ :members:
+ :undoc-members:
+ :inherited-members:
\ No newline at end of file
diff --git a/docs/api/data_safe/models/oci.data_safe.models.UserAccessAnalyticsCollection.rst b/docs/api/data_safe/models/oci.data_safe.models.UserAccessAnalyticsCollection.rst
new file mode 100644
index 0000000000..084fee4f31
--- /dev/null
+++ b/docs/api/data_safe/models/oci.data_safe.models.UserAccessAnalyticsCollection.rst
@@ -0,0 +1,11 @@
+UserAccessAnalyticsCollection
+=============================
+
+.. currentmodule:: oci.data_safe.models
+
+.. autoclass:: UserAccessAnalyticsCollection
+ :show-inheritance:
+ :special-members: __init__
+ :members:
+ :undoc-members:
+ :inherited-members:
\ No newline at end of file
diff --git a/docs/api/data_safe/models/oci.data_safe.models.UserAccessAnalyticsSummary.rst b/docs/api/data_safe/models/oci.data_safe.models.UserAccessAnalyticsSummary.rst
new file mode 100644
index 0000000000..c38621fcd9
--- /dev/null
+++ b/docs/api/data_safe/models/oci.data_safe.models.UserAccessAnalyticsSummary.rst
@@ -0,0 +1,11 @@
+UserAccessAnalyticsSummary
+==========================
+
+.. currentmodule:: oci.data_safe.models
+
+.. autoclass:: UserAccessAnalyticsSummary
+ :show-inheritance:
+ :special-members: __init__
+ :members:
+ :undoc-members:
+ :inherited-members:
\ No newline at end of file
diff --git a/docs/api/monitoring.rst b/docs/api/monitoring.rst
index fca82e9d5a..e07def72eb 100644
--- a/docs/api/monitoring.rst
+++ b/docs/api/monitoring.rst
@@ -26,8 +26,16 @@ Monitoring
oci.monitoring.models.AlarmHistoryEntry
oci.monitoring.models.AlarmStatusSummary
oci.monitoring.models.AlarmSummary
+ oci.monitoring.models.AlarmSuppression
+ oci.monitoring.models.AlarmSuppressionAlarmTarget
+ oci.monitoring.models.AlarmSuppressionCollection
+ oci.monitoring.models.AlarmSuppressionHistoryItem
+ oci.monitoring.models.AlarmSuppressionHistoryItemCollection
+ oci.monitoring.models.AlarmSuppressionSummary
+ oci.monitoring.models.AlarmSuppressionTarget
oci.monitoring.models.ChangeAlarmCompartmentDetails
oci.monitoring.models.CreateAlarmDetails
+ oci.monitoring.models.CreateAlarmSuppressionDetails
oci.monitoring.models.Datapoint
oci.monitoring.models.FailedMetricRecord
oci.monitoring.models.ListMetricsDetails
@@ -37,6 +45,7 @@ Monitoring
oci.monitoring.models.PostMetricDataDetails
oci.monitoring.models.PostMetricDataResponseDetails
oci.monitoring.models.RetrieveDimensionStatesDetails
+ oci.monitoring.models.SummarizeAlarmSuppressionHistoryDetails
oci.monitoring.models.SummarizeMetricsDataDetails
oci.monitoring.models.Suppression
oci.monitoring.models.UpdateAlarmDetails
diff --git a/docs/api/monitoring/models/oci.monitoring.models.AlarmSuppression.rst b/docs/api/monitoring/models/oci.monitoring.models.AlarmSuppression.rst
new file mode 100644
index 0000000000..48b6732ad2
--- /dev/null
+++ b/docs/api/monitoring/models/oci.monitoring.models.AlarmSuppression.rst
@@ -0,0 +1,11 @@
+AlarmSuppression
+================
+
+.. currentmodule:: oci.monitoring.models
+
+.. autoclass:: AlarmSuppression
+ :show-inheritance:
+ :special-members: __init__
+ :members:
+ :undoc-members:
+ :inherited-members:
\ No newline at end of file
diff --git a/docs/api/monitoring/models/oci.monitoring.models.AlarmSuppressionAlarmTarget.rst b/docs/api/monitoring/models/oci.monitoring.models.AlarmSuppressionAlarmTarget.rst
new file mode 100644
index 0000000000..4c76733588
--- /dev/null
+++ b/docs/api/monitoring/models/oci.monitoring.models.AlarmSuppressionAlarmTarget.rst
@@ -0,0 +1,11 @@
+AlarmSuppressionAlarmTarget
+===========================
+
+.. currentmodule:: oci.monitoring.models
+
+.. autoclass:: AlarmSuppressionAlarmTarget
+ :show-inheritance:
+ :special-members: __init__
+ :members:
+ :undoc-members:
+ :inherited-members:
\ No newline at end of file
diff --git a/docs/api/monitoring/models/oci.monitoring.models.AlarmSuppressionCollection.rst b/docs/api/monitoring/models/oci.monitoring.models.AlarmSuppressionCollection.rst
new file mode 100644
index 0000000000..2c34ec9c47
--- /dev/null
+++ b/docs/api/monitoring/models/oci.monitoring.models.AlarmSuppressionCollection.rst
@@ -0,0 +1,11 @@
+AlarmSuppressionCollection
+==========================
+
+.. currentmodule:: oci.monitoring.models
+
+.. autoclass:: AlarmSuppressionCollection
+ :show-inheritance:
+ :special-members: __init__
+ :members:
+ :undoc-members:
+ :inherited-members:
\ No newline at end of file
diff --git a/docs/api/monitoring/models/oci.monitoring.models.AlarmSuppressionHistoryItem.rst b/docs/api/monitoring/models/oci.monitoring.models.AlarmSuppressionHistoryItem.rst
new file mode 100644
index 0000000000..088d4725c3
--- /dev/null
+++ b/docs/api/monitoring/models/oci.monitoring.models.AlarmSuppressionHistoryItem.rst
@@ -0,0 +1,11 @@
+AlarmSuppressionHistoryItem
+===========================
+
+.. currentmodule:: oci.monitoring.models
+
+.. autoclass:: AlarmSuppressionHistoryItem
+ :show-inheritance:
+ :special-members: __init__
+ :members:
+ :undoc-members:
+ :inherited-members:
\ No newline at end of file
diff --git a/docs/api/monitoring/models/oci.monitoring.models.AlarmSuppressionHistoryItemCollection.rst b/docs/api/monitoring/models/oci.monitoring.models.AlarmSuppressionHistoryItemCollection.rst
new file mode 100644
index 0000000000..c2e78e1bb5
--- /dev/null
+++ b/docs/api/monitoring/models/oci.monitoring.models.AlarmSuppressionHistoryItemCollection.rst
@@ -0,0 +1,11 @@
+AlarmSuppressionHistoryItemCollection
+=====================================
+
+.. currentmodule:: oci.monitoring.models
+
+.. autoclass:: AlarmSuppressionHistoryItemCollection
+ :show-inheritance:
+ :special-members: __init__
+ :members:
+ :undoc-members:
+ :inherited-members:
\ No newline at end of file
diff --git a/docs/api/monitoring/models/oci.monitoring.models.AlarmSuppressionSummary.rst b/docs/api/monitoring/models/oci.monitoring.models.AlarmSuppressionSummary.rst
new file mode 100644
index 0000000000..c44fe8fcce
--- /dev/null
+++ b/docs/api/monitoring/models/oci.monitoring.models.AlarmSuppressionSummary.rst
@@ -0,0 +1,11 @@
+AlarmSuppressionSummary
+=======================
+
+.. currentmodule:: oci.monitoring.models
+
+.. autoclass:: AlarmSuppressionSummary
+ :show-inheritance:
+ :special-members: __init__
+ :members:
+ :undoc-members:
+ :inherited-members:
\ No newline at end of file
diff --git a/docs/api/monitoring/models/oci.monitoring.models.AlarmSuppressionTarget.rst b/docs/api/monitoring/models/oci.monitoring.models.AlarmSuppressionTarget.rst
new file mode 100644
index 0000000000..1faa5a9231
--- /dev/null
+++ b/docs/api/monitoring/models/oci.monitoring.models.AlarmSuppressionTarget.rst
@@ -0,0 +1,11 @@
+AlarmSuppressionTarget
+======================
+
+.. currentmodule:: oci.monitoring.models
+
+.. autoclass:: AlarmSuppressionTarget
+ :show-inheritance:
+ :special-members: __init__
+ :members:
+ :undoc-members:
+ :inherited-members:
\ No newline at end of file
diff --git a/docs/api/monitoring/models/oci.monitoring.models.CreateAlarmSuppressionDetails.rst b/docs/api/monitoring/models/oci.monitoring.models.CreateAlarmSuppressionDetails.rst
new file mode 100644
index 0000000000..6382abfb51
--- /dev/null
+++ b/docs/api/monitoring/models/oci.monitoring.models.CreateAlarmSuppressionDetails.rst
@@ -0,0 +1,11 @@
+CreateAlarmSuppressionDetails
+=============================
+
+.. currentmodule:: oci.monitoring.models
+
+.. autoclass:: CreateAlarmSuppressionDetails
+ :show-inheritance:
+ :special-members: __init__
+ :members:
+ :undoc-members:
+ :inherited-members:
\ No newline at end of file
diff --git a/docs/api/monitoring/models/oci.monitoring.models.SummarizeAlarmSuppressionHistoryDetails.rst b/docs/api/monitoring/models/oci.monitoring.models.SummarizeAlarmSuppressionHistoryDetails.rst
new file mode 100644
index 0000000000..501ee7d288
--- /dev/null
+++ b/docs/api/monitoring/models/oci.monitoring.models.SummarizeAlarmSuppressionHistoryDetails.rst
@@ -0,0 +1,11 @@
+SummarizeAlarmSuppressionHistoryDetails
+=======================================
+
+.. currentmodule:: oci.monitoring.models
+
+.. autoclass:: SummarizeAlarmSuppressionHistoryDetails
+ :show-inheritance:
+ :special-members: __init__
+ :members:
+ :undoc-members:
+ :inherited-members:
\ No newline at end of file
diff --git a/src/oci/adm/application_dependency_management_client.py b/src/oci/adm/application_dependency_management_client.py
index a9f09736c9..d986b7caad 100644
--- a/src/oci/adm/application_dependency_management_client.py
+++ b/src/oci/adm/application_dependency_management_client.py
@@ -2484,15 +2484,19 @@ def list_application_dependency_recommendations(self, remediation_run_id, **kwar
:param str gav: (optional)
A filter to return only resources that match the entire GAV (Group Artifact Version) identifier given.
+ :param str purl: (optional)
+ A filter to return only resources that match the entire PURL given (https://github.com/package-url/purl-spec/).
+
:param str sort_by: (optional)
The field to sort by. Only one sort order may be provided.
If sort order is dfs, the nodes are returned by going through the application dependency tree in a depth-first manner. Children are sorted based on their GAV property alphabetically (either ascending or descending, depending on the order parameter). Default order is ascending.
If sort order is bfs, the nodes are returned by going through the application dependency tree in a breadth-first manner. Children are sorted based on their GAV property alphabetically (either ascending or descending, depending on the order parameter). Default order is ascending.
Default order for gav is ascending where ascending corresponds to alphanumerical order.
+ Default order for purl is ascending where ascending corresponds to alphabetical order
Default order for nodeId is ascending where ascending corresponds to alphanumerical order.
Sorting by DFS or BFS cannot be used in conjunction with the following query parameters: \"gav\", \"cvssV2GreaterThanOrEqual\", \"cvssV3GreaterThanOrEqual\" and \"vulnerabilityId\".
- Allowed values are: "gav", "nodeId", "dfs", "bfs"
+ Allowed values are: "gav", "purl", "nodeId", "dfs", "bfs"
:param obj retry_strategy: (optional)
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
@@ -2528,6 +2532,7 @@ def list_application_dependency_recommendations(self, remediation_run_id, **kwar
"page",
"sort_order",
"gav",
+ "purl",
"sort_by"
]
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
@@ -2553,7 +2558,7 @@ def list_application_dependency_recommendations(self, remediation_run_id, **kwar
)
if 'sort_by' in kwargs:
- sort_by_allowed_values = ["gav", "nodeId", "dfs", "bfs"]
+ sort_by_allowed_values = ["gav", "purl", "nodeId", "dfs", "bfs"]
if kwargs['sort_by'] not in sort_by_allowed_values:
raise ValueError(
f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
@@ -2564,6 +2569,7 @@ def list_application_dependency_recommendations(self, remediation_run_id, **kwar
"page": kwargs.get("page", missing),
"sortOrder": kwargs.get("sort_order", missing),
"gav": kwargs.get("gav", missing),
+ "purl": kwargs.get("purl", missing),
"sortBy": kwargs.get("sort_by", missing)
}
query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
@@ -2623,10 +2629,15 @@ def list_application_dependency_vulnerabilities(self, vulnerability_audit_id, **
A filter to return only Vulnerability Audits that match the specified id.
:param float cvss_v3_greater_than_or_equal: (optional)
- A filter that returns only Vulnerability Audits that have a Common Vulnerability Scoring System Version 3 (CVSS V3) greater or equal than the specified value.
+ A filter that returns only Vulnerabilities that have a Common Vulnerability Scoring System Version 3 (CVSS V3) greater than or equal to the specified value.
:param float cvss_v2_greater_than_or_equal: (optional)
- A filter that returns only Vulnerability Audits that have a Common Vulnerability Scoring System Version 2 (CVSS V2) greater or equal than the specified value.
+ A filter that returns only Vulnerabilities that have a Common Vulnerability Scoring System Version 2 (CVSS V2) greater than or equal to the specified value.
+
+ :param str severity_greater_than_or_equal: (optional)
+ A filter that returns only Vulnerabilities that have a severity greater than or equal to the specified value.
+
+ Allowed values are: "NONE", "LOW", "MEDIUM", "HIGH", "CRITICAL"
:param int limit: (optional)
The maximum number of items to return.
@@ -2644,10 +2655,11 @@ def list_application_dependency_vulnerabilities(self, vulnerability_audit_id, **
If sort order is dfs, the nodes are returned by going through the application dependency tree in a depth-first manner. Children are sorted based on their GAV property alphabetically (either ascending or descending, depending on the order parameter). Default order is ascending.
If sort order is bfs, the nodes are returned by going through the application dependency tree in a breadth-first manner. Children are sorted based on their GAV property alphabetically (either ascending or descending, depending on the order parameter). Default order is ascending.
Default order for gav is ascending where ascending corresponds to alphanumerical order.
+ Default order for purl is ascending where ascending corresponds to alphabetical order
Default order for nodeId is ascending where ascending corresponds to alphanumerical order.
Sorting by DFS or BFS cannot be used in conjunction with the following query parameters: \"gav\", \"cvssV2GreaterThanOrEqual\", \"cvssV3GreaterThanOrEqual\" and \"vulnerabilityId\".
- Allowed values are: "gav", "nodeId", "dfs", "bfs"
+ Allowed values are: "gav", "purl", "nodeId", "dfs", "bfs"
:param str root_node_id: (optional)
A filter to override the top level root identifier with the new given value. The application dependency tree will only be traversed from the given node.
@@ -2660,6 +2672,9 @@ def list_application_dependency_vulnerabilities(self, vulnerability_audit_id, **
:param str gav: (optional)
A filter to return only resources that match the entire GAV (Group Artifact Version) identifier given.
+ :param str purl: (optional)
+ A filter to return only resources that match the entire PURL given (https://github.com/package-url/purl-spec/).
+
:param str opc_request_id: (optional)
The client request ID for tracing.
@@ -2695,6 +2710,7 @@ def list_application_dependency_vulnerabilities(self, vulnerability_audit_id, **
"vulnerability_id",
"cvss_v3_greater_than_or_equal",
"cvss_v2_greater_than_or_equal",
+ "severity_greater_than_or_equal",
"limit",
"page",
"sort_order",
@@ -2702,6 +2718,7 @@ def list_application_dependency_vulnerabilities(self, vulnerability_audit_id, **
"root_node_id",
"depth",
"gav",
+ "purl",
"opc_request_id"
]
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
@@ -2719,6 +2736,13 @@ def list_application_dependency_vulnerabilities(self, vulnerability_audit_id, **
if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
+ if 'severity_greater_than_or_equal' in kwargs:
+ severity_greater_than_or_equal_allowed_values = ["NONE", "LOW", "MEDIUM", "HIGH", "CRITICAL"]
+ if kwargs['severity_greater_than_or_equal'] not in severity_greater_than_or_equal_allowed_values:
+ raise ValueError(
+ f"Invalid value for `severity_greater_than_or_equal`, must be one of { severity_greater_than_or_equal_allowed_values }"
+ )
+
if 'sort_order' in kwargs:
sort_order_allowed_values = ["ASC", "DESC"]
if kwargs['sort_order'] not in sort_order_allowed_values:
@@ -2727,7 +2751,7 @@ def list_application_dependency_vulnerabilities(self, vulnerability_audit_id, **
)
if 'sort_by' in kwargs:
- sort_by_allowed_values = ["gav", "nodeId", "dfs", "bfs"]
+ sort_by_allowed_values = ["gav", "purl", "nodeId", "dfs", "bfs"]
if kwargs['sort_by'] not in sort_by_allowed_values:
raise ValueError(
f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
@@ -2737,13 +2761,15 @@ def list_application_dependency_vulnerabilities(self, vulnerability_audit_id, **
"vulnerabilityId": kwargs.get("vulnerability_id", missing),
"cvssV3GreaterThanOrEqual": kwargs.get("cvss_v3_greater_than_or_equal", missing),
"cvssV2GreaterThanOrEqual": kwargs.get("cvss_v2_greater_than_or_equal", missing),
+ "severityGreaterThanOrEqual": kwargs.get("severity_greater_than_or_equal", missing),
"limit": kwargs.get("limit", missing),
"page": kwargs.get("page", missing),
"sortOrder": kwargs.get("sort_order", missing),
"sortBy": kwargs.get("sort_by", missing),
"rootNodeId": kwargs.get("root_node_id", missing),
"depth": kwargs.get("depth", missing),
- "gav": kwargs.get("gav", missing)
+ "gav": kwargs.get("gav", missing),
+ "purl": kwargs.get("purl", missing)
}
query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
@@ -3509,12 +3535,26 @@ def list_vulnerability_audits(self, **kwargs):
Default order for _timeCreated_ is **descending**.
Default order for _vulnerableArtifactsCount_ is **ascending**.
Default order for _vulnerableArtifactsCountWithIgnored_ is **ascending**.
+ Default order for _maxObservedSeverity_ is **ascending**.
+ Default order for _maxObservedSeverityWithIgnored_ is **ascending**.
+ Default order for _displayName_ is **ascending**.
- Allowed values are: "maxObservedCvssV2Score", "maxObservedCvssV3Score", "timeCreated", "vulnerableArtifactsCount", "maxObservedCvssV2ScoreWithIgnored", "maxObservedCvssV3ScoreWithIgnored", "vulnerableArtifactsCountWithIgnored"
+ Allowed values are: "maxObservedCvssV2Score", "maxObservedCvssV3Score", "maxObservedSeverity", "timeCreated", "vulnerableArtifactsCount", "maxObservedCvssV2ScoreWithIgnored", "maxObservedCvssV3ScoreWithIgnored", "maxObservedSeverityWithIgnored", "vulnerableArtifactsCountWithIgnored", "displayName"
:param str display_name: (optional)
A filter to return only resources that match the entire display name given.
+ :param datetime time_created_greater_than_or_equal_to: (optional)
+ A filter to return only Vulnerability Audits with timeCreated greater or equal to the specified value.
+
+ :param datetime time_created_less_than_or_equal_to: (optional)
+ A filter to return only Vulnerability Audits with timeCreated less or equal to the specified value.
+
+ :param str max_observed_severity_greater_than_or_equal_to: (optional)
+ A filter that returns only Vulnerability Audits that have a maximum observed Severity greater than or equal to the specified value.
+
+ Allowed values are: "NONE", "LOW", "MEDIUM", "HIGH", "CRITICAL"
+
:param obj retry_strategy: (optional)
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
@@ -3554,7 +3594,10 @@ def list_vulnerability_audits(self, **kwargs):
"page",
"opc_request_id",
"sort_by",
- "display_name"
+ "display_name",
+ "time_created_greater_than_or_equal_to",
+ "time_created_less_than_or_equal_to",
+ "max_observed_severity_greater_than_or_equal_to"
]
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
@@ -3576,12 +3619,19 @@ def list_vulnerability_audits(self, **kwargs):
)
if 'sort_by' in kwargs:
- sort_by_allowed_values = ["maxObservedCvssV2Score", "maxObservedCvssV3Score", "timeCreated", "vulnerableArtifactsCount", "maxObservedCvssV2ScoreWithIgnored", "maxObservedCvssV3ScoreWithIgnored", "vulnerableArtifactsCountWithIgnored"]
+ sort_by_allowed_values = ["maxObservedCvssV2Score", "maxObservedCvssV3Score", "maxObservedSeverity", "timeCreated", "vulnerableArtifactsCount", "maxObservedCvssV2ScoreWithIgnored", "maxObservedCvssV3ScoreWithIgnored", "maxObservedSeverityWithIgnored", "vulnerableArtifactsCountWithIgnored", "displayName"]
if kwargs['sort_by'] not in sort_by_allowed_values:
raise ValueError(
f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
)
+ if 'max_observed_severity_greater_than_or_equal_to' in kwargs:
+ max_observed_severity_greater_than_or_equal_to_allowed_values = ["NONE", "LOW", "MEDIUM", "HIGH", "CRITICAL"]
+ if kwargs['max_observed_severity_greater_than_or_equal_to'] not in max_observed_severity_greater_than_or_equal_to_allowed_values:
+ raise ValueError(
+ f"Invalid value for `max_observed_severity_greater_than_or_equal_to`, must be one of { max_observed_severity_greater_than_or_equal_to_allowed_values }"
+ )
+
query_params = {
"id": kwargs.get("id", missing),
"compartmentId": kwargs.get("compartment_id", missing),
@@ -3592,7 +3642,10 @@ def list_vulnerability_audits(self, **kwargs):
"limit": kwargs.get("limit", missing),
"page": kwargs.get("page", missing),
"sortBy": kwargs.get("sort_by", missing),
- "displayName": kwargs.get("display_name", missing)
+ "displayName": kwargs.get("display_name", missing),
+ "timeCreatedGreaterThanOrEqualTo": kwargs.get("time_created_greater_than_or_equal_to", missing),
+ "timeCreatedLessThanOrEqualTo": kwargs.get("time_created_less_than_or_equal_to", missing),
+ "maxObservedSeverityGreaterThanOrEqualTo": kwargs.get("max_observed_severity_greater_than_or_equal_to", missing)
}
query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
diff --git a/src/oci/adm/application_dependency_management_client_composite_operations.py b/src/oci/adm/application_dependency_management_client_composite_operations.py
index 328694151a..4269a0d18a 100644
--- a/src/oci/adm/application_dependency_management_client_composite_operations.py
+++ b/src/oci/adm/application_dependency_management_client_composite_operations.py
@@ -315,14 +315,14 @@ def create_remediation_run_and_wait_for_state(self, create_remediation_run_detai
def create_vulnerability_audit_and_wait_for_state(self, create_vulnerability_audit_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
"""
- Calls :py:func:`~oci.adm.ApplicationDependencyManagementClient.create_vulnerability_audit` and waits for the :py:class:`~oci.adm.models.WorkRequest`
+ Calls :py:func:`~oci.adm.ApplicationDependencyManagementClient.create_vulnerability_audit` and waits for the :py:class:`~oci.adm.models.VulnerabilityAudit` acted upon
to enter the given state(s).
:param oci.adm.models.CreateVulnerabilityAuditDetails create_vulnerability_audit_details: (required)
The details to create a new Vulnerability Audit.
:param list[str] wait_for_states:
- An array of states to wait on. These should be valid values for :py:attr:`~oci.adm.models.WorkRequest.status`
+ An array of states to wait on. These should be valid values for :py:attr:`~oci.adm.models.VulnerabilityAudit.lifecycle_state`
:param dict operation_kwargs:
A dictionary of keyword arguments to pass to :py:func:`~oci.adm.ApplicationDependencyManagementClient.create_vulnerability_audit`
@@ -336,18 +336,23 @@ def create_vulnerability_audit_and_wait_for_state(self, create_vulnerability_aud
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']
+ vulnerability_audit_id = operation_result.data.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,
+ self.client.get_vulnerability_audit(vulnerability_audit_id), # noqa: F821
+ evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
**waiter_kwargs
)
result_to_return = waiter_result
return result_to_return
+ except (NameError, TypeError) as e:
+ if not e.args:
+ e.args = ('',)
+ e.args = e.args + ('This composite operation is currently not supported in the SDK. Please use the operation from the service client and use waiters as an alternative. For more information on waiters, visit: "https://docs.oracle.com/en-us/iaas/tools/python/latest/api/waiters.html"', )
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
except Exception as e:
raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
diff --git a/src/oci/adm/models/application_dependency.py b/src/oci/adm/models/application_dependency.py
index 6b8fd1cf42..1ab4af7c00 100644
--- a/src/oci/adm/models/application_dependency.py
+++ b/src/oci/adm/models/application_dependency.py
@@ -24,6 +24,10 @@ def __init__(self, **kwargs):
The value to assign to the gav property of this ApplicationDependency.
:type gav: str
+ :param purl:
+ The value to assign to the purl property of this ApplicationDependency.
+ :type purl: str
+
:param node_id:
The value to assign to the node_id property of this ApplicationDependency.
:type node_id: str
@@ -35,25 +39,29 @@ def __init__(self, **kwargs):
"""
self.swagger_types = {
'gav': 'str',
+ 'purl': 'str',
'node_id': 'str',
'application_dependency_node_ids': 'list[str]'
}
self.attribute_map = {
'gav': 'gav',
+ 'purl': 'purl',
'node_id': 'nodeId',
'application_dependency_node_ids': 'applicationDependencyNodeIds'
}
self._gav = None
+ self._purl = None
self._node_id = None
self._application_dependency_node_ids = None
@property
def gav(self):
"""
- **[Required]** Gets the gav of this ApplicationDependency.
- Group Artifact Version (GAV) identifier (Group:Artifact:Version), e.g. org.graalvm.nativeimage:svm:21.1.0.
+ Gets the gav of this ApplicationDependency.
+ Group Artifact Version (GAV) identifier (Group:Artifact:Version). Example: org.graalvm.nativeimage:svm:21.1.0.
+ \"N/A\" for non-maven artifacts.
:return: The gav of this ApplicationDependency.
@@ -65,7 +73,8 @@ def gav(self):
def gav(self, gav):
"""
Sets the gav of this ApplicationDependency.
- Group Artifact Version (GAV) identifier (Group:Artifact:Version), e.g. org.graalvm.nativeimage:svm:21.1.0.
+ Group Artifact Version (GAV) identifier (Group:Artifact:Version). Example: org.graalvm.nativeimage:svm:21.1.0.
+ \"N/A\" for non-maven artifacts.
:param gav: The gav of this ApplicationDependency.
@@ -73,6 +82,30 @@ def gav(self, gav):
"""
self._gav = gav
+ @property
+ def purl(self):
+ """
+ Gets the purl of this ApplicationDependency.
+ Package URL defined in https://github.com/package-url/purl-spec, e.g. pkg:maven/org.graalvm.nativeimage/svm@21.1.0
+
+
+ :return: The purl of this ApplicationDependency.
+ :rtype: str
+ """
+ return self._purl
+
+ @purl.setter
+ def purl(self, purl):
+ """
+ Sets the purl of this ApplicationDependency.
+ Package URL defined in https://github.com/package-url/purl-spec, e.g. pkg:maven/org.graalvm.nativeimage/svm@21.1.0
+
+
+ :param purl: The purl of this ApplicationDependency.
+ :type: str
+ """
+ self._purl = purl
+
@property
def node_id(self):
"""
diff --git a/src/oci/adm/models/application_dependency_recommendation_summary.py b/src/oci/adm/models/application_dependency_recommendation_summary.py
index 57d44e1d59..ded25b313a 100644
--- a/src/oci/adm/models/application_dependency_recommendation_summary.py
+++ b/src/oci/adm/models/application_dependency_recommendation_summary.py
@@ -25,6 +25,10 @@ def __init__(self, **kwargs):
The value to assign to the gav property of this ApplicationDependencyRecommendationSummary.
:type gav: str
+ :param purl:
+ The value to assign to the purl property of this ApplicationDependencyRecommendationSummary.
+ :type purl: str
+
:param node_id:
The value to assign to the node_id property of this ApplicationDependencyRecommendationSummary.
:type node_id: str
@@ -37,25 +41,35 @@ def __init__(self, **kwargs):
The value to assign to the recommended_gav property of this ApplicationDependencyRecommendationSummary.
:type recommended_gav: str
+ :param recommended_purl:
+ The value to assign to the recommended_purl property of this ApplicationDependencyRecommendationSummary.
+ :type recommended_purl: str
+
"""
self.swagger_types = {
'gav': 'str',
+ 'purl': 'str',
'node_id': 'str',
'application_dependency_node_ids': 'list[str]',
- 'recommended_gav': 'str'
+ 'recommended_gav': 'str',
+ 'recommended_purl': 'str'
}
self.attribute_map = {
'gav': 'gav',
+ 'purl': 'purl',
'node_id': 'nodeId',
'application_dependency_node_ids': 'applicationDependencyNodeIds',
- 'recommended_gav': 'recommendedGav'
+ 'recommended_gav': 'recommendedGav',
+ 'recommended_purl': 'recommendedPurl'
}
self._gav = None
+ self._purl = None
self._node_id = None
self._application_dependency_node_ids = None
self._recommended_gav = None
+ self._recommended_purl = None
@property
def gav(self):
@@ -81,6 +95,30 @@ def gav(self, gav):
"""
self._gav = gav
+ @property
+ def purl(self):
+ """
+ Gets the purl of this ApplicationDependencyRecommendationSummary.
+ Package URL defined in https://github.com/package-url/purl-spec, e.g. pkg:maven/org.graalvm.nativeimage/svm@21.1.0
+
+
+ :return: The purl of this ApplicationDependencyRecommendationSummary.
+ :rtype: str
+ """
+ return self._purl
+
+ @purl.setter
+ def purl(self, purl):
+ """
+ Sets the purl of this ApplicationDependencyRecommendationSummary.
+ Package URL defined in https://github.com/package-url/purl-spec, e.g. pkg:maven/org.graalvm.nativeimage/svm@21.1.0
+
+
+ :param purl: The purl of this ApplicationDependencyRecommendationSummary.
+ :type: str
+ """
+ self._purl = purl
+
@property
def node_id(self):
"""
@@ -153,6 +191,30 @@ def recommended_gav(self, recommended_gav):
"""
self._recommended_gav = recommended_gav
+ @property
+ def recommended_purl(self):
+ """
+ Gets the recommended_purl of this ApplicationDependencyRecommendationSummary.
+ Recommended application dependency in PURL format, e.g. pkg:maven/org.graalvm.nativeimage/svm@21.2.0
+
+
+ :return: The recommended_purl of this ApplicationDependencyRecommendationSummary.
+ :rtype: str
+ """
+ return self._recommended_purl
+
+ @recommended_purl.setter
+ def recommended_purl(self, recommended_purl):
+ """
+ Sets the recommended_purl of this ApplicationDependencyRecommendationSummary.
+ Recommended application dependency in PURL format, e.g. pkg:maven/org.graalvm.nativeimage/svm@21.2.0
+
+
+ :param recommended_purl: The recommended_purl of this ApplicationDependencyRecommendationSummary.
+ :type: str
+ """
+ self._recommended_purl = recommended_purl
+
def __repr__(self):
return formatted_flat_dict(self)
diff --git a/src/oci/adm/models/application_dependency_vulnerability_summary.py b/src/oci/adm/models/application_dependency_vulnerability_summary.py
index 549866bc12..6af55f0e6a 100644
--- a/src/oci/adm/models/application_dependency_vulnerability_summary.py
+++ b/src/oci/adm/models/application_dependency_vulnerability_summary.py
@@ -26,6 +26,10 @@ def __init__(self, **kwargs):
The value to assign to the gav property of this ApplicationDependencyVulnerabilitySummary.
:type gav: str
+ :param purl:
+ The value to assign to the purl property of this ApplicationDependencyVulnerabilitySummary.
+ :type purl: str
+
:param node_id:
The value to assign to the node_id property of this ApplicationDependencyVulnerabilitySummary.
:type node_id: str
@@ -45,6 +49,7 @@ def __init__(self, **kwargs):
"""
self.swagger_types = {
'gav': 'str',
+ 'purl': 'str',
'node_id': 'str',
'application_dependency_node_ids': 'list[str]',
'vulnerabilities': 'list[Vulnerability]',
@@ -53,6 +58,7 @@ def __init__(self, **kwargs):
self.attribute_map = {
'gav': 'gav',
+ 'purl': 'purl',
'node_id': 'nodeId',
'application_dependency_node_ids': 'applicationDependencyNodeIds',
'vulnerabilities': 'vulnerabilities',
@@ -60,6 +66,7 @@ def __init__(self, **kwargs):
}
self._gav = None
+ self._purl = None
self._node_id = None
self._application_dependency_node_ids = None
self._vulnerabilities = None
@@ -69,7 +76,8 @@ def __init__(self, **kwargs):
def gav(self):
"""
**[Required]** Gets the gav of this ApplicationDependencyVulnerabilitySummary.
- Group Artifact Version (GAV) identifier (Group:Artifact:Version), for example org.graalvm.nativeimage:svm:21.1.0.
+ Group Artifact Version (GAV) identifier (Group:Artifact:Version). Example: org.graalvm.nativeimage:svm:21.1.0.
+ \"N/A\" for non-maven artifacts.
:return: The gav of this ApplicationDependencyVulnerabilitySummary.
@@ -81,7 +89,8 @@ def gav(self):
def gav(self, gav):
"""
Sets the gav of this ApplicationDependencyVulnerabilitySummary.
- Group Artifact Version (GAV) identifier (Group:Artifact:Version), for example org.graalvm.nativeimage:svm:21.1.0.
+ Group Artifact Version (GAV) identifier (Group:Artifact:Version). Example: org.graalvm.nativeimage:svm:21.1.0.
+ \"N/A\" for non-maven artifacts.
:param gav: The gav of this ApplicationDependencyVulnerabilitySummary.
@@ -89,6 +98,30 @@ def gav(self, gav):
"""
self._gav = gav
+ @property
+ def purl(self):
+ """
+ Gets the purl of this ApplicationDependencyVulnerabilitySummary.
+ Package URL defined in https://github.com/package-url/purl-spec, e.g. pkg:maven/org.graalvm.nativeimage/svm@21.1.0
+
+
+ :return: The purl of this ApplicationDependencyVulnerabilitySummary.
+ :rtype: str
+ """
+ return self._purl
+
+ @purl.setter
+ def purl(self, purl):
+ """
+ Sets the purl of this ApplicationDependencyVulnerabilitySummary.
+ Package URL defined in https://github.com/package-url/purl-spec, e.g. pkg:maven/org.graalvm.nativeimage/svm@21.1.0
+
+
+ :param purl: The purl of this ApplicationDependencyVulnerabilitySummary.
+ :type: str
+ """
+ self._purl = purl
+
@property
def node_id(self):
"""
diff --git a/src/oci/adm/models/create_vulnerability_audit_details.py b/src/oci/adm/models/create_vulnerability_audit_details.py
index 22887f99fc..9785ec5977 100644
--- a/src/oci/adm/models/create_vulnerability_audit_details.py
+++ b/src/oci/adm/models/create_vulnerability_audit_details.py
@@ -183,8 +183,8 @@ def application_dependencies(self, application_dependencies):
@property
def build_type(self):
"""
- **[Required]** Gets the build_type of this CreateVulnerabilityAuditDetails.
- The type of the build tool.
+ Gets the build_type of this CreateVulnerabilityAuditDetails.
+ The type of the build tool is restricted to only two values MAVEN or UNSET. Use UNSET when the list of application dependencies is not Maven-related or is a mix of Maven and other ecosystems. This option is soon to be deprecated.
:return: The build_type of this CreateVulnerabilityAuditDetails.
@@ -196,7 +196,7 @@ def build_type(self):
def build_type(self, build_type):
"""
Sets the build_type of this CreateVulnerabilityAuditDetails.
- The type of the build tool.
+ The type of the build tool is restricted to only two values MAVEN or UNSET. Use UNSET when the list of application dependencies is not Maven-related or is a mix of Maven and other ecosystems. This option is soon to be deprecated.
:param build_type: The build_type of this CreateVulnerabilityAuditDetails.
diff --git a/src/oci/adm/models/detect_configuration.py b/src/oci/adm/models/detect_configuration.py
index 3120f26040..47775c31d7 100644
--- a/src/oci/adm/models/detect_configuration.py
+++ b/src/oci/adm/models/detect_configuration.py
@@ -19,6 +19,30 @@ class DetectConfiguration(object):
#: This constant has a value of "NEAREST"
UPGRADE_POLICY_NEAREST = "NEAREST"
+ #: A constant which can be used with the max_permissible_severity property of a DetectConfiguration.
+ #: This constant has a value of "UNSET"
+ MAX_PERMISSIBLE_SEVERITY_UNSET = "UNSET"
+
+ #: A constant which can be used with the max_permissible_severity property of a DetectConfiguration.
+ #: This constant has a value of "NONE"
+ MAX_PERMISSIBLE_SEVERITY_NONE = "NONE"
+
+ #: A constant which can be used with the max_permissible_severity property of a DetectConfiguration.
+ #: This constant has a value of "LOW"
+ MAX_PERMISSIBLE_SEVERITY_LOW = "LOW"
+
+ #: A constant which can be used with the max_permissible_severity property of a DetectConfiguration.
+ #: This constant has a value of "MEDIUM"
+ MAX_PERMISSIBLE_SEVERITY_MEDIUM = "MEDIUM"
+
+ #: A constant which can be used with the max_permissible_severity property of a DetectConfiguration.
+ #: This constant has a value of "HIGH"
+ MAX_PERMISSIBLE_SEVERITY_HIGH = "HIGH"
+
+ #: A constant which can be used with the max_permissible_severity property of a DetectConfiguration.
+ #: This constant has a value of "CRITICAL"
+ MAX_PERMISSIBLE_SEVERITY_CRITICAL = "CRITICAL"
+
def __init__(self, **kwargs):
"""
Initializes a new DetectConfiguration object with values from keyword arguments.
@@ -42,25 +66,34 @@ def __init__(self, **kwargs):
The value to assign to the max_permissible_cvss_v3_score property of this DetectConfiguration.
:type max_permissible_cvss_v3_score: float
+ :param max_permissible_severity:
+ The value to assign to the max_permissible_severity property of this DetectConfiguration.
+ Allowed values for this property are: "UNSET", "NONE", "LOW", "MEDIUM", "HIGH", "CRITICAL", 'UNKNOWN_ENUM_VALUE'.
+ Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
+ :type max_permissible_severity: str
+
"""
self.swagger_types = {
'exclusions': 'list[str]',
'upgrade_policy': 'str',
'max_permissible_cvss_v2_score': 'float',
- 'max_permissible_cvss_v3_score': 'float'
+ 'max_permissible_cvss_v3_score': 'float',
+ 'max_permissible_severity': 'str'
}
self.attribute_map = {
'exclusions': 'exclusions',
'upgrade_policy': 'upgradePolicy',
'max_permissible_cvss_v2_score': 'maxPermissibleCvssV2Score',
- 'max_permissible_cvss_v3_score': 'maxPermissibleCvssV3Score'
+ 'max_permissible_cvss_v3_score': 'maxPermissibleCvssV3Score',
+ 'max_permissible_severity': 'maxPermissibleSeverity'
}
self._exclusions = None
self._upgrade_policy = None
self._max_permissible_cvss_v2_score = None
self._max_permissible_cvss_v3_score = None
+ self._max_permissible_severity = None
@property
def exclusions(self):
@@ -168,6 +201,36 @@ def max_permissible_cvss_v3_score(self, max_permissible_cvss_v3_score):
"""
self._max_permissible_cvss_v3_score = max_permissible_cvss_v3_score
+ @property
+ def max_permissible_severity(self):
+ """
+ Gets the max_permissible_severity of this DetectConfiguration.
+ The maximum ADM Severity. An artifact with an ADM Severity below this value is not considered for patching.
+
+ Allowed values for this property are: "UNSET", "NONE", "LOW", "MEDIUM", "HIGH", "CRITICAL", 'UNKNOWN_ENUM_VALUE'.
+ Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
+
+
+ :return: The max_permissible_severity of this DetectConfiguration.
+ :rtype: str
+ """
+ return self._max_permissible_severity
+
+ @max_permissible_severity.setter
+ def max_permissible_severity(self, max_permissible_severity):
+ """
+ Sets the max_permissible_severity of this DetectConfiguration.
+ The maximum ADM Severity. An artifact with an ADM Severity below this value is not considered for patching.
+
+
+ :param max_permissible_severity: The max_permissible_severity of this DetectConfiguration.
+ :type: str
+ """
+ allowed_values = ["UNSET", "NONE", "LOW", "MEDIUM", "HIGH", "CRITICAL"]
+ if not value_allowed_none_or_none_sentinel(max_permissible_severity, allowed_values):
+ max_permissible_severity = 'UNKNOWN_ENUM_VALUE'
+ self._max_permissible_severity = max_permissible_severity
+
def __repr__(self):
return formatted_flat_dict(self)
diff --git a/src/oci/adm/models/usage_data_details.py b/src/oci/adm/models/usage_data_details.py
index ad271fbbeb..31157a7b84 100644
--- a/src/oci/adm/models/usage_data_details.py
+++ b/src/oci/adm/models/usage_data_details.py
@@ -12,7 +12,8 @@
@init_model_state_from_kwargs
class UsageDataDetails(object):
"""
- The source details of the usage data on Object Storage.
+ The source details of the usage data in object storage. The usage data file uploaded to object storage must be a gzip archive
+ of the JSON usage data returned from the GraalVM native-image-inspect tool after a native-image build.
Set `sourceType` to `objectStorageTuple`
and use :func:`usage_data_via_object_storage_tuple_details`
when specifying the namespace, bucket name, and object name.
diff --git a/src/oci/adm/models/usage_data_via_object_storage_tuple_details.py b/src/oci/adm/models/usage_data_via_object_storage_tuple_details.py
index a6427c9c90..3b5c15c8bc 100644
--- a/src/oci/adm/models/usage_data_via_object_storage_tuple_details.py
+++ b/src/oci/adm/models/usage_data_via_object_storage_tuple_details.py
@@ -12,7 +12,8 @@
@init_model_state_from_kwargs
class UsageDataViaObjectStorageTupleDetails(UsageDataDetails):
"""
- Reference to an object in Object Storage as a tuple.
+ Reference to an object in object storage as a tuple. The usage data file uploaded to object storage must be a gzip archive
+ of the JSON usage data returned from the GraalVM native-image-inspect tool after a native-image build.
"""
def __init__(self, **kwargs):
diff --git a/src/oci/adm/models/vulnerability.py b/src/oci/adm/models/vulnerability.py
index c59af2431e..d402812778 100644
--- a/src/oci/adm/models/vulnerability.py
+++ b/src/oci/adm/models/vulnerability.py
@@ -16,6 +16,26 @@ class Vulnerability(object):
A vulnerability is a generalization of a CVE (every CVE is a vulnerability, but not every vulnerability has a CVE).
"""
+ #: A constant which can be used with the severity property of a Vulnerability.
+ #: This constant has a value of "NONE"
+ SEVERITY_NONE = "NONE"
+
+ #: A constant which can be used with the severity property of a Vulnerability.
+ #: This constant has a value of "LOW"
+ SEVERITY_LOW = "LOW"
+
+ #: A constant which can be used with the severity property of a Vulnerability.
+ #: This constant has a value of "MEDIUM"
+ SEVERITY_MEDIUM = "MEDIUM"
+
+ #: A constant which can be used with the severity property of a Vulnerability.
+ #: This constant has a value of "HIGH"
+ SEVERITY_HIGH = "HIGH"
+
+ #: A constant which can be used with the severity property of a Vulnerability.
+ #: This constant has a value of "CRITICAL"
+ SEVERITY_CRITICAL = "CRITICAL"
+
def __init__(self, **kwargs):
"""
Initializes a new Vulnerability object with values from keyword arguments.
@@ -25,6 +45,10 @@ def __init__(self, **kwargs):
The value to assign to the id property of this Vulnerability.
:type id: str
+ :param source:
+ The value to assign to the source property of this Vulnerability.
+ :type source: str
+
:param cvss_v2_score:
The value to assign to the cvss_v2_score property of this Vulnerability.
:type cvss_v2_score: float
@@ -33,6 +57,12 @@ def __init__(self, **kwargs):
The value to assign to the cvss_v3_score property of this Vulnerability.
:type cvss_v3_score: float
+ :param severity:
+ The value to assign to the severity property of this Vulnerability.
+ Allowed values for this property are: "NONE", "LOW", "MEDIUM", "HIGH", "CRITICAL", 'UNKNOWN_ENUM_VALUE'.
+ Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
+ :type severity: str
+
:param is_ignored:
The value to assign to the is_ignored property of this Vulnerability.
:type is_ignored: bool
@@ -44,23 +74,29 @@ def __init__(self, **kwargs):
"""
self.swagger_types = {
'id': 'str',
+ 'source': 'str',
'cvss_v2_score': 'float',
'cvss_v3_score': 'float',
+ 'severity': 'str',
'is_ignored': 'bool',
'is_false_positive': 'bool'
}
self.attribute_map = {
'id': 'id',
+ 'source': 'source',
'cvss_v2_score': 'cvssV2Score',
'cvss_v3_score': 'cvssV3Score',
+ 'severity': 'severity',
'is_ignored': 'isIgnored',
'is_false_positive': 'isFalsePositive'
}
self._id = None
+ self._source = None
self._cvss_v2_score = None
self._cvss_v3_score = None
+ self._severity = None
self._is_ignored = None
self._is_false_positive = None
@@ -88,10 +124,34 @@ def id(self, id):
"""
self._id = id
+ @property
+ def source(self):
+ """
+ Gets the source of this Vulnerability.
+ Source that published the vulnerability
+
+
+ :return: The source of this Vulnerability.
+ :rtype: str
+ """
+ return self._source
+
+ @source.setter
+ def source(self, source):
+ """
+ Sets the source of this Vulnerability.
+ Source that published the vulnerability
+
+
+ :param source: The source of this Vulnerability.
+ :type: str
+ """
+ self._source = source
+
@property
def cvss_v2_score(self):
"""
- **[Required]** Gets the cvss_v2_score of this Vulnerability.
+ Gets the cvss_v2_score of this Vulnerability.
Common Vulnerability Scoring System (CVSS) Version 2.
@@ -115,7 +175,7 @@ def cvss_v2_score(self, cvss_v2_score):
@property
def cvss_v3_score(self):
"""
- **[Required]** Gets the cvss_v3_score of this Vulnerability.
+ Gets the cvss_v3_score of this Vulnerability.
Common Vulnerability Scoring System (CVSS) Version 3.
@@ -136,6 +196,36 @@ def cvss_v3_score(self, cvss_v3_score):
"""
self._cvss_v3_score = cvss_v3_score
+ @property
+ def severity(self):
+ """
+ Gets the severity of this Vulnerability.
+ ADM qualitative severity score. Can be either NONE, LOW, MEDIUM, HIGH or CRITICAL.
+
+ Allowed values for this property are: "NONE", "LOW", "MEDIUM", "HIGH", "CRITICAL", 'UNKNOWN_ENUM_VALUE'.
+ Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
+
+
+ :return: The severity of this Vulnerability.
+ :rtype: str
+ """
+ return self._severity
+
+ @severity.setter
+ def severity(self, severity):
+ """
+ Sets the severity of this Vulnerability.
+ ADM qualitative severity score. Can be either NONE, LOW, MEDIUM, HIGH or CRITICAL.
+
+
+ :param severity: The severity of this Vulnerability.
+ :type: str
+ """
+ allowed_values = ["NONE", "LOW", "MEDIUM", "HIGH", "CRITICAL"]
+ if not value_allowed_none_or_none_sentinel(severity, allowed_values):
+ severity = 'UNKNOWN_ENUM_VALUE'
+ self._severity = severity
+
@property
def is_ignored(self):
"""
diff --git a/src/oci/adm/models/vulnerability_audit.py b/src/oci/adm/models/vulnerability_audit.py
index daeb663841..6e4ca77db5 100644
--- a/src/oci/adm/models/vulnerability_audit.py
+++ b/src/oci/adm/models/vulnerability_audit.py
@@ -58,10 +58,54 @@ class VulnerabilityAudit(object):
#: This constant has a value of "USAGE_DATA_UNKNOWN_ERROR"
LIFECYCLE_DETAILS_USAGE_DATA_UNKNOWN_ERROR = "USAGE_DATA_UNKNOWN_ERROR"
+ #: A constant which can be used with the max_observed_severity property of a VulnerabilityAudit.
+ #: This constant has a value of "NONE"
+ MAX_OBSERVED_SEVERITY_NONE = "NONE"
+
+ #: A constant which can be used with the max_observed_severity property of a VulnerabilityAudit.
+ #: This constant has a value of "LOW"
+ MAX_OBSERVED_SEVERITY_LOW = "LOW"
+
+ #: A constant which can be used with the max_observed_severity property of a VulnerabilityAudit.
+ #: This constant has a value of "MEDIUM"
+ MAX_OBSERVED_SEVERITY_MEDIUM = "MEDIUM"
+
+ #: A constant which can be used with the max_observed_severity property of a VulnerabilityAudit.
+ #: This constant has a value of "HIGH"
+ MAX_OBSERVED_SEVERITY_HIGH = "HIGH"
+
+ #: A constant which can be used with the max_observed_severity property of a VulnerabilityAudit.
+ #: This constant has a value of "CRITICAL"
+ MAX_OBSERVED_SEVERITY_CRITICAL = "CRITICAL"
+
+ #: A constant which can be used with the max_observed_severity_with_ignored property of a VulnerabilityAudit.
+ #: This constant has a value of "NONE"
+ MAX_OBSERVED_SEVERITY_WITH_IGNORED_NONE = "NONE"
+
+ #: A constant which can be used with the max_observed_severity_with_ignored property of a VulnerabilityAudit.
+ #: This constant has a value of "LOW"
+ MAX_OBSERVED_SEVERITY_WITH_IGNORED_LOW = "LOW"
+
+ #: A constant which can be used with the max_observed_severity_with_ignored property of a VulnerabilityAudit.
+ #: This constant has a value of "MEDIUM"
+ MAX_OBSERVED_SEVERITY_WITH_IGNORED_MEDIUM = "MEDIUM"
+
+ #: A constant which can be used with the max_observed_severity_with_ignored property of a VulnerabilityAudit.
+ #: This constant has a value of "HIGH"
+ MAX_OBSERVED_SEVERITY_WITH_IGNORED_HIGH = "HIGH"
+
+ #: A constant which can be used with the max_observed_severity_with_ignored property of a VulnerabilityAudit.
+ #: This constant has a value of "CRITICAL"
+ MAX_OBSERVED_SEVERITY_WITH_IGNORED_CRITICAL = "CRITICAL"
+
#: A constant which can be used with the build_type property of a VulnerabilityAudit.
#: This constant has a value of "MAVEN"
BUILD_TYPE_MAVEN = "MAVEN"
+ #: A constant which can be used with the build_type property of a VulnerabilityAudit.
+ #: This constant has a value of "UNSET"
+ BUILD_TYPE_UNSET = "UNSET"
+
def __init__(self, **kwargs):
"""
Initializes a new VulnerabilityAudit object with values from keyword arguments.
@@ -111,6 +155,12 @@ def __init__(self, **kwargs):
The value to assign to the max_observed_cvss_v3_score property of this VulnerabilityAudit.
:type max_observed_cvss_v3_score: float
+ :param max_observed_severity:
+ The value to assign to the max_observed_severity property of this VulnerabilityAudit.
+ Allowed values for this property are: "NONE", "LOW", "MEDIUM", "HIGH", "CRITICAL", 'UNKNOWN_ENUM_VALUE'.
+ Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
+ :type max_observed_severity: str
+
:param max_observed_cvss_v2_score_with_ignored:
The value to assign to the max_observed_cvss_v2_score_with_ignored property of this VulnerabilityAudit.
:type max_observed_cvss_v2_score_with_ignored: float
@@ -119,6 +169,12 @@ def __init__(self, **kwargs):
The value to assign to the max_observed_cvss_v3_score_with_ignored property of this VulnerabilityAudit.
:type max_observed_cvss_v3_score_with_ignored: float
+ :param max_observed_severity_with_ignored:
+ The value to assign to the max_observed_severity_with_ignored property of this VulnerabilityAudit.
+ Allowed values for this property are: "NONE", "LOW", "MEDIUM", "HIGH", "CRITICAL", 'UNKNOWN_ENUM_VALUE'.
+ Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
+ :type max_observed_severity_with_ignored: str
+
:param vulnerable_artifacts_count_with_ignored:
The value to assign to the vulnerable_artifacts_count_with_ignored property of this VulnerabilityAudit.
:type vulnerable_artifacts_count_with_ignored: int
@@ -141,7 +197,7 @@ def __init__(self, **kwargs):
:param build_type:
The value to assign to the build_type property of this VulnerabilityAudit.
- Allowed values for this property are: "MAVEN", 'UNKNOWN_ENUM_VALUE'.
+ Allowed values for this property are: "MAVEN", "UNSET", 'UNKNOWN_ENUM_VALUE'.
Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
:type build_type: str
@@ -177,8 +233,10 @@ def __init__(self, **kwargs):
'vulnerabilities': 'list[Vulnerability]',
'max_observed_cvss_v2_score': 'float',
'max_observed_cvss_v3_score': 'float',
+ 'max_observed_severity': 'str',
'max_observed_cvss_v2_score_with_ignored': 'float',
'max_observed_cvss_v3_score_with_ignored': 'float',
+ 'max_observed_severity_with_ignored': 'str',
'vulnerable_artifacts_count_with_ignored': 'int',
'vulnerable_artifacts_count': 'int',
'configuration': 'VulnerabilityAuditConfiguration',
@@ -203,8 +261,10 @@ def __init__(self, **kwargs):
'vulnerabilities': 'vulnerabilities',
'max_observed_cvss_v2_score': 'maxObservedCvssV2Score',
'max_observed_cvss_v3_score': 'maxObservedCvssV3Score',
+ 'max_observed_severity': 'maxObservedSeverity',
'max_observed_cvss_v2_score_with_ignored': 'maxObservedCvssV2ScoreWithIgnored',
'max_observed_cvss_v3_score_with_ignored': 'maxObservedCvssV3ScoreWithIgnored',
+ 'max_observed_severity_with_ignored': 'maxObservedSeverityWithIgnored',
'vulnerable_artifacts_count_with_ignored': 'vulnerableArtifactsCountWithIgnored',
'vulnerable_artifacts_count': 'vulnerableArtifactsCount',
'configuration': 'configuration',
@@ -228,8 +288,10 @@ def __init__(self, **kwargs):
self._vulnerabilities = None
self._max_observed_cvss_v2_score = None
self._max_observed_cvss_v3_score = None
+ self._max_observed_severity = None
self._max_observed_cvss_v2_score_with_ignored = None
self._max_observed_cvss_v3_score_with_ignored = None
+ self._max_observed_severity_with_ignored = None
self._vulnerable_artifacts_count_with_ignored = None
self._vulnerable_artifacts_count = None
self._configuration = None
@@ -442,7 +504,7 @@ def lifecycle_details(self, lifecycle_details):
def vulnerabilities(self):
"""
**[Required]** Gets the vulnerabilities of this VulnerabilityAudit.
- List of vulnerabilities found in the vulnerability audit.
+ List of vulnerabilities found in the vulnerability audit. If a vulnerability affects multiple dependencies, the metadata returned here consists of audit-wide aggregates.
:return: The vulnerabilities of this VulnerabilityAudit.
@@ -454,7 +516,7 @@ def vulnerabilities(self):
def vulnerabilities(self, vulnerabilities):
"""
Sets the vulnerabilities of this VulnerabilityAudit.
- List of vulnerabilities found in the vulnerability audit.
+ List of vulnerabilities found in the vulnerability audit. If a vulnerability affects multiple dependencies, the metadata returned here consists of audit-wide aggregates.
:param vulnerabilities: The vulnerabilities of this VulnerabilityAudit.
@@ -465,7 +527,7 @@ def vulnerabilities(self, vulnerabilities):
@property
def max_observed_cvss_v2_score(self):
"""
- **[Required]** Gets the max_observed_cvss_v2_score of this VulnerabilityAudit.
+ Gets the max_observed_cvss_v2_score of this VulnerabilityAudit.
Maximum Common Vulnerability Scoring System Version 2 score observed for non-ignored vulnerable application dependencies.
@@ -489,7 +551,7 @@ def max_observed_cvss_v2_score(self, max_observed_cvss_v2_score):
@property
def max_observed_cvss_v3_score(self):
"""
- **[Required]** Gets the max_observed_cvss_v3_score of this VulnerabilityAudit.
+ Gets the max_observed_cvss_v3_score of this VulnerabilityAudit.
Maximum Common Vulnerability Scoring System Version 3 score observed for non-ignored vulnerable application dependencies.
@@ -510,10 +572,40 @@ def max_observed_cvss_v3_score(self, max_observed_cvss_v3_score):
"""
self._max_observed_cvss_v3_score = max_observed_cvss_v3_score
+ @property
+ def max_observed_severity(self):
+ """
+ Gets the max_observed_severity of this VulnerabilityAudit.
+ Maximum ADM Severity observed for non-ignored vulnerable application dependencies.
+
+ Allowed values for this property are: "NONE", "LOW", "MEDIUM", "HIGH", "CRITICAL", 'UNKNOWN_ENUM_VALUE'.
+ Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
+
+
+ :return: The max_observed_severity of this VulnerabilityAudit.
+ :rtype: str
+ """
+ return self._max_observed_severity
+
+ @max_observed_severity.setter
+ def max_observed_severity(self, max_observed_severity):
+ """
+ Sets the max_observed_severity of this VulnerabilityAudit.
+ Maximum ADM Severity observed for non-ignored vulnerable application dependencies.
+
+
+ :param max_observed_severity: The max_observed_severity of this VulnerabilityAudit.
+ :type: str
+ """
+ allowed_values = ["NONE", "LOW", "MEDIUM", "HIGH", "CRITICAL"]
+ if not value_allowed_none_or_none_sentinel(max_observed_severity, allowed_values):
+ max_observed_severity = 'UNKNOWN_ENUM_VALUE'
+ self._max_observed_severity = max_observed_severity
+
@property
def max_observed_cvss_v2_score_with_ignored(self):
"""
- **[Required]** Gets the max_observed_cvss_v2_score_with_ignored of this VulnerabilityAudit.
+ Gets the max_observed_cvss_v2_score_with_ignored of this VulnerabilityAudit.
Maximum Common Vulnerability Scoring System Version 2 score observed for vulnerable application dependencies including ignored ones.
@@ -537,7 +629,7 @@ def max_observed_cvss_v2_score_with_ignored(self, max_observed_cvss_v2_score_wit
@property
def max_observed_cvss_v3_score_with_ignored(self):
"""
- **[Required]** Gets the max_observed_cvss_v3_score_with_ignored of this VulnerabilityAudit.
+ Gets the max_observed_cvss_v3_score_with_ignored of this VulnerabilityAudit.
Maximum Common Vulnerability Scoring System Version 3 score observed for vulnerable application dependencies including ignored ones.
@@ -558,6 +650,36 @@ def max_observed_cvss_v3_score_with_ignored(self, max_observed_cvss_v3_score_wit
"""
self._max_observed_cvss_v3_score_with_ignored = max_observed_cvss_v3_score_with_ignored
+ @property
+ def max_observed_severity_with_ignored(self):
+ """
+ Gets the max_observed_severity_with_ignored of this VulnerabilityAudit.
+ Maximum ADM Severity observed for vulnerable application dependencies including ignored ones.
+
+ Allowed values for this property are: "NONE", "LOW", "MEDIUM", "HIGH", "CRITICAL", 'UNKNOWN_ENUM_VALUE'.
+ Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
+
+
+ :return: The max_observed_severity_with_ignored of this VulnerabilityAudit.
+ :rtype: str
+ """
+ return self._max_observed_severity_with_ignored
+
+ @max_observed_severity_with_ignored.setter
+ def max_observed_severity_with_ignored(self, max_observed_severity_with_ignored):
+ """
+ Sets the max_observed_severity_with_ignored of this VulnerabilityAudit.
+ Maximum ADM Severity observed for vulnerable application dependencies including ignored ones.
+
+
+ :param max_observed_severity_with_ignored: The max_observed_severity_with_ignored of this VulnerabilityAudit.
+ :type: str
+ """
+ allowed_values = ["NONE", "LOW", "MEDIUM", "HIGH", "CRITICAL"]
+ if not value_allowed_none_or_none_sentinel(max_observed_severity_with_ignored, allowed_values):
+ max_observed_severity_with_ignored = 'UNKNOWN_ENUM_VALUE'
+ self._max_observed_severity_with_ignored = max_observed_severity_with_ignored
+
@property
def vulnerable_artifacts_count_with_ignored(self):
"""
@@ -674,9 +796,9 @@ def is_success(self, is_success):
def build_type(self):
"""
**[Required]** Gets the build_type of this VulnerabilityAudit.
- The type of the build tool.
+ The type of the build tool is restricted to only two values MAVEN or UNSET. Use UNSET when the list of application dependencies is not Maven-related or is a mix of Maven and other ecosystems. This option is soon to be deprecated.
- Allowed values for this property are: "MAVEN", 'UNKNOWN_ENUM_VALUE'.
+ Allowed values for this property are: "MAVEN", "UNSET", 'UNKNOWN_ENUM_VALUE'.
Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
@@ -689,13 +811,13 @@ def build_type(self):
def build_type(self, build_type):
"""
Sets the build_type of this VulnerabilityAudit.
- The type of the build tool.
+ The type of the build tool is restricted to only two values MAVEN or UNSET. Use UNSET when the list of application dependencies is not Maven-related or is a mix of Maven and other ecosystems. This option is soon to be deprecated.
:param build_type: The build_type of this VulnerabilityAudit.
:type: str
"""
- allowed_values = ["MAVEN"]
+ allowed_values = ["MAVEN", "UNSET"]
if not value_allowed_none_or_none_sentinel(build_type, allowed_values):
build_type = 'UNKNOWN_ENUM_VALUE'
self._build_type = build_type
diff --git a/src/oci/adm/models/vulnerability_audit_configuration.py b/src/oci/adm/models/vulnerability_audit_configuration.py
index e2c77fcd31..74058d9a5f 100644
--- a/src/oci/adm/models/vulnerability_audit_configuration.py
+++ b/src/oci/adm/models/vulnerability_audit_configuration.py
@@ -17,6 +17,30 @@ class VulnerabilityAuditConfiguration(object):
type: object
"""
+ #: A constant which can be used with the max_permissible_severity property of a VulnerabilityAuditConfiguration.
+ #: This constant has a value of "UNSET"
+ MAX_PERMISSIBLE_SEVERITY_UNSET = "UNSET"
+
+ #: A constant which can be used with the max_permissible_severity property of a VulnerabilityAuditConfiguration.
+ #: This constant has a value of "NONE"
+ MAX_PERMISSIBLE_SEVERITY_NONE = "NONE"
+
+ #: A constant which can be used with the max_permissible_severity property of a VulnerabilityAuditConfiguration.
+ #: This constant has a value of "LOW"
+ MAX_PERMISSIBLE_SEVERITY_LOW = "LOW"
+
+ #: A constant which can be used with the max_permissible_severity property of a VulnerabilityAuditConfiguration.
+ #: This constant has a value of "MEDIUM"
+ MAX_PERMISSIBLE_SEVERITY_MEDIUM = "MEDIUM"
+
+ #: A constant which can be used with the max_permissible_severity property of a VulnerabilityAuditConfiguration.
+ #: This constant has a value of "HIGH"
+ MAX_PERMISSIBLE_SEVERITY_HIGH = "HIGH"
+
+ #: A constant which can be used with the max_permissible_severity property of a VulnerabilityAuditConfiguration.
+ #: This constant has a value of "CRITICAL"
+ MAX_PERMISSIBLE_SEVERITY_CRITICAL = "CRITICAL"
+
def __init__(self, **kwargs):
"""
Initializes a new VulnerabilityAuditConfiguration object with values from keyword arguments.
@@ -30,6 +54,12 @@ def __init__(self, **kwargs):
The value to assign to the max_permissible_cvss_v3_score property of this VulnerabilityAuditConfiguration.
:type max_permissible_cvss_v3_score: float
+ :param max_permissible_severity:
+ The value to assign to the max_permissible_severity property of this VulnerabilityAuditConfiguration.
+ Allowed values for this property are: "UNSET", "NONE", "LOW", "MEDIUM", "HIGH", "CRITICAL", 'UNKNOWN_ENUM_VALUE'.
+ Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
+ :type max_permissible_severity: str
+
:param exclusions:
The value to assign to the exclusions property of this VulnerabilityAuditConfiguration.
:type exclusions: list[str]
@@ -38,17 +68,20 @@ def __init__(self, **kwargs):
self.swagger_types = {
'max_permissible_cvss_v2_score': 'float',
'max_permissible_cvss_v3_score': 'float',
+ 'max_permissible_severity': 'str',
'exclusions': 'list[str]'
}
self.attribute_map = {
'max_permissible_cvss_v2_score': 'maxPermissibleCvssV2Score',
'max_permissible_cvss_v3_score': 'maxPermissibleCvssV3Score',
+ 'max_permissible_severity': 'maxPermissibleSeverity',
'exclusions': 'exclusions'
}
self._max_permissible_cvss_v2_score = None
self._max_permissible_cvss_v3_score = None
+ self._max_permissible_severity = None
self._exclusions = None
@property
@@ -99,6 +132,36 @@ def max_permissible_cvss_v3_score(self, max_permissible_cvss_v3_score):
"""
self._max_permissible_cvss_v3_score = max_permissible_cvss_v3_score
+ @property
+ def max_permissible_severity(self):
+ """
+ Gets the max_permissible_severity of this VulnerabilityAuditConfiguration.
+ A vulnerable application dependency is ignored if the score of its associated Vulnerability is below maxPermissibleSeverity.
+
+ Allowed values for this property are: "UNSET", "NONE", "LOW", "MEDIUM", "HIGH", "CRITICAL", 'UNKNOWN_ENUM_VALUE'.
+ Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
+
+
+ :return: The max_permissible_severity of this VulnerabilityAuditConfiguration.
+ :rtype: str
+ """
+ return self._max_permissible_severity
+
+ @max_permissible_severity.setter
+ def max_permissible_severity(self, max_permissible_severity):
+ """
+ Sets the max_permissible_severity of this VulnerabilityAuditConfiguration.
+ A vulnerable application dependency is ignored if the score of its associated Vulnerability is below maxPermissibleSeverity.
+
+
+ :param max_permissible_severity: The max_permissible_severity of this VulnerabilityAuditConfiguration.
+ :type: str
+ """
+ allowed_values = ["UNSET", "NONE", "LOW", "MEDIUM", "HIGH", "CRITICAL"]
+ if not value_allowed_none_or_none_sentinel(max_permissible_severity, allowed_values):
+ max_permissible_severity = 'UNKNOWN_ENUM_VALUE'
+ self._max_permissible_severity = max_permissible_severity
+
@property
def exclusions(self):
"""
diff --git a/src/oci/adm/models/vulnerability_audit_summary.py b/src/oci/adm/models/vulnerability_audit_summary.py
index 7b94e75360..8de86e172c 100644
--- a/src/oci/adm/models/vulnerability_audit_summary.py
+++ b/src/oci/adm/models/vulnerability_audit_summary.py
@@ -15,6 +15,46 @@ class VulnerabilityAuditSummary(object):
vulnerability audit summary.
"""
+ #: A constant which can be used with the max_observed_severity property of a VulnerabilityAuditSummary.
+ #: This constant has a value of "NONE"
+ MAX_OBSERVED_SEVERITY_NONE = "NONE"
+
+ #: A constant which can be used with the max_observed_severity property of a VulnerabilityAuditSummary.
+ #: This constant has a value of "LOW"
+ MAX_OBSERVED_SEVERITY_LOW = "LOW"
+
+ #: A constant which can be used with the max_observed_severity property of a VulnerabilityAuditSummary.
+ #: This constant has a value of "MEDIUM"
+ MAX_OBSERVED_SEVERITY_MEDIUM = "MEDIUM"
+
+ #: A constant which can be used with the max_observed_severity property of a VulnerabilityAuditSummary.
+ #: This constant has a value of "HIGH"
+ MAX_OBSERVED_SEVERITY_HIGH = "HIGH"
+
+ #: A constant which can be used with the max_observed_severity property of a VulnerabilityAuditSummary.
+ #: This constant has a value of "CRITICAL"
+ MAX_OBSERVED_SEVERITY_CRITICAL = "CRITICAL"
+
+ #: A constant which can be used with the max_observed_severity_with_ignored property of a VulnerabilityAuditSummary.
+ #: This constant has a value of "NONE"
+ MAX_OBSERVED_SEVERITY_WITH_IGNORED_NONE = "NONE"
+
+ #: A constant which can be used with the max_observed_severity_with_ignored property of a VulnerabilityAuditSummary.
+ #: This constant has a value of "LOW"
+ MAX_OBSERVED_SEVERITY_WITH_IGNORED_LOW = "LOW"
+
+ #: A constant which can be used with the max_observed_severity_with_ignored property of a VulnerabilityAuditSummary.
+ #: This constant has a value of "MEDIUM"
+ MAX_OBSERVED_SEVERITY_WITH_IGNORED_MEDIUM = "MEDIUM"
+
+ #: A constant which can be used with the max_observed_severity_with_ignored property of a VulnerabilityAuditSummary.
+ #: This constant has a value of "HIGH"
+ MAX_OBSERVED_SEVERITY_WITH_IGNORED_HIGH = "HIGH"
+
+ #: A constant which can be used with the max_observed_severity_with_ignored property of a VulnerabilityAuditSummary.
+ #: This constant has a value of "CRITICAL"
+ MAX_OBSERVED_SEVERITY_WITH_IGNORED_CRITICAL = "CRITICAL"
+
def __init__(self, **kwargs):
"""
Initializes a new VulnerabilityAuditSummary object with values from keyword arguments.
@@ -52,6 +92,12 @@ def __init__(self, **kwargs):
The value to assign to the max_observed_cvss_v3_score property of this VulnerabilityAuditSummary.
:type max_observed_cvss_v3_score: float
+ :param max_observed_severity:
+ The value to assign to the max_observed_severity property of this VulnerabilityAuditSummary.
+ Allowed values for this property are: "NONE", "LOW", "MEDIUM", "HIGH", "CRITICAL", 'UNKNOWN_ENUM_VALUE'.
+ Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
+ :type max_observed_severity: str
+
:param vulnerable_artifacts_count:
The value to assign to the vulnerable_artifacts_count property of this VulnerabilityAuditSummary.
:type vulnerable_artifacts_count: int
@@ -64,6 +110,12 @@ def __init__(self, **kwargs):
The value to assign to the max_observed_cvss_v3_score_with_ignored property of this VulnerabilityAuditSummary.
:type max_observed_cvss_v3_score_with_ignored: float
+ :param max_observed_severity_with_ignored:
+ The value to assign to the max_observed_severity_with_ignored property of this VulnerabilityAuditSummary.
+ Allowed values for this property are: "NONE", "LOW", "MEDIUM", "HIGH", "CRITICAL", 'UNKNOWN_ENUM_VALUE'.
+ Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
+ :type max_observed_severity_with_ignored: str
+
:param vulnerable_artifacts_count_with_ignored:
The value to assign to the vulnerable_artifacts_count_with_ignored property of this VulnerabilityAuditSummary.
:type vulnerable_artifacts_count_with_ignored: int
@@ -102,9 +154,11 @@ def __init__(self, **kwargs):
'lifecycle_state': 'str',
'max_observed_cvss_v2_score': 'float',
'max_observed_cvss_v3_score': 'float',
+ 'max_observed_severity': 'str',
'vulnerable_artifacts_count': 'int',
'max_observed_cvss_v2_score_with_ignored': 'float',
'max_observed_cvss_v3_score_with_ignored': 'float',
+ 'max_observed_severity_with_ignored': 'str',
'vulnerable_artifacts_count_with_ignored': 'int',
'is_success': 'bool',
'build_type': 'str',
@@ -123,9 +177,11 @@ def __init__(self, **kwargs):
'lifecycle_state': 'lifecycleState',
'max_observed_cvss_v2_score': 'maxObservedCvssV2Score',
'max_observed_cvss_v3_score': 'maxObservedCvssV3Score',
+ 'max_observed_severity': 'maxObservedSeverity',
'vulnerable_artifacts_count': 'vulnerableArtifactsCount',
'max_observed_cvss_v2_score_with_ignored': 'maxObservedCvssV2ScoreWithIgnored',
'max_observed_cvss_v3_score_with_ignored': 'maxObservedCvssV3ScoreWithIgnored',
+ 'max_observed_severity_with_ignored': 'maxObservedSeverityWithIgnored',
'vulnerable_artifacts_count_with_ignored': 'vulnerableArtifactsCountWithIgnored',
'is_success': 'isSuccess',
'build_type': 'buildType',
@@ -143,9 +199,11 @@ def __init__(self, **kwargs):
self._lifecycle_state = None
self._max_observed_cvss_v2_score = None
self._max_observed_cvss_v3_score = None
+ self._max_observed_severity = None
self._vulnerable_artifacts_count = None
self._max_observed_cvss_v2_score_with_ignored = None
self._max_observed_cvss_v3_score_with_ignored = None
+ self._max_observed_severity_with_ignored = None
self._vulnerable_artifacts_count_with_ignored = None
self._is_success = None
self._build_type = None
@@ -317,7 +375,7 @@ def lifecycle_state(self, lifecycle_state):
@property
def max_observed_cvss_v2_score(self):
"""
- **[Required]** Gets the max_observed_cvss_v2_score of this VulnerabilityAuditSummary.
+ Gets the max_observed_cvss_v2_score of this VulnerabilityAuditSummary.
Maximum Common Vulnerability Scoring System Version 2 score observed for non-ignored vulnerable application dependencies.
@@ -341,7 +399,7 @@ def max_observed_cvss_v2_score(self, max_observed_cvss_v2_score):
@property
def max_observed_cvss_v3_score(self):
"""
- **[Required]** Gets the max_observed_cvss_v3_score of this VulnerabilityAuditSummary.
+ Gets the max_observed_cvss_v3_score of this VulnerabilityAuditSummary.
Maximum Common Vulnerability Scoring System Version 3 score observed for non-ignored vulnerable application dependencies.
@@ -362,6 +420,36 @@ def max_observed_cvss_v3_score(self, max_observed_cvss_v3_score):
"""
self._max_observed_cvss_v3_score = max_observed_cvss_v3_score
+ @property
+ def max_observed_severity(self):
+ """
+ Gets the max_observed_severity of this VulnerabilityAuditSummary.
+ Maximum ADM Severity observed for non-ignored vulnerable application dependencies.
+
+ Allowed values for this property are: "NONE", "LOW", "MEDIUM", "HIGH", "CRITICAL", 'UNKNOWN_ENUM_VALUE'.
+ Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
+
+
+ :return: The max_observed_severity of this VulnerabilityAuditSummary.
+ :rtype: str
+ """
+ return self._max_observed_severity
+
+ @max_observed_severity.setter
+ def max_observed_severity(self, max_observed_severity):
+ """
+ Sets the max_observed_severity of this VulnerabilityAuditSummary.
+ Maximum ADM Severity observed for non-ignored vulnerable application dependencies.
+
+
+ :param max_observed_severity: The max_observed_severity of this VulnerabilityAuditSummary.
+ :type: str
+ """
+ allowed_values = ["NONE", "LOW", "MEDIUM", "HIGH", "CRITICAL"]
+ if not value_allowed_none_or_none_sentinel(max_observed_severity, allowed_values):
+ max_observed_severity = 'UNKNOWN_ENUM_VALUE'
+ self._max_observed_severity = max_observed_severity
+
@property
def vulnerable_artifacts_count(self):
"""
@@ -389,7 +477,7 @@ def vulnerable_artifacts_count(self, vulnerable_artifacts_count):
@property
def max_observed_cvss_v2_score_with_ignored(self):
"""
- **[Required]** Gets the max_observed_cvss_v2_score_with_ignored of this VulnerabilityAuditSummary.
+ Gets the max_observed_cvss_v2_score_with_ignored of this VulnerabilityAuditSummary.
Maximum Common Vulnerability Scoring System Version 2 score observed for vulnerable application dependencies including ignored ones.
@@ -413,7 +501,7 @@ def max_observed_cvss_v2_score_with_ignored(self, max_observed_cvss_v2_score_wit
@property
def max_observed_cvss_v3_score_with_ignored(self):
"""
- **[Required]** Gets the max_observed_cvss_v3_score_with_ignored of this VulnerabilityAuditSummary.
+ Gets the max_observed_cvss_v3_score_with_ignored of this VulnerabilityAuditSummary.
Maximum Common Vulnerability Scoring System Version 3 score observed for vulnerable application dependencies including ignored ones.
@@ -434,6 +522,36 @@ def max_observed_cvss_v3_score_with_ignored(self, max_observed_cvss_v3_score_wit
"""
self._max_observed_cvss_v3_score_with_ignored = max_observed_cvss_v3_score_with_ignored
+ @property
+ def max_observed_severity_with_ignored(self):
+ """
+ Gets the max_observed_severity_with_ignored of this VulnerabilityAuditSummary.
+ Maximum ADM Severity observed for vulnerable application dependencies including ignored ones.
+
+ Allowed values for this property are: "NONE", "LOW", "MEDIUM", "HIGH", "CRITICAL", 'UNKNOWN_ENUM_VALUE'.
+ Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
+
+
+ :return: The max_observed_severity_with_ignored of this VulnerabilityAuditSummary.
+ :rtype: str
+ """
+ return self._max_observed_severity_with_ignored
+
+ @max_observed_severity_with_ignored.setter
+ def max_observed_severity_with_ignored(self, max_observed_severity_with_ignored):
+ """
+ Sets the max_observed_severity_with_ignored of this VulnerabilityAuditSummary.
+ Maximum ADM Severity observed for vulnerable application dependencies including ignored ones.
+
+
+ :param max_observed_severity_with_ignored: The max_observed_severity_with_ignored of this VulnerabilityAuditSummary.
+ :type: str
+ """
+ allowed_values = ["NONE", "LOW", "MEDIUM", "HIGH", "CRITICAL"]
+ if not value_allowed_none_or_none_sentinel(max_observed_severity_with_ignored, allowed_values):
+ max_observed_severity_with_ignored = 'UNKNOWN_ENUM_VALUE'
+ self._max_observed_severity_with_ignored = max_observed_severity_with_ignored
+
@property
def vulnerable_artifacts_count_with_ignored(self):
"""
@@ -486,7 +604,7 @@ def is_success(self, is_success):
def build_type(self):
"""
Gets the build_type of this VulnerabilityAuditSummary.
- Type of the build tool.
+ The type of the build tool is restricted to only two values MAVEN or UNSET. Use UNSET when the list of application dependencies is not Maven-related or is a mix of Maven and other ecosystems. This option is soon to be deprecated.
:return: The build_type of this VulnerabilityAuditSummary.
@@ -498,7 +616,7 @@ def build_type(self):
def build_type(self, build_type):
"""
Sets the build_type of this VulnerabilityAuditSummary.
- Type of the build tool.
+ The type of the build tool is restricted to only two values MAVEN or UNSET. Use UNSET when the list of application dependencies is not Maven-related or is a mix of Maven and other ecosystems. This option is soon to be deprecated.
:param build_type: The build_type of this VulnerabilityAuditSummary.
diff --git a/src/oci/container_instances/container_instance_client.py b/src/oci/container_instances/container_instance_client.py
index 8ee0312aee..1cba7829f8 100644
--- a/src/oci/container_instances/container_instance_client.py
+++ b/src/oci/container_instances/container_instance_client.py
@@ -1518,6 +1518,9 @@ def list_work_requests(self, compartment_id, **kwargs):
Allowed values are: "ASC", "DESC"
+ :param str resource_id: (optional)
+ The OCID of the resource affected by the work request.
+
:param obj retry_strategy: (optional)
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
@@ -1554,7 +1557,8 @@ def list_work_requests(self, compartment_id, **kwargs):
"availability_domain",
"status",
"sort_by",
- "sort_order"
+ "sort_order",
+ "resource_id"
]
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
@@ -1590,7 +1594,8 @@ def list_work_requests(self, compartment_id, **kwargs):
"availabilityDomain": kwargs.get("availability_domain", missing),
"status": kwargs.get("status", missing),
"sortBy": kwargs.get("sort_by", missing),
- "sortOrder": kwargs.get("sort_order", missing)
+ "sortOrder": kwargs.get("sort_order", missing),
+ "resourceId": kwargs.get("resource_id", missing)
}
query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
diff --git a/src/oci/data_safe/data_safe_client.py b/src/oci/data_safe/data_safe_client.py
index fd85ac94c7..9d92c8ec3c 100644
--- a/src/oci/data_safe/data_safe_client.py
+++ b/src/oci/data_safe/data_safe_client.py
@@ -4898,6 +4898,127 @@ def create_on_prem_connector(self, create_on_prem_connector_details, **kwargs):
api_reference_link=api_reference_link,
required_arguments=required_arguments)
+ def create_peer_target_database(self, target_database_id, create_peer_target_database_details, **kwargs):
+ """
+ Creates the peer target database under the primary target database in Data Safe.
+
+
+ :param str target_database_id: (required)
+ The OCID of the Data Safe target database.
+
+ :param oci.data_safe.models.CreatePeerTargetDatabaseDetails create_peer_target_database_details: (required)
+ Database details used to create the peer target database under the primary target database.
+
+ :param str if_match: (optional)
+ For optimistic concurrency control. In the PUT or DELETE call
+ for a resource, set the if-match parameter to the value of the
+ etag from a previous GET or POST response for that resource.
+ The resource will be updated or deleted only if the etag you
+ provide matches the resource's current etag value.
+
+ :param str opc_request_id: (optional)
+ Unique identifier for the request.
+
+ :param str opc_retry_token: (optional)
+ A token that uniquely identifies a request so it can be retried in case of a timeout or
+ server error without risk of executing that same action again. Retry tokens expire after 24
+ hours, but can be invalidated before then due to conflicting operations. For example, if a resource
+ has been deleted and purged from the system, then a retry of the original creation request might be rejected.
+
+ :param obj retry_strategy: (optional)
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
+
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
+ The specifics of the default retry strategy are described `here `__.
+
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
+
+ :param bool allow_control_chars: (optional)
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
+ By default, the response will not allow control characters in strings
+
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.PeerTargetDatabase`
+ :rtype: :class:`~oci.response.Response`
+
+ :example:
+ Click `here `__ to see an example of how to use create_peer_target_database API.
+ """
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
+ required_arguments = ['targetDatabaseId']
+ resource_path = "/targetDatabases/{targetDatabaseId}/peerTargetDatabases"
+ method = "POST"
+ operation_name = "create_peer_target_database"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/PeerTargetDatabase/CreatePeerTargetDatabase"
+
+ # Don't accept unknown kwargs
+ expected_kwargs = [
+ "allow_control_chars",
+ "retry_strategy",
+ "if_match",
+ "opc_request_id",
+ "opc_retry_token"
+ ]
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
+ if extra_kwargs:
+ raise ValueError(
+ f"create_peer_target_database got unknown kwargs: {extra_kwargs!r}")
+
+ path_params = {
+ "targetDatabaseId": target_database_id
+ }
+
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
+
+ for (k, v) in six.iteritems(path_params):
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
+ raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
+
+ header_params = {
+ "accept": "application/json",
+ "content-type": "application/json",
+ "if-match": kwargs.get("if_match", missing),
+ "opc-request-id": kwargs.get("opc_request_id", missing),
+ "opc-retry-token": kwargs.get("opc_retry_token", missing)
+ }
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
+
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
+ operation_retry_strategy=kwargs.get('retry_strategy'),
+ client_retry_strategy=self.retry_strategy
+ )
+ if retry_strategy is None:
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
+
+ if retry_strategy:
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
+ self.base_client.add_opc_retry_token_if_needed(header_params)
+ self.base_client.add_opc_client_retries_header(header_params)
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
+ return retry_strategy.make_retrying_call(
+ self.base_client.call_api,
+ resource_path=resource_path,
+ method=method,
+ path_params=path_params,
+ header_params=header_params,
+ body=create_peer_target_database_details,
+ response_type="PeerTargetDatabase",
+ allow_control_chars=kwargs.get('allow_control_chars'),
+ operation_name=operation_name,
+ api_reference_link=api_reference_link,
+ required_arguments=required_arguments)
+ else:
+ return self.base_client.call_api(
+ resource_path=resource_path,
+ method=method,
+ path_params=path_params,
+ header_params=header_params,
+ body=create_peer_target_database_details,
+ response_type="PeerTargetDatabase",
+ allow_control_chars=kwargs.get('allow_control_chars'),
+ operation_name=operation_name,
+ api_reference_link=api_reference_link,
+ required_arguments=required_arguments)
+
def create_report_definition(self, create_report_definition_details, **kwargs):
"""
Creates a new report definition with parameters specified in the body. The report definition is stored in the specified compartment.
@@ -6965,6 +7086,115 @@ def delete_on_prem_connector(self, on_prem_connector_id, **kwargs):
api_reference_link=api_reference_link,
required_arguments=required_arguments)
+ def delete_peer_target_database(self, target_database_id, peer_target_database_id, **kwargs):
+ """
+ Removes the specified peer target database from Data Safe.
+
+
+ :param str target_database_id: (required)
+ The OCID of the Data Safe target database.
+
+ :param int peer_target_database_id: (required)
+ The unique id of the peer target database.
+
+ :param str if_match: (optional)
+ For optimistic concurrency control. In the PUT or DELETE call
+ for a resource, set the if-match parameter to the value of the
+ etag from a previous GET or POST response for that resource.
+ The resource will be updated or deleted only if the etag you
+ provide matches the resource's current etag value.
+
+ :param str opc_request_id: (optional)
+ Unique identifier for the request.
+
+ :param obj retry_strategy: (optional)
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
+
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
+ The specifics of the default retry strategy are described `here `__.
+
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
+
+ :param bool allow_control_chars: (optional)
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
+ By default, the response will not allow control characters in strings
+
+ :return: A :class:`~oci.response.Response` object with data of type None
+ :rtype: :class:`~oci.response.Response`
+
+ :example:
+ Click `here `__ to see an example of how to use delete_peer_target_database API.
+ """
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
+ required_arguments = ['targetDatabaseId', 'peerTargetDatabaseId']
+ resource_path = "/targetDatabases/{targetDatabaseId}/peerTargetDatabases/{peerTargetDatabaseId}"
+ method = "DELETE"
+ operation_name = "delete_peer_target_database"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/PeerTargetDatabase/DeletePeerTargetDatabase"
+
+ # Don't accept unknown kwargs
+ expected_kwargs = [
+ "allow_control_chars",
+ "retry_strategy",
+ "if_match",
+ "opc_request_id"
+ ]
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
+ if extra_kwargs:
+ raise ValueError(
+ f"delete_peer_target_database got unknown kwargs: {extra_kwargs!r}")
+
+ path_params = {
+ "targetDatabaseId": target_database_id,
+ "peerTargetDatabaseId": peer_target_database_id
+ }
+
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
+
+ for (k, v) in six.iteritems(path_params):
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
+ raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
+
+ header_params = {
+ "accept": "application/json",
+ "content-type": "application/json",
+ "if-match": kwargs.get("if_match", missing),
+ "opc-request-id": kwargs.get("opc_request_id", missing)
+ }
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
+
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
+ operation_retry_strategy=kwargs.get('retry_strategy'),
+ client_retry_strategy=self.retry_strategy
+ )
+ if retry_strategy is None:
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
+
+ if retry_strategy:
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
+ self.base_client.add_opc_client_retries_header(header_params)
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
+ return retry_strategy.make_retrying_call(
+ self.base_client.call_api,
+ resource_path=resource_path,
+ method=method,
+ path_params=path_params,
+ header_params=header_params,
+ allow_control_chars=kwargs.get('allow_control_chars'),
+ operation_name=operation_name,
+ api_reference_link=api_reference_link,
+ required_arguments=required_arguments)
+ else:
+ return self.base_client.call_api(
+ resource_path=resource_path,
+ method=method,
+ path_params=path_params,
+ header_params=header_params,
+ allow_control_chars=kwargs.get('allow_control_chars'),
+ operation_name=operation_name,
+ api_reference_link=api_reference_link,
+ required_arguments=required_arguments)
+
def delete_report_definition(self, report_definition_id, **kwargs):
"""
Deletes the specified report definition. Only the user created report definition can be deleted. The seeded report definitions cannot be deleted.
@@ -11383,16 +11613,16 @@ def get_database_security_config(self, database_security_config_id, **kwargs):
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def get_difference_column(self, sdm_masking_policy_difference_id, difference_column_key, **kwargs):
+ def get_database_table_access_entry(self, security_policy_report_id, database_table_access_entry_key, **kwargs):
"""
- Gets the details of the specified SDM Masking policy difference column.
+ Gets a database table access entry object by identifier.
- :param str sdm_masking_policy_difference_id: (required)
- The OCID of the SDM masking policy difference.
+ :param str security_policy_report_id: (required)
+ The OCID of the security policy report resource.
- :param str difference_column_key: (required)
- The unique key that identifies the difference column.
+ :param str database_table_access_entry_key: (required)
+ The unique key that identifies the table access object. This is a system-generated identifier.
:param str opc_request_id: (optional)
Unique identifier for the request.
@@ -11409,18 +11639,18 @@ def get_difference_column(self, sdm_masking_policy_difference_id, difference_col
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.DifferenceColumn`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.DatabaseTableAccessEntry`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use get_difference_column API.
+ Click `here `__ to see an example of how to use get_database_table_access_entry API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
- required_arguments = ['sdmMaskingPolicyDifferenceId', 'differenceColumnKey']
- resource_path = "/sdmMaskingPolicyDifferences/{sdmMaskingPolicyDifferenceId}/differenceColumns/{differenceColumnKey}"
+ required_arguments = ['securityPolicyReportId', 'databaseTableAccessEntryKey']
+ resource_path = "/securityPolicyReports/{securityPolicyReportId}/databaseTableAccessEntries/{databaseTableAccessEntryKey}"
method = "GET"
- operation_name = "get_difference_column"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/DifferenceColumn/GetDifferenceColumn"
+ operation_name = "get_database_table_access_entry"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/DatabaseTableAccessEntry/GetDatabaseTableAccessEntry"
# Don't accept unknown kwargs
expected_kwargs = [
@@ -11431,11 +11661,11 @@ def get_difference_column(self, sdm_masking_policy_difference_id, difference_col
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"get_difference_column got unknown kwargs: {extra_kwargs!r}")
+ f"get_database_table_access_entry got unknown kwargs: {extra_kwargs!r}")
path_params = {
- "sdmMaskingPolicyDifferenceId": sdm_masking_policy_difference_id,
- "differenceColumnKey": difference_column_key
+ "securityPolicyReportId": security_policy_report_id,
+ "databaseTableAccessEntryKey": database_table_access_entry_key
}
path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
@@ -11468,7 +11698,7 @@ def get_difference_column(self, sdm_masking_policy_difference_id, difference_col
method=method,
path_params=path_params,
header_params=header_params,
- response_type="DifferenceColumn",
+ response_type="DatabaseTableAccessEntry",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -11479,19 +11709,22 @@ def get_difference_column(self, sdm_masking_policy_difference_id, difference_col
method=method,
path_params=path_params,
header_params=header_params,
- response_type="DifferenceColumn",
+ response_type="DatabaseTableAccessEntry",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def get_discovery_job(self, discovery_job_id, **kwargs):
+ def get_database_view_access_entry(self, security_policy_report_id, database_view_access_entry_key, **kwargs):
"""
- Gets the details of the specified discovery job.
+ Gets a database view access object by identifier.
- :param str discovery_job_id: (required)
- The OCID of the discovery job.
+ :param str security_policy_report_id: (required)
+ The OCID of the security policy report resource.
+
+ :param str database_view_access_entry_key: (required)
+ The unique key that identifies the view access object. This is a system-generated identifier.
:param str opc_request_id: (optional)
Unique identifier for the request.
@@ -11508,18 +11741,18 @@ def get_discovery_job(self, discovery_job_id, **kwargs):
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.DiscoveryJob`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.DatabaseViewAccessEntry`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use get_discovery_job API.
+ Click `here `__ to see an example of how to use get_database_view_access_entry API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
- required_arguments = ['discoveryJobId']
- resource_path = "/discoveryJobs/{discoveryJobId}"
+ required_arguments = ['securityPolicyReportId', 'databaseViewAccessEntryKey']
+ resource_path = "/securityPolicyReports/{securityPolicyReportId}/databaseViewAccessEntries/{databaseViewAccessEntryKey}"
method = "GET"
- operation_name = "get_discovery_job"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/DiscoveryJob/GetDiscoveryJob"
+ operation_name = "get_database_view_access_entry"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/DatabaseViewAccessEntry/GetDatabaseViewAccessEntry"
# Don't accept unknown kwargs
expected_kwargs = [
@@ -11530,10 +11763,11 @@ def get_discovery_job(self, discovery_job_id, **kwargs):
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"get_discovery_job got unknown kwargs: {extra_kwargs!r}")
+ f"get_database_view_access_entry got unknown kwargs: {extra_kwargs!r}")
path_params = {
- "discoveryJobId": discovery_job_id
+ "securityPolicyReportId": security_policy_report_id,
+ "databaseViewAccessEntryKey": database_view_access_entry_key
}
path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
@@ -11566,7 +11800,7 @@ def get_discovery_job(self, discovery_job_id, **kwargs):
method=method,
path_params=path_params,
header_params=header_params,
- response_type="DiscoveryJob",
+ response_type="DatabaseViewAccessEntry",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -11577,22 +11811,22 @@ def get_discovery_job(self, discovery_job_id, **kwargs):
method=method,
path_params=path_params,
header_params=header_params,
- response_type="DiscoveryJob",
+ response_type="DatabaseViewAccessEntry",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def get_discovery_job_result(self, discovery_job_id, result_key, **kwargs):
+ def get_difference_column(self, sdm_masking_policy_difference_id, difference_column_key, **kwargs):
"""
- Gets the details of the specified discovery result.
+ Gets the details of the specified SDM Masking policy difference column.
- :param str discovery_job_id: (required)
- The OCID of the discovery job.
+ :param str sdm_masking_policy_difference_id: (required)
+ The OCID of the SDM masking policy difference.
- :param str result_key: (required)
- The unique key that identifies the discovery result.
+ :param str difference_column_key: (required)
+ The unique key that identifies the difference column.
:param str opc_request_id: (optional)
Unique identifier for the request.
@@ -11609,18 +11843,18 @@ def get_discovery_job_result(self, discovery_job_id, result_key, **kwargs):
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.DiscoveryJobResult`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.DifferenceColumn`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use get_discovery_job_result API.
+ Click `here `__ to see an example of how to use get_difference_column API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
- required_arguments = ['discoveryJobId', 'resultKey']
- resource_path = "/discoveryJobs/{discoveryJobId}/results/{resultKey}"
+ required_arguments = ['sdmMaskingPolicyDifferenceId', 'differenceColumnKey']
+ resource_path = "/sdmMaskingPolicyDifferences/{sdmMaskingPolicyDifferenceId}/differenceColumns/{differenceColumnKey}"
method = "GET"
- operation_name = "get_discovery_job_result"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/DiscoveryJobResult/GetDiscoveryJobResult"
+ operation_name = "get_difference_column"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/DifferenceColumn/GetDifferenceColumn"
# Don't accept unknown kwargs
expected_kwargs = [
@@ -11631,11 +11865,11 @@ def get_discovery_job_result(self, discovery_job_id, result_key, **kwargs):
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"get_discovery_job_result got unknown kwargs: {extra_kwargs!r}")
+ f"get_difference_column got unknown kwargs: {extra_kwargs!r}")
path_params = {
- "discoveryJobId": discovery_job_id,
- "resultKey": result_key
+ "sdmMaskingPolicyDifferenceId": sdm_masking_policy_difference_id,
+ "differenceColumnKey": difference_column_key
}
path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
@@ -11668,7 +11902,7 @@ def get_discovery_job_result(self, discovery_job_id, result_key, **kwargs):
method=method,
path_params=path_params,
header_params=header_params,
- response_type="DiscoveryJobResult",
+ response_type="DifferenceColumn",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -11679,19 +11913,19 @@ def get_discovery_job_result(self, discovery_job_id, result_key, **kwargs):
method=method,
path_params=path_params,
header_params=header_params,
- response_type="DiscoveryJobResult",
+ response_type="DifferenceColumn",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def get_library_masking_format(self, library_masking_format_id, **kwargs):
+ def get_discovery_job(self, discovery_job_id, **kwargs):
"""
- Gets the details of the specified library masking format.
+ Gets the details of the specified discovery job.
- :param str library_masking_format_id: (required)
- The OCID of the library masking format.
+ :param str discovery_job_id: (required)
+ The OCID of the discovery job.
:param str opc_request_id: (optional)
Unique identifier for the request.
@@ -11708,18 +11942,18 @@ def get_library_masking_format(self, library_masking_format_id, **kwargs):
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.LibraryMaskingFormat`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.DiscoveryJob`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use get_library_masking_format API.
+ Click `here `__ to see an example of how to use get_discovery_job API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
- required_arguments = ['libraryMaskingFormatId']
- resource_path = "/libraryMaskingFormats/{libraryMaskingFormatId}"
+ required_arguments = ['discoveryJobId']
+ resource_path = "/discoveryJobs/{discoveryJobId}"
method = "GET"
- operation_name = "get_library_masking_format"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/LibraryMaskingFormat/GetLibraryMaskingFormat"
+ operation_name = "get_discovery_job"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/DiscoveryJob/GetDiscoveryJob"
# Don't accept unknown kwargs
expected_kwargs = [
@@ -11730,10 +11964,10 @@ def get_library_masking_format(self, library_masking_format_id, **kwargs):
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"get_library_masking_format got unknown kwargs: {extra_kwargs!r}")
+ f"get_discovery_job got unknown kwargs: {extra_kwargs!r}")
path_params = {
- "libraryMaskingFormatId": library_masking_format_id
+ "discoveryJobId": discovery_job_id
}
path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
@@ -11766,7 +12000,7 @@ def get_library_masking_format(self, library_masking_format_id, **kwargs):
method=method,
path_params=path_params,
header_params=header_params,
- response_type="LibraryMaskingFormat",
+ response_type="DiscoveryJob",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -11777,22 +12011,22 @@ def get_library_masking_format(self, library_masking_format_id, **kwargs):
method=method,
path_params=path_params,
header_params=header_params,
- response_type="LibraryMaskingFormat",
+ response_type="DiscoveryJob",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def get_masking_column(self, masking_policy_id, masking_column_key, **kwargs):
+ def get_discovery_job_result(self, discovery_job_id, result_key, **kwargs):
"""
- Gets the details of the specified masking column.
+ Gets the details of the specified discovery result.
- :param str masking_policy_id: (required)
- The OCID of the masking policy.
+ :param str discovery_job_id: (required)
+ The OCID of the discovery job.
- :param str masking_column_key: (required)
- The unique key that identifies the masking column. It's numeric and unique within a masking policy.
+ :param str result_key: (required)
+ The unique key that identifies the discovery result.
:param str opc_request_id: (optional)
Unique identifier for the request.
@@ -11809,18 +12043,18 @@ def get_masking_column(self, masking_policy_id, masking_column_key, **kwargs):
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.MaskingColumn`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.DiscoveryJobResult`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use get_masking_column API.
+ Click `here `__ to see an example of how to use get_discovery_job_result API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
- required_arguments = ['maskingPolicyId', 'maskingColumnKey']
- resource_path = "/maskingPolicies/{maskingPolicyId}/maskingColumns/{maskingColumnKey}"
+ required_arguments = ['discoveryJobId', 'resultKey']
+ resource_path = "/discoveryJobs/{discoveryJobId}/results/{resultKey}"
method = "GET"
- operation_name = "get_masking_column"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/MaskingColumn/GetMaskingColumn"
+ operation_name = "get_discovery_job_result"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/DiscoveryJobResult/GetDiscoveryJobResult"
# Don't accept unknown kwargs
expected_kwargs = [
@@ -11831,11 +12065,11 @@ def get_masking_column(self, masking_policy_id, masking_column_key, **kwargs):
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"get_masking_column got unknown kwargs: {extra_kwargs!r}")
+ f"get_discovery_job_result got unknown kwargs: {extra_kwargs!r}")
path_params = {
- "maskingPolicyId": masking_policy_id,
- "maskingColumnKey": masking_column_key
+ "discoveryJobId": discovery_job_id,
+ "resultKey": result_key
}
path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
@@ -11868,7 +12102,7 @@ def get_masking_column(self, masking_policy_id, masking_column_key, **kwargs):
method=method,
path_params=path_params,
header_params=header_params,
- response_type="MaskingColumn",
+ response_type="DiscoveryJobResult",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -11879,19 +12113,19 @@ def get_masking_column(self, masking_policy_id, masking_column_key, **kwargs):
method=method,
path_params=path_params,
header_params=header_params,
- response_type="MaskingColumn",
+ response_type="DiscoveryJobResult",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def get_masking_policy(self, masking_policy_id, **kwargs):
+ def get_library_masking_format(self, library_masking_format_id, **kwargs):
"""
- Gets the details of the specified masking policy.
+ Gets the details of the specified library masking format.
- :param str masking_policy_id: (required)
- The OCID of the masking policy.
+ :param str library_masking_format_id: (required)
+ The OCID of the library masking format.
:param str opc_request_id: (optional)
Unique identifier for the request.
@@ -11908,18 +12142,18 @@ def get_masking_policy(self, masking_policy_id, **kwargs):
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.MaskingPolicy`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.LibraryMaskingFormat`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use get_masking_policy API.
+ Click `here `__ to see an example of how to use get_library_masking_format API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
- required_arguments = ['maskingPolicyId']
- resource_path = "/maskingPolicies/{maskingPolicyId}"
+ required_arguments = ['libraryMaskingFormatId']
+ resource_path = "/libraryMaskingFormats/{libraryMaskingFormatId}"
method = "GET"
- operation_name = "get_masking_policy"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/MaskingPolicy/GetMaskingPolicy"
+ operation_name = "get_library_masking_format"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/LibraryMaskingFormat/GetLibraryMaskingFormat"
# Don't accept unknown kwargs
expected_kwargs = [
@@ -11930,10 +12164,10 @@ def get_masking_policy(self, masking_policy_id, **kwargs):
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"get_masking_policy got unknown kwargs: {extra_kwargs!r}")
+ f"get_library_masking_format got unknown kwargs: {extra_kwargs!r}")
path_params = {
- "maskingPolicyId": masking_policy_id
+ "libraryMaskingFormatId": library_masking_format_id
}
path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
@@ -11966,7 +12200,7 @@ def get_masking_policy(self, masking_policy_id, **kwargs):
method=method,
path_params=path_params,
header_params=header_params,
- response_type="MaskingPolicy",
+ response_type="LibraryMaskingFormat",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -11977,19 +12211,22 @@ def get_masking_policy(self, masking_policy_id, **kwargs):
method=method,
path_params=path_params,
header_params=header_params,
- response_type="MaskingPolicy",
+ response_type="LibraryMaskingFormat",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def get_masking_report(self, masking_report_id, **kwargs):
+ def get_masking_column(self, masking_policy_id, masking_column_key, **kwargs):
"""
- Gets the details of the specified masking report.
+ Gets the details of the specified masking column.
- :param str masking_report_id: (required)
- The OCID of the masking report.
+ :param str masking_policy_id: (required)
+ The OCID of the masking policy.
+
+ :param str masking_column_key: (required)
+ The unique key that identifies the masking column. It's numeric and unique within a masking policy.
:param str opc_request_id: (optional)
Unique identifier for the request.
@@ -12006,18 +12243,18 @@ def get_masking_report(self, masking_report_id, **kwargs):
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.MaskingReport`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.MaskingColumn`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use get_masking_report API.
+ Click `here `__ to see an example of how to use get_masking_column API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
- required_arguments = ['maskingReportId']
- resource_path = "/maskingReports/{maskingReportId}"
+ required_arguments = ['maskingPolicyId', 'maskingColumnKey']
+ resource_path = "/maskingPolicies/{maskingPolicyId}/maskingColumns/{maskingColumnKey}"
method = "GET"
- operation_name = "get_masking_report"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/MaskingReport/GetMaskingReport"
+ operation_name = "get_masking_column"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/MaskingColumn/GetMaskingColumn"
# Don't accept unknown kwargs
expected_kwargs = [
@@ -12028,10 +12265,11 @@ def get_masking_report(self, masking_report_id, **kwargs):
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"get_masking_report got unknown kwargs: {extra_kwargs!r}")
+ f"get_masking_column got unknown kwargs: {extra_kwargs!r}")
path_params = {
- "maskingReportId": masking_report_id
+ "maskingPolicyId": masking_policy_id,
+ "maskingColumnKey": masking_column_key
}
path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
@@ -12064,7 +12302,7 @@ def get_masking_report(self, masking_report_id, **kwargs):
method=method,
path_params=path_params,
header_params=header_params,
- response_type="MaskingReport",
+ response_type="MaskingColumn",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -12075,19 +12313,19 @@ def get_masking_report(self, masking_report_id, **kwargs):
method=method,
path_params=path_params,
header_params=header_params,
- response_type="MaskingReport",
+ response_type="MaskingColumn",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def get_on_prem_connector(self, on_prem_connector_id, **kwargs):
+ def get_masking_policy(self, masking_policy_id, **kwargs):
"""
- Gets the details of the specified on-premises connector.
+ Gets the details of the specified masking policy.
- :param str on_prem_connector_id: (required)
- The OCID of the on-premises connector.
+ :param str masking_policy_id: (required)
+ The OCID of the masking policy.
:param str opc_request_id: (optional)
Unique identifier for the request.
@@ -12104,18 +12342,18 @@ def get_on_prem_connector(self, on_prem_connector_id, **kwargs):
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.OnPremConnector`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.MaskingPolicy`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use get_on_prem_connector API.
+ Click `here `__ to see an example of how to use get_masking_policy API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
- required_arguments = ['onPremConnectorId']
- resource_path = "/onPremConnectors/{onPremConnectorId}"
+ required_arguments = ['maskingPolicyId']
+ resource_path = "/maskingPolicies/{maskingPolicyId}"
method = "GET"
- operation_name = "get_on_prem_connector"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/OnPremConnector/GetOnPremConnector"
+ operation_name = "get_masking_policy"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/MaskingPolicy/GetMaskingPolicy"
# Don't accept unknown kwargs
expected_kwargs = [
@@ -12126,10 +12364,10 @@ def get_on_prem_connector(self, on_prem_connector_id, **kwargs):
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"get_on_prem_connector got unknown kwargs: {extra_kwargs!r}")
+ f"get_masking_policy got unknown kwargs: {extra_kwargs!r}")
path_params = {
- "onPremConnectorId": on_prem_connector_id
+ "maskingPolicyId": masking_policy_id
}
path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
@@ -12162,7 +12400,7 @@ def get_on_prem_connector(self, on_prem_connector_id, **kwargs):
method=method,
path_params=path_params,
header_params=header_params,
- response_type="OnPremConnector",
+ response_type="MaskingPolicy",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -12173,25 +12411,19 @@ def get_on_prem_connector(self, on_prem_connector_id, **kwargs):
method=method,
path_params=path_params,
header_params=header_params,
- response_type="OnPremConnector",
+ response_type="MaskingPolicy",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def get_profile(self, user_assessment_id, profile_name, **kwargs):
+ def get_masking_report(self, masking_report_id, **kwargs):
"""
- Lists the details of given profile available on the target.
-
- The GetProfile operation returns only the profiles in the specified 'userAssessmentId'.
- This does not include any subcompartments of the current compartment.
-
+ Gets the details of the specified masking report.
- :param str user_assessment_id: (required)
- The OCID of the user assessment.
- :param str profile_name: (required)
- Profile name to get detailed information .
+ :param str masking_report_id: (required)
+ The OCID of the masking report.
:param str opc_request_id: (optional)
Unique identifier for the request.
@@ -12208,18 +12440,18 @@ def get_profile(self, user_assessment_id, profile_name, **kwargs):
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.data_safe.models.Profile`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.MaskingReport`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use get_profile API.
+ Click `here `__ to see an example of how to use get_masking_report API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
- required_arguments = ['userAssessmentId', 'profileName']
- resource_path = "/userAssessments/{userAssessmentId}/profiles/{profileName}"
+ required_arguments = ['maskingReportId']
+ resource_path = "/maskingReports/{maskingReportId}"
method = "GET"
- operation_name = "get_profile"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/UserAssessment/GetProfile"
+ operation_name = "get_masking_report"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/MaskingReport/GetMaskingReport"
# Don't accept unknown kwargs
expected_kwargs = [
@@ -12230,11 +12462,10 @@ def get_profile(self, user_assessment_id, profile_name, **kwargs):
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"get_profile got unknown kwargs: {extra_kwargs!r}")
+ f"get_masking_report got unknown kwargs: {extra_kwargs!r}")
path_params = {
- "userAssessmentId": user_assessment_id,
- "profileName": profile_name
+ "maskingReportId": masking_report_id
}
path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
@@ -12267,7 +12498,7 @@ def get_profile(self, user_assessment_id, profile_name, **kwargs):
method=method,
path_params=path_params,
header_params=header_params,
- response_type="list[Profile]",
+ response_type="MaskingReport",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -12278,19 +12509,19 @@ def get_profile(self, user_assessment_id, profile_name, **kwargs):
method=method,
path_params=path_params,
header_params=header_params,
- response_type="list[Profile]",
+ response_type="MaskingReport",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def get_report(self, report_id, **kwargs):
+ def get_on_prem_connector(self, on_prem_connector_id, **kwargs):
"""
- Gets a report by identifier
+ Gets the details of the specified on-premises connector.
- :param str report_id: (required)
- Unique report identifier
+ :param str on_prem_connector_id: (required)
+ The OCID of the on-premises connector.
:param str opc_request_id: (optional)
Unique identifier for the request.
@@ -12307,18 +12538,18 @@ def get_report(self, report_id, **kwargs):
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.Report`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.OnPremConnector`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use get_report API.
+ Click `here `__ to see an example of how to use get_on_prem_connector API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
- required_arguments = ['reportId']
- resource_path = "/reports/{reportId}"
+ required_arguments = ['onPremConnectorId']
+ resource_path = "/onPremConnectors/{onPremConnectorId}"
method = "GET"
- operation_name = "get_report"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/Report/GetReport"
+ operation_name = "get_on_prem_connector"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/OnPremConnector/GetOnPremConnector"
# Don't accept unknown kwargs
expected_kwargs = [
@@ -12329,10 +12560,10 @@ def get_report(self, report_id, **kwargs):
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"get_report got unknown kwargs: {extra_kwargs!r}")
+ f"get_on_prem_connector got unknown kwargs: {extra_kwargs!r}")
path_params = {
- "reportId": report_id
+ "onPremConnectorId": on_prem_connector_id
}
path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
@@ -12365,7 +12596,7 @@ def get_report(self, report_id, **kwargs):
method=method,
path_params=path_params,
header_params=header_params,
- response_type="Report",
+ response_type="OnPremConnector",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -12376,19 +12607,22 @@ def get_report(self, report_id, **kwargs):
method=method,
path_params=path_params,
header_params=header_params,
- response_type="Report",
+ response_type="OnPremConnector",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def get_report_content(self, report_id, **kwargs):
+ def get_peer_target_database(self, target_database_id, peer_target_database_id, **kwargs):
"""
- Downloads the specified report in the form of .xls or .pdf.
+ Returns the details of the specified Data Safe peer target database.
- :param str report_id: (required)
- Unique report identifier
+ :param str target_database_id: (required)
+ The OCID of the Data Safe target database.
+
+ :param int peer_target_database_id: (required)
+ The unique id of the peer target database.
:param str opc_request_id: (optional)
Unique identifier for the request.
@@ -12405,18 +12639,18 @@ def get_report_content(self, report_id, **kwargs):
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type stream
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.PeerTargetDatabase`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use get_report_content API.
+ Click `here `__ to see an example of how to use get_peer_target_database API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
- required_arguments = ['reportId']
- resource_path = "/reports/{reportId}/content"
+ required_arguments = ['targetDatabaseId', 'peerTargetDatabaseId']
+ resource_path = "/targetDatabases/{targetDatabaseId}/peerTargetDatabases/{peerTargetDatabaseId}"
method = "GET"
- operation_name = "get_report_content"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/Report/GetReportContent"
+ operation_name = "get_peer_target_database"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/PeerTargetDatabase/GetPeerTargetDatabase"
# Don't accept unknown kwargs
expected_kwargs = [
@@ -12427,10 +12661,11 @@ def get_report_content(self, report_id, **kwargs):
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"get_report_content got unknown kwargs: {extra_kwargs!r}")
+ f"get_peer_target_database got unknown kwargs: {extra_kwargs!r}")
path_params = {
- "reportId": report_id
+ "targetDatabaseId": target_database_id,
+ "peerTargetDatabaseId": peer_target_database_id
}
path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
@@ -12463,7 +12698,7 @@ def get_report_content(self, report_id, **kwargs):
method=method,
path_params=path_params,
header_params=header_params,
- response_type="stream",
+ response_type="PeerTargetDatabase",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -12474,22 +12709,28 @@ def get_report_content(self, report_id, **kwargs):
method=method,
path_params=path_params,
header_params=header_params,
- response_type="stream",
+ response_type="PeerTargetDatabase",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def get_report_definition(self, report_definition_id, **kwargs):
+ def get_profile(self, user_assessment_id, profile_name, **kwargs):
"""
- Gets the details of report definition specified by the identifier
+ Lists the details of given profile available on the target.
+ The GetProfile operation returns only the profiles in the specified 'userAssessmentId'.
+ This does not include any subcompartments of the current compartment.
- :param str report_definition_id: (required)
- Unique report definition identifier
- :param str opc_request_id: (optional)
- Unique identifier for the request.
+ :param str user_assessment_id: (required)
+ The OCID of the user assessment.
+
+ :param str profile_name: (required)
+ Profile name to get detailed information .
+
+ :param str opc_request_id: (optional)
+ Unique identifier for the request.
:param obj retry_strategy: (optional)
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
@@ -12503,18 +12744,18 @@ def get_report_definition(self, report_definition_id, **kwargs):
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.ReportDefinition`
+ :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.data_safe.models.Profile`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use get_report_definition API.
+ Click `here `__ to see an example of how to use get_profile API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
- required_arguments = ['reportDefinitionId']
- resource_path = "/reportDefinitions/{reportDefinitionId}"
+ required_arguments = ['userAssessmentId', 'profileName']
+ resource_path = "/userAssessments/{userAssessmentId}/profiles/{profileName}"
method = "GET"
- operation_name = "get_report_definition"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/ReportDefinition/GetReportDefinition"
+ operation_name = "get_profile"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/UserAssessment/GetProfile"
# Don't accept unknown kwargs
expected_kwargs = [
@@ -12525,10 +12766,11 @@ def get_report_definition(self, report_definition_id, **kwargs):
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"get_report_definition got unknown kwargs: {extra_kwargs!r}")
+ f"get_profile got unknown kwargs: {extra_kwargs!r}")
path_params = {
- "reportDefinitionId": report_definition_id
+ "userAssessmentId": user_assessment_id,
+ "profileName": profile_name
}
path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
@@ -12561,7 +12803,7 @@ def get_report_definition(self, report_definition_id, **kwargs):
method=method,
path_params=path_params,
header_params=header_params,
- response_type="ReportDefinition",
+ response_type="list[Profile]",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -12572,19 +12814,19 @@ def get_report_definition(self, report_definition_id, **kwargs):
method=method,
path_params=path_params,
header_params=header_params,
- response_type="ReportDefinition",
+ response_type="list[Profile]",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def get_sdm_masking_policy_difference(self, sdm_masking_policy_difference_id, **kwargs):
+ def get_report(self, report_id, **kwargs):
"""
- Gets the details of the specified SDM Masking policy difference.
+ Gets a report by identifier
- :param str sdm_masking_policy_difference_id: (required)
- The OCID of the SDM masking policy difference.
+ :param str report_id: (required)
+ Unique report identifier
:param str opc_request_id: (optional)
Unique identifier for the request.
@@ -12601,18 +12843,18 @@ def get_sdm_masking_policy_difference(self, sdm_masking_policy_difference_id, **
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.SdmMaskingPolicyDifference`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.Report`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use get_sdm_masking_policy_difference API.
+ Click `here `__ to see an example of how to use get_report API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
- required_arguments = ['sdmMaskingPolicyDifferenceId']
- resource_path = "/sdmMaskingPolicyDifferences/{sdmMaskingPolicyDifferenceId}"
+ required_arguments = ['reportId']
+ resource_path = "/reports/{reportId}"
method = "GET"
- operation_name = "get_sdm_masking_policy_difference"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SdmMaskingPolicyDifference/GetSdmMaskingPolicyDifference"
+ operation_name = "get_report"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/Report/GetReport"
# Don't accept unknown kwargs
expected_kwargs = [
@@ -12623,10 +12865,10 @@ def get_sdm_masking_policy_difference(self, sdm_masking_policy_difference_id, **
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"get_sdm_masking_policy_difference got unknown kwargs: {extra_kwargs!r}")
+ f"get_report got unknown kwargs: {extra_kwargs!r}")
path_params = {
- "sdmMaskingPolicyDifferenceId": sdm_masking_policy_difference_id
+ "reportId": report_id
}
path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
@@ -12659,7 +12901,7 @@ def get_sdm_masking_policy_difference(self, sdm_masking_policy_difference_id, **
method=method,
path_params=path_params,
header_params=header_params,
- response_type="SdmMaskingPolicyDifference",
+ response_type="Report",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -12670,19 +12912,19 @@ def get_sdm_masking_policy_difference(self, sdm_masking_policy_difference_id, **
method=method,
path_params=path_params,
header_params=header_params,
- response_type="SdmMaskingPolicyDifference",
+ response_type="Report",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def get_security_assessment(self, security_assessment_id, **kwargs):
+ def get_report_content(self, report_id, **kwargs):
"""
- Gets the details of the specified security assessment.
+ Downloads the specified report in the form of .xls or .pdf.
- :param str security_assessment_id: (required)
- The OCID of the security assessment.
+ :param str report_id: (required)
+ Unique report identifier
:param str opc_request_id: (optional)
Unique identifier for the request.
@@ -12699,18 +12941,18 @@ def get_security_assessment(self, security_assessment_id, **kwargs):
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.SecurityAssessment`
+ :return: A :class:`~oci.response.Response` object with data of type stream
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use get_security_assessment API.
+ Click `here `__ to see an example of how to use get_report_content API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
- required_arguments = ['securityAssessmentId']
- resource_path = "/securityAssessments/{securityAssessmentId}"
+ required_arguments = ['reportId']
+ resource_path = "/reports/{reportId}/content"
method = "GET"
- operation_name = "get_security_assessment"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SecurityAssessment/GetSecurityAssessment"
+ operation_name = "get_report_content"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/Report/GetReportContent"
# Don't accept unknown kwargs
expected_kwargs = [
@@ -12721,10 +12963,10 @@ def get_security_assessment(self, security_assessment_id, **kwargs):
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"get_security_assessment got unknown kwargs: {extra_kwargs!r}")
+ f"get_report_content got unknown kwargs: {extra_kwargs!r}")
path_params = {
- "securityAssessmentId": security_assessment_id
+ "reportId": report_id
}
path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
@@ -12757,7 +12999,7 @@ def get_security_assessment(self, security_assessment_id, **kwargs):
method=method,
path_params=path_params,
header_params=header_params,
- response_type="SecurityAssessment",
+ response_type="stream",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -12768,22 +13010,19 @@ def get_security_assessment(self, security_assessment_id, **kwargs):
method=method,
path_params=path_params,
header_params=header_params,
- response_type="SecurityAssessment",
+ response_type="stream",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def get_security_assessment_comparison(self, security_assessment_id, comparison_security_assessment_id, **kwargs):
+ def get_report_definition(self, report_definition_id, **kwargs):
"""
- Gets the details of the comparison report for the security assessments submitted for comparison.
-
+ Gets the details of report definition specified by the identifier
- :param str security_assessment_id: (required)
- The OCID of the security assessment.
- :param str comparison_security_assessment_id: (required)
- The OCID of the security assessment baseline.
+ :param str report_definition_id: (required)
+ Unique report definition identifier
:param str opc_request_id: (optional)
Unique identifier for the request.
@@ -12800,18 +13039,18 @@ def get_security_assessment_comparison(self, security_assessment_id, comparison_
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.SecurityAssessmentComparison`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.ReportDefinition`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use get_security_assessment_comparison API.
+ Click `here `__ to see an example of how to use get_report_definition API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
- required_arguments = ['securityAssessmentId', 'comparisonSecurityAssessmentId']
- resource_path = "/securityAssessments/{securityAssessmentId}/comparison/{comparisonSecurityAssessmentId}"
+ required_arguments = ['reportDefinitionId']
+ resource_path = "/reportDefinitions/{reportDefinitionId}"
method = "GET"
- operation_name = "get_security_assessment_comparison"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SecurityAssessment/GetSecurityAssessmentComparison"
+ operation_name = "get_report_definition"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/ReportDefinition/GetReportDefinition"
# Don't accept unknown kwargs
expected_kwargs = [
@@ -12822,11 +13061,10 @@ def get_security_assessment_comparison(self, security_assessment_id, comparison_
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"get_security_assessment_comparison got unknown kwargs: {extra_kwargs!r}")
+ f"get_report_definition got unknown kwargs: {extra_kwargs!r}")
path_params = {
- "securityAssessmentId": security_assessment_id,
- "comparisonSecurityAssessmentId": comparison_security_assessment_id
+ "reportDefinitionId": report_definition_id
}
path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
@@ -12859,7 +13097,7 @@ def get_security_assessment_comparison(self, security_assessment_id, comparison_
method=method,
path_params=path_params,
header_params=header_params,
- response_type="SecurityAssessmentComparison",
+ response_type="ReportDefinition",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -12870,19 +13108,19 @@ def get_security_assessment_comparison(self, security_assessment_id, comparison_
method=method,
path_params=path_params,
header_params=header_params,
- response_type="SecurityAssessmentComparison",
+ response_type="ReportDefinition",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def get_security_policy(self, security_policy_id, **kwargs):
+ def get_sdm_masking_policy_difference(self, sdm_masking_policy_difference_id, **kwargs):
"""
- Gets a security policy by the specified OCID of the security policy resource.
+ Gets the details of the specified SDM Masking policy difference.
- :param str security_policy_id: (required)
- The OCID of the security policy resource.
+ :param str sdm_masking_policy_difference_id: (required)
+ The OCID of the SDM masking policy difference.
:param str opc_request_id: (optional)
Unique identifier for the request.
@@ -12899,18 +13137,18 @@ def get_security_policy(self, security_policy_id, **kwargs):
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.SecurityPolicy`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.SdmMaskingPolicyDifference`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use get_security_policy API.
+ Click `here `__ to see an example of how to use get_sdm_masking_policy_difference API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
- required_arguments = ['securityPolicyId']
- resource_path = "/securityPolicies/{securityPolicyId}"
+ required_arguments = ['sdmMaskingPolicyDifferenceId']
+ resource_path = "/sdmMaskingPolicyDifferences/{sdmMaskingPolicyDifferenceId}"
method = "GET"
- operation_name = "get_security_policy"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SecurityPolicy/GetSecurityPolicy"
+ operation_name = "get_sdm_masking_policy_difference"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SdmMaskingPolicyDifference/GetSdmMaskingPolicyDifference"
# Don't accept unknown kwargs
expected_kwargs = [
@@ -12921,10 +13159,10 @@ def get_security_policy(self, security_policy_id, **kwargs):
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"get_security_policy got unknown kwargs: {extra_kwargs!r}")
+ f"get_sdm_masking_policy_difference got unknown kwargs: {extra_kwargs!r}")
path_params = {
- "securityPolicyId": security_policy_id
+ "sdmMaskingPolicyDifferenceId": sdm_masking_policy_difference_id
}
path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
@@ -12957,7 +13195,7 @@ def get_security_policy(self, security_policy_id, **kwargs):
method=method,
path_params=path_params,
header_params=header_params,
- response_type="SecurityPolicy",
+ response_type="SdmMaskingPolicyDifference",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -12968,19 +13206,19 @@ def get_security_policy(self, security_policy_id, **kwargs):
method=method,
path_params=path_params,
header_params=header_params,
- response_type="SecurityPolicy",
+ response_type="SdmMaskingPolicyDifference",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def get_security_policy_deployment(self, security_policy_deployment_id, **kwargs):
+ def get_security_assessment(self, security_assessment_id, **kwargs):
"""
- Gets a security policy deployment by identifier.
+ Gets the details of the specified security assessment.
- :param str security_policy_deployment_id: (required)
- The OCID of the security policy deployment resource.
+ :param str security_assessment_id: (required)
+ The OCID of the security assessment.
:param str opc_request_id: (optional)
Unique identifier for the request.
@@ -12997,18 +13235,18 @@ def get_security_policy_deployment(self, security_policy_deployment_id, **kwargs
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.SecurityPolicyDeployment`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.SecurityAssessment`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use get_security_policy_deployment API.
+ Click `here `__ to see an example of how to use get_security_assessment API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
- required_arguments = ['securityPolicyDeploymentId']
- resource_path = "/securityPolicyDeployments/{securityPolicyDeploymentId}"
+ required_arguments = ['securityAssessmentId']
+ resource_path = "/securityAssessments/{securityAssessmentId}"
method = "GET"
- operation_name = "get_security_policy_deployment"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SecurityPolicyDeployment/GetSecurityPolicyDeployment"
+ operation_name = "get_security_assessment"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SecurityAssessment/GetSecurityAssessment"
# Don't accept unknown kwargs
expected_kwargs = [
@@ -13019,10 +13257,10 @@ def get_security_policy_deployment(self, security_policy_deployment_id, **kwargs
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"get_security_policy_deployment got unknown kwargs: {extra_kwargs!r}")
+ f"get_security_assessment got unknown kwargs: {extra_kwargs!r}")
path_params = {
- "securityPolicyDeploymentId": security_policy_deployment_id
+ "securityAssessmentId": security_assessment_id
}
path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
@@ -13055,7 +13293,7 @@ def get_security_policy_deployment(self, security_policy_deployment_id, **kwargs
method=method,
path_params=path_params,
header_params=header_params,
- response_type="SecurityPolicyDeployment",
+ response_type="SecurityAssessment",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -13066,25 +13304,22 @@ def get_security_policy_deployment(self, security_policy_deployment_id, **kwargs
method=method,
path_params=path_params,
header_params=header_params,
- response_type="SecurityPolicyDeployment",
+ response_type="SecurityAssessment",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def get_security_policy_entry_state(self, security_policy_deployment_id, security_policy_entry_state_id, **kwargs):
+ def get_security_assessment_comparison(self, security_assessment_id, comparison_security_assessment_id, **kwargs):
"""
- Gets a security policy entity states by identifier.
+ Gets the details of the comparison report for the security assessments submitted for comparison.
- :param str security_policy_deployment_id: (required)
- The OCID of the security policy deployment resource.
+ :param str security_assessment_id: (required)
+ The OCID of the security assessment.
- :param str security_policy_entry_state_id: (required)
- Unique security policy entry state identifier.
- The unique id for a given security policy entry state can be obtained
- from the list api by passing the OCID of the corresponding
- security policy deployment resource as the query parameter.
+ :param str comparison_security_assessment_id: (required)
+ The OCID of the security assessment baseline.
:param str opc_request_id: (optional)
Unique identifier for the request.
@@ -13101,18 +13336,18 @@ def get_security_policy_entry_state(self, security_policy_deployment_id, securit
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.SecurityPolicyEntryState`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.SecurityAssessmentComparison`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use get_security_policy_entry_state API.
+ Click `here `__ to see an example of how to use get_security_assessment_comparison API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
- required_arguments = ['securityPolicyDeploymentId', 'securityPolicyEntryStateId']
- resource_path = "/securityPolicyDeployments/{securityPolicyDeploymentId}/securityPolicyEntryStates/{securityPolicyEntryStateId}"
+ required_arguments = ['securityAssessmentId', 'comparisonSecurityAssessmentId']
+ resource_path = "/securityAssessments/{securityAssessmentId}/comparison/{comparisonSecurityAssessmentId}"
method = "GET"
- operation_name = "get_security_policy_entry_state"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SecurityPolicyEntryState/GetSecurityPolicyEntryState"
+ operation_name = "get_security_assessment_comparison"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SecurityAssessment/GetSecurityAssessmentComparison"
# Don't accept unknown kwargs
expected_kwargs = [
@@ -13123,11 +13358,11 @@ def get_security_policy_entry_state(self, security_policy_deployment_id, securit
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"get_security_policy_entry_state got unknown kwargs: {extra_kwargs!r}")
+ f"get_security_assessment_comparison got unknown kwargs: {extra_kwargs!r}")
path_params = {
- "securityPolicyDeploymentId": security_policy_deployment_id,
- "securityPolicyEntryStateId": security_policy_entry_state_id
+ "securityAssessmentId": security_assessment_id,
+ "comparisonSecurityAssessmentId": comparison_security_assessment_id
}
path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
@@ -13160,7 +13395,7 @@ def get_security_policy_entry_state(self, security_policy_deployment_id, securit
method=method,
path_params=path_params,
header_params=header_params,
- response_type="SecurityPolicyEntryState",
+ response_type="SecurityAssessmentComparison",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -13171,22 +13406,19 @@ def get_security_policy_entry_state(self, security_policy_deployment_id, securit
method=method,
path_params=path_params,
header_params=header_params,
- response_type="SecurityPolicyEntryState",
+ response_type="SecurityAssessmentComparison",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def get_sensitive_column(self, sensitive_data_model_id, sensitive_column_key, **kwargs):
+ def get_security_policy(self, security_policy_id, **kwargs):
"""
- Gets the details of the specified sensitive column.
-
+ Gets a security policy by the specified OCID of the security policy resource.
- :param str sensitive_data_model_id: (required)
- The OCID of the sensitive data model.
- :param str sensitive_column_key: (required)
- The unique key that identifies the sensitive column. It's numeric and unique within a sensitive data model.
+ :param str security_policy_id: (required)
+ The OCID of the security policy resource.
:param str opc_request_id: (optional)
Unique identifier for the request.
@@ -13203,18 +13435,18 @@ def get_sensitive_column(self, sensitive_data_model_id, sensitive_column_key, **
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.SensitiveColumn`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.SecurityPolicy`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use get_sensitive_column API.
+ Click `here `__ to see an example of how to use get_security_policy API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
- required_arguments = ['sensitiveDataModelId', 'sensitiveColumnKey']
- resource_path = "/sensitiveDataModels/{sensitiveDataModelId}/sensitiveColumns/{sensitiveColumnKey}"
+ required_arguments = ['securityPolicyId']
+ resource_path = "/securityPolicies/{securityPolicyId}"
method = "GET"
- operation_name = "get_sensitive_column"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SensitiveColumn/GetSensitiveColumn"
+ operation_name = "get_security_policy"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SecurityPolicy/GetSecurityPolicy"
# Don't accept unknown kwargs
expected_kwargs = [
@@ -13225,11 +13457,10 @@ def get_sensitive_column(self, sensitive_data_model_id, sensitive_column_key, **
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"get_sensitive_column got unknown kwargs: {extra_kwargs!r}")
+ f"get_security_policy got unknown kwargs: {extra_kwargs!r}")
path_params = {
- "sensitiveDataModelId": sensitive_data_model_id,
- "sensitiveColumnKey": sensitive_column_key
+ "securityPolicyId": security_policy_id
}
path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
@@ -13262,7 +13493,7 @@ def get_sensitive_column(self, sensitive_data_model_id, sensitive_column_key, **
method=method,
path_params=path_params,
header_params=header_params,
- response_type="SensitiveColumn",
+ response_type="SecurityPolicy",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -13273,19 +13504,19 @@ def get_sensitive_column(self, sensitive_data_model_id, sensitive_column_key, **
method=method,
path_params=path_params,
header_params=header_params,
- response_type="SensitiveColumn",
+ response_type="SecurityPolicy",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def get_sensitive_data_model(self, sensitive_data_model_id, **kwargs):
+ def get_security_policy_deployment(self, security_policy_deployment_id, **kwargs):
"""
- Gets the details of the specified sensitive data model.
+ Gets a security policy deployment by identifier.
- :param str sensitive_data_model_id: (required)
- The OCID of the sensitive data model.
+ :param str security_policy_deployment_id: (required)
+ The OCID of the security policy deployment resource.
:param str opc_request_id: (optional)
Unique identifier for the request.
@@ -13302,18 +13533,18 @@ def get_sensitive_data_model(self, sensitive_data_model_id, **kwargs):
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.SensitiveDataModel`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.SecurityPolicyDeployment`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use get_sensitive_data_model API.
+ Click `here `__ to see an example of how to use get_security_policy_deployment API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
- required_arguments = ['sensitiveDataModelId']
- resource_path = "/sensitiveDataModels/{sensitiveDataModelId}"
+ required_arguments = ['securityPolicyDeploymentId']
+ resource_path = "/securityPolicyDeployments/{securityPolicyDeploymentId}"
method = "GET"
- operation_name = "get_sensitive_data_model"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SensitiveDataModel/GetSensitiveDataModel"
+ operation_name = "get_security_policy_deployment"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SecurityPolicyDeployment/GetSecurityPolicyDeployment"
# Don't accept unknown kwargs
expected_kwargs = [
@@ -13324,10 +13555,10 @@ def get_sensitive_data_model(self, sensitive_data_model_id, **kwargs):
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"get_sensitive_data_model got unknown kwargs: {extra_kwargs!r}")
+ f"get_security_policy_deployment got unknown kwargs: {extra_kwargs!r}")
path_params = {
- "sensitiveDataModelId": sensitive_data_model_id
+ "securityPolicyDeploymentId": security_policy_deployment_id
}
path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
@@ -13360,7 +13591,7 @@ def get_sensitive_data_model(self, sensitive_data_model_id, **kwargs):
method=method,
path_params=path_params,
header_params=header_params,
- response_type="SensitiveDataModel",
+ response_type="SecurityPolicyDeployment",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -13371,19 +13602,25 @@ def get_sensitive_data_model(self, sensitive_data_model_id, **kwargs):
method=method,
path_params=path_params,
header_params=header_params,
- response_type="SensitiveDataModel",
+ response_type="SecurityPolicyDeployment",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def get_sensitive_type(self, sensitive_type_id, **kwargs):
+ def get_security_policy_entry_state(self, security_policy_deployment_id, security_policy_entry_state_id, **kwargs):
"""
- Gets the details of the specified sensitive type.
+ Gets a security policy entity states by identifier.
- :param str sensitive_type_id: (required)
- The OCID of the sensitive type.
+ :param str security_policy_deployment_id: (required)
+ The OCID of the security policy deployment resource.
+
+ :param str security_policy_entry_state_id: (required)
+ Unique security policy entry state identifier.
+ The unique id for a given security policy entry state can be obtained
+ from the list api by passing the OCID of the corresponding
+ security policy deployment resource as the query parameter.
:param str opc_request_id: (optional)
Unique identifier for the request.
@@ -13400,18 +13637,18 @@ def get_sensitive_type(self, sensitive_type_id, **kwargs):
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.SensitiveType`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.SecurityPolicyEntryState`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use get_sensitive_type API.
+ Click `here `__ to see an example of how to use get_security_policy_entry_state API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
- required_arguments = ['sensitiveTypeId']
- resource_path = "/sensitiveTypes/{sensitiveTypeId}"
+ required_arguments = ['securityPolicyDeploymentId', 'securityPolicyEntryStateId']
+ resource_path = "/securityPolicyDeployments/{securityPolicyDeploymentId}/securityPolicyEntryStates/{securityPolicyEntryStateId}"
method = "GET"
- operation_name = "get_sensitive_type"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SensitiveType/GetSensitiveType"
+ operation_name = "get_security_policy_entry_state"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SecurityPolicyEntryState/GetSecurityPolicyEntryState"
# Don't accept unknown kwargs
expected_kwargs = [
@@ -13422,10 +13659,11 @@ def get_sensitive_type(self, sensitive_type_id, **kwargs):
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"get_sensitive_type got unknown kwargs: {extra_kwargs!r}")
+ f"get_security_policy_entry_state got unknown kwargs: {extra_kwargs!r}")
path_params = {
- "sensitiveTypeId": sensitive_type_id
+ "securityPolicyDeploymentId": security_policy_deployment_id,
+ "securityPolicyEntryStateId": security_policy_entry_state_id
}
path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
@@ -13458,7 +13696,7 @@ def get_sensitive_type(self, sensitive_type_id, **kwargs):
method=method,
path_params=path_params,
header_params=header_params,
- response_type="SensitiveType",
+ response_type="SecurityPolicyEntryState",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -13469,19 +13707,19 @@ def get_sensitive_type(self, sensitive_type_id, **kwargs):
method=method,
path_params=path_params,
header_params=header_params,
- response_type="SensitiveType",
+ response_type="SecurityPolicyEntryState",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def get_sql_collection(self, sql_collection_id, **kwargs):
+ def get_security_policy_report(self, security_policy_report_id, **kwargs):
"""
- Gets a SQL collection by identifier.
+ Gets a security policy report by the specified OCID of the security policy report resource.
- :param str sql_collection_id: (required)
- The OCID of the SQL collection resource.
+ :param str security_policy_report_id: (required)
+ The OCID of the security policy report resource.
:param str opc_request_id: (optional)
Unique identifier for the request.
@@ -13498,18 +13736,18 @@ def get_sql_collection(self, sql_collection_id, **kwargs):
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.SqlCollection`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.SecurityPolicyReport`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use get_sql_collection API.
+ Click `here `__ to see an example of how to use get_security_policy_report API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
- required_arguments = ['sqlCollectionId']
- resource_path = "/sqlCollections/{sqlCollectionId}"
+ required_arguments = ['securityPolicyReportId']
+ resource_path = "/securityPolicyReports/{securityPolicyReportId}"
method = "GET"
- operation_name = "get_sql_collection"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SqlCollection/GetSqlCollection"
+ operation_name = "get_security_policy_report"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SecurityPolicyReport/GetSecurityPolicyReport"
# Don't accept unknown kwargs
expected_kwargs = [
@@ -13520,10 +13758,10 @@ def get_sql_collection(self, sql_collection_id, **kwargs):
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"get_sql_collection got unknown kwargs: {extra_kwargs!r}")
+ f"get_security_policy_report got unknown kwargs: {extra_kwargs!r}")
path_params = {
- "sqlCollectionId": sql_collection_id
+ "securityPolicyReportId": security_policy_report_id
}
path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
@@ -13556,7 +13794,7 @@ def get_sql_collection(self, sql_collection_id, **kwargs):
method=method,
path_params=path_params,
header_params=header_params,
- response_type="SqlCollection",
+ response_type="SecurityPolicyReport",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -13567,19 +13805,22 @@ def get_sql_collection(self, sql_collection_id, **kwargs):
method=method,
path_params=path_params,
header_params=header_params,
- response_type="SqlCollection",
+ response_type="SecurityPolicyReport",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def get_sql_firewall_policy(self, sql_firewall_policy_id, **kwargs):
+ def get_sensitive_column(self, sensitive_data_model_id, sensitive_column_key, **kwargs):
"""
- Gets a SQL Firewall policy by identifier.
+ Gets the details of the specified sensitive column.
- :param str sql_firewall_policy_id: (required)
- The OCID of the SQL Firewall policy resource.
+ :param str sensitive_data_model_id: (required)
+ The OCID of the sensitive data model.
+
+ :param str sensitive_column_key: (required)
+ The unique key that identifies the sensitive column. It's numeric and unique within a sensitive data model.
:param str opc_request_id: (optional)
Unique identifier for the request.
@@ -13596,18 +13837,18 @@ def get_sql_firewall_policy(self, sql_firewall_policy_id, **kwargs):
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.SqlFirewallPolicy`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.SensitiveColumn`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use get_sql_firewall_policy API.
+ Click `here `__ to see an example of how to use get_sensitive_column API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
- required_arguments = ['sqlFirewallPolicyId']
- resource_path = "/sqlFirewallPolicies/{sqlFirewallPolicyId}"
+ required_arguments = ['sensitiveDataModelId', 'sensitiveColumnKey']
+ resource_path = "/sensitiveDataModels/{sensitiveDataModelId}/sensitiveColumns/{sensitiveColumnKey}"
method = "GET"
- operation_name = "get_sql_firewall_policy"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SqlFirewallPolicy/GetSqlFirewallPolicy"
+ operation_name = "get_sensitive_column"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SensitiveColumn/GetSensitiveColumn"
# Don't accept unknown kwargs
expected_kwargs = [
@@ -13618,10 +13859,11 @@ def get_sql_firewall_policy(self, sql_firewall_policy_id, **kwargs):
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"get_sql_firewall_policy got unknown kwargs: {extra_kwargs!r}")
+ f"get_sensitive_column got unknown kwargs: {extra_kwargs!r}")
path_params = {
- "sqlFirewallPolicyId": sql_firewall_policy_id
+ "sensitiveDataModelId": sensitive_data_model_id,
+ "sensitiveColumnKey": sensitive_column_key
}
path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
@@ -13654,7 +13896,7 @@ def get_sql_firewall_policy(self, sql_firewall_policy_id, **kwargs):
method=method,
path_params=path_params,
header_params=header_params,
- response_type="SqlFirewallPolicy",
+ response_type="SensitiveColumn",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -13665,19 +13907,19 @@ def get_sql_firewall_policy(self, sql_firewall_policy_id, **kwargs):
method=method,
path_params=path_params,
header_params=header_params,
- response_type="SqlFirewallPolicy",
+ response_type="SensitiveColumn",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def get_target_alert_policy_association(self, target_alert_policy_association_id, **kwargs):
+ def get_sensitive_data_model(self, sensitive_data_model_id, **kwargs):
"""
- Gets the details of target-alert policy association by its ID.
+ Gets the details of the specified sensitive data model.
- :param str target_alert_policy_association_id: (required)
- The OCID of the target-alert policy association.
+ :param str sensitive_data_model_id: (required)
+ The OCID of the sensitive data model.
:param str opc_request_id: (optional)
Unique identifier for the request.
@@ -13694,18 +13936,18 @@ def get_target_alert_policy_association(self, target_alert_policy_association_id
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.TargetAlertPolicyAssociation`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.SensitiveDataModel`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use get_target_alert_policy_association API.
+ Click `here `__ to see an example of how to use get_sensitive_data_model API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
- required_arguments = ['targetAlertPolicyAssociationId']
- resource_path = "/targetAlertPolicyAssociations/{targetAlertPolicyAssociationId}"
+ required_arguments = ['sensitiveDataModelId']
+ resource_path = "/sensitiveDataModels/{sensitiveDataModelId}"
method = "GET"
- operation_name = "get_target_alert_policy_association"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/TargetAlertPolicyAssociation/GetTargetAlertPolicyAssociation"
+ operation_name = "get_sensitive_data_model"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SensitiveDataModel/GetSensitiveDataModel"
# Don't accept unknown kwargs
expected_kwargs = [
@@ -13716,10 +13958,10 @@ def get_target_alert_policy_association(self, target_alert_policy_association_id
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"get_target_alert_policy_association got unknown kwargs: {extra_kwargs!r}")
+ f"get_sensitive_data_model got unknown kwargs: {extra_kwargs!r}")
path_params = {
- "targetAlertPolicyAssociationId": target_alert_policy_association_id
+ "sensitiveDataModelId": sensitive_data_model_id
}
path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
@@ -13752,7 +13994,7 @@ def get_target_alert_policy_association(self, target_alert_policy_association_id
method=method,
path_params=path_params,
header_params=header_params,
- response_type="TargetAlertPolicyAssociation",
+ response_type="SensitiveDataModel",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -13763,19 +14005,19 @@ def get_target_alert_policy_association(self, target_alert_policy_association_id
method=method,
path_params=path_params,
header_params=header_params,
- response_type="TargetAlertPolicyAssociation",
+ response_type="SensitiveDataModel",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def get_target_database(self, target_database_id, **kwargs):
+ def get_sensitive_type(self, sensitive_type_id, **kwargs):
"""
- Returns the details of the specified Data Safe target database.
+ Gets the details of the specified sensitive type.
- :param str target_database_id: (required)
- The OCID of the Data Safe target database.
+ :param str sensitive_type_id: (required)
+ The OCID of the sensitive type.
:param str opc_request_id: (optional)
Unique identifier for the request.
@@ -13792,18 +14034,18 @@ def get_target_database(self, target_database_id, **kwargs):
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.TargetDatabase`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.SensitiveType`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use get_target_database API.
+ Click `here `__ to see an example of how to use get_sensitive_type API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
- required_arguments = ['targetDatabaseId']
- resource_path = "/targetDatabases/{targetDatabaseId}"
+ required_arguments = ['sensitiveTypeId']
+ resource_path = "/sensitiveTypes/{sensitiveTypeId}"
method = "GET"
- operation_name = "get_target_database"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/TargetDatabase/GetTargetDatabase"
+ operation_name = "get_sensitive_type"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SensitiveType/GetSensitiveType"
# Don't accept unknown kwargs
expected_kwargs = [
@@ -13814,10 +14056,10 @@ def get_target_database(self, target_database_id, **kwargs):
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"get_target_database got unknown kwargs: {extra_kwargs!r}")
+ f"get_sensitive_type got unknown kwargs: {extra_kwargs!r}")
path_params = {
- "targetDatabaseId": target_database_id
+ "sensitiveTypeId": sensitive_type_id
}
path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
@@ -13850,7 +14092,7 @@ def get_target_database(self, target_database_id, **kwargs):
method=method,
path_params=path_params,
header_params=header_params,
- response_type="TargetDatabase",
+ response_type="SensitiveType",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -13861,19 +14103,19 @@ def get_target_database(self, target_database_id, **kwargs):
method=method,
path_params=path_params,
header_params=header_params,
- response_type="TargetDatabase",
+ response_type="SensitiveType",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def get_user_assessment(self, user_assessment_id, **kwargs):
+ def get_sql_collection(self, sql_collection_id, **kwargs):
"""
- Gets a user assessment by identifier.
+ Gets a SQL collection by identifier.
- :param str user_assessment_id: (required)
- The OCID of the user assessment.
+ :param str sql_collection_id: (required)
+ The OCID of the SQL collection resource.
:param str opc_request_id: (optional)
Unique identifier for the request.
@@ -13890,18 +14132,18 @@ def get_user_assessment(self, user_assessment_id, **kwargs):
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.UserAssessment`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.SqlCollection`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use get_user_assessment API.
+ Click `here `__ to see an example of how to use get_sql_collection API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
- required_arguments = ['userAssessmentId']
- resource_path = "/userAssessments/{userAssessmentId}"
+ required_arguments = ['sqlCollectionId']
+ resource_path = "/sqlCollections/{sqlCollectionId}"
method = "GET"
- operation_name = "get_user_assessment"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/UserAssessment/GetUserAssessment"
+ operation_name = "get_sql_collection"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SqlCollection/GetSqlCollection"
# Don't accept unknown kwargs
expected_kwargs = [
@@ -13912,10 +14154,10 @@ def get_user_assessment(self, user_assessment_id, **kwargs):
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"get_user_assessment got unknown kwargs: {extra_kwargs!r}")
+ f"get_sql_collection got unknown kwargs: {extra_kwargs!r}")
path_params = {
- "userAssessmentId": user_assessment_id
+ "sqlCollectionId": sql_collection_id
}
path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
@@ -13948,7 +14190,7 @@ def get_user_assessment(self, user_assessment_id, **kwargs):
method=method,
path_params=path_params,
header_params=header_params,
- response_type="UserAssessment",
+ response_type="SqlCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -13959,22 +14201,19 @@ def get_user_assessment(self, user_assessment_id, **kwargs):
method=method,
path_params=path_params,
header_params=header_params,
- response_type="UserAssessment",
+ response_type="SqlCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def get_user_assessment_comparison(self, user_assessment_id, comparison_user_assessment_id, **kwargs):
+ def get_sql_firewall_policy(self, sql_firewall_policy_id, **kwargs):
"""
- Gets the details of the comparison report for the user assessments submitted for comparison.
-
+ Gets a SQL Firewall policy by identifier.
- :param str user_assessment_id: (required)
- The OCID of the user assessment.
- :param str comparison_user_assessment_id: (required)
- The OCID of the baseline user assessment.
+ :param str sql_firewall_policy_id: (required)
+ The OCID of the SQL Firewall policy resource.
:param str opc_request_id: (optional)
Unique identifier for the request.
@@ -13991,18 +14230,18 @@ def get_user_assessment_comparison(self, user_assessment_id, comparison_user_ass
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.UserAssessmentComparison`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.SqlFirewallPolicy`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use get_user_assessment_comparison API.
+ Click `here `__ to see an example of how to use get_sql_firewall_policy API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
- required_arguments = ['userAssessmentId', 'comparisonUserAssessmentId']
- resource_path = "/userAssessments/{userAssessmentId}/comparison/{comparisonUserAssessmentId}"
+ required_arguments = ['sqlFirewallPolicyId']
+ resource_path = "/sqlFirewallPolicies/{sqlFirewallPolicyId}"
method = "GET"
- operation_name = "get_user_assessment_comparison"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/UserAssessment/GetUserAssessmentComparison"
+ operation_name = "get_sql_firewall_policy"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SqlFirewallPolicy/GetSqlFirewallPolicy"
# Don't accept unknown kwargs
expected_kwargs = [
@@ -14013,11 +14252,10 @@ def get_user_assessment_comparison(self, user_assessment_id, comparison_user_ass
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"get_user_assessment_comparison got unknown kwargs: {extra_kwargs!r}")
+ f"get_sql_firewall_policy got unknown kwargs: {extra_kwargs!r}")
path_params = {
- "userAssessmentId": user_assessment_id,
- "comparisonUserAssessmentId": comparison_user_assessment_id
+ "sqlFirewallPolicyId": sql_firewall_policy_id
}
path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
@@ -14050,7 +14288,7 @@ def get_user_assessment_comparison(self, user_assessment_id, comparison_user_ass
method=method,
path_params=path_params,
header_params=header_params,
- response_type="UserAssessmentComparison",
+ response_type="SqlFirewallPolicy",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -14061,19 +14299,19 @@ def get_user_assessment_comparison(self, user_assessment_id, comparison_user_ass
method=method,
path_params=path_params,
header_params=header_params,
- response_type="UserAssessmentComparison",
+ response_type="SqlFirewallPolicy",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def get_work_request(self, work_request_id, **kwargs):
+ def get_target_alert_policy_association(self, target_alert_policy_association_id, **kwargs):
"""
- Gets the details of the specified work request.
+ Gets the details of target-alert policy association by its ID.
- :param str work_request_id: (required)
- The OCID of the work request.
+ :param str target_alert_policy_association_id: (required)
+ The OCID of the target-alert policy association.
:param str opc_request_id: (optional)
Unique identifier for the request.
@@ -14090,18 +14328,18 @@ def get_work_request(self, work_request_id, **kwargs):
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.WorkRequest`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.TargetAlertPolicyAssociation`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use get_work_request API.
+ Click `here `__ to see an example of how to use get_target_alert_policy_association API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
- required_arguments = ['workRequestId']
- resource_path = "/workRequests/{workRequestId}"
+ required_arguments = ['targetAlertPolicyAssociationId']
+ resource_path = "/targetAlertPolicyAssociations/{targetAlertPolicyAssociationId}"
method = "GET"
- operation_name = "get_work_request"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/WorkRequest/GetWorkRequest"
+ operation_name = "get_target_alert_policy_association"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/TargetAlertPolicyAssociation/GetTargetAlertPolicyAssociation"
# Don't accept unknown kwargs
expected_kwargs = [
@@ -14112,10 +14350,10 @@ def get_work_request(self, work_request_id, **kwargs):
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"get_work_request got unknown kwargs: {extra_kwargs!r}")
+ f"get_target_alert_policy_association got unknown kwargs: {extra_kwargs!r}")
path_params = {
- "workRequestId": work_request_id
+ "targetAlertPolicyAssociationId": target_alert_policy_association_id
}
path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
@@ -14148,7 +14386,7 @@ def get_work_request(self, work_request_id, **kwargs):
method=method,
path_params=path_params,
header_params=header_params,
- response_type="WorkRequest",
+ response_type="TargetAlertPolicyAssociation",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -14159,68 +14397,2810 @@ def get_work_request(self, work_request_id, **kwargs):
method=method,
path_params=path_params,
header_params=header_params,
- response_type="WorkRequest",
+ response_type="TargetAlertPolicyAssociation",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def list_alert_analytics(self, compartment_id, **kwargs):
+ def get_target_database(self, target_database_id, **kwargs):
"""
- Returns the aggregation details of the alerts.
-
+ Returns the details of the specified Data Safe target database.
- :param str compartment_id: (required)
- A filter to return only resources that match the specified compartment OCID.
- :param bool compartment_id_in_subtree: (optional)
- Default is false.
- When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting.
+ :param str target_database_id: (required)
+ The OCID of the Data Safe target database.
- :param int limit: (optional)
- For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
+ :param str opc_request_id: (optional)
+ Unique identifier for the request.
- __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
+ :param obj retry_strategy: (optional)
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
+
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
+ The specifics of the default retry strategy are described `here `__.
+
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
+
+ :param bool allow_control_chars: (optional)
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
+ By default, the response will not allow control characters in strings
+
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.TargetDatabase`
+ :rtype: :class:`~oci.response.Response`
+
+ :example:
+ Click `here `__ to see an example of how to use get_target_database API.
+ """
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
+ required_arguments = ['targetDatabaseId']
+ resource_path = "/targetDatabases/{targetDatabaseId}"
+ method = "GET"
+ operation_name = "get_target_database"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/TargetDatabase/GetTargetDatabase"
+
+ # Don't accept unknown kwargs
+ expected_kwargs = [
+ "allow_control_chars",
+ "retry_strategy",
+ "opc_request_id"
+ ]
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
+ if extra_kwargs:
+ raise ValueError(
+ f"get_target_database got unknown kwargs: {extra_kwargs!r}")
+
+ path_params = {
+ "targetDatabaseId": target_database_id
+ }
+
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
+
+ for (k, v) in six.iteritems(path_params):
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
+ raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
+
+ header_params = {
+ "accept": "application/json",
+ "content-type": "application/json",
+ "opc-request-id": kwargs.get("opc_request_id", missing)
+ }
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
+
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
+ operation_retry_strategy=kwargs.get('retry_strategy'),
+ client_retry_strategy=self.retry_strategy
+ )
+ if retry_strategy is None:
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
+
+ if retry_strategy:
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
+ self.base_client.add_opc_client_retries_header(header_params)
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
+ return retry_strategy.make_retrying_call(
+ self.base_client.call_api,
+ resource_path=resource_path,
+ method=method,
+ path_params=path_params,
+ header_params=header_params,
+ response_type="TargetDatabase",
+ allow_control_chars=kwargs.get('allow_control_chars'),
+ operation_name=operation_name,
+ api_reference_link=api_reference_link,
+ required_arguments=required_arguments)
+ else:
+ return self.base_client.call_api(
+ resource_path=resource_path,
+ method=method,
+ path_params=path_params,
+ header_params=header_params,
+ response_type="TargetDatabase",
+ allow_control_chars=kwargs.get('allow_control_chars'),
+ operation_name=operation_name,
+ api_reference_link=api_reference_link,
+ required_arguments=required_arguments)
+
+ def get_user_assessment(self, user_assessment_id, **kwargs):
+ """
+ Gets a user assessment by identifier.
+
+
+ :param str user_assessment_id: (required)
+ The OCID of the user assessment.
+
+ :param str opc_request_id: (optional)
+ Unique identifier for the request.
+
+ :param obj retry_strategy: (optional)
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
+
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
+ The specifics of the default retry strategy are described `here `__.
+
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
+
+ :param bool allow_control_chars: (optional)
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
+ By default, the response will not allow control characters in strings
+
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.UserAssessment`
+ :rtype: :class:`~oci.response.Response`
+
+ :example:
+ Click `here `__ to see an example of how to use get_user_assessment API.
+ """
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
+ required_arguments = ['userAssessmentId']
+ resource_path = "/userAssessments/{userAssessmentId}"
+ method = "GET"
+ operation_name = "get_user_assessment"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/UserAssessment/GetUserAssessment"
+
+ # Don't accept unknown kwargs
+ expected_kwargs = [
+ "allow_control_chars",
+ "retry_strategy",
+ "opc_request_id"
+ ]
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
+ if extra_kwargs:
+ raise ValueError(
+ f"get_user_assessment got unknown kwargs: {extra_kwargs!r}")
+
+ path_params = {
+ "userAssessmentId": user_assessment_id
+ }
+
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
+
+ for (k, v) in six.iteritems(path_params):
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
+ raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
+
+ header_params = {
+ "accept": "application/json",
+ "content-type": "application/json",
+ "opc-request-id": kwargs.get("opc_request_id", missing)
+ }
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
+
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
+ operation_retry_strategy=kwargs.get('retry_strategy'),
+ client_retry_strategy=self.retry_strategy
+ )
+ if retry_strategy is None:
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
+
+ if retry_strategy:
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
+ self.base_client.add_opc_client_retries_header(header_params)
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
+ return retry_strategy.make_retrying_call(
+ self.base_client.call_api,
+ resource_path=resource_path,
+ method=method,
+ path_params=path_params,
+ header_params=header_params,
+ response_type="UserAssessment",
+ allow_control_chars=kwargs.get('allow_control_chars'),
+ operation_name=operation_name,
+ api_reference_link=api_reference_link,
+ required_arguments=required_arguments)
+ else:
+ return self.base_client.call_api(
+ resource_path=resource_path,
+ method=method,
+ path_params=path_params,
+ header_params=header_params,
+ response_type="UserAssessment",
+ allow_control_chars=kwargs.get('allow_control_chars'),
+ operation_name=operation_name,
+ api_reference_link=api_reference_link,
+ required_arguments=required_arguments)
+
+ def get_user_assessment_comparison(self, user_assessment_id, comparison_user_assessment_id, **kwargs):
+ """
+ Gets the details of the comparison report for the user assessments submitted for comparison.
+
+
+ :param str user_assessment_id: (required)
+ The OCID of the user assessment.
+
+ :param str comparison_user_assessment_id: (required)
+ The OCID of the baseline user assessment.
+
+ :param str opc_request_id: (optional)
+ Unique identifier for the request.
+
+ :param obj retry_strategy: (optional)
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
+
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
+ The specifics of the default retry strategy are described `here `__.
+
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
+
+ :param bool allow_control_chars: (optional)
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
+ By default, the response will not allow control characters in strings
+
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.UserAssessmentComparison`
+ :rtype: :class:`~oci.response.Response`
+
+ :example:
+ Click `here `__ to see an example of how to use get_user_assessment_comparison API.
+ """
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
+ required_arguments = ['userAssessmentId', 'comparisonUserAssessmentId']
+ resource_path = "/userAssessments/{userAssessmentId}/comparison/{comparisonUserAssessmentId}"
+ method = "GET"
+ operation_name = "get_user_assessment_comparison"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/UserAssessment/GetUserAssessmentComparison"
+
+ # Don't accept unknown kwargs
+ expected_kwargs = [
+ "allow_control_chars",
+ "retry_strategy",
+ "opc_request_id"
+ ]
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
+ if extra_kwargs:
+ raise ValueError(
+ f"get_user_assessment_comparison got unknown kwargs: {extra_kwargs!r}")
+
+ path_params = {
+ "userAssessmentId": user_assessment_id,
+ "comparisonUserAssessmentId": comparison_user_assessment_id
+ }
+
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
+
+ for (k, v) in six.iteritems(path_params):
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
+ raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
+
+ header_params = {
+ "accept": "application/json",
+ "content-type": "application/json",
+ "opc-request-id": kwargs.get("opc_request_id", missing)
+ }
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
+
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
+ operation_retry_strategy=kwargs.get('retry_strategy'),
+ client_retry_strategy=self.retry_strategy
+ )
+ if retry_strategy is None:
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
+
+ if retry_strategy:
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
+ self.base_client.add_opc_client_retries_header(header_params)
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
+ return retry_strategy.make_retrying_call(
+ self.base_client.call_api,
+ resource_path=resource_path,
+ method=method,
+ path_params=path_params,
+ header_params=header_params,
+ response_type="UserAssessmentComparison",
+ allow_control_chars=kwargs.get('allow_control_chars'),
+ operation_name=operation_name,
+ api_reference_link=api_reference_link,
+ required_arguments=required_arguments)
+ else:
+ return self.base_client.call_api(
+ resource_path=resource_path,
+ method=method,
+ path_params=path_params,
+ header_params=header_params,
+ response_type="UserAssessmentComparison",
+ allow_control_chars=kwargs.get('allow_control_chars'),
+ operation_name=operation_name,
+ api_reference_link=api_reference_link,
+ required_arguments=required_arguments)
+
+ def get_work_request(self, work_request_id, **kwargs):
+ """
+ Gets the details of the specified work request.
+
+
+ :param str work_request_id: (required)
+ The OCID of the work request.
+
+ :param str opc_request_id: (optional)
+ Unique identifier for the request.
+
+ :param obj retry_strategy: (optional)
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
+
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
+ The specifics of the default retry strategy are described `here `__.
+
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
+
+ :param bool allow_control_chars: (optional)
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
+ By default, the response will not allow control characters in strings
+
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.WorkRequest`
+ :rtype: :class:`~oci.response.Response`
+
+ :example:
+ Click `here `__ to see an example of how to use get_work_request API.
+ """
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
+ required_arguments = ['workRequestId']
+ resource_path = "/workRequests/{workRequestId}"
+ method = "GET"
+ operation_name = "get_work_request"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/WorkRequest/GetWorkRequest"
+
+ # Don't accept unknown kwargs
+ expected_kwargs = [
+ "allow_control_chars",
+ "retry_strategy",
+ "opc_request_id"
+ ]
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
+ if extra_kwargs:
+ raise ValueError(
+ f"get_work_request got unknown kwargs: {extra_kwargs!r}")
+
+ path_params = {
+ "workRequestId": work_request_id
+ }
+
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
+
+ for (k, v) in six.iteritems(path_params):
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
+ raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
+
+ header_params = {
+ "accept": "application/json",
+ "content-type": "application/json",
+ "opc-request-id": kwargs.get("opc_request_id", missing)
+ }
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
+
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
+ operation_retry_strategy=kwargs.get('retry_strategy'),
+ client_retry_strategy=self.retry_strategy
+ )
+ if retry_strategy is None:
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
+
+ if retry_strategy:
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
+ self.base_client.add_opc_client_retries_header(header_params)
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
+ return retry_strategy.make_retrying_call(
+ self.base_client.call_api,
+ resource_path=resource_path,
+ method=method,
+ path_params=path_params,
+ header_params=header_params,
+ response_type="WorkRequest",
+ allow_control_chars=kwargs.get('allow_control_chars'),
+ operation_name=operation_name,
+ api_reference_link=api_reference_link,
+ required_arguments=required_arguments)
+ else:
+ return self.base_client.call_api(
+ resource_path=resource_path,
+ method=method,
+ path_params=path_params,
+ header_params=header_params,
+ response_type="WorkRequest",
+ allow_control_chars=kwargs.get('allow_control_chars'),
+ operation_name=operation_name,
+ api_reference_link=api_reference_link,
+ required_arguments=required_arguments)
+
+ def list_alert_analytics(self, compartment_id, **kwargs):
+ """
+ Returns the aggregation details of the alerts.
+
+
+ :param str compartment_id: (required)
+ A filter to return only resources that match the specified compartment OCID.
+
+ :param bool compartment_id_in_subtree: (optional)
+ Default is false.
+ When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting.
+
+ :param int limit: (optional)
+ For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
+
+ __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
+
+ :param str page: (optional)
+ For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__.
+
+ __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
+
+ :param str opc_request_id: (optional)
+ Unique identifier for the request.
+
+ :param str if_match: (optional)
+ For optimistic concurrency control. In the PUT or DELETE call
+ for a resource, set the if-match parameter to the value of the
+ etag from a previous GET or POST response for that resource.
+ The resource will be updated or deleted only if the etag you
+ provide matches the resource's current etag value.
+
+ :param datetime time_started: (optional)
+ An optional filter to return audit events whose creation time in the database is greater than and equal to the date-time specified,
+ in the format defined by `RFC3339`__.
+
+ __ https://tools.ietf.org/html/rfc3339
+
+ :param datetime time_ended: (optional)
+ An optional filter to return audit events whose creation time in the database is less than and equal to the date-time specified,
+ in the format defined by `RFC3339`__.
+
+ __ https://tools.ietf.org/html/rfc3339
+
+ :param str query_time_zone: (optional)
+ Default time zone is UTC if no time zone provided. The date-time considerations of the resource will be in accordance with the specified time zone.
+
+ :param str sort_order: (optional)
+ The sort order to use, either ascending (ASC) or descending (DESC).
+
+ Allowed values are: "ASC", "DESC"
+
+ :param str sort_by: (optional)
+ The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. If no value is specified timeCreated is default.
+
+ Allowed values are: "displayName", "timeCreated"
+
+ :param str access_level: (optional)
+ Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED.
+ Setting this to ACCESSIBLE returns only those compartments for which the
+ user has INSPECT permissions directly or indirectly (permissions can be on a
+ resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed.
+
+ Allowed values are: "RESTRICTED", "ACCESSIBLE"
+
+ :param str scim_query: (optional)
+ The scimQuery query parameter accepts filter expressions that use the syntax described in Section 3.2.2.2
+ of the System for Cross-Domain Identity Management (SCIM) specification, which is available
+ at `RFC3339`__. In SCIM filtering expressions,
+ text, date, and time values must be enclosed in quotation marks, with date and time values using ISO-8601 format.
+ (Numeric and boolean values should not be quoted.)
+
+ **Example:** |
+ query=(timeCreated ge '2021-06-04T01-00-26') and (targetNames eq 'target_1')
+ query=(featureDetails.userName eq \"user\") and (targetNames eq \"target_1\")
+ Supported fields:
+ severity
+ status
+ alertType
+ targetIds
+ targetNames
+ operationTime
+ lifecycleState
+ displayName
+ timeCreated
+ timeUpdated
+ featureDetails.* (* can be any field in nestedStrMap in Feature Attributes in Alert Summary. For example -
+ userName,object,clientHostname,osUserName,clientIPs,clientId,commandText,commandParam,clientProgram,objectType,targetOwner)
+
+ __ https://tools.ietf.org/html/draft-ietf-scim-api-12
+
+ :param list[str] summary_field: (optional)
+ Specifies a subset of summarized fields to be returned in the response.
+
+ Allowed values are: "alertType", "targetIds", "targetNames", "alertSeverity", "alertStatus", "timeCreated", "policyId", "open", "closed", "critical", "high", "medium", "low", "alertcount"
+
+ :param list[str] group_by: (optional)
+ A groupBy can only be used in combination with summaryField parameter.
+ A groupBy value has to be a subset of the values mentioned in summaryField parameter.
+
+ Allowed values are: "alertType", "targetIds", "targetNames", "alertSeverity", "alertStatus", "timeCreated", "policyId"
+
+ :param str opc_retry_token: (optional)
+ A token that uniquely identifies a request so it can be retried in case of a timeout or
+ server error without risk of executing that same action again. Retry tokens expire after 24
+ hours, but can be invalidated before then due to conflicting operations. For example, if a resource
+ has been deleted and purged from the system, then a retry of the original creation request might be rejected.
+
+ :param obj retry_strategy: (optional)
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
+
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
+ The specifics of the default retry strategy are described `here `__.
+
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
+
+ :param bool allow_control_chars: (optional)
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
+ By default, the response will not allow control characters in strings
+
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.AlertAnalyticsCollection`
+ :rtype: :class:`~oci.response.Response`
+
+ :example:
+ Click `here `__ to see an example of how to use list_alert_analytics API.
+ """
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
+ required_arguments = ['compartmentId']
+ resource_path = "/alertAnalytics"
+ method = "GET"
+ operation_name = "list_alert_analytics"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/AlertSummary/ListAlertAnalytics"
+
+ # Don't accept unknown kwargs
+ expected_kwargs = [
+ "allow_control_chars",
+ "retry_strategy",
+ "compartment_id_in_subtree",
+ "limit",
+ "page",
+ "opc_request_id",
+ "if_match",
+ "time_started",
+ "time_ended",
+ "query_time_zone",
+ "sort_order",
+ "sort_by",
+ "access_level",
+ "scim_query",
+ "summary_field",
+ "group_by",
+ "opc_retry_token"
+ ]
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
+ if extra_kwargs:
+ raise ValueError(
+ f"list_alert_analytics got unknown kwargs: {extra_kwargs!r}")
+
+ if 'sort_order' in kwargs:
+ sort_order_allowed_values = ["ASC", "DESC"]
+ if kwargs['sort_order'] not in sort_order_allowed_values:
+ raise ValueError(
+ f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }"
+ )
+
+ if 'sort_by' in kwargs:
+ sort_by_allowed_values = ["displayName", "timeCreated"]
+ if kwargs['sort_by'] not in sort_by_allowed_values:
+ raise ValueError(
+ f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
+ )
+
+ if 'access_level' in kwargs:
+ access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"]
+ if kwargs['access_level'] not in access_level_allowed_values:
+ raise ValueError(
+ f"Invalid value for `access_level`, must be one of { access_level_allowed_values }"
+ )
+
+ if 'summary_field' in kwargs:
+ summary_field_allowed_values = ["alertType", "targetIds", "targetNames", "alertSeverity", "alertStatus", "timeCreated", "policyId", "open", "closed", "critical", "high", "medium", "low", "alertcount"]
+ for summary_field_item in kwargs['summary_field']:
+ if summary_field_item not in summary_field_allowed_values:
+ raise ValueError(
+ f"Invalid value for `summary_field`, must be one of { summary_field_allowed_values }"
+ )
+
+ if 'group_by' in kwargs:
+ group_by_allowed_values = ["alertType", "targetIds", "targetNames", "alertSeverity", "alertStatus", "timeCreated", "policyId"]
+ for group_by_item in kwargs['group_by']:
+ if group_by_item not in group_by_allowed_values:
+ raise ValueError(
+ f"Invalid value for `group_by`, must be one of { group_by_allowed_values }"
+ )
+
+ query_params = {
+ "compartmentId": compartment_id,
+ "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing),
+ "limit": kwargs.get("limit", missing),
+ "page": kwargs.get("page", missing),
+ "timeStarted": kwargs.get("time_started", missing),
+ "timeEnded": kwargs.get("time_ended", missing),
+ "queryTimeZone": kwargs.get("query_time_zone", missing),
+ "sortOrder": kwargs.get("sort_order", missing),
+ "sortBy": kwargs.get("sort_by", missing),
+ "accessLevel": kwargs.get("access_level", missing),
+ "scimQuery": kwargs.get("scim_query", missing),
+ "summaryField": self.base_client.generate_collection_format_param(kwargs.get("summary_field", missing), 'multi'),
+ "groupBy": self.base_client.generate_collection_format_param(kwargs.get("group_by", missing), 'multi')
+ }
+ query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
+
+ header_params = {
+ "accept": "application/json",
+ "content-type": "application/json",
+ "opc-request-id": kwargs.get("opc_request_id", missing),
+ "if-match": kwargs.get("if_match", missing),
+ "opc-retry-token": kwargs.get("opc_retry_token", missing)
+ }
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
+
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
+ operation_retry_strategy=kwargs.get('retry_strategy'),
+ client_retry_strategy=self.retry_strategy
+ )
+ if retry_strategy is None:
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
+
+ if retry_strategy:
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
+ self.base_client.add_opc_retry_token_if_needed(header_params)
+ self.base_client.add_opc_client_retries_header(header_params)
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
+ return retry_strategy.make_retrying_call(
+ self.base_client.call_api,
+ resource_path=resource_path,
+ method=method,
+ query_params=query_params,
+ header_params=header_params,
+ response_type="AlertAnalyticsCollection",
+ allow_control_chars=kwargs.get('allow_control_chars'),
+ operation_name=operation_name,
+ api_reference_link=api_reference_link,
+ required_arguments=required_arguments)
+ else:
+ return self.base_client.call_api(
+ resource_path=resource_path,
+ method=method,
+ query_params=query_params,
+ header_params=header_params,
+ response_type="AlertAnalyticsCollection",
+ allow_control_chars=kwargs.get('allow_control_chars'),
+ operation_name=operation_name,
+ api_reference_link=api_reference_link,
+ required_arguments=required_arguments)
+
+ def list_alert_policies(self, compartment_id, **kwargs):
+ """
+ Gets a list of all alert policies.
+
+
+ :param str compartment_id: (required)
+ A filter to return only resources that match the specified compartment OCID.
+
+ :param str alert_policy_id: (optional)
+ A filter to return policy by it's OCID.
+
+ :param str type: (optional)
+ An optional filter to return only alert policies of a certain type.
+
+ Allowed values are: "AUDITING", "SECURITY_ASSESSMENT", "USER_ASSESSMENT"
+
+ :param bool is_user_defined: (optional)
+ An optional filter to return only alert policies that are user-defined or not.
+
+ :param str display_name: (optional)
+ A filter to return only resources that match the specified display name.
+
+ :param str lifecycle_state: (optional)
+ An optional filter to return only alert policies that have the given life-cycle state.
+
+ Allowed values are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED"
+
+ :param int limit: (optional)
+ For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
+
+ __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
+
+ :param str page: (optional)
+ For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__.
+
+ __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
+
+ :param str sort_order: (optional)
+ The sort order to use, either ascending (ASC) or descending (DESC).
+
+ Allowed values are: "ASC", "DESC"
+
+ :param str sort_by: (optional)
+ The field to sort by. Only one sort parameter may be provided.
+
+ Allowed values are: "displayName", "timeCreated"
+
+ :param str opc_request_id: (optional)
+ Unique identifier for the request.
+
+ :param datetime time_created_greater_than_or_equal_to: (optional)
+ A filter to return only the resources that were created after the specified date and time, as defined by `RFC3339`__.
+ Using TimeCreatedGreaterThanOrEqualToQueryParam parameter retrieves all resources created after that date.
+
+ **Example:** 2016-12-19T16:39:57.600Z
+
+ __ https://tools.ietf.org/html/rfc3339
+
+ :param datetime time_created_less_than: (optional)
+ Search for resources that were created before a specific date.
+ Specifying this parameter corresponding `timeCreatedLessThan`
+ parameter will retrieve all resources created before the
+ specified created date, in \"YYYY-MM-ddThh:mmZ\" format with a Z offset, as
+ defined by RFC 3339.
+
+ **Example:** 2016-12-19T16:39:57.600Z
+
+ :param bool compartment_id_in_subtree: (optional)
+ Default is false.
+ When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting.
+
+ :param str access_level: (optional)
+ Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED.
+ Setting this to ACCESSIBLE returns only those compartments for which the
+ user has INSPECT permissions directly or indirectly (permissions can be on a
+ resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed.
+
+ Allowed values are: "RESTRICTED", "ACCESSIBLE"
+
+ :param obj retry_strategy: (optional)
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
+
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
+ The specifics of the default retry strategy are described `here `__.
+
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
+
+ :param bool allow_control_chars: (optional)
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
+ By default, the response will not allow control characters in strings
+
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.AlertPolicyCollection`
+ :rtype: :class:`~oci.response.Response`
+
+ :example:
+ Click `here `__ to see an example of how to use list_alert_policies API.
+ """
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
+ required_arguments = ['compartmentId']
+ resource_path = "/alertPolicies"
+ method = "GET"
+ operation_name = "list_alert_policies"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/AlertPolicy/ListAlertPolicies"
+
+ # Don't accept unknown kwargs
+ expected_kwargs = [
+ "allow_control_chars",
+ "retry_strategy",
+ "alert_policy_id",
+ "type",
+ "is_user_defined",
+ "display_name",
+ "lifecycle_state",
+ "limit",
+ "page",
+ "sort_order",
+ "sort_by",
+ "opc_request_id",
+ "time_created_greater_than_or_equal_to",
+ "time_created_less_than",
+ "compartment_id_in_subtree",
+ "access_level"
+ ]
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
+ if extra_kwargs:
+ raise ValueError(
+ f"list_alert_policies got unknown kwargs: {extra_kwargs!r}")
+
+ if 'type' in kwargs:
+ type_allowed_values = ["AUDITING", "SECURITY_ASSESSMENT", "USER_ASSESSMENT"]
+ if kwargs['type'] not in type_allowed_values:
+ raise ValueError(
+ f"Invalid value for `type`, must be one of { type_allowed_values }"
+ )
+
+ if 'lifecycle_state' in kwargs:
+ lifecycle_state_allowed_values = ["CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED"]
+ if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values:
+ raise ValueError(
+ f"Invalid value for `lifecycle_state`, must be one of { lifecycle_state_allowed_values }"
+ )
+
+ if 'sort_order' in kwargs:
+ sort_order_allowed_values = ["ASC", "DESC"]
+ if kwargs['sort_order'] not in sort_order_allowed_values:
+ raise ValueError(
+ f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }"
+ )
+
+ if 'sort_by' in kwargs:
+ sort_by_allowed_values = ["displayName", "timeCreated"]
+ if kwargs['sort_by'] not in sort_by_allowed_values:
+ raise ValueError(
+ f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
+ )
+
+ if 'access_level' in kwargs:
+ access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"]
+ if kwargs['access_level'] not in access_level_allowed_values:
+ raise ValueError(
+ f"Invalid value for `access_level`, must be one of { access_level_allowed_values }"
+ )
+
+ query_params = {
+ "alertPolicyId": kwargs.get("alert_policy_id", missing),
+ "type": kwargs.get("type", missing),
+ "isUserDefined": kwargs.get("is_user_defined", missing),
+ "displayName": kwargs.get("display_name", missing),
+ "compartmentId": compartment_id,
+ "lifecycleState": kwargs.get("lifecycle_state", missing),
+ "limit": kwargs.get("limit", missing),
+ "page": kwargs.get("page", missing),
+ "sortOrder": kwargs.get("sort_order", missing),
+ "sortBy": kwargs.get("sort_by", missing),
+ "timeCreatedGreaterThanOrEqualTo": kwargs.get("time_created_greater_than_or_equal_to", missing),
+ "timeCreatedLessThan": kwargs.get("time_created_less_than", missing),
+ "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing),
+ "accessLevel": kwargs.get("access_level", missing)
+ }
+ query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
+
+ header_params = {
+ "accept": "application/json",
+ "content-type": "application/json",
+ "opc-request-id": kwargs.get("opc_request_id", missing)
+ }
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
+
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
+ operation_retry_strategy=kwargs.get('retry_strategy'),
+ client_retry_strategy=self.retry_strategy
+ )
+ if retry_strategy is None:
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
+
+ if retry_strategy:
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
+ self.base_client.add_opc_client_retries_header(header_params)
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
+ return retry_strategy.make_retrying_call(
+ self.base_client.call_api,
+ resource_path=resource_path,
+ method=method,
+ query_params=query_params,
+ header_params=header_params,
+ response_type="AlertPolicyCollection",
+ allow_control_chars=kwargs.get('allow_control_chars'),
+ operation_name=operation_name,
+ api_reference_link=api_reference_link,
+ required_arguments=required_arguments)
+ else:
+ return self.base_client.call_api(
+ resource_path=resource_path,
+ method=method,
+ query_params=query_params,
+ header_params=header_params,
+ response_type="AlertPolicyCollection",
+ allow_control_chars=kwargs.get('allow_control_chars'),
+ operation_name=operation_name,
+ api_reference_link=api_reference_link,
+ required_arguments=required_arguments)
+
+ def list_alert_policy_rules(self, alert_policy_id, **kwargs):
+ """
+ Lists the rules of the specified alert policy. The alert policy is said to be satisfied when all rules in the policy evaulate to true.
+ If there are three rules: rule1,rule2 and rule3, the policy is satisfied if rule1 AND rule2 AND rule3 is True.
+
+
+ :param str alert_policy_id: (required)
+ The OCID of the alert policy.
+
+ :param str opc_request_id: (optional)
+ Unique identifier for the request.
+
+ :param int limit: (optional)
+ For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
+
+ __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
+
+ :param str page: (optional)
+ For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__.
+
+ __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
+
+ :param obj retry_strategy: (optional)
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
+
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
+ The specifics of the default retry strategy are described `here `__.
+
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
+
+ :param bool allow_control_chars: (optional)
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
+ By default, the response will not allow control characters in strings
+
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.AlertPolicyRuleCollection`
+ :rtype: :class:`~oci.response.Response`
+
+ :example:
+ Click `here `__ to see an example of how to use list_alert_policy_rules API.
+ """
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
+ required_arguments = ['alertPolicyId']
+ resource_path = "/alertPolicies/{alertPolicyId}/rules"
+ method = "GET"
+ operation_name = "list_alert_policy_rules"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/AlertPolicy/ListAlertPolicyRules"
+
+ # Don't accept unknown kwargs
+ expected_kwargs = [
+ "allow_control_chars",
+ "retry_strategy",
+ "opc_request_id",
+ "limit",
+ "page"
+ ]
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
+ if extra_kwargs:
+ raise ValueError(
+ f"list_alert_policy_rules got unknown kwargs: {extra_kwargs!r}")
+
+ path_params = {
+ "alertPolicyId": alert_policy_id
+ }
+
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
+
+ for (k, v) in six.iteritems(path_params):
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
+ raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
+
+ query_params = {
+ "limit": kwargs.get("limit", missing),
+ "page": kwargs.get("page", missing)
+ }
+ query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
+
+ header_params = {
+ "accept": "application/json",
+ "content-type": "application/json",
+ "opc-request-id": kwargs.get("opc_request_id", missing)
+ }
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
+
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
+ operation_retry_strategy=kwargs.get('retry_strategy'),
+ client_retry_strategy=self.retry_strategy
+ )
+ if retry_strategy is None:
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
+
+ if retry_strategy:
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
+ self.base_client.add_opc_client_retries_header(header_params)
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
+ return retry_strategy.make_retrying_call(
+ self.base_client.call_api,
+ resource_path=resource_path,
+ method=method,
+ path_params=path_params,
+ query_params=query_params,
+ header_params=header_params,
+ response_type="AlertPolicyRuleCollection",
+ allow_control_chars=kwargs.get('allow_control_chars'),
+ operation_name=operation_name,
+ api_reference_link=api_reference_link,
+ required_arguments=required_arguments)
+ else:
+ return self.base_client.call_api(
+ resource_path=resource_path,
+ method=method,
+ path_params=path_params,
+ query_params=query_params,
+ header_params=header_params,
+ response_type="AlertPolicyRuleCollection",
+ allow_control_chars=kwargs.get('allow_control_chars'),
+ operation_name=operation_name,
+ api_reference_link=api_reference_link,
+ required_arguments=required_arguments)
+
+ def list_alerts(self, compartment_id, **kwargs):
+ """
+ Gets a list of all alerts.
+
+
+ :param str compartment_id: (required)
+ A filter to return only resources that match the specified compartment OCID.
+
+ :param str id: (optional)
+ A filter to return alert by it's OCID.
+
+ :param bool compartment_id_in_subtree: (optional)
+ Default is false.
+ When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting.
+
+ :param int limit: (optional)
+ For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
+
+ __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
+
+ :param str page: (optional)
+ For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__.
+
+ __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
+
+ :param str opc_request_id: (optional)
+ Unique identifier for the request.
+
+ :param str access_level: (optional)
+ Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED.
+ Setting this to ACCESSIBLE returns only those compartments for which the
+ user has INSPECT permissions directly or indirectly (permissions can be on a
+ resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed.
+
+ Allowed values are: "RESTRICTED", "ACCESSIBLE"
+
+ :param str sort_order: (optional)
+ The sort order to use, either ascending (ASC) or descending (DESC).
+
+ Allowed values are: "ASC", "DESC"
+
+ :param str sort_by: (optional)
+ The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. If no value is specified timeCreated is default.
+
+ Allowed values are: "displayName", "timeCreated"
+
+ :param str scim_query: (optional)
+ The scimQuery query parameter accepts filter expressions that use the syntax described in Section 3.2.2.2
+ of the System for Cross-Domain Identity Management (SCIM) specification, which is available
+ at `RFC3339`__. In SCIM filtering expressions,
+ text, date, and time values must be enclosed in quotation marks, with date and time values using ISO-8601 format.
+ (Numeric and boolean values should not be quoted.)
+
+ **Example:** |
+ query=(timeCreated ge '2021-06-04T01-00-26') and (targetNames eq 'target_1')
+ query=(featureDetails.userName eq \"user\") and (targetNames eq \"target_1\")
+ Supported fields:
+ severity
+ status
+ alertType
+ targetIds
+ targetNames
+ operationTime
+ lifecycleState
+ displayName
+ timeCreated
+ timeUpdated
+ featureDetails.* (* can be any field in nestedStrMap in Feature Attributes in Alert Summary. For example -
+ userName,object,clientHostname,osUserName,clientIPs,clientId,commandText,commandParam,clientProgram,objectType,targetOwner)
+
+ __ https://tools.ietf.org/html/draft-ietf-scim-api-12
+
+ :param list[str] field: (optional)
+ Specifies a subset of fields to be returned in the response.
+
+ Allowed values are: "id", "displayName", "alertType", "targetIds", "targetNames", "severity", "status", "operationTime", "operation", "operationStatus", "timeCreated", "timeUpdated", "policyId", "lifecycleState"
+
+ :param obj retry_strategy: (optional)
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
+
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
+ The specifics of the default retry strategy are described `here `__.
+
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
+
+ :param bool allow_control_chars: (optional)
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
+ By default, the response will not allow control characters in strings
+
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.AlertCollection`
+ :rtype: :class:`~oci.response.Response`
+
+ :example:
+ Click `here `__ to see an example of how to use list_alerts API.
+ """
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
+ required_arguments = ['compartmentId']
+ resource_path = "/alerts"
+ method = "GET"
+ operation_name = "list_alerts"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/AlertSummary/ListAlerts"
+
+ # Don't accept unknown kwargs
+ expected_kwargs = [
+ "allow_control_chars",
+ "retry_strategy",
+ "id",
+ "compartment_id_in_subtree",
+ "limit",
+ "page",
+ "opc_request_id",
+ "access_level",
+ "sort_order",
+ "sort_by",
+ "scim_query",
+ "field"
+ ]
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
+ if extra_kwargs:
+ raise ValueError(
+ f"list_alerts got unknown kwargs: {extra_kwargs!r}")
+
+ if 'access_level' in kwargs:
+ access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"]
+ if kwargs['access_level'] not in access_level_allowed_values:
+ raise ValueError(
+ f"Invalid value for `access_level`, must be one of { access_level_allowed_values }"
+ )
+
+ if 'sort_order' in kwargs:
+ sort_order_allowed_values = ["ASC", "DESC"]
+ if kwargs['sort_order'] not in sort_order_allowed_values:
+ raise ValueError(
+ f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }"
+ )
+
+ if 'sort_by' in kwargs:
+ sort_by_allowed_values = ["displayName", "timeCreated"]
+ if kwargs['sort_by'] not in sort_by_allowed_values:
+ raise ValueError(
+ f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
+ )
+
+ if 'field' in kwargs:
+ field_allowed_values = ["id", "displayName", "alertType", "targetIds", "targetNames", "severity", "status", "operationTime", "operation", "operationStatus", "timeCreated", "timeUpdated", "policyId", "lifecycleState"]
+ for field_item in kwargs['field']:
+ if field_item not in field_allowed_values:
+ raise ValueError(
+ f"Invalid value for `field`, must be one of { field_allowed_values }"
+ )
+
+ query_params = {
+ "id": kwargs.get("id", missing),
+ "compartmentId": compartment_id,
+ "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing),
+ "limit": kwargs.get("limit", missing),
+ "page": kwargs.get("page", missing),
+ "accessLevel": kwargs.get("access_level", missing),
+ "sortOrder": kwargs.get("sort_order", missing),
+ "sortBy": kwargs.get("sort_by", missing),
+ "scimQuery": kwargs.get("scim_query", missing),
+ "field": self.base_client.generate_collection_format_param(kwargs.get("field", missing), 'multi')
+ }
+ query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
+
+ header_params = {
+ "accept": "application/json",
+ "content-type": "application/json",
+ "opc-request-id": kwargs.get("opc_request_id", missing)
+ }
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
+
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
+ operation_retry_strategy=kwargs.get('retry_strategy'),
+ client_retry_strategy=self.retry_strategy
+ )
+ if retry_strategy is None:
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
+
+ if retry_strategy:
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
+ self.base_client.add_opc_client_retries_header(header_params)
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
+ return retry_strategy.make_retrying_call(
+ self.base_client.call_api,
+ resource_path=resource_path,
+ method=method,
+ query_params=query_params,
+ header_params=header_params,
+ response_type="AlertCollection",
+ allow_control_chars=kwargs.get('allow_control_chars'),
+ operation_name=operation_name,
+ api_reference_link=api_reference_link,
+ required_arguments=required_arguments)
+ else:
+ return self.base_client.call_api(
+ resource_path=resource_path,
+ method=method,
+ query_params=query_params,
+ header_params=header_params,
+ response_type="AlertCollection",
+ allow_control_chars=kwargs.get('allow_control_chars'),
+ operation_name=operation_name,
+ api_reference_link=api_reference_link,
+ required_arguments=required_arguments)
+
+ def list_audit_archive_retrievals(self, compartment_id, **kwargs):
+ """
+ Returns the list of audit archive retrieval.
+
+
+ :param str compartment_id: (required)
+ A filter to return only resources that match the specified compartment OCID.
+
+ :param str display_name: (optional)
+ A filter to return only resources that match the specified display name.
+
+ :param bool compartment_id_in_subtree: (optional)
+ Default is false.
+ When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting.
+
+ :param str access_level: (optional)
+ Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED.
+ Setting this to ACCESSIBLE returns only those compartments for which the
+ user has INSPECT permissions directly or indirectly (permissions can be on a
+ resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed.
+
+ Allowed values are: "RESTRICTED", "ACCESSIBLE"
+
+ :param str audit_archive_retrieval_id: (optional)
+ OCID of the archive retrieval.
+
+ :param str target_id: (optional)
+ The OCID of the target associated with the archive retrieval.
+
+ :param int limit: (optional)
+ For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
+
+ __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
+
+ :param str page: (optional)
+ For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__.
+
+ __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
+
+ :param str lifecycle_state: (optional)
+ A filter to return only resources that matches the specified lifecycle state.
+
+ Allowed values are: "CREATING", "ACTIVE", "NEEDS_ATTENTION", "FAILED", "DELETING", "DELETED", "UPDATING"
+
+ :param datetime time_of_expiry: (optional)
+ The date time when retrieved archive data will be deleted from Data Safe and unloaded back into archival.
+
+ :param str sort_order: (optional)
+ The sort order to use, either ascending (ASC) or descending (DESC).
+
+ Allowed values are: "ASC", "DESC"
+
+ :param str sort_by: (optional)
+ The field used for sorting. Only one sorting order (sortOrder) can be specified.
+ The default order for TIMECREATED is descending. The default order for DISPLAYNAME is ascending.
+ The DISPLAYNAME sort order is case sensitive.
+
+ Allowed values are: "TIMECREATED", "DISPLAYNAME"
+
+ :param str opc_request_id: (optional)
+ Unique identifier for the request.
+
+ :param obj retry_strategy: (optional)
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
+
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
+ The specifics of the default retry strategy are described `here `__.
+
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
+
+ :param bool allow_control_chars: (optional)
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
+ By default, the response will not allow control characters in strings
+
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.AuditArchiveRetrievalCollection`
+ :rtype: :class:`~oci.response.Response`
+
+ :example:
+ Click `here `__ to see an example of how to use list_audit_archive_retrievals API.
+ """
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
+ required_arguments = ['compartmentId']
+ resource_path = "/auditArchiveRetrievals"
+ method = "GET"
+ operation_name = "list_audit_archive_retrievals"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/AuditArchiveRetrieval/ListAuditArchiveRetrievals"
+
+ # Don't accept unknown kwargs
+ expected_kwargs = [
+ "allow_control_chars",
+ "retry_strategy",
+ "display_name",
+ "compartment_id_in_subtree",
+ "access_level",
+ "audit_archive_retrieval_id",
+ "target_id",
+ "limit",
+ "page",
+ "lifecycle_state",
+ "time_of_expiry",
+ "sort_order",
+ "sort_by",
+ "opc_request_id"
+ ]
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
+ if extra_kwargs:
+ raise ValueError(
+ f"list_audit_archive_retrievals got unknown kwargs: {extra_kwargs!r}")
+
+ if 'access_level' in kwargs:
+ access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"]
+ if kwargs['access_level'] not in access_level_allowed_values:
+ raise ValueError(
+ f"Invalid value for `access_level`, must be one of { access_level_allowed_values }"
+ )
+
+ if 'lifecycle_state' in kwargs:
+ lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "NEEDS_ATTENTION", "FAILED", "DELETING", "DELETED", "UPDATING"]
+ if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values:
+ raise ValueError(
+ f"Invalid value for `lifecycle_state`, must be one of { lifecycle_state_allowed_values }"
+ )
+
+ if 'sort_order' in kwargs:
+ sort_order_allowed_values = ["ASC", "DESC"]
+ if kwargs['sort_order'] not in sort_order_allowed_values:
+ raise ValueError(
+ f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }"
+ )
+
+ if 'sort_by' in kwargs:
+ sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"]
+ if kwargs['sort_by'] not in sort_by_allowed_values:
+ raise ValueError(
+ f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
+ )
+
+ query_params = {
+ "displayName": kwargs.get("display_name", missing),
+ "compartmentId": compartment_id,
+ "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing),
+ "accessLevel": kwargs.get("access_level", missing),
+ "auditArchiveRetrievalId": kwargs.get("audit_archive_retrieval_id", missing),
+ "targetId": kwargs.get("target_id", missing),
+ "limit": kwargs.get("limit", missing),
+ "page": kwargs.get("page", missing),
+ "lifecycleState": kwargs.get("lifecycle_state", missing),
+ "timeOfExpiry": kwargs.get("time_of_expiry", missing),
+ "sortOrder": kwargs.get("sort_order", missing),
+ "sortBy": kwargs.get("sort_by", missing)
+ }
+ query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
+
+ header_params = {
+ "accept": "application/json",
+ "content-type": "application/json",
+ "opc-request-id": kwargs.get("opc_request_id", missing)
+ }
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
+
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
+ operation_retry_strategy=kwargs.get('retry_strategy'),
+ client_retry_strategy=self.retry_strategy
+ )
+ if retry_strategy is None:
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
+
+ if retry_strategy:
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
+ self.base_client.add_opc_client_retries_header(header_params)
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
+ return retry_strategy.make_retrying_call(
+ self.base_client.call_api,
+ resource_path=resource_path,
+ method=method,
+ query_params=query_params,
+ header_params=header_params,
+ response_type="AuditArchiveRetrievalCollection",
+ allow_control_chars=kwargs.get('allow_control_chars'),
+ operation_name=operation_name,
+ api_reference_link=api_reference_link,
+ required_arguments=required_arguments)
+ else:
+ return self.base_client.call_api(
+ resource_path=resource_path,
+ method=method,
+ query_params=query_params,
+ header_params=header_params,
+ response_type="AuditArchiveRetrievalCollection",
+ allow_control_chars=kwargs.get('allow_control_chars'),
+ operation_name=operation_name,
+ api_reference_link=api_reference_link,
+ required_arguments=required_arguments)
+
+ def list_audit_event_analytics(self, compartment_id, **kwargs):
+ """
+ By default the ListAuditEventAnalytics operation will return all of the summary columns. To filter for a specific summary column, specify
+ it in the `summaryField` query parameter.
+
+ **Example:**
+ /ListAuditEventAnalytics?summaryField=targetName&summaryField=userName&summaryField=clientHostname
+ &summaryField=dmls&summaryField=privilegeChanges&summaryField=ddls&summaryField=loginFailure&summaryField=loginSuccess
+ &summaryField=allRecord&q=(auditEventTime ge \"2021-06-13T23:49:14\")
+
+ /ListAuditEventAnalytics?timeStarted=2022-08-18T11:02:26.000Z&timeEnded=2022-08-24T11:02:26.000Z
+ This will give number of events grouped by periods. Period can be 1 day, 1 week, etc.
+
+ /ListAuditEventAnalytics?summaryField=targetName&groupBy=targetName
+ This will give the number of events group by targetName. Only targetName summary column would be returned.
+
+
+ :param str compartment_id: (required)
+ A filter to return only resources that match the specified compartment OCID.
+
+ :param str opc_request_id: (optional)
+ Unique identifier for the request.
+
+ :param str if_match: (optional)
+ For optimistic concurrency control. In the PUT or DELETE call
+ for a resource, set the if-match parameter to the value of the
+ etag from a previous GET or POST response for that resource.
+ The resource will be updated or deleted only if the etag you
+ provide matches the resource's current etag value.
+
+ :param int limit: (optional)
+ For details about how pagination works, see `List Pagination`__.
+
+ __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
+
+ :param str page: (optional)
+ It is usually retrieved from a previous \"List\" call. For details about how pagination works,
+ see `List Pagination`__.
+
+ __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
+
+ :param bool compartment_id_in_subtree: (optional)
+ Default is false.
+ When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting.
+
+ :param str access_level: (optional)
+ Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED.
+ Setting this to ACCESSIBLE returns only those compartments for which the
+ user has INSPECT permissions directly or indirectly (permissions can be on a
+ resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed.
+
+ Allowed values are: "RESTRICTED", "ACCESSIBLE"
+
+ :param str scim_query: (optional)
+ The scimQuery query parameter accepts filter expressions that use the syntax described in Section 3.2.2.2
+ of the System for Cross-Domain Identity Management (SCIM) specification, which is available
+ at `RFC3339`__. In SCIM filtering expressions,
+ text, date, and time values must be enclosed in quotation marks, with date and time values using ISO-8601 format.
+ (Numeric and boolean values should not be quoted.)
+
+ **Example:** query=(operationTime ge '2021-06-04T01-00-26') and (eventName eq 'LOGON')
+
+ __ https://tools.ietf.org/html/draft-ietf-scim-api-12
+
+ :param list[str] summary_field: (optional)
+ Specifies a subset of summarized fields to be returned in the response.
+
+ Allowed values are: "auditEventTime", "dbUserName", "targetId", "targetName", "targetClass", "objectType", "clientHostname", "clientProgram", "clientId", "auditType", "eventName", "allRecord", "auditSettingsChange", "dbSchemaChange", "entitlementChange", "loginFailure", "loginSuccess", "allViolations", "realmViolations", "ruleViolations", "dvconfigActivities", "ddls", "dmls", "privilegeChanges", "auditSettingsEnables", "auditSettingsDisables", "selects", "creates", "alters", "drops", "grants", "revokes"
+
+ :param datetime time_started: (optional)
+ An optional filter to return audit events whose creation time in the database is greater than and equal to the date-time specified,
+ in the format defined by `RFC3339`__.
+
+ __ https://tools.ietf.org/html/rfc3339
+
+ :param datetime time_ended: (optional)
+ An optional filter to return audit events whose creation time in the database is less than and equal to the date-time specified,
+ in the format defined by `RFC3339`__.
+
+ __ https://tools.ietf.org/html/rfc3339
+
+ :param str query_time_zone: (optional)
+ Default time zone is UTC if no time zone provided. The date-time considerations of the resource will be in accordance with the specified time zone.
+
+ :param list[str] group_by: (optional)
+ A groupBy can only be used in combination with summaryField parameter.
+ A groupBy value has to be a subset of the values mentioned in summaryField parameter.
+
+ Allowed values are: "auditEventTime", "dbUserName", "targetId", "targetName", "targetClass", "objectType", "clientHostname", "clientProgram", "clientId", "auditType", "eventName"
+
+ :param str opc_retry_token: (optional)
+ A token that uniquely identifies a request so it can be retried in case of a timeout or
+ server error without risk of executing that same action again. Retry tokens expire after 24
+ hours, but can be invalidated before then due to conflicting operations. For example, if a resource
+ has been deleted and purged from the system, then a retry of the original creation request might be rejected.
+
+ :param str sort_order: (optional)
+ The sort order to use, either ascending (ASC) or descending (DESC).
+
+ Allowed values are: "ASC", "DESC"
+
+ :param str sort_by: (optional)
+ If this query parameter is specified, the result is ordered based on this query parameter value.
+
+ Allowed values are: "targetId", "targetClass", "targetName", "objectType", "dbUserName", "eventName", "auditEventTime", "clientHostname", "clientProgram", "clientId", "auditType"
+
+ :param obj retry_strategy: (optional)
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
+
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
+ The specifics of the default retry strategy are described `here `__.
+
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
+
+ :param bool allow_control_chars: (optional)
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
+ By default, the response will not allow control characters in strings
+
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.AuditEventAnalyticsCollection`
+ :rtype: :class:`~oci.response.Response`
+
+ :example:
+ Click `here `__ to see an example of how to use list_audit_event_analytics API.
+ """
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
+ required_arguments = ['compartmentId']
+ resource_path = "/auditEventAnalytics"
+ method = "GET"
+ operation_name = "list_audit_event_analytics"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/AuditEventSummary/ListAuditEventAnalytics"
+
+ # Don't accept unknown kwargs
+ expected_kwargs = [
+ "allow_control_chars",
+ "retry_strategy",
+ "opc_request_id",
+ "if_match",
+ "limit",
+ "page",
+ "compartment_id_in_subtree",
+ "access_level",
+ "scim_query",
+ "summary_field",
+ "time_started",
+ "time_ended",
+ "query_time_zone",
+ "group_by",
+ "opc_retry_token",
+ "sort_order",
+ "sort_by"
+ ]
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
+ if extra_kwargs:
+ raise ValueError(
+ f"list_audit_event_analytics got unknown kwargs: {extra_kwargs!r}")
+
+ if 'access_level' in kwargs:
+ access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"]
+ if kwargs['access_level'] not in access_level_allowed_values:
+ raise ValueError(
+ f"Invalid value for `access_level`, must be one of { access_level_allowed_values }"
+ )
+
+ if 'summary_field' in kwargs:
+ summary_field_allowed_values = ["auditEventTime", "dbUserName", "targetId", "targetName", "targetClass", "objectType", "clientHostname", "clientProgram", "clientId", "auditType", "eventName", "allRecord", "auditSettingsChange", "dbSchemaChange", "entitlementChange", "loginFailure", "loginSuccess", "allViolations", "realmViolations", "ruleViolations", "dvconfigActivities", "ddls", "dmls", "privilegeChanges", "auditSettingsEnables", "auditSettingsDisables", "selects", "creates", "alters", "drops", "grants", "revokes"]
+ for summary_field_item in kwargs['summary_field']:
+ if summary_field_item not in summary_field_allowed_values:
+ raise ValueError(
+ f"Invalid value for `summary_field`, must be one of { summary_field_allowed_values }"
+ )
+
+ if 'group_by' in kwargs:
+ group_by_allowed_values = ["auditEventTime", "dbUserName", "targetId", "targetName", "targetClass", "objectType", "clientHostname", "clientProgram", "clientId", "auditType", "eventName"]
+ for group_by_item in kwargs['group_by']:
+ if group_by_item not in group_by_allowed_values:
+ raise ValueError(
+ f"Invalid value for `group_by`, must be one of { group_by_allowed_values }"
+ )
+
+ if 'sort_order' in kwargs:
+ sort_order_allowed_values = ["ASC", "DESC"]
+ if kwargs['sort_order'] not in sort_order_allowed_values:
+ raise ValueError(
+ f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }"
+ )
+
+ if 'sort_by' in kwargs:
+ sort_by_allowed_values = ["targetId", "targetClass", "targetName", "objectType", "dbUserName", "eventName", "auditEventTime", "clientHostname", "clientProgram", "clientId", "auditType"]
+ if kwargs['sort_by'] not in sort_by_allowed_values:
+ raise ValueError(
+ f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
+ )
+
+ query_params = {
+ "compartmentId": compartment_id,
+ "limit": kwargs.get("limit", missing),
+ "page": kwargs.get("page", missing),
+ "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing),
+ "accessLevel": kwargs.get("access_level", missing),
+ "scimQuery": kwargs.get("scim_query", missing),
+ "summaryField": self.base_client.generate_collection_format_param(kwargs.get("summary_field", missing), 'multi'),
+ "timeStarted": kwargs.get("time_started", missing),
+ "timeEnded": kwargs.get("time_ended", missing),
+ "queryTimeZone": kwargs.get("query_time_zone", missing),
+ "groupBy": self.base_client.generate_collection_format_param(kwargs.get("group_by", missing), 'multi'),
+ "sortOrder": kwargs.get("sort_order", missing),
+ "sortBy": kwargs.get("sort_by", missing)
+ }
+ query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
+
+ header_params = {
+ "accept": "application/json",
+ "content-type": "application/json",
+ "opc-request-id": kwargs.get("opc_request_id", missing),
+ "if-match": kwargs.get("if_match", missing),
+ "opc-retry-token": kwargs.get("opc_retry_token", missing)
+ }
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
+
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
+ operation_retry_strategy=kwargs.get('retry_strategy'),
+ client_retry_strategy=self.retry_strategy
+ )
+ if retry_strategy is None:
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
+
+ if retry_strategy:
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
+ self.base_client.add_opc_retry_token_if_needed(header_params)
+ self.base_client.add_opc_client_retries_header(header_params)
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
+ return retry_strategy.make_retrying_call(
+ self.base_client.call_api,
+ resource_path=resource_path,
+ method=method,
+ query_params=query_params,
+ header_params=header_params,
+ response_type="AuditEventAnalyticsCollection",
+ allow_control_chars=kwargs.get('allow_control_chars'),
+ operation_name=operation_name,
+ api_reference_link=api_reference_link,
+ required_arguments=required_arguments)
+ else:
+ return self.base_client.call_api(
+ resource_path=resource_path,
+ method=method,
+ query_params=query_params,
+ header_params=header_params,
+ response_type="AuditEventAnalyticsCollection",
+ allow_control_chars=kwargs.get('allow_control_chars'),
+ operation_name=operation_name,
+ api_reference_link=api_reference_link,
+ required_arguments=required_arguments)
+
+ def list_audit_events(self, compartment_id, **kwargs):
+ """
+ The ListAuditEvents operation returns specified `compartmentId` audit Events only.
+ The list does not include any audit Events associated with the `subcompartments` of the specified `compartmentId`.
+
+ The parameter `accessLevel` specifies whether to return only those compartments for which the
+ requestor has INSPECT permissions on at least one resource directly
+ or indirectly (ACCESSIBLE) (the resource can be in a subcompartment) or to return Not Authorized if
+ Principal doesn't have access to even one of the child compartments. This is valid only when
+ `compartmentIdInSubtree` is set to `true`.
+
+ The parameter `compartmentIdInSubtree` applies when you perform ListAuditEvents on the
+ `compartmentId` passed and when it is set to true, the entire hierarchy of compartments can be returned.
+ To get a full list of all compartments and subcompartments in the tenancy (root compartment),
+ set the parameter `compartmentIdInSubtree` to true and `accessLevel` to ACCESSIBLE.
+
+
+ :param str compartment_id: (required)
+ A filter to return only resources that match the specified compartment OCID.
+
+ :param str opc_request_id: (optional)
+ Unique identifier for the request.
+
+ :param bool compartment_id_in_subtree: (optional)
+ Default is false.
+ When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting.
+
+ :param str access_level: (optional)
+ Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED.
+ Setting this to ACCESSIBLE returns only those compartments for which the
+ user has INSPECT permissions directly or indirectly (permissions can be on a
+ resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed.
+
+ Allowed values are: "RESTRICTED", "ACCESSIBLE"
+
+ :param int limit: (optional)
+ For details about how pagination works, see `List Pagination`__.
+
+ __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
+
+ :param str page: (optional)
+ It is usually retrieved from a previous \"List\" call. For details about how pagination works,
+ see `List Pagination`__.
+
+ __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
+
+ :param str scim_query: (optional)
+ The scimQuery query parameter accepts filter expressions that use the syntax described in Section 3.2.2.2
+ of the System for Cross-Domain Identity Management (SCIM) specification, which is available
+ at `RFC3339`__. In SCIM filtering expressions,
+ text, date, and time values must be enclosed in quotation marks, with date and time values using ISO-8601 format.
+ (Numeric and boolean values should not be quoted.)
+
+ **Example:** query=(operationTime ge '2021-06-04T01-00-26') and (eventName eq 'LOGON')
+
+ __ https://tools.ietf.org/html/draft-ietf-scim-api-12
+
+ :param str sort_order: (optional)
+ The sort order to use, either ascending (ASC) or descending (DESC).
+
+ Allowed values are: "ASC", "DESC"
+
+ :param str sort_by: (optional)
+ If this query parameter is specified, the result is sorted by this query parameter value.
+
+ Allowed values are: "dbUserName", "targetName", "databaseType", "targetClass", "auditEventTime", "timeCollected", "osUserName", "operation", "operationStatus", "eventName", "errorCode", "errorMessage", "objectType", "objectName", "objectOwner", "clientHostname", "clientIp", "isAlerted", "actionTaken", "clientProgram", "commandText", "commandParam", "extendedEventAttributes", "auditLocation", "osTerminal", "clientId", "auditPolicies", "auditType"
+
+ :param obj retry_strategy: (optional)
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
+
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
+ The specifics of the default retry strategy are described `here `__.
+
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
+
+ :param bool allow_control_chars: (optional)
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
+ By default, the response will not allow control characters in strings
+
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.AuditEventCollection`
+ :rtype: :class:`~oci.response.Response`
+
+ :example:
+ Click `here `__ to see an example of how to use list_audit_events API.
+ """
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
+ required_arguments = ['compartmentId']
+ resource_path = "/auditEvents"
+ method = "GET"
+ operation_name = "list_audit_events"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/AuditEventSummary/ListAuditEvents"
+
+ # Don't accept unknown kwargs
+ expected_kwargs = [
+ "allow_control_chars",
+ "retry_strategy",
+ "opc_request_id",
+ "compartment_id_in_subtree",
+ "access_level",
+ "limit",
+ "page",
+ "scim_query",
+ "sort_order",
+ "sort_by"
+ ]
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
+ if extra_kwargs:
+ raise ValueError(
+ f"list_audit_events got unknown kwargs: {extra_kwargs!r}")
+
+ if 'access_level' in kwargs:
+ access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"]
+ if kwargs['access_level'] not in access_level_allowed_values:
+ raise ValueError(
+ f"Invalid value for `access_level`, must be one of { access_level_allowed_values }"
+ )
+
+ if 'sort_order' in kwargs:
+ sort_order_allowed_values = ["ASC", "DESC"]
+ if kwargs['sort_order'] not in sort_order_allowed_values:
+ raise ValueError(
+ f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }"
+ )
+
+ if 'sort_by' in kwargs:
+ sort_by_allowed_values = ["dbUserName", "targetName", "databaseType", "targetClass", "auditEventTime", "timeCollected", "osUserName", "operation", "operationStatus", "eventName", "errorCode", "errorMessage", "objectType", "objectName", "objectOwner", "clientHostname", "clientIp", "isAlerted", "actionTaken", "clientProgram", "commandText", "commandParam", "extendedEventAttributes", "auditLocation", "osTerminal", "clientId", "auditPolicies", "auditType"]
+ if kwargs['sort_by'] not in sort_by_allowed_values:
+ raise ValueError(
+ f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
+ )
+
+ query_params = {
+ "compartmentId": compartment_id,
+ "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing),
+ "accessLevel": kwargs.get("access_level", missing),
+ "limit": kwargs.get("limit", missing),
+ "page": kwargs.get("page", missing),
+ "scimQuery": kwargs.get("scim_query", missing),
+ "sortOrder": kwargs.get("sort_order", missing),
+ "sortBy": kwargs.get("sort_by", missing)
+ }
+ query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
+
+ header_params = {
+ "accept": "application/json, application/xml",
+ "content-type": "application/json",
+ "opc-request-id": kwargs.get("opc_request_id", missing)
+ }
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
+
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
+ operation_retry_strategy=kwargs.get('retry_strategy'),
+ client_retry_strategy=self.retry_strategy
+ )
+ if retry_strategy is None:
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
+
+ if retry_strategy:
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
+ self.base_client.add_opc_client_retries_header(header_params)
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
+ return retry_strategy.make_retrying_call(
+ self.base_client.call_api,
+ resource_path=resource_path,
+ method=method,
+ query_params=query_params,
+ header_params=header_params,
+ response_type="AuditEventCollection",
+ allow_control_chars=kwargs.get('allow_control_chars'),
+ operation_name=operation_name,
+ api_reference_link=api_reference_link,
+ required_arguments=required_arguments)
+ else:
+ return self.base_client.call_api(
+ resource_path=resource_path,
+ method=method,
+ query_params=query_params,
+ header_params=header_params,
+ response_type="AuditEventCollection",
+ allow_control_chars=kwargs.get('allow_control_chars'),
+ operation_name=operation_name,
+ api_reference_link=api_reference_link,
+ required_arguments=required_arguments)
+
+ def list_audit_policies(self, compartment_id, **kwargs):
+ """
+ Retrieves a list of all audited targets with their corresponding provisioned audit policies, and their provisioning conditions.
+
+ The ListAuditPolicies operation returns only the audit policies in the specified `compartmentId`.
+ The list does not include any subcompartments of the compartmentId passed.
+
+ The parameter `accessLevel` specifies whether to return only those compartments for which the
+ requestor has INSPECT permissions on at least one resource directly
+ or indirectly (ACCESSIBLE) (the resource can be in a subcompartment) or to return Not Authorized if
+ Principal doesn't have access to even one of the child compartments. This is valid only when
+ `compartmentIdInSubtree` is set to `true`.
+
+ The parameter `compartmentIdInSubtree` applies when you perform ListAuditPolicies on the
+ `compartmentId` passed and when it is set to true, the entire hierarchy of compartments can be returned.
+ To get a full list of all compartments and subcompartments in the tenancy (root compartment),
+ set the parameter `compartmentIdInSubtree` to true and `accessLevel` to ACCESSIBLE.
+
+
+ :param str compartment_id: (required)
+ A filter to return only resources that match the specified compartment OCID.
+
+ :param bool compartment_id_in_subtree: (optional)
+ Default is false.
+ When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting.
+
+ :param str access_level: (optional)
+ Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED.
+ Setting this to ACCESSIBLE returns only those compartments for which the
+ user has INSPECT permissions directly or indirectly (permissions can be on a
+ resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed.
+
+ Allowed values are: "RESTRICTED", "ACCESSIBLE"
+
+ :param str display_name: (optional)
+ A filter to return only resources that match the specified display name.
+
+ :param int limit: (optional)
+ For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
+
+ __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
+
+ :param str page: (optional)
+ For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__.
+
+ __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
+
+ :param str target_id: (optional)
+ A filter to return only items related to a specific target OCID.
+
+ :param str lifecycle_state: (optional)
+ The current state of the audit policy.
+
+ Allowed values are: "CREATING", "UPDATING", "ACTIVE", "FAILED", "NEEDS_ATTENTION", "DELETING", "DELETED"
+
+ :param str audit_policy_id: (optional)
+ An optional filter to return only resources that match the specified id.
+
+ :param str sort_order: (optional)
+ The sort order to use, either ascending (ASC) or descending (DESC).
+
+ Allowed values are: "ASC", "DESC"
+
+ :param str sort_by: (optional)
+ The field used for sorting. Only one sorting order (sortOrder) can be specified.
+ The default order for TIMECREATED is descending. The default order for DISPLAYNAME is ascending.
+ The DISPLAYNAME sort order is case sensitive.
+
+ Allowed values are: "TIMECREATED", "DISPLAYNAME"
+
+ :param str opc_request_id: (optional)
+ Unique identifier for the request.
+
+ :param obj retry_strategy: (optional)
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
+
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
+ The specifics of the default retry strategy are described `here `__.
+
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
+
+ :param bool allow_control_chars: (optional)
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
+ By default, the response will not allow control characters in strings
+
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.AuditPolicyCollection`
+ :rtype: :class:`~oci.response.Response`
+
+ :example:
+ Click `here `__ to see an example of how to use list_audit_policies API.
+ """
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
+ required_arguments = ['compartmentId']
+ resource_path = "/auditPolicies"
+ method = "GET"
+ operation_name = "list_audit_policies"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/AuditPolicyCollection/ListAuditPolicies"
+
+ # Don't accept unknown kwargs
+ expected_kwargs = [
+ "allow_control_chars",
+ "retry_strategy",
+ "compartment_id_in_subtree",
+ "access_level",
+ "display_name",
+ "limit",
+ "page",
+ "target_id",
+ "lifecycle_state",
+ "audit_policy_id",
+ "sort_order",
+ "sort_by",
+ "opc_request_id"
+ ]
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
+ if extra_kwargs:
+ raise ValueError(
+ f"list_audit_policies got unknown kwargs: {extra_kwargs!r}")
+
+ if 'access_level' in kwargs:
+ access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"]
+ if kwargs['access_level'] not in access_level_allowed_values:
+ raise ValueError(
+ f"Invalid value for `access_level`, must be one of { access_level_allowed_values }"
+ )
+
+ if 'lifecycle_state' in kwargs:
+ lifecycle_state_allowed_values = ["CREATING", "UPDATING", "ACTIVE", "FAILED", "NEEDS_ATTENTION", "DELETING", "DELETED"]
+ if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values:
+ raise ValueError(
+ f"Invalid value for `lifecycle_state`, must be one of { lifecycle_state_allowed_values }"
+ )
+
+ if 'sort_order' in kwargs:
+ sort_order_allowed_values = ["ASC", "DESC"]
+ if kwargs['sort_order'] not in sort_order_allowed_values:
+ raise ValueError(
+ f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }"
+ )
+
+ if 'sort_by' in kwargs:
+ sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"]
+ if kwargs['sort_by'] not in sort_by_allowed_values:
+ raise ValueError(
+ f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
+ )
+
+ query_params = {
+ "compartmentId": compartment_id,
+ "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing),
+ "accessLevel": kwargs.get("access_level", missing),
+ "displayName": kwargs.get("display_name", missing),
+ "limit": kwargs.get("limit", missing),
+ "page": kwargs.get("page", missing),
+ "targetId": kwargs.get("target_id", missing),
+ "lifecycleState": kwargs.get("lifecycle_state", missing),
+ "auditPolicyId": kwargs.get("audit_policy_id", missing),
+ "sortOrder": kwargs.get("sort_order", missing),
+ "sortBy": kwargs.get("sort_by", missing)
+ }
+ query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
+
+ header_params = {
+ "accept": "application/json",
+ "content-type": "application/json",
+ "opc-request-id": kwargs.get("opc_request_id", missing)
+ }
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
+
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
+ operation_retry_strategy=kwargs.get('retry_strategy'),
+ client_retry_strategy=self.retry_strategy
+ )
+ if retry_strategy is None:
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
+
+ if retry_strategy:
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
+ self.base_client.add_opc_client_retries_header(header_params)
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
+ return retry_strategy.make_retrying_call(
+ self.base_client.call_api,
+ resource_path=resource_path,
+ method=method,
+ query_params=query_params,
+ header_params=header_params,
+ response_type="AuditPolicyCollection",
+ allow_control_chars=kwargs.get('allow_control_chars'),
+ operation_name=operation_name,
+ api_reference_link=api_reference_link,
+ required_arguments=required_arguments)
+ else:
+ return self.base_client.call_api(
+ resource_path=resource_path,
+ method=method,
+ query_params=query_params,
+ header_params=header_params,
+ response_type="AuditPolicyCollection",
+ allow_control_chars=kwargs.get('allow_control_chars'),
+ operation_name=operation_name,
+ api_reference_link=api_reference_link,
+ required_arguments=required_arguments)
+
+ def list_audit_policy_analytics(self, compartment_id, **kwargs):
+ """
+ Gets a list of aggregated audit policy details on the target databases. A audit policy aggregation
+ helps understand the overall state of policies provisioned on targets.
+ It is especially useful to create dashboards or to support analytics.
+
+ The parameter `accessLevel` specifies whether to return only those compartments for which the
+ requestor has INSPECT permissions on at least one resource directly
+ or indirectly (ACCESSIBLE) (the resource can be in a subcompartment) or to return Not Authorized if
+ principal doesn't have access to even one of the child compartments. This is valid only when
+ `compartmentIdInSubtree` is set to `true`.
+
+ The parameter `compartmentIdInSubtree` applies when you perform SummarizedAuditPolicyInfo on the specified
+ `compartmentId` and when it is set to true, the entire hierarchy of compartments can be returned.
+ To get a full list of all compartments and subcompartments in the tenancy (root compartment),
+ set the parameter `compartmentIdInSubtree` to true and `accessLevel` to ACCESSIBLE.
+
+ **Example:** ListAuditPolicyAnalytics?groupBy=auditPolicyCategory
+
+
+ :param str compartment_id: (required)
+ A filter to return only resources that match the specified compartment OCID.
+
+ :param bool compartment_id_in_subtree: (optional)
+ Default is false.
+ When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting.
+
+ :param str access_level: (optional)
+ Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED.
+ Setting this to ACCESSIBLE returns only those compartments for which the
+ user has INSPECT permissions directly or indirectly (permissions can be on a
+ resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed.
+
+ Allowed values are: "RESTRICTED", "ACCESSIBLE"
+
+ :param int limit: (optional)
+ For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
+
+ __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
+
+ :param str page: (optional)
+ For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__.
+
+ __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
+
+ :param list[str] group_by: (optional)
+ The group by parameter to summarize audit policy aggregation.
+
+ Allowed values are: "auditPolicyCategory", "auditPolicyName", "targetId"
+
+ :param str audit_policy_category: (optional)
+ The category to which the audit policy belongs to.
+
+ Allowed values are: "BASIC_ACTIVITY", "ADMIN_USER_ACTIVITY", "USER_ACTIVITY", "ORACLE_PREDEFINED", "COMPLIANCE_STANDARD", "CUSTOM", "SQL_FIREWALL_AUDITING"
+
+ :param str audit_policy_name: (optional)
+ In case of seeded policies, it is the policy name defined by Data Safe.
+ In case of custom Policies, it is the policy name that is used to create the policies on the target database.
+ In case of Oracle Pre-seeded policies, it is the default policy name of the same.
+
+ :param str target_id: (optional)
+ A filter to return only items related to a specific target OCID.
+
+ :param str lifecycle_state: (optional)
+ The current state of the audit policy.
+
+ Allowed values are: "CREATING", "UPDATING", "ACTIVE", "FAILED", "NEEDS_ATTENTION", "DELETING", "DELETED"
+
+ :param str opc_request_id: (optional)
+ Unique identifier for the request.
+
+ :param obj retry_strategy: (optional)
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
+
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
+ The specifics of the default retry strategy are described `here `__.
+
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
+
+ :param bool allow_control_chars: (optional)
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
+ By default, the response will not allow control characters in strings
+
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.AuditPolicyAnalyticCollection`
+ :rtype: :class:`~oci.response.Response`
+
+ :example:
+ Click `here `__ to see an example of how to use list_audit_policy_analytics API.
+ """
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
+ required_arguments = ['compartmentId']
+ resource_path = "/auditPolicyAnalytics"
+ method = "GET"
+ operation_name = "list_audit_policy_analytics"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/AuditPolicyAnalyticCollection/ListAuditPolicyAnalytics"
+
+ # Don't accept unknown kwargs
+ expected_kwargs = [
+ "allow_control_chars",
+ "retry_strategy",
+ "compartment_id_in_subtree",
+ "access_level",
+ "limit",
+ "page",
+ "group_by",
+ "audit_policy_category",
+ "audit_policy_name",
+ "target_id",
+ "lifecycle_state",
+ "opc_request_id"
+ ]
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
+ if extra_kwargs:
+ raise ValueError(
+ f"list_audit_policy_analytics got unknown kwargs: {extra_kwargs!r}")
+
+ if 'access_level' in kwargs:
+ access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"]
+ if kwargs['access_level'] not in access_level_allowed_values:
+ raise ValueError(
+ f"Invalid value for `access_level`, must be one of { access_level_allowed_values }"
+ )
+
+ if 'group_by' in kwargs:
+ group_by_allowed_values = ["auditPolicyCategory", "auditPolicyName", "targetId"]
+ for group_by_item in kwargs['group_by']:
+ if group_by_item not in group_by_allowed_values:
+ raise ValueError(
+ f"Invalid value for `group_by`, must be one of { group_by_allowed_values }"
+ )
+
+ if 'audit_policy_category' in kwargs:
+ audit_policy_category_allowed_values = ["BASIC_ACTIVITY", "ADMIN_USER_ACTIVITY", "USER_ACTIVITY", "ORACLE_PREDEFINED", "COMPLIANCE_STANDARD", "CUSTOM", "SQL_FIREWALL_AUDITING"]
+ if kwargs['audit_policy_category'] not in audit_policy_category_allowed_values:
+ raise ValueError(
+ f"Invalid value for `audit_policy_category`, must be one of { audit_policy_category_allowed_values }"
+ )
+
+ if 'lifecycle_state' in kwargs:
+ lifecycle_state_allowed_values = ["CREATING", "UPDATING", "ACTIVE", "FAILED", "NEEDS_ATTENTION", "DELETING", "DELETED"]
+ if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values:
+ raise ValueError(
+ f"Invalid value for `lifecycle_state`, must be one of { lifecycle_state_allowed_values }"
+ )
+
+ query_params = {
+ "compartmentId": compartment_id,
+ "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing),
+ "accessLevel": kwargs.get("access_level", missing),
+ "limit": kwargs.get("limit", missing),
+ "page": kwargs.get("page", missing),
+ "groupBy": self.base_client.generate_collection_format_param(kwargs.get("group_by", missing), 'multi'),
+ "auditPolicyCategory": kwargs.get("audit_policy_category", missing),
+ "auditPolicyName": kwargs.get("audit_policy_name", missing),
+ "targetId": kwargs.get("target_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.base_client.get_preferred_retry_strategy(
+ operation_retry_strategy=kwargs.get('retry_strategy'),
+ client_retry_strategy=self.retry_strategy
+ )
+ if retry_strategy is None:
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
+
+ if retry_strategy:
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
+ self.base_client.add_opc_client_retries_header(header_params)
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
+ return retry_strategy.make_retrying_call(
+ self.base_client.call_api,
+ resource_path=resource_path,
+ method=method,
+ query_params=query_params,
+ header_params=header_params,
+ response_type="AuditPolicyAnalyticCollection",
+ allow_control_chars=kwargs.get('allow_control_chars'),
+ operation_name=operation_name,
+ api_reference_link=api_reference_link,
+ required_arguments=required_arguments)
+ else:
+ return self.base_client.call_api(
+ resource_path=resource_path,
+ method=method,
+ query_params=query_params,
+ header_params=header_params,
+ response_type="AuditPolicyAnalyticCollection",
+ allow_control_chars=kwargs.get('allow_control_chars'),
+ operation_name=operation_name,
+ api_reference_link=api_reference_link,
+ required_arguments=required_arguments)
+
+ def list_audit_profile_analytics(self, compartment_id, **kwargs):
+ """
+ Gets a list of audit profile aggregated details . A audit profile aggregation helps understand the overall state of audit profile profiles.
+ As an example, it helps understand how many audit profiles have paid usage. It is especially useful to create dashboards or to support analytics.
+
+ The parameter `accessLevel` specifies whether to return only those compartments for which the
+ requestor has INSPECT permissions on at least one resource directly
+ or indirectly (ACCESSIBLE) (the resource can be in a subcompartment) or to return Not Authorized if
+ Principal doesn't have access to even one of the child compartments. This is valid only when
+ `compartmentIdInSubtree` is set to `true`.
+
+ The parameter `compartmentIdInSubtree` applies when you perform AuditProfileAnalytics on the
+ `compartmentId` passed and when it is set to true, the entire hierarchy of compartments can be returned.
+ To get a full list of all compartments and subcompartments in the tenancy (root compartment),
+ set the parameter `compartmentIdInSubtree` to true and `accessLevel` to ACCESSIBLE.
+
+
+ :param str compartment_id: (required)
+ A filter to return only resources that match the specified compartment OCID.
+
+ :param bool compartment_id_in_subtree: (optional)
+ Default is false.
+ When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting.
+
+ :param str access_level: (optional)
+ Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED.
+ Setting this to ACCESSIBLE returns only those compartments for which the
+ user has INSPECT permissions directly or indirectly (permissions can be on a
+ resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed.
+
+ Allowed values are: "RESTRICTED", "ACCESSIBLE"
+
+ :param int limit: (optional)
+ For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
+
+ __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
+
+ :param str page: (optional)
+ For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__.
+
+ __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
+
+ :param list[str] group_by: (optional)
+ The group by parameter for summarize operation on audit.
+
+ Allowed values are: "isPaidUsageEnabled"
+
+ :param str opc_request_id: (optional)
+ Unique identifier for the request.
+
+ :param obj retry_strategy: (optional)
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
+
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
+ The specifics of the default retry strategy are described `here `__.
+
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
+
+ :param bool allow_control_chars: (optional)
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
+ By default, the response will not allow control characters in strings
+
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.AuditProfileAnalyticCollection`
+ :rtype: :class:`~oci.response.Response`
+
+ :example:
+ Click `here `__ to see an example of how to use list_audit_profile_analytics API.
+ """
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
+ required_arguments = ['compartmentId']
+ resource_path = "/auditProfileAnalytics"
+ method = "GET"
+ operation_name = "list_audit_profile_analytics"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/AuditProfileAnalyticCollection/ListAuditProfileAnalytics"
+
+ # Don't accept unknown kwargs
+ expected_kwargs = [
+ "allow_control_chars",
+ "retry_strategy",
+ "compartment_id_in_subtree",
+ "access_level",
+ "limit",
+ "page",
+ "group_by",
+ "opc_request_id"
+ ]
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
+ if extra_kwargs:
+ raise ValueError(
+ f"list_audit_profile_analytics got unknown kwargs: {extra_kwargs!r}")
+
+ if 'access_level' in kwargs:
+ access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"]
+ if kwargs['access_level'] not in access_level_allowed_values:
+ raise ValueError(
+ f"Invalid value for `access_level`, must be one of { access_level_allowed_values }"
+ )
+
+ if 'group_by' in kwargs:
+ group_by_allowed_values = ["isPaidUsageEnabled"]
+ for group_by_item in kwargs['group_by']:
+ if group_by_item not in group_by_allowed_values:
+ raise ValueError(
+ f"Invalid value for `group_by`, must be one of { group_by_allowed_values }"
+ )
+
+ query_params = {
+ "compartmentId": compartment_id,
+ "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing),
+ "accessLevel": kwargs.get("access_level", missing),
+ "limit": kwargs.get("limit", missing),
+ "page": kwargs.get("page", missing),
+ "groupBy": self.base_client.generate_collection_format_param(kwargs.get("group_by", missing), 'multi')
+ }
+ query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
+
+ header_params = {
+ "accept": "application/json",
+ "content-type": "application/json",
+ "opc-request-id": kwargs.get("opc_request_id", missing)
+ }
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
+
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
+ operation_retry_strategy=kwargs.get('retry_strategy'),
+ client_retry_strategy=self.retry_strategy
+ )
+ if retry_strategy is None:
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
+
+ if retry_strategy:
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
+ self.base_client.add_opc_client_retries_header(header_params)
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
+ return retry_strategy.make_retrying_call(
+ self.base_client.call_api,
+ resource_path=resource_path,
+ method=method,
+ query_params=query_params,
+ header_params=header_params,
+ response_type="AuditProfileAnalyticCollection",
+ allow_control_chars=kwargs.get('allow_control_chars'),
+ operation_name=operation_name,
+ api_reference_link=api_reference_link,
+ required_arguments=required_arguments)
+ else:
+ return self.base_client.call_api(
+ resource_path=resource_path,
+ method=method,
+ query_params=query_params,
+ header_params=header_params,
+ response_type="AuditProfileAnalyticCollection",
+ allow_control_chars=kwargs.get('allow_control_chars'),
+ operation_name=operation_name,
+ api_reference_link=api_reference_link,
+ required_arguments=required_arguments)
+
+ def list_audit_profiles(self, compartment_id, **kwargs):
+ """
+ Gets a list of all audit profiles.
+
+ The ListAuditProfiles operation returns only the audit profiles in the specified `compartmentId`.
+ The list does not include any subcompartments of the compartmentId passed.
+
+ The parameter `accessLevel` specifies whether to return only those compartments for which the
+ requestor has INSPECT permissions on at least one resource directly
+ or indirectly (ACCESSIBLE) (the resource can be in a subcompartment) or to return Not Authorized if
+ Principal doesn't have access to even one of the child compartments. This is valid only when
+ `compartmentIdInSubtree` is set to `true`.
+
+ The parameter `compartmentIdInSubtree` applies when you perform ListAuditProfiles on the
+ `compartmentId` passed and when it is set to true, the entire hierarchy of compartments can be returned.
+ To get a full list of all compartments and subcompartments in the tenancy (root compartment),
+ set the parameter `compartmentIdInSubtree` to true and `accessLevel` to ACCESSIBLE.
+
+
+ :param str compartment_id: (required)
+ A filter to return only resources that match the specified compartment OCID.
+
+ :param bool compartment_id_in_subtree: (optional)
+ Default is false.
+ When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting.
+
+ :param str access_level: (optional)
+ Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED.
+ Setting this to ACCESSIBLE returns only those compartments for which the
+ user has INSPECT permissions directly or indirectly (permissions can be on a
+ resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed.
+
+ Allowed values are: "RESTRICTED", "ACCESSIBLE"
+
+ :param str audit_profile_id: (optional)
+ A optional filter to return only resources that match the specified id.
+
+ :param str target_id: (optional)
+ A filter to return only items related to a specific target OCID.
+
+ :param str display_name: (optional)
+ A filter to return only resources that match the specified display name.
+
+ :param int limit: (optional)
+ For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
+
+ __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
+
+ :param str page: (optional)
+ For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__.
+
+ __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
+
+ :param str lifecycle_state: (optional)
+ A optional filter to return only resources that match the specified lifecycle state.
+
+ Allowed values are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "FAILED", "NEEDS_ATTENTION", "DELETED"
+
+ :param bool is_override_global_retention_setting: (optional)
+ A optional filter to return only resources that match the specified retention configured value.
+
+ :param bool is_paid_usage_enabled: (optional)
+ Indicates if you want to continue audit record collection beyond the free limit
+ of one million audit records per month per target database, incurring additional charges.
+ The default value is inherited from the global settings. You can change at the global level
+ or at the target level.
+
+ :param int audit_collected_volume_greater_than_or_equal_to: (optional)
+ A filter to return only items that have count of audit records collected greater than or equal to the specified value.
+
+ :param str sort_order: (optional)
+ The sort order to use, either ascending (ASC) or descending (DESC).
+
+ Allowed values are: "ASC", "DESC"
+
+ :param str sort_by: (optional)
+ The field used for sorting. Only one sorting order (sortOrder) can be specified.
+ The default order for TIMECREATED is descending. The default order for DISPLAYNAME is ascending.
+ The DISPLAYNAME sort order is case sensitive.
+
+ Allowed values are: "TIMECREATED", "DISPLAYNAME"
+
+ :param str opc_request_id: (optional)
+ Unique identifier for the request.
+
+ :param obj retry_strategy: (optional)
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
+
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
+ The specifics of the default retry strategy are described `here `__.
+
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
+
+ :param bool allow_control_chars: (optional)
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
+ By default, the response will not allow control characters in strings
+
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.AuditProfileCollection`
+ :rtype: :class:`~oci.response.Response`
+
+ :example:
+ Click `here `__ to see an example of how to use list_audit_profiles API.
+ """
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
+ required_arguments = ['compartmentId']
+ resource_path = "/auditProfiles"
+ method = "GET"
+ operation_name = "list_audit_profiles"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/AuditProfile/ListAuditProfiles"
+
+ # Don't accept unknown kwargs
+ expected_kwargs = [
+ "allow_control_chars",
+ "retry_strategy",
+ "compartment_id_in_subtree",
+ "access_level",
+ "audit_profile_id",
+ "target_id",
+ "display_name",
+ "limit",
+ "page",
+ "lifecycle_state",
+ "is_override_global_retention_setting",
+ "is_paid_usage_enabled",
+ "audit_collected_volume_greater_than_or_equal_to",
+ "sort_order",
+ "sort_by",
+ "opc_request_id"
+ ]
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
+ if extra_kwargs:
+ raise ValueError(
+ f"list_audit_profiles got unknown kwargs: {extra_kwargs!r}")
+
+ if 'access_level' in kwargs:
+ access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"]
+ if kwargs['access_level'] not in access_level_allowed_values:
+ raise ValueError(
+ f"Invalid value for `access_level`, must be one of { access_level_allowed_values }"
+ )
+
+ if 'lifecycle_state' in kwargs:
+ lifecycle_state_allowed_values = ["CREATING", "UPDATING", "ACTIVE", "DELETING", "FAILED", "NEEDS_ATTENTION", "DELETED"]
+ if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values:
+ raise ValueError(
+ f"Invalid value for `lifecycle_state`, must be one of { lifecycle_state_allowed_values }"
+ )
+
+ if 'sort_order' in kwargs:
+ sort_order_allowed_values = ["ASC", "DESC"]
+ if kwargs['sort_order'] not in sort_order_allowed_values:
+ raise ValueError(
+ f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }"
+ )
+
+ if 'sort_by' in kwargs:
+ sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"]
+ if kwargs['sort_by'] not in sort_by_allowed_values:
+ raise ValueError(
+ f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
+ )
+
+ query_params = {
+ "compartmentId": compartment_id,
+ "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing),
+ "accessLevel": kwargs.get("access_level", missing),
+ "auditProfileId": kwargs.get("audit_profile_id", missing),
+ "targetId": kwargs.get("target_id", missing),
+ "displayName": kwargs.get("display_name", missing),
+ "limit": kwargs.get("limit", missing),
+ "page": kwargs.get("page", missing),
+ "lifecycleState": kwargs.get("lifecycle_state", missing),
+ "isOverrideGlobalRetentionSetting": kwargs.get("is_override_global_retention_setting", missing),
+ "isPaidUsageEnabled": kwargs.get("is_paid_usage_enabled", missing),
+ "auditCollectedVolumeGreaterThanOrEqualTo": kwargs.get("audit_collected_volume_greater_than_or_equal_to", missing),
+ "sortOrder": kwargs.get("sort_order", missing),
+ "sortBy": kwargs.get("sort_by", missing)
+ }
+ query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
+
+ header_params = {
+ "accept": "application/json",
+ "content-type": "application/json",
+ "opc-request-id": kwargs.get("opc_request_id", missing)
+ }
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
+
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
+ operation_retry_strategy=kwargs.get('retry_strategy'),
+ client_retry_strategy=self.retry_strategy
+ )
+ if retry_strategy is None:
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
+
+ if retry_strategy:
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
+ self.base_client.add_opc_client_retries_header(header_params)
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
+ return retry_strategy.make_retrying_call(
+ self.base_client.call_api,
+ resource_path=resource_path,
+ method=method,
+ query_params=query_params,
+ header_params=header_params,
+ response_type="AuditProfileCollection",
+ allow_control_chars=kwargs.get('allow_control_chars'),
+ operation_name=operation_name,
+ api_reference_link=api_reference_link,
+ required_arguments=required_arguments)
+ else:
+ return self.base_client.call_api(
+ resource_path=resource_path,
+ method=method,
+ query_params=query_params,
+ header_params=header_params,
+ response_type="AuditProfileCollection",
+ allow_control_chars=kwargs.get('allow_control_chars'),
+ operation_name=operation_name,
+ api_reference_link=api_reference_link,
+ required_arguments=required_arguments)
+
+ def list_audit_trail_analytics(self, compartment_id, **kwargs):
+ """
+ Gets a list of audit trail aggregated details . A audit trail aggregation helps understand the overall state of trails.
+ As an example, it helps understand how many trails are running or stopped. It is especially useful to create dashboards or to support analytics.
+
+ The parameter `accessLevel` specifies whether to return only those compartments for which the
+ requestor has INSPECT permissions on at least one resource directly
+ or indirectly (ACCESSIBLE) (the resource can be in a subcompartment) or to return Not Authorized if
+ Principal doesn't have access to even one of the child compartments. This is valid only when
+ `compartmentIdInSubtree` is set to `true`.
+
+ The parameter `compartmentIdInSubtree` applies when you perform AuditTrailAnalytics on the
+ `compartmentId` passed and when it is set to true, the entire hierarchy of compartments can be returned.
+ To get a full list of all compartments and subcompartments in the tenancy (root compartment),
+ set the parameter `compartmentIdInSubtree` to true and `accessLevel` to ACCESSIBLE.
+
+
+ :param str compartment_id: (required)
+ A filter to return only resources that match the specified compartment OCID.
+
+ :param bool compartment_id_in_subtree: (optional)
+ Default is false.
+ When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting.
+
+ :param str access_level: (optional)
+ Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED.
+ Setting this to ACCESSIBLE returns only those compartments for which the
+ user has INSPECT permissions directly or indirectly (permissions can be on a
+ resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed.
+
+ Allowed values are: "RESTRICTED", "ACCESSIBLE"
+
+ :param int limit: (optional)
+ For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
+
+ __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
:param str page: (optional)
For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__.
__ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
+ :param list[str] group_by: (optional)
+ The group by parameter for summarize operation on audit trail.
+
+ Allowed values are: "location", "lifecycleState", "status", "targetId"
+
+ :param str target_id: (optional)
+ A filter to return only items related to a specific target OCID.
+
:param str opc_request_id: (optional)
Unique identifier for the request.
- :param str if_match: (optional)
- For optimistic concurrency control. In the PUT or DELETE call
- for a resource, set the if-match parameter to the value of the
- etag from a previous GET or POST response for that resource.
- The resource will be updated or deleted only if the etag you
- provide matches the resource's current etag value.
+ :param obj retry_strategy: (optional)
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
- :param datetime time_started: (optional)
- An optional filter to return audit events whose creation time in the database is greater than and equal to the date-time specified,
- in the format defined by `RFC3339`__.
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
+ The specifics of the default retry strategy are described `here `__.
- __ https://tools.ietf.org/html/rfc3339
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
- :param datetime time_ended: (optional)
- An optional filter to return audit events whose creation time in the database is less than and equal to the date-time specified,
- in the format defined by `RFC3339`__.
+ :param bool allow_control_chars: (optional)
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
+ By default, the response will not allow control characters in strings
- __ https://tools.ietf.org/html/rfc3339
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.AuditTrailAnalyticCollection`
+ :rtype: :class:`~oci.response.Response`
- :param str query_time_zone: (optional)
- Default time zone is UTC if no time zone provided. The date-time considerations of the resource will be in accordance with the specified time zone.
+ :example:
+ Click `here `__ to see an example of how to use list_audit_trail_analytics API.
+ """
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
+ required_arguments = ['compartmentId']
+ resource_path = "/auditTrailAnalytics"
+ method = "GET"
+ operation_name = "list_audit_trail_analytics"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/AuditTrailAnalyticCollection/ListAuditTrailAnalytics"
- :param str sort_order: (optional)
- The sort order to use, either ascending (ASC) or descending (DESC).
+ # Don't accept unknown kwargs
+ expected_kwargs = [
+ "allow_control_chars",
+ "retry_strategy",
+ "compartment_id_in_subtree",
+ "access_level",
+ "limit",
+ "page",
+ "group_by",
+ "target_id",
+ "opc_request_id"
+ ]
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
+ if extra_kwargs:
+ raise ValueError(
+ f"list_audit_trail_analytics got unknown kwargs: {extra_kwargs!r}")
- Allowed values are: "ASC", "DESC"
+ if 'access_level' in kwargs:
+ access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"]
+ if kwargs['access_level'] not in access_level_allowed_values:
+ raise ValueError(
+ f"Invalid value for `access_level`, must be one of { access_level_allowed_values }"
+ )
- :param str sort_by: (optional)
- The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. If no value is specified timeCreated is default.
+ if 'group_by' in kwargs:
+ group_by_allowed_values = ["location", "lifecycleState", "status", "targetId"]
+ for group_by_item in kwargs['group_by']:
+ if group_by_item not in group_by_allowed_values:
+ raise ValueError(
+ f"Invalid value for `group_by`, must be one of { group_by_allowed_values }"
+ )
- Allowed values are: "displayName", "timeCreated"
+ query_params = {
+ "compartmentId": compartment_id,
+ "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing),
+ "accessLevel": kwargs.get("access_level", missing),
+ "limit": kwargs.get("limit", missing),
+ "page": kwargs.get("page", missing),
+ "groupBy": self.base_client.generate_collection_format_param(kwargs.get("group_by", missing), 'multi'),
+ "targetId": kwargs.get("target_id", missing)
+ }
+ query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
+
+ header_params = {
+ "accept": "application/json",
+ "content-type": "application/json",
+ "opc-request-id": kwargs.get("opc_request_id", missing)
+ }
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
+
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
+ operation_retry_strategy=kwargs.get('retry_strategy'),
+ client_retry_strategy=self.retry_strategy
+ )
+ if retry_strategy is None:
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
+
+ if retry_strategy:
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
+ self.base_client.add_opc_client_retries_header(header_params)
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
+ return retry_strategy.make_retrying_call(
+ self.base_client.call_api,
+ resource_path=resource_path,
+ method=method,
+ query_params=query_params,
+ header_params=header_params,
+ response_type="AuditTrailAnalyticCollection",
+ allow_control_chars=kwargs.get('allow_control_chars'),
+ operation_name=operation_name,
+ api_reference_link=api_reference_link,
+ required_arguments=required_arguments)
+ else:
+ return self.base_client.call_api(
+ resource_path=resource_path,
+ method=method,
+ query_params=query_params,
+ header_params=header_params,
+ response_type="AuditTrailAnalyticCollection",
+ allow_control_chars=kwargs.get('allow_control_chars'),
+ operation_name=operation_name,
+ api_reference_link=api_reference_link,
+ required_arguments=required_arguments)
+
+ def list_audit_trails(self, compartment_id, **kwargs):
+ """
+ Gets a list of all audit trails.
+ The ListAuditTrails operation returns only the audit trails in the specified `compartmentId`.
+ The list does not include any subcompartments of the compartmentId passed.
+
+ The parameter `accessLevel` specifies whether to return only those compartments for which the
+ requestor has INSPECT permissions on at least one resource directly
+ or indirectly (ACCESSIBLE) (the resource can be in a subcompartment) or to return Not Authorized if
+ Principal doesn't have access to even one of the child compartments. This is valid only when
+ `compartmentIdInSubtree` is set to `true`.
+
+ The parameter `compartmentIdInSubtree` applies when you perform ListAuditTrails on the
+ `compartmentId` passed and when it is set to true, the entire hierarchy of compartments can be returned.
+ To get a full list of all compartments and subcompartments in the tenancy (root compartment),
+ set the parameter `compartmentIdInSubtree` to true and `accessLevel` to ACCESSIBLE.
+
+
+ :param str compartment_id: (required)
+ A filter to return only resources that match the specified compartment OCID.
+
+ :param bool compartment_id_in_subtree: (optional)
+ Default is false.
+ When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting.
:param str access_level: (optional)
Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED.
@@ -14230,48 +17210,49 @@ def list_alert_analytics(self, compartment_id, **kwargs):
Allowed values are: "RESTRICTED", "ACCESSIBLE"
- :param str scim_query: (optional)
- The scimQuery query parameter accepts filter expressions that use the syntax described in Section 3.2.2.2
- of the System for Cross-Domain Identity Management (SCIM) specification, which is available
- at `RFC3339`__. In SCIM filtering expressions,
- text, date, and time values must be enclosed in quotation marks, with date and time values using ISO-8601 format.
- (Numeric and boolean values should not be quoted.)
+ :param str audit_trail_id: (optional)
+ A optional filter to return only resources that match the specified id.
- **Example:** |
- query=(timeCreated ge '2021-06-04T01-00-26') and (targetNames eq 'target_1')
- query=(featureDetails.userName eq \"user\") and (targetNames eq \"target_1\")
- Supported fields:
- severity
- status
- alertType
- targetIds
- targetNames
- operationTime
- lifecycleState
- displayName
- timeCreated
- timeUpdated
- featureDetails.* (* can be any field in nestedStrMap in Feature Attributes in Alert Summary. For example -
- userName,object,clientHostname,osUserName,clientIPs,clientId,commandText,commandParam,clientProgram,objectType,targetOwner)
+ :param str display_name: (optional)
+ A filter to return only resources that match the specified display name.
- __ https://tools.ietf.org/html/draft-ietf-scim-api-12
+ :param str target_id: (optional)
+ A filter to return only items related to a specific target OCID.
- :param list[str] summary_field: (optional)
- Specifies a subset of summarized fields to be returned in the response.
+ :param int limit: (optional)
+ For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
- Allowed values are: "alertType", "targetIds", "targetNames", "alertSeverity", "alertStatus", "timeCreated", "policyId", "open", "closed", "critical", "high", "medium", "low", "alertcount"
+ __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
- :param list[str] group_by: (optional)
- A groupBy can only be used in combination with summaryField parameter.
- A groupBy value has to be a subset of the values mentioned in summaryField parameter.
+ :param str page: (optional)
+ For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__.
- Allowed values are: "alertType", "targetIds", "targetNames", "alertSeverity", "alertStatus", "timeCreated", "policyId"
+ __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
+
+ :param str lifecycle_state: (optional)
+ A optional filter to return only resources that match the specified lifecycle state.
+
+ Allowed values are: "INACTIVE", "UPDATING", "ACTIVE", "DELETING", "FAILED", "NEEDS_ATTENTION"
+
+ :param str status: (optional)
+ A optional filter to return only resources that match the specified sub-state of audit trail.
+
+ Allowed values are: "STARTING", "COLLECTING", "RECOVERING", "IDLE", "STOPPING", "STOPPED", "RESUMING", "RETRYING", "NOT_STARTED", "STOPPED_NEEDS_ATTN", "STOPPED_FAILED"
+
+ :param str sort_order: (optional)
+ The sort order to use, either ascending (ASC) or descending (DESC).
+
+ Allowed values are: "ASC", "DESC"
+
+ :param str sort_by: (optional)
+ The field used for sorting. Only one sorting order (sortOrder) can be specified.
+ The default order for TIMECREATED is descending. The default order for DISPLAYNAME is ascending.
+ The DISPLAYNAME sort order is case sensitive.
+
+ Allowed values are: "TIMECREATED", "DISPLAYNAME"
- :param str opc_retry_token: (optional)
- A token that uniquely identifies a request so it can be retried in case of a timeout or
- server error without risk of executing that same action again. Retry tokens expire after 24
- hours, but can be invalidated before then due to conflicting operations. For example, if a resource
- has been deleted and purged from the system, then a retry of the original creation request might be rejected.
+ :param str opc_request_id: (optional)
+ Unique identifier for the request.
:param obj retry_strategy: (optional)
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
@@ -14285,43 +17266,61 @@ def list_alert_analytics(self, compartment_id, **kwargs):
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.AlertAnalyticsCollection`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.AuditTrailCollection`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use list_alert_analytics API.
+ Click `here `__ to see an example of how to use list_audit_trails API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
required_arguments = ['compartmentId']
- resource_path = "/alertAnalytics"
+ resource_path = "/auditTrails"
method = "GET"
- operation_name = "list_alert_analytics"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/AlertSummary/ListAlertAnalytics"
+ operation_name = "list_audit_trails"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/AuditTrail/ListAuditTrails"
# Don't accept unknown kwargs
expected_kwargs = [
"allow_control_chars",
"retry_strategy",
"compartment_id_in_subtree",
+ "access_level",
+ "audit_trail_id",
+ "display_name",
+ "target_id",
"limit",
"page",
- "opc_request_id",
- "if_match",
- "time_started",
- "time_ended",
- "query_time_zone",
+ "lifecycle_state",
+ "status",
"sort_order",
"sort_by",
- "access_level",
- "scim_query",
- "summary_field",
- "group_by",
- "opc_retry_token"
+ "opc_request_id"
]
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"list_alert_analytics got unknown kwargs: {extra_kwargs!r}")
+ f"list_audit_trails got unknown kwargs: {extra_kwargs!r}")
+
+ if 'access_level' in kwargs:
+ access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"]
+ if kwargs['access_level'] not in access_level_allowed_values:
+ raise ValueError(
+ f"Invalid value for `access_level`, must be one of { access_level_allowed_values }"
+ )
+
+ if 'lifecycle_state' in kwargs:
+ lifecycle_state_allowed_values = ["INACTIVE", "UPDATING", "ACTIVE", "DELETING", "FAILED", "NEEDS_ATTENTION"]
+ if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values:
+ raise ValueError(
+ f"Invalid value for `lifecycle_state`, must be one of { lifecycle_state_allowed_values }"
+ )
+
+ if 'status' in kwargs:
+ status_allowed_values = ["STARTING", "COLLECTING", "RECOVERING", "IDLE", "STOPPING", "STOPPED", "RESUMING", "RETRYING", "NOT_STARTED", "STOPPED_NEEDS_ATTN", "STOPPED_FAILED"]
+ if kwargs['status'] not in status_allowed_values:
+ raise ValueError(
+ f"Invalid value for `status`, must be one of { status_allowed_values }"
+ )
if 'sort_order' in kwargs:
sort_order_allowed_values = ["ASC", "DESC"]
@@ -14331,58 +17330,32 @@ def list_alert_analytics(self, compartment_id, **kwargs):
)
if 'sort_by' in kwargs:
- sort_by_allowed_values = ["displayName", "timeCreated"]
+ sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"]
if kwargs['sort_by'] not in sort_by_allowed_values:
raise ValueError(
f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
)
- if 'access_level' in kwargs:
- access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"]
- if kwargs['access_level'] not in access_level_allowed_values:
- raise ValueError(
- f"Invalid value for `access_level`, must be one of { access_level_allowed_values }"
- )
-
- if 'summary_field' in kwargs:
- summary_field_allowed_values = ["alertType", "targetIds", "targetNames", "alertSeverity", "alertStatus", "timeCreated", "policyId", "open", "closed", "critical", "high", "medium", "low", "alertcount"]
- for summary_field_item in kwargs['summary_field']:
- if summary_field_item not in summary_field_allowed_values:
- raise ValueError(
- f"Invalid value for `summary_field`, must be one of { summary_field_allowed_values }"
- )
-
- if 'group_by' in kwargs:
- group_by_allowed_values = ["alertType", "targetIds", "targetNames", "alertSeverity", "alertStatus", "timeCreated", "policyId"]
- for group_by_item in kwargs['group_by']:
- if group_by_item not in group_by_allowed_values:
- raise ValueError(
- f"Invalid value for `group_by`, must be one of { group_by_allowed_values }"
- )
-
query_params = {
"compartmentId": compartment_id,
"compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing),
+ "accessLevel": kwargs.get("access_level", missing),
+ "auditTrailId": kwargs.get("audit_trail_id", missing),
+ "displayName": kwargs.get("display_name", missing),
+ "targetId": kwargs.get("target_id", missing),
"limit": kwargs.get("limit", missing),
"page": kwargs.get("page", missing),
- "timeStarted": kwargs.get("time_started", missing),
- "timeEnded": kwargs.get("time_ended", missing),
- "queryTimeZone": kwargs.get("query_time_zone", missing),
+ "lifecycleState": kwargs.get("lifecycle_state", missing),
+ "status": kwargs.get("status", missing),
"sortOrder": kwargs.get("sort_order", missing),
- "sortBy": kwargs.get("sort_by", missing),
- "accessLevel": kwargs.get("access_level", missing),
- "scimQuery": kwargs.get("scim_query", missing),
- "summaryField": self.base_client.generate_collection_format_param(kwargs.get("summary_field", missing), 'multi'),
- "groupBy": self.base_client.generate_collection_format_param(kwargs.get("group_by", missing), 'multi')
+ "sortBy": kwargs.get("sort_by", missing)
}
query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
header_params = {
"accept": "application/json",
"content-type": "application/json",
- "opc-request-id": kwargs.get("opc_request_id", missing),
- "if-match": kwargs.get("if_match", missing),
- "opc-retry-token": kwargs.get("opc_retry_token", missing)
+ "opc-request-id": kwargs.get("opc_request_id", missing)
}
header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
@@ -14395,7 +17368,6 @@ def list_alert_analytics(self, compartment_id, **kwargs):
if retry_strategy:
if not isinstance(retry_strategy, retry.NoneRetryStrategy):
- self.base_client.add_opc_retry_token_if_needed(header_params)
self.base_client.add_opc_client_retries_header(header_params)
retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
return retry_strategy.make_retrying_call(
@@ -14404,7 +17376,7 @@ def list_alert_analytics(self, compartment_id, **kwargs):
method=method,
query_params=query_params,
header_params=header_params,
- response_type="AlertAnalyticsCollection",
+ response_type="AuditTrailCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -14415,38 +17387,45 @@ def list_alert_analytics(self, compartment_id, **kwargs):
method=method,
query_params=query_params,
header_params=header_params,
- response_type="AlertAnalyticsCollection",
+ response_type="AuditTrailCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def list_alert_policies(self, compartment_id, **kwargs):
+ def list_available_audit_volumes(self, audit_profile_id, work_request_id, **kwargs):
"""
- Gets a list of all alert policies.
+ Retrieves a list of audit trails, and associated audit event volume for each trail up to defined start date.
- :param str compartment_id: (required)
- A filter to return only resources that match the specified compartment OCID.
+ :param str audit_profile_id: (required)
+ The OCID of the audit.
- :param str alert_policy_id: (optional)
- A filter to return policy by it's OCID.
+ :param str work_request_id: (required)
+ The OCID of the work request.
- :param str type: (optional)
- An optional filter to return only alert policies of a certain type.
+ :param str trail_location: (optional)
+ The audit trail location.
- Allowed values are: "AUDITING", "SECURITY_ASSESSMENT", "USER_ASSESSMENT"
+ :param datetime month_in_consideration_greater_than: (optional)
+ Specifying `monthInConsiderationGreaterThan` parameter
+ will retrieve all items for which the event month is
+ greater than the date and time specified,
+ in the format defined by `RFC3339`__.
- :param bool is_user_defined: (optional)
- An optional filter to return only alert policies that are user-defined or not.
+ **Example:** 2016-12-19T00:00:00.000Z
- :param str display_name: (optional)
- A filter to return only resources that match the specified display name.
+ __ https://tools.ietf.org/html/rfc3339
- :param str lifecycle_state: (optional)
- An optional filter to return only alert policies that have the given life-cycle state.
+ :param datetime month_in_consideration_less_than: (optional)
+ Specifying `monthInConsiderationLessThan` parameter
+ will retrieve all items for which the event month is
+ less than the date and time specified,
+ in the format defined by `RFC3339`__.
- Allowed values are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED"
+ **Example:** 2016-12-19T00:00:00.000Z
+
+ __ https://tools.ietf.org/html/rfc3339
:param int limit: (optional)
For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
@@ -14464,42 +17443,13 @@ def list_alert_policies(self, compartment_id, **kwargs):
Allowed values are: "ASC", "DESC"
:param str sort_by: (optional)
- The field to sort by. Only one sort parameter may be provided.
+ The field to sort by. You can specify only one sort order(sortOrder). The default order for all fields is ascending.
- Allowed values are: "displayName", "timeCreated"
+ Allowed values are: "monthInConsideration", "volume", "trailLocation"
:param str opc_request_id: (optional)
Unique identifier for the request.
- :param datetime time_created_greater_than_or_equal_to: (optional)
- A filter to return only the resources that were created after the specified date and time, as defined by `RFC3339`__.
- Using TimeCreatedGreaterThanOrEqualToQueryParam parameter retrieves all resources created after that date.
-
- **Example:** 2016-12-19T16:39:57.600Z
-
- __ https://tools.ietf.org/html/rfc3339
-
- :param datetime time_created_less_than: (optional)
- Search for resources that were created before a specific date.
- Specifying this parameter corresponding `timeCreatedLessThan`
- parameter will retrieve all resources created before the
- specified created date, in \"YYYY-MM-ddThh:mmZ\" format with a Z offset, as
- defined by RFC 3339.
-
- **Example:** 2016-12-19T16:39:57.600Z
-
- :param bool compartment_id_in_subtree: (optional)
- Default is false.
- When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting.
-
- :param str access_level: (optional)
- Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED.
- Setting this to ACCESSIBLE returns only those compartments for which the
- user has INSPECT permissions directly or indirectly (permissions can be on a
- resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed.
-
- Allowed values are: "RESTRICTED", "ACCESSIBLE"
-
:param obj retry_strategy: (optional)
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
@@ -14512,56 +17462,46 @@ def list_alert_policies(self, compartment_id, **kwargs):
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.AlertPolicyCollection`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.AvailableAuditVolumeCollection`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use list_alert_policies API.
+ Click `here `__ to see an example of how to use list_available_audit_volumes API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
- required_arguments = ['compartmentId']
- resource_path = "/alertPolicies"
+ required_arguments = ['auditProfileId', 'workRequestId']
+ resource_path = "/auditProfiles/{auditProfileId}/availableAuditVolumes"
method = "GET"
- operation_name = "list_alert_policies"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/AlertPolicy/ListAlertPolicies"
+ operation_name = "list_available_audit_volumes"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/AuditProfile/ListAvailableAuditVolumes"
# Don't accept unknown kwargs
expected_kwargs = [
"allow_control_chars",
"retry_strategy",
- "alert_policy_id",
- "type",
- "is_user_defined",
- "display_name",
- "lifecycle_state",
+ "trail_location",
+ "month_in_consideration_greater_than",
+ "month_in_consideration_less_than",
"limit",
"page",
"sort_order",
"sort_by",
- "opc_request_id",
- "time_created_greater_than_or_equal_to",
- "time_created_less_than",
- "compartment_id_in_subtree",
- "access_level"
+ "opc_request_id"
]
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"list_alert_policies got unknown kwargs: {extra_kwargs!r}")
+ f"list_available_audit_volumes got unknown kwargs: {extra_kwargs!r}")
- if 'type' in kwargs:
- type_allowed_values = ["AUDITING", "SECURITY_ASSESSMENT", "USER_ASSESSMENT"]
- if kwargs['type'] not in type_allowed_values:
- raise ValueError(
- f"Invalid value for `type`, must be one of { type_allowed_values }"
- )
+ path_params = {
+ "auditProfileId": audit_profile_id
+ }
- if 'lifecycle_state' in kwargs:
- lifecycle_state_allowed_values = ["CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED"]
- if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values:
- raise ValueError(
- f"Invalid value for `lifecycle_state`, must be one of { lifecycle_state_allowed_values }"
- )
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
+
+ for (k, v) in six.iteritems(path_params):
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
+ raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
if 'sort_order' in kwargs:
sort_order_allowed_values = ["ASC", "DESC"]
@@ -14571,34 +17511,21 @@ def list_alert_policies(self, compartment_id, **kwargs):
)
if 'sort_by' in kwargs:
- sort_by_allowed_values = ["displayName", "timeCreated"]
+ sort_by_allowed_values = ["monthInConsideration", "volume", "trailLocation"]
if kwargs['sort_by'] not in sort_by_allowed_values:
raise ValueError(
f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
)
- if 'access_level' in kwargs:
- access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"]
- if kwargs['access_level'] not in access_level_allowed_values:
- raise ValueError(
- f"Invalid value for `access_level`, must be one of { access_level_allowed_values }"
- )
-
query_params = {
- "alertPolicyId": kwargs.get("alert_policy_id", missing),
- "type": kwargs.get("type", missing),
- "isUserDefined": kwargs.get("is_user_defined", missing),
- "displayName": kwargs.get("display_name", missing),
- "compartmentId": compartment_id,
- "lifecycleState": kwargs.get("lifecycle_state", missing),
+ "workRequestId": work_request_id,
+ "trailLocation": kwargs.get("trail_location", missing),
+ "monthInConsiderationGreaterThan": kwargs.get("month_in_consideration_greater_than", missing),
+ "monthInConsiderationLessThan": kwargs.get("month_in_consideration_less_than", missing),
"limit": kwargs.get("limit", missing),
"page": kwargs.get("page", missing),
"sortOrder": kwargs.get("sort_order", missing),
- "sortBy": kwargs.get("sort_by", missing),
- "timeCreatedGreaterThanOrEqualTo": kwargs.get("time_created_greater_than_or_equal_to", missing),
- "timeCreatedLessThan": kwargs.get("time_created_less_than", missing),
- "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing),
- "accessLevel": kwargs.get("access_level", missing)
+ "sortBy": kwargs.get("sort_by", missing)
}
query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
@@ -14624,9 +17551,10 @@ def list_alert_policies(self, compartment_id, **kwargs):
self.base_client.call_api,
resource_path=resource_path,
method=method,
+ path_params=path_params,
query_params=query_params,
header_params=header_params,
- response_type="AlertPolicyCollection",
+ response_type="AvailableAuditVolumeCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -14635,25 +17563,45 @@ def list_alert_policies(self, compartment_id, **kwargs):
return self.base_client.call_api(
resource_path=resource_path,
method=method,
+ path_params=path_params,
query_params=query_params,
header_params=header_params,
- response_type="AlertPolicyCollection",
+ response_type="AvailableAuditVolumeCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def list_alert_policy_rules(self, alert_policy_id, **kwargs):
+ def list_collected_audit_volumes(self, audit_profile_id, work_request_id, **kwargs):
"""
- Lists the rules of the specified alert policy. The alert policy is said to be satisfied when all rules in the policy evaulate to true.
- If there are three rules: rule1,rule2 and rule3, the policy is satisfied if rule1 AND rule2 AND rule3 is True.
+ Gets a list of all collected audit volume data points.
- :param str alert_policy_id: (required)
- The OCID of the alert policy.
+ :param str audit_profile_id: (required)
+ The OCID of the audit.
- :param str opc_request_id: (optional)
- Unique identifier for the request.
+ :param str work_request_id: (required)
+ The OCID of the work request.
+
+ :param datetime month_in_consideration_greater_than: (optional)
+ Specifying `monthInConsiderationGreaterThan` parameter
+ will retrieve all items for which the event month is
+ greater than the date and time specified,
+ in the format defined by `RFC3339`__.
+
+ **Example:** 2016-12-19T00:00:00.000Z
+
+ __ https://tools.ietf.org/html/rfc3339
+
+ :param datetime month_in_consideration_less_than: (optional)
+ Specifying `monthInConsiderationLessThan` parameter
+ will retrieve all items for which the event month is
+ less than the date and time specified,
+ in the format defined by `RFC3339`__.
+
+ **Example:** 2016-12-19T00:00:00.000Z
+
+ __ https://tools.ietf.org/html/rfc3339
:param int limit: (optional)
For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
@@ -14665,6 +17613,19 @@ def list_alert_policy_rules(self, alert_policy_id, **kwargs):
__ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
+ :param str sort_order: (optional)
+ The sort order to use, either ascending (ASC) or descending (DESC).
+
+ Allowed values are: "ASC", "DESC"
+
+ :param str sort_by: (optional)
+ The field to sort by. You can specify only one sort order(sortOrder). The default order for all fields is ascending.
+
+ Allowed values are: "monthInConsideration", "onlineVolume", "archivedVolume"
+
+ :param str opc_request_id: (optional)
+ Unique identifier for the request.
+
:param obj retry_strategy: (optional)
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
@@ -14677,34 +17638,38 @@ def list_alert_policy_rules(self, alert_policy_id, **kwargs):
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.AlertPolicyRuleCollection`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.CollectedAuditVolumeCollection`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use list_alert_policy_rules API.
+ Click `here `__ to see an example of how to use list_collected_audit_volumes API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
- required_arguments = ['alertPolicyId']
- resource_path = "/alertPolicies/{alertPolicyId}/rules"
+ required_arguments = ['auditProfileId', 'workRequestId']
+ resource_path = "/auditProfiles/{auditProfileId}/collectedAuditVolumes"
method = "GET"
- operation_name = "list_alert_policy_rules"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/AlertPolicy/ListAlertPolicyRules"
+ operation_name = "list_collected_audit_volumes"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/AuditProfile/ListCollectedAuditVolumes"
# Don't accept unknown kwargs
expected_kwargs = [
"allow_control_chars",
"retry_strategy",
- "opc_request_id",
+ "month_in_consideration_greater_than",
+ "month_in_consideration_less_than",
"limit",
- "page"
+ "page",
+ "sort_order",
+ "sort_by",
+ "opc_request_id"
]
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"list_alert_policy_rules got unknown kwargs: {extra_kwargs!r}")
+ f"list_collected_audit_volumes got unknown kwargs: {extra_kwargs!r}")
path_params = {
- "alertPolicyId": alert_policy_id
+ "auditProfileId": audit_profile_id
}
path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
@@ -14713,9 +17678,28 @@ def list_alert_policy_rules(self, alert_policy_id, **kwargs):
if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
+ if 'sort_order' in kwargs:
+ sort_order_allowed_values = ["ASC", "DESC"]
+ if kwargs['sort_order'] not in sort_order_allowed_values:
+ raise ValueError(
+ f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }"
+ )
+
+ if 'sort_by' in kwargs:
+ sort_by_allowed_values = ["monthInConsideration", "onlineVolume", "archivedVolume"]
+ if kwargs['sort_by'] not in sort_by_allowed_values:
+ raise ValueError(
+ f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
+ )
+
query_params = {
+ "workRequestId": work_request_id,
+ "monthInConsiderationGreaterThan": kwargs.get("month_in_consideration_greater_than", missing),
+ "monthInConsiderationLessThan": kwargs.get("month_in_consideration_less_than", missing),
"limit": kwargs.get("limit", missing),
- "page": kwargs.get("page", missing)
+ "page": kwargs.get("page", missing),
+ "sortOrder": kwargs.get("sort_order", missing),
+ "sortBy": kwargs.get("sort_by", missing)
}
query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
@@ -14744,7 +17728,7 @@ def list_alert_policy_rules(self, alert_policy_id, **kwargs):
path_params=path_params,
query_params=query_params,
header_params=header_params,
- response_type="AlertPolicyRuleCollection",
+ response_type="CollectedAuditVolumeCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -14756,26 +17740,22 @@ def list_alert_policy_rules(self, alert_policy_id, **kwargs):
path_params=path_params,
query_params=query_params,
header_params=header_params,
- response_type="AlertPolicyRuleCollection",
+ response_type="CollectedAuditVolumeCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def list_alerts(self, compartment_id, **kwargs):
+ def list_columns(self, target_database_id, **kwargs):
"""
- Gets a list of all alerts.
-
+ Returns a list of column metadata objects.
- :param str compartment_id: (required)
- A filter to return only resources that match the specified compartment OCID.
- :param str id: (optional)
- A filter to return alert by it's OCID.
+ :param str target_database_id: (required)
+ The OCID of the Data Safe target database.
- :param bool compartment_id_in_subtree: (optional)
- Default is false.
- When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting.
+ :param str opc_request_id: (optional)
+ Unique identifier for the request.
:param int limit: (optional)
For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
@@ -14787,16 +17767,17 @@ def list_alerts(self, compartment_id, **kwargs):
__ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
- :param str opc_request_id: (optional)
- Unique identifier for the request.
+ :param list[str] schema_name: (optional)
+ A filter to return only items related to specific schema name.
- :param str access_level: (optional)
- Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED.
- Setting this to ACCESSIBLE returns only those compartments for which the
- user has INSPECT permissions directly or indirectly (permissions can be on a
- resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed.
+ :param list[str] table_name: (optional)
+ A filter to return only items related to specific table name.
- Allowed values are: "RESTRICTED", "ACCESSIBLE"
+ :param list[str] column_name: (optional)
+ A filter to return only a specific column based on column name.
+
+ :param list[str] datatype: (optional)
+ A filter to return only items related to specific datatype.
:param str sort_order: (optional)
The sort order to use, either ascending (ASC) or descending (DESC).
@@ -14804,40 +17785,18 @@ def list_alerts(self, compartment_id, **kwargs):
Allowed values are: "ASC", "DESC"
:param str sort_by: (optional)
- The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. If no value is specified timeCreated is default.
-
- Allowed values are: "displayName", "timeCreated"
-
- :param str scim_query: (optional)
- The scimQuery query parameter accepts filter expressions that use the syntax described in Section 3.2.2.2
- of the System for Cross-Domain Identity Management (SCIM) specification, which is available
- at `RFC3339`__. In SCIM filtering expressions,
- text, date, and time values must be enclosed in quotation marks, with date and time values using ISO-8601 format.
- (Numeric and boolean values should not be quoted.)
+ The field used for sorting. Only one sorting order (sortOrder) can be specified.
- **Example:** |
- query=(timeCreated ge '2021-06-04T01-00-26') and (targetNames eq 'target_1')
- query=(featureDetails.userName eq \"user\") and (targetNames eq \"target_1\")
- Supported fields:
- severity
- status
- alertType
- targetIds
- targetNames
- operationTime
- lifecycleState
- displayName
- timeCreated
- timeUpdated
- featureDetails.* (* can be any field in nestedStrMap in Feature Attributes in Alert Summary. For example -
- userName,object,clientHostname,osUserName,clientIPs,clientId,commandText,commandParam,clientProgram,objectType,targetOwner)
+ Allowed values are: "SCHEMANAME", "TABLENAME", "COLUMNNAME", "DATATYPE"
- __ https://tools.ietf.org/html/draft-ietf-scim-api-12
+ :param str schema_name_contains: (optional)
+ A filter to return only items if schema name contains a specific string.
- :param list[str] field: (optional)
- Specifies a subset of fields to be returned in the response.
+ :param str table_name_contains: (optional)
+ A filter to return only items if table name contains a specific string.
- Allowed values are: "id", "displayName", "alertType", "targetIds", "targetNames", "severity", "status", "operationTime", "operation", "operationStatus", "timeCreated", "timeUpdated", "policyId", "lifecycleState"
+ :param str column_name_contains: (optional)
+ A filter to return only items if column name contains a specific string.
:param obj retry_strategy: (optional)
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
@@ -14851,45 +17810,50 @@ def list_alerts(self, compartment_id, **kwargs):
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.AlertCollection`
+ :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.data_safe.models.ColumnSummary`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use list_alerts API.
+ Click `here `__ to see an example of how to use list_columns API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
- required_arguments = ['compartmentId']
- resource_path = "/alerts"
+ required_arguments = ['targetDatabaseId']
+ resource_path = "/targetDatabases/{targetDatabaseId}/columns"
method = "GET"
- operation_name = "list_alerts"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/AlertSummary/ListAlerts"
+ operation_name = "list_columns"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/TargetDatabase/ListColumns"
# Don't accept unknown kwargs
expected_kwargs = [
"allow_control_chars",
"retry_strategy",
- "id",
- "compartment_id_in_subtree",
+ "opc_request_id",
"limit",
"page",
- "opc_request_id",
- "access_level",
+ "schema_name",
+ "table_name",
+ "column_name",
+ "datatype",
"sort_order",
"sort_by",
- "scim_query",
- "field"
+ "schema_name_contains",
+ "table_name_contains",
+ "column_name_contains"
]
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"list_alerts got unknown kwargs: {extra_kwargs!r}")
+ f"list_columns got unknown kwargs: {extra_kwargs!r}")
- if 'access_level' in kwargs:
- access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"]
- if kwargs['access_level'] not in access_level_allowed_values:
- raise ValueError(
- f"Invalid value for `access_level`, must be one of { access_level_allowed_values }"
- )
+ path_params = {
+ "targetDatabaseId": target_database_id
+ }
+
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
+
+ for (k, v) in six.iteritems(path_params):
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
+ raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
if 'sort_order' in kwargs:
sort_order_allowed_values = ["ASC", "DESC"]
@@ -14899,31 +17863,24 @@ def list_alerts(self, compartment_id, **kwargs):
)
if 'sort_by' in kwargs:
- sort_by_allowed_values = ["displayName", "timeCreated"]
+ sort_by_allowed_values = ["SCHEMANAME", "TABLENAME", "COLUMNNAME", "DATATYPE"]
if kwargs['sort_by'] not in sort_by_allowed_values:
raise ValueError(
f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
)
- if 'field' in kwargs:
- field_allowed_values = ["id", "displayName", "alertType", "targetIds", "targetNames", "severity", "status", "operationTime", "operation", "operationStatus", "timeCreated", "timeUpdated", "policyId", "lifecycleState"]
- for field_item in kwargs['field']:
- if field_item not in field_allowed_values:
- raise ValueError(
- f"Invalid value for `field`, must be one of { field_allowed_values }"
- )
-
query_params = {
- "id": kwargs.get("id", missing),
- "compartmentId": compartment_id,
- "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing),
"limit": kwargs.get("limit", missing),
"page": kwargs.get("page", missing),
- "accessLevel": kwargs.get("access_level", missing),
+ "schemaName": self.base_client.generate_collection_format_param(kwargs.get("schema_name", missing), 'multi'),
+ "tableName": self.base_client.generate_collection_format_param(kwargs.get("table_name", missing), 'multi'),
+ "columnName": self.base_client.generate_collection_format_param(kwargs.get("column_name", missing), 'multi'),
+ "datatype": self.base_client.generate_collection_format_param(kwargs.get("datatype", missing), 'multi'),
"sortOrder": kwargs.get("sort_order", missing),
"sortBy": kwargs.get("sort_by", missing),
- "scimQuery": kwargs.get("scim_query", missing),
- "field": self.base_client.generate_collection_format_param(kwargs.get("field", missing), 'multi')
+ "schemaNameContains": kwargs.get("schema_name_contains", missing),
+ "tableNameContains": kwargs.get("table_name_contains", missing),
+ "columnNameContains": kwargs.get("column_name_contains", missing)
}
query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
@@ -14949,9 +17906,10 @@ def list_alerts(self, compartment_id, **kwargs):
self.base_client.call_api,
resource_path=resource_path,
method=method,
+ path_params=path_params,
query_params=query_params,
header_params=header_params,
- response_type="AlertCollection",
+ response_type="list[ColumnSummary]",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -14960,17 +17918,18 @@ def list_alerts(self, compartment_id, **kwargs):
return self.base_client.call_api(
resource_path=resource_path,
method=method,
+ path_params=path_params,
query_params=query_params,
header_params=header_params,
- response_type="AlertCollection",
+ response_type="list[ColumnSummary]",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def list_audit_archive_retrievals(self, compartment_id, **kwargs):
+ def list_data_safe_private_endpoints(self, compartment_id, **kwargs):
"""
- Returns the list of audit archive retrieval.
+ Gets a list of Data Safe private endpoints.
:param str compartment_id: (required)
@@ -14979,23 +17938,13 @@ def list_audit_archive_retrievals(self, compartment_id, **kwargs):
:param str display_name: (optional)
A filter to return only resources that match the specified display name.
- :param bool compartment_id_in_subtree: (optional)
- Default is false.
- When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting.
-
- :param str access_level: (optional)
- Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED.
- Setting this to ACCESSIBLE returns only those compartments for which the
- user has INSPECT permissions directly or indirectly (permissions can be on a
- resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed.
-
- Allowed values are: "RESTRICTED", "ACCESSIBLE"
+ :param str vcn_id: (optional)
+ A filter to return only resources that match the specified VCN OCID.
- :param str audit_archive_retrieval_id: (optional)
- OCID of the archive retrieval.
+ :param str lifecycle_state: (optional)
+ A filter to return only resources that match the specified lifecycle state.
- :param str target_id: (optional)
- The OCID of the target associated with the archive retrieval.
+ Allowed values are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED", "NA"
:param int limit: (optional)
For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
@@ -15007,14 +17956,6 @@ def list_audit_archive_retrievals(self, compartment_id, **kwargs):
__ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
- :param str lifecycle_state: (optional)
- A filter to return only resources that matches the specified lifecycle state.
-
- Allowed values are: "CREATING", "ACTIVE", "NEEDS_ATTENTION", "FAILED", "DELETING", "DELETED", "UPDATING"
-
- :param datetime time_of_expiry: (optional)
- The date time when retrieved archive data will be deleted from Data Safe and unloaded back into archival.
-
:param str sort_order: (optional)
The sort order to use, either ascending (ASC) or descending (DESC).
@@ -15030,6 +17971,18 @@ def list_audit_archive_retrievals(self, compartment_id, **kwargs):
:param str opc_request_id: (optional)
Unique identifier for the request.
+ :param bool compartment_id_in_subtree: (optional)
+ Default is false.
+ When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting.
+
+ :param str access_level: (optional)
+ Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED.
+ Setting this to ACCESSIBLE returns only those compartments for which the
+ user has INSPECT permissions directly or indirectly (permissions can be on a
+ resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed.
+
+ Allowed values are: "RESTRICTED", "ACCESSIBLE"
+
:param obj retry_strategy: (optional)
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
@@ -15042,50 +17995,41 @@ def list_audit_archive_retrievals(self, compartment_id, **kwargs):
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.AuditArchiveRetrievalCollection`
+ :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.data_safe.models.DataSafePrivateEndpointSummary`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use list_audit_archive_retrievals API.
+ Click `here `__ to see an example of how to use list_data_safe_private_endpoints API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
required_arguments = ['compartmentId']
- resource_path = "/auditArchiveRetrievals"
+ resource_path = "/dataSafePrivateEndpoints"
method = "GET"
- operation_name = "list_audit_archive_retrievals"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/AuditArchiveRetrieval/ListAuditArchiveRetrievals"
+ operation_name = "list_data_safe_private_endpoints"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/DataSafePrivateEndpointSummary/ListDataSafePrivateEndpoints"
# Don't accept unknown kwargs
expected_kwargs = [
"allow_control_chars",
"retry_strategy",
"display_name",
- "compartment_id_in_subtree",
- "access_level",
- "audit_archive_retrieval_id",
- "target_id",
+ "vcn_id",
+ "lifecycle_state",
"limit",
"page",
- "lifecycle_state",
- "time_of_expiry",
"sort_order",
"sort_by",
- "opc_request_id"
+ "opc_request_id",
+ "compartment_id_in_subtree",
+ "access_level"
]
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"list_audit_archive_retrievals got unknown kwargs: {extra_kwargs!r}")
-
- if 'access_level' in kwargs:
- access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"]
- if kwargs['access_level'] not in access_level_allowed_values:
- raise ValueError(
- f"Invalid value for `access_level`, must be one of { access_level_allowed_values }"
- )
+ f"list_data_safe_private_endpoints got unknown kwargs: {extra_kwargs!r}")
if 'lifecycle_state' in kwargs:
- lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "NEEDS_ATTENTION", "FAILED", "DELETING", "DELETED", "UPDATING"]
+ lifecycle_state_allowed_values = ["CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED", "NA"]
if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values:
raise ValueError(
f"Invalid value for `lifecycle_state`, must be one of { lifecycle_state_allowed_values }"
@@ -15105,19 +18049,24 @@ def list_audit_archive_retrievals(self, compartment_id, **kwargs):
f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
)
+ if 'access_level' in kwargs:
+ access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"]
+ if kwargs['access_level'] not in access_level_allowed_values:
+ raise ValueError(
+ f"Invalid value for `access_level`, must be one of { access_level_allowed_values }"
+ )
+
query_params = {
- "displayName": kwargs.get("display_name", missing),
"compartmentId": compartment_id,
- "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing),
- "accessLevel": kwargs.get("access_level", missing),
- "auditArchiveRetrievalId": kwargs.get("audit_archive_retrieval_id", missing),
- "targetId": kwargs.get("target_id", missing),
+ "displayName": kwargs.get("display_name", missing),
+ "vcnId": kwargs.get("vcn_id", missing),
+ "lifecycleState": kwargs.get("lifecycle_state", missing),
"limit": kwargs.get("limit", missing),
"page": kwargs.get("page", missing),
- "lifecycleState": kwargs.get("lifecycle_state", missing),
- "timeOfExpiry": kwargs.get("time_of_expiry", missing),
"sortOrder": kwargs.get("sort_order", missing),
- "sortBy": kwargs.get("sort_by", missing)
+ "sortBy": kwargs.get("sort_by", missing),
+ "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing),
+ "accessLevel": kwargs.get("access_level", missing)
}
query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
@@ -15145,7 +18094,7 @@ def list_audit_archive_retrievals(self, compartment_id, **kwargs):
method=method,
query_params=query_params,
header_params=header_params,
- response_type="AuditArchiveRetrievalCollection",
+ response_type="list[DataSafePrivateEndpointSummary]",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -15156,53 +18105,33 @@ def list_audit_archive_retrievals(self, compartment_id, **kwargs):
method=method,
query_params=query_params,
header_params=header_params,
- response_type="AuditArchiveRetrievalCollection",
+ response_type="list[DataSafePrivateEndpointSummary]",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def list_audit_event_analytics(self, compartment_id, **kwargs):
+ def list_database_security_configs(self, compartment_id, **kwargs):
"""
- By default the ListAuditEventAnalytics operation will return all of the summary columns. To filter for a specific summary column, specify
- it in the `summaryField` query parameter.
+ Retrieves a list of all database security configurations in Data Safe.
- **Example:**
- /ListAuditEventAnalytics?summaryField=targetName&summaryField=userName&summaryField=clientHostname
- &summaryField=dmls&summaryField=privilegeChanges&summaryField=ddls&summaryField=loginFailure&summaryField=loginSuccess
- &summaryField=allRecord&q=(auditEventTime ge \"2021-06-13T23:49:14\")
+ The ListDatabaseSecurityConfigs operation returns only the database security configurations in the specified `compartmentId`.
- /ListAuditEventAnalytics?timeStarted=2022-08-18T11:02:26.000Z&timeEnded=2022-08-24T11:02:26.000Z
- This will give number of events grouped by periods. Period can be 1 day, 1 week, etc.
+ The parameter `accessLevel` specifies whether to return only those compartments for which the
+ requestor has INSPECT permissions on at least one resource directly
+ or indirectly (ACCESSIBLE) (the resource can be in a subcompartment) or to return Not Authorized if
+ Principal doesn't have access to even one of the child compartments. This is valid only when
+ `compartmentIdInSubtree` is set to `true`.
- /ListAuditEventAnalytics?summaryField=targetName&groupBy=targetName
- This will give the number of events group by targetName. Only targetName summary column would be returned.
+ The parameter `compartmentIdInSubtree` applies when you perform ListDatabaseSecurityConfigs on the
+ `compartmentId` passed and when it is set to true, the entire hierarchy of compartments can be returned.
+ To get a full list of all compartments and subcompartments in the tenancy (root compartment),
+ set the parameter `compartmentIdInSubtree` to true and `accessLevel` to ACCESSIBLE.
:param str compartment_id: (required)
A filter to return only resources that match the specified compartment OCID.
- :param str opc_request_id: (optional)
- Unique identifier for the request.
-
- :param str if_match: (optional)
- For optimistic concurrency control. In the PUT or DELETE call
- for a resource, set the if-match parameter to the value of the
- etag from a previous GET or POST response for that resource.
- The resource will be updated or deleted only if the etag you
- provide matches the resource's current etag value.
-
- :param int limit: (optional)
- For details about how pagination works, see `List Pagination`__.
-
- __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
-
- :param str page: (optional)
- It is usually retrieved from a previous \"List\" call. For details about how pagination works,
- see `List Pagination`__.
-
- __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
-
:param bool compartment_id_in_subtree: (optional)
Default is false.
When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting.
@@ -15215,48 +18144,46 @@ def list_audit_event_analytics(self, compartment_id, **kwargs):
Allowed values are: "RESTRICTED", "ACCESSIBLE"
- :param str scim_query: (optional)
- The scimQuery query parameter accepts filter expressions that use the syntax described in Section 3.2.2.2
- of the System for Cross-Domain Identity Management (SCIM) specification, which is available
- at `RFC3339`__. In SCIM filtering expressions,
- text, date, and time values must be enclosed in quotation marks, with date and time values using ISO-8601 format.
- (Numeric and boolean values should not be quoted.)
+ :param str display_name: (optional)
+ A filter to return only resources that match the specified display name.
- **Example:** query=(operationTime ge '2021-06-04T01-00-26') and (eventName eq 'LOGON')
+ :param int limit: (optional)
+ For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
- __ https://tools.ietf.org/html/draft-ietf-scim-api-12
+ __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
- :param list[str] summary_field: (optional)
- Specifies a subset of summarized fields to be returned in the response.
+ :param str page: (optional)
+ For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__.
- Allowed values are: "auditEventTime", "dbUserName", "targetId", "targetName", "targetClass", "objectType", "clientHostname", "clientProgram", "clientId", "auditType", "eventName", "allRecord", "auditSettingsChange", "dbSchemaChange", "entitlementChange", "loginFailure", "loginSuccess", "allViolations", "realmViolations", "ruleViolations", "dvconfigActivities", "ddls", "dmls", "privilegeChanges", "auditSettingsEnables", "auditSettingsDisables", "selects", "creates", "alters", "drops", "grants", "revokes"
+ __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
- :param datetime time_started: (optional)
- An optional filter to return audit events whose creation time in the database is greater than and equal to the date-time specified,
- in the format defined by `RFC3339`__.
+ :param str lifecycle_state: (optional)
+ The current state of the database security configuration.
- __ https://tools.ietf.org/html/rfc3339
+ Allowed values are: "CREATING", "UPDATING", "ACTIVE", "FAILED", "NEEDS_ATTENTION", "DELETING", "DELETED"
- :param datetime time_ended: (optional)
- An optional filter to return audit events whose creation time in the database is less than and equal to the date-time specified,
- in the format defined by `RFC3339`__.
+ :param str database_security_config_id: (optional)
+ An optional filter to return only resources that match the specified OCID of the database security configuration resource.
- __ https://tools.ietf.org/html/rfc3339
+ :param datetime time_created_greater_than_or_equal_to: (optional)
+ A filter to return only the resources that were created after the specified date and time, as defined by `RFC3339`__.
+ Using TimeCreatedGreaterThanOrEqualToQueryParam parameter retrieves all resources created after that date.
- :param str query_time_zone: (optional)
- Default time zone is UTC if no time zone provided. The date-time considerations of the resource will be in accordance with the specified time zone.
+ **Example:** 2016-12-19T16:39:57.600Z
- :param list[str] group_by: (optional)
- A groupBy can only be used in combination with summaryField parameter.
- A groupBy value has to be a subset of the values mentioned in summaryField parameter.
+ __ https://tools.ietf.org/html/rfc3339
- Allowed values are: "auditEventTime", "dbUserName", "targetId", "targetName", "targetClass", "objectType", "clientHostname", "clientProgram", "clientId", "auditType", "eventName"
+ :param datetime time_created_less_than: (optional)
+ Search for resources that were created before a specific date.
+ Specifying this parameter corresponding `timeCreatedLessThan`
+ parameter will retrieve all resources created before the
+ specified created date, in \"YYYY-MM-ddThh:mmZ\" format with a Z offset, as
+ defined by RFC 3339.
- :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.
+ **Example:** 2016-12-19T16:39:57.600Z
+
+ :param str target_id: (optional)
+ A filter to return only items related to a specific target OCID.
:param str sort_order: (optional)
The sort order to use, either ascending (ASC) or descending (DESC).
@@ -15264,9 +18191,14 @@ def list_audit_event_analytics(self, compartment_id, **kwargs):
Allowed values are: "ASC", "DESC"
:param str sort_by: (optional)
- If this query parameter is specified, the result is ordered based on this query parameter value.
+ The field used for sorting. Only one sorting order (sortOrder) can be specified.
+ The default order for TIMECREATED is descending. The default order for DISPLAYNAME is ascending.
+ The DISPLAYNAME sort order is case sensitive.
- Allowed values are: "targetId", "targetClass", "targetName", "objectType", "dbUserName", "eventName", "auditEventTime", "clientHostname", "clientProgram", "clientId", "auditType"
+ Allowed values are: "TIMECREATED", "DISPLAYNAME"
+
+ :param str opc_request_id: (optional)
+ Unique identifier for the request.
:param obj retry_strategy: (optional)
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
@@ -15280,43 +18212,41 @@ def list_audit_event_analytics(self, compartment_id, **kwargs):
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.AuditEventAnalyticsCollection`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.DatabaseSecurityConfigCollection`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use list_audit_event_analytics API.
+ Click `here `__ to see an example of how to use list_database_security_configs API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
required_arguments = ['compartmentId']
- resource_path = "/auditEventAnalytics"
+ resource_path = "/databaseSecurityConfigs"
method = "GET"
- operation_name = "list_audit_event_analytics"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/AuditEventSummary/ListAuditEventAnalytics"
+ operation_name = "list_database_security_configs"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/DatabaseSecurityConfigCollection/ListDatabaseSecurityConfigs"
# Don't accept unknown kwargs
expected_kwargs = [
"allow_control_chars",
"retry_strategy",
- "opc_request_id",
- "if_match",
- "limit",
- "page",
"compartment_id_in_subtree",
"access_level",
- "scim_query",
- "summary_field",
- "time_started",
- "time_ended",
- "query_time_zone",
- "group_by",
- "opc_retry_token",
+ "display_name",
+ "limit",
+ "page",
+ "lifecycle_state",
+ "database_security_config_id",
+ "time_created_greater_than_or_equal_to",
+ "time_created_less_than",
+ "target_id",
"sort_order",
- "sort_by"
+ "sort_by",
+ "opc_request_id"
]
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"list_audit_event_analytics got unknown kwargs: {extra_kwargs!r}")
+ f"list_database_security_configs got unknown kwargs: {extra_kwargs!r}")
if 'access_level' in kwargs:
access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"]
@@ -15325,21 +18255,12 @@ def list_audit_event_analytics(self, compartment_id, **kwargs):
f"Invalid value for `access_level`, must be one of { access_level_allowed_values }"
)
- if 'summary_field' in kwargs:
- summary_field_allowed_values = ["auditEventTime", "dbUserName", "targetId", "targetName", "targetClass", "objectType", "clientHostname", "clientProgram", "clientId", "auditType", "eventName", "allRecord", "auditSettingsChange", "dbSchemaChange", "entitlementChange", "loginFailure", "loginSuccess", "allViolations", "realmViolations", "ruleViolations", "dvconfigActivities", "ddls", "dmls", "privilegeChanges", "auditSettingsEnables", "auditSettingsDisables", "selects", "creates", "alters", "drops", "grants", "revokes"]
- for summary_field_item in kwargs['summary_field']:
- if summary_field_item not in summary_field_allowed_values:
- raise ValueError(
- f"Invalid value for `summary_field`, must be one of { summary_field_allowed_values }"
- )
-
- if 'group_by' in kwargs:
- group_by_allowed_values = ["auditEventTime", "dbUserName", "targetId", "targetName", "targetClass", "objectType", "clientHostname", "clientProgram", "clientId", "auditType", "eventName"]
- for group_by_item in kwargs['group_by']:
- if group_by_item not in group_by_allowed_values:
- raise ValueError(
- f"Invalid value for `group_by`, must be one of { group_by_allowed_values }"
- )
+ if 'lifecycle_state' in kwargs:
+ lifecycle_state_allowed_values = ["CREATING", "UPDATING", "ACTIVE", "FAILED", "NEEDS_ATTENTION", "DELETING", "DELETED"]
+ if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values:
+ raise ValueError(
+ f"Invalid value for `lifecycle_state`, must be one of { lifecycle_state_allowed_values }"
+ )
if 'sort_order' in kwargs:
sort_order_allowed_values = ["ASC", "DESC"]
@@ -15349,24 +18270,24 @@ def list_audit_event_analytics(self, compartment_id, **kwargs):
)
if 'sort_by' in kwargs:
- sort_by_allowed_values = ["targetId", "targetClass", "targetName", "objectType", "dbUserName", "eventName", "auditEventTime", "clientHostname", "clientProgram", "clientId", "auditType"]
+ sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"]
if kwargs['sort_by'] not in sort_by_allowed_values:
raise ValueError(
f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
)
query_params = {
- "compartmentId": compartment_id,
- "limit": kwargs.get("limit", missing),
- "page": kwargs.get("page", missing),
+ "compartmentId": compartment_id,
"compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing),
"accessLevel": kwargs.get("access_level", missing),
- "scimQuery": kwargs.get("scim_query", missing),
- "summaryField": self.base_client.generate_collection_format_param(kwargs.get("summary_field", missing), 'multi'),
- "timeStarted": kwargs.get("time_started", missing),
- "timeEnded": kwargs.get("time_ended", missing),
- "queryTimeZone": kwargs.get("query_time_zone", missing),
- "groupBy": self.base_client.generate_collection_format_param(kwargs.get("group_by", missing), 'multi'),
+ "displayName": kwargs.get("display_name", missing),
+ "limit": kwargs.get("limit", missing),
+ "page": kwargs.get("page", missing),
+ "lifecycleState": kwargs.get("lifecycle_state", missing),
+ "databaseSecurityConfigId": kwargs.get("database_security_config_id", missing),
+ "timeCreatedGreaterThanOrEqualTo": kwargs.get("time_created_greater_than_or_equal_to", missing),
+ "timeCreatedLessThan": kwargs.get("time_created_less_than", missing),
+ "targetId": kwargs.get("target_id", missing),
"sortOrder": kwargs.get("sort_order", missing),
"sortBy": kwargs.get("sort_by", missing)
}
@@ -15375,9 +18296,7 @@ def list_audit_event_analytics(self, compartment_id, **kwargs):
header_params = {
"accept": "application/json",
"content-type": "application/json",
- "opc-request-id": kwargs.get("opc_request_id", missing),
- "if-match": kwargs.get("if_match", missing),
- "opc-retry-token": kwargs.get("opc_retry_token", missing)
+ "opc-request-id": kwargs.get("opc_request_id", missing)
}
header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
@@ -15390,7 +18309,6 @@ def list_audit_event_analytics(self, compartment_id, **kwargs):
if retry_strategy:
if not isinstance(retry_strategy, retry.NoneRetryStrategy):
- self.base_client.add_opc_retry_token_if_needed(header_params)
self.base_client.add_opc_client_retries_header(header_params)
retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
return retry_strategy.make_retrying_call(
@@ -15399,7 +18317,7 @@ def list_audit_event_analytics(self, compartment_id, **kwargs):
method=method,
query_params=query_params,
header_params=header_params,
- response_type="AuditEventAnalyticsCollection",
+ response_type="DatabaseSecurityConfigCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -15410,55 +18328,29 @@ def list_audit_event_analytics(self, compartment_id, **kwargs):
method=method,
query_params=query_params,
header_params=header_params,
- response_type="AuditEventAnalyticsCollection",
+ response_type="DatabaseSecurityConfigCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def list_audit_events(self, compartment_id, **kwargs):
+ def list_database_table_access_entries(self, security_policy_report_id, **kwargs):
"""
- The ListAuditEvents operation returns specified `compartmentId` audit Events only.
- The list does not include any audit Events associated with the `subcompartments` of the specified `compartmentId`.
-
- The parameter `accessLevel` specifies whether to return only those compartments for which the
- requestor has INSPECT permissions on at least one resource directly
- or indirectly (ACCESSIBLE) (the resource can be in a subcompartment) or to return Not Authorized if
- Principal doesn't have access to even one of the child compartments. This is valid only when
- `compartmentIdInSubtree` is set to `true`.
-
- The parameter `compartmentIdInSubtree` applies when you perform ListAuditEvents on the
- `compartmentId` passed and when it is set to true, the entire hierarchy of compartments can be returned.
- To get a full list of all compartments and subcompartments in the tenancy (root compartment),
- set the parameter `compartmentIdInSubtree` to true and `accessLevel` to ACCESSIBLE.
-
-
- :param str compartment_id: (required)
- A filter to return only resources that match the specified compartment OCID.
-
- :param str opc_request_id: (optional)
- Unique identifier for the request.
+ Retrieves a list of all database table access entries in Data Safe.
- :param bool compartment_id_in_subtree: (optional)
- Default is false.
- When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting.
+ The ListDatabaseTableAccessEntries operation returns only the database table access reports for the specified security policy report.
- :param str access_level: (optional)
- Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED.
- Setting this to ACCESSIBLE returns only those compartments for which the
- user has INSPECT permissions directly or indirectly (permissions can be on a
- resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed.
- Allowed values are: "RESTRICTED", "ACCESSIBLE"
+ :param str security_policy_report_id: (required)
+ The OCID of the security policy report resource.
:param int limit: (optional)
- For details about how pagination works, see `List Pagination`__.
+ For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
__ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
:param str page: (optional)
- It is usually retrieved from a previous \"List\" call. For details about how pagination works,
- see `List Pagination`__.
+ For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__.
__ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
@@ -15469,19 +18361,22 @@ def list_audit_events(self, compartment_id, **kwargs):
text, date, and time values must be enclosed in quotation marks, with date and time values using ISO-8601 format.
(Numeric and boolean values should not be quoted.)
- **Example:** query=(operationTime ge '2021-06-04T01-00-26') and (eventName eq 'LOGON')
+ **Example:** query=(accessType eq 'SELECT') and (grantee eq 'ADMIN')
__ https://tools.ietf.org/html/draft-ietf-scim-api-12
+ :param str sort_by: (optional)
+ The field to sort by. Only one sort parameter should be provided.
+
+ Allowed values are: "key", "grantee", "accessType", "tableSchema", "tableName", "privilegeType", "privilege", "privilegeGrantable", "grantFromRole", "accessThroughObject", "columnName", "grantor", "areAllTablesAccessible", "isAccessConstrainedByView", "isAccessConstrainedByLabelSecurity", "isAccessConstrainedByDatabaseVault", "isAccessConstrainedByVirtualPrivateDatabase", "isAccessConstrainedByRedaction", "isAccessConstrainedByRealApplicationSecurity", "isAccessConstrainedBySqlFirewall", "isSensitive"
+
:param str sort_order: (optional)
The sort order to use, either ascending (ASC) or descending (DESC).
Allowed values are: "ASC", "DESC"
- :param str sort_by: (optional)
- If this query parameter is specified, the result is sorted by this query parameter value.
-
- Allowed values are: "dbUserName", "targetName", "databaseType", "targetClass", "auditEventTime", "timeCollected", "osUserName", "operation", "operationStatus", "eventName", "errorCode", "errorMessage", "objectType", "objectName", "objectOwner", "clientHostname", "clientIp", "isAlerted", "actionTaken", "clientProgram", "commandText", "commandParam", "extendedEventAttributes", "auditLocation", "osTerminal", "clientId", "auditPolicies", "auditType"
+ :param str opc_request_id: (optional)
+ Unique identifier for the request.
:param obj retry_strategy: (optional)
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
@@ -15495,42 +18390,50 @@ def list_audit_events(self, compartment_id, **kwargs):
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.AuditEventCollection`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.DatabaseTableAccessEntryCollection`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use list_audit_events API.
+ Click `here `__ to see an example of how to use list_database_table_access_entries API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
- required_arguments = ['compartmentId']
- resource_path = "/auditEvents"
+ required_arguments = ['securityPolicyReportId']
+ resource_path = "/securityPolicyReports/{securityPolicyReportId}/databaseTableAccessEntries"
method = "GET"
- operation_name = "list_audit_events"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/AuditEventSummary/ListAuditEvents"
+ operation_name = "list_database_table_access_entries"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/DatabaseTableAccessEntryCollection/ListDatabaseTableAccessEntries"
# Don't accept unknown kwargs
expected_kwargs = [
"allow_control_chars",
"retry_strategy",
- "opc_request_id",
- "compartment_id_in_subtree",
- "access_level",
"limit",
"page",
"scim_query",
+ "sort_by",
"sort_order",
- "sort_by"
+ "opc_request_id"
]
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"list_audit_events got unknown kwargs: {extra_kwargs!r}")
+ f"list_database_table_access_entries got unknown kwargs: {extra_kwargs!r}")
- if 'access_level' in kwargs:
- access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"]
- if kwargs['access_level'] not in access_level_allowed_values:
+ path_params = {
+ "securityPolicyReportId": security_policy_report_id
+ }
+
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
+
+ for (k, v) in six.iteritems(path_params):
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
+ raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
+
+ if 'sort_by' in kwargs:
+ sort_by_allowed_values = ["key", "grantee", "accessType", "tableSchema", "tableName", "privilegeType", "privilege", "privilegeGrantable", "grantFromRole", "accessThroughObject", "columnName", "grantor", "areAllTablesAccessible", "isAccessConstrainedByView", "isAccessConstrainedByLabelSecurity", "isAccessConstrainedByDatabaseVault", "isAccessConstrainedByVirtualPrivateDatabase", "isAccessConstrainedByRedaction", "isAccessConstrainedByRealApplicationSecurity", "isAccessConstrainedBySqlFirewall", "isSensitive"]
+ if kwargs['sort_by'] not in sort_by_allowed_values:
raise ValueError(
- f"Invalid value for `access_level`, must be one of { access_level_allowed_values }"
+ f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
)
if 'sort_order' in kwargs:
@@ -15540,27 +18443,17 @@ def list_audit_events(self, compartment_id, **kwargs):
f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }"
)
- if 'sort_by' in kwargs:
- sort_by_allowed_values = ["dbUserName", "targetName", "databaseType", "targetClass", "auditEventTime", "timeCollected", "osUserName", "operation", "operationStatus", "eventName", "errorCode", "errorMessage", "objectType", "objectName", "objectOwner", "clientHostname", "clientIp", "isAlerted", "actionTaken", "clientProgram", "commandText", "commandParam", "extendedEventAttributes", "auditLocation", "osTerminal", "clientId", "auditPolicies", "auditType"]
- if kwargs['sort_by'] not in sort_by_allowed_values:
- raise ValueError(
- f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
- )
-
query_params = {
- "compartmentId": compartment_id,
- "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing),
- "accessLevel": kwargs.get("access_level", missing),
"limit": kwargs.get("limit", missing),
"page": kwargs.get("page", missing),
"scimQuery": kwargs.get("scim_query", missing),
- "sortOrder": kwargs.get("sort_order", missing),
- "sortBy": kwargs.get("sort_by", 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, application/xml",
+ "accept": "application/json",
"content-type": "application/json",
"opc-request-id": kwargs.get("opc_request_id", missing)
}
@@ -15581,9 +18474,10 @@ def list_audit_events(self, compartment_id, **kwargs):
self.base_client.call_api,
resource_path=resource_path,
method=method,
+ path_params=path_params,
query_params=query_params,
header_params=header_params,
- response_type="AuditEventCollection",
+ response_type="DatabaseTableAccessEntryCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -15592,50 +18486,24 @@ def list_audit_events(self, compartment_id, **kwargs):
return self.base_client.call_api(
resource_path=resource_path,
method=method,
+ path_params=path_params,
query_params=query_params,
header_params=header_params,
- response_type="AuditEventCollection",
+ response_type="DatabaseTableAccessEntryCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def list_audit_policies(self, compartment_id, **kwargs):
+ def list_database_view_access_entries(self, security_policy_report_id, **kwargs):
"""
- Retrieves a list of all audited targets with their corresponding provisioned audit policies, and their provisioning conditions.
-
- The ListAuditPolicies operation returns only the audit policies in the specified `compartmentId`.
- The list does not include any subcompartments of the compartmentId passed.
-
- The parameter `accessLevel` specifies whether to return only those compartments for which the
- requestor has INSPECT permissions on at least one resource directly
- or indirectly (ACCESSIBLE) (the resource can be in a subcompartment) or to return Not Authorized if
- Principal doesn't have access to even one of the child compartments. This is valid only when
- `compartmentIdInSubtree` is set to `true`.
-
- The parameter `compartmentIdInSubtree` applies when you perform ListAuditPolicies on the
- `compartmentId` passed and when it is set to true, the entire hierarchy of compartments can be returned.
- To get a full list of all compartments and subcompartments in the tenancy (root compartment),
- set the parameter `compartmentIdInSubtree` to true and `accessLevel` to ACCESSIBLE.
-
+ Retrieves a list of all database view access entries in Data Safe.
- :param str compartment_id: (required)
- A filter to return only resources that match the specified compartment OCID.
-
- :param bool compartment_id_in_subtree: (optional)
- Default is false.
- When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting.
-
- :param str access_level: (optional)
- Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED.
- Setting this to ACCESSIBLE returns only those compartments for which the
- user has INSPECT permissions directly or indirectly (permissions can be on a
- resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed.
+ The ListDatabaseViewAccessEntries operation returns only the database view access objects for the specified security policy report.
- Allowed values are: "RESTRICTED", "ACCESSIBLE"
- :param str display_name: (optional)
- A filter to return only resources that match the specified display name.
+ :param str security_policy_report_id: (required)
+ The OCID of the security policy report resource.
:param int limit: (optional)
For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
@@ -15647,29 +18515,30 @@ def list_audit_policies(self, compartment_id, **kwargs):
__ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
+ :param str scim_query: (optional)
+ The scimQuery query parameter accepts filter expressions that use the syntax described in Section 3.2.2.2
+ of the System for Cross-Domain Identity Management (SCIM) specification, which is available
+ at `RFC3339`__. In SCIM filtering expressions,
+ text, date, and time values must be enclosed in quotation marks, with date and time values using ISO-8601 format.
+ (Numeric and boolean values should not be quoted.)
+
+ **Example:** query=(accessType eq 'SELECT') and (grantee eq 'ADMIN')
+
+ __ https://tools.ietf.org/html/draft-ietf-scim-api-12
+
:param str target_id: (optional)
A filter to return only items related to a specific target OCID.
- :param str lifecycle_state: (optional)
- The current state of the audit policy.
-
- Allowed values are: "CREATING", "UPDATING", "ACTIVE", "FAILED", "NEEDS_ATTENTION", "DELETING", "DELETED"
+ :param str sort_by: (optional)
+ The field to sort by. Only one sort parameter should be provided.
- :param str audit_policy_id: (optional)
- An optional filter to return only resources that match the specified id.
+ Allowed values are: "key", "grantee", "accessType", "tableSchema", "tableName", "viewSchema", "viewName", "privilegeType", "privilege", "privilegeGrantable", "grantFromRole", "accessThroughObject", "columnName", "grantor", "isAccessConstrainedByDatabaseVault", "isAccessConstrainedByVirtualPrivateDatabase", "isAccessConstrainedByRedaction", "isAccessConstrainedByRealApplicationSecurity", "isAccessConstrainedBySqlFirewall"
:param str sort_order: (optional)
The sort order to use, either ascending (ASC) or descending (DESC).
Allowed values are: "ASC", "DESC"
- :param str sort_by: (optional)
- The field used for sorting. Only one sorting order (sortOrder) can be specified.
- The default order for TIMECREATED is descending. The default order for DISPLAYNAME is ascending.
- The DISPLAYNAME sort order is case sensitive.
-
- Allowed values are: "TIMECREATED", "DISPLAYNAME"
-
:param str opc_request_id: (optional)
Unique identifier for the request.
@@ -15685,52 +18554,51 @@ def list_audit_policies(self, compartment_id, **kwargs):
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.AuditPolicyCollection`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.DatabaseViewAccessEntryCollection`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use list_audit_policies API.
+ Click `here `__ to see an example of how to use list_database_view_access_entries API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
- required_arguments = ['compartmentId']
- resource_path = "/auditPolicies"
+ required_arguments = ['securityPolicyReportId']
+ resource_path = "/securityPolicyReports/{securityPolicyReportId}/databaseViewAccessEntries"
method = "GET"
- operation_name = "list_audit_policies"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/AuditPolicyCollection/ListAuditPolicies"
+ operation_name = "list_database_view_access_entries"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/DatabaseViewAccessEntryCollection/ListDatabaseViewAccessEntries"
# Don't accept unknown kwargs
expected_kwargs = [
"allow_control_chars",
"retry_strategy",
- "compartment_id_in_subtree",
- "access_level",
- "display_name",
"limit",
"page",
+ "scim_query",
"target_id",
- "lifecycle_state",
- "audit_policy_id",
- "sort_order",
"sort_by",
+ "sort_order",
"opc_request_id"
]
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"list_audit_policies got unknown kwargs: {extra_kwargs!r}")
+ f"list_database_view_access_entries got unknown kwargs: {extra_kwargs!r}")
- if 'access_level' in kwargs:
- access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"]
- if kwargs['access_level'] not in access_level_allowed_values:
- raise ValueError(
- f"Invalid value for `access_level`, must be one of { access_level_allowed_values }"
- )
+ path_params = {
+ "securityPolicyReportId": security_policy_report_id
+ }
- if 'lifecycle_state' in kwargs:
- lifecycle_state_allowed_values = ["CREATING", "UPDATING", "ACTIVE", "FAILED", "NEEDS_ATTENTION", "DELETING", "DELETED"]
- if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values:
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
+
+ for (k, v) in six.iteritems(path_params):
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
+ raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
+
+ if 'sort_by' in kwargs:
+ sort_by_allowed_values = ["key", "grantee", "accessType", "tableSchema", "tableName", "viewSchema", "viewName", "privilegeType", "privilege", "privilegeGrantable", "grantFromRole", "accessThroughObject", "columnName", "grantor", "isAccessConstrainedByDatabaseVault", "isAccessConstrainedByVirtualPrivateDatabase", "isAccessConstrainedByRedaction", "isAccessConstrainedByRealApplicationSecurity", "isAccessConstrainedBySqlFirewall"]
+ if kwargs['sort_by'] not in sort_by_allowed_values:
raise ValueError(
- f"Invalid value for `lifecycle_state`, must be one of { lifecycle_state_allowed_values }"
+ f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
)
if 'sort_order' in kwargs:
@@ -15740,25 +18608,13 @@ def list_audit_policies(self, compartment_id, **kwargs):
f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }"
)
- if 'sort_by' in kwargs:
- sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"]
- if kwargs['sort_by'] not in sort_by_allowed_values:
- raise ValueError(
- f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
- )
-
query_params = {
- "compartmentId": compartment_id,
- "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing),
- "accessLevel": kwargs.get("access_level", missing),
- "displayName": kwargs.get("display_name", missing),
"limit": kwargs.get("limit", missing),
"page": kwargs.get("page", missing),
+ "scimQuery": kwargs.get("scim_query", missing),
"targetId": kwargs.get("target_id", missing),
- "lifecycleState": kwargs.get("lifecycle_state", missing),
- "auditPolicyId": kwargs.get("audit_policy_id", missing),
- "sortOrder": kwargs.get("sort_order", missing),
- "sortBy": kwargs.get("sort_by", 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}
@@ -15784,9 +18640,10 @@ def list_audit_policies(self, compartment_id, **kwargs):
self.base_client.call_api,
resource_path=resource_path,
method=method,
+ path_params=path_params,
query_params=query_params,
header_params=header_params,
- response_type="AuditPolicyCollection",
+ response_type="DatabaseViewAccessEntryCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -15795,85 +18652,71 @@ def list_audit_policies(self, compartment_id, **kwargs):
return self.base_client.call_api(
resource_path=resource_path,
method=method,
+ path_params=path_params,
query_params=query_params,
header_params=header_params,
- response_type="AuditPolicyCollection",
+ response_type="DatabaseViewAccessEntryCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def list_audit_policy_analytics(self, compartment_id, **kwargs):
+ def list_difference_columns(self, sdm_masking_policy_difference_id, **kwargs):
"""
- Gets a list of aggregated audit policy details on the target databases. A audit policy aggregation
- helps understand the overall state of policies provisioned on targets.
- It is especially useful to create dashboards or to support analytics.
-
- The parameter `accessLevel` specifies whether to return only those compartments for which the
- requestor has INSPECT permissions on at least one resource directly
- or indirectly (ACCESSIBLE) (the resource can be in a subcompartment) or to return Not Authorized if
- principal doesn't have access to even one of the child compartments. This is valid only when
- `compartmentIdInSubtree` is set to `true`.
-
- The parameter `compartmentIdInSubtree` applies when you perform SummarizedAuditPolicyInfo on the specified
- `compartmentId` and when it is set to true, the entire hierarchy of compartments can be returned.
- To get a full list of all compartments and subcompartments in the tenancy (root compartment),
- set the parameter `compartmentIdInSubtree` to true and `accessLevel` to ACCESSIBLE.
-
- **Example:** ListAuditPolicyAnalytics?groupBy=auditPolicyCategory
-
-
- :param str compartment_id: (required)
- A filter to return only resources that match the specified compartment OCID.
+ Gets a list of columns of a SDM masking policy difference resource based on the specified query parameters.
- :param bool compartment_id_in_subtree: (optional)
- Default is false.
- When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting.
- :param str access_level: (optional)
- Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED.
- Setting this to ACCESSIBLE returns only those compartments for which the
- user has INSPECT permissions directly or indirectly (permissions can be on a
- resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed.
+ :param str sdm_masking_policy_difference_id: (required)
+ The OCID of the SDM masking policy difference.
- Allowed values are: "RESTRICTED", "ACCESSIBLE"
+ :param str difference_type: (optional)
+ A filter to return only the SDM masking policy difference columns that match the specified difference type
- :param int limit: (optional)
- For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
+ Allowed values are: "ALL", "NEW", "MODIFIED", "DELETED"
- __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
+ :param str planned_action: (optional)
+ A filter to return only the SDM masking policy difference columns that match the specified planned action.
- :param str page: (optional)
- For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__.
+ Allowed values are: "SYNC", "NO_SYNC"
- __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
+ :param str sync_status: (optional)
+ A filter to return the SDM masking policy difference columns based on the value of their syncStatus attribute.
- :param list[str] group_by: (optional)
- The group by parameter to summarize audit policy aggregation.
+ Allowed values are: "SYNCED", "NOT_SYNCED"
- Allowed values are: "auditPolicyCategory", "auditPolicyName", "targetId"
+ :param list[str] schema_name: (optional)
+ A filter to return only items related to specific schema name.
- :param str audit_policy_category: (optional)
- The category to which the audit policy belongs to.
+ :param list[str] object_name: (optional)
+ A filter to return only items related to a specific object name.
- Allowed values are: "BASIC_ACTIVITY", "ADMIN_USER_ACTIVITY", "USER_ACTIVITY", "ORACLE_PREDEFINED", "COMPLIANCE_STANDARD", "CUSTOM", "SQL_FIREWALL_AUDITING"
+ :param list[str] column_name: (optional)
+ A filter to return only a specific column based on column name.
- :param str audit_policy_name: (optional)
- In case of seeded policies, it is the policy name defined by Data Safe.
- In case of custom Policies, it is the policy name that is used to create the policies on the target database.
- In case of Oracle Pre-seeded policies, it is the default policy name of the same.
+ :param str sort_order: (optional)
+ The sort order to use, either ascending (ASC) or descending (DESC).
- :param str target_id: (optional)
- A filter to return only items related to a specific target OCID.
+ Allowed values are: "ASC", "DESC"
- :param str lifecycle_state: (optional)
- The current state of the audit policy.
+ :param str sort_by: (optional)
+ The field to sort by. You can specify only one sorting parameter (sortOrder). The default order for schemaName is descending.
+ The default order for differenceType, schemaName, objectName, columnName and plannedAction is ascending.
- Allowed values are: "CREATING", "UPDATING", "ACTIVE", "FAILED", "NEEDS_ATTENTION", "DELETING", "DELETED"
+ Allowed values are: "differenceType", "schemaName", "objectName", "columnName", "plannedAction"
:param str opc_request_id: (optional)
Unique identifier for the request.
+ :param int limit: (optional)
+ For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
+
+ __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
+
+ :param str page: (optional)
+ For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__.
+
+ __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
+
:param obj retry_strategy: (optional)
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
@@ -15886,79 +18729,96 @@ def list_audit_policy_analytics(self, compartment_id, **kwargs):
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.AuditPolicyAnalyticCollection`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.SdmMaskingPolicyDifferenceColumnCollection`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use list_audit_policy_analytics API.
+ Click `here `__ to see an example of how to use list_difference_columns API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
- required_arguments = ['compartmentId']
- resource_path = "/auditPolicyAnalytics"
+ required_arguments = ['sdmMaskingPolicyDifferenceId']
+ resource_path = "/sdmMaskingPolicyDifferences/{sdmMaskingPolicyDifferenceId}/differenceColumns"
method = "GET"
- operation_name = "list_audit_policy_analytics"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/AuditPolicyAnalyticCollection/ListAuditPolicyAnalytics"
+ operation_name = "list_difference_columns"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SdmMaskingPolicyDifference/ListDifferenceColumns"
# Don't accept unknown kwargs
expected_kwargs = [
"allow_control_chars",
"retry_strategy",
- "compartment_id_in_subtree",
- "access_level",
+ "difference_type",
+ "planned_action",
+ "sync_status",
+ "schema_name",
+ "object_name",
+ "column_name",
+ "sort_order",
+ "sort_by",
+ "opc_request_id",
"limit",
- "page",
- "group_by",
- "audit_policy_category",
- "audit_policy_name",
- "target_id",
- "lifecycle_state",
- "opc_request_id"
+ "page"
]
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"list_audit_policy_analytics got unknown kwargs: {extra_kwargs!r}")
+ f"list_difference_columns got unknown kwargs: {extra_kwargs!r}")
- if 'access_level' in kwargs:
- access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"]
- if kwargs['access_level'] not in access_level_allowed_values:
+ path_params = {
+ "sdmMaskingPolicyDifferenceId": sdm_masking_policy_difference_id
+ }
+
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
+
+ for (k, v) in six.iteritems(path_params):
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
+ raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
+
+ if 'difference_type' in kwargs:
+ difference_type_allowed_values = ["ALL", "NEW", "MODIFIED", "DELETED"]
+ if kwargs['difference_type'] not in difference_type_allowed_values:
raise ValueError(
- f"Invalid value for `access_level`, must be one of { access_level_allowed_values }"
+ f"Invalid value for `difference_type`, must be one of { difference_type_allowed_values }"
)
- if 'group_by' in kwargs:
- group_by_allowed_values = ["auditPolicyCategory", "auditPolicyName", "targetId"]
- for group_by_item in kwargs['group_by']:
- if group_by_item not in group_by_allowed_values:
- raise ValueError(
- f"Invalid value for `group_by`, must be one of { group_by_allowed_values }"
- )
+ if 'planned_action' in kwargs:
+ planned_action_allowed_values = ["SYNC", "NO_SYNC"]
+ if kwargs['planned_action'] not in planned_action_allowed_values:
+ raise ValueError(
+ f"Invalid value for `planned_action`, must be one of { planned_action_allowed_values }"
+ )
- if 'audit_policy_category' in kwargs:
- audit_policy_category_allowed_values = ["BASIC_ACTIVITY", "ADMIN_USER_ACTIVITY", "USER_ACTIVITY", "ORACLE_PREDEFINED", "COMPLIANCE_STANDARD", "CUSTOM", "SQL_FIREWALL_AUDITING"]
- if kwargs['audit_policy_category'] not in audit_policy_category_allowed_values:
+ if 'sync_status' in kwargs:
+ sync_status_allowed_values = ["SYNCED", "NOT_SYNCED"]
+ if kwargs['sync_status'] not in sync_status_allowed_values:
raise ValueError(
- f"Invalid value for `audit_policy_category`, must be one of { audit_policy_category_allowed_values }"
+ f"Invalid value for `sync_status`, must be one of { sync_status_allowed_values }"
)
- if 'lifecycle_state' in kwargs:
- lifecycle_state_allowed_values = ["CREATING", "UPDATING", "ACTIVE", "FAILED", "NEEDS_ATTENTION", "DELETING", "DELETED"]
- if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values:
+ if 'sort_order' in kwargs:
+ sort_order_allowed_values = ["ASC", "DESC"]
+ if kwargs['sort_order'] not in sort_order_allowed_values:
raise ValueError(
- f"Invalid value for `lifecycle_state`, must be one of { lifecycle_state_allowed_values }"
+ f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }"
+ )
+
+ if 'sort_by' in kwargs:
+ sort_by_allowed_values = ["differenceType", "schemaName", "objectName", "columnName", "plannedAction"]
+ if kwargs['sort_by'] not in sort_by_allowed_values:
+ raise ValueError(
+ f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
)
query_params = {
- "compartmentId": compartment_id,
- "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing),
- "accessLevel": kwargs.get("access_level", missing),
+ "differenceType": kwargs.get("difference_type", missing),
+ "plannedAction": kwargs.get("planned_action", missing),
+ "syncStatus": kwargs.get("sync_status", missing),
+ "schemaName": self.base_client.generate_collection_format_param(kwargs.get("schema_name", missing), 'multi'),
+ "objectName": self.base_client.generate_collection_format_param(kwargs.get("object_name", missing), 'multi'),
+ "columnName": self.base_client.generate_collection_format_param(kwargs.get("column_name", missing), 'multi'),
+ "sortOrder": kwargs.get("sort_order", missing),
+ "sortBy": kwargs.get("sort_by", missing),
"limit": kwargs.get("limit", missing),
- "page": kwargs.get("page", missing),
- "groupBy": self.base_client.generate_collection_format_param(kwargs.get("group_by", missing), 'multi'),
- "auditPolicyCategory": kwargs.get("audit_policy_category", missing),
- "auditPolicyName": kwargs.get("audit_policy_name", missing),
- "targetId": kwargs.get("target_id", missing),
- "lifecycleState": kwargs.get("lifecycle_state", 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}
@@ -15984,9 +18844,10 @@ def list_audit_policy_analytics(self, compartment_id, **kwargs):
self.base_client.call_api,
resource_path=resource_path,
method=method,
+ path_params=path_params,
query_params=query_params,
header_params=header_params,
- response_type="AuditPolicyAnalyticCollection",
+ response_type="SdmMaskingPolicyDifferenceColumnCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -15995,29 +18856,20 @@ def list_audit_policy_analytics(self, compartment_id, **kwargs):
return self.base_client.call_api(
resource_path=resource_path,
method=method,
+ path_params=path_params,
query_params=query_params,
header_params=header_params,
- response_type="AuditPolicyAnalyticCollection",
+ response_type="SdmMaskingPolicyDifferenceColumnCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def list_audit_profile_analytics(self, compartment_id, **kwargs):
+ def list_discovery_analytics(self, compartment_id, **kwargs):
"""
- Gets a list of audit profile aggregated details . A audit profile aggregation helps understand the overall state of audit profile profiles.
- As an example, it helps understand how many audit profiles have paid usage. It is especially useful to create dashboards or to support analytics.
-
- The parameter `accessLevel` specifies whether to return only those compartments for which the
- requestor has INSPECT permissions on at least one resource directly
- or indirectly (ACCESSIBLE) (the resource can be in a subcompartment) or to return Not Authorized if
- Principal doesn't have access to even one of the child compartments. This is valid only when
- `compartmentIdInSubtree` is set to `true`.
-
- The parameter `compartmentIdInSubtree` applies when you perform AuditProfileAnalytics on the
- `compartmentId` passed and when it is set to true, the entire hierarchy of compartments can be returned.
- To get a full list of all compartments and subcompartments in the tenancy (root compartment),
- set the parameter `compartmentIdInSubtree` to true and `accessLevel` to ACCESSIBLE.
+ Gets consolidated discovery analytics data based on the specified query parameters.
+ If CompartmentIdInSubtreeQueryParam is specified as true, the behaviour
+ is equivalent to accessLevel \"ACCESSIBLE\" by default.
:param str compartment_id: (required)
@@ -16027,13 +18879,19 @@ def list_audit_profile_analytics(self, compartment_id, **kwargs):
Default is false.
When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting.
- :param str access_level: (optional)
- Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED.
- Setting this to ACCESSIBLE returns only those compartments for which the
- user has INSPECT permissions directly or indirectly (permissions can be on a
- resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed.
+ :param str group_by: (optional)
+ Attribute by which the discovery analytics data should be grouped.
- Allowed values are: "RESTRICTED", "ACCESSIBLE"
+ Allowed values are: "targetId", "sensitiveDataModelId", "sensitiveTypeId", "targetIdAndSensitiveDataModelId", "sensitiveTypeIdAndTargetId", "sensitiveTypeIdAndSensitiveDataModelId"
+
+ :param str target_id: (optional)
+ A filter to return only items related to a specific target OCID.
+
+ :param str sensitive_data_model_id: (optional)
+ A filter to return only the resources that match the specified sensitive data model OCID.
+
+ :param str sensitive_type_id: (optional)
+ A filter to return only items related to a specific sensitive type OCID.
:param int limit: (optional)
For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
@@ -16045,14 +18903,13 @@ def list_audit_profile_analytics(self, compartment_id, **kwargs):
__ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
- :param list[str] group_by: (optional)
- The group by parameter for summarize operation on audit.
-
- Allowed values are: "isPaidUsageEnabled"
-
:param str opc_request_id: (optional)
Unique identifier for the request.
+ :param bool is_common: (optional)
+ A filter to return only the common sensitive type resources. Common sensitive types belong to
+ library sensitive types which are frequently used to perform sensitive data discovery.
+
:param obj retry_strategy: (optional)
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
@@ -16065,57 +18922,55 @@ def list_audit_profile_analytics(self, compartment_id, **kwargs):
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.AuditProfileAnalyticCollection`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.DiscoveryAnalyticsCollection`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use list_audit_profile_analytics API.
+ Click `here `__ to see an example of how to use list_discovery_analytics API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
required_arguments = ['compartmentId']
- resource_path = "/auditProfileAnalytics"
+ resource_path = "/discoveryAnalytics"
method = "GET"
- operation_name = "list_audit_profile_analytics"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/AuditProfileAnalyticCollection/ListAuditProfileAnalytics"
+ operation_name = "list_discovery_analytics"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SensitiveDataModel/ListDiscoveryAnalytics"
# Don't accept unknown kwargs
expected_kwargs = [
"allow_control_chars",
"retry_strategy",
"compartment_id_in_subtree",
- "access_level",
+ "group_by",
+ "target_id",
+ "sensitive_data_model_id",
+ "sensitive_type_id",
"limit",
"page",
- "group_by",
- "opc_request_id"
+ "opc_request_id",
+ "is_common"
]
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"list_audit_profile_analytics got unknown kwargs: {extra_kwargs!r}")
-
- if 'access_level' in kwargs:
- access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"]
- if kwargs['access_level'] not in access_level_allowed_values:
- raise ValueError(
- f"Invalid value for `access_level`, must be one of { access_level_allowed_values }"
- )
+ f"list_discovery_analytics got unknown kwargs: {extra_kwargs!r}")
if 'group_by' in kwargs:
- group_by_allowed_values = ["isPaidUsageEnabled"]
- for group_by_item in kwargs['group_by']:
- if group_by_item not in group_by_allowed_values:
- raise ValueError(
- f"Invalid value for `group_by`, must be one of { group_by_allowed_values }"
- )
+ group_by_allowed_values = ["targetId", "sensitiveDataModelId", "sensitiveTypeId", "targetIdAndSensitiveDataModelId", "sensitiveTypeIdAndTargetId", "sensitiveTypeIdAndSensitiveDataModelId"]
+ if kwargs['group_by'] not in group_by_allowed_values:
+ raise ValueError(
+ f"Invalid value for `group_by`, must be one of { group_by_allowed_values }"
+ )
query_params = {
"compartmentId": compartment_id,
"compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing),
- "accessLevel": kwargs.get("access_level", missing),
+ "groupBy": kwargs.get("group_by", missing),
+ "targetId": kwargs.get("target_id", missing),
+ "sensitiveDataModelId": kwargs.get("sensitive_data_model_id", missing),
+ "sensitiveTypeId": kwargs.get("sensitive_type_id", missing),
"limit": kwargs.get("limit", missing),
"page": kwargs.get("page", missing),
- "groupBy": self.base_client.generate_collection_format_param(kwargs.get("group_by", missing), 'multi')
+ "isCommon": kwargs.get("is_common", missing)
}
query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
@@ -16143,7 +18998,7 @@ def list_audit_profile_analytics(self, compartment_id, **kwargs):
method=method,
query_params=query_params,
header_params=header_params,
- response_type="AuditProfileAnalyticCollection",
+ response_type="DiscoveryAnalyticsCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -16154,81 +19009,41 @@ def list_audit_profile_analytics(self, compartment_id, **kwargs):
method=method,
query_params=query_params,
header_params=header_params,
- response_type="AuditProfileAnalyticCollection",
+ response_type="DiscoveryAnalyticsCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def list_audit_profiles(self, compartment_id, **kwargs):
+ def list_discovery_job_results(self, discovery_job_id, **kwargs):
"""
- Gets a list of all audit profiles.
-
- The ListAuditProfiles operation returns only the audit profiles in the specified `compartmentId`.
- The list does not include any subcompartments of the compartmentId passed.
-
- The parameter `accessLevel` specifies whether to return only those compartments for which the
- requestor has INSPECT permissions on at least one resource directly
- or indirectly (ACCESSIBLE) (the resource can be in a subcompartment) or to return Not Authorized if
- Principal doesn't have access to even one of the child compartments. This is valid only when
- `compartmentIdInSubtree` is set to `true`.
-
- The parameter `compartmentIdInSubtree` applies when you perform ListAuditProfiles on the
- `compartmentId` passed and when it is set to true, the entire hierarchy of compartments can be returned.
- To get a full list of all compartments and subcompartments in the tenancy (root compartment),
- set the parameter `compartmentIdInSubtree` to true and `accessLevel` to ACCESSIBLE.
-
-
- :param str compartment_id: (required)
- A filter to return only resources that match the specified compartment OCID.
-
- :param bool compartment_id_in_subtree: (optional)
- Default is false.
- When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting.
-
- :param str access_level: (optional)
- Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED.
- Setting this to ACCESSIBLE returns only those compartments for which the
- user has INSPECT permissions directly or indirectly (permissions can be on a
- resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed.
-
- Allowed values are: "RESTRICTED", "ACCESSIBLE"
-
- :param str audit_profile_id: (optional)
- A optional filter to return only resources that match the specified id.
-
- :param str target_id: (optional)
- A filter to return only items related to a specific target OCID.
+ Gets a list of discovery results based on the specified query parameters.
- :param str display_name: (optional)
- A filter to return only resources that match the specified display name.
- :param int limit: (optional)
- For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
+ :param str discovery_job_id: (required)
+ The OCID of the discovery job.
- __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
+ :param str discovery_type: (optional)
+ A filter to return only the resources that match the specified discovery type.
- :param str page: (optional)
- For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__.
+ Allowed values are: "ALL", "NEW", "MODIFIED", "DELETED"
- __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
+ :param str planned_action: (optional)
+ A filter to return only the resources that match the specified planned action.
- :param str lifecycle_state: (optional)
- A optional filter to return only resources that match the specified lifecycle state.
+ Allowed values are: "NONE", "ACCEPT", "INVALIDATE", "REJECT"
- Allowed values are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "FAILED", "NEEDS_ATTENTION", "DELETED"
+ :param bool is_result_applied: (optional)
+ A filter to return the discovery result resources based on the value of their isResultApplied attribute.
- :param bool is_override_global_retention_setting: (optional)
- A optional filter to return only resources that match the specified retention configured value.
+ :param list[str] schema_name: (optional)
+ A filter to return only items related to specific schema name.
- :param bool is_paid_usage_enabled: (optional)
- Indicates if you want to continue audit record collection beyond the free limit
- of one million audit records per month per target database, incurring additional charges.
- The default value is inherited from the global settings. You can change at the global level
- or at the target level.
+ :param list[str] object_name: (optional)
+ A filter to return only items related to a specific object name.
- :param int audit_collected_volume_greater_than_or_equal_to: (optional)
- A filter to return only items that have count of audit records collected greater than or equal to the specified value.
+ :param list[str] column_name: (optional)
+ A filter to return only a specific column based on column name.
:param str sort_order: (optional)
The sort order to use, either ascending (ASC) or descending (DESC).
@@ -16236,15 +19051,24 @@ def list_audit_profiles(self, compartment_id, **kwargs):
Allowed values are: "ASC", "DESC"
:param str sort_by: (optional)
- The field used for sorting. Only one sorting order (sortOrder) can be specified.
- The default order for TIMECREATED is descending. The default order for DISPLAYNAME is ascending.
- The DISPLAYNAME sort order is case sensitive.
+ The field to sort by. You can specify only one sorting parameter (sortOrder). The default order for timeFinished is descending.
+ The default order for discoveryType, schemaName, objectName, columnName and plannedAction is ascending.
- Allowed values are: "TIMECREATED", "DISPLAYNAME"
+ Allowed values are: "discoveryType", "timeFinished", "schemaName", "objectName", "columnName", "plannedAction"
:param str opc_request_id: (optional)
Unique identifier for the request.
+ :param int limit: (optional)
+ For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
+
+ __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
+
+ :param str page: (optional)
+ For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__.
+
+ __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
+
:param obj retry_strategy: (optional)
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
@@ -16257,55 +19081,62 @@ def list_audit_profiles(self, compartment_id, **kwargs):
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.AuditProfileCollection`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.DiscoveryJobResultCollection`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use list_audit_profiles API.
+ Click `here `__ to see an example of how to use list_discovery_job_results API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
- required_arguments = ['compartmentId']
- resource_path = "/auditProfiles"
+ required_arguments = ['discoveryJobId']
+ resource_path = "/discoveryJobs/{discoveryJobId}/results"
method = "GET"
- operation_name = "list_audit_profiles"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/AuditProfile/ListAuditProfiles"
+ operation_name = "list_discovery_job_results"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/DiscoveryJob/ListDiscoveryJobResults"
# Don't accept unknown kwargs
expected_kwargs = [
"allow_control_chars",
"retry_strategy",
- "compartment_id_in_subtree",
- "access_level",
- "audit_profile_id",
- "target_id",
- "display_name",
- "limit",
- "page",
- "lifecycle_state",
- "is_override_global_retention_setting",
- "is_paid_usage_enabled",
- "audit_collected_volume_greater_than_or_equal_to",
+ "discovery_type",
+ "planned_action",
+ "is_result_applied",
+ "schema_name",
+ "object_name",
+ "column_name",
"sort_order",
"sort_by",
- "opc_request_id"
+ "opc_request_id",
+ "limit",
+ "page"
]
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"list_audit_profiles got unknown kwargs: {extra_kwargs!r}")
+ f"list_discovery_job_results got unknown kwargs: {extra_kwargs!r}")
- if 'access_level' in kwargs:
- access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"]
- if kwargs['access_level'] not in access_level_allowed_values:
+ path_params = {
+ "discoveryJobId": discovery_job_id
+ }
+
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
+
+ for (k, v) in six.iteritems(path_params):
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
+ raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
+
+ if 'discovery_type' in kwargs:
+ discovery_type_allowed_values = ["ALL", "NEW", "MODIFIED", "DELETED"]
+ if kwargs['discovery_type'] not in discovery_type_allowed_values:
raise ValueError(
- f"Invalid value for `access_level`, must be one of { access_level_allowed_values }"
+ f"Invalid value for `discovery_type`, must be one of { discovery_type_allowed_values }"
)
- if 'lifecycle_state' in kwargs:
- lifecycle_state_allowed_values = ["CREATING", "UPDATING", "ACTIVE", "DELETING", "FAILED", "NEEDS_ATTENTION", "DELETED"]
- if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values:
+ if 'planned_action' in kwargs:
+ planned_action_allowed_values = ["NONE", "ACCEPT", "INVALIDATE", "REJECT"]
+ if kwargs['planned_action'] not in planned_action_allowed_values:
raise ValueError(
- f"Invalid value for `lifecycle_state`, must be one of { lifecycle_state_allowed_values }"
+ f"Invalid value for `planned_action`, must be one of { planned_action_allowed_values }"
)
if 'sort_order' in kwargs:
@@ -16316,27 +19147,23 @@ def list_audit_profiles(self, compartment_id, **kwargs):
)
if 'sort_by' in kwargs:
- sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"]
+ sort_by_allowed_values = ["discoveryType", "timeFinished", "schemaName", "objectName", "columnName", "plannedAction"]
if kwargs['sort_by'] not in sort_by_allowed_values:
raise ValueError(
f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
)
query_params = {
- "compartmentId": compartment_id,
- "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing),
- "accessLevel": kwargs.get("access_level", missing),
- "auditProfileId": kwargs.get("audit_profile_id", missing),
- "targetId": kwargs.get("target_id", missing),
- "displayName": kwargs.get("display_name", missing),
- "limit": kwargs.get("limit", missing),
- "page": kwargs.get("page", missing),
- "lifecycleState": kwargs.get("lifecycle_state", missing),
- "isOverrideGlobalRetentionSetting": kwargs.get("is_override_global_retention_setting", missing),
- "isPaidUsageEnabled": kwargs.get("is_paid_usage_enabled", missing),
- "auditCollectedVolumeGreaterThanOrEqualTo": kwargs.get("audit_collected_volume_greater_than_or_equal_to", missing),
+ "discoveryType": kwargs.get("discovery_type", missing),
+ "plannedAction": kwargs.get("planned_action", missing),
+ "isResultApplied": kwargs.get("is_result_applied", missing),
+ "schemaName": self.base_client.generate_collection_format_param(kwargs.get("schema_name", missing), 'multi'),
+ "objectName": self.base_client.generate_collection_format_param(kwargs.get("object_name", missing), 'multi'),
+ "columnName": self.base_client.generate_collection_format_param(kwargs.get("column_name", missing), 'multi'),
"sortOrder": kwargs.get("sort_order", missing),
- "sortBy": kwargs.get("sort_by", missing)
+ "sortBy": kwargs.get("sort_by", 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}
@@ -16362,9 +19189,10 @@ def list_audit_profiles(self, compartment_id, **kwargs):
self.base_client.call_api,
resource_path=resource_path,
method=method,
+ path_params=path_params,
query_params=query_params,
header_params=header_params,
- response_type="AuditProfileCollection",
+ response_type="DiscoveryJobResultCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -16373,29 +19201,18 @@ def list_audit_profiles(self, compartment_id, **kwargs):
return self.base_client.call_api(
resource_path=resource_path,
method=method,
+ path_params=path_params,
query_params=query_params,
header_params=header_params,
- response_type="AuditProfileCollection",
+ response_type="DiscoveryJobResultCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def list_audit_trail_analytics(self, compartment_id, **kwargs):
+ def list_discovery_jobs(self, compartment_id, **kwargs):
"""
- Gets a list of audit trail aggregated details . A audit trail aggregation helps understand the overall state of trails.
- As an example, it helps understand how many trails are running or stopped. It is especially useful to create dashboards or to support analytics.
-
- The parameter `accessLevel` specifies whether to return only those compartments for which the
- requestor has INSPECT permissions on at least one resource directly
- or indirectly (ACCESSIBLE) (the resource can be in a subcompartment) or to return Not Authorized if
- Principal doesn't have access to even one of the child compartments. This is valid only when
- `compartmentIdInSubtree` is set to `true`.
-
- The parameter `compartmentIdInSubtree` applies when you perform AuditTrailAnalytics on the
- `compartmentId` passed and when it is set to true, the entire hierarchy of compartments can be returned.
- To get a full list of all compartments and subcompartments in the tenancy (root compartment),
- set the parameter `compartmentIdInSubtree` to true and `accessLevel` to ACCESSIBLE.
+ Gets a list of incremental discovery jobs based on the specified query parameters.
:param str compartment_id: (required)
@@ -16413,27 +19230,47 @@ def list_audit_trail_analytics(self, compartment_id, **kwargs):
Allowed values are: "RESTRICTED", "ACCESSIBLE"
- :param int limit: (optional)
- For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
+ :param str display_name: (optional)
+ A filter to return only resources that match the specified display name.
- __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
+ :param str discovery_job_id: (optional)
+ A filter to return only the resources that match the specified discovery job OCID.
- :param str page: (optional)
- For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__.
+ :param str target_id: (optional)
+ A filter to return only items related to a specific target OCID.
- __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
+ :param str lifecycle_state: (optional)
+ A filter to return only the resources that match the specified lifecycle state.
- :param list[str] group_by: (optional)
- The group by parameter for summarize operation on audit trail.
+ Allowed values are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED"
- Allowed values are: "location", "lifecycleState", "status", "targetId"
+ :param str sensitive_data_model_id: (optional)
+ A filter to return only the resources that match the specified sensitive data model OCID.
- :param str target_id: (optional)
- A filter to return only items related to a specific target OCID.
+ :param str sort_order: (optional)
+ The sort order to use, either ascending (ASC) or descending (DESC).
+
+ Allowed values are: "ASC", "DESC"
+
+ :param str sort_by: (optional)
+ The field to sort by. You can specify only one sorting parameter (sortOrder). The default order for timeFinished is descending.
+ The default order for displayName is ascending.
+
+ Allowed values are: "timeStarted", "displayName"
:param str opc_request_id: (optional)
Unique identifier for the request.
+ :param int limit: (optional)
+ For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
+
+ __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
+
+ :param str page: (optional)
+ For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__.
+
+ __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
+
:param obj retry_strategy: (optional)
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
@@ -16446,18 +19283,18 @@ def list_audit_trail_analytics(self, compartment_id, **kwargs):
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.AuditTrailAnalyticCollection`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.DiscoveryJobCollection`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use list_audit_trail_analytics API.
+ Click `here `__ to see an example of how to use list_discovery_jobs API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
required_arguments = ['compartmentId']
- resource_path = "/auditTrailAnalytics"
+ resource_path = "/discoveryJobs"
method = "GET"
- operation_name = "list_audit_trail_analytics"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/AuditTrailAnalyticCollection/ListAuditTrailAnalytics"
+ operation_name = "list_discovery_jobs"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/DiscoveryJob/ListDiscoveryJobs"
# Don't accept unknown kwargs
expected_kwargs = [
@@ -16465,16 +19302,21 @@ def list_audit_trail_analytics(self, compartment_id, **kwargs):
"retry_strategy",
"compartment_id_in_subtree",
"access_level",
- "limit",
- "page",
- "group_by",
+ "display_name",
+ "discovery_job_id",
"target_id",
- "opc_request_id"
+ "lifecycle_state",
+ "sensitive_data_model_id",
+ "sort_order",
+ "sort_by",
+ "opc_request_id",
+ "limit",
+ "page"
]
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"list_audit_trail_analytics got unknown kwargs: {extra_kwargs!r}")
+ f"list_discovery_jobs got unknown kwargs: {extra_kwargs!r}")
if 'access_level' in kwargs:
access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"]
@@ -16483,22 +19325,40 @@ def list_audit_trail_analytics(self, compartment_id, **kwargs):
f"Invalid value for `access_level`, must be one of { access_level_allowed_values }"
)
- if 'group_by' in kwargs:
- group_by_allowed_values = ["location", "lifecycleState", "status", "targetId"]
- for group_by_item in kwargs['group_by']:
- if group_by_item not in group_by_allowed_values:
- raise ValueError(
- f"Invalid value for `group_by`, must be one of { group_by_allowed_values }"
- )
+ if 'lifecycle_state' in kwargs:
+ lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED"]
+ if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values:
+ raise ValueError(
+ f"Invalid value for `lifecycle_state`, must be one of { lifecycle_state_allowed_values }"
+ )
+
+ if 'sort_order' in kwargs:
+ sort_order_allowed_values = ["ASC", "DESC"]
+ if kwargs['sort_order'] not in sort_order_allowed_values:
+ raise ValueError(
+ f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }"
+ )
+
+ if 'sort_by' in kwargs:
+ sort_by_allowed_values = ["timeStarted", "displayName"]
+ if kwargs['sort_by'] not in sort_by_allowed_values:
+ raise ValueError(
+ f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
+ )
query_params = {
"compartmentId": compartment_id,
"compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing),
"accessLevel": kwargs.get("access_level", missing),
+ "displayName": kwargs.get("display_name", missing),
+ "discoveryJobId": kwargs.get("discovery_job_id", missing),
+ "targetId": kwargs.get("target_id", missing),
+ "lifecycleState": kwargs.get("lifecycle_state", missing),
+ "sensitiveDataModelId": kwargs.get("sensitive_data_model_id", missing),
+ "sortOrder": kwargs.get("sort_order", missing),
+ "sortBy": kwargs.get("sort_by", missing),
"limit": kwargs.get("limit", missing),
- "page": kwargs.get("page", missing),
- "groupBy": self.base_client.generate_collection_format_param(kwargs.get("group_by", missing), 'multi'),
- "targetId": kwargs.get("target_id", 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}
@@ -16526,7 +19386,7 @@ def list_audit_trail_analytics(self, compartment_id, **kwargs):
method=method,
query_params=query_params,
header_params=header_params,
- response_type="AuditTrailAnalyticCollection",
+ response_type="DiscoveryJobCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -16537,28 +19397,24 @@ def list_audit_trail_analytics(self, compartment_id, **kwargs):
method=method,
query_params=query_params,
header_params=header_params,
- response_type="AuditTrailAnalyticCollection",
+ response_type="DiscoveryJobCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def list_audit_trails(self, compartment_id, **kwargs):
+ def list_finding_analytics(self, compartment_id, **kwargs):
"""
- Gets a list of all audit trails.
- The ListAuditTrails operation returns only the audit trails in the specified `compartmentId`.
- The list does not include any subcompartments of the compartmentId passed.
+ Gets a list of findings aggregated details in the specified compartment. This provides information about the overall state
+ of security assessment findings. You can use groupBy to get the count of findings under a certain risk level and with a certain findingKey,
+ and as well as get the list of the targets that match the condition.
+ This data is especially useful content for the statistic chart or to support analytics.
- The parameter `accessLevel` specifies whether to return only those compartments for which the
- requestor has INSPECT permissions on at least one resource directly
- or indirectly (ACCESSIBLE) (the resource can be in a subcompartment) or to return Not Authorized if
- Principal doesn't have access to even one of the child compartments. This is valid only when
- `compartmentIdInSubtree` is set to `true`.
-
- The parameter `compartmentIdInSubtree` applies when you perform ListAuditTrails on the
- `compartmentId` passed and when it is set to true, the entire hierarchy of compartments can be returned.
- To get a full list of all compartments and subcompartments in the tenancy (root compartment),
- set the parameter `compartmentIdInSubtree` to true and `accessLevel` to ACCESSIBLE.
+ When you perform the ListFindingAnalytics operation, if the parameter compartmentIdInSubtree is set to \"true,\" and if the
+ parameter accessLevel is set to ACCESSIBLE, then the operation returns statistics from the compartments in which the requestor has INSPECT
+ permissions on at least one resource, directly or indirectly (in subcompartments). If the operation is performed at the
+ root compartment and the requestor does not have access to at least one subcompartment of the compartment specified by
+ compartmentId, then \"Not Authorized\" is returned.
:param str compartment_id: (required)
@@ -16576,49 +19432,39 @@ def list_audit_trails(self, compartment_id, **kwargs):
Allowed values are: "RESTRICTED", "ACCESSIBLE"
- :param str audit_trail_id: (optional)
- A optional filter to return only resources that match the specified id.
-
- :param str display_name: (optional)
- A filter to return only resources that match the specified display name.
-
- :param str target_id: (optional)
- A filter to return only items related to a specific target OCID.
-
- :param int limit: (optional)
- For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
+ :param bool is_top_finding: (optional)
+ A filter to return only the findings that are marked as top findings.
- __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
+ :param str group_by: (optional)
+ Attribute by which the finding analytics data should be grouped.
- :param str page: (optional)
- For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__.
+ Allowed values are: "findingKeyAndTopFindingStatus", "findingKeyAndSeverity"
- __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
+ :param str top_finding_status: (optional)
+ An optional filter to return only the top finding that match the specified status.
- :param str lifecycle_state: (optional)
- A optional filter to return only resources that match the specified lifecycle state.
+ Allowed values are: "RISK", "EVALUATE", "ADVISORY", "PASS", "DEFERRED"
- Allowed values are: "INACTIVE", "UPDATING", "ACTIVE", "DELETING", "FAILED", "NEEDS_ATTENTION"
+ :param str severity: (optional)
+ A filter to return only findings of a particular risk level.
- :param str status: (optional)
- A optional filter to return only resources that match the specified sub-state of audit trail.
+ Allowed values are: "HIGH", "MEDIUM", "LOW", "EVALUATE", "ADVISORY", "PASS", "DEFERRED"
- Allowed values are: "STARTING", "COLLECTING", "RECOVERING", "IDLE", "STOPPING", "STOPPED", "RESUMING", "RETRYING", "NOT_STARTED", "STOPPED_NEEDS_ATTN", "STOPPED_FAILED"
+ :param str finding_key: (optional)
+ The unique key that identifies the finding. It is a string and unique within a security assessment.
- :param str sort_order: (optional)
- The sort order to use, either ascending (ASC) or descending (DESC).
+ :param str opc_request_id: (optional)
+ Unique identifier for the request.
- Allowed values are: "ASC", "DESC"
+ :param int limit: (optional)
+ For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
- :param str sort_by: (optional)
- The field used for sorting. Only one sorting order (sortOrder) can be specified.
- The default order for TIMECREATED is descending. The default order for DISPLAYNAME is ascending.
- The DISPLAYNAME sort order is case sensitive.
+ __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
- Allowed values are: "TIMECREATED", "DISPLAYNAME"
+ :param str page: (optional)
+ For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__.
- :param str opc_request_id: (optional)
- Unique identifier for the request.
+ __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
:param obj retry_strategy: (optional)
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
@@ -16632,18 +19478,18 @@ def list_audit_trails(self, compartment_id, **kwargs):
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.AuditTrailCollection`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.FindingAnalyticsCollection`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use list_audit_trails API.
+ Click `here `__ to see an example of how to use list_finding_analytics API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
required_arguments = ['compartmentId']
- resource_path = "/auditTrails"
+ resource_path = "/securityAssessments/findingAnalytics"
method = "GET"
- operation_name = "list_audit_trails"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/AuditTrail/ListAuditTrails"
+ operation_name = "list_finding_analytics"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SecurityAssessment/ListFindingAnalytics"
# Don't accept unknown kwargs
expected_kwargs = [
@@ -16651,21 +19497,19 @@ def list_audit_trails(self, compartment_id, **kwargs):
"retry_strategy",
"compartment_id_in_subtree",
"access_level",
- "audit_trail_id",
- "display_name",
- "target_id",
+ "is_top_finding",
+ "group_by",
+ "top_finding_status",
+ "severity",
+ "finding_key",
+ "opc_request_id",
"limit",
- "page",
- "lifecycle_state",
- "status",
- "sort_order",
- "sort_by",
- "opc_request_id"
+ "page"
]
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"list_audit_trails got unknown kwargs: {extra_kwargs!r}")
+ f"list_finding_analytics got unknown kwargs: {extra_kwargs!r}")
if 'access_level' in kwargs:
access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"]
@@ -16674,47 +19518,38 @@ def list_audit_trails(self, compartment_id, **kwargs):
f"Invalid value for `access_level`, must be one of { access_level_allowed_values }"
)
- if 'lifecycle_state' in kwargs:
- lifecycle_state_allowed_values = ["INACTIVE", "UPDATING", "ACTIVE", "DELETING", "FAILED", "NEEDS_ATTENTION"]
- if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values:
- raise ValueError(
- f"Invalid value for `lifecycle_state`, must be one of { lifecycle_state_allowed_values }"
- )
-
- if 'status' in kwargs:
- status_allowed_values = ["STARTING", "COLLECTING", "RECOVERING", "IDLE", "STOPPING", "STOPPED", "RESUMING", "RETRYING", "NOT_STARTED", "STOPPED_NEEDS_ATTN", "STOPPED_FAILED"]
- if kwargs['status'] not in status_allowed_values:
+ if 'group_by' in kwargs:
+ group_by_allowed_values = ["findingKeyAndTopFindingStatus", "findingKeyAndSeverity"]
+ if kwargs['group_by'] not in group_by_allowed_values:
raise ValueError(
- f"Invalid value for `status`, must be one of { status_allowed_values }"
+ f"Invalid value for `group_by`, must be one of { group_by_allowed_values }"
)
- if 'sort_order' in kwargs:
- sort_order_allowed_values = ["ASC", "DESC"]
- if kwargs['sort_order'] not in sort_order_allowed_values:
+ if 'top_finding_status' in kwargs:
+ top_finding_status_allowed_values = ["RISK", "EVALUATE", "ADVISORY", "PASS", "DEFERRED"]
+ if kwargs['top_finding_status'] not in top_finding_status_allowed_values:
raise ValueError(
- f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }"
+ f"Invalid value for `top_finding_status`, must be one of { top_finding_status_allowed_values }"
)
- if 'sort_by' in kwargs:
- sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"]
- if kwargs['sort_by'] not in sort_by_allowed_values:
+ if 'severity' in kwargs:
+ severity_allowed_values = ["HIGH", "MEDIUM", "LOW", "EVALUATE", "ADVISORY", "PASS", "DEFERRED"]
+ if kwargs['severity'] not in severity_allowed_values:
raise ValueError(
- f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
+ f"Invalid value for `severity`, must be one of { severity_allowed_values }"
)
query_params = {
"compartmentId": compartment_id,
"compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing),
"accessLevel": kwargs.get("access_level", missing),
- "auditTrailId": kwargs.get("audit_trail_id", missing),
- "displayName": kwargs.get("display_name", missing),
- "targetId": kwargs.get("target_id", missing),
+ "isTopFinding": kwargs.get("is_top_finding", missing),
+ "groupBy": kwargs.get("group_by", missing),
+ "topFindingStatus": kwargs.get("top_finding_status", missing),
+ "severity": kwargs.get("severity", missing),
+ "findingKey": kwargs.get("finding_key", missing),
"limit": kwargs.get("limit", missing),
- "page": kwargs.get("page", missing),
- "lifecycleState": kwargs.get("lifecycle_state", missing),
- "status": kwargs.get("status", missing),
- "sortOrder": kwargs.get("sort_order", missing),
- "sortBy": kwargs.get("sort_by", missing)
+ "page": kwargs.get("page", missing)
}
query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
@@ -16742,7 +19577,7 @@ def list_audit_trails(self, compartment_id, **kwargs):
method=method,
query_params=query_params,
header_params=header_params,
- response_type="AuditTrailCollection",
+ response_type="FindingAnalyticsCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -16753,45 +19588,40 @@ def list_audit_trails(self, compartment_id, **kwargs):
method=method,
query_params=query_params,
header_params=header_params,
- response_type="AuditTrailCollection",
+ response_type="FindingAnalyticsCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def list_available_audit_volumes(self, audit_profile_id, work_request_id, **kwargs):
+ def list_findings(self, security_assessment_id, **kwargs):
"""
- Retrieves a list of audit trails, and associated audit event volume for each trail up to defined start date.
+ List all the findings from all the targets in the specified compartment.
- :param str audit_profile_id: (required)
- The OCID of the audit.
+ :param str security_assessment_id: (required)
+ The OCID of the security assessment.
- :param str work_request_id: (required)
- The OCID of the work request.
+ :param str opc_request_id: (optional)
+ Unique identifier for the request.
- :param str trail_location: (optional)
- The audit trail location.
+ :param bool is_top_finding: (optional)
+ A filter to return only the findings that are marked as top findings.
- :param datetime month_in_consideration_greater_than: (optional)
- Specifying `monthInConsiderationGreaterThan` parameter
- will retrieve all items for which the event month is
- greater than the date and time specified,
- in the format defined by `RFC3339`__.
+ :param str severity: (optional)
+ A filter to return only findings of a particular risk level.
- **Example:** 2016-12-19T00:00:00.000Z
+ Allowed values are: "HIGH", "MEDIUM", "LOW", "EVALUATE", "ADVISORY", "PASS", "DEFERRED"
- __ https://tools.ietf.org/html/rfc3339
+ :param str lifecycle_state: (optional)
+ A filter to return only the findings that match the specified lifecycle states.
- :param datetime month_in_consideration_less_than: (optional)
- Specifying `monthInConsiderationLessThan` parameter
- will retrieve all items for which the event month is
- less than the date and time specified,
- in the format defined by `RFC3339`__.
+ Allowed values are: "ACTIVE", "UPDATING", "NEEDS_ATTENTION", "FAILED"
- **Example:** 2016-12-19T00:00:00.000Z
+ :param str references: (optional)
+ An optional filter to return only findings that match the specified reference.
- __ https://tools.ietf.org/html/rfc3339
+ Allowed values are: "STIG", "CIS", "GDPR"
:param int limit: (optional)
For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
@@ -16803,18 +19633,21 @@ def list_available_audit_volumes(self, audit_profile_id, work_request_id, **kwar
__ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
- :param str sort_order: (optional)
- The sort order to use, either ascending (ASC) or descending (DESC).
-
- Allowed values are: "ASC", "DESC"
+ :param bool compartment_id_in_subtree: (optional)
+ Default is false.
+ When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting.
- :param str sort_by: (optional)
- The field to sort by. You can specify only one sort order(sortOrder). The default order for all fields is ascending.
+ :param str access_level: (optional)
+ Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED.
+ Setting this to ACCESSIBLE returns only those compartments for which the
+ user has INSPECT permissions directly or indirectly (permissions can be on a
+ resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed.
- Allowed values are: "monthInConsideration", "volume", "trailLocation"
+ Allowed values are: "RESTRICTED", "ACCESSIBLE"
- :param str opc_request_id: (optional)
- Unique identifier for the request.
+ :param str finding_key: (optional)
+ Each finding in security assessment has an associated key (think of key as a finding's name).
+ For a given finding, the key will be the same across targets. The user can use these keys to filter the findings.
:param obj retry_strategy: (optional)
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
@@ -16828,39 +19661,41 @@ def list_available_audit_volumes(self, audit_profile_id, work_request_id, **kwar
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.AvailableAuditVolumeCollection`
+ :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.data_safe.models.FindingSummary`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use list_available_audit_volumes API.
+ Click `here `__ to see an example of how to use list_findings API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
- required_arguments = ['auditProfileId', 'workRequestId']
- resource_path = "/auditProfiles/{auditProfileId}/availableAuditVolumes"
+ required_arguments = ['securityAssessmentId']
+ resource_path = "/securityAssessments/{securityAssessmentId}/findings"
method = "GET"
- operation_name = "list_available_audit_volumes"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/AuditProfile/ListAvailableAuditVolumes"
+ operation_name = "list_findings"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SecurityAssessment/ListFindings"
# Don't accept unknown kwargs
expected_kwargs = [
"allow_control_chars",
"retry_strategy",
- "trail_location",
- "month_in_consideration_greater_than",
- "month_in_consideration_less_than",
+ "opc_request_id",
+ "is_top_finding",
+ "severity",
+ "lifecycle_state",
+ "references",
"limit",
"page",
- "sort_order",
- "sort_by",
- "opc_request_id"
+ "compartment_id_in_subtree",
+ "access_level",
+ "finding_key"
]
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"list_available_audit_volumes got unknown kwargs: {extra_kwargs!r}")
+ f"list_findings got unknown kwargs: {extra_kwargs!r}")
path_params = {
- "auditProfileId": audit_profile_id
+ "securityAssessmentId": security_assessment_id
}
path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
@@ -16869,29 +19704,44 @@ def list_available_audit_volumes(self, audit_profile_id, work_request_id, **kwar
if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
- if 'sort_order' in kwargs:
- sort_order_allowed_values = ["ASC", "DESC"]
- if kwargs['sort_order'] not in sort_order_allowed_values:
+ if 'severity' in kwargs:
+ severity_allowed_values = ["HIGH", "MEDIUM", "LOW", "EVALUATE", "ADVISORY", "PASS", "DEFERRED"]
+ if kwargs['severity'] not in severity_allowed_values:
raise ValueError(
- f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }"
+ f"Invalid value for `severity`, must be one of { severity_allowed_values }"
)
- if 'sort_by' in kwargs:
- sort_by_allowed_values = ["monthInConsideration", "volume", "trailLocation"]
- if kwargs['sort_by'] not in sort_by_allowed_values:
+ if 'lifecycle_state' in kwargs:
+ lifecycle_state_allowed_values = ["ACTIVE", "UPDATING", "NEEDS_ATTENTION", "FAILED"]
+ if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values:
raise ValueError(
- f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
+ f"Invalid value for `lifecycle_state`, must be one of { lifecycle_state_allowed_values }"
+ )
+
+ if 'references' in kwargs:
+ references_allowed_values = ["STIG", "CIS", "GDPR"]
+ if kwargs['references'] not in references_allowed_values:
+ raise ValueError(
+ f"Invalid value for `references`, must be one of { references_allowed_values }"
+ )
+
+ if 'access_level' in kwargs:
+ access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"]
+ if kwargs['access_level'] not in access_level_allowed_values:
+ raise ValueError(
+ f"Invalid value for `access_level`, must be one of { access_level_allowed_values }"
)
query_params = {
- "workRequestId": work_request_id,
- "trailLocation": kwargs.get("trail_location", missing),
- "monthInConsiderationGreaterThan": kwargs.get("month_in_consideration_greater_than", missing),
- "monthInConsiderationLessThan": kwargs.get("month_in_consideration_less_than", missing),
+ "isTopFinding": kwargs.get("is_top_finding", missing),
+ "severity": kwargs.get("severity", missing),
+ "lifecycleState": kwargs.get("lifecycle_state", missing),
+ "references": kwargs.get("references", missing),
"limit": kwargs.get("limit", missing),
"page": kwargs.get("page", missing),
- "sortOrder": kwargs.get("sort_order", missing),
- "sortBy": kwargs.get("sort_by", missing)
+ "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing),
+ "accessLevel": kwargs.get("access_level", missing),
+ "findingKey": kwargs.get("finding_key", missing)
}
query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
@@ -16920,7 +19770,7 @@ def list_available_audit_volumes(self, audit_profile_id, work_request_id, **kwar
path_params=path_params,
query_params=query_params,
header_params=header_params,
- response_type="AvailableAuditVolumeCollection",
+ response_type="list[FindingSummary]",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -16932,42 +19782,36 @@ def list_available_audit_volumes(self, audit_profile_id, work_request_id, **kwar
path_params=path_params,
query_params=query_params,
header_params=header_params,
- response_type="AvailableAuditVolumeCollection",
+ response_type="list[FindingSummary]",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def list_collected_audit_volumes(self, audit_profile_id, work_request_id, **kwargs):
+ def list_findings_change_audit_logs(self, security_assessment_id, **kwargs):
"""
- Gets a list of all collected audit volume data points.
-
+ List all changes made by user to risk level of findings of the specified assessment.
- :param str audit_profile_id: (required)
- The OCID of the audit.
- :param str work_request_id: (required)
- The OCID of the work request.
+ :param str security_assessment_id: (required)
+ The OCID of the security assessment.
- :param datetime month_in_consideration_greater_than: (optional)
- Specifying `monthInConsiderationGreaterThan` parameter
- will retrieve all items for which the event month is
- greater than the date and time specified,
- in the format defined by `RFC3339`__.
+ :param str severity: (optional)
+ A filter to return only findings of a particular risk level.
- **Example:** 2016-12-19T00:00:00.000Z
+ Allowed values are: "HIGH", "MEDIUM", "LOW", "EVALUATE", "ADVISORY", "PASS", "DEFERRED"
- __ https://tools.ietf.org/html/rfc3339
+ :param str finding_key: (optional)
+ The unique key that identifies the finding. It is a string and unique within a security assessment.
- :param datetime month_in_consideration_less_than: (optional)
- Specifying `monthInConsiderationLessThan` parameter
- will retrieve all items for which the event month is
- less than the date and time specified,
- in the format defined by `RFC3339`__.
+ :param str finding_title: (optional)
+ The unique title that identifies the finding. It is a string and unique within a security assessment.
- **Example:** 2016-12-19T00:00:00.000Z
+ :param bool is_risk_deferred: (optional)
+ A filter to check findings whose risks were deferred by the user.
- __ https://tools.ietf.org/html/rfc3339
+ :param str modified_by: (optional)
+ A filter to check which user modified the risk level of the finding.
:param int limit: (optional)
For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
@@ -16985,9 +19829,43 @@ def list_collected_audit_volumes(self, audit_profile_id, work_request_id, **kwar
Allowed values are: "ASC", "DESC"
:param str sort_by: (optional)
- The field to sort by. You can specify only one sort order(sortOrder). The default order for all fields is ascending.
+ The field to sort by. You can specify only one sort order(sortOrder). The default order for timeUpdated is descending.
- Allowed values are: "monthInConsideration", "onlineVolume", "archivedVolume"
+ Allowed values are: "timeUpdated", "modifiedBy", "isRiskDeferred", "timeValidUntil"
+
+ :param datetime time_valid_until_greater_than_or_equal_to: (optional)
+ Specifying `TimeValidUntilGreaterThanOrEqualToQueryParam` parameter
+ will retrieve all items for which the risk level modification by user will
+ no longer be valid greater than the date and time specified,
+ in the format defined by `RFC3339`__.
+
+ **Example:** 2016-12-19T00:00:00.000Z
+
+ __ https://tools.ietf.org/html/rfc3339
+
+ :param datetime time_valid_until_less_than: (optional)
+ Specifying `TimeValidUntilLessThanQueryParam` parameter
+ will retrieve all items for which the risk level modification by user will
+ be valid until less than the date and time specified,
+ in the format defined by `RFC3339`__.
+
+ **Example:** 2016-12-19T00:00:00.000Z
+
+ __ https://tools.ietf.org/html/rfc3339
+
+ :param datetime time_updated_greater_than_or_equal_to: (optional)
+ Search for resources that were updated after a specific date.
+ Specifying this parameter corresponding `timeUpdatedGreaterThanOrEqualTo`
+ parameter will retrieve all resources updated after the
+ specified created date, in \"YYYY-MM-ddThh:mmZ\" format with a Z offset, as
+ defined by RFC 3339.
+
+ :param datetime time_updated_less_than: (optional)
+ Search for resources that were updated before a specific date.
+ Specifying this parameter corresponding `timeUpdatedLessThan`
+ parameter will retrieve all resources updated before the
+ specified created date, in \"YYYY-MM-ddThh:mmZ\" format with a Z offset, as
+ defined by RFC 3339.
:param str opc_request_id: (optional)
Unique identifier for the request.
@@ -17004,38 +19882,45 @@ def list_collected_audit_volumes(self, audit_profile_id, work_request_id, **kwar
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.CollectedAuditVolumeCollection`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.FindingsChangeAuditLogCollection`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use list_collected_audit_volumes API.
+ Click `here `__ to see an example of how to use list_findings_change_audit_logs API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
- required_arguments = ['auditProfileId', 'workRequestId']
- resource_path = "/auditProfiles/{auditProfileId}/collectedAuditVolumes"
+ required_arguments = ['securityAssessmentId']
+ resource_path = "/securityAssessments/{securityAssessmentId}/findingsChangeAuditLogs"
method = "GET"
- operation_name = "list_collected_audit_volumes"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/AuditProfile/ListCollectedAuditVolumes"
+ operation_name = "list_findings_change_audit_logs"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SecurityAssessment/ListFindingsChangeAuditLogs"
# Don't accept unknown kwargs
expected_kwargs = [
"allow_control_chars",
"retry_strategy",
- "month_in_consideration_greater_than",
- "month_in_consideration_less_than",
+ "severity",
+ "finding_key",
+ "finding_title",
+ "is_risk_deferred",
+ "modified_by",
"limit",
"page",
"sort_order",
"sort_by",
+ "time_valid_until_greater_than_or_equal_to",
+ "time_valid_until_less_than",
+ "time_updated_greater_than_or_equal_to",
+ "time_updated_less_than",
"opc_request_id"
]
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"list_collected_audit_volumes got unknown kwargs: {extra_kwargs!r}")
+ f"list_findings_change_audit_logs got unknown kwargs: {extra_kwargs!r}")
path_params = {
- "auditProfileId": audit_profile_id
+ "securityAssessmentId": security_assessment_id
}
path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
@@ -17044,6 +19929,13 @@ def list_collected_audit_volumes(self, audit_profile_id, work_request_id, **kwar
if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
+ if 'severity' in kwargs:
+ severity_allowed_values = ["HIGH", "MEDIUM", "LOW", "EVALUATE", "ADVISORY", "PASS", "DEFERRED"]
+ if kwargs['severity'] not in severity_allowed_values:
+ raise ValueError(
+ f"Invalid value for `severity`, must be one of { severity_allowed_values }"
+ )
+
if 'sort_order' in kwargs:
sort_order_allowed_values = ["ASC", "DESC"]
if kwargs['sort_order'] not in sort_order_allowed_values:
@@ -17052,20 +19944,26 @@ def list_collected_audit_volumes(self, audit_profile_id, work_request_id, **kwar
)
if 'sort_by' in kwargs:
- sort_by_allowed_values = ["monthInConsideration", "onlineVolume", "archivedVolume"]
+ sort_by_allowed_values = ["timeUpdated", "modifiedBy", "isRiskDeferred", "timeValidUntil"]
if kwargs['sort_by'] not in sort_by_allowed_values:
raise ValueError(
f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
)
query_params = {
- "workRequestId": work_request_id,
- "monthInConsiderationGreaterThan": kwargs.get("month_in_consideration_greater_than", missing),
- "monthInConsiderationLessThan": kwargs.get("month_in_consideration_less_than", missing),
+ "severity": kwargs.get("severity", missing),
+ "findingKey": kwargs.get("finding_key", missing),
+ "findingTitle": kwargs.get("finding_title", missing),
+ "isRiskDeferred": kwargs.get("is_risk_deferred", missing),
+ "modifiedBy": kwargs.get("modified_by", missing),
"limit": kwargs.get("limit", missing),
"page": kwargs.get("page", missing),
"sortOrder": kwargs.get("sort_order", missing),
- "sortBy": kwargs.get("sort_by", missing)
+ "sortBy": kwargs.get("sort_by", missing),
+ "timeValidUntilGreaterThanOrEqualTo": kwargs.get("time_valid_until_greater_than_or_equal_to", missing),
+ "timeValidUntilLessThan": kwargs.get("time_valid_until_less_than", missing),
+ "timeUpdatedGreaterThanOrEqualTo": kwargs.get("time_updated_greater_than_or_equal_to", missing),
+ "timeUpdatedLessThan": kwargs.get("time_updated_less_than", missing)
}
query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
@@ -17094,7 +19992,7 @@ def list_collected_audit_volumes(self, audit_profile_id, work_request_id, **kwar
path_params=path_params,
query_params=query_params,
header_params=header_params,
- response_type="CollectedAuditVolumeCollection",
+ response_type="FindingsChangeAuditLogCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -17106,22 +20004,46 @@ def list_collected_audit_volumes(self, audit_profile_id, work_request_id, **kwar
path_params=path_params,
query_params=query_params,
header_params=header_params,
- response_type="CollectedAuditVolumeCollection",
+ response_type="FindingsChangeAuditLogCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def list_columns(self, target_database_id, **kwargs):
+ def list_grants(self, user_assessment_id, user_key, **kwargs):
"""
- Returns a list of column metadata objects.
+ Gets a list of grants for a particular user in the specified user assessment. A user grant contains details such as the
+ privilege name, type, category, and depth level. The depth level indicates how deep in the hierarchy of roles granted to
+ roles a privilege grant is. The userKey in this operation is a system-generated identifier. Perform the operation ListUsers
+ to get the userKey for a particular user.
- :param str target_database_id: (required)
- The OCID of the Data Safe target database.
+ :param str user_assessment_id: (required)
+ The OCID of the user assessment.
- :param str opc_request_id: (optional)
- Unique identifier for the request.
+ :param str user_key: (required)
+ The unique user key. This is a system-generated identifier. ListUsers gets the user key for a user.
+
+ :param str grant_key: (optional)
+ A filter to return only items that match the specified user grant key.
+
+ :param str grant_name: (optional)
+ A filter to return only items that match the specified user grant name.
+
+ :param str privilege_type: (optional)
+ A filter to return only items that match the specified privilege grant type.
+
+ :param str privilege_category: (optional)
+ A filter to return only items that match the specified user privilege category.
+
+ :param int depth_level: (optional)
+ A filter to return only items that match the specified user grant depth level.
+
+ :param int depth_level_greater_than_or_equal_to: (optional)
+ A filter to return only items that are at a level greater than or equal to the specified user grant depth level.
+
+ :param int depth_level_less_than: (optional)
+ A filter to return only items that are at a level less than the specified user grant depth level.
:param int limit: (optional)
For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
@@ -17133,36 +20055,18 @@ def list_columns(self, target_database_id, **kwargs):
__ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
- :param list[str] schema_name: (optional)
- A filter to return only items related to specific schema name.
-
- :param list[str] table_name: (optional)
- A filter to return only items related to specific table name.
-
- :param list[str] column_name: (optional)
- A filter to return only a specific column based on column name.
-
- :param list[str] datatype: (optional)
- A filter to return only items related to specific datatype.
-
:param str sort_order: (optional)
The sort order to use, either ascending (ASC) or descending (DESC).
Allowed values are: "ASC", "DESC"
:param str sort_by: (optional)
- The field used for sorting. Only one sorting order (sortOrder) can be specified.
-
- Allowed values are: "SCHEMANAME", "TABLENAME", "COLUMNNAME", "DATATYPE"
-
- :param str schema_name_contains: (optional)
- A filter to return only items if schema name contains a specific string.
+ The field to sort by. You can specify only one sort order (sortOrder). The default order for grantName is ascending.
- :param str table_name_contains: (optional)
- A filter to return only items if table name contains a specific string.
+ Allowed values are: "grantName", "grantType", "privilegeCategory", "depthLevel", "key"
- :param str column_name_contains: (optional)
- A filter to return only items if column name contains a specific string.
+ :param str opc_request_id: (optional)
+ Unique identifier for the request.
:param obj retry_strategy: (optional)
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
@@ -17176,43 +20080,44 @@ def list_columns(self, target_database_id, **kwargs):
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.data_safe.models.ColumnSummary`
+ :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.data_safe.models.GrantSummary`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use list_columns API.
+ Click `here `__ to see an example of how to use list_grants API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
- required_arguments = ['targetDatabaseId']
- resource_path = "/targetDatabases/{targetDatabaseId}/columns"
+ required_arguments = ['userAssessmentId', 'userKey']
+ resource_path = "/userAssessments/{userAssessmentId}/users/{userKey}/grants"
method = "GET"
- operation_name = "list_columns"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/TargetDatabase/ListColumns"
+ operation_name = "list_grants"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/UserAssessment/ListGrants"
# Don't accept unknown kwargs
expected_kwargs = [
"allow_control_chars",
"retry_strategy",
- "opc_request_id",
+ "grant_key",
+ "grant_name",
+ "privilege_type",
+ "privilege_category",
+ "depth_level",
+ "depth_level_greater_than_or_equal_to",
+ "depth_level_less_than",
"limit",
"page",
- "schema_name",
- "table_name",
- "column_name",
- "datatype",
"sort_order",
"sort_by",
- "schema_name_contains",
- "table_name_contains",
- "column_name_contains"
+ "opc_request_id"
]
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"list_columns got unknown kwargs: {extra_kwargs!r}")
+ f"list_grants got unknown kwargs: {extra_kwargs!r}")
path_params = {
- "targetDatabaseId": target_database_id
+ "userAssessmentId": user_assessment_id,
+ "userKey": user_key
}
path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
@@ -17229,24 +20134,24 @@ def list_columns(self, target_database_id, **kwargs):
)
if 'sort_by' in kwargs:
- sort_by_allowed_values = ["SCHEMANAME", "TABLENAME", "COLUMNNAME", "DATATYPE"]
+ sort_by_allowed_values = ["grantName", "grantType", "privilegeCategory", "depthLevel", "key"]
if kwargs['sort_by'] not in sort_by_allowed_values:
raise ValueError(
f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
)
query_params = {
+ "grantKey": kwargs.get("grant_key", missing),
+ "grantName": kwargs.get("grant_name", missing),
+ "privilegeType": kwargs.get("privilege_type", missing),
+ "privilegeCategory": kwargs.get("privilege_category", missing),
+ "depthLevel": kwargs.get("depth_level", missing),
+ "depthLevelGreaterThanOrEqualTo": kwargs.get("depth_level_greater_than_or_equal_to", missing),
+ "depthLevelLessThan": kwargs.get("depth_level_less_than", missing),
"limit": kwargs.get("limit", missing),
"page": kwargs.get("page", missing),
- "schemaName": self.base_client.generate_collection_format_param(kwargs.get("schema_name", missing), 'multi'),
- "tableName": self.base_client.generate_collection_format_param(kwargs.get("table_name", missing), 'multi'),
- "columnName": self.base_client.generate_collection_format_param(kwargs.get("column_name", missing), 'multi'),
- "datatype": self.base_client.generate_collection_format_param(kwargs.get("datatype", missing), 'multi'),
"sortOrder": kwargs.get("sort_order", missing),
- "sortBy": kwargs.get("sort_by", missing),
- "schemaNameContains": kwargs.get("schema_name_contains", missing),
- "tableNameContains": kwargs.get("table_name_contains", missing),
- "columnNameContains": kwargs.get("column_name_contains", missing)
+ "sortBy": kwargs.get("sort_by", missing)
}
query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
@@ -17275,7 +20180,7 @@ def list_columns(self, target_database_id, **kwargs):
path_params=path_params,
query_params=query_params,
header_params=header_params,
- response_type="list[ColumnSummary]",
+ response_type="list[GrantSummary]",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -17287,30 +20192,37 @@ def list_columns(self, target_database_id, **kwargs):
path_params=path_params,
query_params=query_params,
header_params=header_params,
- response_type="list[ColumnSummary]",
+ response_type="list[GrantSummary]",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def list_data_safe_private_endpoints(self, compartment_id, **kwargs):
+ def list_library_masking_formats(self, compartment_id, **kwargs):
"""
- Gets a list of Data Safe private endpoints.
+ Gets a list of library masking formats based on the specified query parameters.
:param str compartment_id: (required)
A filter to return only resources that match the specified compartment OCID.
- :param str display_name: (optional)
- A filter to return only resources that match the specified display name.
+ :param str library_masking_format_id: (optional)
+ A filter to return only the resources that match the specified library masking format OCID.
- :param str vcn_id: (optional)
- A filter to return only resources that match the specified VCN OCID.
+ :param bool compartment_id_in_subtree: (optional)
+ Default is false.
+ When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting.
- :param str lifecycle_state: (optional)
- A filter to return only resources that match the specified lifecycle state.
+ :param str access_level: (optional)
+ Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED.
+ Setting this to ACCESSIBLE returns only those compartments for which the
+ user has INSPECT permissions directly or indirectly (permissions can be on a
+ resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed.
- Allowed values are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED", "NA"
+ Allowed values are: "RESTRICTED", "ACCESSIBLE"
+
+ :param str display_name: (optional)
+ A filter to return only resources that match the specified display name.
:param int limit: (optional)
For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
@@ -17322,33 +20234,47 @@ def list_data_safe_private_endpoints(self, compartment_id, **kwargs):
__ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
+ :param str lifecycle_state: (optional)
+ A filter to return only the resources that match the specified lifecycle states.
+
+ Allowed values are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "NEEDS_ATTENTION", "FAILED"
+
+ :param datetime time_created_greater_than_or_equal_to: (optional)
+ A filter to return only the resources that were created after the specified date and time, as defined by `RFC3339`__.
+ Using TimeCreatedGreaterThanOrEqualToQueryParam parameter retrieves all resources created after that date.
+
+ **Example:** 2016-12-19T16:39:57.600Z
+
+ __ https://tools.ietf.org/html/rfc3339
+
+ :param datetime time_created_less_than: (optional)
+ Search for resources that were created before a specific date.
+ Specifying this parameter corresponding `timeCreatedLessThan`
+ parameter will retrieve all resources created before the
+ specified created date, in \"YYYY-MM-ddThh:mmZ\" format with a Z offset, as
+ defined by RFC 3339.
+
+ **Example:** 2016-12-19T16:39:57.600Z
+
+ :param str library_masking_format_source: (optional)
+ A filter to return the library masking format resources based on the value of their source attribute.
+
+ Allowed values are: "ORACLE", "USER"
+
:param str sort_order: (optional)
The sort order to use, either ascending (ASC) or descending (DESC).
Allowed values are: "ASC", "DESC"
:param str sort_by: (optional)
- The field used for sorting. Only one sorting order (sortOrder) can be specified.
- The default order for TIMECREATED is descending. The default order for DISPLAYNAME is ascending.
- The DISPLAYNAME sort order is case sensitive.
+ The field to sort by. You can specify only one sorting parameter (sortOrder). The default order for timeCreated is descending.
+ The default order for displayName is ascending. The displayName sort order is case sensitive.
- Allowed values are: "TIMECREATED", "DISPLAYNAME"
+ Allowed values are: "displayName", "timeCreated"
:param str opc_request_id: (optional)
Unique identifier for the request.
- :param bool compartment_id_in_subtree: (optional)
- Default is false.
- When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting.
-
- :param str access_level: (optional)
- Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED.
- Setting this to ACCESSIBLE returns only those compartments for which the
- user has INSPECT permissions directly or indirectly (permissions can be on a
- resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed.
-
- Allowed values are: "RESTRICTED", "ACCESSIBLE"
-
:param obj retry_strategy: (optional)
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
@@ -17361,46 +20287,63 @@ def list_data_safe_private_endpoints(self, compartment_id, **kwargs):
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.data_safe.models.DataSafePrivateEndpointSummary`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.LibraryMaskingFormatCollection`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use list_data_safe_private_endpoints API.
+ Click `here `__ to see an example of how to use list_library_masking_formats API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
required_arguments = ['compartmentId']
- resource_path = "/dataSafePrivateEndpoints"
+ resource_path = "/libraryMaskingFormats"
method = "GET"
- operation_name = "list_data_safe_private_endpoints"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/DataSafePrivateEndpointSummary/ListDataSafePrivateEndpoints"
+ operation_name = "list_library_masking_formats"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/LibraryMaskingFormatSummary/ListLibraryMaskingFormats"
# Don't accept unknown kwargs
expected_kwargs = [
"allow_control_chars",
"retry_strategy",
+ "library_masking_format_id",
+ "compartment_id_in_subtree",
+ "access_level",
"display_name",
- "vcn_id",
- "lifecycle_state",
"limit",
"page",
+ "lifecycle_state",
+ "time_created_greater_than_or_equal_to",
+ "time_created_less_than",
+ "library_masking_format_source",
"sort_order",
"sort_by",
- "opc_request_id",
- "compartment_id_in_subtree",
- "access_level"
+ "opc_request_id"
]
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"list_data_safe_private_endpoints got unknown kwargs: {extra_kwargs!r}")
+ f"list_library_masking_formats got unknown kwargs: {extra_kwargs!r}")
+
+ if 'access_level' in kwargs:
+ access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"]
+ if kwargs['access_level'] not in access_level_allowed_values:
+ raise ValueError(
+ f"Invalid value for `access_level`, must be one of { access_level_allowed_values }"
+ )
if 'lifecycle_state' in kwargs:
- lifecycle_state_allowed_values = ["CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED", "NA"]
+ lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "NEEDS_ATTENTION", "FAILED"]
if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values:
raise ValueError(
f"Invalid value for `lifecycle_state`, must be one of { lifecycle_state_allowed_values }"
)
+ if 'library_masking_format_source' in kwargs:
+ library_masking_format_source_allowed_values = ["ORACLE", "USER"]
+ if kwargs['library_masking_format_source'] not in library_masking_format_source_allowed_values:
+ raise ValueError(
+ f"Invalid value for `library_masking_format_source`, must be one of { library_masking_format_source_allowed_values }"
+ )
+
if 'sort_order' in kwargs:
sort_order_allowed_values = ["ASC", "DESC"]
if kwargs['sort_order'] not in sort_order_allowed_values:
@@ -17409,30 +20352,26 @@ def list_data_safe_private_endpoints(self, compartment_id, **kwargs):
)
if 'sort_by' in kwargs:
- sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"]
+ sort_by_allowed_values = ["displayName", "timeCreated"]
if kwargs['sort_by'] not in sort_by_allowed_values:
raise ValueError(
f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
)
- if 'access_level' in kwargs:
- access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"]
- if kwargs['access_level'] not in access_level_allowed_values:
- raise ValueError(
- f"Invalid value for `access_level`, must be one of { access_level_allowed_values }"
- )
-
query_params = {
+ "libraryMaskingFormatId": kwargs.get("library_masking_format_id", missing),
"compartmentId": compartment_id,
+ "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing),
+ "accessLevel": kwargs.get("access_level", missing),
"displayName": kwargs.get("display_name", missing),
- "vcnId": kwargs.get("vcn_id", missing),
- "lifecycleState": kwargs.get("lifecycle_state", missing),
"limit": kwargs.get("limit", missing),
"page": kwargs.get("page", missing),
+ "lifecycleState": kwargs.get("lifecycle_state", missing),
+ "timeCreatedGreaterThanOrEqualTo": kwargs.get("time_created_greater_than_or_equal_to", missing),
+ "timeCreatedLessThan": kwargs.get("time_created_less_than", missing),
+ "libraryMaskingFormatSource": kwargs.get("library_masking_format_source", missing),
"sortOrder": kwargs.get("sort_order", missing),
- "sortBy": kwargs.get("sort_by", missing),
- "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing),
- "accessLevel": kwargs.get("access_level", missing)
+ "sortBy": kwargs.get("sort_by", missing)
}
query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
@@ -17460,7 +20399,7 @@ def list_data_safe_private_endpoints(self, compartment_id, **kwargs):
method=method,
query_params=query_params,
header_params=header_params,
- response_type="list[DataSafePrivateEndpointSummary]",
+ response_type="LibraryMaskingFormatCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -17471,47 +20410,19 @@ def list_data_safe_private_endpoints(self, compartment_id, **kwargs):
method=method,
query_params=query_params,
header_params=header_params,
- response_type="list[DataSafePrivateEndpointSummary]",
+ response_type="LibraryMaskingFormatCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def list_database_security_configs(self, compartment_id, **kwargs):
+ def list_masked_columns(self, masking_report_id, **kwargs):
"""
- Retrieves a list of all database security configurations in Data Safe.
-
- The ListDatabaseSecurityConfigs operation returns only the database security configurations in the specified `compartmentId`.
-
- The parameter `accessLevel` specifies whether to return only those compartments for which the
- requestor has INSPECT permissions on at least one resource directly
- or indirectly (ACCESSIBLE) (the resource can be in a subcompartment) or to return Not Authorized if
- Principal doesn't have access to even one of the child compartments. This is valid only when
- `compartmentIdInSubtree` is set to `true`.
-
- The parameter `compartmentIdInSubtree` applies when you perform ListDatabaseSecurityConfigs on the
- `compartmentId` passed and when it is set to true, the entire hierarchy of compartments can be returned.
- To get a full list of all compartments and subcompartments in the tenancy (root compartment),
- set the parameter `compartmentIdInSubtree` to true and `accessLevel` to ACCESSIBLE.
-
-
- :param str compartment_id: (required)
- A filter to return only resources that match the specified compartment OCID.
-
- :param bool compartment_id_in_subtree: (optional)
- Default is false.
- When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting.
-
- :param str access_level: (optional)
- Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED.
- Setting this to ACCESSIBLE returns only those compartments for which the
- user has INSPECT permissions directly or indirectly (permissions can be on a
- resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed.
+ Gets a list of masked columns present in the specified masking report and based on the specified query parameters.
- Allowed values are: "RESTRICTED", "ACCESSIBLE"
- :param str display_name: (optional)
- A filter to return only resources that match the specified display name.
+ :param str masking_report_id: (required)
+ The OCID of the masking report.
:param int limit: (optional)
For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
@@ -17523,45 +20434,35 @@ def list_database_security_configs(self, compartment_id, **kwargs):
__ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
- :param str lifecycle_state: (optional)
- The current state of the database security configuration.
-
- Allowed values are: "CREATING", "UPDATING", "ACTIVE", "FAILED", "NEEDS_ATTENTION", "DELETING", "DELETED"
-
- :param str database_security_config_id: (optional)
- An optional filter to return only resources that match the specified OCID of the database security configuration resource.
+ :param str sort_order: (optional)
+ The sort order to use, either ascending (ASC) or descending (DESC).
- :param datetime time_created_greater_than_or_equal_to: (optional)
- A filter to return only the resources that were created after the specified date and time, as defined by `RFC3339`__.
- Using TimeCreatedGreaterThanOrEqualToQueryParam parameter retrieves all resources created after that date.
+ Allowed values are: "ASC", "DESC"
- **Example:** 2016-12-19T16:39:57.600Z
+ :param str sort_by: (optional)
+ The field to sort by. You can specify only one sorting parameter (sortOrder). The default order for all the fields is ascending.
- __ https://tools.ietf.org/html/rfc3339
+ Allowed values are: "schemaName", "objectName"
- :param datetime time_created_less_than: (optional)
- Search for resources that were created before a specific date.
- Specifying this parameter corresponding `timeCreatedLessThan`
- parameter will retrieve all resources created before the
- specified created date, in \"YYYY-MM-ddThh:mmZ\" format with a Z offset, as
- defined by RFC 3339.
+ :param list[str] schema_name: (optional)
+ A filter to return only items related to specific schema name.
- **Example:** 2016-12-19T16:39:57.600Z
+ :param list[str] object_name: (optional)
+ A filter to return only items related to a specific object name.
- :param str target_id: (optional)
- A filter to return only items related to a specific target OCID.
+ :param list[str] column_name: (optional)
+ A filter to return only a specific column based on column name.
- :param str sort_order: (optional)
- The sort order to use, either ascending (ASC) or descending (DESC).
+ :param list[str] object_type: (optional)
+ A filter to return only items related to a specific object type.
- Allowed values are: "ASC", "DESC"
+ Allowed values are: "ALL", "TABLE", "EDITIONING_VIEW"
- :param str sort_by: (optional)
- The field used for sorting. Only one sorting order (sortOrder) can be specified.
- The default order for TIMECREATED is descending. The default order for DISPLAYNAME is ascending.
- The DISPLAYNAME sort order is case sensitive.
+ :param list[str] masking_column_group: (optional)
+ A filter to return only the resources that match the specified masking column group.
- Allowed values are: "TIMECREATED", "DISPLAYNAME"
+ :param str sensitive_type_id: (optional)
+ A filter to return only items related to a specific sensitive type OCID.
:param str opc_request_id: (optional)
Unique identifier for the request.
@@ -17578,55 +20479,49 @@ def list_database_security_configs(self, compartment_id, **kwargs):
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.DatabaseSecurityConfigCollection`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.MaskedColumnCollection`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use list_database_security_configs API.
+ Click `here `__ to see an example of how to use list_masked_columns API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
- required_arguments = ['compartmentId']
- resource_path = "/databaseSecurityConfigs"
+ required_arguments = ['maskingReportId']
+ resource_path = "/maskingReports/{maskingReportId}/maskedColumns"
method = "GET"
- operation_name = "list_database_security_configs"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/DatabaseSecurityConfigCollection/ListDatabaseSecurityConfigs"
+ operation_name = "list_masked_columns"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/MaskedColumnSummary/ListMaskedColumns"
# Don't accept unknown kwargs
expected_kwargs = [
"allow_control_chars",
"retry_strategy",
- "compartment_id_in_subtree",
- "access_level",
- "display_name",
"limit",
"page",
- "lifecycle_state",
- "database_security_config_id",
- "time_created_greater_than_or_equal_to",
- "time_created_less_than",
- "target_id",
"sort_order",
"sort_by",
+ "schema_name",
+ "object_name",
+ "column_name",
+ "object_type",
+ "masking_column_group",
+ "sensitive_type_id",
"opc_request_id"
]
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"list_database_security_configs got unknown kwargs: {extra_kwargs!r}")
+ f"list_masked_columns got unknown kwargs: {extra_kwargs!r}")
+
+ path_params = {
+ "maskingReportId": masking_report_id
+ }
- if 'access_level' in kwargs:
- access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"]
- if kwargs['access_level'] not in access_level_allowed_values:
- raise ValueError(
- f"Invalid value for `access_level`, must be one of { access_level_allowed_values }"
- )
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
- if 'lifecycle_state' in kwargs:
- lifecycle_state_allowed_values = ["CREATING", "UPDATING", "ACTIVE", "FAILED", "NEEDS_ATTENTION", "DELETING", "DELETED"]
- if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values:
- raise ValueError(
- f"Invalid value for `lifecycle_state`, must be one of { lifecycle_state_allowed_values }"
- )
+ for (k, v) in six.iteritems(path_params):
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
+ raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
if 'sort_order' in kwargs:
sort_order_allowed_values = ["ASC", "DESC"]
@@ -17636,26 +20531,31 @@ def list_database_security_configs(self, compartment_id, **kwargs):
)
if 'sort_by' in kwargs:
- sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"]
+ sort_by_allowed_values = ["schemaName", "objectName"]
if kwargs['sort_by'] not in sort_by_allowed_values:
raise ValueError(
f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
)
+ if 'object_type' in kwargs:
+ object_type_allowed_values = ["ALL", "TABLE", "EDITIONING_VIEW"]
+ for object_type_item in kwargs['object_type']:
+ if object_type_item not in object_type_allowed_values:
+ raise ValueError(
+ f"Invalid value for `object_type`, must be one of { object_type_allowed_values }"
+ )
+
query_params = {
- "compartmentId": compartment_id,
- "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing),
- "accessLevel": kwargs.get("access_level", missing),
- "displayName": kwargs.get("display_name", missing),
"limit": kwargs.get("limit", missing),
"page": kwargs.get("page", missing),
- "lifecycleState": kwargs.get("lifecycle_state", missing),
- "databaseSecurityConfigId": kwargs.get("database_security_config_id", missing),
- "timeCreatedGreaterThanOrEqualTo": kwargs.get("time_created_greater_than_or_equal_to", missing),
- "timeCreatedLessThan": kwargs.get("time_created_less_than", missing),
- "targetId": kwargs.get("target_id", missing),
"sortOrder": kwargs.get("sort_order", missing),
- "sortBy": kwargs.get("sort_by", missing)
+ "sortBy": kwargs.get("sort_by", missing),
+ "schemaName": self.base_client.generate_collection_format_param(kwargs.get("schema_name", missing), 'multi'),
+ "objectName": self.base_client.generate_collection_format_param(kwargs.get("object_name", missing), 'multi'),
+ "columnName": self.base_client.generate_collection_format_param(kwargs.get("column_name", missing), 'multi'),
+ "objectType": self.base_client.generate_collection_format_param(kwargs.get("object_type", missing), 'multi'),
+ "maskingColumnGroup": self.base_client.generate_collection_format_param(kwargs.get("masking_column_group", missing), 'multi'),
+ "sensitiveTypeId": kwargs.get("sensitive_type_id", missing)
}
query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
@@ -17681,9 +20581,10 @@ def list_database_security_configs(self, compartment_id, **kwargs):
self.base_client.call_api,
resource_path=resource_path,
method=method,
+ path_params=path_params,
query_params=query_params,
header_params=header_params,
- response_type="DatabaseSecurityConfigCollection",
+ response_type="MaskedColumnCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -17692,59 +20593,39 @@ def list_database_security_configs(self, compartment_id, **kwargs):
return self.base_client.call_api(
resource_path=resource_path,
method=method,
+ path_params=path_params,
query_params=query_params,
header_params=header_params,
- response_type="DatabaseSecurityConfigCollection",
+ response_type="MaskedColumnCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def list_difference_columns(self, sdm_masking_policy_difference_id, **kwargs):
+ def list_masking_analytics(self, compartment_id, **kwargs):
"""
- Gets a list of columns of a SDM masking policy difference resource based on the specified query parameters.
-
-
- :param str sdm_masking_policy_difference_id: (required)
- The OCID of the SDM masking policy difference.
-
- :param str difference_type: (optional)
- A filter to return only the SDM masking policy difference columns that match the specified difference type
-
- Allowed values are: "ALL", "NEW", "MODIFIED", "DELETED"
-
- :param str planned_action: (optional)
- A filter to return only the SDM masking policy difference columns that match the specified planned action.
-
- Allowed values are: "SYNC", "NO_SYNC"
-
- :param str sync_status: (optional)
- A filter to return the SDM masking policy difference columns based on the value of their syncStatus attribute.
-
- Allowed values are: "SYNCED", "NOT_SYNCED"
-
- :param list[str] schema_name: (optional)
- A filter to return only items related to specific schema name.
+ Gets consolidated masking analytics data based on the specified query parameters.
+ If CompartmentIdInSubtreeQueryParam is specified as true, the behaviour
+ is equivalent to accessLevel \"ACCESSIBLE\" by default.
- :param list[str] object_name: (optional)
- A filter to return only items related to a specific object name.
- :param list[str] column_name: (optional)
- A filter to return only a specific column based on column name.
+ :param str compartment_id: (required)
+ A filter to return only resources that match the specified compartment OCID.
- :param str sort_order: (optional)
- The sort order to use, either ascending (ASC) or descending (DESC).
+ :param bool compartment_id_in_subtree: (optional)
+ Default is false.
+ When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting.
- Allowed values are: "ASC", "DESC"
+ :param str group_by: (optional)
+ Attribute by which the masking analytics data should be grouped.
- :param str sort_by: (optional)
- The field to sort by. You can specify only one sorting parameter (sortOrder). The default order for schemaName is descending.
- The default order for differenceType, schemaName, objectName, columnName and plannedAction is ascending.
+ Allowed values are: "targetId", "policyId"
- Allowed values are: "differenceType", "schemaName", "objectName", "columnName", "plannedAction"
+ :param str target_id: (optional)
+ A filter to return only items related to a specific target OCID.
- :param str opc_request_id: (optional)
- Unique identifier for the request.
+ :param str masking_policy_id: (optional)
+ A filter to return only the resources that match the specified masking policy OCID.
:param int limit: (optional)
For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
@@ -17756,6 +20637,9 @@ def list_difference_columns(self, sdm_masking_policy_difference_id, **kwargs):
__ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
+ :param str opc_request_id: (optional)
+ Unique identifier for the request.
+
:param obj retry_strategy: (optional)
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
@@ -17768,94 +20652,49 @@ def list_difference_columns(self, sdm_masking_policy_difference_id, **kwargs):
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.SdmMaskingPolicyDifferenceColumnCollection`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.MaskingAnalyticsCollection`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use list_difference_columns API.
+ Click `here `__ to see an example of how to use list_masking_analytics API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
- required_arguments = ['sdmMaskingPolicyDifferenceId']
- resource_path = "/sdmMaskingPolicyDifferences/{sdmMaskingPolicyDifferenceId}/differenceColumns"
+ required_arguments = ['compartmentId']
+ resource_path = "/maskingAnalytics"
method = "GET"
- operation_name = "list_difference_columns"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SdmMaskingPolicyDifference/ListDifferenceColumns"
+ operation_name = "list_masking_analytics"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/MaskingPolicy/ListMaskingAnalytics"
# Don't accept unknown kwargs
expected_kwargs = [
"allow_control_chars",
"retry_strategy",
- "difference_type",
- "planned_action",
- "sync_status",
- "schema_name",
- "object_name",
- "column_name",
- "sort_order",
- "sort_by",
- "opc_request_id",
+ "compartment_id_in_subtree",
+ "group_by",
+ "target_id",
+ "masking_policy_id",
"limit",
- "page"
+ "page",
+ "opc_request_id"
]
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"list_difference_columns got unknown kwargs: {extra_kwargs!r}")
-
- path_params = {
- "sdmMaskingPolicyDifferenceId": sdm_masking_policy_difference_id
- }
-
- path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
-
- for (k, v) in six.iteritems(path_params):
- if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
- raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
-
- if 'difference_type' in kwargs:
- difference_type_allowed_values = ["ALL", "NEW", "MODIFIED", "DELETED"]
- if kwargs['difference_type'] not in difference_type_allowed_values:
- raise ValueError(
- f"Invalid value for `difference_type`, must be one of { difference_type_allowed_values }"
- )
-
- if 'planned_action' in kwargs:
- planned_action_allowed_values = ["SYNC", "NO_SYNC"]
- if kwargs['planned_action'] not in planned_action_allowed_values:
- raise ValueError(
- f"Invalid value for `planned_action`, must be one of { planned_action_allowed_values }"
- )
-
- if 'sync_status' in kwargs:
- sync_status_allowed_values = ["SYNCED", "NOT_SYNCED"]
- if kwargs['sync_status'] not in sync_status_allowed_values:
- raise ValueError(
- f"Invalid value for `sync_status`, must be one of { sync_status_allowed_values }"
- )
-
- if 'sort_order' in kwargs:
- sort_order_allowed_values = ["ASC", "DESC"]
- if kwargs['sort_order'] not in sort_order_allowed_values:
- raise ValueError(
- f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }"
- )
+ f"list_masking_analytics got unknown kwargs: {extra_kwargs!r}")
- if 'sort_by' in kwargs:
- sort_by_allowed_values = ["differenceType", "schemaName", "objectName", "columnName", "plannedAction"]
- if kwargs['sort_by'] not in sort_by_allowed_values:
+ if 'group_by' in kwargs:
+ group_by_allowed_values = ["targetId", "policyId"]
+ if kwargs['group_by'] not in group_by_allowed_values:
raise ValueError(
- f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
+ f"Invalid value for `group_by`, must be one of { group_by_allowed_values }"
)
query_params = {
- "differenceType": kwargs.get("difference_type", missing),
- "plannedAction": kwargs.get("planned_action", missing),
- "syncStatus": kwargs.get("sync_status", missing),
- "schemaName": self.base_client.generate_collection_format_param(kwargs.get("schema_name", missing), 'multi'),
- "objectName": self.base_client.generate_collection_format_param(kwargs.get("object_name", missing), 'multi'),
- "columnName": self.base_client.generate_collection_format_param(kwargs.get("column_name", missing), 'multi'),
- "sortOrder": kwargs.get("sort_order", missing),
- "sortBy": kwargs.get("sort_by", missing),
+ "compartmentId": compartment_id,
+ "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing),
+ "groupBy": kwargs.get("group_by", missing),
+ "targetId": kwargs.get("target_id", missing),
+ "maskingPolicyId": kwargs.get("masking_policy_id", missing),
"limit": kwargs.get("limit", missing),
"page": kwargs.get("page", missing)
}
@@ -17883,10 +20722,9 @@ def list_difference_columns(self, sdm_masking_policy_difference_id, **kwargs):
self.base_client.call_api,
resource_path=resource_path,
method=method,
- path_params=path_params,
query_params=query_params,
header_params=header_params,
- response_type="SdmMaskingPolicyDifferenceColumnCollection",
+ response_type="MaskingAnalyticsCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -17895,60 +20733,117 @@ def list_difference_columns(self, sdm_masking_policy_difference_id, **kwargs):
return self.base_client.call_api(
resource_path=resource_path,
method=method,
- path_params=path_params,
query_params=query_params,
header_params=header_params,
- response_type="SdmMaskingPolicyDifferenceColumnCollection",
+ response_type="MaskingAnalyticsCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def list_discovery_analytics(self, compartment_id, **kwargs):
+ def list_masking_columns(self, masking_policy_id, **kwargs):
"""
- Gets consolidated discovery analytics data based on the specified query parameters.
- If CompartmentIdInSubtreeQueryParam is specified as true, the behaviour
- is equivalent to accessLevel \"ACCESSIBLE\" by default.
+ Gets a list of masking columns present in the specified masking policy and based on the specified query parameters.
+
+
+ :param str masking_policy_id: (required)
+ The OCID of the masking policy.
+
+ :param int limit: (optional)
+ For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
+
+ __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
+
+ :param str page: (optional)
+ For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__.
+
+ __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
+
+ :param str sort_order: (optional)
+ The sort order to use, either ascending (ASC) or descending (DESC).
+
+ Allowed values are: "ASC", "DESC"
+
+ :param str sort_by: (optional)
+ The field to sort by. You can specify only one sorting parameter (sortOrder). The default order for timeCreated is descending.
+ The default order for other fields is ascending.
+
+ Allowed values are: "timeCreated", "schemaName", "objectName", "dataType"
+
+ :param str masking_column_lifecycle_state: (optional)
+ A filter to return only the resources that match the specified lifecycle states.
+
+ Allowed values are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "NEEDS_ATTENTION", "FAILED"
+
+ :param list[str] data_type: (optional)
+ A filter to return only resources that match the specified data types.
+
+ Allowed values are: "CHARACTER", "DATE", "LOB", "NUMERIC"
+
+ :param list[str] schema_name: (optional)
+ A filter to return only items related to specific schema name.
+
+ :param list[str] object_name: (optional)
+ A filter to return only items related to a specific object name.
+
+ :param list[str] column_name: (optional)
+ A filter to return only a specific column based on column name.
+ :param list[str] object_type: (optional)
+ A filter to return only items related to a specific object type.
+
+ Allowed values are: "ALL", "TABLE", "EDITIONING_VIEW"
- :param str compartment_id: (required)
- A filter to return only resources that match the specified compartment OCID.
+ :param list[str] masking_column_group: (optional)
+ A filter to return only the resources that match the specified masking column group.
- :param bool compartment_id_in_subtree: (optional)
- Default is false.
- When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting.
+ :param str sensitive_type_id: (optional)
+ A filter to return only items related to a specific sensitive type OCID.
- :param str group_by: (optional)
- Attribute by which the discovery analytics data should be grouped.
+ :param bool is_masking_enabled: (optional)
+ A filter to return the masking column resources based on the value of their isMaskingEnabled attribute.
+ A value of true returns only those columns for which masking is enabled. A value of false returns only those columns
+ for which masking is disabled. Omitting this parameter returns all the masking columns in a masking policy.
- Allowed values are: "targetId", "sensitiveDataModelId", "sensitiveTypeId", "targetIdAndSensitiveDataModelId", "sensitiveTypeIdAndTargetId", "sensitiveTypeIdAndSensitiveDataModelId"
+ :param bool is_seed_required: (optional)
+ A filter to return masking columns based on whether the assigned masking formats need a
+ seed value for masking. A value of true returns those masking columns that are using
+ Deterministic Encryption or Deterministic Substitution masking format.
- :param str target_id: (optional)
- A filter to return only items related to a specific target OCID.
+ :param datetime time_created_greater_than_or_equal_to: (optional)
+ A filter to return only the resources that were created after the specified date and time, as defined by `RFC3339`__.
+ Using TimeCreatedGreaterThanOrEqualToQueryParam parameter retrieves all resources created after that date.
- :param str sensitive_data_model_id: (optional)
- A filter to return only the resources that match the specified sensitive data model OCID.
+ **Example:** 2016-12-19T16:39:57.600Z
- :param str sensitive_type_id: (optional)
- A filter to return only items related to a specific sensitive type OCID.
+ __ https://tools.ietf.org/html/rfc3339
- :param int limit: (optional)
- For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
+ :param datetime time_created_less_than: (optional)
+ Search for resources that were created before a specific date.
+ Specifying this parameter corresponding `timeCreatedLessThan`
+ parameter will retrieve all resources created before the
+ specified created date, in \"YYYY-MM-ddThh:mmZ\" format with a Z offset, as
+ defined by RFC 3339.
- __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
+ **Example:** 2016-12-19T16:39:57.600Z
- :param str page: (optional)
- For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__.
+ :param datetime time_updated_greater_than_or_equal_to: (optional)
+ Search for resources that were updated after a specific date.
+ Specifying this parameter corresponding `timeUpdatedGreaterThanOrEqualTo`
+ parameter will retrieve all resources updated after the
+ specified created date, in \"YYYY-MM-ddThh:mmZ\" format with a Z offset, as
+ defined by RFC 3339.
- __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
+ :param datetime time_updated_less_than: (optional)
+ Search for resources that were updated before a specific date.
+ Specifying this parameter corresponding `timeUpdatedLessThan`
+ parameter will retrieve all resources updated before the
+ specified created date, in \"YYYY-MM-ddThh:mmZ\" format with a Z offset, as
+ defined by RFC 3339.
:param str opc_request_id: (optional)
Unique identifier for the request.
- :param bool is_common: (optional)
- A filter to return only the common sensitive type resources. Common sensitive types belong to
- library sensitive types which are frequently used to perform sensitive data discovery.
-
:param obj retry_strategy: (optional)
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
@@ -17961,55 +20856,114 @@ def list_discovery_analytics(self, compartment_id, **kwargs):
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.DiscoveryAnalyticsCollection`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.MaskingColumnCollection`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use list_discovery_analytics API.
+ Click `here `__ to see an example of how to use list_masking_columns API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
- required_arguments = ['compartmentId']
- resource_path = "/discoveryAnalytics"
+ required_arguments = ['maskingPolicyId']
+ resource_path = "/maskingPolicies/{maskingPolicyId}/maskingColumns"
method = "GET"
- operation_name = "list_discovery_analytics"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SensitiveDataModel/ListDiscoveryAnalytics"
+ operation_name = "list_masking_columns"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/MaskingColumn/ListMaskingColumns"
# Don't accept unknown kwargs
expected_kwargs = [
"allow_control_chars",
"retry_strategy",
- "compartment_id_in_subtree",
- "group_by",
- "target_id",
- "sensitive_data_model_id",
- "sensitive_type_id",
"limit",
"page",
- "opc_request_id",
- "is_common"
+ "sort_order",
+ "sort_by",
+ "masking_column_lifecycle_state",
+ "data_type",
+ "schema_name",
+ "object_name",
+ "column_name",
+ "object_type",
+ "masking_column_group",
+ "sensitive_type_id",
+ "is_masking_enabled",
+ "is_seed_required",
+ "time_created_greater_than_or_equal_to",
+ "time_created_less_than",
+ "time_updated_greater_than_or_equal_to",
+ "time_updated_less_than",
+ "opc_request_id"
]
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"list_discovery_analytics got unknown kwargs: {extra_kwargs!r}")
+ f"list_masking_columns got unknown kwargs: {extra_kwargs!r}")
- if 'group_by' in kwargs:
- group_by_allowed_values = ["targetId", "sensitiveDataModelId", "sensitiveTypeId", "targetIdAndSensitiveDataModelId", "sensitiveTypeIdAndTargetId", "sensitiveTypeIdAndSensitiveDataModelId"]
- if kwargs['group_by'] not in group_by_allowed_values:
+ path_params = {
+ "maskingPolicyId": masking_policy_id
+ }
+
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
+
+ for (k, v) in six.iteritems(path_params):
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
+ raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
+
+ if 'sort_order' in kwargs:
+ sort_order_allowed_values = ["ASC", "DESC"]
+ if kwargs['sort_order'] not in sort_order_allowed_values:
raise ValueError(
- f"Invalid value for `group_by`, must be one of { group_by_allowed_values }"
+ f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }"
+ )
+
+ if 'sort_by' in kwargs:
+ sort_by_allowed_values = ["timeCreated", "schemaName", "objectName", "dataType"]
+ if kwargs['sort_by'] not in sort_by_allowed_values:
+ raise ValueError(
+ f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
+ )
+
+ if 'masking_column_lifecycle_state' in kwargs:
+ masking_column_lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "UPDATING", "DELETING", "NEEDS_ATTENTION", "FAILED"]
+ if kwargs['masking_column_lifecycle_state'] not in masking_column_lifecycle_state_allowed_values:
+ raise ValueError(
+ f"Invalid value for `masking_column_lifecycle_state`, must be one of { masking_column_lifecycle_state_allowed_values }"
)
+ if 'data_type' in kwargs:
+ data_type_allowed_values = ["CHARACTER", "DATE", "LOB", "NUMERIC"]
+ for data_type_item in kwargs['data_type']:
+ if data_type_item not in data_type_allowed_values:
+ raise ValueError(
+ f"Invalid value for `data_type`, must be one of { data_type_allowed_values }"
+ )
+
+ if 'object_type' in kwargs:
+ object_type_allowed_values = ["ALL", "TABLE", "EDITIONING_VIEW"]
+ for object_type_item in kwargs['object_type']:
+ if object_type_item not in object_type_allowed_values:
+ raise ValueError(
+ f"Invalid value for `object_type`, must be one of { object_type_allowed_values }"
+ )
+
query_params = {
- "compartmentId": compartment_id,
- "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing),
- "groupBy": kwargs.get("group_by", missing),
- "targetId": kwargs.get("target_id", missing),
- "sensitiveDataModelId": kwargs.get("sensitive_data_model_id", missing),
- "sensitiveTypeId": kwargs.get("sensitive_type_id", missing),
"limit": kwargs.get("limit", missing),
"page": kwargs.get("page", missing),
- "isCommon": kwargs.get("is_common", missing)
+ "sortOrder": kwargs.get("sort_order", missing),
+ "sortBy": kwargs.get("sort_by", missing),
+ "maskingColumnLifecycleState": kwargs.get("masking_column_lifecycle_state", missing),
+ "dataType": self.base_client.generate_collection_format_param(kwargs.get("data_type", missing), 'multi'),
+ "schemaName": self.base_client.generate_collection_format_param(kwargs.get("schema_name", missing), 'multi'),
+ "objectName": self.base_client.generate_collection_format_param(kwargs.get("object_name", missing), 'multi'),
+ "columnName": self.base_client.generate_collection_format_param(kwargs.get("column_name", missing), 'multi'),
+ "objectType": self.base_client.generate_collection_format_param(kwargs.get("object_type", missing), 'multi'),
+ "maskingColumnGroup": self.base_client.generate_collection_format_param(kwargs.get("masking_column_group", missing), 'multi'),
+ "sensitiveTypeId": kwargs.get("sensitive_type_id", missing),
+ "isMaskingEnabled": kwargs.get("is_masking_enabled", missing),
+ "isSeedRequired": kwargs.get("is_seed_required", missing),
+ "timeCreatedGreaterThanOrEqualTo": kwargs.get("time_created_greater_than_or_equal_to", missing),
+ "timeCreatedLessThan": kwargs.get("time_created_less_than", missing),
+ "timeUpdatedGreaterThanOrEqualTo": kwargs.get("time_updated_greater_than_or_equal_to", missing),
+ "timeUpdatedLessThan": kwargs.get("time_updated_less_than", missing)
}
query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
@@ -18035,9 +20989,10 @@ def list_discovery_analytics(self, compartment_id, **kwargs):
self.base_client.call_api,
resource_path=resource_path,
method=method,
+ path_params=path_params,
query_params=query_params,
header_params=header_params,
- response_type="DiscoveryAnalyticsCollection",
+ response_type="MaskingColumnCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -18046,43 +21001,32 @@ def list_discovery_analytics(self, compartment_id, **kwargs):
return self.base_client.call_api(
resource_path=resource_path,
method=method,
+ path_params=path_params,
query_params=query_params,
header_params=header_params,
- response_type="DiscoveryAnalyticsCollection",
+ response_type="MaskingColumnCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def list_discovery_job_results(self, discovery_job_id, **kwargs):
+ def list_masking_objects(self, masking_policy_id, **kwargs):
"""
- Gets a list of discovery results based on the specified query parameters.
-
-
- :param str discovery_job_id: (required)
- The OCID of the discovery job.
-
- :param str discovery_type: (optional)
- A filter to return only the resources that match the specified discovery type.
-
- Allowed values are: "ALL", "NEW", "MODIFIED", "DELETED"
+ Gets a list of masking objects present in the specified masking policy and based on the specified query parameters.
- :param str planned_action: (optional)
- A filter to return only the resources that match the specified planned action.
- Allowed values are: "NONE", "ACCEPT", "INVALIDATE", "REJECT"
+ :param str masking_policy_id: (required)
+ The OCID of the masking policy.
- :param bool is_result_applied: (optional)
- A filter to return the discovery result resources based on the value of their isResultApplied attribute.
+ :param int limit: (optional)
+ For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
- :param list[str] schema_name: (optional)
- A filter to return only items related to specific schema name.
+ __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
- :param list[str] object_name: (optional)
- A filter to return only items related to a specific object name.
+ :param str page: (optional)
+ For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__.
- :param list[str] column_name: (optional)
- A filter to return only a specific column based on column name.
+ __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
:param str sort_order: (optional)
The sort order to use, either ascending (ASC) or descending (DESC).
@@ -18090,23 +21034,24 @@ def list_discovery_job_results(self, discovery_job_id, **kwargs):
Allowed values are: "ASC", "DESC"
:param str sort_by: (optional)
- The field to sort by. You can specify only one sorting parameter (sortOrder). The default order for timeFinished is descending.
- The default order for discoveryType, schemaName, objectName, columnName and plannedAction is ascending.
+ The field to sort by. You can specify only one sorting parameter (sortOrder).
+ The default order is ascending.
- Allowed values are: "discoveryType", "timeFinished", "schemaName", "objectName", "columnName", "plannedAction"
+ Allowed values are: "schemaName", "objectName", "objectType"
- :param str opc_request_id: (optional)
- Unique identifier for the request.
+ :param list[str] schema_name: (optional)
+ A filter to return only items related to specific schema name.
- :param int limit: (optional)
- For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
+ :param list[str] object_name: (optional)
+ A filter to return only items related to a specific object name.
- __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
+ :param list[str] object_type: (optional)
+ A filter to return only items related to a specific object type.
- :param str page: (optional)
- For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__.
+ Allowed values are: "ALL", "TABLE", "EDITIONING_VIEW"
- __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
+ :param str opc_request_id: (optional)
+ Unique identifier for the request.
:param obj retry_strategy: (optional)
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
@@ -18120,42 +21065,39 @@ def list_discovery_job_results(self, discovery_job_id, **kwargs):
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.DiscoveryJobResultCollection`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.MaskingObjectCollection`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use list_discovery_job_results API.
+ Click `here `__ to see an example of how to use list_masking_objects API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
- required_arguments = ['discoveryJobId']
- resource_path = "/discoveryJobs/{discoveryJobId}/results"
+ required_arguments = ['maskingPolicyId']
+ resource_path = "/maskingPolicies/{maskingPolicyId}/maskingObjects"
method = "GET"
- operation_name = "list_discovery_job_results"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/DiscoveryJob/ListDiscoveryJobResults"
+ operation_name = "list_masking_objects"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/MaskingObjectCollection/ListMaskingObjects"
# Don't accept unknown kwargs
expected_kwargs = [
"allow_control_chars",
"retry_strategy",
- "discovery_type",
- "planned_action",
- "is_result_applied",
- "schema_name",
- "object_name",
- "column_name",
+ "limit",
+ "page",
"sort_order",
"sort_by",
- "opc_request_id",
- "limit",
- "page"
+ "schema_name",
+ "object_name",
+ "object_type",
+ "opc_request_id"
]
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"list_discovery_job_results got unknown kwargs: {extra_kwargs!r}")
+ f"list_masking_objects got unknown kwargs: {extra_kwargs!r}")
path_params = {
- "discoveryJobId": discovery_job_id
+ "maskingPolicyId": masking_policy_id
}
path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
@@ -18164,20 +21106,6 @@ def list_discovery_job_results(self, discovery_job_id, **kwargs):
if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
- if 'discovery_type' in kwargs:
- discovery_type_allowed_values = ["ALL", "NEW", "MODIFIED", "DELETED"]
- if kwargs['discovery_type'] not in discovery_type_allowed_values:
- raise ValueError(
- f"Invalid value for `discovery_type`, must be one of { discovery_type_allowed_values }"
- )
-
- if 'planned_action' in kwargs:
- planned_action_allowed_values = ["NONE", "ACCEPT", "INVALIDATE", "REJECT"]
- if kwargs['planned_action'] not in planned_action_allowed_values:
- raise ValueError(
- f"Invalid value for `planned_action`, must be one of { planned_action_allowed_values }"
- )
-
if 'sort_order' in kwargs:
sort_order_allowed_values = ["ASC", "DESC"]
if kwargs['sort_order'] not in sort_order_allowed_values:
@@ -18186,23 +21114,28 @@ def list_discovery_job_results(self, discovery_job_id, **kwargs):
)
if 'sort_by' in kwargs:
- sort_by_allowed_values = ["discoveryType", "timeFinished", "schemaName", "objectName", "columnName", "plannedAction"]
+ sort_by_allowed_values = ["schemaName", "objectName", "objectType"]
if kwargs['sort_by'] not in sort_by_allowed_values:
raise ValueError(
f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
)
+ if 'object_type' in kwargs:
+ object_type_allowed_values = ["ALL", "TABLE", "EDITIONING_VIEW"]
+ for object_type_item in kwargs['object_type']:
+ if object_type_item not in object_type_allowed_values:
+ raise ValueError(
+ f"Invalid value for `object_type`, must be one of { object_type_allowed_values }"
+ )
+
query_params = {
- "discoveryType": kwargs.get("discovery_type", missing),
- "plannedAction": kwargs.get("planned_action", missing),
- "isResultApplied": kwargs.get("is_result_applied", missing),
- "schemaName": self.base_client.generate_collection_format_param(kwargs.get("schema_name", missing), 'multi'),
- "objectName": self.base_client.generate_collection_format_param(kwargs.get("object_name", missing), 'multi'),
- "columnName": self.base_client.generate_collection_format_param(kwargs.get("column_name", missing), 'multi'),
+ "limit": kwargs.get("limit", missing),
+ "page": kwargs.get("page", missing),
"sortOrder": kwargs.get("sort_order", missing),
"sortBy": kwargs.get("sort_by", missing),
- "limit": kwargs.get("limit", missing),
- "page": kwargs.get("page", missing)
+ "schemaName": self.base_client.generate_collection_format_param(kwargs.get("schema_name", missing), 'multi'),
+ "objectName": self.base_client.generate_collection_format_param(kwargs.get("object_name", missing), 'multi'),
+ "objectType": self.base_client.generate_collection_format_param(kwargs.get("object_type", missing), 'multi')
}
query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
@@ -18231,7 +21164,7 @@ def list_discovery_job_results(self, discovery_job_id, **kwargs):
path_params=path_params,
query_params=query_params,
header_params=header_params,
- response_type="DiscoveryJobResultCollection",
+ response_type="MaskingObjectCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -18243,48 +21176,40 @@ def list_discovery_job_results(self, discovery_job_id, **kwargs):
path_params=path_params,
query_params=query_params,
header_params=header_params,
- response_type="DiscoveryJobResultCollection",
+ response_type="MaskingObjectCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def list_discovery_jobs(self, compartment_id, **kwargs):
+ def list_masking_policies(self, compartment_id, **kwargs):
"""
- Gets a list of incremental discovery jobs based on the specified query parameters.
+ Gets a list of masking policies based on the specified query parameters.
:param str compartment_id: (required)
A filter to return only resources that match the specified compartment OCID.
- :param bool compartment_id_in_subtree: (optional)
- Default is false.
- When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting.
-
- :param str access_level: (optional)
- Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED.
- Setting this to ACCESSIBLE returns only those compartments for which the
- user has INSPECT permissions directly or indirectly (permissions can be on a
- resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed.
-
- Allowed values are: "RESTRICTED", "ACCESSIBLE"
+ :param str masking_policy_id: (optional)
+ A filter to return only the resources that match the specified masking policy OCID.
:param str display_name: (optional)
A filter to return only resources that match the specified display name.
- :param str discovery_job_id: (optional)
- A filter to return only the resources that match the specified discovery job OCID.
+ :param int limit: (optional)
+ For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
- :param str target_id: (optional)
- A filter to return only items related to a specific target OCID.
+ __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
- :param str lifecycle_state: (optional)
- A filter to return only the resources that match the specified lifecycle state.
+ :param str page: (optional)
+ For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__.
- Allowed values are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED"
+ __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
- :param str sensitive_data_model_id: (optional)
- A filter to return only the resources that match the specified sensitive data model OCID.
+ :param str lifecycle_state: (optional)
+ A filter to return only the resources that match the specified lifecycle states.
+
+ Allowed values are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "NEEDS_ATTENTION", "FAILED"
:param str sort_order: (optional)
The sort order to use, either ascending (ASC) or descending (DESC).
@@ -18292,23 +21217,48 @@ def list_discovery_jobs(self, compartment_id, **kwargs):
Allowed values are: "ASC", "DESC"
:param str sort_by: (optional)
- The field to sort by. You can specify only one sorting parameter (sortOrder). The default order for timeFinished is descending.
- The default order for displayName is ascending.
+ The field to sort by. You can specify only one sorting parameter (sortOrder). The default order for timeCreated is descending.
+ The default order for displayName is ascending. The displayName sort order is case sensitive.
- Allowed values are: "timeStarted", "displayName"
+ Allowed values are: "displayName", "timeCreated"
- :param str opc_request_id: (optional)
- Unique identifier for the request.
+ :param str sensitive_data_model_id: (optional)
+ A filter to return only the resources that match the specified sensitive data model OCID.
- :param int limit: (optional)
- For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
+ :param str target_id: (optional)
+ A filter to return only items related to a specific target OCID.
- __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
+ :param datetime time_created_greater_than_or_equal_to: (optional)
+ A filter to return only the resources that were created after the specified date and time, as defined by `RFC3339`__.
+ Using TimeCreatedGreaterThanOrEqualToQueryParam parameter retrieves all resources created after that date.
- :param str page: (optional)
- For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__.
+ **Example:** 2016-12-19T16:39:57.600Z
- __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
+ __ https://tools.ietf.org/html/rfc3339
+
+ :param datetime time_created_less_than: (optional)
+ Search for resources that were created before a specific date.
+ Specifying this parameter corresponding `timeCreatedLessThan`
+ parameter will retrieve all resources created before the
+ specified created date, in \"YYYY-MM-ddThh:mmZ\" format with a Z offset, as
+ defined by RFC 3339.
+
+ **Example:** 2016-12-19T16:39:57.600Z
+
+ :param bool compartment_id_in_subtree: (optional)
+ Default is false.
+ When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting.
+
+ :param str access_level: (optional)
+ Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED.
+ Setting this to ACCESSIBLE returns only those compartments for which the
+ user has INSPECT permissions directly or indirectly (permissions can be on a
+ resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed.
+
+ Allowed values are: "RESTRICTED", "ACCESSIBLE"
+
+ :param str opc_request_id: (optional)
+ Unique identifier for the request.
:param obj retry_strategy: (optional)
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
@@ -18322,50 +21272,45 @@ def list_discovery_jobs(self, compartment_id, **kwargs):
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.DiscoveryJobCollection`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.MaskingPolicyCollection`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use list_discovery_jobs API.
+ Click `here `__ to see an example of how to use list_masking_policies API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
required_arguments = ['compartmentId']
- resource_path = "/discoveryJobs"
+ resource_path = "/maskingPolicies"
method = "GET"
- operation_name = "list_discovery_jobs"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/DiscoveryJob/ListDiscoveryJobs"
+ operation_name = "list_masking_policies"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/MaskingPolicy/ListMaskingPolicies"
# Don't accept unknown kwargs
expected_kwargs = [
"allow_control_chars",
"retry_strategy",
- "compartment_id_in_subtree",
- "access_level",
+ "masking_policy_id",
"display_name",
- "discovery_job_id",
- "target_id",
+ "limit",
+ "page",
"lifecycle_state",
- "sensitive_data_model_id",
"sort_order",
"sort_by",
- "opc_request_id",
- "limit",
- "page"
+ "sensitive_data_model_id",
+ "target_id",
+ "time_created_greater_than_or_equal_to",
+ "time_created_less_than",
+ "compartment_id_in_subtree",
+ "access_level",
+ "opc_request_id"
]
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"list_discovery_jobs got unknown kwargs: {extra_kwargs!r}")
-
- if 'access_level' in kwargs:
- access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"]
- if kwargs['access_level'] not in access_level_allowed_values:
- raise ValueError(
- f"Invalid value for `access_level`, must be one of { access_level_allowed_values }"
- )
+ f"list_masking_policies got unknown kwargs: {extra_kwargs!r}")
if 'lifecycle_state' in kwargs:
- lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED"]
+ lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "NEEDS_ATTENTION", "FAILED"]
if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values:
raise ValueError(
f"Invalid value for `lifecycle_state`, must be one of { lifecycle_state_allowed_values }"
@@ -18379,25 +21324,34 @@ def list_discovery_jobs(self, compartment_id, **kwargs):
)
if 'sort_by' in kwargs:
- sort_by_allowed_values = ["timeStarted", "displayName"]
+ sort_by_allowed_values = ["displayName", "timeCreated"]
if kwargs['sort_by'] not in sort_by_allowed_values:
raise ValueError(
f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
)
+ if 'access_level' in kwargs:
+ access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"]
+ if kwargs['access_level'] not in access_level_allowed_values:
+ raise ValueError(
+ f"Invalid value for `access_level`, must be one of { access_level_allowed_values }"
+ )
+
query_params = {
+ "maskingPolicyId": kwargs.get("masking_policy_id", missing),
"compartmentId": compartment_id,
- "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing),
- "accessLevel": kwargs.get("access_level", missing),
"displayName": kwargs.get("display_name", missing),
- "discoveryJobId": kwargs.get("discovery_job_id", missing),
- "targetId": kwargs.get("target_id", missing),
+ "limit": kwargs.get("limit", missing),
+ "page": kwargs.get("page", missing),
"lifecycleState": kwargs.get("lifecycle_state", missing),
- "sensitiveDataModelId": kwargs.get("sensitive_data_model_id", missing),
"sortOrder": kwargs.get("sort_order", missing),
"sortBy": kwargs.get("sort_by", missing),
- "limit": kwargs.get("limit", missing),
- "page": kwargs.get("page", missing)
+ "sensitiveDataModelId": kwargs.get("sensitive_data_model_id", missing),
+ "targetId": kwargs.get("target_id", missing),
+ "timeCreatedGreaterThanOrEqualTo": kwargs.get("time_created_greater_than_or_equal_to", missing),
+ "timeCreatedLessThan": kwargs.get("time_created_less_than", missing),
+ "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing),
+ "accessLevel": kwargs.get("access_level", missing)
}
query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
@@ -18425,7 +21379,7 @@ def list_discovery_jobs(self, compartment_id, **kwargs):
method=method,
query_params=query_params,
header_params=header_params,
- response_type="DiscoveryJobCollection",
+ response_type="MaskingPolicyCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -18436,32 +21390,19 @@ def list_discovery_jobs(self, compartment_id, **kwargs):
method=method,
query_params=query_params,
header_params=header_params,
- response_type="DiscoveryJobCollection",
+ response_type="MaskingPolicyCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def list_findings(self, security_assessment_id, **kwargs):
+ def list_masking_reports(self, compartment_id, **kwargs):
"""
- List all the findings from all the targets in the specified compartment.
-
-
- :param str security_assessment_id: (required)
- The OCID of the security assessment.
-
- :param str opc_request_id: (optional)
- Unique identifier for the request.
-
- :param str severity: (optional)
- A filter to return only findings of a particular risk level.
-
- Allowed values are: "HIGH", "MEDIUM", "LOW", "EVALUATE", "ADVISORY", "PASS"
+ Gets a list of masking reports based on the specified query parameters.
- :param str references: (optional)
- An optional filter to return only findings that match the specified reference.
- Allowed values are: "STIG", "CIS", "GDPR"
+ :param str compartment_id: (required)
+ A filter to return only resources that match the specified compartment OCID.
:param int limit: (optional)
For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
@@ -18473,6 +21414,25 @@ def list_findings(self, security_assessment_id, **kwargs):
__ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
+ :param str masking_policy_id: (optional)
+ A filter to return only the resources that match the specified masking policy OCID.
+
+ :param str target_id: (optional)
+ A filter to return only items related to a specific target OCID.
+
+ :param str sort_order: (optional)
+ The sort order to use, either ascending (ASC) or descending (DESC).
+
+ Allowed values are: "ASC", "DESC"
+
+ :param str sort_by: (optional)
+ The field to sort by. You can specify only one sorting parameter (sortOrder). The default order for timeMaskingFinished is descending.
+
+ Allowed values are: "timeMaskingFinished"
+
+ :param str opc_request_id: (optional)
+ Unique identifier for the request.
+
:param bool compartment_id_in_subtree: (optional)
Default is false.
When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting.
@@ -18485,10 +21445,6 @@ def list_findings(self, security_assessment_id, **kwargs):
Allowed values are: "RESTRICTED", "ACCESSIBLE"
- :param str finding_key: (optional)
- Each finding in security assessment has an associated key (think of key as a finding's name).
- For a given finding, the key will be the same across targets. The user can use these keys to filter the findings.
-
:param obj retry_strategy: (optional)
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
@@ -18501,59 +21457,50 @@ def list_findings(self, security_assessment_id, **kwargs):
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.data_safe.models.FindingSummary`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.MaskingReportCollection`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use list_findings API.
+ Click `here `__ to see an example of how to use list_masking_reports API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
- required_arguments = ['securityAssessmentId']
- resource_path = "/securityAssessments/{securityAssessmentId}/findings"
+ required_arguments = ['compartmentId']
+ resource_path = "/maskingReports"
method = "GET"
- operation_name = "list_findings"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SecurityAssessment/ListFindings"
+ operation_name = "list_masking_reports"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/MaskingPolicy/ListMaskingReports"
# Don't accept unknown kwargs
expected_kwargs = [
"allow_control_chars",
- "retry_strategy",
- "opc_request_id",
- "severity",
- "references",
+ "retry_strategy",
"limit",
"page",
+ "masking_policy_id",
+ "target_id",
+ "sort_order",
+ "sort_by",
+ "opc_request_id",
"compartment_id_in_subtree",
- "access_level",
- "finding_key"
+ "access_level"
]
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"list_findings got unknown kwargs: {extra_kwargs!r}")
-
- path_params = {
- "securityAssessmentId": security_assessment_id
- }
-
- path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
-
- for (k, v) in six.iteritems(path_params):
- if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
- raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
+ f"list_masking_reports got unknown kwargs: {extra_kwargs!r}")
- if 'severity' in kwargs:
- severity_allowed_values = ["HIGH", "MEDIUM", "LOW", "EVALUATE", "ADVISORY", "PASS"]
- if kwargs['severity'] not in severity_allowed_values:
+ if 'sort_order' in kwargs:
+ sort_order_allowed_values = ["ASC", "DESC"]
+ if kwargs['sort_order'] not in sort_order_allowed_values:
raise ValueError(
- f"Invalid value for `severity`, must be one of { severity_allowed_values }"
+ f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }"
)
- if 'references' in kwargs:
- references_allowed_values = ["STIG", "CIS", "GDPR"]
- if kwargs['references'] not in references_allowed_values:
+ if 'sort_by' in kwargs:
+ sort_by_allowed_values = ["timeMaskingFinished"]
+ if kwargs['sort_by'] not in sort_by_allowed_values:
raise ValueError(
- f"Invalid value for `references`, must be one of { references_allowed_values }"
+ f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
)
if 'access_level' in kwargs:
@@ -18564,13 +21511,15 @@ def list_findings(self, security_assessment_id, **kwargs):
)
query_params = {
- "severity": kwargs.get("severity", missing),
- "references": kwargs.get("references", missing),
"limit": kwargs.get("limit", missing),
"page": kwargs.get("page", missing),
+ "maskingPolicyId": kwargs.get("masking_policy_id", missing),
+ "targetId": kwargs.get("target_id", missing),
+ "sortOrder": kwargs.get("sort_order", missing),
+ "sortBy": kwargs.get("sort_by", missing),
+ "compartmentId": compartment_id,
"compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing),
- "accessLevel": kwargs.get("access_level", missing),
- "findingKey": kwargs.get("finding_key", missing)
+ "accessLevel": kwargs.get("access_level", missing)
}
query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
@@ -18596,10 +21545,9 @@ def list_findings(self, security_assessment_id, **kwargs):
self.base_client.call_api,
resource_path=resource_path,
method=method,
- path_params=path_params,
query_params=query_params,
header_params=header_params,
- response_type="list[FindingSummary]",
+ response_type="MaskingReportCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -18608,49 +21556,21 @@ def list_findings(self, security_assessment_id, **kwargs):
return self.base_client.call_api(
resource_path=resource_path,
method=method,
- path_params=path_params,
query_params=query_params,
header_params=header_params,
- response_type="list[FindingSummary]",
+ response_type="MaskingReportCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def list_grants(self, user_assessment_id, user_key, **kwargs):
+ def list_masking_schemas(self, masking_policy_id, **kwargs):
"""
- Gets a list of grants for a particular user in the specified user assessment. A user grant contains details such as the
- privilege name, type, category, and depth level. The depth level indicates how deep in the hierarchy of roles granted to
- roles a privilege grant is. The userKey in this operation is a system-generated identifier. Perform the operation ListUsers
- to get the userKey for a particular user.
-
-
- :param str user_assessment_id: (required)
- The OCID of the user assessment.
-
- :param str user_key: (required)
- The unique user key. This is a system-generated identifier. ListUsers gets the user key for a user.
-
- :param str grant_key: (optional)
- A filter to return only items that match the specified user grant key.
-
- :param str grant_name: (optional)
- A filter to return only items that match the specified user grant name.
-
- :param str privilege_type: (optional)
- A filter to return only items that match the specified privilege grant type.
-
- :param str privilege_category: (optional)
- A filter to return only items that match the specified user privilege category.
-
- :param int depth_level: (optional)
- A filter to return only items that match the specified user grant depth level.
+ Gets a list of masking schemas present in the specified masking policy and based on the specified query parameters.
- :param int depth_level_greater_than_or_equal_to: (optional)
- A filter to return only items that are at a level greater than or equal to the specified user grant depth level.
- :param int depth_level_less_than: (optional)
- A filter to return only items that are at a level less than the specified user grant depth level.
+ :param str masking_policy_id: (required)
+ The OCID of the masking policy.
:param int limit: (optional)
For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
@@ -18668,9 +21588,13 @@ def list_grants(self, user_assessment_id, user_key, **kwargs):
Allowed values are: "ASC", "DESC"
:param str sort_by: (optional)
- The field to sort by. You can specify only one sort order (sortOrder). The default order for grantName is ascending.
+ The field to sort by. You can specify only one sorting parameter (sortOrder).
+ The default order is ascending.
- Allowed values are: "grantName", "grantType", "privilegeCategory", "depthLevel", "key"
+ Allowed values are: "schemaName"
+
+ :param list[str] schema_name: (optional)
+ A filter to return only items related to specific schema name.
:param str opc_request_id: (optional)
Unique identifier for the request.
@@ -18687,44 +21611,37 @@ def list_grants(self, user_assessment_id, user_key, **kwargs):
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.data_safe.models.GrantSummary`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.MaskingSchemaCollection`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use list_grants API.
+ Click `here `__ to see an example of how to use list_masking_schemas API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
- required_arguments = ['userAssessmentId', 'userKey']
- resource_path = "/userAssessments/{userAssessmentId}/users/{userKey}/grants"
+ required_arguments = ['maskingPolicyId']
+ resource_path = "/maskingPolicies/{maskingPolicyId}/maskingSchemas"
method = "GET"
- operation_name = "list_grants"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/UserAssessment/ListGrants"
+ operation_name = "list_masking_schemas"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/MaskingSchemaCollection/ListMaskingSchemas"
# Don't accept unknown kwargs
expected_kwargs = [
"allow_control_chars",
"retry_strategy",
- "grant_key",
- "grant_name",
- "privilege_type",
- "privilege_category",
- "depth_level",
- "depth_level_greater_than_or_equal_to",
- "depth_level_less_than",
"limit",
"page",
"sort_order",
"sort_by",
+ "schema_name",
"opc_request_id"
]
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"list_grants got unknown kwargs: {extra_kwargs!r}")
+ f"list_masking_schemas got unknown kwargs: {extra_kwargs!r}")
path_params = {
- "userAssessmentId": user_assessment_id,
- "userKey": user_key
+ "maskingPolicyId": masking_policy_id
}
path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
@@ -18741,24 +21658,18 @@ def list_grants(self, user_assessment_id, user_key, **kwargs):
)
if 'sort_by' in kwargs:
- sort_by_allowed_values = ["grantName", "grantType", "privilegeCategory", "depthLevel", "key"]
+ sort_by_allowed_values = ["schemaName"]
if kwargs['sort_by'] not in sort_by_allowed_values:
raise ValueError(
f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
)
query_params = {
- "grantKey": kwargs.get("grant_key", missing),
- "grantName": kwargs.get("grant_name", missing),
- "privilegeType": kwargs.get("privilege_type", missing),
- "privilegeCategory": kwargs.get("privilege_category", missing),
- "depthLevel": kwargs.get("depth_level", missing),
- "depthLevelGreaterThanOrEqualTo": kwargs.get("depth_level_greater_than_or_equal_to", missing),
- "depthLevelLessThan": kwargs.get("depth_level_less_than", missing),
"limit": kwargs.get("limit", missing),
"page": kwargs.get("page", missing),
"sortOrder": kwargs.get("sort_order", missing),
- "sortBy": kwargs.get("sort_by", missing)
+ "sortBy": kwargs.get("sort_by", missing),
+ "schemaName": self.base_client.generate_collection_format_param(kwargs.get("schema_name", missing), 'multi')
}
query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
@@ -18787,7 +21698,7 @@ def list_grants(self, user_assessment_id, user_key, **kwargs):
path_params=path_params,
query_params=query_params,
header_params=header_params,
- response_type="list[GrantSummary]",
+ response_type="MaskingSchemaCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -18799,38 +21710,31 @@ def list_grants(self, user_assessment_id, user_key, **kwargs):
path_params=path_params,
query_params=query_params,
header_params=header_params,
- response_type="list[GrantSummary]",
+ response_type="MaskingSchemaCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def list_library_masking_formats(self, compartment_id, **kwargs):
+ def list_on_prem_connectors(self, compartment_id, **kwargs):
"""
- Gets a list of library masking formats based on the specified query parameters.
+ Gets a list of on-premises connectors.
:param str compartment_id: (required)
A filter to return only resources that match the specified compartment OCID.
- :param str library_masking_format_id: (optional)
- A filter to return only the resources that match the specified library masking format OCID.
-
- :param bool compartment_id_in_subtree: (optional)
- Default is false.
- When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting.
-
- :param str access_level: (optional)
- Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED.
- Setting this to ACCESSIBLE returns only those compartments for which the
- user has INSPECT permissions directly or indirectly (permissions can be on a
- resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed.
-
- Allowed values are: "RESTRICTED", "ACCESSIBLE"
+ :param str on_prem_connector_id: (optional)
+ A filter to return only the on-premises connector that matches the specified id.
:param str display_name: (optional)
A filter to return only resources that match the specified display name.
+ :param str on_prem_connector_lifecycle_state: (optional)
+ A filter to return only on-premises connector resources that match the specified lifecycle state.
+
+ Allowed values are: "CREATING", "UPDATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", "FAILED", "NEEDS_ATTENTION"
+
:param int limit: (optional)
For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
@@ -18841,47 +21745,33 @@ def list_library_masking_formats(self, compartment_id, **kwargs):
__ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
- :param str lifecycle_state: (optional)
- A filter to return only the resources that match the specified lifecycle states.
-
- Allowed values are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "NEEDS_ATTENTION", "FAILED"
-
- :param datetime time_created_greater_than_or_equal_to: (optional)
- A filter to return only the resources that were created after the specified date and time, as defined by `RFC3339`__.
- Using TimeCreatedGreaterThanOrEqualToQueryParam parameter retrieves all resources created after that date.
-
- **Example:** 2016-12-19T16:39:57.600Z
-
- __ https://tools.ietf.org/html/rfc3339
-
- :param datetime time_created_less_than: (optional)
- Search for resources that were created before a specific date.
- Specifying this parameter corresponding `timeCreatedLessThan`
- parameter will retrieve all resources created before the
- specified created date, in \"YYYY-MM-ddThh:mmZ\" format with a Z offset, as
- defined by RFC 3339.
-
- **Example:** 2016-12-19T16:39:57.600Z
-
- :param str library_masking_format_source: (optional)
- A filter to return the library masking format resources based on the value of their source attribute.
-
- Allowed values are: "ORACLE", "USER"
-
:param str sort_order: (optional)
The sort order to use, either ascending (ASC) or descending (DESC).
Allowed values are: "ASC", "DESC"
:param str sort_by: (optional)
- The field to sort by. You can specify only one sorting parameter (sortOrder). The default order for timeCreated is descending.
- The default order for displayName is ascending. The displayName sort order is case sensitive.
+ The field used for sorting. Only one sorting order (sortOrder) can be specified.
+ The default order for TIMECREATED is descending. The default order for DISPLAYNAME is ascending.
+ The DISPLAYNAME sort order is case sensitive.
- Allowed values are: "displayName", "timeCreated"
+ Allowed values are: "TIMECREATED", "DISPLAYNAME"
:param str opc_request_id: (optional)
Unique identifier for the request.
+ :param bool compartment_id_in_subtree: (optional)
+ Default is false.
+ When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting.
+
+ :param str access_level: (optional)
+ Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED.
+ Setting this to ACCESSIBLE returns only those compartments for which the
+ user has INSPECT permissions directly or indirectly (permissions can be on a
+ resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed.
+
+ Allowed values are: "RESTRICTED", "ACCESSIBLE"
+
:param obj retry_strategy: (optional)
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
@@ -18894,61 +21784,44 @@ def list_library_masking_formats(self, compartment_id, **kwargs):
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.LibraryMaskingFormatCollection`
+ :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.data_safe.models.OnPremConnectorSummary`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use list_library_masking_formats API.
+ Click `here `__ to see an example of how to use list_on_prem_connectors API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
required_arguments = ['compartmentId']
- resource_path = "/libraryMaskingFormats"
+ resource_path = "/onPremConnectors"
method = "GET"
- operation_name = "list_library_masking_formats"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/LibraryMaskingFormatSummary/ListLibraryMaskingFormats"
+ operation_name = "list_on_prem_connectors"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/OnPremConnectorSummary/ListOnPremConnectors"
# Don't accept unknown kwargs
expected_kwargs = [
"allow_control_chars",
"retry_strategy",
- "library_masking_format_id",
- "compartment_id_in_subtree",
- "access_level",
+ "on_prem_connector_id",
"display_name",
+ "on_prem_connector_lifecycle_state",
"limit",
"page",
- "lifecycle_state",
- "time_created_greater_than_or_equal_to",
- "time_created_less_than",
- "library_masking_format_source",
"sort_order",
"sort_by",
- "opc_request_id"
+ "opc_request_id",
+ "compartment_id_in_subtree",
+ "access_level"
]
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"list_library_masking_formats got unknown kwargs: {extra_kwargs!r}")
-
- if 'access_level' in kwargs:
- access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"]
- if kwargs['access_level'] not in access_level_allowed_values:
- raise ValueError(
- f"Invalid value for `access_level`, must be one of { access_level_allowed_values }"
- )
-
- if 'lifecycle_state' in kwargs:
- lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "NEEDS_ATTENTION", "FAILED"]
- if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values:
- raise ValueError(
- f"Invalid value for `lifecycle_state`, must be one of { lifecycle_state_allowed_values }"
- )
+ f"list_on_prem_connectors got unknown kwargs: {extra_kwargs!r}")
- if 'library_masking_format_source' in kwargs:
- library_masking_format_source_allowed_values = ["ORACLE", "USER"]
- if kwargs['library_masking_format_source'] not in library_masking_format_source_allowed_values:
+ if 'on_prem_connector_lifecycle_state' in kwargs:
+ on_prem_connector_lifecycle_state_allowed_values = ["CREATING", "UPDATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", "FAILED", "NEEDS_ATTENTION"]
+ if kwargs['on_prem_connector_lifecycle_state'] not in on_prem_connector_lifecycle_state_allowed_values:
raise ValueError(
- f"Invalid value for `library_masking_format_source`, must be one of { library_masking_format_source_allowed_values }"
+ f"Invalid value for `on_prem_connector_lifecycle_state`, must be one of { on_prem_connector_lifecycle_state_allowed_values }"
)
if 'sort_order' in kwargs:
@@ -18959,26 +21832,30 @@ def list_library_masking_formats(self, compartment_id, **kwargs):
)
if 'sort_by' in kwargs:
- sort_by_allowed_values = ["displayName", "timeCreated"]
+ sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"]
if kwargs['sort_by'] not in sort_by_allowed_values:
raise ValueError(
f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
)
+ if 'access_level' in kwargs:
+ access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"]
+ if kwargs['access_level'] not in access_level_allowed_values:
+ raise ValueError(
+ f"Invalid value for `access_level`, must be one of { access_level_allowed_values }"
+ )
+
query_params = {
- "libraryMaskingFormatId": kwargs.get("library_masking_format_id", missing),
"compartmentId": compartment_id,
- "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing),
- "accessLevel": kwargs.get("access_level", missing),
+ "onPremConnectorId": kwargs.get("on_prem_connector_id", missing),
"displayName": kwargs.get("display_name", missing),
+ "onPremConnectorLifecycleState": kwargs.get("on_prem_connector_lifecycle_state", missing),
"limit": kwargs.get("limit", missing),
"page": kwargs.get("page", missing),
- "lifecycleState": kwargs.get("lifecycle_state", missing),
- "timeCreatedGreaterThanOrEqualTo": kwargs.get("time_created_greater_than_or_equal_to", missing),
- "timeCreatedLessThan": kwargs.get("time_created_less_than", missing),
- "libraryMaskingFormatSource": kwargs.get("library_masking_format_source", missing),
"sortOrder": kwargs.get("sort_order", missing),
- "sortBy": kwargs.get("sort_by", missing)
+ "sortBy": kwargs.get("sort_by", missing),
+ "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing),
+ "accessLevel": kwargs.get("access_level", missing)
}
query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
@@ -19006,7 +21883,7 @@ def list_library_masking_formats(self, compartment_id, **kwargs):
method=method,
query_params=query_params,
header_params=header_params,
- response_type="LibraryMaskingFormatCollection",
+ response_type="list[OnPremConnectorSummary]",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -19017,19 +21894,35 @@ def list_library_masking_formats(self, compartment_id, **kwargs):
method=method,
query_params=query_params,
header_params=header_params,
- response_type="LibraryMaskingFormatCollection",
+ response_type="list[OnPremConnectorSummary]",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def list_masked_columns(self, masking_report_id, **kwargs):
+ def list_peer_target_databases(self, target_database_id, **kwargs):
"""
- Gets a list of masked columns present in the specified masking report and based on the specified query parameters.
+ Lists all the peer target databases under the primary target database identified by the OCID passed as path parameter.
- :param str masking_report_id: (required)
- The OCID of the masking report.
+ :param str target_database_id: (required)
+ The OCID of the Data Safe target database.
+
+ :param str if_match: (optional)
+ For optimistic concurrency control. In the PUT or DELETE call
+ for a resource, set the if-match parameter to the value of the
+ etag from a previous GET or POST response for that resource.
+ The resource will be updated or deleted only if the etag you
+ provide matches the resource's current etag value.
+
+ :param str opc_request_id: (optional)
+ Unique identifier for the request.
+
+ :param str opc_retry_token: (optional)
+ A token that uniquely identifies a request so it can be retried in case of a timeout or
+ server error without risk of executing that same action again. Retry tokens expire after 24
+ hours, but can be invalidated before then due to conflicting operations. For example, if a resource
+ has been deleted and purged from the system, then a retry of the original creation request might be rejected.
:param int limit: (optional)
For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
@@ -19041,39 +21934,6 @@ def list_masked_columns(self, masking_report_id, **kwargs):
__ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
- :param str sort_order: (optional)
- The sort order to use, either ascending (ASC) or descending (DESC).
-
- Allowed values are: "ASC", "DESC"
-
- :param str sort_by: (optional)
- The field to sort by. You can specify only one sorting parameter (sortOrder). The default order for all the fields is ascending.
-
- Allowed values are: "schemaName", "objectName"
-
- :param list[str] schema_name: (optional)
- A filter to return only items related to specific schema name.
-
- :param list[str] object_name: (optional)
- A filter to return only items related to a specific object name.
-
- :param list[str] column_name: (optional)
- A filter to return only a specific column based on column name.
-
- :param list[str] object_type: (optional)
- A filter to return only items related to a specific object type.
-
- Allowed values are: "ALL", "TABLE", "EDITIONING_VIEW"
-
- :param list[str] masking_column_group: (optional)
- A filter to return only the resources that match the specified masking column group.
-
- :param str sensitive_type_id: (optional)
- A filter to return only items related to a specific sensitive type OCID.
-
- :param str opc_request_id: (optional)
- Unique identifier for the request.
-
:param obj retry_strategy: (optional)
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
@@ -19086,42 +21946,36 @@ def list_masked_columns(self, masking_report_id, **kwargs):
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.MaskedColumnCollection`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.PeerTargetDatabaseCollection`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use list_masked_columns API.
+ Click `here `__ to see an example of how to use list_peer_target_databases API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
- required_arguments = ['maskingReportId']
- resource_path = "/maskingReports/{maskingReportId}/maskedColumns"
+ required_arguments = ['targetDatabaseId']
+ resource_path = "/targetDatabases/{targetDatabaseId}/peerTargetDatabases"
method = "GET"
- operation_name = "list_masked_columns"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/MaskedColumnSummary/ListMaskedColumns"
+ operation_name = "list_peer_target_databases"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/PeerTargetDatabase/ListPeerTargetDatabases"
# Don't accept unknown kwargs
expected_kwargs = [
"allow_control_chars",
"retry_strategy",
+ "if_match",
+ "opc_request_id",
+ "opc_retry_token",
"limit",
- "page",
- "sort_order",
- "sort_by",
- "schema_name",
- "object_name",
- "column_name",
- "object_type",
- "masking_column_group",
- "sensitive_type_id",
- "opc_request_id"
+ "page"
]
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"list_masked_columns got unknown kwargs: {extra_kwargs!r}")
+ f"list_peer_target_databases got unknown kwargs: {extra_kwargs!r}")
path_params = {
- "maskingReportId": masking_report_id
+ "targetDatabaseId": target_database_id
}
path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
@@ -19130,46 +21984,18 @@ def list_masked_columns(self, masking_report_id, **kwargs):
if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
- if 'sort_order' in kwargs:
- sort_order_allowed_values = ["ASC", "DESC"]
- if kwargs['sort_order'] not in sort_order_allowed_values:
- raise ValueError(
- f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }"
- )
-
- if 'sort_by' in kwargs:
- sort_by_allowed_values = ["schemaName", "objectName"]
- if kwargs['sort_by'] not in sort_by_allowed_values:
- raise ValueError(
- f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
- )
-
- if 'object_type' in kwargs:
- object_type_allowed_values = ["ALL", "TABLE", "EDITIONING_VIEW"]
- for object_type_item in kwargs['object_type']:
- if object_type_item not in object_type_allowed_values:
- raise ValueError(
- f"Invalid value for `object_type`, must be one of { object_type_allowed_values }"
- )
-
query_params = {
"limit": kwargs.get("limit", missing),
- "page": kwargs.get("page", missing),
- "sortOrder": kwargs.get("sort_order", missing),
- "sortBy": kwargs.get("sort_by", missing),
- "schemaName": self.base_client.generate_collection_format_param(kwargs.get("schema_name", missing), 'multi'),
- "objectName": self.base_client.generate_collection_format_param(kwargs.get("object_name", missing), 'multi'),
- "columnName": self.base_client.generate_collection_format_param(kwargs.get("column_name", missing), 'multi'),
- "objectType": self.base_client.generate_collection_format_param(kwargs.get("object_type", missing), 'multi'),
- "maskingColumnGroup": self.base_client.generate_collection_format_param(kwargs.get("masking_column_group", missing), 'multi'),
- "sensitiveTypeId": kwargs.get("sensitive_type_id", missing)
+ "page": kwargs.get("page", missing)
}
query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
header_params = {
"accept": "application/json",
"content-type": "application/json",
- "opc-request-id": kwargs.get("opc_request_id", missing)
+ "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}
@@ -19182,6 +22008,7 @@ def list_masked_columns(self, masking_report_id, **kwargs):
if retry_strategy:
if not isinstance(retry_strategy, retry.NoneRetryStrategy):
+ self.base_client.add_opc_retry_token_if_needed(header_params)
self.base_client.add_opc_client_retries_header(header_params)
retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
return retry_strategy.make_retrying_call(
@@ -19191,7 +22018,7 @@ def list_masked_columns(self, masking_report_id, **kwargs):
path_params=path_params,
query_params=query_params,
header_params=header_params,
- response_type="MaskedColumnCollection",
+ response_type="PeerTargetDatabaseCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -19203,19 +22030,34 @@ def list_masked_columns(self, masking_report_id, **kwargs):
path_params=path_params,
query_params=query_params,
header_params=header_params,
- response_type="MaskedColumnCollection",
+ response_type="PeerTargetDatabaseCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def list_masking_analytics(self, compartment_id, **kwargs):
+ def list_profile_analytics(self, user_assessment_id, compartment_id, **kwargs):
"""
- Gets consolidated masking analytics data based on the specified query parameters.
- If CompartmentIdInSubtreeQueryParam is specified as true, the behaviour
- is equivalent to accessLevel \"ACCESSIBLE\" by default.
+ Gets a list of aggregated user profile details in the specified compartment. This provides information about the
+ overall profiles available. For example, the user profile details include how many users have the profile assigned
+ and do how many use password verification function. This data is especially useful content for dashboards or to support analytics.
+
+ When you perform the ListProfileAnalytics operation, if the parameter compartmentIdInSubtree is set to \"true,\" and if the
+ parameter accessLevel is set to ACCESSIBLE, then the operation returns compartments in which the requestor has INSPECT
+ permissions on at least one resource, directly or indirectly (in subcompartments). If the operation is performed at the
+ root compartment and the requestor does not have access to at least one subcompartment of the compartment specified by
+ compartmentId, then \"Not Authorized\" is returned.
+
+ The parameter compartmentIdInSubtree applies when you perform ListProfileAnalytics on the compartmentId passed and when it is
+ set to true, the entire hierarchy of compartments can be returned.
+
+ To use ListProfileAnalytics to get a full list of all compartments and subcompartments in the tenancy from the root compartment,
+ set the parameter compartmentIdInSubtree to true and accessLevel to ACCESSIBLE.
+ :param str user_assessment_id: (required)
+ The OCID of the user assessment.
+
:param str compartment_id: (required)
A filter to return only resources that match the specified compartment OCID.
@@ -19223,17 +22065,17 @@ def list_masking_analytics(self, compartment_id, **kwargs):
Default is false.
When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting.
- :param str group_by: (optional)
- Attribute by which the masking analytics data should be grouped.
+ :param str access_level: (optional)
+ Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED.
+ Setting this to ACCESSIBLE returns only those compartments for which the
+ user has INSPECT permissions directly or indirectly (permissions can be on a
+ resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed.
- Allowed values are: "targetId", "policyId"
+ Allowed values are: "RESTRICTED", "ACCESSIBLE"
:param str target_id: (optional)
A filter to return only items related to a specific target OCID.
- :param str masking_policy_id: (optional)
- A filter to return only the resources that match the specified masking policy OCID.
-
:param int limit: (optional)
For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
@@ -19244,6 +22086,21 @@ def list_masking_analytics(self, compartment_id, **kwargs):
__ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
+ :param str profile_name: (optional)
+ A filter to return only items that match the specified profile name.
+
+ :param str sort_by: (optional)
+ The field used for sorting. Only one sorting order (sortOrder) can be specified.
+ The default order for TIMECREATED is descending. The default order for DISPLAYNAME is ascending.
+ The DISPLAYNAME sort order is case sensitive.
+
+ Allowed values are: "TIMECREATED", "DISPLAYNAME"
+
+ :param str sort_order: (optional)
+ The sort order to use, either ascending (ASC) or descending (DESC).
+
+ Allowed values are: "ASC", "DESC"
+
:param str opc_request_id: (optional)
Unique identifier for the request.
@@ -19259,51 +22116,79 @@ def list_masking_analytics(self, compartment_id, **kwargs):
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.MaskingAnalyticsCollection`
+ :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.data_safe.models.ProfileAggregation`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use list_masking_analytics API.
+ Click `here `__ to see an example of how to use list_profile_analytics API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
- required_arguments = ['compartmentId']
- resource_path = "/maskingAnalytics"
+ required_arguments = ['userAssessmentId', 'compartmentId']
+ resource_path = "/userAssessments/{userAssessmentId}/profileAnalytics"
method = "GET"
- operation_name = "list_masking_analytics"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/MaskingPolicy/ListMaskingAnalytics"
+ operation_name = "list_profile_analytics"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/Profile/ListProfileAnalytics"
# Don't accept unknown kwargs
expected_kwargs = [
"allow_control_chars",
"retry_strategy",
"compartment_id_in_subtree",
- "group_by",
+ "access_level",
"target_id",
- "masking_policy_id",
"limit",
"page",
+ "profile_name",
+ "sort_by",
+ "sort_order",
"opc_request_id"
]
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"list_masking_analytics got unknown kwargs: {extra_kwargs!r}")
+ f"list_profile_analytics got unknown kwargs: {extra_kwargs!r}")
- if 'group_by' in kwargs:
- group_by_allowed_values = ["targetId", "policyId"]
- if kwargs['group_by'] not in group_by_allowed_values:
+ path_params = {
+ "userAssessmentId": user_assessment_id
+ }
+
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
+
+ for (k, v) in six.iteritems(path_params):
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
+ raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
+
+ if 'access_level' in kwargs:
+ access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"]
+ if kwargs['access_level'] not in access_level_allowed_values:
raise ValueError(
- f"Invalid value for `group_by`, must be one of { group_by_allowed_values }"
+ f"Invalid value for `access_level`, must be one of { access_level_allowed_values }"
+ )
+
+ if 'sort_by' in kwargs:
+ sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"]
+ if kwargs['sort_by'] not in sort_by_allowed_values:
+ raise ValueError(
+ f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
+ )
+
+ if 'sort_order' in kwargs:
+ sort_order_allowed_values = ["ASC", "DESC"]
+ if kwargs['sort_order'] not in sort_order_allowed_values:
+ raise ValueError(
+ f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }"
)
query_params = {
"compartmentId": compartment_id,
"compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing),
- "groupBy": kwargs.get("group_by", missing),
+ "accessLevel": kwargs.get("access_level", missing),
"targetId": kwargs.get("target_id", missing),
- "maskingPolicyId": kwargs.get("masking_policy_id", missing),
"limit": kwargs.get("limit", missing),
- "page": kwargs.get("page", missing)
+ "page": kwargs.get("page", missing),
+ "profileName": kwargs.get("profile_name", 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}
@@ -19329,9 +22214,10 @@ def list_masking_analytics(self, compartment_id, **kwargs):
self.base_client.call_api,
resource_path=resource_path,
method=method,
+ path_params=path_params,
query_params=query_params,
header_params=header_params,
- response_type="MaskingAnalyticsCollection",
+ response_type="list[ProfileAggregation]",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -19340,113 +22226,121 @@ def list_masking_analytics(self, compartment_id, **kwargs):
return self.base_client.call_api(
resource_path=resource_path,
method=method,
+ path_params=path_params,
query_params=query_params,
header_params=header_params,
- response_type="MaskingAnalyticsCollection",
+ response_type="list[ProfileAggregation]",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def list_masking_columns(self, masking_policy_id, **kwargs):
+ def list_profile_summaries(self, user_assessment_id, compartment_id, **kwargs):
"""
- Gets a list of masking columns present in the specified masking policy and based on the specified query parameters.
+ Gets a list of user profiles containing the profile details along with the target id and user counts.
+ The ListProfiles operation returns only the profiles belonging to a certain target. If compartment type user assessment
+ id is provided, then profile information for all the targets belonging to the pertaining compartment is returned.
+ The list does not include any subcompartments of the compartment under consideration.
- :param str masking_policy_id: (required)
- The OCID of the masking policy.
+ The parameter 'accessLevel' specifies whether to return only those compartments for which the requestor has
+ INSPECT permissions on at least one resource directly or indirectly (ACCESSIBLE) (the resource can be in a
+ subcompartment) or to return Not Authorized if Principal doesn't have access to even one of the child compartments.
+ This is valid only when 'compartmentIdInSubtree' is set to 'true'.
- :param int limit: (optional)
- For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
+ The parameter 'compartmentIdInSubtree' applies when you perform ListUserProfiles on the 'compartmentId' belonging
+ to the assessmentId passed and when it is set to true, the entire hierarchy of compartments can be returned.
+ To get a full list of all compartments and subcompartments in the tenancy (root compartment), set the parameter
+ 'compartmentIdInSubtree' to true and 'accessLevel' to ACCESSIBLE.
- __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
- :param str page: (optional)
- For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__.
+ :param str user_assessment_id: (required)
+ The OCID of the user assessment.
- __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
+ :param str compartment_id: (required)
+ A filter to return only resources that match the specified compartment OCID.
- :param str sort_order: (optional)
- The sort order to use, either ascending (ASC) or descending (DESC).
+ :param bool compartment_id_in_subtree: (optional)
+ Default is false.
+ When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting.
- Allowed values are: "ASC", "DESC"
+ :param str access_level: (optional)
+ Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED.
+ Setting this to ACCESSIBLE returns only those compartments for which the
+ user has INSPECT permissions directly or indirectly (permissions can be on a
+ resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed.
- :param str sort_by: (optional)
- The field to sort by. You can specify only one sorting parameter (sortOrder). The default order for timeCreated is descending.
- The default order for other fields is ascending.
+ Allowed values are: "RESTRICTED", "ACCESSIBLE"
- Allowed values are: "timeCreated", "schemaName", "objectName", "dataType"
+ :param str target_id: (optional)
+ A filter to return only items related to a specific target OCID.
- :param str masking_column_lifecycle_state: (optional)
- A filter to return only the resources that match the specified lifecycle states.
+ :param int limit: (optional)
+ For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
- Allowed values are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "NEEDS_ATTENTION", "FAILED"
+ __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
- :param list[str] data_type: (optional)
- A filter to return only resources that match the specified data types.
+ :param str page: (optional)
+ For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__.
- Allowed values are: "CHARACTER", "DATE", "LOB", "NUMERIC"
+ __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
- :param list[str] schema_name: (optional)
- A filter to return only items related to specific schema name.
+ :param str profile_name: (optional)
+ A filter to return only items that match the specified profile name.
- :param list[str] object_name: (optional)
- A filter to return only items related to a specific object name.
+ :param bool is_user_created: (optional)
+ An optional filter to return the user created profiles.
- :param list[str] column_name: (optional)
- A filter to return only a specific column based on column name.
+ :param str password_verification_function: (optional)
+ An optional filter to filter the profiles based on password verification function.
- :param list[str] object_type: (optional)
- A filter to return only items related to a specific object type.
+ :param str user_count_greater_than_or_equal: (optional)
+ An optional filter to return the profiles having user count greater than or equal to the provided value.
- Allowed values are: "ALL", "TABLE", "EDITIONING_VIEW"
+ :param str user_count_less_than: (optional)
+ An optional filter to return the profiles having user count less than the provided value.
- :param list[str] masking_column_group: (optional)
- A filter to return only the resources that match the specified masking column group.
+ :param str failed_login_attempts_greater_than_or_equal: (optional)
+ An optional filter to return the profiles having allow failed login attempts number greater than or equal to the provided value.
+ String value is used for accommodating the \"UNLIMITED\" and \"DEFAULT\" values.
- :param str sensitive_type_id: (optional)
- A filter to return only items related to a specific sensitive type OCID.
+ :param str failed_login_attempts_less_than: (optional)
+ An optional filter to return the profiles having failed login attempts number less than the provided value.
+ String value is used for accommodating the \"UNLIMITED\" and \"DEFAULT\" values.
- :param bool is_masking_enabled: (optional)
- A filter to return the masking column resources based on the value of their isMaskingEnabled attribute.
- A value of true returns only those columns for which masking is enabled. A value of false returns only those columns
- for which masking is disabled. Omitting this parameter returns all the masking columns in a masking policy.
+ :param str sessions_per_user_greater_than_or_equal: (optional)
+ An optional filter to return the profiles permitting the user to spawn multiple sessions having count.
+ greater than or equal to the provided value. String value is used for accommodating the \"UNLIMITED\" and \"DEFAULT\" values.
- :param bool is_seed_required: (optional)
- A filter to return masking columns based on whether the assigned masking formats need a
- seed value for masking. A value of true returns those masking columns that are using
- Deterministic Encryption or Deterministic Substitution masking format.
+ :param str sessions_per_user_less_than: (optional)
+ An optional filter to return the profiles permitting the user to spawn multiple sessions having count less than
+ the provided value. String value is used for accommodating the \"UNLIMITED\" and \"DEFAULT\" values.
- :param datetime time_created_greater_than_or_equal_to: (optional)
- A filter to return only the resources that were created after the specified date and time, as defined by `RFC3339`__.
- Using TimeCreatedGreaterThanOrEqualToQueryParam parameter retrieves all resources created after that date.
+ :param str inactive_account_time_greater_than_or_equal: (optional)
+ An optional filter to return the profiles allowing inactive account time in days greater than or equal to the provided value.
+ String value is used for accommodating the \"UNLIMITED\" and \"DEFAULT\" values.
- **Example:** 2016-12-19T16:39:57.600Z
+ :param str inactive_account_time_less_than: (optional)
+ An optional filter to return the profiles allowing inactive account time in days less than the provided value.
+ String value is used for accommodating the \"UNLIMITED\" and \"DEFAULT\" values.
- __ https://tools.ietf.org/html/rfc3339
+ :param str password_lock_time_greater_than_or_equal: (optional)
+ An optional filter to return the profiles having password lock number greater than or equal to the provided value.
+ String value is used for accommodating the \"UNLIMITED\" and \"DEFAULT\" values.
- :param datetime time_created_less_than: (optional)
- Search for resources that were created before a specific date.
- Specifying this parameter corresponding `timeCreatedLessThan`
- parameter will retrieve all resources created before the
- specified created date, in \"YYYY-MM-ddThh:mmZ\" format with a Z offset, as
- defined by RFC 3339.
+ :param str password_lock_time_less_than: (optional)
+ An optional filter to return the profiles having password lock number less than the provided value.
+ String value is used for accommodating the \"UNLIMITED\" and \"DEFAULT\" values.
- **Example:** 2016-12-19T16:39:57.600Z
+ :param str sort_by: (optional)
+ The field to sort by. You can specify only one sort order (sortOrder). The default order is targetId ASC.
- :param datetime time_updated_greater_than_or_equal_to: (optional)
- Search for resources that were updated after a specific date.
- Specifying this parameter corresponding `timeUpdatedGreaterThanOrEqualTo`
- parameter will retrieve all resources updated after the
- specified created date, in \"YYYY-MM-ddThh:mmZ\" format with a Z offset, as
- defined by RFC 3339.
+ Allowed values are: "profileName", "targetId", "isUserCreated", "passwordVerificationFunction", "userCount", "sessionsPerUser", "inactiveAccountTime", "passwordLockTime", "failedLoginAttempts"
- :param datetime time_updated_less_than: (optional)
- Search for resources that were updated before a specific date.
- Specifying this parameter corresponding `timeUpdatedLessThan`
- parameter will retrieve all resources updated before the
- specified created date, in \"YYYY-MM-ddThh:mmZ\" format with a Z offset, as
- defined by RFC 3339.
+ :param str sort_order: (optional)
+ The sort order to use, either ascending (ASC) or descending (DESC).
+
+ Allowed values are: "ASC", "DESC"
:param str opc_request_id: (optional)
Unique identifier for the request.
@@ -19463,50 +22357,52 @@ def list_masking_columns(self, masking_policy_id, **kwargs):
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.MaskingColumnCollection`
+ :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.data_safe.models.ProfileSummary`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use list_masking_columns API.
+ Click `here `__ to see an example of how to use list_profile_summaries API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
- required_arguments = ['maskingPolicyId']
- resource_path = "/maskingPolicies/{maskingPolicyId}/maskingColumns"
+ required_arguments = ['userAssessmentId', 'compartmentId']
+ resource_path = "/userAssessments/{userAssessmentId}/profiles"
method = "GET"
- operation_name = "list_masking_columns"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/MaskingColumn/ListMaskingColumns"
+ operation_name = "list_profile_summaries"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/UserAssessment/ListProfileSummaries"
# Don't accept unknown kwargs
expected_kwargs = [
"allow_control_chars",
"retry_strategy",
+ "compartment_id_in_subtree",
+ "access_level",
+ "target_id",
"limit",
"page",
- "sort_order",
+ "profile_name",
+ "is_user_created",
+ "password_verification_function",
+ "user_count_greater_than_or_equal",
+ "user_count_less_than",
+ "failed_login_attempts_greater_than_or_equal",
+ "failed_login_attempts_less_than",
+ "sessions_per_user_greater_than_or_equal",
+ "sessions_per_user_less_than",
+ "inactive_account_time_greater_than_or_equal",
+ "inactive_account_time_less_than",
+ "password_lock_time_greater_than_or_equal",
+ "password_lock_time_less_than",
"sort_by",
- "masking_column_lifecycle_state",
- "data_type",
- "schema_name",
- "object_name",
- "column_name",
- "object_type",
- "masking_column_group",
- "sensitive_type_id",
- "is_masking_enabled",
- "is_seed_required",
- "time_created_greater_than_or_equal_to",
- "time_created_less_than",
- "time_updated_greater_than_or_equal_to",
- "time_updated_less_than",
+ "sort_order",
"opc_request_id"
]
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"list_masking_columns got unknown kwargs: {extra_kwargs!r}")
+ f"list_profile_summaries got unknown kwargs: {extra_kwargs!r}")
path_params = {
- "maskingPolicyId": masking_policy_id
+ "userAssessmentId": user_assessment_id
}
path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
@@ -19515,62 +22411,49 @@ def list_masking_columns(self, masking_policy_id, **kwargs):
if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
- if 'sort_order' in kwargs:
- sort_order_allowed_values = ["ASC", "DESC"]
- if kwargs['sort_order'] not in sort_order_allowed_values:
+ if 'access_level' in kwargs:
+ access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"]
+ if kwargs['access_level'] not in access_level_allowed_values:
raise ValueError(
- f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }"
+ f"Invalid value for `access_level`, must be one of { access_level_allowed_values }"
)
if 'sort_by' in kwargs:
- sort_by_allowed_values = ["timeCreated", "schemaName", "objectName", "dataType"]
+ sort_by_allowed_values = ["profileName", "targetId", "isUserCreated", "passwordVerificationFunction", "userCount", "sessionsPerUser", "inactiveAccountTime", "passwordLockTime", "failedLoginAttempts"]
if kwargs['sort_by'] not in sort_by_allowed_values:
raise ValueError(
f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
)
- if 'masking_column_lifecycle_state' in kwargs:
- masking_column_lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "UPDATING", "DELETING", "NEEDS_ATTENTION", "FAILED"]
- if kwargs['masking_column_lifecycle_state'] not in masking_column_lifecycle_state_allowed_values:
+ if 'sort_order' in kwargs:
+ sort_order_allowed_values = ["ASC", "DESC"]
+ if kwargs['sort_order'] not in sort_order_allowed_values:
raise ValueError(
- f"Invalid value for `masking_column_lifecycle_state`, must be one of { masking_column_lifecycle_state_allowed_values }"
+ f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }"
)
- if 'data_type' in kwargs:
- data_type_allowed_values = ["CHARACTER", "DATE", "LOB", "NUMERIC"]
- for data_type_item in kwargs['data_type']:
- if data_type_item not in data_type_allowed_values:
- raise ValueError(
- f"Invalid value for `data_type`, must be one of { data_type_allowed_values }"
- )
-
- if 'object_type' in kwargs:
- object_type_allowed_values = ["ALL", "TABLE", "EDITIONING_VIEW"]
- for object_type_item in kwargs['object_type']:
- if object_type_item not in object_type_allowed_values:
- raise ValueError(
- f"Invalid value for `object_type`, must be one of { object_type_allowed_values }"
- )
-
query_params = {
+ "compartmentId": compartment_id,
+ "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing),
+ "accessLevel": kwargs.get("access_level", missing),
+ "targetId": kwargs.get("target_id", missing),
"limit": kwargs.get("limit", missing),
"page": kwargs.get("page", missing),
- "sortOrder": kwargs.get("sort_order", missing),
- "sortBy": kwargs.get("sort_by", missing),
- "maskingColumnLifecycleState": kwargs.get("masking_column_lifecycle_state", missing),
- "dataType": self.base_client.generate_collection_format_param(kwargs.get("data_type", missing), 'multi'),
- "schemaName": self.base_client.generate_collection_format_param(kwargs.get("schema_name", missing), 'multi'),
- "objectName": self.base_client.generate_collection_format_param(kwargs.get("object_name", missing), 'multi'),
- "columnName": self.base_client.generate_collection_format_param(kwargs.get("column_name", missing), 'multi'),
- "objectType": self.base_client.generate_collection_format_param(kwargs.get("object_type", missing), 'multi'),
- "maskingColumnGroup": self.base_client.generate_collection_format_param(kwargs.get("masking_column_group", missing), 'multi'),
- "sensitiveTypeId": kwargs.get("sensitive_type_id", missing),
- "isMaskingEnabled": kwargs.get("is_masking_enabled", missing),
- "isSeedRequired": kwargs.get("is_seed_required", missing),
- "timeCreatedGreaterThanOrEqualTo": kwargs.get("time_created_greater_than_or_equal_to", missing),
- "timeCreatedLessThan": kwargs.get("time_created_less_than", missing),
- "timeUpdatedGreaterThanOrEqualTo": kwargs.get("time_updated_greater_than_or_equal_to", missing),
- "timeUpdatedLessThan": kwargs.get("time_updated_less_than", missing)
+ "profileName": kwargs.get("profile_name", missing),
+ "isUserCreated": kwargs.get("is_user_created", missing),
+ "passwordVerificationFunction": kwargs.get("password_verification_function", missing),
+ "userCountGreaterThanOrEqual": kwargs.get("user_count_greater_than_or_equal", missing),
+ "userCountLessThan": kwargs.get("user_count_less_than", missing),
+ "failedLoginAttemptsGreaterThanOrEqual": kwargs.get("failed_login_attempts_greater_than_or_equal", missing),
+ "failedLoginAttemptsLessThan": kwargs.get("failed_login_attempts_less_than", missing),
+ "sessionsPerUserGreaterThanOrEqual": kwargs.get("sessions_per_user_greater_than_or_equal", missing),
+ "sessionsPerUserLessThan": kwargs.get("sessions_per_user_less_than", missing),
+ "inactiveAccountTimeGreaterThanOrEqual": kwargs.get("inactive_account_time_greater_than_or_equal", missing),
+ "inactiveAccountTimeLessThan": kwargs.get("inactive_account_time_less_than", missing),
+ "passwordLockTimeGreaterThanOrEqual": kwargs.get("password_lock_time_greater_than_or_equal", missing),
+ "passwordLockTimeLessThan": kwargs.get("password_lock_time_less_than", 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}
@@ -19599,7 +22482,7 @@ def list_masking_columns(self, masking_policy_id, **kwargs):
path_params=path_params,
query_params=query_params,
header_params=header_params,
- response_type="MaskingColumnCollection",
+ response_type="list[ProfileSummary]",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -19611,19 +22494,36 @@ def list_masking_columns(self, masking_policy_id, **kwargs):
path_params=path_params,
query_params=query_params,
header_params=header_params,
- response_type="MaskingColumnCollection",
+ response_type="list[ProfileSummary]",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def list_masking_objects(self, masking_policy_id, **kwargs):
+ def list_report_definitions(self, compartment_id, **kwargs):
"""
- Gets a list of masking objects present in the specified masking policy and based on the specified query parameters.
+ Gets a list of report definitions.
+ The ListReportDefinitions operation returns only the report definitions in the specified `compartmentId`.
+ It also returns the seeded report definitions which are available to all the compartments.
- :param str masking_policy_id: (required)
- The OCID of the masking policy.
+ :param str compartment_id: (required)
+ A filter to return only resources that match the specified compartment OCID.
+
+ :param bool compartment_id_in_subtree: (optional)
+ Default is false.
+ When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting.
+
+ :param str access_level: (optional)
+ Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED.
+ Setting this to ACCESSIBLE returns only those compartments for which the
+ user has INSPECT permissions directly or indirectly (permissions can be on a
+ resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed.
+
+ Allowed values are: "RESTRICTED", "ACCESSIBLE"
+
+ :param str display_name: (optional)
+ The name of the report definition to query.
:param int limit: (optional)
For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
@@ -19641,24 +22541,32 @@ def list_masking_objects(self, masking_policy_id, **kwargs):
Allowed values are: "ASC", "DESC"
:param str sort_by: (optional)
- The field to sort by. You can specify only one sorting parameter (sortOrder).
- The default order is ascending.
+ The field used for sorting. Only one sorting parameter order (sortOrder) can be specified.
+ The default order for TIMECREATED is descending. The default order for DISPLAYNAME is ascending.
+ The DISPLAYNAME sort order is case sensitive.
- Allowed values are: "schemaName", "objectName", "objectType"
+ Allowed values are: "TIMECREATED", "DISPLAYNAME", "DISPLAYORDER"
- :param list[str] schema_name: (optional)
- A filter to return only items related to specific schema name.
+ :param str opc_request_id: (optional)
+ Unique identifier for the request.
- :param list[str] object_name: (optional)
- A filter to return only items related to a specific object name.
+ :param bool is_seeded: (optional)
+ A boolean flag indicating to list seeded report definitions. Set this parameter to get list of seeded report definitions.
- :param list[str] object_type: (optional)
- A filter to return only items related to a specific object type.
+ :param str data_source: (optional)
+ Specifies the name of a resource that provides data for the report. For example alerts, events.
- Allowed values are: "ALL", "TABLE", "EDITIONING_VIEW"
+ Allowed values are: "EVENTS", "ALERTS", "VIOLATIONS", "ALLOWED_SQL"
- :param str opc_request_id: (optional)
- Unique identifier for the request.
+ :param str lifecycle_state: (optional)
+ An optional filter to return only resources that match the specified lifecycle state.
+
+ Allowed values are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED"
+
+ :param str category: (optional)
+ An optional filter to return only resources that match the specified category.
+
+ Allowed values are: "CUSTOM_REPORTS", "SUMMARY", "ACTIVITY_AUDITING"
:param obj retry_strategy: (optional)
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
@@ -19672,46 +22580,47 @@ def list_masking_objects(self, masking_policy_id, **kwargs):
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.MaskingObjectCollection`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.ReportDefinitionCollection`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use list_masking_objects API.
+ Click `here `__ to see an example of how to use list_report_definitions API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
- required_arguments = ['maskingPolicyId']
- resource_path = "/maskingPolicies/{maskingPolicyId}/maskingObjects"
+ required_arguments = ['compartmentId']
+ resource_path = "/reportDefinitions"
method = "GET"
- operation_name = "list_masking_objects"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/MaskingObjectCollection/ListMaskingObjects"
+ operation_name = "list_report_definitions"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/ReportDefinition/ListReportDefinitions"
# Don't accept unknown kwargs
expected_kwargs = [
"allow_control_chars",
"retry_strategy",
+ "compartment_id_in_subtree",
+ "access_level",
+ "display_name",
"limit",
"page",
"sort_order",
"sort_by",
- "schema_name",
- "object_name",
- "object_type",
- "opc_request_id"
+ "opc_request_id",
+ "is_seeded",
+ "data_source",
+ "lifecycle_state",
+ "category"
]
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"list_masking_objects got unknown kwargs: {extra_kwargs!r}")
-
- path_params = {
- "maskingPolicyId": masking_policy_id
- }
-
- path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
+ f"list_report_definitions got unknown kwargs: {extra_kwargs!r}")
- for (k, v) in six.iteritems(path_params):
- if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
- raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
+ if 'access_level' in kwargs:
+ access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"]
+ if kwargs['access_level'] not in access_level_allowed_values:
+ raise ValueError(
+ f"Invalid value for `access_level`, must be one of { access_level_allowed_values }"
+ )
if 'sort_order' in kwargs:
sort_order_allowed_values = ["ASC", "DESC"]
@@ -19721,28 +22630,46 @@ def list_masking_objects(self, masking_policy_id, **kwargs):
)
if 'sort_by' in kwargs:
- sort_by_allowed_values = ["schemaName", "objectName", "objectType"]
+ sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME", "DISPLAYORDER"]
if kwargs['sort_by'] not in sort_by_allowed_values:
raise ValueError(
f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
)
- if 'object_type' in kwargs:
- object_type_allowed_values = ["ALL", "TABLE", "EDITIONING_VIEW"]
- for object_type_item in kwargs['object_type']:
- if object_type_item not in object_type_allowed_values:
- raise ValueError(
- f"Invalid value for `object_type`, must be one of { object_type_allowed_values }"
- )
+ if 'data_source' in kwargs:
+ data_source_allowed_values = ["EVENTS", "ALERTS", "VIOLATIONS", "ALLOWED_SQL"]
+ if kwargs['data_source'] not in data_source_allowed_values:
+ raise ValueError(
+ f"Invalid value for `data_source`, must be one of { data_source_allowed_values }"
+ )
+
+ if 'lifecycle_state' in kwargs:
+ lifecycle_state_allowed_values = ["CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED"]
+ if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values:
+ raise ValueError(
+ f"Invalid value for `lifecycle_state`, must be one of { lifecycle_state_allowed_values }"
+ )
+
+ if 'category' in kwargs:
+ category_allowed_values = ["CUSTOM_REPORTS", "SUMMARY", "ACTIVITY_AUDITING"]
+ if kwargs['category'] not in category_allowed_values:
+ raise ValueError(
+ f"Invalid value for `category`, must be one of { category_allowed_values }"
+ )
query_params = {
+ "compartmentId": compartment_id,
+ "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing),
+ "accessLevel": kwargs.get("access_level", missing),
+ "displayName": kwargs.get("display_name", missing),
"limit": kwargs.get("limit", missing),
"page": kwargs.get("page", missing),
"sortOrder": kwargs.get("sort_order", missing),
"sortBy": kwargs.get("sort_by", missing),
- "schemaName": self.base_client.generate_collection_format_param(kwargs.get("schema_name", missing), 'multi'),
- "objectName": self.base_client.generate_collection_format_param(kwargs.get("object_name", missing), 'multi'),
- "objectType": self.base_client.generate_collection_format_param(kwargs.get("object_type", missing), 'multi')
+ "isSeeded": kwargs.get("is_seeded", missing),
+ "dataSource": kwargs.get("data_source", missing),
+ "lifecycleState": kwargs.get("lifecycle_state", missing),
+ "category": kwargs.get("category", missing)
}
query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
@@ -19768,10 +22695,9 @@ def list_masking_objects(self, masking_policy_id, **kwargs):
self.base_client.call_api,
resource_path=resource_path,
method=method,
- path_params=path_params,
query_params=query_params,
header_params=header_params,
- response_type="MaskingObjectCollection",
+ response_type="ReportDefinitionCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -19780,28 +22706,36 @@ def list_masking_objects(self, masking_policy_id, **kwargs):
return self.base_client.call_api(
resource_path=resource_path,
method=method,
- path_params=path_params,
query_params=query_params,
header_params=header_params,
- response_type="MaskingObjectCollection",
+ response_type="ReportDefinitionCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def list_masking_policies(self, compartment_id, **kwargs):
+ def list_reports(self, compartment_id, **kwargs):
"""
- Gets a list of masking policies based on the specified query parameters.
+ Gets a list of all the reports in the compartment. It contains information such as report generation time.
:param str compartment_id: (required)
A filter to return only resources that match the specified compartment OCID.
- :param str masking_policy_id: (optional)
- A filter to return only the resources that match the specified masking policy OCID.
+ :param bool compartment_id_in_subtree: (optional)
+ Default is false.
+ When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting.
+
+ :param str access_level: (optional)
+ Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED.
+ Setting this to ACCESSIBLE returns only those compartments for which the
+ user has INSPECT permissions directly or indirectly (permissions can be on a
+ resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed.
+
+ Allowed values are: "RESTRICTED", "ACCESSIBLE"
:param str display_name: (optional)
- A filter to return only resources that match the specified display name.
+ The name of the report definition to query.
:param int limit: (optional)
For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
@@ -19813,59 +22747,31 @@ def list_masking_policies(self, compartment_id, **kwargs):
__ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
- :param str lifecycle_state: (optional)
- A filter to return only the resources that match the specified lifecycle states.
-
- Allowed values are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "NEEDS_ATTENTION", "FAILED"
-
:param str sort_order: (optional)
The sort order to use, either ascending (ASC) or descending (DESC).
Allowed values are: "ASC", "DESC"
:param str sort_by: (optional)
- The field to sort by. You can specify only one sorting parameter (sortOrder). The default order for timeCreated is descending.
- The default order for displayName is ascending. The displayName sort order is case sensitive.
-
- Allowed values are: "displayName", "timeCreated"
-
- :param str sensitive_data_model_id: (optional)
- A filter to return only the resources that match the specified sensitive data model OCID.
-
- :param str target_id: (optional)
- A filter to return only items related to a specific target OCID.
-
- :param datetime time_created_greater_than_or_equal_to: (optional)
- A filter to return only the resources that were created after the specified date and time, as defined by `RFC3339`__.
- Using TimeCreatedGreaterThanOrEqualToQueryParam parameter retrieves all resources created after that date.
-
- **Example:** 2016-12-19T16:39:57.600Z
+ The field to sort by. Only one sort order may be provided. Default order for timeGenerated is descending. Default order for displayName is ascending. If no value is specified timeGenerated is default.
- __ https://tools.ietf.org/html/rfc3339
+ Allowed values are: "timeGenerated", "displayName"
- :param datetime time_created_less_than: (optional)
- Search for resources that were created before a specific date.
- Specifying this parameter corresponding `timeCreatedLessThan`
- parameter will retrieve all resources created before the
- specified created date, in \"YYYY-MM-ddThh:mmZ\" format with a Z offset, as
- defined by RFC 3339.
+ :param str report_definition_id: (optional)
+ The ID of the report definition to filter the list of reports
- **Example:** 2016-12-19T16:39:57.600Z
+ :param str opc_request_id: (optional)
+ Unique identifier for the request.
- :param bool compartment_id_in_subtree: (optional)
- Default is false.
- When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting.
+ :param str lifecycle_state: (optional)
+ An optional filter to return only resources that match the specified lifecycle state.
- :param str access_level: (optional)
- Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED.
- Setting this to ACCESSIBLE returns only those compartments for which the
- user has INSPECT permissions directly or indirectly (permissions can be on a
- resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed.
+ Allowed values are: "UPDATING", "ACTIVE"
- Allowed values are: "RESTRICTED", "ACCESSIBLE"
+ :param str type: (optional)
+ An optional filter to return only resources that match the specified type.
- :param str opc_request_id: (optional)
- Unique identifier for the request.
+ Allowed values are: "GENERATED", "SCHEDULED"
:param obj retry_strategy: (optional)
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
@@ -19879,48 +22785,45 @@ def list_masking_policies(self, compartment_id, **kwargs):
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.MaskingPolicyCollection`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.ReportCollection`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use list_masking_policies API.
+ Click `here `__ to see an example of how to use list_reports API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
required_arguments = ['compartmentId']
- resource_path = "/maskingPolicies"
+ resource_path = "/reports"
method = "GET"
- operation_name = "list_masking_policies"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/MaskingPolicy/ListMaskingPolicies"
+ operation_name = "list_reports"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/ReportSummary/ListReports"
# Don't accept unknown kwargs
expected_kwargs = [
"allow_control_chars",
"retry_strategy",
- "masking_policy_id",
+ "compartment_id_in_subtree",
+ "access_level",
"display_name",
"limit",
"page",
- "lifecycle_state",
"sort_order",
"sort_by",
- "sensitive_data_model_id",
- "target_id",
- "time_created_greater_than_or_equal_to",
- "time_created_less_than",
- "compartment_id_in_subtree",
- "access_level",
- "opc_request_id"
+ "report_definition_id",
+ "opc_request_id",
+ "lifecycle_state",
+ "type"
]
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"list_masking_policies got unknown kwargs: {extra_kwargs!r}")
-
- if 'lifecycle_state' in kwargs:
- lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "NEEDS_ATTENTION", "FAILED"]
- if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values:
+ f"list_reports got unknown kwargs: {extra_kwargs!r}")
+
+ if 'access_level' in kwargs:
+ access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"]
+ if kwargs['access_level'] not in access_level_allowed_values:
raise ValueError(
- f"Invalid value for `lifecycle_state`, must be one of { lifecycle_state_allowed_values }"
+ f"Invalid value for `access_level`, must be one of { access_level_allowed_values }"
)
if 'sort_order' in kwargs:
@@ -19931,34 +22834,38 @@ def list_masking_policies(self, compartment_id, **kwargs):
)
if 'sort_by' in kwargs:
- sort_by_allowed_values = ["displayName", "timeCreated"]
+ sort_by_allowed_values = ["timeGenerated", "displayName"]
if kwargs['sort_by'] not in sort_by_allowed_values:
raise ValueError(
f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
)
- if 'access_level' in kwargs:
- access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"]
- if kwargs['access_level'] not in access_level_allowed_values:
+ if 'lifecycle_state' in kwargs:
+ lifecycle_state_allowed_values = ["UPDATING", "ACTIVE"]
+ if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values:
raise ValueError(
- f"Invalid value for `access_level`, must be one of { access_level_allowed_values }"
+ f"Invalid value for `lifecycle_state`, must be one of { lifecycle_state_allowed_values }"
+ )
+
+ if 'type' in kwargs:
+ type_allowed_values = ["GENERATED", "SCHEDULED"]
+ if kwargs['type'] not in type_allowed_values:
+ raise ValueError(
+ f"Invalid value for `type`, must be one of { type_allowed_values }"
)
query_params = {
- "maskingPolicyId": kwargs.get("masking_policy_id", missing),
"compartmentId": compartment_id,
+ "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing),
+ "accessLevel": kwargs.get("access_level", missing),
"displayName": kwargs.get("display_name", missing),
"limit": kwargs.get("limit", missing),
"page": kwargs.get("page", missing),
- "lifecycleState": kwargs.get("lifecycle_state", missing),
"sortOrder": kwargs.get("sort_order", missing),
"sortBy": kwargs.get("sort_by", missing),
- "sensitiveDataModelId": kwargs.get("sensitive_data_model_id", missing),
- "targetId": kwargs.get("target_id", missing),
- "timeCreatedGreaterThanOrEqualTo": kwargs.get("time_created_greater_than_or_equal_to", missing),
- "timeCreatedLessThan": kwargs.get("time_created_less_than", missing),
- "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing),
- "accessLevel": kwargs.get("access_level", missing)
+ "reportDefinitionId": kwargs.get("report_definition_id", missing),
+ "lifecycleState": kwargs.get("lifecycle_state", missing),
+ "type": kwargs.get("type", missing)
}
query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
@@ -19986,7 +22893,7 @@ def list_masking_policies(self, compartment_id, **kwargs):
method=method,
query_params=query_params,
header_params=header_params,
- response_type="MaskingPolicyCollection",
+ response_type="ReportCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -19997,19 +22904,27 @@ def list_masking_policies(self, compartment_id, **kwargs):
method=method,
query_params=query_params,
header_params=header_params,
- response_type="MaskingPolicyCollection",
+ response_type="ReportCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def list_masking_reports(self, compartment_id, **kwargs):
+ def list_role_grant_paths(self, security_policy_report_id, grantee, granted_role, **kwargs):
"""
- Gets a list of masking reports based on the specified query parameters.
+ Retrieves a list of all role grant paths for a particular user.
+ The ListRoleGrantPaths operation returns only the role grant paths for the specified security policy report.
- :param str compartment_id: (required)
- A filter to return only resources that match the specified compartment OCID.
+
+ :param str security_policy_report_id: (required)
+ The OCID of the security policy report resource.
+
+ :param str grantee: (required)
+ A filter to return only items that match the specified grantee.
+
+ :param str granted_role: (required)
+ A filter to return only items that match the specified role.
:param int limit: (optional)
For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
@@ -20021,37 +22936,9 @@ def list_masking_reports(self, compartment_id, **kwargs):
__ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
- :param str masking_policy_id: (optional)
- A filter to return only the resources that match the specified masking policy OCID.
-
- :param str target_id: (optional)
- A filter to return only items related to a specific target OCID.
-
- :param str sort_order: (optional)
- The sort order to use, either ascending (ASC) or descending (DESC).
-
- Allowed values are: "ASC", "DESC"
-
- :param str sort_by: (optional)
- The field to sort by. You can specify only one sorting parameter (sortOrder). The default order for timeMaskingFinished is descending.
-
- Allowed values are: "timeMaskingFinished"
-
:param str opc_request_id: (optional)
Unique identifier for the request.
- :param bool compartment_id_in_subtree: (optional)
- Default is false.
- When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting.
-
- :param str access_level: (optional)
- Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED.
- Setting this to ACCESSIBLE returns only those compartments for which the
- user has INSPECT permissions directly or indirectly (permissions can be on a
- resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed.
-
- Allowed values are: "RESTRICTED", "ACCESSIBLE"
-
:param obj retry_strategy: (optional)
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
@@ -20064,18 +22951,18 @@ def list_masking_reports(self, compartment_id, **kwargs):
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.MaskingReportCollection`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.RoleGrantPathCollection`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use list_masking_reports API.
+ Click `here `__ to see an example of how to use list_role_grant_paths API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
- required_arguments = ['compartmentId']
- resource_path = "/maskingReports"
+ required_arguments = ['securityPolicyReportId', 'grantee', 'grantedRole']
+ resource_path = "/securityPolicyReports/{securityPolicyReportId}/roleGrantPaths"
method = "GET"
- operation_name = "list_masking_reports"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/MaskingPolicy/ListMaskingReports"
+ operation_name = "list_role_grant_paths"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/RoleGrantPathCollection/ListRoleGrantPaths"
# Don't accept unknown kwargs
expected_kwargs = [
@@ -20083,50 +22970,28 @@ def list_masking_reports(self, compartment_id, **kwargs):
"retry_strategy",
"limit",
"page",
- "masking_policy_id",
- "target_id",
- "sort_order",
- "sort_by",
- "opc_request_id",
- "compartment_id_in_subtree",
- "access_level"
+ "opc_request_id"
]
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"list_masking_reports got unknown kwargs: {extra_kwargs!r}")
+ f"list_role_grant_paths got unknown kwargs: {extra_kwargs!r}")
- if 'sort_order' in kwargs:
- sort_order_allowed_values = ["ASC", "DESC"]
- if kwargs['sort_order'] not in sort_order_allowed_values:
- raise ValueError(
- f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }"
- )
+ path_params = {
+ "securityPolicyReportId": security_policy_report_id
+ }
- if 'sort_by' in kwargs:
- sort_by_allowed_values = ["timeMaskingFinished"]
- if kwargs['sort_by'] not in sort_by_allowed_values:
- raise ValueError(
- f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
- )
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
- if 'access_level' in kwargs:
- access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"]
- if kwargs['access_level'] not in access_level_allowed_values:
- raise ValueError(
- f"Invalid value for `access_level`, must be one of { access_level_allowed_values }"
- )
+ for (k, v) in six.iteritems(path_params):
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
+ raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
query_params = {
"limit": kwargs.get("limit", missing),
"page": kwargs.get("page", missing),
- "maskingPolicyId": kwargs.get("masking_policy_id", missing),
- "targetId": kwargs.get("target_id", missing),
- "sortOrder": kwargs.get("sort_order", missing),
- "sortBy": kwargs.get("sort_by", missing),
- "compartmentId": compartment_id,
- "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing),
- "accessLevel": kwargs.get("access_level", missing)
+ "grantee": grantee,
+ "grantedRole": granted_role
}
query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
@@ -20152,9 +23017,10 @@ def list_masking_reports(self, compartment_id, **kwargs):
self.base_client.call_api,
resource_path=resource_path,
method=method,
+ path_params=path_params,
query_params=query_params,
header_params=header_params,
- response_type="MaskingReportCollection",
+ response_type="RoleGrantPathCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -20163,21 +23029,25 @@ def list_masking_reports(self, compartment_id, **kwargs):
return self.base_client.call_api(
resource_path=resource_path,
method=method,
+ path_params=path_params,
query_params=query_params,
header_params=header_params,
- response_type="MaskingReportCollection",
+ response_type="RoleGrantPathCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def list_masking_schemas(self, masking_policy_id, **kwargs):
+ def list_roles(self, target_database_id, **kwargs):
"""
- Gets a list of masking schemas present in the specified masking policy and based on the specified query parameters.
+ Returns a list of role metadata objects.
- :param str masking_policy_id: (required)
- The OCID of the masking policy.
+ :param str target_database_id: (required)
+ The OCID of the Data Safe target database.
+
+ :param str opc_request_id: (optional)
+ Unique identifier for the request.
:param int limit: (optional)
For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
@@ -20189,22 +23059,27 @@ def list_masking_schemas(self, masking_policy_id, **kwargs):
__ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
+ :param list[str] role_name: (optional)
+ A filter to return only a specific role based on role name.
+
+ :param bool is_oracle_maintained: (optional)
+ A filter to return roles based on whether they are maintained by oracle or not.
+
+ :param str authentication_type: (optional)
+ A filter to return roles based on authentication type.
+
:param str sort_order: (optional)
The sort order to use, either ascending (ASC) or descending (DESC).
Allowed values are: "ASC", "DESC"
:param str sort_by: (optional)
- The field to sort by. You can specify only one sorting parameter (sortOrder).
- The default order is ascending.
-
- Allowed values are: "schemaName"
+ The field used for sorting. Only one sorting order (sortOrder) can be specified.
- :param list[str] schema_name: (optional)
- A filter to return only items related to specific schema name.
+ Allowed values are: "ROLENAME"
- :param str opc_request_id: (optional)
- Unique identifier for the request.
+ :param str role_name_contains: (optional)
+ A filter to return only items if role name contains a specific string.
:param obj retry_strategy: (optional)
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
@@ -20218,37 +23093,40 @@ def list_masking_schemas(self, masking_policy_id, **kwargs):
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.MaskingSchemaCollection`
+ :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.data_safe.models.RoleSummary`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use list_masking_schemas API.
+ Click `here `__ to see an example of how to use list_roles API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
- required_arguments = ['maskingPolicyId']
- resource_path = "/maskingPolicies/{maskingPolicyId}/maskingSchemas"
+ required_arguments = ['targetDatabaseId']
+ resource_path = "/targetDatabases/{targetDatabaseId}/roles"
method = "GET"
- operation_name = "list_masking_schemas"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/MaskingSchemaCollection/ListMaskingSchemas"
+ operation_name = "list_roles"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/TargetDatabase/ListRoles"
# Don't accept unknown kwargs
expected_kwargs = [
"allow_control_chars",
"retry_strategy",
+ "opc_request_id",
"limit",
"page",
+ "role_name",
+ "is_oracle_maintained",
+ "authentication_type",
"sort_order",
"sort_by",
- "schema_name",
- "opc_request_id"
+ "role_name_contains"
]
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"list_masking_schemas got unknown kwargs: {extra_kwargs!r}")
+ f"list_roles got unknown kwargs: {extra_kwargs!r}")
path_params = {
- "maskingPolicyId": masking_policy_id
+ "targetDatabaseId": target_database_id
}
path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
@@ -20265,7 +23143,7 @@ def list_masking_schemas(self, masking_policy_id, **kwargs):
)
if 'sort_by' in kwargs:
- sort_by_allowed_values = ["schemaName"]
+ sort_by_allowed_values = ["ROLENAME"]
if kwargs['sort_by'] not in sort_by_allowed_values:
raise ValueError(
f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
@@ -20274,9 +23152,12 @@ def list_masking_schemas(self, masking_policy_id, **kwargs):
query_params = {
"limit": kwargs.get("limit", missing),
"page": kwargs.get("page", missing),
+ "roleName": self.base_client.generate_collection_format_param(kwargs.get("role_name", missing), 'multi'),
+ "isOracleMaintained": kwargs.get("is_oracle_maintained", missing),
+ "authenticationType": kwargs.get("authentication_type", missing),
"sortOrder": kwargs.get("sort_order", missing),
"sortBy": kwargs.get("sort_by", missing),
- "schemaName": self.base_client.generate_collection_format_param(kwargs.get("schema_name", missing), 'multi')
+ "roleNameContains": kwargs.get("role_name_contains", missing)
}
query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
@@ -20305,7 +23186,7 @@ def list_masking_schemas(self, masking_policy_id, **kwargs):
path_params=path_params,
query_params=query_params,
header_params=header_params,
- response_type="MaskingSchemaCollection",
+ response_type="list[RoleSummary]",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -20317,30 +23198,22 @@ def list_masking_schemas(self, masking_policy_id, **kwargs):
path_params=path_params,
query_params=query_params,
header_params=header_params,
- response_type="MaskingSchemaCollection",
+ response_type="list[RoleSummary]",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def list_on_prem_connectors(self, compartment_id, **kwargs):
+ def list_schemas(self, target_database_id, **kwargs):
"""
- Gets a list of on-premises connectors.
-
-
- :param str compartment_id: (required)
- A filter to return only resources that match the specified compartment OCID.
-
- :param str on_prem_connector_id: (optional)
- A filter to return only the on-premises connector that matches the specified id.
+ Returns list of schema.
- :param str display_name: (optional)
- A filter to return only resources that match the specified display name.
- :param str on_prem_connector_lifecycle_state: (optional)
- A filter to return only on-premises connector resources that match the specified lifecycle state.
+ :param str target_database_id: (required)
+ The OCID of the Data Safe target database.
- Allowed values are: "CREATING", "UPDATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", "FAILED", "NEEDS_ATTENTION"
+ :param str opc_request_id: (optional)
+ Unique identifier for the request.
:param int limit: (optional)
For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
@@ -20352,6 +23225,9 @@ def list_on_prem_connectors(self, compartment_id, **kwargs):
__ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
+ :param list[str] schema_name: (optional)
+ A filter to return only items related to specific schema name.
+
:param str sort_order: (optional)
The sort order to use, either ascending (ASC) or descending (DESC).
@@ -20359,25 +23235,14 @@ def list_on_prem_connectors(self, compartment_id, **kwargs):
:param str sort_by: (optional)
The field used for sorting. Only one sorting order (sortOrder) can be specified.
- The default order for TIMECREATED is descending. The default order for DISPLAYNAME is ascending.
- The DISPLAYNAME sort order is case sensitive.
- Allowed values are: "TIMECREATED", "DISPLAYNAME"
-
- :param str opc_request_id: (optional)
- Unique identifier for the request.
-
- :param bool compartment_id_in_subtree: (optional)
- Default is false.
- When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting.
+ Allowed values are: "SCHEMANAME"
- :param str access_level: (optional)
- Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED.
- Setting this to ACCESSIBLE returns only those compartments for which the
- user has INSPECT permissions directly or indirectly (permissions can be on a
- resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed.
+ :param bool is_oracle_maintained: (optional)
+ A filter to return only items related to specific type of schema.
- Allowed values are: "RESTRICTED", "ACCESSIBLE"
+ :param str schema_name_contains: (optional)
+ A filter to return only items if schema name contains a specific string.
:param obj retry_strategy: (optional)
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
@@ -20391,45 +23256,46 @@ def list_on_prem_connectors(self, compartment_id, **kwargs):
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.data_safe.models.OnPremConnectorSummary`
+ :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.data_safe.models.SchemaSummary`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use list_on_prem_connectors API.
+ Click `here `__ to see an example of how to use list_schemas API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
- required_arguments = ['compartmentId']
- resource_path = "/onPremConnectors"
+ required_arguments = ['targetDatabaseId']
+ resource_path = "/targetDatabases/{targetDatabaseId}/schemas"
method = "GET"
- operation_name = "list_on_prem_connectors"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/OnPremConnectorSummary/ListOnPremConnectors"
+ operation_name = "list_schemas"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/TargetDatabase/ListSchemas"
# Don't accept unknown kwargs
expected_kwargs = [
"allow_control_chars",
"retry_strategy",
- "on_prem_connector_id",
- "display_name",
- "on_prem_connector_lifecycle_state",
+ "opc_request_id",
"limit",
"page",
+ "schema_name",
"sort_order",
- "sort_by",
- "opc_request_id",
- "compartment_id_in_subtree",
- "access_level"
+ "sort_by",
+ "is_oracle_maintained",
+ "schema_name_contains"
]
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"list_on_prem_connectors got unknown kwargs: {extra_kwargs!r}")
+ f"list_schemas got unknown kwargs: {extra_kwargs!r}")
- if 'on_prem_connector_lifecycle_state' in kwargs:
- on_prem_connector_lifecycle_state_allowed_values = ["CREATING", "UPDATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", "FAILED", "NEEDS_ATTENTION"]
- if kwargs['on_prem_connector_lifecycle_state'] not in on_prem_connector_lifecycle_state_allowed_values:
- raise ValueError(
- f"Invalid value for `on_prem_connector_lifecycle_state`, must be one of { on_prem_connector_lifecycle_state_allowed_values }"
- )
+ path_params = {
+ "targetDatabaseId": target_database_id
+ }
+
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
+
+ for (k, v) in six.iteritems(path_params):
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
+ raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
if 'sort_order' in kwargs:
sort_order_allowed_values = ["ASC", "DESC"]
@@ -20439,30 +23305,20 @@ def list_on_prem_connectors(self, compartment_id, **kwargs):
)
if 'sort_by' in kwargs:
- sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"]
+ sort_by_allowed_values = ["SCHEMANAME"]
if kwargs['sort_by'] not in sort_by_allowed_values:
raise ValueError(
f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
)
- if 'access_level' in kwargs:
- access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"]
- if kwargs['access_level'] not in access_level_allowed_values:
- raise ValueError(
- f"Invalid value for `access_level`, must be one of { access_level_allowed_values }"
- )
-
query_params = {
- "compartmentId": compartment_id,
- "onPremConnectorId": kwargs.get("on_prem_connector_id", missing),
- "displayName": kwargs.get("display_name", missing),
- "onPremConnectorLifecycleState": kwargs.get("on_prem_connector_lifecycle_state", missing),
"limit": kwargs.get("limit", missing),
"page": kwargs.get("page", missing),
+ "schemaName": self.base_client.generate_collection_format_param(kwargs.get("schema_name", missing), 'multi'),
"sortOrder": kwargs.get("sort_order", missing),
"sortBy": kwargs.get("sort_by", missing),
- "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing),
- "accessLevel": kwargs.get("access_level", missing)
+ "isOracleMaintained": kwargs.get("is_oracle_maintained", missing),
+ "schemaNameContains": kwargs.get("schema_name_contains", missing)
}
query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
@@ -20488,9 +23344,10 @@ def list_on_prem_connectors(self, compartment_id, **kwargs):
self.base_client.call_api,
resource_path=resource_path,
method=method,
+ path_params=path_params,
query_params=query_params,
header_params=header_params,
- response_type="list[OnPremConnectorSummary]",
+ response_type="list[SchemaSummary]",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -20499,35 +23356,19 @@ def list_on_prem_connectors(self, compartment_id, **kwargs):
return self.base_client.call_api(
resource_path=resource_path,
method=method,
+ path_params=path_params,
query_params=query_params,
header_params=header_params,
- response_type="list[OnPremConnectorSummary]",
+ response_type="list[SchemaSummary]",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def list_profile_analytics(self, user_assessment_id, compartment_id, **kwargs):
+ def list_sdm_masking_policy_differences(self, compartment_id, **kwargs):
"""
- Gets a list of aggregated user profile details in the specified compartment. This provides information about the
- overall profiles available. For example, the user profile details include how many users have the profile assigned
- and do how many use password verification function. This data is especially useful content for dashboards or to support analytics.
-
- When you perform the ListProfileAnalytics operation, if the parameter compartmentIdInSubtree is set to \"true,\" and if the
- parameter accessLevel is set to ACCESSIBLE, then the operation returns compartments in which the requestor has INSPECT
- permissions on at least one resource, directly or indirectly (in subcompartments). If the operation is performed at the
- root compartment and the requestor does not have access to at least one subcompartment of the compartment specified by
- compartmentId, then \"Not Authorized\" is returned.
-
- The parameter compartmentIdInSubtree applies when you perform ListProfileAnalytics on the compartmentId passed and when it is
- set to true, the entire hierarchy of compartments can be returned.
-
- To use ListProfileAnalytics to get a full list of all compartments and subcompartments in the tenancy from the root compartment,
- set the parameter compartmentIdInSubtree to true and accessLevel to ACCESSIBLE.
-
+ Gets a list of SDM and masking policy difference resources based on the specified query parameters.
- :param str user_assessment_id: (required)
- The OCID of the user assessment.
:param str compartment_id: (required)
A filter to return only resources that match the specified compartment OCID.
@@ -20536,45 +23377,52 @@ def list_profile_analytics(self, user_assessment_id, compartment_id, **kwargs):
Default is false.
When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting.
- :param str access_level: (optional)
- Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED.
+ :param str difference_access_level: (optional)
+ Valid value is ACCESSIBLE. Default is ACCESSIBLE.
Setting this to ACCESSIBLE returns only those compartments for which the
user has INSPECT permissions directly or indirectly (permissions can be on a
- resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed.
-
- Allowed values are: "RESTRICTED", "ACCESSIBLE"
-
- :param str target_id: (optional)
- A filter to return only items related to a specific target OCID.
-
- :param int limit: (optional)
- For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
+ resource in a subcompartment).
- __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
+ Allowed values are: "ACCESSIBLE"
- :param str page: (optional)
- For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__.
+ :param str display_name: (optional)
+ A filter to return only resources that match the specified display name.
- __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
+ :param str sensitive_data_model_id: (optional)
+ A filter to return only the resources that match the specified sensitive data model OCID.
- :param str profile_name: (optional)
- A filter to return only items that match the specified profile name.
+ :param str lifecycle_state: (optional)
+ A filter to return only the resources that match the specified lifecycle states.
- :param str sort_by: (optional)
- The field used for sorting. Only one sorting order (sortOrder) can be specified.
- The default order for TIMECREATED is descending. The default order for DISPLAYNAME is ascending.
- The DISPLAYNAME sort order is case sensitive.
+ Allowed values are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED"
- Allowed values are: "TIMECREATED", "DISPLAYNAME"
+ :param str masking_policy_id: (optional)
+ A filter to return only the resources that match the specified masking policy OCID.
:param str sort_order: (optional)
The sort order to use, either ascending (ASC) or descending (DESC).
Allowed values are: "ASC", "DESC"
+ :param str sort_by: (optional)
+ The field to sort by. You can specify only one sorting parameter (sortOrder). The default order for timeCreationStarted is descending.
+ The default order for displayName is ascending.
+
+ Allowed values are: "timeCreationStarted", "displayName"
+
:param str opc_request_id: (optional)
Unique identifier for the request.
+ :param int limit: (optional)
+ For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
+
+ __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
+
+ :param str page: (optional)
+ For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__.
+
+ __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
+
:param obj retry_strategy: (optional)
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
@@ -20587,60 +23435,52 @@ def list_profile_analytics(self, user_assessment_id, compartment_id, **kwargs):
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.data_safe.models.ProfileAggregation`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.SdmMaskingPolicyDifferenceCollection`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use list_profile_analytics API.
+ Click `here `__ to see an example of how to use list_sdm_masking_policy_differences API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
- required_arguments = ['userAssessmentId', 'compartmentId']
- resource_path = "/userAssessments/{userAssessmentId}/profileAnalytics"
+ required_arguments = ['compartmentId']
+ resource_path = "/sdmMaskingPolicyDifferences"
method = "GET"
- operation_name = "list_profile_analytics"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/Profile/ListProfileAnalytics"
+ operation_name = "list_sdm_masking_policy_differences"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SdmMaskingPolicyDifference/ListSdmMaskingPolicyDifferences"
# Don't accept unknown kwargs
expected_kwargs = [
"allow_control_chars",
"retry_strategy",
"compartment_id_in_subtree",
- "access_level",
- "target_id",
- "limit",
- "page",
- "profile_name",
- "sort_by",
+ "difference_access_level",
+ "display_name",
+ "sensitive_data_model_id",
+ "lifecycle_state",
+ "masking_policy_id",
"sort_order",
- "opc_request_id"
+ "sort_by",
+ "opc_request_id",
+ "limit",
+ "page"
]
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"list_profile_analytics got unknown kwargs: {extra_kwargs!r}")
-
- path_params = {
- "userAssessmentId": user_assessment_id
- }
-
- path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
-
- for (k, v) in six.iteritems(path_params):
- if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
- raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
+ f"list_sdm_masking_policy_differences got unknown kwargs: {extra_kwargs!r}")
- if 'access_level' in kwargs:
- access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"]
- if kwargs['access_level'] not in access_level_allowed_values:
+ if 'difference_access_level' in kwargs:
+ difference_access_level_allowed_values = ["ACCESSIBLE"]
+ if kwargs['difference_access_level'] not in difference_access_level_allowed_values:
raise ValueError(
- f"Invalid value for `access_level`, must be one of { access_level_allowed_values }"
+ f"Invalid value for `difference_access_level`, must be one of { difference_access_level_allowed_values }"
)
- if 'sort_by' in kwargs:
- sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"]
- if kwargs['sort_by'] not in sort_by_allowed_values:
+ if 'lifecycle_state' in kwargs:
+ lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED"]
+ if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values:
raise ValueError(
- f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
+ f"Invalid value for `lifecycle_state`, must be one of { lifecycle_state_allowed_values }"
)
if 'sort_order' in kwargs:
@@ -20650,16 +23490,25 @@ def list_profile_analytics(self, user_assessment_id, compartment_id, **kwargs):
f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }"
)
+ if 'sort_by' in kwargs:
+ sort_by_allowed_values = ["timeCreationStarted", "displayName"]
+ if kwargs['sort_by'] not in sort_by_allowed_values:
+ raise ValueError(
+ f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
+ )
+
query_params = {
"compartmentId": compartment_id,
"compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing),
- "accessLevel": kwargs.get("access_level", missing),
- "targetId": kwargs.get("target_id", missing),
- "limit": kwargs.get("limit", missing),
- "page": kwargs.get("page", missing),
- "profileName": kwargs.get("profile_name", missing),
+ "differenceAccessLevel": kwargs.get("difference_access_level", missing),
+ "displayName": kwargs.get("display_name", missing),
+ "sensitiveDataModelId": kwargs.get("sensitive_data_model_id", missing),
+ "lifecycleState": kwargs.get("lifecycle_state", missing),
+ "maskingPolicyId": kwargs.get("masking_policy_id", missing),
+ "sortOrder": kwargs.get("sort_order", missing),
"sortBy": kwargs.get("sort_by", missing),
- "sortOrder": kwargs.get("sort_order", 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}
@@ -20685,10 +23534,9 @@ def list_profile_analytics(self, user_assessment_id, compartment_id, **kwargs):
self.base_client.call_api,
resource_path=resource_path,
method=method,
- path_params=path_params,
query_params=query_params,
header_params=header_params,
- response_type="list[ProfileAggregation]",
+ response_type="SdmMaskingPolicyDifferenceCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -20697,36 +23545,32 @@ def list_profile_analytics(self, user_assessment_id, compartment_id, **kwargs):
return self.base_client.call_api(
resource_path=resource_path,
method=method,
- path_params=path_params,
query_params=query_params,
header_params=header_params,
- response_type="list[ProfileAggregation]",
+ response_type="SdmMaskingPolicyDifferenceCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def list_profile_summaries(self, user_assessment_id, compartment_id, **kwargs):
+ def list_security_assessments(self, compartment_id, **kwargs):
"""
- Gets a list of user profiles containing the profile details along with the target id and user counts.
-
- The ListProfiles operation returns only the profiles belonging to a certain target. If compartment type user assessment
- id is provided, then profile information for all the targets belonging to the pertaining compartment is returned.
- The list does not include any subcompartments of the compartment under consideration.
+ Gets a list of security assessments.
- The parameter 'accessLevel' specifies whether to return only those compartments for which the requestor has
- INSPECT permissions on at least one resource directly or indirectly (ACCESSIBLE) (the resource can be in a
- subcompartment) or to return Not Authorized if Principal doesn't have access to even one of the child compartments.
- This is valid only when 'compartmentIdInSubtree' is set to 'true'.
+ The ListSecurityAssessments operation returns only the assessments in the specified `compartmentId`.
+ The list does not include any subcompartments of the compartmentId passed.
- The parameter 'compartmentIdInSubtree' applies when you perform ListUserProfiles on the 'compartmentId' belonging
- to the assessmentId passed and when it is set to true, the entire hierarchy of compartments can be returned.
- To get a full list of all compartments and subcompartments in the tenancy (root compartment), set the parameter
- 'compartmentIdInSubtree' to true and 'accessLevel' to ACCESSIBLE.
+ The parameter `accessLevel` specifies whether to return only those compartments for which the
+ requestor has INSPECT permissions on at least one resource directly
+ or indirectly (ACCESSIBLE) (the resource can be in a subcompartment) or to return Not Authorized if
+ Principal doesn't have access to even one of the child compartments. This is valid only when
+ `compartmentIdInSubtree` is set to `true`.
+ The parameter `compartmentIdInSubtree` applies when you perform ListSecurityAssessments on the
+ `compartmentId` passed and when it is set to true, the entire hierarchy of compartments can be returned.
+ To get a full list of all compartments and subcompartments in the tenancy (root compartment),
+ set the parameter `compartmentIdInSubtree` to true and `accessLevel` to ACCESSIBLE.
- :param str user_assessment_id: (required)
- The OCID of the user assessment.
:param str compartment_id: (required)
A filter to return only resources that match the specified compartment OCID.
@@ -20743,78 +23587,75 @@ def list_profile_summaries(self, user_assessment_id, compartment_id, **kwargs):
Allowed values are: "RESTRICTED", "ACCESSIBLE"
- :param str target_id: (optional)
- A filter to return only items related to a specific target OCID.
+ :param str display_name: (optional)
+ A filter to return only resources that match the specified display name.
- :param int limit: (optional)
- For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
+ :param str type: (optional)
+ A filter to return only items that match the specified security assessment type.
- __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
+ Allowed values are: "LATEST", "SAVED", "SAVE_SCHEDULE", "COMPARTMENT"
- :param str page: (optional)
- For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__.
+ :param str schedule_assessment_id: (optional)
+ The OCID of the security assessment of type SAVE_SCHEDULE.
- __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
+ :param bool is_schedule_assessment: (optional)
+ A filter to return only security assessments of type save schedule.
- :param str profile_name: (optional)
- A filter to return only items that match the specified profile name.
+ :param str triggered_by: (optional)
+ A filter to return only security asessments that were created by either user or system.
- :param bool is_user_created: (optional)
- An optional filter to return the user created profiles.
+ Allowed values are: "USER", "SYSTEM"
+
+ :param str target_id: (optional)
+ A filter to return only items related to a specific target OCID.
+
+ :param str sort_order: (optional)
+ The sort order to use, either ascending (ASC) or descending (DESC).
- :param str password_verification_function: (optional)
- An optional filter to filter the profiles based on password verification function.
+ Allowed values are: "ASC", "DESC"
- :param str user_count_greater_than_or_equal: (optional)
- An optional filter to return the profiles having user count greater than or equal to the provided value.
+ :param bool is_baseline: (optional)
+ A filter to return only the security assessments that are set as a baseline.
- :param str user_count_less_than: (optional)
- An optional filter to return the profiles having user count less than the provided value.
+ :param str sort_by: (optional)
+ The field to sort by. You can specify only one sort order(sortOrder). The default order for timeCreated is descending.
- :param str failed_login_attempts_greater_than_or_equal: (optional)
- An optional filter to return the profiles having allow failed login attempts number greater than or equal to the provided value.
- String value is used for accommodating the \"UNLIMITED\" and \"DEFAULT\" values.
+ Allowed values are: "timeCreated", "displayName"
- :param str failed_login_attempts_less_than: (optional)
- An optional filter to return the profiles having failed login attempts number less than the provided value.
- String value is used for accommodating the \"UNLIMITED\" and \"DEFAULT\" values.
+ :param datetime time_created_greater_than_or_equal_to: (optional)
+ A filter to return only the resources that were created after the specified date and time, as defined by `RFC3339`__.
+ Using TimeCreatedGreaterThanOrEqualToQueryParam parameter retrieves all resources created after that date.
- :param str sessions_per_user_greater_than_or_equal: (optional)
- An optional filter to return the profiles permitting the user to spawn multiple sessions having count.
- greater than or equal to the provided value. String value is used for accommodating the \"UNLIMITED\" and \"DEFAULT\" values.
+ **Example:** 2016-12-19T16:39:57.600Z
- :param str sessions_per_user_less_than: (optional)
- An optional filter to return the profiles permitting the user to spawn multiple sessions having count less than
- the provided value. String value is used for accommodating the \"UNLIMITED\" and \"DEFAULT\" values.
+ __ https://tools.ietf.org/html/rfc3339
- :param str inactive_account_time_greater_than_or_equal: (optional)
- An optional filter to return the profiles allowing inactive account time in days greater than or equal to the provided value.
- String value is used for accommodating the \"UNLIMITED\" and \"DEFAULT\" values.
+ :param datetime time_created_less_than: (optional)
+ Search for resources that were created before a specific date.
+ Specifying this parameter corresponding `timeCreatedLessThan`
+ parameter will retrieve all resources created before the
+ specified created date, in \"YYYY-MM-ddThh:mmZ\" format with a Z offset, as
+ defined by RFC 3339.
- :param str inactive_account_time_less_than: (optional)
- An optional filter to return the profiles allowing inactive account time in days less than the provided value.
- String value is used for accommodating the \"UNLIMITED\" and \"DEFAULT\" values.
+ **Example:** 2016-12-19T16:39:57.600Z
- :param str password_lock_time_greater_than_or_equal: (optional)
- An optional filter to return the profiles having password lock number greater than or equal to the provided value.
- String value is used for accommodating the \"UNLIMITED\" and \"DEFAULT\" values.
+ :param str opc_request_id: (optional)
+ Unique identifier for the request.
- :param str password_lock_time_less_than: (optional)
- An optional filter to return the profiles having password lock number less than the provided value.
- String value is used for accommodating the \"UNLIMITED\" and \"DEFAULT\" values.
+ :param int limit: (optional)
+ For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
- :param str sort_by: (optional)
- The field to sort by. You can specify only one sort order (sortOrder). The default order is targetId ASC.
+ __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
- Allowed values are: "profileName", "targetId", "isUserCreated", "passwordVerificationFunction", "userCount", "sessionsPerUser", "inactiveAccountTime", "passwordLockTime", "failedLoginAttempts"
+ :param str page: (optional)
+ For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__.
- :param str sort_order: (optional)
- The sort order to use, either ascending (ASC) or descending (DESC).
+ __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
- Allowed values are: "ASC", "DESC"
+ :param str lifecycle_state: (optional)
+ A filter to return only resources that match the specified lifecycle state.
- :param str opc_request_id: (optional)
- Unique identifier for the request.
+ Allowed values are: "CREATING", "SUCCEEDED", "UPDATING", "DELETING", "DELETED", "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.
@@ -20828,18 +23669,18 @@ def list_profile_summaries(self, user_assessment_id, compartment_id, **kwargs):
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.data_safe.models.ProfileSummary`
+ :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.data_safe.models.SecurityAssessmentSummary`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use list_profile_summaries API.
+ Click `here `__ to see an example of how to use list_security_assessments API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
- required_arguments = ['userAssessmentId', 'compartmentId']
- resource_path = "/userAssessments/{userAssessmentId}/profiles"
+ required_arguments = ['compartmentId']
+ resource_path = "/securityAssessments"
method = "GET"
- operation_name = "list_profile_summaries"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/UserAssessment/ListProfileSummaries"
+ operation_name = "list_security_assessments"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SecurityAssessmentSummary/ListSecurityAssessments"
# Don't accept unknown kwargs
expected_kwargs = [
@@ -20847,40 +23688,26 @@ def list_profile_summaries(self, user_assessment_id, compartment_id, **kwargs):
"retry_strategy",
"compartment_id_in_subtree",
"access_level",
+ "display_name",
+ "type",
+ "schedule_assessment_id",
+ "is_schedule_assessment",
+ "triggered_by",
"target_id",
+ "sort_order",
+ "is_baseline",
+ "sort_by",
+ "time_created_greater_than_or_equal_to",
+ "time_created_less_than",
+ "opc_request_id",
"limit",
"page",
- "profile_name",
- "is_user_created",
- "password_verification_function",
- "user_count_greater_than_or_equal",
- "user_count_less_than",
- "failed_login_attempts_greater_than_or_equal",
- "failed_login_attempts_less_than",
- "sessions_per_user_greater_than_or_equal",
- "sessions_per_user_less_than",
- "inactive_account_time_greater_than_or_equal",
- "inactive_account_time_less_than",
- "password_lock_time_greater_than_or_equal",
- "password_lock_time_less_than",
- "sort_by",
- "sort_order",
- "opc_request_id"
+ "lifecycle_state"
]
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"list_profile_summaries got unknown kwargs: {extra_kwargs!r}")
-
- path_params = {
- "userAssessmentId": user_assessment_id
- }
-
- path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
-
- for (k, v) in six.iteritems(path_params):
- if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
- raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
+ f"list_security_assessments got unknown kwargs: {extra_kwargs!r}")
if 'access_level' in kwargs:
access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"]
@@ -20889,11 +23716,18 @@ def list_profile_summaries(self, user_assessment_id, compartment_id, **kwargs):
f"Invalid value for `access_level`, must be one of { access_level_allowed_values }"
)
- if 'sort_by' in kwargs:
- sort_by_allowed_values = ["profileName", "targetId", "isUserCreated", "passwordVerificationFunction", "userCount", "sessionsPerUser", "inactiveAccountTime", "passwordLockTime", "failedLoginAttempts"]
- if kwargs['sort_by'] not in sort_by_allowed_values:
+ if 'type' in kwargs:
+ type_allowed_values = ["LATEST", "SAVED", "SAVE_SCHEDULE", "COMPARTMENT"]
+ if kwargs['type'] not in type_allowed_values:
raise ValueError(
- f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
+ f"Invalid value for `type`, must be one of { type_allowed_values }"
+ )
+
+ if 'triggered_by' in kwargs:
+ triggered_by_allowed_values = ["USER", "SYSTEM"]
+ if kwargs['triggered_by'] not in triggered_by_allowed_values:
+ raise ValueError(
+ f"Invalid value for `triggered_by`, must be one of { triggered_by_allowed_values }"
)
if 'sort_order' in kwargs:
@@ -20903,28 +23737,38 @@ def list_profile_summaries(self, user_assessment_id, compartment_id, **kwargs):
f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }"
)
+ if 'sort_by' in kwargs:
+ sort_by_allowed_values = ["timeCreated", "displayName"]
+ if kwargs['sort_by'] not in sort_by_allowed_values:
+ raise ValueError(
+ f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
+ )
+
+ if 'lifecycle_state' in kwargs:
+ lifecycle_state_allowed_values = ["CREATING", "SUCCEEDED", "UPDATING", "DELETING", "DELETED", "FAILED"]
+ if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values:
+ raise ValueError(
+ f"Invalid value for `lifecycle_state`, must be one of { lifecycle_state_allowed_values }"
+ )
+
query_params = {
"compartmentId": compartment_id,
"compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing),
"accessLevel": kwargs.get("access_level", missing),
+ "displayName": kwargs.get("display_name", missing),
+ "type": kwargs.get("type", missing),
+ "scheduleAssessmentId": kwargs.get("schedule_assessment_id", missing),
+ "isScheduleAssessment": kwargs.get("is_schedule_assessment", missing),
+ "triggeredBy": kwargs.get("triggered_by", missing),
"targetId": kwargs.get("target_id", missing),
+ "sortOrder": kwargs.get("sort_order", missing),
+ "isBaseline": kwargs.get("is_baseline", missing),
+ "sortBy": kwargs.get("sort_by", missing),
+ "timeCreatedGreaterThanOrEqualTo": kwargs.get("time_created_greater_than_or_equal_to", missing),
+ "timeCreatedLessThan": kwargs.get("time_created_less_than", missing),
"limit": kwargs.get("limit", missing),
"page": kwargs.get("page", missing),
- "profileName": kwargs.get("profile_name", missing),
- "isUserCreated": kwargs.get("is_user_created", missing),
- "passwordVerificationFunction": kwargs.get("password_verification_function", missing),
- "userCountGreaterThanOrEqual": kwargs.get("user_count_greater_than_or_equal", missing),
- "userCountLessThan": kwargs.get("user_count_less_than", missing),
- "failedLoginAttemptsGreaterThanOrEqual": kwargs.get("failed_login_attempts_greater_than_or_equal", missing),
- "failedLoginAttemptsLessThan": kwargs.get("failed_login_attempts_less_than", missing),
- "sessionsPerUserGreaterThanOrEqual": kwargs.get("sessions_per_user_greater_than_or_equal", missing),
- "sessionsPerUserLessThan": kwargs.get("sessions_per_user_less_than", missing),
- "inactiveAccountTimeGreaterThanOrEqual": kwargs.get("inactive_account_time_greater_than_or_equal", missing),
- "inactiveAccountTimeLessThan": kwargs.get("inactive_account_time_less_than", missing),
- "passwordLockTimeGreaterThanOrEqual": kwargs.get("password_lock_time_greater_than_or_equal", missing),
- "passwordLockTimeLessThan": kwargs.get("password_lock_time_less_than", missing),
- "sortBy": kwargs.get("sort_by", missing),
- "sortOrder": kwargs.get("sort_order", 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}
@@ -20950,10 +23794,9 @@ def list_profile_summaries(self, user_assessment_id, compartment_id, **kwargs):
self.base_client.call_api,
resource_path=resource_path,
method=method,
- path_params=path_params,
query_params=query_params,
header_params=header_params,
- response_type="list[ProfileSummary]",
+ response_type="list[SecurityAssessmentSummary]",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -20962,20 +23805,24 @@ def list_profile_summaries(self, user_assessment_id, compartment_id, **kwargs):
return self.base_client.call_api(
resource_path=resource_path,
method=method,
- path_params=path_params,
query_params=query_params,
header_params=header_params,
- response_type="list[ProfileSummary]",
+ response_type="list[SecurityAssessmentSummary]",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def list_report_definitions(self, compartment_id, **kwargs):
+ def list_security_feature_analytics(self, compartment_id, **kwargs):
"""
- Gets a list of report definitions.
- The ListReportDefinitions operation returns only the report definitions in the specified `compartmentId`.
- It also returns the seeded report definitions which are available to all the compartments.
+ Gets a list of Database security feature usage aggregated details in the specified compartment. This provides information about the
+ overall security controls, by returning the counting number of the target databases using the security features.
+
+ When you perform the ListSecurityFeatureAnalytics operation, if the parameter compartmentIdInSubtree is set to \"true,\" and if the
+ parameter accessLevel is set to ACCESSIBLE, then the operation returns statistics from the compartments in which the requestor has INSPECT
+ permissions on at least one resource, directly or indirectly (in subcompartments). If the operation is performed at the
+ root compartment and the requestor does not have access to at least one subcompartment of the compartment specified by
+ compartmentId, then \"Not Authorized\" is returned.
:param str compartment_id: (required)
@@ -20993,52 +23840,12 @@ def list_report_definitions(self, compartment_id, **kwargs):
Allowed values are: "RESTRICTED", "ACCESSIBLE"
- :param str display_name: (optional)
- The name of the report definition to query.
-
- :param int limit: (optional)
- For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
-
- __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
-
- :param str page: (optional)
- For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__.
-
- __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
-
- :param str sort_order: (optional)
- The sort order to use, either ascending (ASC) or descending (DESC).
-
- Allowed values are: "ASC", "DESC"
-
- :param str sort_by: (optional)
- The field used for sorting. Only one sorting parameter order (sortOrder) can be specified.
- The default order for TIMECREATED is descending. The default order for DISPLAYNAME is ascending.
- The DISPLAYNAME sort order is case sensitive.
-
- Allowed values are: "TIMECREATED", "DISPLAYNAME", "DISPLAYORDER"
+ :param str target_id: (optional)
+ A filter to return only items related to a specific target OCID.
:param str opc_request_id: (optional)
Unique identifier for the request.
- :param bool is_seeded: (optional)
- A boolean flag indicating to list seeded report definitions. Set this parameter to get list of seeded report definitions.
-
- :param str data_source: (optional)
- Specifies the name of a resource that provides data for the report. For example alerts, events.
-
- Allowed values are: "EVENTS", "ALERTS", "VIOLATIONS", "ALLOWED_SQL"
-
- :param str lifecycle_state: (optional)
- An optional filter to return only resources that match the specified lifecycle state.
-
- Allowed values are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED"
-
- :param str category: (optional)
- An optional filter to return only resources that match the specified category.
-
- Allowed values are: "CUSTOM_REPORTS", "SUMMARY", "ACTIVITY_AUDITING"
-
:param obj retry_strategy: (optional)
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
@@ -21051,40 +23858,32 @@ def list_report_definitions(self, compartment_id, **kwargs):
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.ReportDefinitionCollection`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.SecurityFeatureAnalyticsCollection`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use list_report_definitions API.
+ Click `here `__ to see an example of how to use list_security_feature_analytics API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
required_arguments = ['compartmentId']
- resource_path = "/reportDefinitions"
+ resource_path = "/securityAssessments/securityFeatureAnalytics"
method = "GET"
- operation_name = "list_report_definitions"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/ReportDefinition/ListReportDefinitions"
-
- # Don't accept unknown kwargs
- expected_kwargs = [
- "allow_control_chars",
- "retry_strategy",
- "compartment_id_in_subtree",
- "access_level",
- "display_name",
- "limit",
- "page",
- "sort_order",
- "sort_by",
- "opc_request_id",
- "is_seeded",
- "data_source",
- "lifecycle_state",
- "category"
+ operation_name = "list_security_feature_analytics"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SecurityAssessment/ListSecurityFeatureAnalytics"
+
+ # Don't accept unknown kwargs
+ expected_kwargs = [
+ "allow_control_chars",
+ "retry_strategy",
+ "compartment_id_in_subtree",
+ "access_level",
+ "target_id",
+ "opc_request_id"
]
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"list_report_definitions got unknown kwargs: {extra_kwargs!r}")
+ f"list_security_feature_analytics got unknown kwargs: {extra_kwargs!r}")
if 'access_level' in kwargs:
access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"]
@@ -21093,54 +23892,11 @@ def list_report_definitions(self, compartment_id, **kwargs):
f"Invalid value for `access_level`, must be one of { access_level_allowed_values }"
)
- if 'sort_order' in kwargs:
- sort_order_allowed_values = ["ASC", "DESC"]
- if kwargs['sort_order'] not in sort_order_allowed_values:
- raise ValueError(
- f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }"
- )
-
- if 'sort_by' in kwargs:
- sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME", "DISPLAYORDER"]
- if kwargs['sort_by'] not in sort_by_allowed_values:
- raise ValueError(
- f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
- )
-
- if 'data_source' in kwargs:
- data_source_allowed_values = ["EVENTS", "ALERTS", "VIOLATIONS", "ALLOWED_SQL"]
- if kwargs['data_source'] not in data_source_allowed_values:
- raise ValueError(
- f"Invalid value for `data_source`, must be one of { data_source_allowed_values }"
- )
-
- if 'lifecycle_state' in kwargs:
- lifecycle_state_allowed_values = ["CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED"]
- if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values:
- raise ValueError(
- f"Invalid value for `lifecycle_state`, must be one of { lifecycle_state_allowed_values }"
- )
-
- if 'category' in kwargs:
- category_allowed_values = ["CUSTOM_REPORTS", "SUMMARY", "ACTIVITY_AUDITING"]
- if kwargs['category'] not in category_allowed_values:
- raise ValueError(
- f"Invalid value for `category`, must be one of { category_allowed_values }"
- )
-
query_params = {
"compartmentId": compartment_id,
"compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing),
"accessLevel": kwargs.get("access_level", missing),
- "displayName": kwargs.get("display_name", missing),
- "limit": kwargs.get("limit", missing),
- "page": kwargs.get("page", missing),
- "sortOrder": kwargs.get("sort_order", missing),
- "sortBy": kwargs.get("sort_by", missing),
- "isSeeded": kwargs.get("is_seeded", missing),
- "dataSource": kwargs.get("data_source", missing),
- "lifecycleState": kwargs.get("lifecycle_state", missing),
- "category": kwargs.get("category", missing)
+ "targetId": kwargs.get("target_id", missing)
}
query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
@@ -21168,7 +23924,7 @@ def list_report_definitions(self, compartment_id, **kwargs):
method=method,
query_params=query_params,
header_params=header_params,
- response_type="ReportDefinitionCollection",
+ response_type="SecurityFeatureAnalyticsCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -21179,15 +23935,15 @@ def list_report_definitions(self, compartment_id, **kwargs):
method=method,
query_params=query_params,
header_params=header_params,
- response_type="ReportDefinitionCollection",
+ response_type="SecurityFeatureAnalyticsCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def list_reports(self, compartment_id, **kwargs):
+ def list_security_features(self, compartment_id, **kwargs):
"""
- Gets a list of all the reports in the compartment. It contains information such as report generation time.
+ Lists the usage of Database security features for a given compartment or a target level, based on the filters provided.
:param str compartment_id: (required)
@@ -21205,44 +23961,76 @@ def list_reports(self, compartment_id, **kwargs):
Allowed values are: "RESTRICTED", "ACCESSIBLE"
- :param str display_name: (optional)
- The name of the report definition to query.
+ :param str target_id: (optional)
+ A filter to return only items related to a specific target OCID.
- :param int limit: (optional)
- For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
+ :param str targets_with_unified_audit: (optional)
+ A filter to return only the targets with the DB security feature - Unified Audit enabled/disabled.
- __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
+ Allowed values are: "ENABLED", "DISABLED", "NONE"
- :param str page: (optional)
- For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__.
+ :param str targets_with_fine_grained_audit: (optional)
+ A filter to return only the targets with the DB security feature - Fine Grained Audit enabled/disabled.
- __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
+ Allowed values are: "ENABLED", "DISABLED", "NONE"
- :param str sort_order: (optional)
- The sort order to use, either ascending (ASC) or descending (DESC).
+ :param str targets_with_traditional_audit: (optional)
+ A filter to return only the targets with the DB security feature - Traditional Audit enabled/disabled.
- Allowed values are: "ASC", "DESC"
+ Allowed values are: "ENABLED", "DISABLED", "NONE"
- :param str sort_by: (optional)
- The field to sort by. Only one sort order may be provided. Default order for timeGenerated is descending. Default order for displayName is ascending. If no value is specified timeGenerated is default.
+ :param str targets_with_database_vault: (optional)
+ A filter to return only the targets with the DB security feature - Database Vault enabled/disabled.
- Allowed values are: "timeGenerated", "displayName"
+ Allowed values are: "ENABLED", "DISABLED", "NONE"
- :param str report_definition_id: (optional)
- The ID of the report definition to filter the list of reports
+ :param str targets_with_privilege_analysis: (optional)
+ A filter to return only the targets with the DB security feature - Privilege Analysis enabled/disabled.
+
+ Allowed values are: "ENABLED", "DISABLED", "NONE"
+
+ :param str targets_with_tablespace_encryption: (optional)
+ A filter to return only the targets with the DB security feature - Tablespace Encryption enabled/disabled.
+
+ Allowed values are: "ENABLED", "DISABLED", "NONE"
+
+ :param str targets_with_column_encryption: (optional)
+ A filter to return only the targets that enable the DB security feature - Column Encryption enabled/disabled.
+
+ Allowed values are: "ENABLED", "DISABLED", "NONE"
+
+ :param str targets_with_network_encryption: (optional)
+ A filter to return only the targets with the DB security feature - Network Encryption enabled/disabled.
+
+ Allowed values are: "ENABLED", "DISABLED", "NONE"
+
+ :param str targets_with_password_authentication: (optional)
+ A filter to return only the targets with the DB security feature - Password Authentication enabled/disabled.
+
+ Allowed values are: "ENABLED", "DISABLED", "NONE"
+
+ :param str targets_with_global_authentication: (optional)
+ A filter to return only the targets with the DB security feature - Global Authentication enabled/disabled.
+
+ Allowed values are: "ENABLED", "DISABLED", "NONE"
+
+ :param str targets_with_external_authentication: (optional)
+ A filter to return only the targets with the DB security feature - External Authentication enabled/disabled.
+
+ Allowed values are: "ENABLED", "DISABLED", "NONE"
:param str opc_request_id: (optional)
Unique identifier for the request.
- :param str lifecycle_state: (optional)
- An optional filter to return only resources that match the specified lifecycle state.
+ :param int limit: (optional)
+ For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
- Allowed values are: "UPDATING", "ACTIVE"
+ __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
- :param str type: (optional)
- An optional filter to return only resources that match the specified type.
+ :param str page: (optional)
+ For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__.
- Allowed values are: "GENERATED", "SCHEDULED"
+ __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
:param obj retry_strategy: (optional)
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
@@ -21256,18 +24044,18 @@ def list_reports(self, compartment_id, **kwargs):
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.ReportCollection`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.SecurityFeatureCollection`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use list_reports API.
+ Click `here `__ to see an example of how to use list_security_features API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
required_arguments = ['compartmentId']
- resource_path = "/reports"
+ resource_path = "/securityAssessments/securityFeatures"
method = "GET"
- operation_name = "list_reports"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/ReportSummary/ListReports"
+ operation_name = "list_security_features"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SecurityAssessment/ListSecurityFeatures"
# Don't accept unknown kwargs
expected_kwargs = [
@@ -21275,20 +24063,26 @@ def list_reports(self, compartment_id, **kwargs):
"retry_strategy",
"compartment_id_in_subtree",
"access_level",
- "display_name",
- "limit",
- "page",
- "sort_order",
- "sort_by",
- "report_definition_id",
+ "target_id",
+ "targets_with_unified_audit",
+ "targets_with_fine_grained_audit",
+ "targets_with_traditional_audit",
+ "targets_with_database_vault",
+ "targets_with_privilege_analysis",
+ "targets_with_tablespace_encryption",
+ "targets_with_column_encryption",
+ "targets_with_network_encryption",
+ "targets_with_password_authentication",
+ "targets_with_global_authentication",
+ "targets_with_external_authentication",
"opc_request_id",
- "lifecycle_state",
- "type"
+ "limit",
+ "page"
]
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"list_reports got unknown kwargs: {extra_kwargs!r}")
+ f"list_security_features got unknown kwargs: {extra_kwargs!r}")
if 'access_level' in kwargs:
access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"]
@@ -21297,46 +24091,101 @@ def list_reports(self, compartment_id, **kwargs):
f"Invalid value for `access_level`, must be one of { access_level_allowed_values }"
)
- if 'sort_order' in kwargs:
- sort_order_allowed_values = ["ASC", "DESC"]
- if kwargs['sort_order'] not in sort_order_allowed_values:
+ if 'targets_with_unified_audit' in kwargs:
+ targets_with_unified_audit_allowed_values = ["ENABLED", "DISABLED", "NONE"]
+ if kwargs['targets_with_unified_audit'] not in targets_with_unified_audit_allowed_values:
raise ValueError(
- f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }"
+ f"Invalid value for `targets_with_unified_audit`, must be one of { targets_with_unified_audit_allowed_values }"
)
- if 'sort_by' in kwargs:
- sort_by_allowed_values = ["timeGenerated", "displayName"]
- if kwargs['sort_by'] not in sort_by_allowed_values:
+ if 'targets_with_fine_grained_audit' in kwargs:
+ targets_with_fine_grained_audit_allowed_values = ["ENABLED", "DISABLED", "NONE"]
+ if kwargs['targets_with_fine_grained_audit'] not in targets_with_fine_grained_audit_allowed_values:
raise ValueError(
- f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
+ f"Invalid value for `targets_with_fine_grained_audit`, must be one of { targets_with_fine_grained_audit_allowed_values }"
)
- if 'lifecycle_state' in kwargs:
- lifecycle_state_allowed_values = ["UPDATING", "ACTIVE"]
- if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values:
+ if 'targets_with_traditional_audit' in kwargs:
+ targets_with_traditional_audit_allowed_values = ["ENABLED", "DISABLED", "NONE"]
+ if kwargs['targets_with_traditional_audit'] not in targets_with_traditional_audit_allowed_values:
raise ValueError(
- f"Invalid value for `lifecycle_state`, must be one of { lifecycle_state_allowed_values }"
+ f"Invalid value for `targets_with_traditional_audit`, must be one of { targets_with_traditional_audit_allowed_values }"
)
- if 'type' in kwargs:
- type_allowed_values = ["GENERATED", "SCHEDULED"]
- if kwargs['type'] not in type_allowed_values:
+ if 'targets_with_database_vault' in kwargs:
+ targets_with_database_vault_allowed_values = ["ENABLED", "DISABLED", "NONE"]
+ if kwargs['targets_with_database_vault'] not in targets_with_database_vault_allowed_values:
raise ValueError(
- f"Invalid value for `type`, must be one of { type_allowed_values }"
+ f"Invalid value for `targets_with_database_vault`, must be one of { targets_with_database_vault_allowed_values }"
+ )
+
+ if 'targets_with_privilege_analysis' in kwargs:
+ targets_with_privilege_analysis_allowed_values = ["ENABLED", "DISABLED", "NONE"]
+ if kwargs['targets_with_privilege_analysis'] not in targets_with_privilege_analysis_allowed_values:
+ raise ValueError(
+ f"Invalid value for `targets_with_privilege_analysis`, must be one of { targets_with_privilege_analysis_allowed_values }"
+ )
+
+ if 'targets_with_tablespace_encryption' in kwargs:
+ targets_with_tablespace_encryption_allowed_values = ["ENABLED", "DISABLED", "NONE"]
+ if kwargs['targets_with_tablespace_encryption'] not in targets_with_tablespace_encryption_allowed_values:
+ raise ValueError(
+ f"Invalid value for `targets_with_tablespace_encryption`, must be one of { targets_with_tablespace_encryption_allowed_values }"
+ )
+
+ if 'targets_with_column_encryption' in kwargs:
+ targets_with_column_encryption_allowed_values = ["ENABLED", "DISABLED", "NONE"]
+ if kwargs['targets_with_column_encryption'] not in targets_with_column_encryption_allowed_values:
+ raise ValueError(
+ f"Invalid value for `targets_with_column_encryption`, must be one of { targets_with_column_encryption_allowed_values }"
+ )
+
+ if 'targets_with_network_encryption' in kwargs:
+ targets_with_network_encryption_allowed_values = ["ENABLED", "DISABLED", "NONE"]
+ if kwargs['targets_with_network_encryption'] not in targets_with_network_encryption_allowed_values:
+ raise ValueError(
+ f"Invalid value for `targets_with_network_encryption`, must be one of { targets_with_network_encryption_allowed_values }"
+ )
+
+ if 'targets_with_password_authentication' in kwargs:
+ targets_with_password_authentication_allowed_values = ["ENABLED", "DISABLED", "NONE"]
+ if kwargs['targets_with_password_authentication'] not in targets_with_password_authentication_allowed_values:
+ raise ValueError(
+ f"Invalid value for `targets_with_password_authentication`, must be one of { targets_with_password_authentication_allowed_values }"
+ )
+
+ if 'targets_with_global_authentication' in kwargs:
+ targets_with_global_authentication_allowed_values = ["ENABLED", "DISABLED", "NONE"]
+ if kwargs['targets_with_global_authentication'] not in targets_with_global_authentication_allowed_values:
+ raise ValueError(
+ f"Invalid value for `targets_with_global_authentication`, must be one of { targets_with_global_authentication_allowed_values }"
+ )
+
+ if 'targets_with_external_authentication' in kwargs:
+ targets_with_external_authentication_allowed_values = ["ENABLED", "DISABLED", "NONE"]
+ if kwargs['targets_with_external_authentication'] not in targets_with_external_authentication_allowed_values:
+ raise ValueError(
+ f"Invalid value for `targets_with_external_authentication`, must be one of { targets_with_external_authentication_allowed_values }"
)
query_params = {
"compartmentId": compartment_id,
"compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing),
"accessLevel": kwargs.get("access_level", missing),
- "displayName": kwargs.get("display_name", missing),
+ "targetId": kwargs.get("target_id", missing),
+ "targetsWithUnifiedAudit": kwargs.get("targets_with_unified_audit", missing),
+ "targetsWithFineGrainedAudit": kwargs.get("targets_with_fine_grained_audit", missing),
+ "targetsWithTraditionalAudit": kwargs.get("targets_with_traditional_audit", missing),
+ "targetsWithDatabaseVault": kwargs.get("targets_with_database_vault", missing),
+ "targetsWithPrivilegeAnalysis": kwargs.get("targets_with_privilege_analysis", missing),
+ "targetsWithTablespaceEncryption": kwargs.get("targets_with_tablespace_encryption", missing),
+ "targetsWithColumnEncryption": kwargs.get("targets_with_column_encryption", missing),
+ "targetsWithNetworkEncryption": kwargs.get("targets_with_network_encryption", missing),
+ "targetsWithPasswordAuthentication": kwargs.get("targets_with_password_authentication", missing),
+ "targetsWithGlobalAuthentication": kwargs.get("targets_with_global_authentication", missing),
+ "targetsWithExternalAuthentication": kwargs.get("targets_with_external_authentication", missing),
"limit": kwargs.get("limit", missing),
- "page": kwargs.get("page", missing),
- "sortOrder": kwargs.get("sort_order", missing),
- "sortBy": kwargs.get("sort_by", missing),
- "reportDefinitionId": kwargs.get("report_definition_id", missing),
- "lifecycleState": kwargs.get("lifecycle_state", missing),
- "type": kwargs.get("type", 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}
@@ -21364,7 +24213,7 @@ def list_reports(self, compartment_id, **kwargs):
method=method,
query_params=query_params,
header_params=header_params,
- response_type="ReportCollection",
+ response_type="SecurityFeatureCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -21375,22 +24224,47 @@ def list_reports(self, compartment_id, **kwargs):
method=method,
query_params=query_params,
header_params=header_params,
- response_type="ReportCollection",
+ response_type="SecurityFeatureCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def list_roles(self, target_database_id, **kwargs):
+ def list_security_policies(self, compartment_id, **kwargs):
"""
- Returns a list of role metadata objects.
+ Retrieves a list of all security policies in Data Safe.
+ The ListSecurityPolicies operation returns only the security policies in the specified `compartmentId`.
- :param str target_database_id: (required)
- The OCID of the Data Safe target database.
+ The parameter `accessLevel` specifies whether to return only those compartments for which the
+ requestor has INSPECT permissions on at least one resource directly
+ or indirectly (ACCESSIBLE) (the resource can be in a subcompartment) or to return Not Authorized if
+ Principal doesn't have access to even one of the child compartments. This is valid only when
+ `compartmentIdInSubtree` is set to `true`.
- :param str opc_request_id: (optional)
- Unique identifier for the request.
+ The parameter `compartmentIdInSubtree` applies when you perform ListSecurityPolicies on the
+ `compartmentId` passed and when it is set to true, the entire hierarchy of compartments can be returned.
+ To get a full list of all compartments and subcompartments in the tenancy (root compartment),
+ set the parameter `compartmentIdInSubtree` to true and `accessLevel` to ACCESSIBLE.
+
+
+ :param str compartment_id: (required)
+ A filter to return only resources that match the specified compartment OCID.
+
+ :param bool compartment_id_in_subtree: (optional)
+ Default is false.
+ When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting.
+
+ :param str access_level: (optional)
+ Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED.
+ Setting this to ACCESSIBLE returns only those compartments for which the
+ user has INSPECT permissions directly or indirectly (permissions can be on a
+ resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed.
+
+ Allowed values are: "RESTRICTED", "ACCESSIBLE"
+
+ :param str display_name: (optional)
+ A filter to return only resources that match the specified display name.
:param int limit: (optional)
For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
@@ -21402,14 +24276,13 @@ def list_roles(self, target_database_id, **kwargs):
__ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
- :param list[str] role_name: (optional)
- A filter to return only a specific role based on role name.
+ :param str lifecycle_state: (optional)
+ The current state of the security policy.
- :param bool is_oracle_maintained: (optional)
- A filter to return roles based on whether they are maintained by oracle or not.
+ Allowed values are: "CREATING", "UPDATING", "ACTIVE", "FAILED", "DELETING", "DELETED"
- :param str authentication_type: (optional)
- A filter to return roles based on authentication type.
+ :param str security_policy_id: (optional)
+ An optional filter to return only resources that match the specified OCID of the security policy resource.
:param str sort_order: (optional)
The sort order to use, either ascending (ASC) or descending (DESC).
@@ -21418,11 +24291,13 @@ def list_roles(self, target_database_id, **kwargs):
:param str sort_by: (optional)
The field used for sorting. Only one sorting order (sortOrder) can be specified.
+ The default order for TIMECREATED is descending. The default order for DISPLAYNAME is ascending.
+ The DISPLAYNAME sort order is case sensitive.
- Allowed values are: "ROLENAME"
+ Allowed values are: "TIMECREATED", "DISPLAYNAME"
- :param str role_name_contains: (optional)
- A filter to return only items if role name contains a specific string.
+ :param str opc_request_id: (optional)
+ Unique identifier for the request.
:param obj retry_strategy: (optional)
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
@@ -21436,47 +24311,52 @@ def list_roles(self, target_database_id, **kwargs):
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.data_safe.models.RoleSummary`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.SecurityPolicyCollection`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use list_roles API.
+ Click `here `__ to see an example of how to use list_security_policies API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
- required_arguments = ['targetDatabaseId']
- resource_path = "/targetDatabases/{targetDatabaseId}/roles"
+ required_arguments = ['compartmentId']
+ resource_path = "/securityPolicies"
method = "GET"
- operation_name = "list_roles"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/TargetDatabase/ListRoles"
+ operation_name = "list_security_policies"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SecurityPolicyCollection/ListSecurityPolicies"
# Don't accept unknown kwargs
expected_kwargs = [
"allow_control_chars",
"retry_strategy",
- "opc_request_id",
+ "compartment_id_in_subtree",
+ "access_level",
+ "display_name",
"limit",
"page",
- "role_name",
- "is_oracle_maintained",
- "authentication_type",
+ "lifecycle_state",
+ "security_policy_id",
"sort_order",
"sort_by",
- "role_name_contains"
+ "opc_request_id"
]
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"list_roles got unknown kwargs: {extra_kwargs!r}")
-
- path_params = {
- "targetDatabaseId": target_database_id
- }
+ f"list_security_policies got unknown kwargs: {extra_kwargs!r}")
- path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
+ if 'access_level' in kwargs:
+ access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"]
+ if kwargs['access_level'] not in access_level_allowed_values:
+ raise ValueError(
+ f"Invalid value for `access_level`, must be one of { access_level_allowed_values }"
+ )
- for (k, v) in six.iteritems(path_params):
- if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
- raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
+ if 'lifecycle_state' in kwargs:
+ lifecycle_state_allowed_values = ["CREATING", "UPDATING", "ACTIVE", "FAILED", "DELETING", "DELETED"]
+ if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values:
+ raise ValueError(
+ f"Invalid value for `lifecycle_state`, must be one of { lifecycle_state_allowed_values }"
+ )
if 'sort_order' in kwargs:
sort_order_allowed_values = ["ASC", "DESC"]
@@ -21486,21 +24366,23 @@ def list_roles(self, target_database_id, **kwargs):
)
if 'sort_by' in kwargs:
- sort_by_allowed_values = ["ROLENAME"]
+ sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"]
if kwargs['sort_by'] not in sort_by_allowed_values:
raise ValueError(
f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
)
query_params = {
+ "compartmentId": compartment_id,
+ "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing),
+ "accessLevel": kwargs.get("access_level", missing),
+ "displayName": kwargs.get("display_name", missing),
"limit": kwargs.get("limit", missing),
"page": kwargs.get("page", missing),
- "roleName": self.base_client.generate_collection_format_param(kwargs.get("role_name", missing), 'multi'),
- "isOracleMaintained": kwargs.get("is_oracle_maintained", missing),
- "authenticationType": kwargs.get("authentication_type", missing),
+ "lifecycleState": kwargs.get("lifecycle_state", missing),
+ "securityPolicyId": kwargs.get("security_policy_id", missing),
"sortOrder": kwargs.get("sort_order", missing),
- "sortBy": kwargs.get("sort_by", missing),
- "roleNameContains": kwargs.get("role_name_contains", missing)
+ "sortBy": kwargs.get("sort_by", missing)
}
query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
@@ -21526,10 +24408,9 @@ def list_roles(self, target_database_id, **kwargs):
self.base_client.call_api,
resource_path=resource_path,
method=method,
- path_params=path_params,
query_params=query_params,
header_params=header_params,
- response_type="list[RoleSummary]",
+ response_type="SecurityPolicyCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -21538,25 +24419,49 @@ def list_roles(self, target_database_id, **kwargs):
return self.base_client.call_api(
resource_path=resource_path,
method=method,
- path_params=path_params,
query_params=query_params,
header_params=header_params,
- response_type="list[RoleSummary]",
+ response_type="SecurityPolicyCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def list_schemas(self, target_database_id, **kwargs):
+ def list_security_policy_deployments(self, compartment_id, **kwargs):
"""
- Returns list of schema.
+ Retrieves a list of all security policy deployments in Data Safe.
+ The ListSecurityPolicyDeployments operation returns only the security policy deployments in the specified `compartmentId`.
- :param str target_database_id: (required)
- The OCID of the Data Safe target database.
+ The parameter `accessLevel` specifies whether to return only those compartments for which the
+ requestor has INSPECT permissions on at least one resource directly
+ or indirectly (ACCESSIBLE) (the resource can be in a subcompartment) or to return Not Authorized if
+ Principal doesn't have access to even one of the child compartments. This is valid only when
+ `compartmentIdInSubtree` is set to `true`.
- :param str opc_request_id: (optional)
- Unique identifier for the request.
+ The parameter `compartmentIdInSubtree` applies when you perform ListSecurityPolicyDeployments on the
+ `compartmentId` passed and when it is set to true, the entire hierarchy of compartments can be returned.
+ To get a full list of all compartments and subcompartments in the tenancy (root compartment),
+ set the parameter `compartmentIdInSubtree` to true and `accessLevel` to ACCESSIBLE.
+
+
+ :param str compartment_id: (required)
+ A filter to return only resources that match the specified compartment OCID.
+
+ :param bool compartment_id_in_subtree: (optional)
+ Default is false.
+ When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting.
+
+ :param str access_level: (optional)
+ Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED.
+ Setting this to ACCESSIBLE returns only those compartments for which the
+ user has INSPECT permissions directly or indirectly (permissions can be on a
+ resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed.
+
+ Allowed values are: "RESTRICTED", "ACCESSIBLE"
+
+ :param str display_name: (optional)
+ A filter to return only resources that match the specified display name.
:param int limit: (optional)
For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
@@ -21568,8 +24473,19 @@ def list_schemas(self, target_database_id, **kwargs):
__ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
- :param list[str] schema_name: (optional)
- A filter to return only items related to specific schema name.
+ :param str lifecycle_state: (optional)
+ The current state of the security policy deployment.
+
+ Allowed values are: "CREATING", "UPDATING", "DEPLOYED", "NEEDS_ATTENTION", "FAILED", "DELETING", "DELETED"
+
+ :param str security_policy_deployment_id: (optional)
+ An optional filter to return only resources that match the specified OCID of the security policy deployment resource.
+
+ :param str target_id: (optional)
+ A filter to return only items related to a specific target OCID.
+
+ :param str security_policy_id: (optional)
+ An optional filter to return only resources that match the specified OCID of the security policy resource.
:param str sort_order: (optional)
The sort order to use, either ascending (ASC) or descending (DESC).
@@ -21578,14 +24494,13 @@ def list_schemas(self, target_database_id, **kwargs):
:param str sort_by: (optional)
The field used for sorting. Only one sorting order (sortOrder) can be specified.
+ The default order for TIMECREATED is descending. The default order for DISPLAYNAME is ascending.
+ The DISPLAYNAME sort order is case sensitive.
- Allowed values are: "SCHEMANAME"
-
- :param bool is_oracle_maintained: (optional)
- A filter to return only items related to specific type of schema.
+ Allowed values are: "TIMECREATED", "DISPLAYNAME"
- :param str schema_name_contains: (optional)
- A filter to return only items if schema name contains a specific string.
+ :param str opc_request_id: (optional)
+ Unique identifier for the request.
:param obj retry_strategy: (optional)
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
@@ -21599,46 +24514,54 @@ def list_schemas(self, target_database_id, **kwargs):
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.data_safe.models.SchemaSummary`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.SecurityPolicyDeploymentCollection`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use list_schemas API.
+ Click `here `__ to see an example of how to use list_security_policy_deployments API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
- required_arguments = ['targetDatabaseId']
- resource_path = "/targetDatabases/{targetDatabaseId}/schemas"
+ required_arguments = ['compartmentId']
+ resource_path = "/securityPolicyDeployments"
method = "GET"
- operation_name = "list_schemas"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/TargetDatabase/ListSchemas"
+ operation_name = "list_security_policy_deployments"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SecurityPolicyDeploymentCollection/ListSecurityPolicyDeployments"
# Don't accept unknown kwargs
expected_kwargs = [
"allow_control_chars",
"retry_strategy",
- "opc_request_id",
+ "compartment_id_in_subtree",
+ "access_level",
+ "display_name",
"limit",
"page",
- "schema_name",
+ "lifecycle_state",
+ "security_policy_deployment_id",
+ "target_id",
+ "security_policy_id",
"sort_order",
"sort_by",
- "is_oracle_maintained",
- "schema_name_contains"
+ "opc_request_id"
]
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"list_schemas got unknown kwargs: {extra_kwargs!r}")
-
- path_params = {
- "targetDatabaseId": target_database_id
- }
+ f"list_security_policy_deployments got unknown kwargs: {extra_kwargs!r}")
- path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
+ if 'access_level' in kwargs:
+ access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"]
+ if kwargs['access_level'] not in access_level_allowed_values:
+ raise ValueError(
+ f"Invalid value for `access_level`, must be one of { access_level_allowed_values }"
+ )
- for (k, v) in six.iteritems(path_params):
- if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
- raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
+ if 'lifecycle_state' in kwargs:
+ lifecycle_state_allowed_values = ["CREATING", "UPDATING", "DEPLOYED", "NEEDS_ATTENTION", "FAILED", "DELETING", "DELETED"]
+ if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values:
+ raise ValueError(
+ f"Invalid value for `lifecycle_state`, must be one of { lifecycle_state_allowed_values }"
+ )
if 'sort_order' in kwargs:
sort_order_allowed_values = ["ASC", "DESC"]
@@ -21648,20 +24571,25 @@ def list_schemas(self, target_database_id, **kwargs):
)
if 'sort_by' in kwargs:
- sort_by_allowed_values = ["SCHEMANAME"]
+ sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"]
if kwargs['sort_by'] not in sort_by_allowed_values:
raise ValueError(
f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
)
query_params = {
+ "compartmentId": compartment_id,
+ "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing),
+ "accessLevel": kwargs.get("access_level", missing),
+ "displayName": kwargs.get("display_name", missing),
"limit": kwargs.get("limit", missing),
"page": kwargs.get("page", missing),
- "schemaName": self.base_client.generate_collection_format_param(kwargs.get("schema_name", missing), 'multi'),
+ "lifecycleState": kwargs.get("lifecycle_state", missing),
+ "securityPolicyDeploymentId": kwargs.get("security_policy_deployment_id", missing),
+ "targetId": kwargs.get("target_id", missing),
+ "securityPolicyId": kwargs.get("security_policy_id", missing),
"sortOrder": kwargs.get("sort_order", missing),
- "sortBy": kwargs.get("sort_by", missing),
- "isOracleMaintained": kwargs.get("is_oracle_maintained", missing),
- "schemaNameContains": kwargs.get("schema_name_contains", missing)
+ "sortBy": kwargs.get("sort_by", missing)
}
query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
@@ -21687,10 +24615,9 @@ def list_schemas(self, target_database_id, **kwargs):
self.base_client.call_api,
resource_path=resource_path,
method=method,
- path_params=path_params,
query_params=query_params,
header_params=header_params,
- response_type="list[SchemaSummary]",
+ response_type="SecurityPolicyDeploymentCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -21699,62 +24626,23 @@ def list_schemas(self, target_database_id, **kwargs):
return self.base_client.call_api(
resource_path=resource_path,
method=method,
- path_params=path_params,
query_params=query_params,
header_params=header_params,
- response_type="list[SchemaSummary]",
+ response_type="SecurityPolicyDeploymentCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def list_sdm_masking_policy_differences(self, compartment_id, **kwargs):
+ def list_security_policy_entry_states(self, security_policy_deployment_id, **kwargs):
"""
- Gets a list of SDM and masking policy difference resources based on the specified query parameters.
-
-
- :param str compartment_id: (required)
- A filter to return only resources that match the specified compartment OCID.
-
- :param bool compartment_id_in_subtree: (optional)
- Default is false.
- When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting.
-
- :param str difference_access_level: (optional)
- Valid value is ACCESSIBLE. Default is ACCESSIBLE.
- Setting this to ACCESSIBLE returns only those compartments for which the
- user has INSPECT permissions directly or indirectly (permissions can be on a
- resource in a subcompartment).
-
- Allowed values are: "ACCESSIBLE"
-
- :param str display_name: (optional)
- A filter to return only resources that match the specified display name.
-
- :param str sensitive_data_model_id: (optional)
- A filter to return only the resources that match the specified sensitive data model OCID.
-
- :param str lifecycle_state: (optional)
- A filter to return only the resources that match the specified lifecycle states.
-
- Allowed values are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED"
-
- :param str masking_policy_id: (optional)
- A filter to return only the resources that match the specified masking policy OCID.
-
- :param str sort_order: (optional)
- The sort order to use, either ascending (ASC) or descending (DESC).
-
- Allowed values are: "ASC", "DESC"
+ Retrieves a list of all security policy entry states in Data Safe.
- :param str sort_by: (optional)
- The field to sort by. You can specify only one sorting parameter (sortOrder). The default order for timeCreationStarted is descending.
- The default order for displayName is ascending.
+ The ListSecurityPolicyEntryStates operation returns only the security policy entry states for the specified security policy entry.
- Allowed values are: "timeCreationStarted", "displayName"
- :param str opc_request_id: (optional)
- Unique identifier for the request.
+ :param str security_policy_deployment_id: (required)
+ The OCID of the security policy deployment resource.
:param int limit: (optional)
For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
@@ -21766,6 +24654,17 @@ def list_sdm_masking_policy_differences(self, compartment_id, **kwargs):
__ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
+ :param str deployment_status: (optional)
+ The current state of the security policy deployment.
+
+ Allowed values are: "CREATED", "MODIFIED", "CONFLICT", "UNAUTHORIZED", "DELETED"
+
+ :param str security_policy_entry_id: (optional)
+ An optional filter to return only resources that match the specified security policy entry OCID.
+
+ :param str opc_request_id: (optional)
+ Unique identifier for the request.
+
:param obj retry_strategy: (optional)
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
@@ -21778,80 +24677,56 @@ def list_sdm_masking_policy_differences(self, compartment_id, **kwargs):
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.SdmMaskingPolicyDifferenceCollection`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.SecurityPolicyEntryStateCollection`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use list_sdm_masking_policy_differences API.
+ Click `here `__ to see an example of how to use list_security_policy_entry_states API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
- required_arguments = ['compartmentId']
- resource_path = "/sdmMaskingPolicyDifferences"
+ required_arguments = ['securityPolicyDeploymentId']
+ resource_path = "/securityPolicyDeployments/{securityPolicyDeploymentId}/securityPolicyEntryStates"
method = "GET"
- operation_name = "list_sdm_masking_policy_differences"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SdmMaskingPolicyDifference/ListSdmMaskingPolicyDifferences"
+ operation_name = "list_security_policy_entry_states"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SecurityPolicyEntryStateCollection/ListSecurityPolicyEntryStates"
# Don't accept unknown kwargs
expected_kwargs = [
"allow_control_chars",
"retry_strategy",
- "compartment_id_in_subtree",
- "difference_access_level",
- "display_name",
- "sensitive_data_model_id",
- "lifecycle_state",
- "masking_policy_id",
- "sort_order",
- "sort_by",
- "opc_request_id",
"limit",
- "page"
+ "page",
+ "deployment_status",
+ "security_policy_entry_id",
+ "opc_request_id"
]
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"list_sdm_masking_policy_differences got unknown kwargs: {extra_kwargs!r}")
+ f"list_security_policy_entry_states got unknown kwargs: {extra_kwargs!r}")
- if 'difference_access_level' in kwargs:
- difference_access_level_allowed_values = ["ACCESSIBLE"]
- if kwargs['difference_access_level'] not in difference_access_level_allowed_values:
- raise ValueError(
- f"Invalid value for `difference_access_level`, must be one of { difference_access_level_allowed_values }"
- )
+ path_params = {
+ "securityPolicyDeploymentId": security_policy_deployment_id
+ }
- if 'lifecycle_state' in kwargs:
- lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED"]
- if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values:
- raise ValueError(
- f"Invalid value for `lifecycle_state`, must be one of { lifecycle_state_allowed_values }"
- )
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
- if 'sort_order' in kwargs:
- sort_order_allowed_values = ["ASC", "DESC"]
- if kwargs['sort_order'] not in sort_order_allowed_values:
- raise ValueError(
- f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }"
- )
+ for (k, v) in six.iteritems(path_params):
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
+ raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
- if 'sort_by' in kwargs:
- sort_by_allowed_values = ["timeCreationStarted", "displayName"]
- if kwargs['sort_by'] not in sort_by_allowed_values:
+ if 'deployment_status' in kwargs:
+ deployment_status_allowed_values = ["CREATED", "MODIFIED", "CONFLICT", "UNAUTHORIZED", "DELETED"]
+ if kwargs['deployment_status'] not in deployment_status_allowed_values:
raise ValueError(
- f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
+ f"Invalid value for `deployment_status`, must be one of { deployment_status_allowed_values }"
)
query_params = {
- "compartmentId": compartment_id,
- "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing),
- "differenceAccessLevel": kwargs.get("difference_access_level", missing),
- "displayName": kwargs.get("display_name", missing),
- "sensitiveDataModelId": kwargs.get("sensitive_data_model_id", missing),
- "lifecycleState": kwargs.get("lifecycle_state", missing),
- "maskingPolicyId": kwargs.get("masking_policy_id", missing),
- "sortOrder": kwargs.get("sort_order", missing),
- "sortBy": kwargs.get("sort_by", missing),
"limit": kwargs.get("limit", missing),
- "page": kwargs.get("page", missing)
+ "page": kwargs.get("page", missing),
+ "deploymentStatus": kwargs.get("deployment_status", missing),
+ "securityPolicyEntryId": kwargs.get("security_policy_entry_id", missing)
}
query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
@@ -21877,9 +24752,10 @@ def list_sdm_masking_policy_differences(self, compartment_id, **kwargs):
self.base_client.call_api,
resource_path=resource_path,
method=method,
+ path_params=path_params,
query_params=query_params,
header_params=header_params,
- response_type="SdmMaskingPolicyDifferenceCollection",
+ response_type="SecurityPolicyEntryStateCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -21888,20 +24764,20 @@ def list_sdm_masking_policy_differences(self, compartment_id, **kwargs):
return self.base_client.call_api(
resource_path=resource_path,
method=method,
+ path_params=path_params,
query_params=query_params,
header_params=header_params,
- response_type="SdmMaskingPolicyDifferenceCollection",
+ response_type="SecurityPolicyEntryStateCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def list_security_assessments(self, compartment_id, **kwargs):
+ def list_security_policy_reports(self, compartment_id, **kwargs):
"""
- Gets a list of security assessments.
+ Retrieves a list of all security policy reports in Data Safe.
- The ListSecurityAssessments operation returns only the assessments in the specified `compartmentId`.
- The list does not include any subcompartments of the compartmentId passed.
+ The ListSecurityPolicyReports operation returns only the security policy reports in the specified `compartmentId`.
The parameter `accessLevel` specifies whether to return only those compartments for which the
requestor has INSPECT permissions on at least one resource directly
@@ -21909,7 +24785,7 @@ def list_security_assessments(self, compartment_id, **kwargs):
Principal doesn't have access to even one of the child compartments. This is valid only when
`compartmentIdInSubtree` is set to `true`.
- The parameter `compartmentIdInSubtree` applies when you perform ListSecurityAssessments on the
+ The parameter `compartmentIdInSubtree` applies when you perform ListSecurityPolicyReports on the
`compartmentId` passed and when it is set to true, the entire hierarchy of compartments can be returned.
To get a full list of all compartments and subcompartments in the tenancy (root compartment),
set the parameter `compartmentIdInSubtree` to true and `accessLevel` to ACCESSIBLE.
@@ -21933,21 +24809,23 @@ def list_security_assessments(self, compartment_id, **kwargs):
:param str display_name: (optional)
A filter to return only resources that match the specified display name.
- :param str type: (optional)
- A filter to return only items that match the specified security assessment type.
+ :param int limit: (optional)
+ For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
- Allowed values are: "LATEST", "SAVED", "SAVE_SCHEDULE", "COMPARTMENT"
+ __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
- :param str schedule_assessment_id: (optional)
- The OCID of the security assessment of type SAVE_SCHEDULE.
+ :param str page: (optional)
+ For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__.
- :param bool is_schedule_assessment: (optional)
- A filter to return only security assessments of type save schedule.
+ __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
- :param str triggered_by: (optional)
- A filter to return only security asessments that were created by either user or system.
+ :param str lifecycle_state: (optional)
+ The current state of the security policy report.
- Allowed values are: "USER", "SYSTEM"
+ Allowed values are: "CREATING", "SUCCEEDED", "UPDATING", "DELETING", "DELETED", "FAILED", "NEEDS_ATTENTION"
+
+ :param str security_policy_report_id: (optional)
+ An optional filter to return only resources that match the specified OCID of the security policy report resource.
:param str target_id: (optional)
A filter to return only items related to a specific target OCID.
@@ -21957,49 +24835,16 @@ def list_security_assessments(self, compartment_id, **kwargs):
Allowed values are: "ASC", "DESC"
- :param bool is_baseline: (optional)
- A filter to return only the security assessments that are set as a baseline.
-
:param str sort_by: (optional)
- The field to sort by. You can specify only one sort order(sortOrder). The default order for timeCreated is descending.
-
- Allowed values are: "timeCreated", "displayName"
-
- :param datetime time_created_greater_than_or_equal_to: (optional)
- A filter to return only the resources that were created after the specified date and time, as defined by `RFC3339`__.
- Using TimeCreatedGreaterThanOrEqualToQueryParam parameter retrieves all resources created after that date.
-
- **Example:** 2016-12-19T16:39:57.600Z
-
- __ https://tools.ietf.org/html/rfc3339
-
- :param datetime time_created_less_than: (optional)
- Search for resources that were created before a specific date.
- Specifying this parameter corresponding `timeCreatedLessThan`
- parameter will retrieve all resources created before the
- specified created date, in \"YYYY-MM-ddThh:mmZ\" format with a Z offset, as
- defined by RFC 3339.
+ The field used for sorting. Only one sorting order (sortOrder) can be specified.
+ The default order for TIMECREATED is descending. The default order for DISPLAYNAME is ascending.
+ The DISPLAYNAME sort order is case sensitive.
- **Example:** 2016-12-19T16:39:57.600Z
+ Allowed values are: "TIMECREATED", "DISPLAYNAME"
:param str opc_request_id: (optional)
Unique identifier for the request.
- :param int limit: (optional)
- For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
-
- __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
-
- :param str page: (optional)
- For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__.
-
- __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
-
- :param str lifecycle_state: (optional)
- A filter to return only resources that match the specified lifecycle state.
-
- Allowed values are: "CREATING", "SUCCEEDED", "UPDATING", "DELETING", "DELETED", "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.
@@ -22012,18 +24857,18 @@ def list_security_assessments(self, compartment_id, **kwargs):
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.data_safe.models.SecurityAssessmentSummary`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.SecurityPolicyReportCollection`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use list_security_assessments API.
+ Click `here `__ to see an example of how to use list_security_policy_reports API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
required_arguments = ['compartmentId']
- resource_path = "/securityAssessments"
+ resource_path = "/securityPolicyReports"
method = "GET"
- operation_name = "list_security_assessments"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SecurityAssessmentSummary/ListSecurityAssessments"
+ operation_name = "list_security_policy_reports"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SecurityPolicyReportCollection/ListSecurityPolicyReports"
# Don't accept unknown kwargs
expected_kwargs = [
@@ -22032,25 +24877,19 @@ def list_security_assessments(self, compartment_id, **kwargs):
"compartment_id_in_subtree",
"access_level",
"display_name",
- "type",
- "schedule_assessment_id",
- "is_schedule_assessment",
- "triggered_by",
+ "limit",
+ "page",
+ "lifecycle_state",
+ "security_policy_report_id",
"target_id",
"sort_order",
- "is_baseline",
"sort_by",
- "time_created_greater_than_or_equal_to",
- "time_created_less_than",
- "opc_request_id",
- "limit",
- "page",
- "lifecycle_state"
+ "opc_request_id"
]
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"list_security_assessments got unknown kwargs: {extra_kwargs!r}")
+ f"list_security_policy_reports got unknown kwargs: {extra_kwargs!r}")
if 'access_level' in kwargs:
access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"]
@@ -22059,18 +24898,11 @@ def list_security_assessments(self, compartment_id, **kwargs):
f"Invalid value for `access_level`, must be one of { access_level_allowed_values }"
)
- if 'type' in kwargs:
- type_allowed_values = ["LATEST", "SAVED", "SAVE_SCHEDULE", "COMPARTMENT"]
- if kwargs['type'] not in type_allowed_values:
- raise ValueError(
- f"Invalid value for `type`, must be one of { type_allowed_values }"
- )
-
- if 'triggered_by' in kwargs:
- triggered_by_allowed_values = ["USER", "SYSTEM"]
- if kwargs['triggered_by'] not in triggered_by_allowed_values:
+ if 'lifecycle_state' in kwargs:
+ lifecycle_state_allowed_values = ["CREATING", "SUCCEEDED", "UPDATING", "DELETING", "DELETED", "FAILED", "NEEDS_ATTENTION"]
+ if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values:
raise ValueError(
- f"Invalid value for `triggered_by`, must be one of { triggered_by_allowed_values }"
+ f"Invalid value for `lifecycle_state`, must be one of { lifecycle_state_allowed_values }"
)
if 'sort_order' in kwargs:
@@ -22081,37 +24913,24 @@ def list_security_assessments(self, compartment_id, **kwargs):
)
if 'sort_by' in kwargs:
- sort_by_allowed_values = ["timeCreated", "displayName"]
+ sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"]
if kwargs['sort_by'] not in sort_by_allowed_values:
raise ValueError(
f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
)
- if 'lifecycle_state' in kwargs:
- lifecycle_state_allowed_values = ["CREATING", "SUCCEEDED", "UPDATING", "DELETING", "DELETED", "FAILED"]
- if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values:
- raise ValueError(
- f"Invalid value for `lifecycle_state`, must be one of { lifecycle_state_allowed_values }"
- )
-
query_params = {
"compartmentId": compartment_id,
"compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing),
"accessLevel": kwargs.get("access_level", missing),
"displayName": kwargs.get("display_name", missing),
- "type": kwargs.get("type", missing),
- "scheduleAssessmentId": kwargs.get("schedule_assessment_id", missing),
- "isScheduleAssessment": kwargs.get("is_schedule_assessment", missing),
- "triggeredBy": kwargs.get("triggered_by", missing),
- "targetId": kwargs.get("target_id", missing),
- "sortOrder": kwargs.get("sort_order", missing),
- "isBaseline": kwargs.get("is_baseline", missing),
- "sortBy": kwargs.get("sort_by", missing),
- "timeCreatedGreaterThanOrEqualTo": kwargs.get("time_created_greater_than_or_equal_to", missing),
- "timeCreatedLessThan": kwargs.get("time_created_less_than", missing),
"limit": kwargs.get("limit", missing),
"page": kwargs.get("page", missing),
- "lifecycleState": kwargs.get("lifecycle_state", missing)
+ "lifecycleState": kwargs.get("lifecycle_state", missing),
+ "securityPolicyReportId": kwargs.get("security_policy_report_id", missing),
+ "targetId": kwargs.get("target_id", missing),
+ "sortOrder": kwargs.get("sort_order", missing),
+ "sortBy": kwargs.get("sort_by", missing)
}
query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
@@ -22139,7 +24958,7 @@ def list_security_assessments(self, compartment_id, **kwargs):
method=method,
query_params=query_params,
header_params=header_params,
- response_type="list[SecurityAssessmentSummary]",
+ response_type="SecurityPolicyReportCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -22150,47 +24969,95 @@ def list_security_assessments(self, compartment_id, **kwargs):
method=method,
query_params=query_params,
header_params=header_params,
- response_type="list[SecurityAssessmentSummary]",
+ response_type="SecurityPolicyReportCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def list_security_policies(self, compartment_id, **kwargs):
+ def list_sensitive_columns(self, sensitive_data_model_id, **kwargs):
"""
- Retrieves a list of all security policies in Data Safe.
+ Gets a list of sensitive columns present in the specified sensitive data model based on the specified query parameters.
- The ListSecurityPolicies operation returns only the security policies in the specified `compartmentId`.
- The parameter `accessLevel` specifies whether to return only those compartments for which the
- requestor has INSPECT permissions on at least one resource directly
- or indirectly (ACCESSIBLE) (the resource can be in a subcompartment) or to return Not Authorized if
- Principal doesn't have access to even one of the child compartments. This is valid only when
- `compartmentIdInSubtree` is set to `true`.
+ :param str sensitive_data_model_id: (required)
+ The OCID of the sensitive data model.
- The parameter `compartmentIdInSubtree` applies when you perform ListSecurityPolicies on the
- `compartmentId` passed and when it is set to true, the entire hierarchy of compartments can be returned.
- To get a full list of all compartments and subcompartments in the tenancy (root compartment),
- set the parameter `compartmentIdInSubtree` to true and `accessLevel` to ACCESSIBLE.
+ :param datetime time_created_greater_than_or_equal_to: (optional)
+ A filter to return only the resources that were created after the specified date and time, as defined by `RFC3339`__.
+ Using TimeCreatedGreaterThanOrEqualToQueryParam parameter retrieves all resources created after that date.
+ **Example:** 2016-12-19T16:39:57.600Z
- :param str compartment_id: (required)
- A filter to return only resources that match the specified compartment OCID.
+ __ https://tools.ietf.org/html/rfc3339
- :param bool compartment_id_in_subtree: (optional)
- Default is false.
- When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting.
+ :param datetime time_created_less_than: (optional)
+ Search for resources that were created before a specific date.
+ Specifying this parameter corresponding `timeCreatedLessThan`
+ parameter will retrieve all resources created before the
+ specified created date, in \"YYYY-MM-ddThh:mmZ\" format with a Z offset, as
+ defined by RFC 3339.
- :param str access_level: (optional)
- Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED.
- Setting this to ACCESSIBLE returns only those compartments for which the
- user has INSPECT permissions directly or indirectly (permissions can be on a
- resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed.
+ **Example:** 2016-12-19T16:39:57.600Z
+
+ :param datetime time_updated_greater_than_or_equal_to: (optional)
+ Search for resources that were updated after a specific date.
+ Specifying this parameter corresponding `timeUpdatedGreaterThanOrEqualTo`
+ parameter will retrieve all resources updated after the
+ specified created date, in \"YYYY-MM-ddThh:mmZ\" format with a Z offset, as
+ defined by RFC 3339.
+
+ :param datetime time_updated_less_than: (optional)
+ Search for resources that were updated before a specific date.
+ Specifying this parameter corresponding `timeUpdatedLessThan`
+ parameter will retrieve all resources updated before the
+ specified created date, in \"YYYY-MM-ddThh:mmZ\" format with a Z offset, as
+ defined by RFC 3339.
+
+ :param str sensitive_column_lifecycle_state: (optional)
+ Filters the sensitive column resources with the given lifecycle state values.
+
+ Allowed values are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "FAILED"
+
+ :param list[str] schema_name: (optional)
+ A filter to return only items related to specific schema name.
+
+ :param list[str] object_name: (optional)
+ A filter to return only items related to a specific object name.
+
+ :param list[str] column_name: (optional)
+ A filter to return only a specific column based on column name.
+
+ :param list[str] object_type: (optional)
+ A filter to return only items related to a specific object type.
+
+ Allowed values are: "ALL", "TABLE", "EDITIONING_VIEW"
+
+ :param list[str] data_type: (optional)
+ A filter to return only the resources that match the specified data types.
+
+ :param list[str] status: (optional)
+ A filter to return only the sensitive columns that match the specified status.
+
+ Allowed values are: "VALID", "INVALID"
+
+ :param list[str] sensitive_type_id: (optional)
+ A filter to return only the sensitive columns that are associated with one of the sensitive types identified by the specified OCIDs.
+
+ :param list[str] parent_column_key: (optional)
+ A filter to return only the sensitive columns that are children of one of the columns identified by the specified keys.
+
+ :param list[str] relation_type: (optional)
+ A filter to return sensitive columns based on their relationship with their parent columns. If set to NONE,
+ it returns the sensitive columns that do not have any parent. The response includes the parent columns as
+ well as the independent columns that are not in any relationship. If set to APP_DEFINED, it returns all the
+ child columns that have application-level (non-dictionary) relationship with their parents. If set to DB_DEFINED,
+ it returns all the child columns that have database-level (dictionary-defined) relationship with their parents.
- Allowed values are: "RESTRICTED", "ACCESSIBLE"
+ Allowed values are: "NONE", "APP_DEFINED", "DB_DEFINED"
- :param str display_name: (optional)
- A filter to return only resources that match the specified display name.
+ :param str column_group: (optional)
+ A filter to return only the sensitive columns that belong to the specified column group.
:param int limit: (optional)
For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
@@ -22202,29 +25069,24 @@ def list_security_policies(self, compartment_id, **kwargs):
__ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
- :param str lifecycle_state: (optional)
- The current state of the security policy.
-
- Allowed values are: "CREATING", "UPDATING", "ACTIVE", "FAILED", "DELETING", "DELETED"
-
- :param str security_policy_id: (optional)
- An optional filter to return only resources that match the specified OCID of the security policy resource.
-
:param str sort_order: (optional)
The sort order to use, either ascending (ASC) or descending (DESC).
Allowed values are: "ASC", "DESC"
:param str sort_by: (optional)
- The field used for sorting. Only one sorting order (sortOrder) can be specified.
- The default order for TIMECREATED is descending. The default order for DISPLAYNAME is ascending.
- The DISPLAYNAME sort order is case sensitive.
+ The field to sort by. You can specify only one sorting parameter (sortOrder). The default order for timeCreated is descending.
+ The default order for schemaName, objectName, and columnName is ascending.
- Allowed values are: "TIMECREATED", "DISPLAYNAME"
+ Allowed values are: "timeCreated", "schemaName", "objectName", "columnName", "dataType"
:param str opc_request_id: (optional)
Unique identifier for the request.
+ :param bool is_case_in_sensitive: (optional)
+ A boolean flag indicating whether the search should be case-insensitive.
+ The search is case-sensitive by default. Set this parameter to true to do case-insensitive search.
+
:param obj retry_strategy: (optional)
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
@@ -22237,53 +25099,91 @@ def list_security_policies(self, compartment_id, **kwargs):
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.SecurityPolicyCollection`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.SensitiveColumnCollection`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use list_security_policies API.
+ Click `here `__ to see an example of how to use list_sensitive_columns API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
- required_arguments = ['compartmentId']
- resource_path = "/securityPolicies"
+ required_arguments = ['sensitiveDataModelId']
+ resource_path = "/sensitiveDataModels/{sensitiveDataModelId}/sensitiveColumns"
method = "GET"
- operation_name = "list_security_policies"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SecurityPolicyCollection/ListSecurityPolicies"
+ operation_name = "list_sensitive_columns"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SensitiveColumn/ListSensitiveColumns"
# Don't accept unknown kwargs
expected_kwargs = [
"allow_control_chars",
"retry_strategy",
- "compartment_id_in_subtree",
- "access_level",
- "display_name",
+ "time_created_greater_than_or_equal_to",
+ "time_created_less_than",
+ "time_updated_greater_than_or_equal_to",
+ "time_updated_less_than",
+ "sensitive_column_lifecycle_state",
+ "schema_name",
+ "object_name",
+ "column_name",
+ "object_type",
+ "data_type",
+ "status",
+ "sensitive_type_id",
+ "parent_column_key",
+ "relation_type",
+ "column_group",
"limit",
"page",
- "lifecycle_state",
- "security_policy_id",
"sort_order",
"sort_by",
- "opc_request_id"
+ "opc_request_id",
+ "is_case_in_sensitive"
]
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"list_security_policies got unknown kwargs: {extra_kwargs!r}")
+ f"list_sensitive_columns got unknown kwargs: {extra_kwargs!r}")
- if 'access_level' in kwargs:
- access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"]
- if kwargs['access_level'] not in access_level_allowed_values:
- raise ValueError(
- f"Invalid value for `access_level`, must be one of { access_level_allowed_values }"
- )
+ path_params = {
+ "sensitiveDataModelId": sensitive_data_model_id
+ }
- if 'lifecycle_state' in kwargs:
- lifecycle_state_allowed_values = ["CREATING", "UPDATING", "ACTIVE", "FAILED", "DELETING", "DELETED"]
- if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values:
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
+
+ for (k, v) in six.iteritems(path_params):
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
+ raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
+
+ if 'sensitive_column_lifecycle_state' in kwargs:
+ sensitive_column_lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "UPDATING", "DELETING", "FAILED"]
+ if kwargs['sensitive_column_lifecycle_state'] not in sensitive_column_lifecycle_state_allowed_values:
raise ValueError(
- f"Invalid value for `lifecycle_state`, must be one of { lifecycle_state_allowed_values }"
+ f"Invalid value for `sensitive_column_lifecycle_state`, must be one of { sensitive_column_lifecycle_state_allowed_values }"
)
+ if 'object_type' in kwargs:
+ object_type_allowed_values = ["ALL", "TABLE", "EDITIONING_VIEW"]
+ for object_type_item in kwargs['object_type']:
+ if object_type_item not in object_type_allowed_values:
+ raise ValueError(
+ f"Invalid value for `object_type`, must be one of { object_type_allowed_values }"
+ )
+
+ if 'status' in kwargs:
+ status_allowed_values = ["VALID", "INVALID"]
+ for status_item in kwargs['status']:
+ if status_item not in status_allowed_values:
+ raise ValueError(
+ f"Invalid value for `status`, must be one of { status_allowed_values }"
+ )
+
+ if 'relation_type' in kwargs:
+ relation_type_allowed_values = ["NONE", "APP_DEFINED", "DB_DEFINED"]
+ for relation_type_item in kwargs['relation_type']:
+ if relation_type_item not in relation_type_allowed_values:
+ raise ValueError(
+ f"Invalid value for `relation_type`, must be one of { relation_type_allowed_values }"
+ )
+
if 'sort_order' in kwargs:
sort_order_allowed_values = ["ASC", "DESC"]
if kwargs['sort_order'] not in sort_order_allowed_values:
@@ -22292,23 +25192,33 @@ def list_security_policies(self, compartment_id, **kwargs):
)
if 'sort_by' in kwargs:
- sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"]
+ sort_by_allowed_values = ["timeCreated", "schemaName", "objectName", "columnName", "dataType"]
if kwargs['sort_by'] not in sort_by_allowed_values:
raise ValueError(
f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
)
query_params = {
- "compartmentId": compartment_id,
- "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing),
- "accessLevel": kwargs.get("access_level", missing),
- "displayName": kwargs.get("display_name", missing),
+ "timeCreatedGreaterThanOrEqualTo": kwargs.get("time_created_greater_than_or_equal_to", missing),
+ "timeCreatedLessThan": kwargs.get("time_created_less_than", missing),
+ "timeUpdatedGreaterThanOrEqualTo": kwargs.get("time_updated_greater_than_or_equal_to", missing),
+ "timeUpdatedLessThan": kwargs.get("time_updated_less_than", missing),
+ "sensitiveColumnLifecycleState": kwargs.get("sensitive_column_lifecycle_state", missing),
+ "schemaName": self.base_client.generate_collection_format_param(kwargs.get("schema_name", missing), 'multi'),
+ "objectName": self.base_client.generate_collection_format_param(kwargs.get("object_name", missing), 'multi'),
+ "columnName": self.base_client.generate_collection_format_param(kwargs.get("column_name", missing), 'multi'),
+ "objectType": self.base_client.generate_collection_format_param(kwargs.get("object_type", missing), 'multi'),
+ "dataType": self.base_client.generate_collection_format_param(kwargs.get("data_type", missing), 'multi'),
+ "status": self.base_client.generate_collection_format_param(kwargs.get("status", missing), 'multi'),
+ "sensitiveTypeId": self.base_client.generate_collection_format_param(kwargs.get("sensitive_type_id", missing), 'multi'),
+ "parentColumnKey": self.base_client.generate_collection_format_param(kwargs.get("parent_column_key", missing), 'multi'),
+ "relationType": self.base_client.generate_collection_format_param(kwargs.get("relation_type", missing), 'multi'),
+ "columnGroup": kwargs.get("column_group", missing),
"limit": kwargs.get("limit", missing),
"page": kwargs.get("page", missing),
- "lifecycleState": kwargs.get("lifecycle_state", missing),
- "securityPolicyId": kwargs.get("security_policy_id", missing),
"sortOrder": kwargs.get("sort_order", missing),
- "sortBy": kwargs.get("sort_by", missing)
+ "sortBy": kwargs.get("sort_by", missing),
+ "isCaseInSensitive": kwargs.get("is_case_in_sensitive", missing)
}
query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
@@ -22334,9 +25244,10 @@ def list_security_policies(self, compartment_id, **kwargs):
self.base_client.call_api,
resource_path=resource_path,
method=method,
+ path_params=path_params,
query_params=query_params,
header_params=header_params,
- response_type="SecurityPolicyCollection",
+ response_type="SensitiveColumnCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -22345,30 +25256,18 @@ def list_security_policies(self, compartment_id, **kwargs):
return self.base_client.call_api(
resource_path=resource_path,
method=method,
+ path_params=path_params,
query_params=query_params,
header_params=header_params,
- response_type="SecurityPolicyCollection",
+ response_type="SensitiveColumnCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def list_security_policy_deployments(self, compartment_id, **kwargs):
+ def list_sensitive_data_models(self, compartment_id, **kwargs):
"""
- Retrieves a list of all security policy deployments in Data Safe.
-
- The ListSecurityPolicyDeployments operation returns only the security policy deployments in the specified `compartmentId`.
-
- The parameter `accessLevel` specifies whether to return only those compartments for which the
- requestor has INSPECT permissions on at least one resource directly
- or indirectly (ACCESSIBLE) (the resource can be in a subcompartment) or to return Not Authorized if
- Principal doesn't have access to even one of the child compartments. This is valid only when
- `compartmentIdInSubtree` is set to `true`.
-
- The parameter `compartmentIdInSubtree` applies when you perform ListSecurityPolicyDeployments on the
- `compartmentId` passed and when it is set to true, the entire hierarchy of compartments can be returned.
- To get a full list of all compartments and subcompartments in the tenancy (root compartment),
- set the parameter `compartmentIdInSubtree` to true and `accessLevel` to ACCESSIBLE.
+ Gets a list of sensitive data models based on the specified query parameters.
:param str compartment_id: (required)
@@ -22389,45 +25288,58 @@ def list_security_policy_deployments(self, compartment_id, **kwargs):
:param str display_name: (optional)
A filter to return only resources that match the specified display name.
- :param int limit: (optional)
- For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
-
- __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
+ :param str sensitive_data_model_id: (optional)
+ A filter to return only the resources that match the specified sensitive data model OCID.
- :param str page: (optional)
- For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__.
+ :param datetime time_created_greater_than_or_equal_to: (optional)
+ A filter to return only the resources that were created after the specified date and time, as defined by `RFC3339`__.
+ Using TimeCreatedGreaterThanOrEqualToQueryParam parameter retrieves all resources created after that date.
- __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
+ **Example:** 2016-12-19T16:39:57.600Z
- :param str lifecycle_state: (optional)
- The current state of the security policy deployment.
+ __ https://tools.ietf.org/html/rfc3339
- Allowed values are: "CREATING", "UPDATING", "DEPLOYED", "NEEDS_ATTENTION", "FAILED", "DELETING", "DELETED"
+ :param datetime time_created_less_than: (optional)
+ Search for resources that were created before a specific date.
+ Specifying this parameter corresponding `timeCreatedLessThan`
+ parameter will retrieve all resources created before the
+ specified created date, in \"YYYY-MM-ddThh:mmZ\" format with a Z offset, as
+ defined by RFC 3339.
- :param str security_policy_deployment_id: (optional)
- An optional filter to return only resources that match the specified OCID of the security policy deployment resource.
+ **Example:** 2016-12-19T16:39:57.600Z
:param str target_id: (optional)
A filter to return only items related to a specific target OCID.
- :param str security_policy_id: (optional)
- An optional filter to return only resources that match the specified OCID of the security policy resource.
-
:param str sort_order: (optional)
The sort order to use, either ascending (ASC) or descending (DESC).
Allowed values are: "ASC", "DESC"
:param str sort_by: (optional)
- The field used for sorting. Only one sorting order (sortOrder) can be specified.
- The default order for TIMECREATED is descending. The default order for DISPLAYNAME is ascending.
- The DISPLAYNAME sort order is case sensitive.
+ The field to sort by. You can specify only one sorting parameter (sortOrder). The default order for timeCreated is descending.
+ The default order for displayName is ascending.
- Allowed values are: "TIMECREATED", "DISPLAYNAME"
+ Allowed values are: "timeCreated", "displayName"
:param str opc_request_id: (optional)
Unique identifier for the request.
+ :param int limit: (optional)
+ For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
+
+ __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
+
+ :param str page: (optional)
+ For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__.
+
+ __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
+
+ :param str lifecycle_state: (optional)
+ A filter to return only the resources that match the specified lifecycle state.
+
+ Allowed values are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "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.
@@ -22440,18 +25352,18 @@ def list_security_policy_deployments(self, compartment_id, **kwargs):
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.SecurityPolicyDeploymentCollection`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.SensitiveDataModelCollection`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use list_security_policy_deployments API.
+ Click `here `__ to see an example of how to use list_sensitive_data_models API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
required_arguments = ['compartmentId']
- resource_path = "/securityPolicyDeployments"
+ resource_path = "/sensitiveDataModels"
method = "GET"
- operation_name = "list_security_policy_deployments"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SecurityPolicyDeploymentCollection/ListSecurityPolicyDeployments"
+ operation_name = "list_sensitive_data_models"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SensitiveDataModel/ListSensitiveDataModels"
# Don't accept unknown kwargs
expected_kwargs = [
@@ -22460,20 +25372,21 @@ def list_security_policy_deployments(self, compartment_id, **kwargs):
"compartment_id_in_subtree",
"access_level",
"display_name",
- "limit",
- "page",
- "lifecycle_state",
- "security_policy_deployment_id",
+ "sensitive_data_model_id",
+ "time_created_greater_than_or_equal_to",
+ "time_created_less_than",
"target_id",
- "security_policy_id",
"sort_order",
"sort_by",
- "opc_request_id"
+ "opc_request_id",
+ "limit",
+ "page",
+ "lifecycle_state"
]
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"list_security_policy_deployments got unknown kwargs: {extra_kwargs!r}")
+ f"list_sensitive_data_models got unknown kwargs: {extra_kwargs!r}")
if 'access_level' in kwargs:
access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"]
@@ -22482,13 +25395,6 @@ def list_security_policy_deployments(self, compartment_id, **kwargs):
f"Invalid value for `access_level`, must be one of { access_level_allowed_values }"
)
- if 'lifecycle_state' in kwargs:
- lifecycle_state_allowed_values = ["CREATING", "UPDATING", "DEPLOYED", "NEEDS_ATTENTION", "FAILED", "DELETING", "DELETED"]
- if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values:
- raise ValueError(
- f"Invalid value for `lifecycle_state`, must be one of { lifecycle_state_allowed_values }"
- )
-
if 'sort_order' in kwargs:
sort_order_allowed_values = ["ASC", "DESC"]
if kwargs['sort_order'] not in sort_order_allowed_values:
@@ -22497,25 +25403,33 @@ def list_security_policy_deployments(self, compartment_id, **kwargs):
)
if 'sort_by' in kwargs:
- sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"]
+ sort_by_allowed_values = ["timeCreated", "displayName"]
if kwargs['sort_by'] not in sort_by_allowed_values:
raise ValueError(
f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
)
+ if 'lifecycle_state' in kwargs:
+ lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED"]
+ if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values:
+ raise ValueError(
+ f"Invalid value for `lifecycle_state`, must be one of { lifecycle_state_allowed_values }"
+ )
+
query_params = {
"compartmentId": compartment_id,
"compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing),
"accessLevel": kwargs.get("access_level", missing),
"displayName": kwargs.get("display_name", missing),
- "limit": kwargs.get("limit", missing),
- "page": kwargs.get("page", missing),
- "lifecycleState": kwargs.get("lifecycle_state", missing),
- "securityPolicyDeploymentId": kwargs.get("security_policy_deployment_id", missing),
+ "sensitiveDataModelId": kwargs.get("sensitive_data_model_id", missing),
+ "timeCreatedGreaterThanOrEqualTo": kwargs.get("time_created_greater_than_or_equal_to", missing),
+ "timeCreatedLessThan": kwargs.get("time_created_less_than", missing),
"targetId": kwargs.get("target_id", missing),
- "securityPolicyId": kwargs.get("security_policy_id", missing),
"sortOrder": kwargs.get("sort_order", missing),
- "sortBy": kwargs.get("sort_by", missing)
+ "sortBy": kwargs.get("sort_by", missing),
+ "limit": kwargs.get("limit", missing),
+ "page": kwargs.get("page", 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}
@@ -22543,7 +25457,7 @@ def list_security_policy_deployments(self, compartment_id, **kwargs):
method=method,
query_params=query_params,
header_params=header_params,
- response_type="SecurityPolicyDeploymentCollection",
+ response_type="SensitiveDataModelCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -22554,21 +25468,30 @@ def list_security_policy_deployments(self, compartment_id, **kwargs):
method=method,
query_params=query_params,
header_params=header_params,
- response_type="SecurityPolicyDeploymentCollection",
+ response_type="SensitiveDataModelCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def list_security_policy_entry_states(self, security_policy_deployment_id, **kwargs):
+ def list_sensitive_objects(self, sensitive_data_model_id, **kwargs):
"""
- Retrieves a list of all security policy entry states in Data Safe.
+ Gets a list of sensitive objects present in the specified sensitive data model based on the specified query parameters.
- The ListSecurityPolicyEntryStates operation returns only the security policy entry states for the specified security policy entry.
+ :param str sensitive_data_model_id: (required)
+ The OCID of the sensitive data model.
+
+ :param list[str] schema_name: (optional)
+ A filter to return only items related to specific schema name.
- :param str security_policy_deployment_id: (required)
- The OCID of the security policy deployment resource.
+ :param list[str] object_name: (optional)
+ A filter to return only items related to a specific object name.
+
+ :param list[str] object_type: (optional)
+ A filter to return only items related to a specific object type.
+
+ Allowed values are: "ALL", "TABLE", "EDITIONING_VIEW"
:param int limit: (optional)
For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
@@ -22580,13 +25503,16 @@ def list_security_policy_entry_states(self, security_policy_deployment_id, **kwa
__ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
- :param str deployment_status: (optional)
- The current state of the security policy deployment.
+ :param str sort_order: (optional)
+ The sort order to use, either ascending (ASC) or descending (DESC).
- Allowed values are: "CREATED", "MODIFIED", "CONFLICT", "UNAUTHORIZED", "DELETED"
+ Allowed values are: "ASC", "DESC"
- :param str security_policy_entry_id: (optional)
- An optional filter to return only resources that match the specified security policy entry OCID.
+ :param str sort_by: (optional)
+ The field to sort by. You can specify only one sorting parameter (sortOrder).
+ The default order is ascending.
+
+ Allowed values are: "schemaName", "objectName", "objectType"
:param str opc_request_id: (optional)
Unique identifier for the request.
@@ -22603,36 +25529,39 @@ def list_security_policy_entry_states(self, security_policy_deployment_id, **kwa
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.SecurityPolicyEntryStateCollection`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.SensitiveObjectCollection`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use list_security_policy_entry_states API.
+ Click `here `__ to see an example of how to use list_sensitive_objects API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
- required_arguments = ['securityPolicyDeploymentId']
- resource_path = "/securityPolicyDeployments/{securityPolicyDeploymentId}/securityPolicyEntryStates"
+ required_arguments = ['sensitiveDataModelId']
+ resource_path = "/sensitiveDataModels/{sensitiveDataModelId}/sensitiveObjects"
method = "GET"
- operation_name = "list_security_policy_entry_states"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SecurityPolicyEntryStateCollection/ListSecurityPolicyEntryStates"
+ operation_name = "list_sensitive_objects"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SensitiveObjectCollection/ListSensitiveObjects"
# Don't accept unknown kwargs
expected_kwargs = [
"allow_control_chars",
"retry_strategy",
+ "schema_name",
+ "object_name",
+ "object_type",
"limit",
"page",
- "deployment_status",
- "security_policy_entry_id",
+ "sort_order",
+ "sort_by",
"opc_request_id"
]
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"list_security_policy_entry_states got unknown kwargs: {extra_kwargs!r}")
+ f"list_sensitive_objects got unknown kwargs: {extra_kwargs!r}")
path_params = {
- "securityPolicyDeploymentId": security_policy_deployment_id
+ "sensitiveDataModelId": sensitive_data_model_id
}
path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
@@ -22641,18 +25570,36 @@ def list_security_policy_entry_states(self, security_policy_deployment_id, **kwa
if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
- if 'deployment_status' in kwargs:
- deployment_status_allowed_values = ["CREATED", "MODIFIED", "CONFLICT", "UNAUTHORIZED", "DELETED"]
- if kwargs['deployment_status'] not in deployment_status_allowed_values:
+ if 'object_type' in kwargs:
+ object_type_allowed_values = ["ALL", "TABLE", "EDITIONING_VIEW"]
+ for object_type_item in kwargs['object_type']:
+ if object_type_item not in object_type_allowed_values:
+ raise ValueError(
+ f"Invalid value for `object_type`, must be one of { object_type_allowed_values }"
+ )
+
+ if 'sort_order' in kwargs:
+ sort_order_allowed_values = ["ASC", "DESC"]
+ if kwargs['sort_order'] not in sort_order_allowed_values:
raise ValueError(
- f"Invalid value for `deployment_status`, must be one of { deployment_status_allowed_values }"
+ f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }"
+ )
+
+ if 'sort_by' in kwargs:
+ sort_by_allowed_values = ["schemaName", "objectName", "objectType"]
+ if kwargs['sort_by'] not in sort_by_allowed_values:
+ raise ValueError(
+ f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
)
query_params = {
+ "schemaName": self.base_client.generate_collection_format_param(kwargs.get("schema_name", missing), 'multi'),
+ "objectName": self.base_client.generate_collection_format_param(kwargs.get("object_name", missing), 'multi'),
+ "objectType": self.base_client.generate_collection_format_param(kwargs.get("object_type", missing), 'multi'),
"limit": kwargs.get("limit", missing),
"page": kwargs.get("page", missing),
- "deploymentStatus": kwargs.get("deployment_status", missing),
- "securityPolicyEntryId": kwargs.get("security_policy_entry_id", missing)
+ "sortOrder": kwargs.get("sort_order", missing),
+ "sortBy": kwargs.get("sort_by", missing)
}
query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
@@ -22681,7 +25628,7 @@ def list_security_policy_entry_states(self, security_policy_deployment_id, **kwa
path_params=path_params,
query_params=query_params,
header_params=header_params,
- response_type="SecurityPolicyEntryStateCollection",
+ response_type="SensitiveObjectCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -22693,96 +25640,23 @@ def list_security_policy_entry_states(self, security_policy_deployment_id, **kwa
path_params=path_params,
query_params=query_params,
header_params=header_params,
- response_type="SecurityPolicyEntryStateCollection",
+ response_type="SensitiveObjectCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def list_sensitive_columns(self, sensitive_data_model_id, **kwargs):
+ def list_sensitive_schemas(self, sensitive_data_model_id, **kwargs):
"""
- Gets a list of sensitive columns present in the specified sensitive data model based on the specified query parameters.
+ Gets a list of sensitive schemas present in the specified sensitive data model based on the specified query parameters.
:param str sensitive_data_model_id: (required)
The OCID of the sensitive data model.
- :param datetime time_created_greater_than_or_equal_to: (optional)
- A filter to return only the resources that were created after the specified date and time, as defined by `RFC3339`__.
- Using TimeCreatedGreaterThanOrEqualToQueryParam parameter retrieves all resources created after that date.
-
- **Example:** 2016-12-19T16:39:57.600Z
-
- __ https://tools.ietf.org/html/rfc3339
-
- :param datetime time_created_less_than: (optional)
- Search for resources that were created before a specific date.
- Specifying this parameter corresponding `timeCreatedLessThan`
- parameter will retrieve all resources created before the
- specified created date, in \"YYYY-MM-ddThh:mmZ\" format with a Z offset, as
- defined by RFC 3339.
-
- **Example:** 2016-12-19T16:39:57.600Z
-
- :param datetime time_updated_greater_than_or_equal_to: (optional)
- Search for resources that were updated after a specific date.
- Specifying this parameter corresponding `timeUpdatedGreaterThanOrEqualTo`
- parameter will retrieve all resources updated after the
- specified created date, in \"YYYY-MM-ddThh:mmZ\" format with a Z offset, as
- defined by RFC 3339.
-
- :param datetime time_updated_less_than: (optional)
- Search for resources that were updated before a specific date.
- Specifying this parameter corresponding `timeUpdatedLessThan`
- parameter will retrieve all resources updated before the
- specified created date, in \"YYYY-MM-ddThh:mmZ\" format with a Z offset, as
- defined by RFC 3339.
-
- :param str sensitive_column_lifecycle_state: (optional)
- Filters the sensitive column resources with the given lifecycle state values.
-
- Allowed values are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "FAILED"
-
:param list[str] schema_name: (optional)
A filter to return only items related to specific schema name.
- :param list[str] object_name: (optional)
- A filter to return only items related to a specific object name.
-
- :param list[str] column_name: (optional)
- A filter to return only a specific column based on column name.
-
- :param list[str] object_type: (optional)
- A filter to return only items related to a specific object type.
-
- Allowed values are: "ALL", "TABLE", "EDITIONING_VIEW"
-
- :param list[str] data_type: (optional)
- A filter to return only the resources that match the specified data types.
-
- :param list[str] status: (optional)
- A filter to return only the sensitive columns that match the specified status.
-
- Allowed values are: "VALID", "INVALID"
-
- :param list[str] sensitive_type_id: (optional)
- A filter to return only the sensitive columns that are associated with one of the sensitive types identified by the specified OCIDs.
-
- :param list[str] parent_column_key: (optional)
- A filter to return only the sensitive columns that are children of one of the columns identified by the specified keys.
-
- :param list[str] relation_type: (optional)
- A filter to return sensitive columns based on their relationship with their parent columns. If set to NONE,
- it returns the sensitive columns that do not have any parent. The response includes the parent columns as
- well as the independent columns that are not in any relationship. If set to APP_DEFINED, it returns all the
- child columns that have application-level (non-dictionary) relationship with their parents. If set to DB_DEFINED,
- it returns all the child columns that have database-level (dictionary-defined) relationship with their parents.
-
- Allowed values are: "NONE", "APP_DEFINED", "DB_DEFINED"
-
- :param str column_group: (optional)
- A filter to return only the sensitive columns that belong to the specified column group.
-
:param int limit: (optional)
For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
@@ -22799,18 +25673,14 @@ def list_sensitive_columns(self, sensitive_data_model_id, **kwargs):
Allowed values are: "ASC", "DESC"
:param str sort_by: (optional)
- The field to sort by. You can specify only one sorting parameter (sortOrder). The default order for timeCreated is descending.
- The default order for schemaName, objectName, and columnName is ascending.
+ The field to sort by. You can specify only one sorting parameter (sortOrder).
+ The default order is ascending.
- Allowed values are: "timeCreated", "schemaName", "objectName", "columnName", "dataType"
+ Allowed values are: "schemaName"
:param str opc_request_id: (optional)
Unique identifier for the request.
- :param bool is_case_in_sensitive: (optional)
- A boolean flag indicating whether the search should be case-insensitive.
- The search is case-sensitive by default. Set this parameter to true to do case-insensitive search.
-
:param obj retry_strategy: (optional)
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
@@ -22823,49 +25693,34 @@ def list_sensitive_columns(self, sensitive_data_model_id, **kwargs):
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.SensitiveColumnCollection`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.SensitiveSchemaCollection`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use list_sensitive_columns API.
+ Click `here `__ to see an example of how to use list_sensitive_schemas API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
required_arguments = ['sensitiveDataModelId']
- resource_path = "/sensitiveDataModels/{sensitiveDataModelId}/sensitiveColumns"
+ resource_path = "/sensitiveDataModels/{sensitiveDataModelId}/sensitiveSchemas"
method = "GET"
- operation_name = "list_sensitive_columns"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SensitiveColumn/ListSensitiveColumns"
+ operation_name = "list_sensitive_schemas"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SensitiveSchemaCollection/ListSensitiveSchemas"
# Don't accept unknown kwargs
expected_kwargs = [
"allow_control_chars",
"retry_strategy",
- "time_created_greater_than_or_equal_to",
- "time_created_less_than",
- "time_updated_greater_than_or_equal_to",
- "time_updated_less_than",
- "sensitive_column_lifecycle_state",
"schema_name",
- "object_name",
- "column_name",
- "object_type",
- "data_type",
- "status",
- "sensitive_type_id",
- "parent_column_key",
- "relation_type",
- "column_group",
"limit",
"page",
"sort_order",
"sort_by",
- "opc_request_id",
- "is_case_in_sensitive"
+ "opc_request_id"
]
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"list_sensitive_columns got unknown kwargs: {extra_kwargs!r}")
+ f"list_sensitive_schemas got unknown kwargs: {extra_kwargs!r}")
path_params = {
"sensitiveDataModelId": sensitive_data_model_id
@@ -22873,40 +25728,9 @@ def list_sensitive_columns(self, sensitive_data_model_id, **kwargs):
path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
- for (k, v) in six.iteritems(path_params):
- if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
- raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
-
- if 'sensitive_column_lifecycle_state' in kwargs:
- sensitive_column_lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "UPDATING", "DELETING", "FAILED"]
- if kwargs['sensitive_column_lifecycle_state'] not in sensitive_column_lifecycle_state_allowed_values:
- raise ValueError(
- f"Invalid value for `sensitive_column_lifecycle_state`, must be one of { sensitive_column_lifecycle_state_allowed_values }"
- )
-
- if 'object_type' in kwargs:
- object_type_allowed_values = ["ALL", "TABLE", "EDITIONING_VIEW"]
- for object_type_item in kwargs['object_type']:
- if object_type_item not in object_type_allowed_values:
- raise ValueError(
- f"Invalid value for `object_type`, must be one of { object_type_allowed_values }"
- )
-
- if 'status' in kwargs:
- status_allowed_values = ["VALID", "INVALID"]
- for status_item in kwargs['status']:
- if status_item not in status_allowed_values:
- raise ValueError(
- f"Invalid value for `status`, must be one of { status_allowed_values }"
- )
-
- if 'relation_type' in kwargs:
- relation_type_allowed_values = ["NONE", "APP_DEFINED", "DB_DEFINED"]
- for relation_type_item in kwargs['relation_type']:
- if relation_type_item not in relation_type_allowed_values:
- raise ValueError(
- f"Invalid value for `relation_type`, must be one of { relation_type_allowed_values }"
- )
+ for (k, v) in six.iteritems(path_params):
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
+ raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
if 'sort_order' in kwargs:
sort_order_allowed_values = ["ASC", "DESC"]
@@ -22916,33 +25740,18 @@ def list_sensitive_columns(self, sensitive_data_model_id, **kwargs):
)
if 'sort_by' in kwargs:
- sort_by_allowed_values = ["timeCreated", "schemaName", "objectName", "columnName", "dataType"]
+ sort_by_allowed_values = ["schemaName"]
if kwargs['sort_by'] not in sort_by_allowed_values:
raise ValueError(
f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
)
query_params = {
- "timeCreatedGreaterThanOrEqualTo": kwargs.get("time_created_greater_than_or_equal_to", missing),
- "timeCreatedLessThan": kwargs.get("time_created_less_than", missing),
- "timeUpdatedGreaterThanOrEqualTo": kwargs.get("time_updated_greater_than_or_equal_to", missing),
- "timeUpdatedLessThan": kwargs.get("time_updated_less_than", missing),
- "sensitiveColumnLifecycleState": kwargs.get("sensitive_column_lifecycle_state", missing),
"schemaName": self.base_client.generate_collection_format_param(kwargs.get("schema_name", missing), 'multi'),
- "objectName": self.base_client.generate_collection_format_param(kwargs.get("object_name", missing), 'multi'),
- "columnName": self.base_client.generate_collection_format_param(kwargs.get("column_name", missing), 'multi'),
- "objectType": self.base_client.generate_collection_format_param(kwargs.get("object_type", missing), 'multi'),
- "dataType": self.base_client.generate_collection_format_param(kwargs.get("data_type", missing), 'multi'),
- "status": self.base_client.generate_collection_format_param(kwargs.get("status", missing), 'multi'),
- "sensitiveTypeId": self.base_client.generate_collection_format_param(kwargs.get("sensitive_type_id", missing), 'multi'),
- "parentColumnKey": self.base_client.generate_collection_format_param(kwargs.get("parent_column_key", missing), 'multi'),
- "relationType": self.base_client.generate_collection_format_param(kwargs.get("relation_type", missing), 'multi'),
- "columnGroup": kwargs.get("column_group", missing),
"limit": kwargs.get("limit", missing),
"page": kwargs.get("page", missing),
"sortOrder": kwargs.get("sort_order", missing),
- "sortBy": kwargs.get("sort_by", missing),
- "isCaseInSensitive": kwargs.get("is_case_in_sensitive", missing)
+ "sortBy": kwargs.get("sort_by", missing)
}
query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
@@ -22971,7 +25780,7 @@ def list_sensitive_columns(self, sensitive_data_model_id, **kwargs):
path_params=path_params,
query_params=query_params,
header_params=header_params,
- response_type="SensitiveColumnCollection",
+ response_type="SensitiveSchemaCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -22983,15 +25792,15 @@ def list_sensitive_columns(self, sensitive_data_model_id, **kwargs):
path_params=path_params,
query_params=query_params,
header_params=header_params,
- response_type="SensitiveColumnCollection",
+ response_type="SensitiveSchemaCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def list_sensitive_data_models(self, compartment_id, **kwargs):
+ def list_sensitive_types(self, compartment_id, **kwargs):
"""
- Gets a list of sensitive data models based on the specified query parameters.
+ Gets a list of sensitive types based on the specified query parameters.
:param str compartment_id: (required)
@@ -23012,8 +25821,24 @@ def list_sensitive_data_models(self, compartment_id, **kwargs):
:param str display_name: (optional)
A filter to return only resources that match the specified display name.
- :param str sensitive_data_model_id: (optional)
- A filter to return only the resources that match the specified sensitive data model OCID.
+ :param str sensitive_type_id: (optional)
+ A filter to return only items related to a specific sensitive type OCID.
+
+ :param str sensitive_type_source: (optional)
+ A filter to return the sensitive type resources based on the value of their source attribute.
+
+ Allowed values are: "ORACLE", "USER"
+
+ :param str entity_type: (optional)
+ A filter to return the sensitive type resources based on the value of their entityType attribute.
+
+ Allowed values are: "SENSITIVE_TYPE", "SENSITIVE_CATEGORY"
+
+ :param str parent_category_id: (optional)
+ A filter to return only the sensitive types that are children of the sensitive category identified by the specified OCID.
+
+ :param str default_masking_format_id: (optional)
+ A filter to return only the sensitive types that have the default masking format identified by the specified OCID.
:param datetime time_created_greater_than_or_equal_to: (optional)
A filter to return only the resources that were created after the specified date and time, as defined by `RFC3339`__.
@@ -23032,9 +25857,6 @@ def list_sensitive_data_models(self, compartment_id, **kwargs):
**Example:** 2016-12-19T16:39:57.600Z
- :param str target_id: (optional)
- A filter to return only items related to a specific target OCID.
-
:param str sort_order: (optional)
The sort order to use, either ascending (ASC) or descending (DESC).
@@ -23064,6 +25886,10 @@ def list_sensitive_data_models(self, compartment_id, **kwargs):
Allowed values are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED"
+ :param bool is_common: (optional)
+ A filter to return only the common sensitive type resources. Common sensitive types belong to
+ library sensitive types which are frequently used to perform sensitive data discovery.
+
:param obj retry_strategy: (optional)
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
@@ -23076,18 +25902,18 @@ def list_sensitive_data_models(self, compartment_id, **kwargs):
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.SensitiveDataModelCollection`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.SensitiveTypeCollection`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use list_sensitive_data_models API.
+ Click `here `__ to see an example of how to use list_sensitive_types API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
required_arguments = ['compartmentId']
- resource_path = "/sensitiveDataModels"
+ resource_path = "/sensitiveTypes"
method = "GET"
- operation_name = "list_sensitive_data_models"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SensitiveDataModel/ListSensitiveDataModels"
+ operation_name = "list_sensitive_types"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SensitiveType/ListSensitiveTypes"
# Don't accept unknown kwargs
expected_kwargs = [
@@ -23096,21 +25922,25 @@ def list_sensitive_data_models(self, compartment_id, **kwargs):
"compartment_id_in_subtree",
"access_level",
"display_name",
- "sensitive_data_model_id",
+ "sensitive_type_id",
+ "sensitive_type_source",
+ "entity_type",
+ "parent_category_id",
+ "default_masking_format_id",
"time_created_greater_than_or_equal_to",
"time_created_less_than",
- "target_id",
"sort_order",
"sort_by",
"opc_request_id",
"limit",
"page",
- "lifecycle_state"
+ "lifecycle_state",
+ "is_common"
]
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"list_sensitive_data_models got unknown kwargs: {extra_kwargs!r}")
+ f"list_sensitive_types got unknown kwargs: {extra_kwargs!r}")
if 'access_level' in kwargs:
access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"]
@@ -23119,6 +25949,20 @@ def list_sensitive_data_models(self, compartment_id, **kwargs):
f"Invalid value for `access_level`, must be one of { access_level_allowed_values }"
)
+ if 'sensitive_type_source' in kwargs:
+ sensitive_type_source_allowed_values = ["ORACLE", "USER"]
+ if kwargs['sensitive_type_source'] not in sensitive_type_source_allowed_values:
+ raise ValueError(
+ f"Invalid value for `sensitive_type_source`, must be one of { sensitive_type_source_allowed_values }"
+ )
+
+ if 'entity_type' in kwargs:
+ entity_type_allowed_values = ["SENSITIVE_TYPE", "SENSITIVE_CATEGORY"]
+ if kwargs['entity_type'] not in entity_type_allowed_values:
+ raise ValueError(
+ f"Invalid value for `entity_type`, must be one of { entity_type_allowed_values }"
+ )
+
if 'sort_order' in kwargs:
sort_order_allowed_values = ["ASC", "DESC"]
if kwargs['sort_order'] not in sort_order_allowed_values:
@@ -23145,15 +25989,19 @@ def list_sensitive_data_models(self, compartment_id, **kwargs):
"compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing),
"accessLevel": kwargs.get("access_level", missing),
"displayName": kwargs.get("display_name", missing),
- "sensitiveDataModelId": kwargs.get("sensitive_data_model_id", missing),
+ "sensitiveTypeId": kwargs.get("sensitive_type_id", missing),
+ "sensitiveTypeSource": kwargs.get("sensitive_type_source", missing),
+ "entityType": kwargs.get("entity_type", missing),
+ "parentCategoryId": kwargs.get("parent_category_id", missing),
+ "defaultMaskingFormatId": kwargs.get("default_masking_format_id", missing),
"timeCreatedGreaterThanOrEqualTo": kwargs.get("time_created_greater_than_or_equal_to", missing),
"timeCreatedLessThan": kwargs.get("time_created_less_than", missing),
- "targetId": kwargs.get("target_id", missing),
"sortOrder": kwargs.get("sort_order", missing),
"sortBy": kwargs.get("sort_by", missing),
"limit": kwargs.get("limit", missing),
"page": kwargs.get("page", missing),
- "lifecycleState": kwargs.get("lifecycle_state", missing)
+ "lifecycleState": kwargs.get("lifecycle_state", missing),
+ "isCommon": kwargs.get("is_common", missing)
}
query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
@@ -23181,7 +26029,7 @@ def list_sensitive_data_models(self, compartment_id, **kwargs):
method=method,
query_params=query_params,
header_params=header_params,
- response_type="SensitiveDataModelCollection",
+ response_type="SensitiveTypeCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -23192,30 +26040,44 @@ def list_sensitive_data_models(self, compartment_id, **kwargs):
method=method,
query_params=query_params,
header_params=header_params,
- response_type="SensitiveDataModelCollection",
+ response_type="SensitiveTypeCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def list_sensitive_objects(self, sensitive_data_model_id, **kwargs):
+ def list_sql_collection_analytics(self, compartment_id, **kwargs):
"""
- Gets a list of sensitive objects present in the specified sensitive data model based on the specified query parameters.
+ Retrieves a list of all SQL collection analytics in Data Safe.
+ The ListSqlCollectionAnalytics operation returns only the analytics for the SQL collections in the specified `compartmentId`.
- :param str sensitive_data_model_id: (required)
- The OCID of the sensitive data model.
+ The parameter `accessLevel` specifies whether to return only those compartments for which the
+ requestor has INSPECT permissions on at least one resource directly
+ or indirectly (ACCESSIBLE) (the resource can be in a subcompartment) or to return Not Authorized if
+ Principal doesn't have access to even one of the child compartments. This is valid only when
+ `compartmentIdInSubtree` is set to `true`.
- :param list[str] schema_name: (optional)
- A filter to return only items related to specific schema name.
+ The parameter `compartmentIdInSubtree` applies when you perform ListSqlCollections on the
+ `compartmentId` passed and when it is set to true, the entire hierarchy of compartments can be returned.
+ To get a full list of all compartments and subcompartments in the tenancy (root compartment),
+ set the parameter `compartmentIdInSubtree` to true and `accessLevel` to ACCESSIBLE.
- :param list[str] object_name: (optional)
- A filter to return only items related to a specific object name.
- :param list[str] object_type: (optional)
- A filter to return only items related to a specific object type.
+ :param str compartment_id: (required)
+ A filter to return only resources that match the specified compartment OCID.
- Allowed values are: "ALL", "TABLE", "EDITIONING_VIEW"
+ :param bool compartment_id_in_subtree: (optional)
+ Default is false.
+ When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting.
+
+ :param str access_level: (optional)
+ Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED.
+ Setting this to ACCESSIBLE returns only those compartments for which the
+ user has INSPECT permissions directly or indirectly (permissions can be on a
+ resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed.
+
+ Allowed values are: "RESTRICTED", "ACCESSIBLE"
:param int limit: (optional)
For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
@@ -23227,20 +26089,34 @@ def list_sensitive_objects(self, sensitive_data_model_id, **kwargs):
__ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
- :param str sort_order: (optional)
- The sort order to use, either ascending (ASC) or descending (DESC).
-
- Allowed values are: "ASC", "DESC"
+ :param str lifecycle_state: (optional)
+ The current state of the SQL collection.
- :param str sort_by: (optional)
- The field to sort by. You can specify only one sorting parameter (sortOrder).
- The default order is ascending.
+ Allowed values are: "CREATING", "UPDATING", "COLLECTING", "COMPLETED", "INACTIVE", "FAILED", "DELETING", "DELETED", "NEEDS_ATTENTION"
- Allowed values are: "schemaName", "objectName", "objectType"
+ :param str target_id: (optional)
+ A filter to return only items related to a specific target OCID.
:param str opc_request_id: (optional)
Unique identifier for the request.
+ :param list[str] group_by: (optional)
+ The group by parameter to summarize SQL collection aggregation.
+
+ Allowed values are: "targetId", "lifecycleState"
+
+ :param datetime time_started: (optional)
+ An optional filter to return the stats of the SQL collection logs collected after the date-time specified,
+ in the format defined by `RFC3339`__.
+
+ __ https://tools.ietf.org/html/rfc3339
+
+ :param datetime time_ended: (optional)
+ An optional filter to return the stats of the SQL collection logs collected before the date-time specified,
+ in the format defined by `RFC3339`__.
+
+ __ https://tools.ietf.org/html/rfc3339
+
:param obj retry_strategy: (optional)
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
@@ -23253,77 +26129,72 @@ def list_sensitive_objects(self, sensitive_data_model_id, **kwargs):
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.SensitiveObjectCollection`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.SqlCollectionAnalyticsCollection`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use list_sensitive_objects API.
+ Click `here `__ to see an example of how to use list_sql_collection_analytics API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
- required_arguments = ['sensitiveDataModelId']
- resource_path = "/sensitiveDataModels/{sensitiveDataModelId}/sensitiveObjects"
+ required_arguments = ['compartmentId']
+ resource_path = "/sqlCollectionAnalytics"
method = "GET"
- operation_name = "list_sensitive_objects"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SensitiveObjectCollection/ListSensitiveObjects"
+ operation_name = "list_sql_collection_analytics"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SqlCollectionAnalyticsCollection/ListSqlCollectionAnalytics"
# Don't accept unknown kwargs
expected_kwargs = [
"allow_control_chars",
"retry_strategy",
- "schema_name",
- "object_name",
- "object_type",
+ "compartment_id_in_subtree",
+ "access_level",
"limit",
"page",
- "sort_order",
- "sort_by",
- "opc_request_id"
+ "lifecycle_state",
+ "target_id",
+ "opc_request_id",
+ "group_by",
+ "time_started",
+ "time_ended"
]
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"list_sensitive_objects got unknown kwargs: {extra_kwargs!r}")
-
- path_params = {
- "sensitiveDataModelId": sensitive_data_model_id
- }
-
- path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
-
- for (k, v) in six.iteritems(path_params):
- if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
- raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
-
- if 'object_type' in kwargs:
- object_type_allowed_values = ["ALL", "TABLE", "EDITIONING_VIEW"]
- for object_type_item in kwargs['object_type']:
- if object_type_item not in object_type_allowed_values:
- raise ValueError(
- f"Invalid value for `object_type`, must be one of { object_type_allowed_values }"
- )
+ f"list_sql_collection_analytics got unknown kwargs: {extra_kwargs!r}")
- if 'sort_order' in kwargs:
- sort_order_allowed_values = ["ASC", "DESC"]
- if kwargs['sort_order'] not in sort_order_allowed_values:
+ if 'access_level' in kwargs:
+ access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"]
+ if kwargs['access_level'] not in access_level_allowed_values:
raise ValueError(
- f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }"
+ f"Invalid value for `access_level`, must be one of { access_level_allowed_values }"
)
- if 'sort_by' in kwargs:
- sort_by_allowed_values = ["schemaName", "objectName", "objectType"]
- if kwargs['sort_by'] not in sort_by_allowed_values:
+ if 'lifecycle_state' in kwargs:
+ lifecycle_state_allowed_values = ["CREATING", "UPDATING", "COLLECTING", "COMPLETED", "INACTIVE", "FAILED", "DELETING", "DELETED", "NEEDS_ATTENTION"]
+ if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values:
raise ValueError(
- f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
+ f"Invalid value for `lifecycle_state`, must be one of { lifecycle_state_allowed_values }"
)
+ if 'group_by' in kwargs:
+ group_by_allowed_values = ["targetId", "lifecycleState"]
+ for group_by_item in kwargs['group_by']:
+ if group_by_item not in group_by_allowed_values:
+ raise ValueError(
+ f"Invalid value for `group_by`, must be one of { group_by_allowed_values }"
+ )
+
query_params = {
- "schemaName": self.base_client.generate_collection_format_param(kwargs.get("schema_name", missing), 'multi'),
- "objectName": self.base_client.generate_collection_format_param(kwargs.get("object_name", missing), 'multi'),
- "objectType": self.base_client.generate_collection_format_param(kwargs.get("object_type", missing), 'multi'),
+ "compartmentId": compartment_id,
+ "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing),
+ "accessLevel": kwargs.get("access_level", missing),
"limit": kwargs.get("limit", missing),
"page": kwargs.get("page", missing),
- "sortOrder": kwargs.get("sort_order", missing),
- "sortBy": kwargs.get("sort_by", missing)
+ "lifecycleState": kwargs.get("lifecycle_state", missing),
+ "targetId": kwargs.get("target_id", missing),
+ "groupBy": self.base_client.generate_collection_format_param(kwargs.get("group_by", missing), 'multi'),
+ "timeStarted": kwargs.get("time_started", missing),
+ "timeEnded": kwargs.get("time_ended", missing)
}
query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
@@ -23349,10 +26220,9 @@ def list_sensitive_objects(self, sensitive_data_model_id, **kwargs):
self.base_client.call_api,
resource_path=resource_path,
method=method,
- path_params=path_params,
query_params=query_params,
header_params=header_params,
- response_type="SensitiveObjectCollection",
+ response_type="SqlCollectionAnalyticsCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -23361,25 +26231,33 @@ def list_sensitive_objects(self, sensitive_data_model_id, **kwargs):
return self.base_client.call_api(
resource_path=resource_path,
method=method,
- path_params=path_params,
query_params=query_params,
header_params=header_params,
- response_type="SensitiveObjectCollection",
+ response_type="SqlCollectionAnalyticsCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def list_sensitive_schemas(self, sensitive_data_model_id, **kwargs):
+ def list_sql_collection_log_insights(self, time_started, time_ended, sql_collection_id, **kwargs):
"""
- Gets a list of sensitive schemas present in the specified sensitive data model based on the specified query parameters.
+ Retrieves a list of the SQL collection log analytics.
- :param str sensitive_data_model_id: (required)
- The OCID of the sensitive data model.
+ :param datetime time_started: (required)
+ An optional filter to return the stats of the SQL collection logs collected after the date-time specified,
+ in the format defined by `RFC3339`__.
- :param list[str] schema_name: (optional)
- A filter to return only items related to specific schema name.
+ __ https://tools.ietf.org/html/rfc3339
+
+ :param datetime time_ended: (required)
+ An optional filter to return the stats of the SQL collection logs collected before the date-time specified,
+ in the format defined by `RFC3339`__.
+
+ __ https://tools.ietf.org/html/rfc3339
+
+ :param str sql_collection_id: (required)
+ The OCID of the SQL collection resource.
:param int limit: (optional)
For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
@@ -23391,20 +26269,14 @@ def list_sensitive_schemas(self, sensitive_data_model_id, **kwargs):
__ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
- :param str sort_order: (optional)
- The sort order to use, either ascending (ASC) or descending (DESC).
-
- Allowed values are: "ASC", "DESC"
-
- :param str sort_by: (optional)
- The field to sort by. You can specify only one sorting parameter (sortOrder).
- The default order is ascending.
-
- Allowed values are: "schemaName"
-
:param str opc_request_id: (optional)
Unique identifier for the request.
+ :param str group_by: (optional)
+ The group by parameter to summarize SQL collection log insights aggregation.
+
+ Allowed values are: "clientIp", "clientProgram", "clientOsUserName"
+
:param obj retry_strategy: (optional)
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
@@ -23417,37 +26289,35 @@ def list_sensitive_schemas(self, sensitive_data_model_id, **kwargs):
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.SensitiveSchemaCollection`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.SqlCollectionLogInsightsCollection`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use list_sensitive_schemas API.
+ Click `here `__ to see an example of how to use list_sql_collection_log_insights API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
- required_arguments = ['sensitiveDataModelId']
- resource_path = "/sensitiveDataModels/{sensitiveDataModelId}/sensitiveSchemas"
+ required_arguments = ['sqlCollectionId', 'timeStarted', 'timeEnded']
+ resource_path = "/sqlCollections/{sqlCollectionId}/logInsights"
method = "GET"
- operation_name = "list_sensitive_schemas"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SensitiveSchemaCollection/ListSensitiveSchemas"
+ operation_name = "list_sql_collection_log_insights"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SqlCollectionLogInsightsCollection/ListSqlCollectionLogInsights"
# Don't accept unknown kwargs
expected_kwargs = [
"allow_control_chars",
"retry_strategy",
- "schema_name",
"limit",
"page",
- "sort_order",
- "sort_by",
- "opc_request_id"
+ "opc_request_id",
+ "group_by"
]
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"list_sensitive_schemas got unknown kwargs: {extra_kwargs!r}")
+ f"list_sql_collection_log_insights got unknown kwargs: {extra_kwargs!r}")
path_params = {
- "sensitiveDataModelId": sensitive_data_model_id
+ "sqlCollectionId": sql_collection_id
}
path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
@@ -23456,26 +26326,19 @@ def list_sensitive_schemas(self, sensitive_data_model_id, **kwargs):
if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
- if 'sort_order' in kwargs:
- sort_order_allowed_values = ["ASC", "DESC"]
- if kwargs['sort_order'] not in sort_order_allowed_values:
- raise ValueError(
- f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }"
- )
-
- if 'sort_by' in kwargs:
- sort_by_allowed_values = ["schemaName"]
- if kwargs['sort_by'] not in sort_by_allowed_values:
+ if 'group_by' in kwargs:
+ group_by_allowed_values = ["clientIp", "clientProgram", "clientOsUserName"]
+ if kwargs['group_by'] not in group_by_allowed_values:
raise ValueError(
- f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
+ f"Invalid value for `group_by`, must be one of { group_by_allowed_values }"
)
query_params = {
- "schemaName": self.base_client.generate_collection_format_param(kwargs.get("schema_name", missing), 'multi'),
"limit": kwargs.get("limit", missing),
"page": kwargs.get("page", missing),
- "sortOrder": kwargs.get("sort_order", missing),
- "sortBy": kwargs.get("sort_by", missing)
+ "timeStarted": time_started,
+ "timeEnded": time_ended,
+ "groupBy": kwargs.get("group_by", missing)
}
query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
@@ -23504,7 +26367,7 @@ def list_sensitive_schemas(self, sensitive_data_model_id, **kwargs):
path_params=path_params,
query_params=query_params,
header_params=header_params,
- response_type="SensitiveSchemaCollection",
+ response_type="SqlCollectionLogInsightsCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -23516,15 +26379,28 @@ def list_sensitive_schemas(self, sensitive_data_model_id, **kwargs):
path_params=path_params,
query_params=query_params,
header_params=header_params,
- response_type="SensitiveSchemaCollection",
+ response_type="SqlCollectionLogInsightsCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def list_sensitive_types(self, compartment_id, **kwargs):
+ def list_sql_collections(self, compartment_id, **kwargs):
"""
- Gets a list of sensitive types based on the specified query parameters.
+ Retrieves a list of all SQL collections in Data Safe.
+
+ The ListSqlCollections operation returns only the SQL collections in the specified `compartmentId`.
+
+ The parameter `accessLevel` specifies whether to return only those compartments for which the
+ requestor has INSPECT permissions on at least one resource directly
+ or indirectly (ACCESSIBLE) (the resource can be in a subcompartment) or to return Not Authorized if
+ Principal doesn't have access to even one of the child compartments. This is valid only when
+ `compartmentIdInSubtree` is set to `true`.
+
+ The parameter `compartmentIdInSubtree` applies when you perform ListSqlCollections on the
+ `compartmentId` passed and when it is set to true, the entire hierarchy of compartments can be returned.
+ To get a full list of all compartments and subcompartments in the tenancy (root compartment),
+ set the parameter `compartmentIdInSubtree` to true and `accessLevel` to ACCESSIBLE.
:param str compartment_id: (required)
@@ -23545,24 +26421,23 @@ def list_sensitive_types(self, compartment_id, **kwargs):
:param str display_name: (optional)
A filter to return only resources that match the specified display name.
- :param str sensitive_type_id: (optional)
- A filter to return only items related to a specific sensitive type OCID.
+ :param int limit: (optional)
+ For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
- :param str sensitive_type_source: (optional)
- A filter to return the sensitive type resources based on the value of their source attribute.
+ __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
- Allowed values are: "ORACLE", "USER"
+ :param str page: (optional)
+ For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__.
- :param str entity_type: (optional)
- A filter to return the sensitive type resources based on the value of their entityType attribute.
+ __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
- Allowed values are: "SENSITIVE_TYPE", "SENSITIVE_CATEGORY"
+ :param str lifecycle_state: (optional)
+ The current state of the SQL collection.
- :param str parent_category_id: (optional)
- A filter to return only the sensitive types that are children of the sensitive category identified by the specified OCID.
+ Allowed values are: "CREATING", "UPDATING", "COLLECTING", "COMPLETED", "INACTIVE", "FAILED", "DELETING", "DELETED", "NEEDS_ATTENTION"
- :param str default_masking_format_id: (optional)
- A filter to return only the sensitive types that have the default masking format identified by the specified OCID.
+ :param str sql_collection_id: (optional)
+ An optional filter to return only resources that match the specified OCID of the SQL collection resource.
:param datetime time_created_greater_than_or_equal_to: (optional)
A filter to return only the resources that were created after the specified date and time, as defined by `RFC3339`__.
@@ -23581,39 +26456,26 @@ def list_sensitive_types(self, compartment_id, **kwargs):
**Example:** 2016-12-19T16:39:57.600Z
+ :param str target_id: (optional)
+ A filter to return only items related to a specific target OCID.
+
+ :param str db_user_name: (optional)
+ A filter to return only items that match the specified user name.
+
:param str sort_order: (optional)
The sort order to use, either ascending (ASC) or descending (DESC).
Allowed values are: "ASC", "DESC"
:param str sort_by: (optional)
- The field to sort by. You can specify only one sorting parameter (sortOrder). The default order for timeCreated is descending.
- The default order for displayName is ascending.
+ The field used for sorting. Only one sorting parameter order (sortOrder) can be specified.
+ The DISPLAYNAME sort order is case sensitive.
- Allowed values are: "timeCreated", "displayName"
+ Allowed values are: "TIMECREATED", "DISPLAYNAME", "TIMELASTSTARTED"
:param str opc_request_id: (optional)
Unique identifier for the request.
- :param int limit: (optional)
- For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
-
- __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
-
- :param str page: (optional)
- For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__.
-
- __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
-
- :param str lifecycle_state: (optional)
- A filter to return only the resources that match the specified lifecycle state.
-
- Allowed values are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED"
-
- :param bool is_common: (optional)
- A filter to return only the common sensitive type resources. Common sensitive types belong to
- library sensitive types which are frequently used to perform sensitive data discovery.
-
:param obj retry_strategy: (optional)
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
@@ -23626,18 +26488,18 @@ def list_sensitive_types(self, compartment_id, **kwargs):
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.SensitiveTypeCollection`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.SqlCollectionCollection`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use list_sensitive_types API.
+ Click `here `__ to see an example of how to use list_sql_collections API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
required_arguments = ['compartmentId']
- resource_path = "/sensitiveTypes"
+ resource_path = "/sqlCollections"
method = "GET"
- operation_name = "list_sensitive_types"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SensitiveType/ListSensitiveTypes"
+ operation_name = "list_sql_collections"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SqlCollectionCollection/ListSqlCollections"
# Don't accept unknown kwargs
expected_kwargs = [
@@ -23646,25 +26508,22 @@ def list_sensitive_types(self, compartment_id, **kwargs):
"compartment_id_in_subtree",
"access_level",
"display_name",
- "sensitive_type_id",
- "sensitive_type_source",
- "entity_type",
- "parent_category_id",
- "default_masking_format_id",
+ "limit",
+ "page",
+ "lifecycle_state",
+ "sql_collection_id",
"time_created_greater_than_or_equal_to",
"time_created_less_than",
+ "target_id",
+ "db_user_name",
"sort_order",
"sort_by",
- "opc_request_id",
- "limit",
- "page",
- "lifecycle_state",
- "is_common"
+ "opc_request_id"
]
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"list_sensitive_types got unknown kwargs: {extra_kwargs!r}")
+ f"list_sql_collections got unknown kwargs: {extra_kwargs!r}")
if 'access_level' in kwargs:
access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"]
@@ -23673,18 +26532,11 @@ def list_sensitive_types(self, compartment_id, **kwargs):
f"Invalid value for `access_level`, must be one of { access_level_allowed_values }"
)
- if 'sensitive_type_source' in kwargs:
- sensitive_type_source_allowed_values = ["ORACLE", "USER"]
- if kwargs['sensitive_type_source'] not in sensitive_type_source_allowed_values:
- raise ValueError(
- f"Invalid value for `sensitive_type_source`, must be one of { sensitive_type_source_allowed_values }"
- )
-
- if 'entity_type' in kwargs:
- entity_type_allowed_values = ["SENSITIVE_TYPE", "SENSITIVE_CATEGORY"]
- if kwargs['entity_type'] not in entity_type_allowed_values:
+ if 'lifecycle_state' in kwargs:
+ lifecycle_state_allowed_values = ["CREATING", "UPDATING", "COLLECTING", "COMPLETED", "INACTIVE", "FAILED", "DELETING", "DELETED", "NEEDS_ATTENTION"]
+ if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values:
raise ValueError(
- f"Invalid value for `entity_type`, must be one of { entity_type_allowed_values }"
+ f"Invalid value for `lifecycle_state`, must be one of { lifecycle_state_allowed_values }"
)
if 'sort_order' in kwargs:
@@ -23695,37 +26547,27 @@ def list_sensitive_types(self, compartment_id, **kwargs):
)
if 'sort_by' in kwargs:
- sort_by_allowed_values = ["timeCreated", "displayName"]
+ sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME", "TIMELASTSTARTED"]
if kwargs['sort_by'] not in sort_by_allowed_values:
raise ValueError(
f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
)
- if 'lifecycle_state' in kwargs:
- lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED"]
- if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values:
- raise ValueError(
- f"Invalid value for `lifecycle_state`, must be one of { lifecycle_state_allowed_values }"
- )
-
query_params = {
"compartmentId": compartment_id,
"compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing),
"accessLevel": kwargs.get("access_level", missing),
"displayName": kwargs.get("display_name", missing),
- "sensitiveTypeId": kwargs.get("sensitive_type_id", missing),
- "sensitiveTypeSource": kwargs.get("sensitive_type_source", missing),
- "entityType": kwargs.get("entity_type", missing),
- "parentCategoryId": kwargs.get("parent_category_id", missing),
- "defaultMaskingFormatId": kwargs.get("default_masking_format_id", missing),
- "timeCreatedGreaterThanOrEqualTo": kwargs.get("time_created_greater_than_or_equal_to", missing),
- "timeCreatedLessThan": kwargs.get("time_created_less_than", missing),
- "sortOrder": kwargs.get("sort_order", missing),
- "sortBy": kwargs.get("sort_by", missing),
"limit": kwargs.get("limit", missing),
"page": kwargs.get("page", missing),
"lifecycleState": kwargs.get("lifecycle_state", missing),
- "isCommon": kwargs.get("is_common", missing)
+ "sqlCollectionId": kwargs.get("sql_collection_id", missing),
+ "timeCreatedGreaterThanOrEqualTo": kwargs.get("time_created_greater_than_or_equal_to", missing),
+ "timeCreatedLessThan": kwargs.get("time_created_less_than", missing),
+ "targetId": kwargs.get("target_id", missing),
+ "dbUserName": kwargs.get("db_user_name", missing),
+ "sortOrder": kwargs.get("sort_order", missing),
+ "sortBy": kwargs.get("sort_by", missing)
}
query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
@@ -23753,7 +26595,7 @@ def list_sensitive_types(self, compartment_id, **kwargs):
method=method,
query_params=query_params,
header_params=header_params,
- response_type="SensitiveTypeCollection",
+ response_type="SqlCollectionCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -23764,17 +26606,17 @@ def list_sensitive_types(self, compartment_id, **kwargs):
method=method,
query_params=query_params,
header_params=header_params,
- response_type="SensitiveTypeCollection",
+ response_type="SqlCollectionCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def list_sql_collection_analytics(self, compartment_id, **kwargs):
+ def list_sql_firewall_allowed_sql_analytics(self, compartment_id, **kwargs):
"""
- Retrieves a list of all SQL collection analytics in Data Safe.
+ Returns the aggregation details of all SQL Firewall allowed SQL statements.
- The ListSqlCollectionAnalytics operation returns only the analytics for the SQL collections in the specified `compartmentId`.
+ The ListSqlFirewallAllowedSqlAnalytics operation returns the aggregates of the SQL Firewall allowed SQL statements in the specified `compartmentId`.
The parameter `accessLevel` specifies whether to return only those compartments for which the
requestor has INSPECT permissions on at least one resource directly
@@ -23782,7 +26624,7 @@ def list_sql_collection_analytics(self, compartment_id, **kwargs):
Principal doesn't have access to even one of the child compartments. This is valid only when
`compartmentIdInSubtree` is set to `true`.
- The parameter `compartmentIdInSubtree` applies when you perform ListSqlCollections on the
+ The parameter `compartmentIdInSubtree` applies when you perform ListSqlFirewallAllowedSqlAnalytics on the
`compartmentId` passed and when it is set to true, the entire hierarchy of compartments can be returned.
To get a full list of all compartments and subcompartments in the tenancy (root compartment),
set the parameter `compartmentIdInSubtree` to true and `accessLevel` to ACCESSIBLE.
@@ -23808,38 +26650,29 @@ def list_sql_collection_analytics(self, compartment_id, **kwargs):
__ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
- :param str page: (optional)
- For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__.
-
- __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
-
- :param str lifecycle_state: (optional)
- The current state of the SQL collection.
-
- Allowed values are: "CREATING", "UPDATING", "COLLECTING", "COMPLETED", "INACTIVE", "FAILED", "DELETING", "DELETED", "NEEDS_ATTENTION"
-
- :param str target_id: (optional)
- A filter to return only items related to a specific target OCID.
-
- :param str opc_request_id: (optional)
- Unique identifier for the request.
+ :param str page: (optional)
+ For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__.
- :param list[str] group_by: (optional)
- The group by parameter to summarize SQL collection aggregation.
+ __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
- Allowed values are: "targetId", "lifecycleState"
+ :param str scim_query: (optional)
+ The scimQuery query parameter accepts filter expressions that use the syntax described in Section 3.2.2.2
+ of the System for Cross-Domain Identity Management (SCIM) specification, which is available
+ at `RFC3339`__. In SCIM filtering expressions,
+ text, date, and time values must be enclosed in quotation marks, with date and time values using ISO-8601 format.
+ (Numeric and boolean values should not be quoted.)
- :param datetime time_started: (optional)
- An optional filter to return the stats of the SQL collection logs collected after the date-time specified,
- in the format defined by `RFC3339`__.
+ **Example:** query=(currentUser eq 'SCOTT') and (topLevel eq 'YES')
- __ https://tools.ietf.org/html/rfc3339
+ __ https://tools.ietf.org/html/draft-ietf-scim-api-12
- :param datetime time_ended: (optional)
- An optional filter to return the stats of the SQL collection logs collected before the date-time specified,
- in the format defined by `RFC3339`__.
+ :param list[str] group_by: (optional)
+ The group by parameter to summarize the allowed SQL aggregation.
- __ https://tools.ietf.org/html/rfc3339
+ Allowed values are: "dbUserName", "sqlLevel", "sqlFirewallPolicyId", "lifecycleState"
+
+ :param str opc_request_id: (optional)
+ Unique identifier for the request.
:param obj retry_strategy: (optional)
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
@@ -23853,18 +26686,18 @@ def list_sql_collection_analytics(self, compartment_id, **kwargs):
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.SqlCollectionAnalyticsCollection`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.SqlFirewallAllowedSqlAnalyticsCollection`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use list_sql_collection_analytics API.
+ Click `here `__ to see an example of how to use list_sql_firewall_allowed_sql_analytics API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
required_arguments = ['compartmentId']
- resource_path = "/sqlCollectionAnalytics"
+ resource_path = "/sqlFirewallAllowedSqlAnalytics"
method = "GET"
- operation_name = "list_sql_collection_analytics"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SqlCollectionAnalyticsCollection/ListSqlCollectionAnalytics"
+ operation_name = "list_sql_firewall_allowed_sql_analytics"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SqlFirewallAllowedSqlAnalyticsCollection/ListSqlFirewallAllowedSqlAnalytics"
# Don't accept unknown kwargs
expected_kwargs = [
@@ -23874,17 +26707,14 @@ def list_sql_collection_analytics(self, compartment_id, **kwargs):
"access_level",
"limit",
"page",
- "lifecycle_state",
- "target_id",
- "opc_request_id",
+ "scim_query",
"group_by",
- "time_started",
- "time_ended"
+ "opc_request_id"
]
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"list_sql_collection_analytics got unknown kwargs: {extra_kwargs!r}")
+ f"list_sql_firewall_allowed_sql_analytics got unknown kwargs: {extra_kwargs!r}")
if 'access_level' in kwargs:
access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"]
@@ -23893,15 +26723,8 @@ def list_sql_collection_analytics(self, compartment_id, **kwargs):
f"Invalid value for `access_level`, must be one of { access_level_allowed_values }"
)
- if 'lifecycle_state' in kwargs:
- lifecycle_state_allowed_values = ["CREATING", "UPDATING", "COLLECTING", "COMPLETED", "INACTIVE", "FAILED", "DELETING", "DELETED", "NEEDS_ATTENTION"]
- if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values:
- raise ValueError(
- f"Invalid value for `lifecycle_state`, must be one of { lifecycle_state_allowed_values }"
- )
-
if 'group_by' in kwargs:
- group_by_allowed_values = ["targetId", "lifecycleState"]
+ group_by_allowed_values = ["dbUserName", "sqlLevel", "sqlFirewallPolicyId", "lifecycleState"]
for group_by_item in kwargs['group_by']:
if group_by_item not in group_by_allowed_values:
raise ValueError(
@@ -23914,11 +26737,8 @@ def list_sql_collection_analytics(self, compartment_id, **kwargs):
"accessLevel": kwargs.get("access_level", missing),
"limit": kwargs.get("limit", missing),
"page": kwargs.get("page", missing),
- "lifecycleState": kwargs.get("lifecycle_state", missing),
- "targetId": kwargs.get("target_id", missing),
- "groupBy": self.base_client.generate_collection_format_param(kwargs.get("group_by", missing), 'multi'),
- "timeStarted": kwargs.get("time_started", missing),
- "timeEnded": kwargs.get("time_ended", missing)
+ "scimQuery": kwargs.get("scim_query", missing),
+ "groupBy": self.base_client.generate_collection_format_param(kwargs.get("group_by", missing), 'multi')
}
query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
@@ -23946,7 +26766,7 @@ def list_sql_collection_analytics(self, compartment_id, **kwargs):
method=method,
query_params=query_params,
header_params=header_params,
- response_type="SqlCollectionAnalyticsCollection",
+ response_type="SqlFirewallAllowedSqlAnalyticsCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -23957,31 +26777,44 @@ def list_sql_collection_analytics(self, compartment_id, **kwargs):
method=method,
query_params=query_params,
header_params=header_params,
- response_type="SqlCollectionAnalyticsCollection",
+ response_type="SqlFirewallAllowedSqlAnalyticsCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def list_sql_collection_log_insights(self, time_started, time_ended, sql_collection_id, **kwargs):
+ def list_sql_firewall_allowed_sqls(self, compartment_id, **kwargs):
"""
- Retrieves a list of the SQL collection log analytics.
+ Retrieves a list of all SQL Firewall allowed SQL statements.
+ The ListSqlFirewallAllowedSqls operation returns only the SQL Firewall allowed SQL statements in the specified `compartmentId`.
- :param datetime time_started: (required)
- An optional filter to return the stats of the SQL collection logs collected after the date-time specified,
- in the format defined by `RFC3339`__.
+ The parameter `accessLevel` specifies whether to return only those compartments for which the
+ requestor has INSPECT permissions on at least one resource directly
+ or indirectly (ACCESSIBLE) (the resource can be in a subcompartment) or to return Not Authorized if
+ Principal doesn't have access to even one of the child compartments. This is valid only when
+ `compartmentIdInSubtree` is set to `true`.
- __ https://tools.ietf.org/html/rfc3339
+ The parameter `compartmentIdInSubtree` applies when you perform ListSqlFirewallPolicies on the
+ `compartmentId` passed and when it is set to true, the entire hierarchy of compartments can be returned.
+ To get a full list of all compartments and subcompartments in the tenancy (root compartment),
+ set the parameter `compartmentIdInSubtree` to true and `accessLevel` to ACCESSIBLE.
- :param datetime time_ended: (required)
- An optional filter to return the stats of the SQL collection logs collected before the date-time specified,
- in the format defined by `RFC3339`__.
- __ https://tools.ietf.org/html/rfc3339
+ :param str compartment_id: (required)
+ A filter to return only resources that match the specified compartment OCID.
- :param str sql_collection_id: (required)
- The OCID of the SQL collection resource.
+ :param bool compartment_id_in_subtree: (optional)
+ Default is false.
+ When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting.
+
+ :param str access_level: (optional)
+ Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED.
+ Setting this to ACCESSIBLE returns only those compartments for which the
+ user has INSPECT permissions directly or indirectly (permissions can be on a
+ resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed.
+
+ Allowed values are: "RESTRICTED", "ACCESSIBLE"
:param int limit: (optional)
For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
@@ -23993,13 +26826,29 @@ def list_sql_collection_log_insights(self, time_started, time_ended, sql_collect
__ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
- :param str opc_request_id: (optional)
- Unique identifier for the request.
+ :param str scim_query: (optional)
+ The scimQuery query parameter accepts filter expressions that use the syntax described in Section 3.2.2.2
+ of the System for Cross-Domain Identity Management (SCIM) specification, which is available
+ at `RFC3339`__. In SCIM filtering expressions,
+ text, date, and time values must be enclosed in quotation marks, with date and time values using ISO-8601 format.
+ (Numeric and boolean values should not be quoted.)
- :param str group_by: (optional)
- The group by parameter to summarize SQL collection log insights aggregation.
+ **Example:** query=(currentUser eq 'SCOTT') and (topLevel eq 'YES')
- Allowed values are: "clientIp", "clientProgram", "clientOsUserName"
+ __ https://tools.ietf.org/html/draft-ietf-scim-api-12
+
+ :param str sort_order: (optional)
+ The sort order to use, either ascending (ASC) or descending (DESC).
+
+ Allowed values are: "ASC", "DESC"
+
+ :param str sort_by: (optional)
+ The field to sort by. Only one sort parameter should be provided.
+
+ Allowed values are: "displayName", "timeCollected"
+
+ :param str opc_request_id: (optional)
+ Unique identifier for the request.
:param obj retry_strategy: (optional)
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
@@ -24013,56 +26862,67 @@ def list_sql_collection_log_insights(self, time_started, time_ended, sql_collect
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.SqlCollectionLogInsightsCollection`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.SqlFirewallAllowedSqlCollection`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use list_sql_collection_log_insights API.
+ Click `here `__ to see an example of how to use list_sql_firewall_allowed_sqls API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
- required_arguments = ['sqlCollectionId', 'timeStarted', 'timeEnded']
- resource_path = "/sqlCollections/{sqlCollectionId}/logInsights"
+ required_arguments = ['compartmentId']
+ resource_path = "/sqlFirewallAllowedSqls"
method = "GET"
- operation_name = "list_sql_collection_log_insights"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SqlCollectionLogInsightsCollection/ListSqlCollectionLogInsights"
+ operation_name = "list_sql_firewall_allowed_sqls"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SqlFirewallAllowedSqlCollection/ListSqlFirewallAllowedSqls"
# Don't accept unknown kwargs
expected_kwargs = [
"allow_control_chars",
"retry_strategy",
+ "compartment_id_in_subtree",
+ "access_level",
"limit",
"page",
- "opc_request_id",
- "group_by"
+ "scim_query",
+ "sort_order",
+ "sort_by",
+ "opc_request_id"
]
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"list_sql_collection_log_insights got unknown kwargs: {extra_kwargs!r}")
-
- path_params = {
- "sqlCollectionId": sql_collection_id
- }
+ f"list_sql_firewall_allowed_sqls got unknown kwargs: {extra_kwargs!r}")
- path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
+ if 'access_level' in kwargs:
+ access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"]
+ if kwargs['access_level'] not in access_level_allowed_values:
+ raise ValueError(
+ f"Invalid value for `access_level`, must be one of { access_level_allowed_values }"
+ )
- for (k, v) in six.iteritems(path_params):
- if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
- raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
+ if 'sort_order' in kwargs:
+ sort_order_allowed_values = ["ASC", "DESC"]
+ if kwargs['sort_order'] not in sort_order_allowed_values:
+ raise ValueError(
+ f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }"
+ )
- if 'group_by' in kwargs:
- group_by_allowed_values = ["clientIp", "clientProgram", "clientOsUserName"]
- if kwargs['group_by'] not in group_by_allowed_values:
+ if 'sort_by' in kwargs:
+ sort_by_allowed_values = ["displayName", "timeCollected"]
+ if kwargs['sort_by'] not in sort_by_allowed_values:
raise ValueError(
- f"Invalid value for `group_by`, must be one of { group_by_allowed_values }"
+ f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
)
query_params = {
+ "compartmentId": compartment_id,
+ "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing),
+ "accessLevel": kwargs.get("access_level", missing),
"limit": kwargs.get("limit", missing),
"page": kwargs.get("page", missing),
- "timeStarted": time_started,
- "timeEnded": time_ended,
- "groupBy": kwargs.get("group_by", missing)
+ "scimQuery": kwargs.get("scim_query", missing),
+ "sortOrder": kwargs.get("sort_order", missing),
+ "sortBy": kwargs.get("sort_by", missing)
}
query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
@@ -24088,10 +26948,9 @@ def list_sql_collection_log_insights(self, time_started, time_ended, sql_collect
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="SqlCollectionLogInsightsCollection",
+ response_type="SqlFirewallAllowedSqlCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -24100,20 +26959,19 @@ def list_sql_collection_log_insights(self, time_started, time_ended, sql_collect
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="SqlCollectionLogInsightsCollection",
+ response_type="SqlFirewallAllowedSqlCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def list_sql_collections(self, compartment_id, **kwargs):
+ def list_sql_firewall_policies(self, compartment_id, **kwargs):
"""
- Retrieves a list of all SQL collections in Data Safe.
+ Retrieves a list of all SQL Firewall policies.
- The ListSqlCollections operation returns only the SQL collections in the specified `compartmentId`.
+ The ListSqlFirewallPolicies operation returns only the SQL Firewall policies in the specified `compartmentId`.
The parameter `accessLevel` specifies whether to return only those compartments for which the
requestor has INSPECT permissions on at least one resource directly
@@ -24121,7 +26979,7 @@ def list_sql_collections(self, compartment_id, **kwargs):
Principal doesn't have access to even one of the child compartments. This is valid only when
`compartmentIdInSubtree` is set to `true`.
- The parameter `compartmentIdInSubtree` applies when you perform ListSqlCollections on the
+ The parameter `compartmentIdInSubtree` applies when you perform ListSqlFirewallPolicies on the
`compartmentId` passed and when it is set to true, the entire hierarchy of compartments can be returned.
To get a full list of all compartments and subcompartments in the tenancy (root compartment),
set the parameter `compartmentIdInSubtree` to true and `accessLevel` to ACCESSIBLE.
@@ -24155,13 +27013,24 @@ def list_sql_collections(self, compartment_id, **kwargs):
__ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
+ :param str security_policy_id: (optional)
+ An optional filter to return only resources that match the specified OCID of the security policy resource.
+
:param str lifecycle_state: (optional)
- The current state of the SQL collection.
+ The current state of the SQL Firewall policy.
- Allowed values are: "CREATING", "UPDATING", "COLLECTING", "COMPLETED", "INACTIVE", "FAILED", "DELETING", "DELETED", "NEEDS_ATTENTION"
+ Allowed values are: "CREATING", "UPDATING", "ACTIVE", "INACTIVE", "FAILED", "DELETING", "DELETED", "NEEDS_ATTENTION"
- :param str sql_collection_id: (optional)
- An optional filter to return only resources that match the specified OCID of the SQL collection resource.
+ :param str sql_firewall_policy_id: (optional)
+ An optional filter to return only resources that match the specified OCID of the SQL Firewall policy resource.
+
+ :param str db_user_name: (optional)
+ A filter to return only items that match the specified user name.
+
+ :param str violation_action: (optional)
+ An optional filter to return only resources that match the specified violation action.
+
+ Allowed values are: "block", "observe"
:param datetime time_created_greater_than_or_equal_to: (optional)
A filter to return only the resources that were created after the specified date and time, as defined by `RFC3339`__.
@@ -24180,22 +27049,17 @@ def list_sql_collections(self, compartment_id, **kwargs):
**Example:** 2016-12-19T16:39:57.600Z
- :param str target_id: (optional)
- A filter to return only items related to a specific target OCID.
-
- :param str db_user_name: (optional)
- A filter to return only items that match the specified user name.
-
:param str sort_order: (optional)
The sort order to use, either ascending (ASC) or descending (DESC).
Allowed values are: "ASC", "DESC"
:param str sort_by: (optional)
- The field used for sorting. Only one sorting parameter order (sortOrder) can be specified.
+ The field used for sorting. Only one sorting order (sortOrder) can be specified.
+ The default order for TIMECREATED is descending. The default order for DISPLAYNAME is ascending.
The DISPLAYNAME sort order is case sensitive.
- Allowed values are: "TIMECREATED", "DISPLAYNAME", "TIMELASTSTARTED"
+ Allowed values are: "TIMECREATED", "DISPLAYNAME"
:param str opc_request_id: (optional)
Unique identifier for the request.
@@ -24212,18 +27076,18 @@ def list_sql_collections(self, compartment_id, **kwargs):
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.SqlCollectionCollection`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.SqlFirewallPolicyCollection`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use list_sql_collections API.
+ Click `here `__ to see an example of how to use list_sql_firewall_policies API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
required_arguments = ['compartmentId']
- resource_path = "/sqlCollections"
+ resource_path = "/sqlFirewallPolicies"
method = "GET"
- operation_name = "list_sql_collections"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SqlCollectionCollection/ListSqlCollections"
+ operation_name = "list_sql_firewall_policies"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SqlFirewallPolicyCollection/ListSqlFirewallPolicies"
# Don't accept unknown kwargs
expected_kwargs = [
@@ -24234,12 +27098,13 @@ def list_sql_collections(self, compartment_id, **kwargs):
"display_name",
"limit",
"page",
+ "security_policy_id",
"lifecycle_state",
- "sql_collection_id",
+ "sql_firewall_policy_id",
+ "db_user_name",
+ "violation_action",
"time_created_greater_than_or_equal_to",
"time_created_less_than",
- "target_id",
- "db_user_name",
"sort_order",
"sort_by",
"opc_request_id"
@@ -24247,7 +27112,7 @@ def list_sql_collections(self, compartment_id, **kwargs):
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"list_sql_collections got unknown kwargs: {extra_kwargs!r}")
+ f"list_sql_firewall_policies got unknown kwargs: {extra_kwargs!r}")
if 'access_level' in kwargs:
access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"]
@@ -24257,12 +27122,19 @@ def list_sql_collections(self, compartment_id, **kwargs):
)
if 'lifecycle_state' in kwargs:
- lifecycle_state_allowed_values = ["CREATING", "UPDATING", "COLLECTING", "COMPLETED", "INACTIVE", "FAILED", "DELETING", "DELETED", "NEEDS_ATTENTION"]
+ lifecycle_state_allowed_values = ["CREATING", "UPDATING", "ACTIVE", "INACTIVE", "FAILED", "DELETING", "DELETED", "NEEDS_ATTENTION"]
if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values:
raise ValueError(
f"Invalid value for `lifecycle_state`, must be one of { lifecycle_state_allowed_values }"
)
+ if 'violation_action' in kwargs:
+ violation_action_allowed_values = ["block", "observe"]
+ if kwargs['violation_action'] not in violation_action_allowed_values:
+ raise ValueError(
+ f"Invalid value for `violation_action`, must be one of { violation_action_allowed_values }"
+ )
+
if 'sort_order' in kwargs:
sort_order_allowed_values = ["ASC", "DESC"]
if kwargs['sort_order'] not in sort_order_allowed_values:
@@ -24271,7 +27143,7 @@ def list_sql_collections(self, compartment_id, **kwargs):
)
if 'sort_by' in kwargs:
- sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME", "TIMELASTSTARTED"]
+ sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"]
if kwargs['sort_by'] not in sort_by_allowed_values:
raise ValueError(
f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
@@ -24284,12 +27156,13 @@ def list_sql_collections(self, compartment_id, **kwargs):
"displayName": kwargs.get("display_name", missing),
"limit": kwargs.get("limit", missing),
"page": kwargs.get("page", missing),
+ "securityPolicyId": kwargs.get("security_policy_id", missing),
"lifecycleState": kwargs.get("lifecycle_state", missing),
- "sqlCollectionId": kwargs.get("sql_collection_id", missing),
+ "sqlFirewallPolicyId": kwargs.get("sql_firewall_policy_id", missing),
+ "dbUserName": kwargs.get("db_user_name", missing),
+ "violationAction": kwargs.get("violation_action", missing),
"timeCreatedGreaterThanOrEqualTo": kwargs.get("time_created_greater_than_or_equal_to", missing),
"timeCreatedLessThan": kwargs.get("time_created_less_than", missing),
- "targetId": kwargs.get("target_id", missing),
- "dbUserName": kwargs.get("db_user_name", missing),
"sortOrder": kwargs.get("sort_order", missing),
"sortBy": kwargs.get("sort_by", missing)
}
@@ -24319,7 +27192,7 @@ def list_sql_collections(self, compartment_id, **kwargs):
method=method,
query_params=query_params,
header_params=header_params,
- response_type="SqlCollectionCollection",
+ response_type="SqlFirewallPolicyCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -24330,26 +27203,24 @@ def list_sql_collections(self, compartment_id, **kwargs):
method=method,
query_params=query_params,
header_params=header_params,
- response_type="SqlCollectionCollection",
+ response_type="SqlFirewallPolicyCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def list_sql_firewall_allowed_sql_analytics(self, compartment_id, **kwargs):
+ def list_sql_firewall_policy_analytics(self, compartment_id, **kwargs):
"""
- Returns the aggregation details of all SQL Firewall allowed SQL statements.
-
- The ListSqlFirewallAllowedSqlAnalytics operation returns the aggregates of the SQL Firewall allowed SQL statements in the specified `compartmentId`.
+ Gets a list of aggregated SQL Firewall policy details.
The parameter `accessLevel` specifies whether to return only those compartments for which the
requestor has INSPECT permissions on at least one resource directly
or indirectly (ACCESSIBLE) (the resource can be in a subcompartment) or to return Not Authorized if
- Principal doesn't have access to even one of the child compartments. This is valid only when
+ principal doesn't have access to even one of the child compartments. This is valid only when
`compartmentIdInSubtree` is set to `true`.
- The parameter `compartmentIdInSubtree` applies when you perform ListSqlFirewallAllowedSqlAnalytics on the
- `compartmentId` passed and when it is set to true, the entire hierarchy of compartments can be returned.
+ The parameter `compartmentIdInSubtree` applies when you perform SummarizedSqlFirewallPolicyInfo on the specified
+ `compartmentId` and when it is set to true, the entire hierarchy of compartments can be returned.
To get a full list of all compartments and subcompartments in the tenancy (root compartment),
set the parameter `compartmentIdInSubtree` to true and `accessLevel` to ACCESSIBLE.
@@ -24379,21 +27250,30 @@ def list_sql_firewall_allowed_sql_analytics(self, compartment_id, **kwargs):
__ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
- :param str scim_query: (optional)
- The scimQuery query parameter accepts filter expressions that use the syntax described in Section 3.2.2.2
- of the System for Cross-Domain Identity Management (SCIM) specification, which is available
- at `RFC3339`__. In SCIM filtering expressions,
- text, date, and time values must be enclosed in quotation marks, with date and time values using ISO-8601 format.
- (Numeric and boolean values should not be quoted.)
+ :param list[str] group_by: (optional)
+ The group by parameter to summarize SQL Firewall policy aggregation.
- **Example:** query=(currentUser eq 'SCOTT') and (topLevel eq 'YES')
+ Allowed values are: "violationAction", "enforcementScope", "securityPolicyId", "lifecycleState"
- __ https://tools.ietf.org/html/draft-ietf-scim-api-12
+ :param str lifecycle_state: (optional)
+ The current state of the SQL Firewall policy.
- :param list[str] group_by: (optional)
- The group by parameter to summarize the allowed SQL aggregation.
+ Allowed values are: "CREATING", "UPDATING", "ACTIVE", "INACTIVE", "FAILED", "DELETING", "DELETED", "NEEDS_ATTENTION"
- Allowed values are: "dbUserName", "sqlLevel", "sqlFirewallPolicyId", "lifecycleState"
+ :param str security_policy_id: (optional)
+ An optional filter to return only resources that match the specified OCID of the security policy resource.
+
+ :param datetime time_started: (optional)
+ An optional filter to return the summary of the SQL Firewall policies created after the date-time specified,
+ in the format defined by `RFC3339`__.
+
+ __ https://tools.ietf.org/html/rfc3339
+
+ :param datetime time_ended: (optional)
+ An optional filter to return the summary of the SQL Firewall policies created before the date-time specified,
+ in the format defined by `RFC3339`__.
+
+ __ https://tools.ietf.org/html/rfc3339
:param str opc_request_id: (optional)
Unique identifier for the request.
@@ -24410,18 +27290,18 @@ def list_sql_firewall_allowed_sql_analytics(self, compartment_id, **kwargs):
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.SqlFirewallAllowedSqlAnalyticsCollection`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.SqlFirewallPolicyAnalyticsCollection`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use list_sql_firewall_allowed_sql_analytics API.
+ Click `here `__ to see an example of how to use list_sql_firewall_policy_analytics API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
required_arguments = ['compartmentId']
- resource_path = "/sqlFirewallAllowedSqlAnalytics"
+ resource_path = "/sqlFirewallPolicyAnalytics"
method = "GET"
- operation_name = "list_sql_firewall_allowed_sql_analytics"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SqlFirewallAllowedSqlAnalyticsCollection/ListSqlFirewallAllowedSqlAnalytics"
+ operation_name = "list_sql_firewall_policy_analytics"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SqlFirewallPolicyAnalyticsCollection/ListSqlFirewallPolicyAnalytics"
# Don't accept unknown kwargs
expected_kwargs = [
@@ -24431,14 +27311,17 @@ def list_sql_firewall_allowed_sql_analytics(self, compartment_id, **kwargs):
"access_level",
"limit",
"page",
- "scim_query",
"group_by",
+ "lifecycle_state",
+ "security_policy_id",
+ "time_started",
+ "time_ended",
"opc_request_id"
]
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"list_sql_firewall_allowed_sql_analytics got unknown kwargs: {extra_kwargs!r}")
+ f"list_sql_firewall_policy_analytics got unknown kwargs: {extra_kwargs!r}")
if 'access_level' in kwargs:
access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"]
@@ -24448,21 +27331,31 @@ def list_sql_firewall_allowed_sql_analytics(self, compartment_id, **kwargs):
)
if 'group_by' in kwargs:
- group_by_allowed_values = ["dbUserName", "sqlLevel", "sqlFirewallPolicyId", "lifecycleState"]
+ group_by_allowed_values = ["violationAction", "enforcementScope", "securityPolicyId", "lifecycleState"]
for group_by_item in kwargs['group_by']:
if group_by_item not in group_by_allowed_values:
raise ValueError(
f"Invalid value for `group_by`, must be one of { group_by_allowed_values }"
)
+ if 'lifecycle_state' in kwargs:
+ lifecycle_state_allowed_values = ["CREATING", "UPDATING", "ACTIVE", "INACTIVE", "FAILED", "DELETING", "DELETED", "NEEDS_ATTENTION"]
+ if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values:
+ raise ValueError(
+ f"Invalid value for `lifecycle_state`, must be one of { lifecycle_state_allowed_values }"
+ )
+
query_params = {
"compartmentId": compartment_id,
"compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing),
"accessLevel": kwargs.get("access_level", missing),
"limit": kwargs.get("limit", missing),
"page": kwargs.get("page", missing),
- "scimQuery": kwargs.get("scim_query", missing),
- "groupBy": self.base_client.generate_collection_format_param(kwargs.get("group_by", missing), 'multi')
+ "groupBy": self.base_client.generate_collection_format_param(kwargs.get("group_by", missing), 'multi'),
+ "lifecycleState": kwargs.get("lifecycle_state", missing),
+ "securityPolicyId": kwargs.get("security_policy_id", missing),
+ "timeStarted": kwargs.get("time_started", missing),
+ "timeEnded": kwargs.get("time_ended", missing)
}
query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
@@ -24490,7 +27383,7 @@ def list_sql_firewall_allowed_sql_analytics(self, compartment_id, **kwargs):
method=method,
query_params=query_params,
header_params=header_params,
- response_type="SqlFirewallAllowedSqlAnalyticsCollection",
+ response_type="SqlFirewallPolicyAnalyticsCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -24501,28 +27394,15 @@ def list_sql_firewall_allowed_sql_analytics(self, compartment_id, **kwargs):
method=method,
query_params=query_params,
header_params=header_params,
- response_type="SqlFirewallAllowedSqlAnalyticsCollection",
+ response_type="SqlFirewallPolicyAnalyticsCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def list_sql_firewall_allowed_sqls(self, compartment_id, **kwargs):
+ def list_sql_firewall_violation_analytics(self, compartment_id, **kwargs):
"""
- Retrieves a list of all SQL Firewall allowed SQL statements.
-
- The ListSqlFirewallAllowedSqls operation returns only the SQL Firewall allowed SQL statements in the specified `compartmentId`.
-
- The parameter `accessLevel` specifies whether to return only those compartments for which the
- requestor has INSPECT permissions on at least one resource directly
- or indirectly (ACCESSIBLE) (the resource can be in a subcompartment) or to return Not Authorized if
- Principal doesn't have access to even one of the child compartments. This is valid only when
- `compartmentIdInSubtree` is set to `true`.
-
- The parameter `compartmentIdInSubtree` applies when you perform ListSqlFirewallPolicies on the
- `compartmentId` passed and when it is set to true, the entire hierarchy of compartments can be returned.
- To get a full list of all compartments and subcompartments in the tenancy (root compartment),
- set the parameter `compartmentIdInSubtree` to true and `accessLevel` to ACCESSIBLE.
+ Returns the aggregation details of the SQL Firewall violations.
:param str compartment_id: (required)
@@ -24550,6 +27430,34 @@ def list_sql_firewall_allowed_sqls(self, compartment_id, **kwargs):
__ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
+ :param str opc_request_id: (optional)
+ Unique identifier for the request.
+
+ :param datetime time_started: (optional)
+ An optional filter to return audit events whose creation time in the database is greater than and equal to the date-time specified,
+ in the format defined by `RFC3339`__.
+
+ __ https://tools.ietf.org/html/rfc3339
+
+ :param datetime time_ended: (optional)
+ An optional filter to return audit events whose creation time in the database is less than and equal to the date-time specified,
+ in the format defined by `RFC3339`__.
+
+ __ https://tools.ietf.org/html/rfc3339
+
+ :param str query_time_zone: (optional)
+ Default time zone is UTC if no time zone provided. The date-time considerations of the resource will be in accordance with the specified time zone.
+
+ :param str sort_order: (optional)
+ The sort order to use, either ascending (ASC) or descending (DESC).
+
+ Allowed values are: "ASC", "DESC"
+
+ :param str sort_by: (optional)
+ If this query parameter is specified, the result is sorted by this query parameter value.
+
+ Allowed values are: "dbUserName", "targetId", "targetName", "operationTime", "timeCollected", "clientOsUserName", "operation", "currentDbUserName", "sqlLevel", "clientIp", "clientProgram", "violationCause", "violationAction", "violationCount"
+
:param str scim_query: (optional)
The scimQuery query parameter accepts filter expressions that use the syntax described in Section 3.2.2.2
of the System for Cross-Domain Identity Management (SCIM) specification, which is available
@@ -24557,22 +27465,26 @@ def list_sql_firewall_allowed_sqls(self, compartment_id, **kwargs):
text, date, and time values must be enclosed in quotation marks, with date and time values using ISO-8601 format.
(Numeric and boolean values should not be quoted.)
- **Example:** query=(currentUser eq 'SCOTT') and (topLevel eq 'YES')
+ **Example:** query=(operationTime ge '2021-06-04T01-00-26') and (violationAction eq 'BLOCKED')
__ https://tools.ietf.org/html/draft-ietf-scim-api-12
- :param str sort_order: (optional)
- The sort order to use, either ascending (ASC) or descending (DESC).
+ :param list[str] summary_field: (optional)
+ Specifies a subset of summarized fields to be returned in the response.
- Allowed values are: "ASC", "DESC"
+ Allowed values are: "dbUserName", "targetName", "clientOsUserName", "operation", "sqlText", "currentDbUserName", "sqlLevel", "clientIp", "clientProgram", "violationCause", "violationAction", "selects", "creates", "alters", "drops", "grants", "revokes"
- :param str sort_by: (optional)
- The field to sort by. Only one sort parameter should be provided.
+ :param list[str] group_by: (optional)
+ A groupBy can only be used in combination with summaryField parameter.
+ A groupBy value has to be a subset of the values mentioned in summaryField parameter.
- Allowed values are: "displayName", "timeCollected"
+ Allowed values are: "dbUserName", "targetName", "operationTime", "timeCollected", "clientOsUserName", "operation", "sqlText", "currentDbUserName", "sqlLevel", "clientIp", "clientProgram", "violationCause", "violationAction"
- :param str opc_request_id: (optional)
- Unique identifier for the request.
+ :param str opc_retry_token: (optional)
+ A token that uniquely identifies a request so it can be retried in case of a timeout or
+ server error without risk of executing that same action again. Retry tokens expire after 24
+ hours, but can be invalidated before then due to conflicting operations. For example, if a resource
+ has been deleted and purged from the system, then a retry of the original creation request might be rejected.
:param obj retry_strategy: (optional)
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
@@ -24586,18 +27498,18 @@ def list_sql_firewall_allowed_sqls(self, compartment_id, **kwargs):
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.SqlFirewallAllowedSqlCollection`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.SqlFirewallViolationAnalyticsCollection`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use list_sql_firewall_allowed_sqls API.
+ Click `here `__ to see an example of how to use list_sql_firewall_violation_analytics API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
required_arguments = ['compartmentId']
- resource_path = "/sqlFirewallAllowedSqls"
+ resource_path = "/sqlFirewallViolationAnalytics"
method = "GET"
- operation_name = "list_sql_firewall_allowed_sqls"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SqlFirewallAllowedSqlCollection/ListSqlFirewallAllowedSqls"
+ operation_name = "list_sql_firewall_violation_analytics"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SqlFirewallViolationSummary/ListSqlFirewallViolationAnalytics"
# Don't accept unknown kwargs
expected_kwargs = [
@@ -24607,15 +27519,21 @@ def list_sql_firewall_allowed_sqls(self, compartment_id, **kwargs):
"access_level",
"limit",
"page",
- "scim_query",
+ "opc_request_id",
+ "time_started",
+ "time_ended",
+ "query_time_zone",
"sort_order",
"sort_by",
- "opc_request_id"
+ "scim_query",
+ "summary_field",
+ "group_by",
+ "opc_retry_token"
]
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"list_sql_firewall_allowed_sqls got unknown kwargs: {extra_kwargs!r}")
+ f"list_sql_firewall_violation_analytics got unknown kwargs: {extra_kwargs!r}")
if 'access_level' in kwargs:
access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"]
@@ -24632,28 +27550,50 @@ def list_sql_firewall_allowed_sqls(self, compartment_id, **kwargs):
)
if 'sort_by' in kwargs:
- sort_by_allowed_values = ["displayName", "timeCollected"]
+ sort_by_allowed_values = ["dbUserName", "targetId", "targetName", "operationTime", "timeCollected", "clientOsUserName", "operation", "currentDbUserName", "sqlLevel", "clientIp", "clientProgram", "violationCause", "violationAction", "violationCount"]
if kwargs['sort_by'] not in sort_by_allowed_values:
raise ValueError(
f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
)
+ if 'summary_field' in kwargs:
+ summary_field_allowed_values = ["dbUserName", "targetName", "clientOsUserName", "operation", "sqlText", "currentDbUserName", "sqlLevel", "clientIp", "clientProgram", "violationCause", "violationAction", "selects", "creates", "alters", "drops", "grants", "revokes"]
+ for summary_field_item in kwargs['summary_field']:
+ if summary_field_item not in summary_field_allowed_values:
+ raise ValueError(
+ f"Invalid value for `summary_field`, must be one of { summary_field_allowed_values }"
+ )
+
+ if 'group_by' in kwargs:
+ group_by_allowed_values = ["dbUserName", "targetName", "operationTime", "timeCollected", "clientOsUserName", "operation", "sqlText", "currentDbUserName", "sqlLevel", "clientIp", "clientProgram", "violationCause", "violationAction"]
+ for group_by_item in kwargs['group_by']:
+ if group_by_item not in group_by_allowed_values:
+ raise ValueError(
+ f"Invalid value for `group_by`, must be one of { group_by_allowed_values }"
+ )
+
query_params = {
"compartmentId": compartment_id,
"compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing),
"accessLevel": kwargs.get("access_level", missing),
"limit": kwargs.get("limit", missing),
"page": kwargs.get("page", missing),
- "scimQuery": kwargs.get("scim_query", missing),
+ "timeStarted": kwargs.get("time_started", missing),
+ "timeEnded": kwargs.get("time_ended", missing),
+ "queryTimeZone": kwargs.get("query_time_zone", missing),
"sortOrder": kwargs.get("sort_order", missing),
- "sortBy": kwargs.get("sort_by", missing)
+ "sortBy": kwargs.get("sort_by", missing),
+ "scimQuery": kwargs.get("scim_query", missing),
+ "summaryField": self.base_client.generate_collection_format_param(kwargs.get("summary_field", missing), 'multi'),
+ "groupBy": self.base_client.generate_collection_format_param(kwargs.get("group_by", missing), 'multi')
}
query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
header_params = {
"accept": "application/json",
"content-type": "application/json",
- "opc-request-id": kwargs.get("opc_request_id", missing)
+ "opc-request-id": kwargs.get("opc_request_id", missing),
+ "opc-retry-token": kwargs.get("opc_retry_token", missing)
}
header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
@@ -24666,6 +27606,7 @@ def list_sql_firewall_allowed_sqls(self, compartment_id, **kwargs):
if retry_strategy:
if not isinstance(retry_strategy, retry.NoneRetryStrategy):
+ self.base_client.add_opc_retry_token_if_needed(header_params)
self.base_client.add_opc_client_retries_header(header_params)
retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
return retry_strategy.make_retrying_call(
@@ -24674,7 +27615,7 @@ def list_sql_firewall_allowed_sqls(self, compartment_id, **kwargs):
method=method,
query_params=query_params,
header_params=header_params,
- response_type="SqlFirewallAllowedSqlCollection",
+ response_type="SqlFirewallViolationAnalyticsCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -24685,48 +27626,24 @@ def list_sql_firewall_allowed_sqls(self, compartment_id, **kwargs):
method=method,
query_params=query_params,
header_params=header_params,
- response_type="SqlFirewallAllowedSqlCollection",
+ response_type="SqlFirewallViolationAnalyticsCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def list_sql_firewall_policies(self, compartment_id, **kwargs):
+ def list_sql_firewall_violations(self, compartment_id, **kwargs):
"""
- Retrieves a list of all SQL Firewall policies.
-
- The ListSqlFirewallPolicies operation returns only the SQL Firewall policies in the specified `compartmentId`.
-
- The parameter `accessLevel` specifies whether to return only those compartments for which the
- requestor has INSPECT permissions on at least one resource directly
- or indirectly (ACCESSIBLE) (the resource can be in a subcompartment) or to return Not Authorized if
- Principal doesn't have access to even one of the child compartments. This is valid only when
- `compartmentIdInSubtree` is set to `true`.
-
- The parameter `compartmentIdInSubtree` applies when you perform ListSqlFirewallPolicies on the
- `compartmentId` passed and when it is set to true, the entire hierarchy of compartments can be returned.
- To get a full list of all compartments and subcompartments in the tenancy (root compartment),
- set the parameter `compartmentIdInSubtree` to true and `accessLevel` to ACCESSIBLE.
+ Gets a list of all the SQL Firewall violations captured by the firewall.
:param str compartment_id: (required)
A filter to return only resources that match the specified compartment OCID.
- :param bool compartment_id_in_subtree: (optional)
- Default is false.
- When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting.
-
- :param str access_level: (optional)
- Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED.
- Setting this to ACCESSIBLE returns only those compartments for which the
- user has INSPECT permissions directly or indirectly (permissions can be on a
- resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed.
-
- Allowed values are: "RESTRICTED", "ACCESSIBLE"
-
- :param str display_name: (optional)
- A filter to return only resources that match the specified display name.
-
+ :param bool compartment_id_in_subtree: (optional)
+ Default is false.
+ When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting.
+
:param int limit: (optional)
For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
@@ -24737,41 +27654,16 @@ def list_sql_firewall_policies(self, compartment_id, **kwargs):
__ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
- :param str security_policy_id: (optional)
- An optional filter to return only resources that match the specified OCID of the security policy resource.
-
- :param str lifecycle_state: (optional)
- The current state of the SQL Firewall policy.
-
- Allowed values are: "CREATING", "UPDATING", "ACTIVE", "INACTIVE", "FAILED", "DELETING", "DELETED", "NEEDS_ATTENTION"
-
- :param str sql_firewall_policy_id: (optional)
- An optional filter to return only resources that match the specified OCID of the SQL Firewall policy resource.
-
- :param str db_user_name: (optional)
- A filter to return only items that match the specified user name.
-
- :param str violation_action: (optional)
- An optional filter to return only resources that match the specified violation action.
-
- Allowed values are: "block", "observe"
-
- :param datetime time_created_greater_than_or_equal_to: (optional)
- A filter to return only the resources that were created after the specified date and time, as defined by `RFC3339`__.
- Using TimeCreatedGreaterThanOrEqualToQueryParam parameter retrieves all resources created after that date.
-
- **Example:** 2016-12-19T16:39:57.600Z
-
- __ https://tools.ietf.org/html/rfc3339
+ :param str opc_request_id: (optional)
+ Unique identifier for the request.
- :param datetime time_created_less_than: (optional)
- Search for resources that were created before a specific date.
- Specifying this parameter corresponding `timeCreatedLessThan`
- parameter will retrieve all resources created before the
- specified created date, in \"YYYY-MM-ddThh:mmZ\" format with a Z offset, as
- defined by RFC 3339.
+ :param str access_level: (optional)
+ Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED.
+ Setting this to ACCESSIBLE returns only those compartments for which the
+ user has INSPECT permissions directly or indirectly (permissions can be on a
+ resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed.
- **Example:** 2016-12-19T16:39:57.600Z
+ Allowed values are: "RESTRICTED", "ACCESSIBLE"
:param str sort_order: (optional)
The sort order to use, either ascending (ASC) or descending (DESC).
@@ -24779,14 +27671,20 @@ def list_sql_firewall_policies(self, compartment_id, **kwargs):
Allowed values are: "ASC", "DESC"
:param str sort_by: (optional)
- The field used for sorting. Only one sorting order (sortOrder) can be specified.
- The default order for TIMECREATED is descending. The default order for DISPLAYNAME is ascending.
- The DISPLAYNAME sort order is case sensitive.
+ If this query parameter is specified, the result is sorted by this query parameter value.
- Allowed values are: "TIMECREATED", "DISPLAYNAME"
+ Allowed values are: "dbUserName", "targetId", "targetName", "operationTime", "timeCollected", "clientOsUserName", "operation", "currentDbUserName", "sqlLevel", "clientIp", "clientProgram", "violationCause", "violationAction"
- :param str opc_request_id: (optional)
- Unique identifier for the request.
+ :param str scim_query: (optional)
+ The scimQuery query parameter accepts filter expressions that use the syntax described in Section 3.2.2.2
+ of the System for Cross-Domain Identity Management (SCIM) specification, which is available
+ at `RFC3339`__. In SCIM filtering expressions,
+ text, date, and time values must be enclosed in quotation marks, with date and time values using ISO-8601 format.
+ (Numeric and boolean values should not be quoted.)
+
+ **Example:** query=(operationTime ge '2021-06-04T01-00-26') and (violationAction eq 'BLOCKED')
+
+ __ https://tools.ietf.org/html/draft-ietf-scim-api-12
:param obj retry_strategy: (optional)
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
@@ -24800,43 +27698,36 @@ def list_sql_firewall_policies(self, compartment_id, **kwargs):
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.SqlFirewallPolicyCollection`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.SqlFirewallViolationsCollection`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use list_sql_firewall_policies API.
+ Click `here `__ to see an example of how to use list_sql_firewall_violations API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
required_arguments = ['compartmentId']
- resource_path = "/sqlFirewallPolicies"
+ resource_path = "/sqlFirewallViolations"
method = "GET"
- operation_name = "list_sql_firewall_policies"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SqlFirewallPolicyCollection/ListSqlFirewallPolicies"
+ operation_name = "list_sql_firewall_violations"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SqlFirewallViolationSummary/ListSqlFirewallViolations"
# Don't accept unknown kwargs
expected_kwargs = [
"allow_control_chars",
"retry_strategy",
"compartment_id_in_subtree",
- "access_level",
- "display_name",
"limit",
"page",
- "security_policy_id",
- "lifecycle_state",
- "sql_firewall_policy_id",
- "db_user_name",
- "violation_action",
- "time_created_greater_than_or_equal_to",
- "time_created_less_than",
+ "opc_request_id",
+ "access_level",
"sort_order",
"sort_by",
- "opc_request_id"
+ "scim_query"
]
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"list_sql_firewall_policies got unknown kwargs: {extra_kwargs!r}")
+ f"list_sql_firewall_violations got unknown kwargs: {extra_kwargs!r}")
if 'access_level' in kwargs:
access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"]
@@ -24845,20 +27736,6 @@ def list_sql_firewall_policies(self, compartment_id, **kwargs):
f"Invalid value for `access_level`, must be one of { access_level_allowed_values }"
)
- if 'lifecycle_state' in kwargs:
- lifecycle_state_allowed_values = ["CREATING", "UPDATING", "ACTIVE", "INACTIVE", "FAILED", "DELETING", "DELETED", "NEEDS_ATTENTION"]
- if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values:
- raise ValueError(
- f"Invalid value for `lifecycle_state`, must be one of { lifecycle_state_allowed_values }"
- )
-
- if 'violation_action' in kwargs:
- violation_action_allowed_values = ["block", "observe"]
- if kwargs['violation_action'] not in violation_action_allowed_values:
- raise ValueError(
- f"Invalid value for `violation_action`, must be one of { violation_action_allowed_values }"
- )
-
if 'sort_order' in kwargs:
sort_order_allowed_values = ["ASC", "DESC"]
if kwargs['sort_order'] not in sort_order_allowed_values:
@@ -24867,7 +27744,7 @@ def list_sql_firewall_policies(self, compartment_id, **kwargs):
)
if 'sort_by' in kwargs:
- sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"]
+ sort_by_allowed_values = ["dbUserName", "targetId", "targetName", "operationTime", "timeCollected", "clientOsUserName", "operation", "currentDbUserName", "sqlLevel", "clientIp", "clientProgram", "violationCause", "violationAction"]
if kwargs['sort_by'] not in sort_by_allowed_values:
raise ValueError(
f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
@@ -24876,24 +27753,17 @@ def list_sql_firewall_policies(self, compartment_id, **kwargs):
query_params = {
"compartmentId": compartment_id,
"compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing),
- "accessLevel": kwargs.get("access_level", missing),
- "displayName": kwargs.get("display_name", missing),
"limit": kwargs.get("limit", missing),
"page": kwargs.get("page", missing),
- "securityPolicyId": kwargs.get("security_policy_id", missing),
- "lifecycleState": kwargs.get("lifecycle_state", missing),
- "sqlFirewallPolicyId": kwargs.get("sql_firewall_policy_id", missing),
- "dbUserName": kwargs.get("db_user_name", missing),
- "violationAction": kwargs.get("violation_action", missing),
- "timeCreatedGreaterThanOrEqualTo": kwargs.get("time_created_greater_than_or_equal_to", missing),
- "timeCreatedLessThan": kwargs.get("time_created_less_than", missing),
+ "accessLevel": kwargs.get("access_level", missing),
"sortOrder": kwargs.get("sort_order", missing),
- "sortBy": kwargs.get("sort_by", missing)
+ "sortBy": kwargs.get("sort_by", missing),
+ "scimQuery": kwargs.get("scim_query", 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",
+ "accept": "application/json, application/xml",
"content-type": "application/json",
"opc-request-id": kwargs.get("opc_request_id", missing)
}
@@ -24916,7 +27786,7 @@ def list_sql_firewall_policies(self, compartment_id, **kwargs):
method=method,
query_params=query_params,
header_params=header_params,
- response_type="SqlFirewallPolicyCollection",
+ response_type="SqlFirewallViolationsCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -24927,42 +27797,22 @@ def list_sql_firewall_policies(self, compartment_id, **kwargs):
method=method,
query_params=query_params,
header_params=header_params,
- response_type="SqlFirewallPolicyCollection",
+ response_type="SqlFirewallViolationsCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def list_sql_firewall_policy_analytics(self, compartment_id, **kwargs):
+ def list_tables(self, target_database_id, **kwargs):
"""
- Gets a list of aggregated SQL Firewall policy details.
-
- The parameter `accessLevel` specifies whether to return only those compartments for which the
- requestor has INSPECT permissions on at least one resource directly
- or indirectly (ACCESSIBLE) (the resource can be in a subcompartment) or to return Not Authorized if
- principal doesn't have access to even one of the child compartments. This is valid only when
- `compartmentIdInSubtree` is set to `true`.
-
- The parameter `compartmentIdInSubtree` applies when you perform SummarizedSqlFirewallPolicyInfo on the specified
- `compartmentId` and when it is set to true, the entire hierarchy of compartments can be returned.
- To get a full list of all compartments and subcompartments in the tenancy (root compartment),
- set the parameter `compartmentIdInSubtree` to true and `accessLevel` to ACCESSIBLE.
-
-
- :param str compartment_id: (required)
- A filter to return only resources that match the specified compartment OCID.
+ Returns a list of table metadata objects.
- :param bool compartment_id_in_subtree: (optional)
- Default is false.
- When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting.
- :param str access_level: (optional)
- Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED.
- Setting this to ACCESSIBLE returns only those compartments for which the
- user has INSPECT permissions directly or indirectly (permissions can be on a
- resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed.
+ :param str target_database_id: (required)
+ The OCID of the Data Safe target database.
- Allowed values are: "RESTRICTED", "ACCESSIBLE"
+ :param str opc_request_id: (optional)
+ Unique identifier for the request.
:param int limit: (optional)
For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
@@ -24974,33 +27824,27 @@ def list_sql_firewall_policy_analytics(self, compartment_id, **kwargs):
__ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
- :param list[str] group_by: (optional)
- The group by parameter to summarize SQL Firewall policy aggregation.
-
- Allowed values are: "violationAction", "enforcementScope", "securityPolicyId", "lifecycleState"
-
- :param str lifecycle_state: (optional)
- The current state of the SQL Firewall policy.
+ :param list[str] schema_name: (optional)
+ A filter to return only items related to specific schema name.
- Allowed values are: "CREATING", "UPDATING", "ACTIVE", "INACTIVE", "FAILED", "DELETING", "DELETED", "NEEDS_ATTENTION"
+ :param list[str] table_name: (optional)
+ A filter to return only items related to specific table name.
- :param str security_policy_id: (optional)
- An optional filter to return only resources that match the specified OCID of the security policy resource.
+ :param str sort_order: (optional)
+ The sort order to use, either ascending (ASC) or descending (DESC).
- :param datetime time_started: (optional)
- An optional filter to return the summary of the SQL Firewall policies created after the date-time specified,
- in the format defined by `RFC3339`__.
+ Allowed values are: "ASC", "DESC"
- __ https://tools.ietf.org/html/rfc3339
+ :param str sort_by: (optional)
+ The field used for sorting. Only one sorting order (sortOrder) can be specified.
- :param datetime time_ended: (optional)
- An optional filter to return the summary of the SQL Firewall policies created before the date-time specified,
- in the format defined by `RFC3339`__.
+ Allowed values are: "SCHEMANAME", "TABLENAME"
- __ https://tools.ietf.org/html/rfc3339
+ :param str table_name_contains: (optional)
+ A filter to return only items if table name contains a specific string.
- :param str opc_request_id: (optional)
- Unique identifier for the request.
+ :param str schema_name_contains: (optional)
+ A filter to return only items if schema name contains a specific string.
:param obj retry_strategy: (optional)
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
@@ -25014,72 +27858,71 @@ def list_sql_firewall_policy_analytics(self, compartment_id, **kwargs):
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.SqlFirewallPolicyAnalyticsCollection`
+ :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.data_safe.models.TableSummary`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use list_sql_firewall_policy_analytics API.
+ Click `here `__ to see an example of how to use list_tables API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
- required_arguments = ['compartmentId']
- resource_path = "/sqlFirewallPolicyAnalytics"
+ required_arguments = ['targetDatabaseId']
+ resource_path = "/targetDatabases/{targetDatabaseId}/tables"
method = "GET"
- operation_name = "list_sql_firewall_policy_analytics"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SqlFirewallPolicyAnalyticsCollection/ListSqlFirewallPolicyAnalytics"
+ operation_name = "list_tables"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/TargetDatabase/ListTables"
# Don't accept unknown kwargs
expected_kwargs = [
"allow_control_chars",
"retry_strategy",
- "compartment_id_in_subtree",
- "access_level",
+ "opc_request_id",
"limit",
"page",
- "group_by",
- "lifecycle_state",
- "security_policy_id",
- "time_started",
- "time_ended",
- "opc_request_id"
+ "schema_name",
+ "table_name",
+ "sort_order",
+ "sort_by",
+ "table_name_contains",
+ "schema_name_contains"
]
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"list_sql_firewall_policy_analytics got unknown kwargs: {extra_kwargs!r}")
+ f"list_tables got unknown kwargs: {extra_kwargs!r}")
- if 'access_level' in kwargs:
- access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"]
- if kwargs['access_level'] not in access_level_allowed_values:
+ path_params = {
+ "targetDatabaseId": target_database_id
+ }
+
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
+
+ for (k, v) in six.iteritems(path_params):
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
+ raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
+
+ if 'sort_order' in kwargs:
+ sort_order_allowed_values = ["ASC", "DESC"]
+ if kwargs['sort_order'] not in sort_order_allowed_values:
raise ValueError(
- f"Invalid value for `access_level`, must be one of { access_level_allowed_values }"
+ f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }"
)
- if 'group_by' in kwargs:
- group_by_allowed_values = ["violationAction", "enforcementScope", "securityPolicyId", "lifecycleState"]
- for group_by_item in kwargs['group_by']:
- if group_by_item not in group_by_allowed_values:
- raise ValueError(
- f"Invalid value for `group_by`, must be one of { group_by_allowed_values }"
- )
-
- if 'lifecycle_state' in kwargs:
- lifecycle_state_allowed_values = ["CREATING", "UPDATING", "ACTIVE", "INACTIVE", "FAILED", "DELETING", "DELETED", "NEEDS_ATTENTION"]
- if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values:
+ if 'sort_by' in kwargs:
+ sort_by_allowed_values = ["SCHEMANAME", "TABLENAME"]
+ if kwargs['sort_by'] not in sort_by_allowed_values:
raise ValueError(
- f"Invalid value for `lifecycle_state`, must be one of { lifecycle_state_allowed_values }"
+ f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
)
- query_params = {
- "compartmentId": compartment_id,
- "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing),
- "accessLevel": kwargs.get("access_level", missing),
+ query_params = {
"limit": kwargs.get("limit", missing),
"page": kwargs.get("page", missing),
- "groupBy": self.base_client.generate_collection_format_param(kwargs.get("group_by", missing), 'multi'),
- "lifecycleState": kwargs.get("lifecycle_state", missing),
- "securityPolicyId": kwargs.get("security_policy_id", missing),
- "timeStarted": kwargs.get("time_started", missing),
- "timeEnded": kwargs.get("time_ended", missing)
+ "schemaName": self.base_client.generate_collection_format_param(kwargs.get("schema_name", missing), 'multi'),
+ "tableName": self.base_client.generate_collection_format_param(kwargs.get("table_name", missing), 'multi'),
+ "sortOrder": kwargs.get("sort_order", missing),
+ "sortBy": kwargs.get("sort_by", missing),
+ "tableNameContains": kwargs.get("table_name_contains", missing),
+ "schemaNameContains": kwargs.get("schema_name_contains", missing)
}
query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
@@ -25105,9 +27948,10 @@ def list_sql_firewall_policy_analytics(self, compartment_id, **kwargs):
self.base_client.call_api,
resource_path=resource_path,
method=method,
+ path_params=path_params,
query_params=query_params,
header_params=header_params,
- response_type="SqlFirewallPolicyAnalyticsCollection",
+ response_type="list[TableSummary]",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -25116,33 +27960,36 @@ def list_sql_firewall_policy_analytics(self, compartment_id, **kwargs):
return self.base_client.call_api(
resource_path=resource_path,
method=method,
+ path_params=path_params,
query_params=query_params,
header_params=header_params,
- response_type="SqlFirewallPolicyAnalyticsCollection",
+ response_type="list[TableSummary]",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def list_sql_firewall_violation_analytics(self, compartment_id, **kwargs):
+ def list_target_alert_policy_associations(self, compartment_id, **kwargs):
"""
- Returns the aggregation details of the SQL Firewall violations.
+ Gets a list of all target-alert policy associations.
:param str compartment_id: (required)
A filter to return only resources that match the specified compartment OCID.
- :param bool compartment_id_in_subtree: (optional)
- Default is false.
- When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting.
+ :param str target_alert_policy_association_id: (optional)
+ A filter to return only items related to a specific target-alert policy association ID.
- :param str access_level: (optional)
- Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED.
- Setting this to ACCESSIBLE returns only those compartments for which the
- user has INSPECT permissions directly or indirectly (permissions can be on a
- resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed.
+ :param str alert_policy_id: (optional)
+ A filter to return policy by it's OCID.
- Allowed values are: "RESTRICTED", "ACCESSIBLE"
+ :param str target_id: (optional)
+ A filter to return only items related to a specific target OCID.
+
+ :param str lifecycle_state: (optional)
+ An optional filter to return only alert policies that have the given life-cycle state.
+
+ Allowed values are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED"
:param int limit: (optional)
For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
@@ -25154,61 +28001,47 @@ def list_sql_firewall_violation_analytics(self, compartment_id, **kwargs):
__ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
- :param str opc_request_id: (optional)
- Unique identifier for the request.
-
- :param datetime time_started: (optional)
- An optional filter to return audit events whose creation time in the database is greater than and equal to the date-time specified,
- in the format defined by `RFC3339`__.
-
- __ https://tools.ietf.org/html/rfc3339
-
- :param datetime time_ended: (optional)
- An optional filter to return audit events whose creation time in the database is less than and equal to the date-time specified,
- in the format defined by `RFC3339`__.
-
- __ https://tools.ietf.org/html/rfc3339
-
- :param str query_time_zone: (optional)
- Default time zone is UTC if no time zone provided. The date-time considerations of the resource will be in accordance with the specified time zone.
-
:param str sort_order: (optional)
The sort order to use, either ascending (ASC) or descending (DESC).
Allowed values are: "ASC", "DESC"
:param str sort_by: (optional)
- If this query parameter is specified, the result is sorted by this query parameter value.
+ The field to sort by. Only one sort parameter may be provided.
- Allowed values are: "dbUserName", "targetId", "targetName", "operationTime", "timeCollected", "clientOsUserName", "operation", "currentDbUserName", "sqlLevel", "clientIp", "clientProgram", "violationCause", "violationAction", "violationCount"
+ Allowed values are: "DISPLAYNAME", "TIMECREATED", "TIMEUPDATED"
- :param str scim_query: (optional)
- The scimQuery query parameter accepts filter expressions that use the syntax described in Section 3.2.2.2
- of the System for Cross-Domain Identity Management (SCIM) specification, which is available
- at `RFC3339`__. In SCIM filtering expressions,
- text, date, and time values must be enclosed in quotation marks, with date and time values using ISO-8601 format.
- (Numeric and boolean values should not be quoted.)
+ :param str opc_request_id: (optional)
+ Unique identifier for the request.
- **Example:** query=(operationTime ge '2021-06-04T01-00-26') and (violationAction eq 'BLOCKED')
+ :param datetime time_created_greater_than_or_equal_to: (optional)
+ A filter to return only the resources that were created after the specified date and time, as defined by `RFC3339`__.
+ Using TimeCreatedGreaterThanOrEqualToQueryParam parameter retrieves all resources created after that date.
- __ https://tools.ietf.org/html/draft-ietf-scim-api-12
+ **Example:** 2016-12-19T16:39:57.600Z
- :param list[str] summary_field: (optional)
- Specifies a subset of summarized fields to be returned in the response.
+ __ https://tools.ietf.org/html/rfc3339
- Allowed values are: "dbUserName", "targetName", "clientOsUserName", "operation", "sqlText", "currentDbUserName", "sqlLevel", "clientIp", "clientProgram", "violationCause", "violationAction", "selects", "creates", "alters", "drops", "grants", "revokes"
+ :param datetime time_created_less_than: (optional)
+ Search for resources that were created before a specific date.
+ Specifying this parameter corresponding `timeCreatedLessThan`
+ parameter will retrieve all resources created before the
+ specified created date, in \"YYYY-MM-ddThh:mmZ\" format with a Z offset, as
+ defined by RFC 3339.
- :param list[str] group_by: (optional)
- A groupBy can only be used in combination with summaryField parameter.
- A groupBy value has to be a subset of the values mentioned in summaryField parameter.
+ **Example:** 2016-12-19T16:39:57.600Z
- Allowed values are: "dbUserName", "targetName", "operationTime", "timeCollected", "clientOsUserName", "operation", "sqlText", "currentDbUserName", "sqlLevel", "clientIp", "clientProgram", "violationCause", "violationAction"
+ :param bool compartment_id_in_subtree: (optional)
+ Default is false.
+ When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting.
- :param str opc_retry_token: (optional)
- A token that uniquely identifies a request so it can be retried in case of a timeout or
- server error without risk of executing that same action again. Retry tokens expire after 24
- hours, but can be invalidated before then due to conflicting operations. For example, if a resource
- has been deleted and purged from the system, then a retry of the original creation request might be rejected.
+ :param str access_level: (optional)
+ Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED.
+ Setting this to ACCESSIBLE returns only those compartments for which the
+ user has INSPECT permissions directly or indirectly (permissions can be on a
+ resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed.
+
+ Allowed values are: "RESTRICTED", "ACCESSIBLE"
:param obj retry_strategy: (optional)
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
@@ -25222,48 +28055,47 @@ def list_sql_firewall_violation_analytics(self, compartment_id, **kwargs):
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.SqlFirewallViolationAnalyticsCollection`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.TargetAlertPolicyAssociationCollection`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use list_sql_firewall_violation_analytics API.
+ Click `here `__ to see an example of how to use list_target_alert_policy_associations API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
required_arguments = ['compartmentId']
- resource_path = "/sqlFirewallViolationAnalytics"
+ resource_path = "/targetAlertPolicyAssociations"
method = "GET"
- operation_name = "list_sql_firewall_violation_analytics"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SqlFirewallViolationSummary/ListSqlFirewallViolationAnalytics"
+ operation_name = "list_target_alert_policy_associations"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/TargetAlertPolicyAssociationSummary/ListTargetAlertPolicyAssociations"
# Don't accept unknown kwargs
expected_kwargs = [
"allow_control_chars",
"retry_strategy",
- "compartment_id_in_subtree",
- "access_level",
+ "target_alert_policy_association_id",
+ "alert_policy_id",
+ "target_id",
+ "lifecycle_state",
"limit",
"page",
- "opc_request_id",
- "time_started",
- "time_ended",
- "query_time_zone",
"sort_order",
"sort_by",
- "scim_query",
- "summary_field",
- "group_by",
- "opc_retry_token"
+ "opc_request_id",
+ "time_created_greater_than_or_equal_to",
+ "time_created_less_than",
+ "compartment_id_in_subtree",
+ "access_level"
]
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"list_sql_firewall_violation_analytics got unknown kwargs: {extra_kwargs!r}")
+ f"list_target_alert_policy_associations got unknown kwargs: {extra_kwargs!r}")
- if 'access_level' in kwargs:
- access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"]
- if kwargs['access_level'] not in access_level_allowed_values:
+ if 'lifecycle_state' in kwargs:
+ lifecycle_state_allowed_values = ["CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED"]
+ if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values:
raise ValueError(
- f"Invalid value for `access_level`, must be one of { access_level_allowed_values }"
+ f"Invalid value for `lifecycle_state`, must be one of { lifecycle_state_allowed_values }"
)
if 'sort_order' in kwargs:
@@ -25274,50 +28106,40 @@ def list_sql_firewall_violation_analytics(self, compartment_id, **kwargs):
)
if 'sort_by' in kwargs:
- sort_by_allowed_values = ["dbUserName", "targetId", "targetName", "operationTime", "timeCollected", "clientOsUserName", "operation", "currentDbUserName", "sqlLevel", "clientIp", "clientProgram", "violationCause", "violationAction", "violationCount"]
+ sort_by_allowed_values = ["DISPLAYNAME", "TIMECREATED", "TIMEUPDATED"]
if kwargs['sort_by'] not in sort_by_allowed_values:
raise ValueError(
f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
)
- if 'summary_field' in kwargs:
- summary_field_allowed_values = ["dbUserName", "targetName", "clientOsUserName", "operation", "sqlText", "currentDbUserName", "sqlLevel", "clientIp", "clientProgram", "violationCause", "violationAction", "selects", "creates", "alters", "drops", "grants", "revokes"]
- for summary_field_item in kwargs['summary_field']:
- if summary_field_item not in summary_field_allowed_values:
- raise ValueError(
- f"Invalid value for `summary_field`, must be one of { summary_field_allowed_values }"
- )
-
- if 'group_by' in kwargs:
- group_by_allowed_values = ["dbUserName", "targetName", "operationTime", "timeCollected", "clientOsUserName", "operation", "sqlText", "currentDbUserName", "sqlLevel", "clientIp", "clientProgram", "violationCause", "violationAction"]
- for group_by_item in kwargs['group_by']:
- if group_by_item not in group_by_allowed_values:
- raise ValueError(
- f"Invalid value for `group_by`, must be one of { group_by_allowed_values }"
- )
+ if 'access_level' in kwargs:
+ access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"]
+ if kwargs['access_level'] not in access_level_allowed_values:
+ raise ValueError(
+ f"Invalid value for `access_level`, must be one of { access_level_allowed_values }"
+ )
query_params = {
+ "targetAlertPolicyAssociationId": kwargs.get("target_alert_policy_association_id", missing),
+ "alertPolicyId": kwargs.get("alert_policy_id", missing),
+ "targetId": kwargs.get("target_id", missing),
"compartmentId": compartment_id,
- "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing),
- "accessLevel": kwargs.get("access_level", missing),
+ "lifecycleState": kwargs.get("lifecycle_state", missing),
"limit": kwargs.get("limit", missing),
"page": kwargs.get("page", missing),
- "timeStarted": kwargs.get("time_started", missing),
- "timeEnded": kwargs.get("time_ended", missing),
- "queryTimeZone": kwargs.get("query_time_zone", missing),
"sortOrder": kwargs.get("sort_order", missing),
"sortBy": kwargs.get("sort_by", missing),
- "scimQuery": kwargs.get("scim_query", missing),
- "summaryField": self.base_client.generate_collection_format_param(kwargs.get("summary_field", missing), 'multi'),
- "groupBy": self.base_client.generate_collection_format_param(kwargs.get("group_by", missing), 'multi')
+ "timeCreatedGreaterThanOrEqualTo": kwargs.get("time_created_greater_than_or_equal_to", missing),
+ "timeCreatedLessThan": kwargs.get("time_created_less_than", missing),
+ "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing),
+ "accessLevel": kwargs.get("access_level", missing)
}
query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
header_params = {
"accept": "application/json",
"content-type": "application/json",
- "opc-request-id": kwargs.get("opc_request_id", missing),
- "opc-retry-token": kwargs.get("opc_retry_token", missing)
+ "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}
@@ -25330,7 +28152,6 @@ def list_sql_firewall_violation_analytics(self, compartment_id, **kwargs):
if retry_strategy:
if not isinstance(retry_strategy, retry.NoneRetryStrategy):
- self.base_client.add_opc_retry_token_if_needed(header_params)
self.base_client.add_opc_client_retries_header(header_params)
retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
return retry_strategy.make_retrying_call(
@@ -25339,7 +28160,7 @@ def list_sql_firewall_violation_analytics(self, compartment_id, **kwargs):
method=method,
query_params=query_params,
header_params=header_params,
- response_type="SqlFirewallViolationAnalyticsCollection",
+ response_type="TargetAlertPolicyAssociationCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -25350,23 +28171,43 @@ def list_sql_firewall_violation_analytics(self, compartment_id, **kwargs):
method=method,
query_params=query_params,
header_params=header_params,
- response_type="SqlFirewallViolationAnalyticsCollection",
+ response_type="TargetAlertPolicyAssociationCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def list_sql_firewall_violations(self, compartment_id, **kwargs):
+ def list_target_databases(self, compartment_id, **kwargs):
"""
- Gets a list of all the SQL Firewall violations captured by the firewall.
+ Returns the list of registered target databases in Data Safe.
:param str compartment_id: (required)
A filter to return only resources that match the specified compartment OCID.
- :param bool compartment_id_in_subtree: (optional)
- Default is false.
- When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting.
+ :param str associated_resource_id: (optional)
+ A filter to return the target databases that are associated to the resource id passed in as a parameter value.
+
+ :param str target_database_id: (optional)
+ A filter to return the target database that matches the specified OCID.
+
+ :param str display_name: (optional)
+ A filter to return only resources that match the specified display name.
+
+ :param str lifecycle_state: (optional)
+ A filter to return only target databases that match the specified lifecycle state.
+
+ Allowed values are: "CREATING", "UPDATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", "NEEDS_ATTENTION", "FAILED"
+
+ :param str database_type: (optional)
+ A filter to return only target databases that match the specified database type.
+
+ Allowed values are: "DATABASE_CLOUD_SERVICE", "AUTONOMOUS_DATABASE", "INSTALLED_DATABASE"
+
+ :param str infrastructure_type: (optional)
+ A filter to return only target databases that match the specified infrastructure type.
+
+ Allowed values are: "ORACLE_CLOUD", "CLOUD_AT_CUSTOMER", "ON_PREMISES", "NON_ORACLE_CLOUD"
:param int limit: (optional)
For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
@@ -25378,8 +28219,9 @@ def list_sql_firewall_violations(self, compartment_id, **kwargs):
__ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
- :param str opc_request_id: (optional)
- Unique identifier for the request.
+ :param bool compartment_id_in_subtree: (optional)
+ Default is false.
+ When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting.
:param str access_level: (optional)
Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED.
@@ -25395,20 +28237,14 @@ def list_sql_firewall_violations(self, compartment_id, **kwargs):
Allowed values are: "ASC", "DESC"
:param str sort_by: (optional)
- If this query parameter is specified, the result is sorted by this query parameter value.
-
- Allowed values are: "dbUserName", "targetId", "targetName", "operationTime", "timeCollected", "clientOsUserName", "operation", "currentDbUserName", "sqlLevel", "clientIp", "clientProgram", "violationCause", "violationAction"
-
- :param str scim_query: (optional)
- The scimQuery query parameter accepts filter expressions that use the syntax described in Section 3.2.2.2
- of the System for Cross-Domain Identity Management (SCIM) specification, which is available
- at `RFC3339`__. In SCIM filtering expressions,
- text, date, and time values must be enclosed in quotation marks, with date and time values using ISO-8601 format.
- (Numeric and boolean values should not be quoted.)
+ The field used for sorting. Only one sorting order (sortOrder) can be specified.
+ The default order for TIMECREATED is descending. The default order for DISPLAYNAME is ascending.
+ The DISPLAYNAME sort order is case sensitive.
- **Example:** query=(operationTime ge '2021-06-04T01-00-26') and (violationAction eq 'BLOCKED')
+ Allowed values are: "TIMECREATED", "DISPLAYNAME"
- __ https://tools.ietf.org/html/draft-ietf-scim-api-12
+ :param str opc_request_id: (optional)
+ Unique identifier for the request.
:param obj retry_strategy: (optional)
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
@@ -25422,36 +28258,62 @@ def list_sql_firewall_violations(self, compartment_id, **kwargs):
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.SqlFirewallViolationsCollection`
+ :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.data_safe.models.TargetDatabaseSummary`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use list_sql_firewall_violations API.
+ Click `here `__ to see an example of how to use list_target_databases API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
required_arguments = ['compartmentId']
- resource_path = "/sqlFirewallViolations"
- method = "GET"
- operation_name = "list_sql_firewall_violations"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SqlFirewallViolationSummary/ListSqlFirewallViolations"
+ resource_path = "/targetDatabases"
+ method = "GET"
+ operation_name = "list_target_databases"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/TargetDatabaseSummary/ListTargetDatabases"
# Don't accept unknown kwargs
expected_kwargs = [
"allow_control_chars",
"retry_strategy",
- "compartment_id_in_subtree",
+ "associated_resource_id",
+ "target_database_id",
+ "display_name",
+ "lifecycle_state",
+ "database_type",
+ "infrastructure_type",
"limit",
"page",
- "opc_request_id",
+ "compartment_id_in_subtree",
"access_level",
"sort_order",
"sort_by",
- "scim_query"
+ "opc_request_id"
]
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"list_sql_firewall_violations got unknown kwargs: {extra_kwargs!r}")
+ f"list_target_databases got unknown kwargs: {extra_kwargs!r}")
+
+ if 'lifecycle_state' in kwargs:
+ lifecycle_state_allowed_values = ["CREATING", "UPDATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", "NEEDS_ATTENTION", "FAILED"]
+ if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values:
+ raise ValueError(
+ f"Invalid value for `lifecycle_state`, must be one of { lifecycle_state_allowed_values }"
+ )
+
+ if 'database_type' in kwargs:
+ database_type_allowed_values = ["DATABASE_CLOUD_SERVICE", "AUTONOMOUS_DATABASE", "INSTALLED_DATABASE"]
+ if kwargs['database_type'] not in database_type_allowed_values:
+ raise ValueError(
+ f"Invalid value for `database_type`, must be one of { database_type_allowed_values }"
+ )
+
+ if 'infrastructure_type' in kwargs:
+ infrastructure_type_allowed_values = ["ORACLE_CLOUD", "CLOUD_AT_CUSTOMER", "ON_PREMISES", "NON_ORACLE_CLOUD"]
+ if kwargs['infrastructure_type'] not in infrastructure_type_allowed_values:
+ raise ValueError(
+ f"Invalid value for `infrastructure_type`, must be one of { infrastructure_type_allowed_values }"
+ )
if 'access_level' in kwargs:
access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"]
@@ -25468,7 +28330,7 @@ def list_sql_firewall_violations(self, compartment_id, **kwargs):
)
if 'sort_by' in kwargs:
- sort_by_allowed_values = ["dbUserName", "targetId", "targetName", "operationTime", "timeCollected", "clientOsUserName", "operation", "currentDbUserName", "sqlLevel", "clientIp", "clientProgram", "violationCause", "violationAction"]
+ sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"]
if kwargs['sort_by'] not in sort_by_allowed_values:
raise ValueError(
f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
@@ -25476,18 +28338,23 @@ def list_sql_firewall_violations(self, compartment_id, **kwargs):
query_params = {
"compartmentId": compartment_id,
- "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing),
+ "associatedResourceId": kwargs.get("associated_resource_id", missing),
+ "targetDatabaseId": kwargs.get("target_database_id", missing),
+ "displayName": kwargs.get("display_name", missing),
+ "lifecycleState": kwargs.get("lifecycle_state", missing),
+ "databaseType": kwargs.get("database_type", missing),
+ "infrastructureType": kwargs.get("infrastructure_type", missing),
"limit": kwargs.get("limit", missing),
"page": kwargs.get("page", missing),
+ "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing),
"accessLevel": kwargs.get("access_level", missing),
"sortOrder": kwargs.get("sort_order", missing),
- "sortBy": kwargs.get("sort_by", missing),
- "scimQuery": kwargs.get("scim_query", missing)
+ "sortBy": kwargs.get("sort_by", missing)
}
query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
header_params = {
- "accept": "application/json, application/xml",
+ "accept": "application/json",
"content-type": "application/json",
"opc-request-id": kwargs.get("opc_request_id", missing)
}
@@ -25510,7 +28377,7 @@ def list_sql_firewall_violations(self, compartment_id, **kwargs):
method=method,
query_params=query_params,
header_params=header_params,
- response_type="SqlFirewallViolationsCollection",
+ response_type="list[TargetDatabaseSummary]",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -25521,22 +28388,29 @@ def list_sql_firewall_violations(self, compartment_id, **kwargs):
method=method,
query_params=query_params,
header_params=header_params,
- response_type="SqlFirewallViolationsCollection",
+ response_type="list[TargetDatabaseSummary]",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def list_tables(self, target_database_id, **kwargs):
+ def list_user_access_analytics(self, user_assessment_id, **kwargs):
"""
- Returns a list of table metadata objects.
+ Gets a list of aggregated user access analytics in the specified target in a compartment.
- :param str target_database_id: (required)
- The OCID of the Data Safe target database.
+ :param str user_assessment_id: (required)
+ The OCID of the user assessment.
- :param str opc_request_id: (optional)
- Unique identifier for the request.
+ :param str sort_by: (optional)
+ The field to sort by. Only one sort parameter may be provided.
+
+ Allowed values are: "USERNAME", "COUNT"
+
+ :param str sort_order: (optional)
+ The sort order to use, either ascending (ASC) or descending (DESC).
+
+ Allowed values are: "ASC", "DESC"
:param int limit: (optional)
For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
@@ -25548,27 +28422,8 @@ def list_tables(self, target_database_id, **kwargs):
__ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
- :param list[str] schema_name: (optional)
- A filter to return only items related to specific schema name.
-
- :param list[str] table_name: (optional)
- A filter to return only items related to specific table name.
-
- :param str sort_order: (optional)
- The sort order to use, either ascending (ASC) or descending (DESC).
-
- Allowed values are: "ASC", "DESC"
-
- :param str sort_by: (optional)
- The field used for sorting. Only one sorting order (sortOrder) can be specified.
-
- Allowed values are: "SCHEMANAME", "TABLENAME"
-
- :param str table_name_contains: (optional)
- A filter to return only items if table name contains a specific string.
-
- :param str schema_name_contains: (optional)
- A filter to return only items if schema name contains a specific string.
+ :param str opc_request_id: (optional)
+ Unique identifier for the request.
:param obj retry_strategy: (optional)
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
@@ -25582,40 +28437,36 @@ def list_tables(self, target_database_id, **kwargs):
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.data_safe.models.TableSummary`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.UserAccessAnalyticsCollection`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use list_tables API.
+ Click `here `__ to see an example of how to use list_user_access_analytics API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
- required_arguments = ['targetDatabaseId']
- resource_path = "/targetDatabases/{targetDatabaseId}/tables"
+ required_arguments = ['userAssessmentId']
+ resource_path = "/userAssessments/{userAssessmentId}/userAccessAnalytics"
method = "GET"
- operation_name = "list_tables"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/TargetDatabase/ListTables"
+ operation_name = "list_user_access_analytics"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/UserAssessment/ListUserAccessAnalytics"
# Don't accept unknown kwargs
expected_kwargs = [
"allow_control_chars",
"retry_strategy",
- "opc_request_id",
+ "sort_by",
+ "sort_order",
"limit",
"page",
- "schema_name",
- "table_name",
- "sort_order",
- "sort_by",
- "table_name_contains",
- "schema_name_contains"
+ "opc_request_id"
]
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"list_tables got unknown kwargs: {extra_kwargs!r}")
+ f"list_user_access_analytics got unknown kwargs: {extra_kwargs!r}")
path_params = {
- "targetDatabaseId": target_database_id
+ "userAssessmentId": user_assessment_id
}
path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
@@ -25624,6 +28475,13 @@ def list_tables(self, target_database_id, **kwargs):
if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
+ if 'sort_by' in kwargs:
+ sort_by_allowed_values = ["USERNAME", "COUNT"]
+ if kwargs['sort_by'] not in sort_by_allowed_values:
+ raise ValueError(
+ f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
+ )
+
if 'sort_order' in kwargs:
sort_order_allowed_values = ["ASC", "DESC"]
if kwargs['sort_order'] not in sort_order_allowed_values:
@@ -25631,22 +28489,11 @@ def list_tables(self, target_database_id, **kwargs):
f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }"
)
- if 'sort_by' in kwargs:
- sort_by_allowed_values = ["SCHEMANAME", "TABLENAME"]
- if kwargs['sort_by'] not in sort_by_allowed_values:
- raise ValueError(
- f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
- )
-
query_params = {
- "limit": kwargs.get("limit", missing),
- "page": kwargs.get("page", missing),
- "schemaName": self.base_client.generate_collection_format_param(kwargs.get("schema_name", missing), 'multi'),
- "tableName": self.base_client.generate_collection_format_param(kwargs.get("table_name", missing), 'multi'),
- "sortOrder": kwargs.get("sort_order", missing),
"sortBy": kwargs.get("sort_by", missing),
- "tableNameContains": kwargs.get("table_name_contains", missing),
- "schemaNameContains": kwargs.get("schema_name_contains", missing)
+ "sortOrder": kwargs.get("sort_order", 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}
@@ -25675,7 +28522,7 @@ def list_tables(self, target_database_id, **kwargs):
path_params=path_params,
query_params=query_params,
header_params=header_params,
- response_type="list[TableSummary]",
+ response_type="UserAccessAnalyticsCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -25687,85 +28534,125 @@ def list_tables(self, target_database_id, **kwargs):
path_params=path_params,
query_params=query_params,
header_params=header_params,
- response_type="list[TableSummary]",
+ response_type="UserAccessAnalyticsCollection",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def list_target_alert_policy_associations(self, compartment_id, **kwargs):
+ def list_user_analytics(self, user_assessment_id, **kwargs):
"""
- Gets a list of all target-alert policy associations.
+ Gets a list of aggregated user details from the specified user assessment. This provides information about the overall state.
+ of database user security. For example, the user details include how many users have the DBA role and how many users are in
+ the critical category. This data is especially useful content for dashboards or to support analytics.
+ When you perform the ListUserAnalytics operation, if the parameter compartmentIdInSubtree is set to \"true,\" and if the
+ parameter accessLevel is set to ACCESSIBLE, then the operation returns compartments in which the requestor has INSPECT
+ permissions on at least one resource, directly or indirectly (in subcompartments). If the operation is performed at the
+ root compartment and the requestor does not have access to at least one subcompartment of the compartment specified by
+ compartmentId, then \"Not Authorized\" is returned.
- :param str compartment_id: (required)
- A filter to return only resources that match the specified compartment OCID.
+ The parameter compartmentIdInSubtree applies when you perform ListUserAnalytics on the compartmentId passed and when it is
+ set to true, the entire hierarchy of compartments can be returned.
- :param str target_alert_policy_association_id: (optional)
- A filter to return only items related to a specific target-alert policy association ID.
+ To use ListUserAnalytics to get a full list of all compartments and subcompartments in the tenancy from the root compartment,
+ set the parameter compartmentIdInSubtree to true and accessLevel to ACCESSIBLE.
- :param str alert_policy_id: (optional)
- A filter to return policy by it's OCID.
- :param str target_id: (optional)
- A filter to return only items related to a specific target OCID.
+ :param str user_assessment_id: (required)
+ The OCID of the user assessment.
- :param str lifecycle_state: (optional)
- An optional filter to return only alert policies that have the given life-cycle state.
+ :param bool compartment_id_in_subtree: (optional)
+ Default is false.
+ When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting.
- Allowed values are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED"
+ :param str access_level: (optional)
+ Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED.
+ Setting this to ACCESSIBLE returns only those compartments for which the
+ user has INSPECT permissions directly or indirectly (permissions can be on a
+ resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed.
+
+ Allowed values are: "RESTRICTED", "ACCESSIBLE"
:param int limit: (optional)
For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
__ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
- :param str page: (optional)
- For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__.
+ :param str user_category: (optional)
+ A filter to return only items that match the specified user category.
- __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
+ :param str user_key: (optional)
+ A filter to return only items that match the specified user key.
- :param str sort_order: (optional)
- The sort order to use, either ascending (ASC) or descending (DESC).
+ :param str account_status: (optional)
+ A filter to return only items that match the specified account status.
- Allowed values are: "ASC", "DESC"
+ :param str authentication_type: (optional)
+ A filter to return only items that match the specified authentication type.
- :param str sort_by: (optional)
- The field to sort by. Only one sort parameter may be provided.
+ :param str user_name: (optional)
+ A filter to return only items that match the specified user name.
- Allowed values are: "DISPLAYNAME", "TIMECREATED", "TIMEUPDATED"
+ :param str target_id: (optional)
+ A filter to return only items related to a specific target OCID.
- :param str opc_request_id: (optional)
- Unique identifier for the request.
+ :param datetime time_last_login_greater_than_or_equal_to: (optional)
+ A filter to return users whose last login time in the database is greater than or equal to the date and time specified, in the format defined by `RFC3339`__.
- :param datetime time_created_greater_than_or_equal_to: (optional)
- A filter to return only the resources that were created after the specified date and time, as defined by `RFC3339`__.
- Using TimeCreatedGreaterThanOrEqualToQueryParam parameter retrieves all resources created after that date.
+ **Example:** 2016-12-19T16:39:57.600Z
+
+ __ https://tools.ietf.org/html/rfc3339
+ :param datetime time_last_login_less_than: (optional)
+ A filter to return users whose last login time in the database is less than the date and time specified, in the format defined by `RFC3339`__.
**Example:** 2016-12-19T16:39:57.600Z
__ https://tools.ietf.org/html/rfc3339
- :param datetime time_created_less_than: (optional)
- Search for resources that were created before a specific date.
- Specifying this parameter corresponding `timeCreatedLessThan`
- parameter will retrieve all resources created before the
- specified created date, in \"YYYY-MM-ddThh:mmZ\" format with a Z offset, as
- defined by RFC 3339.
+ :param datetime time_user_created_greater_than_or_equal_to: (optional)
+ A filter to return users whose creation time in the database is greater than or equal to the date and time specified, in the format defined by `RFC3339`__.
+ **Example:** 2016-12-19T16:39:57.600Z
+
+ __ https://tools.ietf.org/html/rfc3339
+
+ :param datetime time_user_created_less_than: (optional)
+ A filter to return users whose creation time in the database is less than the date and time specified, in the format defined by `RFC3339`__.
+ **Example:** 2016-12-19T16:39:57.600Z
+
+ __ https://tools.ietf.org/html/rfc3339
+
+ :param datetime time_password_last_changed_greater_than_or_equal_to: (optional)
+ A filter to return users whose last password change in the database is greater than or equal to the date and time specified, in the format defined by `RFC3339`__.
**Example:** 2016-12-19T16:39:57.600Z
- :param bool compartment_id_in_subtree: (optional)
- Default is false.
- When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting.
+ __ https://tools.ietf.org/html/rfc3339
- :param str access_level: (optional)
- Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED.
- Setting this to ACCESSIBLE returns only those compartments for which the
- user has INSPECT permissions directly or indirectly (permissions can be on a
- resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed.
+ :param datetime time_password_last_changed_less_than: (optional)
+ A filter to return users whose last password change in the database is less than the date and time specified, in the format defined by `RFC3339`__.
+
+ **Example:** 2016-12-19T16:39:57.600Z
+
+ __ https://tools.ietf.org/html/rfc3339
+
+ :param str page: (optional)
+ For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__.
+
+ __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
+
+ :param str sort_order: (optional)
+ The sort order to use, either ascending (ASC) or descending (DESC).
+
+ Allowed values are: "ASC", "DESC"
- Allowed values are: "RESTRICTED", "ACCESSIBLE"
+ :param str sort_by: (optional)
+ The field to sort by. You can specify only one sort order (sortOrder). The default order for userName is ascending.
+
+ Allowed values are: "userName", "userCategory", "accountStatus", "timeLastLogin", "targetId", "timeUserCreated", "authenticationType", "timePasswordChanged"
+
+ :param str opc_request_id: (optional)
+ Unique identifier for the request.
:param obj retry_strategy: (optional)
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
@@ -25779,47 +28666,63 @@ def list_target_alert_policy_associations(self, compartment_id, **kwargs):
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.TargetAlertPolicyAssociationCollection`
+ :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.data_safe.models.UserAggregation`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use list_target_alert_policy_associations API.
+ Click `here `__ to see an example of how to use list_user_analytics API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
- required_arguments = ['compartmentId']
- resource_path = "/targetAlertPolicyAssociations"
+ required_arguments = ['userAssessmentId']
+ resource_path = "/userAssessments/{userAssessmentId}/userAnalytics"
method = "GET"
- operation_name = "list_target_alert_policy_associations"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/TargetAlertPolicyAssociationSummary/ListTargetAlertPolicyAssociations"
+ operation_name = "list_user_analytics"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/UserAssessment/ListUserAnalytics"
# Don't accept unknown kwargs
expected_kwargs = [
"allow_control_chars",
"retry_strategy",
- "target_alert_policy_association_id",
- "alert_policy_id",
- "target_id",
- "lifecycle_state",
+ "compartment_id_in_subtree",
+ "access_level",
"limit",
+ "user_category",
+ "user_key",
+ "account_status",
+ "authentication_type",
+ "user_name",
+ "target_id",
+ "time_last_login_greater_than_or_equal_to",
+ "time_last_login_less_than",
+ "time_user_created_greater_than_or_equal_to",
+ "time_user_created_less_than",
+ "time_password_last_changed_greater_than_or_equal_to",
+ "time_password_last_changed_less_than",
"page",
"sort_order",
"sort_by",
- "opc_request_id",
- "time_created_greater_than_or_equal_to",
- "time_created_less_than",
- "compartment_id_in_subtree",
- "access_level"
+ "opc_request_id"
]
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"list_target_alert_policy_associations got unknown kwargs: {extra_kwargs!r}")
+ f"list_user_analytics got unknown kwargs: {extra_kwargs!r}")
- if 'lifecycle_state' in kwargs:
- lifecycle_state_allowed_values = ["CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED"]
- if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values:
+ path_params = {
+ "userAssessmentId": user_assessment_id
+ }
+
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
+
+ for (k, v) in six.iteritems(path_params):
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
+ raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
+
+ if 'access_level' in kwargs:
+ access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"]
+ if kwargs['access_level'] not in access_level_allowed_values:
raise ValueError(
- f"Invalid value for `lifecycle_state`, must be one of { lifecycle_state_allowed_values }"
+ f"Invalid value for `access_level`, must be one of { access_level_allowed_values }"
)
if 'sort_order' in kwargs:
@@ -25830,33 +28733,31 @@ def list_target_alert_policy_associations(self, compartment_id, **kwargs):
)
if 'sort_by' in kwargs:
- sort_by_allowed_values = ["DISPLAYNAME", "TIMECREATED", "TIMEUPDATED"]
+ sort_by_allowed_values = ["userName", "userCategory", "accountStatus", "timeLastLogin", "targetId", "timeUserCreated", "authenticationType", "timePasswordChanged"]
if kwargs['sort_by'] not in sort_by_allowed_values:
raise ValueError(
f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
)
- if 'access_level' in kwargs:
- access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"]
- if kwargs['access_level'] not in access_level_allowed_values:
- raise ValueError(
- f"Invalid value for `access_level`, must be one of { access_level_allowed_values }"
- )
-
query_params = {
- "targetAlertPolicyAssociationId": kwargs.get("target_alert_policy_association_id", missing),
- "alertPolicyId": kwargs.get("alert_policy_id", missing),
- "targetId": kwargs.get("target_id", missing),
- "compartmentId": compartment_id,
- "lifecycleState": kwargs.get("lifecycle_state", missing),
+ "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing),
+ "accessLevel": kwargs.get("access_level", missing),
"limit": kwargs.get("limit", missing),
+ "userCategory": kwargs.get("user_category", missing),
+ "userKey": kwargs.get("user_key", missing),
+ "accountStatus": kwargs.get("account_status", missing),
+ "authenticationType": kwargs.get("authentication_type", missing),
+ "userName": kwargs.get("user_name", missing),
+ "targetId": kwargs.get("target_id", missing),
+ "timeLastLoginGreaterThanOrEqualTo": kwargs.get("time_last_login_greater_than_or_equal_to", missing),
+ "timeLastLoginLessThan": kwargs.get("time_last_login_less_than", missing),
+ "timeUserCreatedGreaterThanOrEqualTo": kwargs.get("time_user_created_greater_than_or_equal_to", missing),
+ "timeUserCreatedLessThan": kwargs.get("time_user_created_less_than", missing),
+ "timePasswordLastChangedGreaterThanOrEqualTo": kwargs.get("time_password_last_changed_greater_than_or_equal_to", missing),
+ "timePasswordLastChangedLessThan": kwargs.get("time_password_last_changed_less_than", missing),
"page": kwargs.get("page", missing),
"sortOrder": kwargs.get("sort_order", missing),
- "sortBy": kwargs.get("sort_by", missing),
- "timeCreatedGreaterThanOrEqualTo": kwargs.get("time_created_greater_than_or_equal_to", missing),
- "timeCreatedLessThan": kwargs.get("time_created_less_than", missing),
- "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing),
- "accessLevel": kwargs.get("access_level", missing)
+ "sortBy": kwargs.get("sort_by", missing)
}
query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
@@ -25882,9 +28783,10 @@ def list_target_alert_policy_associations(self, compartment_id, **kwargs):
self.base_client.call_api,
resource_path=resource_path,
method=method,
+ path_params=path_params,
query_params=query_params,
header_params=header_params,
- response_type="TargetAlertPolicyAssociationCollection",
+ response_type="list[UserAggregation]",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -25893,45 +28795,90 @@ def list_target_alert_policy_associations(self, compartment_id, **kwargs):
return self.base_client.call_api(
resource_path=resource_path,
method=method,
+ path_params=path_params,
query_params=query_params,
header_params=header_params,
- response_type="TargetAlertPolicyAssociationCollection",
+ response_type="list[UserAggregation]",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def list_target_databases(self, compartment_id, **kwargs):
+ def list_user_assessments(self, compartment_id, **kwargs):
"""
- Returns the list of registered target databases in Data Safe.
+ Gets a list of user assessments.
+
+ The ListUserAssessments operation returns only the assessments in the specified `compartmentId`.
+ The list does not include any subcompartments of the compartmentId passed.
+
+ The parameter `accessLevel` specifies whether to return only those compartments for which the
+ requestor has INSPECT permissions on at least one resource directly
+ or indirectly (ACCESSIBLE) (the resource can be in a subcompartment) or to return Not Authorized if
+ Principal doesn't have access to even one of the child compartments. This is valid only when
+ `compartmentIdInSubtree` is set to `true`.
+
+ The parameter `compartmentIdInSubtree` applies when you perform ListUserAssessments on the
+ `compartmentId` passed and when it is set to true, the entire hierarchy of compartments can be returned.
+ To get a full list of all compartments and subcompartments in the tenancy (root compartment),
+ set the parameter `compartmentIdInSubtree` to true and `accessLevel` to ACCESSIBLE.
:param str compartment_id: (required)
A filter to return only resources that match the specified compartment OCID.
- :param str associated_resource_id: (optional)
- A filter to return the target databases that are associated to the resource id passed in as a parameter value.
+ :param bool compartment_id_in_subtree: (optional)
+ Default is false.
+ When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting.
- :param str target_database_id: (optional)
- A filter to return the target database that matches the specified OCID.
+ :param str access_level: (optional)
+ Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED.
+ Setting this to ACCESSIBLE returns only those compartments for which the
+ user has INSPECT permissions directly or indirectly (permissions can be on a
+ resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed.
+
+ Allowed values are: "RESTRICTED", "ACCESSIBLE"
:param str display_name: (optional)
A filter to return only resources that match the specified display name.
- :param str lifecycle_state: (optional)
- A filter to return only target databases that match the specified lifecycle state.
+ :param str schedule_user_assessment_id: (optional)
+ The OCID of the user assessment of type SAVE_SCHEDULE.
- Allowed values are: "CREATING", "UPDATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", "NEEDS_ATTENTION", "FAILED"
+ :param bool is_schedule_assessment: (optional)
+ A filter to return only user assessments of type SAVE_SCHEDULE.
- :param str database_type: (optional)
- A filter to return only target databases that match the specified database type.
+ :param bool is_baseline: (optional)
+ A filter to return only user assessments that are set as baseline.
- Allowed values are: "DATABASE_CLOUD_SERVICE", "AUTONOMOUS_DATABASE", "INSTALLED_DATABASE"
+ :param str target_id: (optional)
+ A filter to return only items related to a specific target OCID.
- :param str infrastructure_type: (optional)
- A filter to return only target databases that match the specified infrastructure type.
+ :param str type: (optional)
+ A filter to return only items that match the specified assessment type.
- Allowed values are: "ORACLE_CLOUD", "CLOUD_AT_CUSTOMER", "ON_PREMISES", "NON_ORACLE_CLOUD"
+ Allowed values are: "LATEST", "SAVED", "COMPARTMENT", "SAVE_SCHEDULE"
+
+ :param str triggered_by: (optional)
+ A filter to return user assessments that were created by either the system or by a user only.
+
+ Allowed values are: "USER", "SYSTEM"
+
+ :param datetime time_created_greater_than_or_equal_to: (optional)
+ A filter to return only user assessments that were created after the specified date and time, as defined by `RFC3339`__.
+ Using timeCreatedGreaterThanOrEqualTo parameter retrieves all assessments created after that date.
+
+ **Example:** 2016-12-19T16:39:57.600Z
+
+ __ https://tools.ietf.org/html/rfc3339
+
+ :param datetime time_created_less_than: (optional)
+ Search for resources that were created before a specific date.
+ Specifying this parameter corresponding `timeCreatedLessThan`
+ parameter will retrieve all resources created before the
+ specified created date, in \"YYYY-MM-ddThh:mmZ\" format with a Z offset, as
+ defined by RFC 3339.
+
+ **Example:** 2016-12-19T16:39:57.600Z
:param int limit: (optional)
For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
@@ -25943,17 +28890,10 @@ def list_target_databases(self, compartment_id, **kwargs):
__ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
- :param bool compartment_id_in_subtree: (optional)
- Default is false.
- When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting.
-
- :param str access_level: (optional)
- Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED.
- Setting this to ACCESSIBLE returns only those compartments for which the
- user has INSPECT permissions directly or indirectly (permissions can be on a
- resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed.
+ :param str lifecycle_state: (optional)
+ The current state of the user assessment.
- Allowed values are: "RESTRICTED", "ACCESSIBLE"
+ Allowed values are: "CREATING", "SUCCEEDED", "UPDATING", "DELETING", "DELETED", "FAILED"
:param str sort_order: (optional)
The sort order to use, either ascending (ASC) or descending (DESC).
@@ -25961,11 +28901,9 @@ def list_target_databases(self, compartment_id, **kwargs):
Allowed values are: "ASC", "DESC"
:param str sort_by: (optional)
- The field used for sorting. Only one sorting order (sortOrder) can be specified.
- The default order for TIMECREATED is descending. The default order for DISPLAYNAME is ascending.
- The DISPLAYNAME sort order is case sensitive.
+ The field to sort by. You can specify only one sort order (sortOrder). The default order for timeCreated is descending.
- Allowed values are: "TIMECREATED", "DISPLAYNAME"
+ Allowed values are: "timeCreated", "displayName"
:param str opc_request_id: (optional)
Unique identifier for the request.
@@ -25982,33 +28920,37 @@ def list_target_databases(self, compartment_id, **kwargs):
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.data_safe.models.TargetDatabaseSummary`
+ :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.data_safe.models.UserAssessmentSummary`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use list_target_databases API.
+ Click `here `__ to see an example of how to use list_user_assessments API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
required_arguments = ['compartmentId']
- resource_path = "/targetDatabases"
+ resource_path = "/userAssessments"
method = "GET"
- operation_name = "list_target_databases"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/TargetDatabaseSummary/ListTargetDatabases"
+ operation_name = "list_user_assessments"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/UserAssessmentSummary/ListUserAssessments"
# Don't accept unknown kwargs
expected_kwargs = [
"allow_control_chars",
"retry_strategy",
- "associated_resource_id",
- "target_database_id",
+ "compartment_id_in_subtree",
+ "access_level",
"display_name",
- "lifecycle_state",
- "database_type",
- "infrastructure_type",
+ "schedule_user_assessment_id",
+ "is_schedule_assessment",
+ "is_baseline",
+ "target_id",
+ "type",
+ "triggered_by",
+ "time_created_greater_than_or_equal_to",
+ "time_created_less_than",
"limit",
"page",
- "compartment_id_in_subtree",
- "access_level",
+ "lifecycle_state",
"sort_order",
"sort_by",
"opc_request_id"
@@ -26016,34 +28958,34 @@ def list_target_databases(self, compartment_id, **kwargs):
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"list_target_databases got unknown kwargs: {extra_kwargs!r}")
+ f"list_user_assessments got unknown kwargs: {extra_kwargs!r}")
- if 'lifecycle_state' in kwargs:
- lifecycle_state_allowed_values = ["CREATING", "UPDATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", "NEEDS_ATTENTION", "FAILED"]
- if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values:
+ if 'access_level' in kwargs:
+ access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"]
+ if kwargs['access_level'] not in access_level_allowed_values:
raise ValueError(
- f"Invalid value for `lifecycle_state`, must be one of { lifecycle_state_allowed_values }"
+ f"Invalid value for `access_level`, must be one of { access_level_allowed_values }"
)
- if 'database_type' in kwargs:
- database_type_allowed_values = ["DATABASE_CLOUD_SERVICE", "AUTONOMOUS_DATABASE", "INSTALLED_DATABASE"]
- if kwargs['database_type'] not in database_type_allowed_values:
+ if 'type' in kwargs:
+ type_allowed_values = ["LATEST", "SAVED", "COMPARTMENT", "SAVE_SCHEDULE"]
+ if kwargs['type'] not in type_allowed_values:
raise ValueError(
- f"Invalid value for `database_type`, must be one of { database_type_allowed_values }"
+ f"Invalid value for `type`, must be one of { type_allowed_values }"
)
- if 'infrastructure_type' in kwargs:
- infrastructure_type_allowed_values = ["ORACLE_CLOUD", "CLOUD_AT_CUSTOMER", "ON_PREMISES", "NON_ORACLE_CLOUD"]
- if kwargs['infrastructure_type'] not in infrastructure_type_allowed_values:
+ if 'triggered_by' in kwargs:
+ triggered_by_allowed_values = ["USER", "SYSTEM"]
+ if kwargs['triggered_by'] not in triggered_by_allowed_values:
raise ValueError(
- f"Invalid value for `infrastructure_type`, must be one of { infrastructure_type_allowed_values }"
+ f"Invalid value for `triggered_by`, must be one of { triggered_by_allowed_values }"
)
- if 'access_level' in kwargs:
- access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"]
- if kwargs['access_level'] not in access_level_allowed_values:
+ if 'lifecycle_state' in kwargs:
+ lifecycle_state_allowed_values = ["CREATING", "SUCCEEDED", "UPDATING", "DELETING", "DELETED", "FAILED"]
+ if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values:
raise ValueError(
- f"Invalid value for `access_level`, must be one of { access_level_allowed_values }"
+ f"Invalid value for `lifecycle_state`, must be one of { lifecycle_state_allowed_values }"
)
if 'sort_order' in kwargs:
@@ -26054,7 +28996,7 @@ def list_target_databases(self, compartment_id, **kwargs):
)
if 'sort_by' in kwargs:
- sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"]
+ sort_by_allowed_values = ["timeCreated", "displayName"]
if kwargs['sort_by'] not in sort_by_allowed_values:
raise ValueError(
f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
@@ -26062,16 +29004,20 @@ def list_target_databases(self, compartment_id, **kwargs):
query_params = {
"compartmentId": compartment_id,
- "associatedResourceId": kwargs.get("associated_resource_id", missing),
- "targetDatabaseId": kwargs.get("target_database_id", missing),
+ "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing),
+ "accessLevel": kwargs.get("access_level", missing),
"displayName": kwargs.get("display_name", missing),
- "lifecycleState": kwargs.get("lifecycle_state", missing),
- "databaseType": kwargs.get("database_type", missing),
- "infrastructureType": kwargs.get("infrastructure_type", missing),
+ "scheduleUserAssessmentId": kwargs.get("schedule_user_assessment_id", missing),
+ "isScheduleAssessment": kwargs.get("is_schedule_assessment", missing),
+ "isBaseline": kwargs.get("is_baseline", missing),
+ "targetId": kwargs.get("target_id", missing),
+ "type": kwargs.get("type", missing),
+ "triggeredBy": kwargs.get("triggered_by", missing),
+ "timeCreatedGreaterThanOrEqualTo": kwargs.get("time_created_greater_than_or_equal_to", missing),
+ "timeCreatedLessThan": kwargs.get("time_created_less_than", missing),
"limit": kwargs.get("limit", missing),
"page": kwargs.get("page", missing),
- "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing),
- "accessLevel": kwargs.get("access_level", missing),
+ "lifecycleState": kwargs.get("lifecycle_state", missing),
"sortOrder": kwargs.get("sort_order", missing),
"sortBy": kwargs.get("sort_by", missing)
}
@@ -26101,7 +29047,7 @@ def list_target_databases(self, compartment_id, **kwargs):
method=method,
query_params=query_params,
header_params=header_params,
- response_type="list[TargetDatabaseSummary]",
+ response_type="list[UserAssessmentSummary]",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -26112,34 +29058,28 @@ def list_target_databases(self, compartment_id, **kwargs):
method=method,
query_params=query_params,
header_params=header_params,
- response_type="list[TargetDatabaseSummary]",
+ response_type="list[UserAssessmentSummary]",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def list_user_analytics(self, user_assessment_id, **kwargs):
+ def list_users(self, user_assessment_id, **kwargs):
"""
- Gets a list of aggregated user details from the specified user assessment. This provides information about the overall state.
- of database user security. For example, the user details include how many users have the DBA role and how many users are in
- the critical category. This data is especially useful content for dashboards or to support analytics.
-
- When you perform the ListUserAnalytics operation, if the parameter compartmentIdInSubtree is set to \"true,\" and if the
- parameter accessLevel is set to ACCESSIBLE, then the operation returns compartments in which the requestor has INSPECT
- permissions on at least one resource, directly or indirectly (in subcompartments). If the operation is performed at the
- root compartment and the requestor does not have access to at least one subcompartment of the compartment specified by
- compartmentId, then \"Not Authorized\" is returned.
-
- The parameter compartmentIdInSubtree applies when you perform ListUserAnalytics on the compartmentId passed and when it is
- set to true, the entire hierarchy of compartments can be returned.
-
- To use ListUserAnalytics to get a full list of all compartments and subcompartments in the tenancy from the root compartment,
- set the parameter compartmentIdInSubtree to true and accessLevel to ACCESSIBLE.
+ Gets a list of users of the specified user assessment. The result contains the database user details for each user, such
+ as user type, account status, last login time, user creation time, authentication type, user profile, and the date and time
+ of the latest password change. It also contains the user category derived from these user details as well as privileges
+ granted to each user.
:param str user_assessment_id: (required)
The OCID of the user assessment.
+ :param int limit: (optional)
+ For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
+
+ __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
+
:param bool compartment_id_in_subtree: (optional)
Default is false.
When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting.
@@ -26152,14 +29092,24 @@ def list_user_analytics(self, user_assessment_id, **kwargs):
Allowed values are: "RESTRICTED", "ACCESSIBLE"
- :param int limit: (optional)
- For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
-
- __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
-
:param str user_category: (optional)
A filter to return only items that match the specified user category.
+ :param str user_role: (optional)
+ A filter to return only items that match the specified user role.
+
+ :param str user_profile: (optional)
+ A filter to return only items that match the specified user profile.
+
+ :param str user_type: (optional)
+ A filter to return only items that match the specified user type. The possible values can be
+ - ADMIN_PRIVILEGED
+ - APPLICATION
+ - PRIVILEGED
+ - SCHEMA
+ - NON_PRIVILEGED
+ as specified by '#/definitions/userTypes'.
+
:param str user_key: (optional)
A filter to return only items that match the specified user key.
@@ -26232,6 +29182,12 @@ def list_user_analytics(self, user_assessment_id, **kwargs):
:param str opc_request_id: (optional)
Unique identifier for the request.
+ :param list[str] schema_list: (optional)
+ A filter to return items that contain the specified schema list.
+
+ :param bool are_all_schemas_accessible: (optional)
+ A filter to return only items that match the criteria that all schemas can be accessed by a user.
+
:param obj retry_strategy: (optional)
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
@@ -26244,27 +29200,30 @@ def list_user_analytics(self, user_assessment_id, **kwargs):
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.data_safe.models.UserAggregation`
+ :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.data_safe.models.UserSummary`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use list_user_analytics API.
+ Click `here `__ to see an example of how to use list_users API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
required_arguments = ['userAssessmentId']
- resource_path = "/userAssessments/{userAssessmentId}/userAnalytics"
+ resource_path = "/userAssessments/{userAssessmentId}/users"
method = "GET"
- operation_name = "list_user_analytics"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/UserAssessment/ListUserAnalytics"
+ operation_name = "list_users"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/UserAssessment/ListUsers"
# Don't accept unknown kwargs
expected_kwargs = [
"allow_control_chars",
"retry_strategy",
+ "limit",
"compartment_id_in_subtree",
"access_level",
- "limit",
"user_category",
+ "user_role",
+ "user_profile",
+ "user_type",
"user_key",
"account_status",
"authentication_type",
@@ -26279,12 +29238,14 @@ def list_user_analytics(self, user_assessment_id, **kwargs):
"page",
"sort_order",
"sort_by",
- "opc_request_id"
+ "opc_request_id",
+ "schema_list",
+ "are_all_schemas_accessible"
]
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"list_user_analytics got unknown kwargs: {extra_kwargs!r}")
+ f"list_users got unknown kwargs: {extra_kwargs!r}")
path_params = {
"userAssessmentId": user_assessment_id
@@ -26318,10 +29279,13 @@ def list_user_analytics(self, user_assessment_id, **kwargs):
)
query_params = {
+ "limit": kwargs.get("limit", missing),
"compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing),
"accessLevel": kwargs.get("access_level", missing),
- "limit": kwargs.get("limit", missing),
"userCategory": kwargs.get("user_category", missing),
+ "userRole": kwargs.get("user_role", missing),
+ "userProfile": kwargs.get("user_profile", missing),
+ "userType": kwargs.get("user_type", missing),
"userKey": kwargs.get("user_key", missing),
"accountStatus": kwargs.get("account_status", missing),
"authenticationType": kwargs.get("authentication_type", missing),
@@ -26335,7 +29299,9 @@ def list_user_analytics(self, user_assessment_id, **kwargs):
"timePasswordLastChangedLessThan": kwargs.get("time_password_last_changed_less_than", missing),
"page": kwargs.get("page", missing),
"sortOrder": kwargs.get("sort_order", missing),
- "sortBy": kwargs.get("sort_by", missing)
+ "sortBy": kwargs.get("sort_by", missing),
+ "schemaList": self.base_client.generate_collection_format_param(kwargs.get("schema_list", missing), 'multi'),
+ "areAllSchemasAccessible": kwargs.get("are_all_schemas_accessible", missing)
}
query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
@@ -26364,7 +29330,7 @@ def list_user_analytics(self, user_assessment_id, **kwargs):
path_params=path_params,
query_params=query_params,
header_params=header_params,
- response_type="list[UserAggregation]",
+ response_type="list[UserSummary]",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -26376,115 +29342,150 @@ def list_user_analytics(self, user_assessment_id, **kwargs):
path_params=path_params,
query_params=query_params,
header_params=header_params,
- response_type="list[UserAggregation]",
+ response_type="list[UserSummary]",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def list_user_assessments(self, compartment_id, **kwargs):
+ def list_work_request_errors(self, work_request_id, **kwargs):
"""
- Gets a list of user assessments.
+ Gets a list of errors for the specified work request.
- The ListUserAssessments operation returns only the assessments in the specified `compartmentId`.
- The list does not include any subcompartments of the compartmentId passed.
- The parameter `accessLevel` specifies whether to return only those compartments for which the
- requestor has INSPECT permissions on at least one resource directly
- or indirectly (ACCESSIBLE) (the resource can be in a subcompartment) or to return Not Authorized if
- Principal doesn't have access to even one of the child compartments. This is valid only when
- `compartmentIdInSubtree` is set to `true`.
+ :param str work_request_id: (required)
+ The OCID of the work request.
- The parameter `compartmentIdInSubtree` applies when you perform ListUserAssessments on the
- `compartmentId` passed and when it is set to true, the entire hierarchy of compartments can be returned.
- To get a full list of all compartments and subcompartments in the tenancy (root compartment),
- set the parameter `compartmentIdInSubtree` to true and `accessLevel` to ACCESSIBLE.
+ :param str opc_request_id: (optional)
+ Unique identifier for the request.
+ :param str page: (optional)
+ For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__.
- :param str compartment_id: (required)
- A filter to return only resources that match the specified compartment OCID.
+ __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
- :param bool compartment_id_in_subtree: (optional)
- Default is false.
- When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting.
+ :param int limit: (optional)
+ For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
- :param str access_level: (optional)
- Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED.
- Setting this to ACCESSIBLE returns only those compartments for which the
- user has INSPECT permissions directly or indirectly (permissions can be on a
- resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed.
+ __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
- Allowed values are: "RESTRICTED", "ACCESSIBLE"
+ :param obj retry_strategy: (optional)
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
- :param str display_name: (optional)
- A filter to return only resources that match the specified display name.
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
+ The specifics of the default retry strategy are described `here `__.
- :param str schedule_user_assessment_id: (optional)
- The OCID of the user assessment of type SAVE_SCHEDULE.
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
- :param bool is_schedule_assessment: (optional)
- A filter to return only user assessments of type SAVE_SCHEDULE.
+ :param bool allow_control_chars: (optional)
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
+ By default, the response will not allow control characters in strings
- :param bool is_baseline: (optional)
- A filter to return only user assessments that are set as baseline.
+ :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.data_safe.models.WorkRequestError`
+ :rtype: :class:`~oci.response.Response`
- :param str target_id: (optional)
- A filter to return only items related to a specific target OCID.
+ :example:
+ Click `here `__ to see an example of how to use list_work_request_errors API.
+ """
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
+ required_arguments = ['workRequestId']
+ resource_path = "/workRequests/{workRequestId}/errors"
+ method = "GET"
+ operation_name = "list_work_request_errors"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/WorkRequestError/ListWorkRequestErrors"
- :param str type: (optional)
- A filter to return only items that match the specified assessment type.
+ # Don't accept unknown kwargs
+ expected_kwargs = [
+ "allow_control_chars",
+ "retry_strategy",
+ "opc_request_id",
+ "page",
+ "limit"
+ ]
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
+ if extra_kwargs:
+ raise ValueError(
+ f"list_work_request_errors got unknown kwargs: {extra_kwargs!r}")
- Allowed values are: "LATEST", "SAVED", "COMPARTMENT", "SAVE_SCHEDULE"
+ path_params = {
+ "workRequestId": work_request_id
+ }
- :param str triggered_by: (optional)
- A filter to return user assessments that were created by either the system or by a user only.
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
- Allowed values are: "USER", "SYSTEM"
+ for (k, v) in six.iteritems(path_params):
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
+ raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
- :param datetime time_created_greater_than_or_equal_to: (optional)
- A filter to return only user assessments that were created after the specified date and time, as defined by `RFC3339`__.
- Using timeCreatedGreaterThanOrEqualTo parameter retrieves all assessments created after that date.
+ query_params = {
+ "page": kwargs.get("page", missing),
+ "limit": kwargs.get("limit", missing)
+ }
+ query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
- **Example:** 2016-12-19T16:39:57.600Z
+ 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}
- __ https://tools.ietf.org/html/rfc3339
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
+ operation_retry_strategy=kwargs.get('retry_strategy'),
+ client_retry_strategy=self.retry_strategy
+ )
+ if retry_strategy is None:
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
- :param datetime time_created_less_than: (optional)
- Search for resources that were created before a specific date.
- Specifying this parameter corresponding `timeCreatedLessThan`
- parameter will retrieve all resources created before the
- specified created date, in \"YYYY-MM-ddThh:mmZ\" format with a Z offset, as
- defined by RFC 3339.
+ if retry_strategy:
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
+ self.base_client.add_opc_client_retries_header(header_params)
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
+ return retry_strategy.make_retrying_call(
+ self.base_client.call_api,
+ resource_path=resource_path,
+ method=method,
+ path_params=path_params,
+ query_params=query_params,
+ header_params=header_params,
+ response_type="list[WorkRequestError]",
+ allow_control_chars=kwargs.get('allow_control_chars'),
+ operation_name=operation_name,
+ api_reference_link=api_reference_link,
+ required_arguments=required_arguments)
+ else:
+ return self.base_client.call_api(
+ resource_path=resource_path,
+ method=method,
+ path_params=path_params,
+ query_params=query_params,
+ header_params=header_params,
+ response_type="list[WorkRequestError]",
+ allow_control_chars=kwargs.get('allow_control_chars'),
+ operation_name=operation_name,
+ api_reference_link=api_reference_link,
+ required_arguments=required_arguments)
+
+ def list_work_request_logs(self, work_request_id, **kwargs):
+ """
+ Gets a list of log entries for the specified work request.
- **Example:** 2016-12-19T16:39:57.600Z
- :param int limit: (optional)
- For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
+ :param str work_request_id: (required)
+ The OCID of the work request.
- __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
+ :param str opc_request_id: (optional)
+ Unique identifier for the request.
:param str page: (optional)
For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__.
__ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
- :param str lifecycle_state: (optional)
- The current state of the user assessment.
-
- Allowed values are: "CREATING", "SUCCEEDED", "UPDATING", "DELETING", "DELETED", "FAILED"
-
- :param str sort_order: (optional)
- The sort order to use, either ascending (ASC) or descending (DESC).
-
- Allowed values are: "ASC", "DESC"
-
- :param str sort_by: (optional)
- The field to sort by. You can specify only one sort order (sortOrder). The default order for timeCreated is descending.
-
- Allowed values are: "timeCreated", "displayName"
+ :param int limit: (optional)
+ For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
- :param str opc_request_id: (optional)
- Unique identifier for the request.
+ __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
:param obj retry_strategy: (optional)
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
@@ -26498,106 +29499,45 @@ def list_user_assessments(self, compartment_id, **kwargs):
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.data_safe.models.UserAssessmentSummary`
+ :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.data_safe.models.WorkRequestLogEntry`
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use list_user_assessments API.
+ Click `here `__ to see an example of how to use list_work_request_logs API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
- required_arguments = ['compartmentId']
- resource_path = "/userAssessments"
+ required_arguments = ['workRequestId']
+ resource_path = "/workRequests/{workRequestId}/logs"
method = "GET"
- operation_name = "list_user_assessments"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/UserAssessmentSummary/ListUserAssessments"
+ operation_name = "list_work_request_logs"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/WorkRequestLogEntry/ListWorkRequestLogs"
# Don't accept unknown kwargs
expected_kwargs = [
"allow_control_chars",
"retry_strategy",
- "compartment_id_in_subtree",
- "access_level",
- "display_name",
- "schedule_user_assessment_id",
- "is_schedule_assessment",
- "is_baseline",
- "target_id",
- "type",
- "triggered_by",
- "time_created_greater_than_or_equal_to",
- "time_created_less_than",
- "limit",
+ "opc_request_id",
"page",
- "lifecycle_state",
- "sort_order",
- "sort_by",
- "opc_request_id"
+ "limit"
]
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"list_user_assessments got unknown kwargs: {extra_kwargs!r}")
-
- if 'access_level' in kwargs:
- access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"]
- if kwargs['access_level'] not in access_level_allowed_values:
- raise ValueError(
- f"Invalid value for `access_level`, must be one of { access_level_allowed_values }"
- )
-
- if 'type' in kwargs:
- type_allowed_values = ["LATEST", "SAVED", "COMPARTMENT", "SAVE_SCHEDULE"]
- if kwargs['type'] not in type_allowed_values:
- raise ValueError(
- f"Invalid value for `type`, must be one of { type_allowed_values }"
- )
-
- if 'triggered_by' in kwargs:
- triggered_by_allowed_values = ["USER", "SYSTEM"]
- if kwargs['triggered_by'] not in triggered_by_allowed_values:
- raise ValueError(
- f"Invalid value for `triggered_by`, must be one of { triggered_by_allowed_values }"
- )
+ f"list_work_request_logs got unknown kwargs: {extra_kwargs!r}")
- if 'lifecycle_state' in kwargs:
- lifecycle_state_allowed_values = ["CREATING", "SUCCEEDED", "UPDATING", "DELETING", "DELETED", "FAILED"]
- if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values:
- raise ValueError(
- f"Invalid value for `lifecycle_state`, must be one of { lifecycle_state_allowed_values }"
- )
+ path_params = {
+ "workRequestId": work_request_id
+ }
- if 'sort_order' in kwargs:
- sort_order_allowed_values = ["ASC", "DESC"]
- if kwargs['sort_order'] not in sort_order_allowed_values:
- raise ValueError(
- f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }"
- )
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
- if 'sort_by' in kwargs:
- sort_by_allowed_values = ["timeCreated", "displayName"]
- if kwargs['sort_by'] not in sort_by_allowed_values:
- raise ValueError(
- f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
- )
+ for (k, v) in six.iteritems(path_params):
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
+ raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
query_params = {
- "compartmentId": compartment_id,
- "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing),
- "accessLevel": kwargs.get("access_level", missing),
- "displayName": kwargs.get("display_name", missing),
- "scheduleUserAssessmentId": kwargs.get("schedule_user_assessment_id", missing),
- "isScheduleAssessment": kwargs.get("is_schedule_assessment", missing),
- "isBaseline": kwargs.get("is_baseline", missing),
- "targetId": kwargs.get("target_id", missing),
- "type": kwargs.get("type", missing),
- "triggeredBy": kwargs.get("triggered_by", missing),
- "timeCreatedGreaterThanOrEqualTo": kwargs.get("time_created_greater_than_or_equal_to", missing),
- "timeCreatedLessThan": kwargs.get("time_created_less_than", missing),
- "limit": kwargs.get("limit", missing),
"page": kwargs.get("page", missing),
- "lifecycleState": kwargs.get("lifecycle_state", missing),
- "sortOrder": kwargs.get("sort_order", missing),
- "sortBy": kwargs.get("sort_by", 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}
@@ -26623,9 +29563,10 @@ def list_user_assessments(self, compartment_id, **kwargs):
self.base_client.call_api,
resource_path=resource_path,
method=method,
+ path_params=path_params,
query_params=query_params,
header_params=header_params,
- response_type="list[UserAssessmentSummary]",
+ response_type="list[WorkRequestLogEntry]",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -26634,24 +29575,50 @@ def list_user_assessments(self, compartment_id, **kwargs):
return self.base_client.call_api(
resource_path=resource_path,
method=method,
+ path_params=path_params,
query_params=query_params,
header_params=header_params,
- response_type="list[UserAssessmentSummary]",
+ response_type="list[WorkRequestLogEntry]",
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def list_users(self, user_assessment_id, **kwargs):
+ def list_work_requests(self, compartment_id, **kwargs):
"""
- Gets a list of users of the specified user assessment. The result contains the database user details for each user, such
- as user type, account status, last login time, user creation time, authentication type, user profile, and the date and time
- of the latest password change. It also contains the user category derived from these user details as well as privileges
- granted to each user.
+ Gets a list of work requests.
- :param str user_assessment_id: (required)
- The OCID of the user assessment.
+ :param str compartment_id: (required)
+ A filter to return only resources that match the specified compartment OCID.
+
+ :param str operation_type: (optional)
+ A filter to return only work requests that match the specific operation type.
+
+ :param str sort_by: (optional)
+ The field used for sorting. Only one sorting parameter can be specified.
+ The default order is descending.
+
+ Allowed values are: "STARTTIME", "FINISHTIME", "ACCEPTEDTIME"
+
+ :param str sort_order: (optional)
+ The sorting order for the work requests, either ascending (ASC) or descending (DESC).
+
+ Allowed values are: "ASC", "DESC"
+
+ :param str resource_id: (optional)
+ A filter to return only work requests that match the specified resource OCID.
+
+ :param str target_database_id: (optional)
+ A filter to return only work requests that are associated to the specified target database OCID.
+
+ :param str opc_request_id: (optional)
+ Unique identifier for the request.
+
+ :param str page: (optional)
+ For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__.
+
+ __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
:param int limit: (optional)
For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
@@ -26670,92 +29637,137 @@ def list_users(self, user_assessment_id, **kwargs):
Allowed values are: "RESTRICTED", "ACCESSIBLE"
- :param str user_category: (optional)
- A filter to return only items that match the specified user category.
-
- :param str user_role: (optional)
- A filter to return only items that match the specified user role.
-
- :param str user_profile: (optional)
- A filter to return only items that match the specified user profile.
-
- :param str user_type: (optional)
- A filter to return only items that match the specified user type. The possible values can be
- - ADMIN_PRIVILEGED
- - APPLICATION
- - PRIVILEGED
- - SCHEMA
- - NON_PRIVILEGED
- as specified by '#/definitions/userTypes'.
-
- :param str user_key: (optional)
- A filter to return only items that match the specified user key.
-
- :param str account_status: (optional)
- A filter to return only items that match the specified account status.
-
- :param str authentication_type: (optional)
- A filter to return only items that match the specified authentication type.
-
- :param str user_name: (optional)
- A filter to return only items that match the specified user name.
-
- :param str target_id: (optional)
- A filter to return only items related to a specific target OCID.
-
- :param datetime time_last_login_greater_than_or_equal_to: (optional)
- A filter to return users whose last login time in the database is greater than or equal to the date and time specified, in the format defined by `RFC3339`__.
-
- **Example:** 2016-12-19T16:39:57.600Z
-
- __ https://tools.ietf.org/html/rfc3339
-
- :param datetime time_last_login_less_than: (optional)
- A filter to return users whose last login time in the database is less than the date and time specified, in the format defined by `RFC3339`__.
- **Example:** 2016-12-19T16:39:57.600Z
+ :param obj retry_strategy: (optional)
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
- __ https://tools.ietf.org/html/rfc3339
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
+ The specifics of the default retry strategy are described `here `__.
- :param datetime time_user_created_greater_than_or_equal_to: (optional)
- A filter to return users whose creation time in the database is greater than or equal to the date and time specified, in the format defined by `RFC3339`__.
- **Example:** 2016-12-19T16:39:57.600Z
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
- __ https://tools.ietf.org/html/rfc3339
+ :param bool allow_control_chars: (optional)
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
+ By default, the response will not allow control characters in strings
- :param datetime time_user_created_less_than: (optional)
- A filter to return users whose creation time in the database is less than the date and time specified, in the format defined by `RFC3339`__.
- **Example:** 2016-12-19T16:39:57.600Z
+ :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.data_safe.models.WorkRequestSummary`
+ :rtype: :class:`~oci.response.Response`
- __ https://tools.ietf.org/html/rfc3339
+ :example:
+ Click `here `__ to see an example of how to use list_work_requests API.
+ """
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
+ required_arguments = ['compartmentId']
+ resource_path = "/workRequests"
+ method = "GET"
+ operation_name = "list_work_requests"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/WorkRequestSummary/ListWorkRequests"
- :param datetime time_password_last_changed_greater_than_or_equal_to: (optional)
- A filter to return users whose last password change in the database is greater than or equal to the date and time specified, in the format defined by `RFC3339`__.
+ # Don't accept unknown kwargs
+ expected_kwargs = [
+ "allow_control_chars",
+ "retry_strategy",
+ "operation_type",
+ "sort_by",
+ "sort_order",
+ "resource_id",
+ "target_database_id",
+ "opc_request_id",
+ "page",
+ "limit",
+ "compartment_id_in_subtree",
+ "access_level"
+ ]
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
+ if extra_kwargs:
+ raise ValueError(
+ f"list_work_requests got unknown kwargs: {extra_kwargs!r}")
- **Example:** 2016-12-19T16:39:57.600Z
+ if 'sort_by' in kwargs:
+ sort_by_allowed_values = ["STARTTIME", "FINISHTIME", "ACCEPTEDTIME"]
+ if kwargs['sort_by'] not in sort_by_allowed_values:
+ raise ValueError(
+ f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
+ )
- __ https://tools.ietf.org/html/rfc3339
+ if 'sort_order' in kwargs:
+ sort_order_allowed_values = ["ASC", "DESC"]
+ if kwargs['sort_order'] not in sort_order_allowed_values:
+ raise ValueError(
+ f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }"
+ )
- :param datetime time_password_last_changed_less_than: (optional)
- A filter to return users whose last password change in the database is less than the date and time specified, in the format defined by `RFC3339`__.
+ if 'access_level' in kwargs:
+ access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"]
+ if kwargs['access_level'] not in access_level_allowed_values:
+ raise ValueError(
+ f"Invalid value for `access_level`, must be one of { access_level_allowed_values }"
+ )
- **Example:** 2016-12-19T16:39:57.600Z
+ query_params = {
+ "compartmentId": compartment_id,
+ "operationType": kwargs.get("operation_type", missing),
+ "sortBy": kwargs.get("sort_by", missing),
+ "sortOrder": kwargs.get("sort_order", missing),
+ "resourceId": kwargs.get("resource_id", missing),
+ "targetDatabaseId": kwargs.get("target_database_id", missing),
+ "page": kwargs.get("page", missing),
+ "limit": kwargs.get("limit", missing),
+ "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing),
+ "accessLevel": kwargs.get("access_level", missing)
+ }
+ query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
- __ https://tools.ietf.org/html/rfc3339
+ 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}
- :param str page: (optional)
- For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__.
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
+ operation_retry_strategy=kwargs.get('retry_strategy'),
+ client_retry_strategy=self.retry_strategy
+ )
+ if retry_strategy is None:
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
- __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
+ if retry_strategy:
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
+ self.base_client.add_opc_client_retries_header(header_params)
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
+ return retry_strategy.make_retrying_call(
+ self.base_client.call_api,
+ resource_path=resource_path,
+ method=method,
+ query_params=query_params,
+ header_params=header_params,
+ response_type="list[WorkRequestSummary]",
+ allow_control_chars=kwargs.get('allow_control_chars'),
+ operation_name=operation_name,
+ api_reference_link=api_reference_link,
+ required_arguments=required_arguments)
+ else:
+ return self.base_client.call_api(
+ resource_path=resource_path,
+ method=method,
+ query_params=query_params,
+ header_params=header_params,
+ response_type="list[WorkRequestSummary]",
+ allow_control_chars=kwargs.get('allow_control_chars'),
+ operation_name=operation_name,
+ api_reference_link=api_reference_link,
+ required_arguments=required_arguments)
- :param str sort_order: (optional)
- The sort order to use, either ascending (ASC) or descending (DESC).
+ def mask_data(self, masking_policy_id, mask_data_details, **kwargs):
+ """
+ Masks data using the specified masking policy.
- Allowed values are: "ASC", "DESC"
- :param str sort_by: (optional)
- The field to sort by. You can specify only one sort order (sortOrder). The default order for userName is ascending.
+ :param str masking_policy_id: (required)
+ The OCID of the masking policy.
- Allowed values are: "userName", "userCategory", "accountStatus", "timeLastLogin", "targetId", "timeUserCreated", "authenticationType", "timePasswordChanged"
+ :param oci.data_safe.models.MaskDataDetails mask_data_details: (required)
+ Details to mask data.
:param str opc_request_id: (optional)
Unique identifier for the request.
@@ -26772,53 +29784,32 @@ def list_users(self, user_assessment_id, **kwargs):
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.data_safe.models.UserSummary`
+ :return: A :class:`~oci.response.Response` object with data of type None
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use list_users API.
+ Click `here `__ to see an example of how to use mask_data API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
- required_arguments = ['userAssessmentId']
- resource_path = "/userAssessments/{userAssessmentId}/users"
- method = "GET"
- operation_name = "list_users"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/UserAssessment/ListUsers"
+ required_arguments = ['maskingPolicyId']
+ resource_path = "/maskingPolicies/{maskingPolicyId}/actions/mask"
+ method = "POST"
+ operation_name = "mask_data"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/MaskingPolicy/MaskData"
# Don't accept unknown kwargs
expected_kwargs = [
"allow_control_chars",
"retry_strategy",
- "limit",
- "compartment_id_in_subtree",
- "access_level",
- "user_category",
- "user_role",
- "user_profile",
- "user_type",
- "user_key",
- "account_status",
- "authentication_type",
- "user_name",
- "target_id",
- "time_last_login_greater_than_or_equal_to",
- "time_last_login_less_than",
- "time_user_created_greater_than_or_equal_to",
- "time_user_created_less_than",
- "time_password_last_changed_greater_than_or_equal_to",
- "time_password_last_changed_less_than",
- "page",
- "sort_order",
- "sort_by",
"opc_request_id"
]
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"list_users got unknown kwargs: {extra_kwargs!r}")
+ f"mask_data got unknown kwargs: {extra_kwargs!r}")
path_params = {
- "userAssessmentId": user_assessment_id
+ "maskingPolicyId": masking_policy_id
}
path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
@@ -26827,52 +29818,6 @@ def list_users(self, user_assessment_id, **kwargs):
if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
- if 'access_level' in kwargs:
- access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"]
- if kwargs['access_level'] not in access_level_allowed_values:
- raise ValueError(
- f"Invalid value for `access_level`, must be one of { access_level_allowed_values }"
- )
-
- if 'sort_order' in kwargs:
- sort_order_allowed_values = ["ASC", "DESC"]
- if kwargs['sort_order'] not in sort_order_allowed_values:
- raise ValueError(
- f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }"
- )
-
- if 'sort_by' in kwargs:
- sort_by_allowed_values = ["userName", "userCategory", "accountStatus", "timeLastLogin", "targetId", "timeUserCreated", "authenticationType", "timePasswordChanged"]
- if kwargs['sort_by'] not in sort_by_allowed_values:
- raise ValueError(
- f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
- )
-
- query_params = {
- "limit": kwargs.get("limit", missing),
- "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing),
- "accessLevel": kwargs.get("access_level", missing),
- "userCategory": kwargs.get("user_category", missing),
- "userRole": kwargs.get("user_role", missing),
- "userProfile": kwargs.get("user_profile", missing),
- "userType": kwargs.get("user_type", missing),
- "userKey": kwargs.get("user_key", missing),
- "accountStatus": kwargs.get("account_status", missing),
- "authenticationType": kwargs.get("authentication_type", missing),
- "userName": kwargs.get("user_name", missing),
- "targetId": kwargs.get("target_id", missing),
- "timeLastLoginGreaterThanOrEqualTo": kwargs.get("time_last_login_greater_than_or_equal_to", missing),
- "timeLastLoginLessThan": kwargs.get("time_last_login_less_than", missing),
- "timeUserCreatedGreaterThanOrEqualTo": kwargs.get("time_user_created_greater_than_or_equal_to", missing),
- "timeUserCreatedLessThan": kwargs.get("time_user_created_less_than", missing),
- "timePasswordLastChangedGreaterThanOrEqualTo": kwargs.get("time_password_last_changed_greater_than_or_equal_to", missing),
- "timePasswordLastChangedLessThan": kwargs.get("time_password_last_changed_less_than", missing),
- "page": kwargs.get("page", missing),
- "sortOrder": kwargs.get("sort_order", missing),
- "sortBy": kwargs.get("sort_by", missing)
- }
- query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
-
header_params = {
"accept": "application/json",
"content-type": "application/json",
@@ -26896,9 +29841,8 @@ def list_users(self, user_assessment_id, **kwargs):
resource_path=resource_path,
method=method,
path_params=path_params,
- query_params=query_params,
header_params=header_params,
- response_type="list[UserSummary]",
+ body=mask_data_details,
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -26908,34 +29852,39 @@ def list_users(self, user_assessment_id, **kwargs):
resource_path=resource_path,
method=method,
path_params=path_params,
- query_params=query_params,
header_params=header_params,
- response_type="list[UserSummary]",
+ body=mask_data_details,
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def list_work_request_errors(self, work_request_id, **kwargs):
+ def modify_global_settings(self, modify_global_settings_details, compartment_id, **kwargs):
"""
- Gets a list of errors for the specified work request.
-
+ Modifies Global Settings in Data Safe in the tenancy and region.
- :param str work_request_id: (required)
- The OCID of the work request.
- :param str opc_request_id: (optional)
- Unique identifier for the request.
+ :param oci.data_safe.models.ModifyGlobalSettingsDetails modify_global_settings_details: (required)
+ The details used to update global settings in Data Safe.
- :param str page: (optional)
- For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__.
+ :param str compartment_id: (required)
+ The OCID of the compartment.
- __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
+ :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 int limit: (optional)
- For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
+ :param str opc_request_id: (optional)
+ Unique identifier for the request.
- __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
+ :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.
@@ -26949,34 +29898,34 @@ def list_work_request_errors(self, work_request_id, **kwargs):
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.data_safe.models.WorkRequestError`
+ :return: A :class:`~oci.response.Response` object with data of type None
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use list_work_request_errors API.
+ Click `here `__ to see an example of how to use modify_global_settings API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
- required_arguments = ['workRequestId']
- resource_path = "/workRequests/{workRequestId}/errors"
- method = "GET"
- operation_name = "list_work_request_errors"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/WorkRequestError/ListWorkRequestErrors"
+ required_arguments = ['compartmentId']
+ resource_path = "/configuration/{compartmentId}/actions/modifyGlobalSettings"
+ method = "POST"
+ operation_name = "modify_global_settings"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/DataSafeConfiguration/ModifyGlobalSettings"
# Don't accept unknown kwargs
expected_kwargs = [
"allow_control_chars",
"retry_strategy",
+ "if_match",
"opc_request_id",
- "page",
- "limit"
+ "opc_retry_token"
]
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"list_work_request_errors got unknown kwargs: {extra_kwargs!r}")
+ f"modify_global_settings got unknown kwargs: {extra_kwargs!r}")
path_params = {
- "workRequestId": work_request_id
+ "compartmentId": compartment_id
}
path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
@@ -26985,16 +29934,12 @@ def list_work_request_errors(self, work_request_id, **kwargs):
if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
- query_params = {
- "page": kwargs.get("page", missing),
- "limit": kwargs.get("limit", missing)
- }
- query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
-
header_params = {
"accept": "application/json",
"content-type": "application/json",
- "opc-request-id": kwargs.get("opc_request_id", missing)
+ "if-match": kwargs.get("if_match", missing),
+ "opc-request-id": kwargs.get("opc_request_id", missing),
+ "opc-retry-token": kwargs.get("opc_retry_token", missing)
}
header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
@@ -27007,6 +29952,7 @@ def list_work_request_errors(self, work_request_id, **kwargs):
if retry_strategy:
if not isinstance(retry_strategy, retry.NoneRetryStrategy):
+ self.base_client.add_opc_retry_token_if_needed(header_params)
self.base_client.add_opc_client_retries_header(header_params)
retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
return retry_strategy.make_retrying_call(
@@ -27014,9 +29960,8 @@ def list_work_request_errors(self, work_request_id, **kwargs):
resource_path=resource_path,
method=method,
path_params=path_params,
- query_params=query_params,
header_params=header_params,
- response_type="list[WorkRequestError]",
+ body=modify_global_settings_details,
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -27026,34 +29971,42 @@ def list_work_request_errors(self, work_request_id, **kwargs):
resource_path=resource_path,
method=method,
path_params=path_params,
- query_params=query_params,
header_params=header_params,
- response_type="list[WorkRequestError]",
+ body=modify_global_settings_details,
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def list_work_request_logs(self, work_request_id, **kwargs):
+ def patch_alerts(self, patch_alerts_details, **kwargs):
"""
- Gets a list of log entries for the specified work request.
+ Updates the status of one or more alert specified by the alert IDs.
- :param str work_request_id: (required)
- The OCID of the work request.
+ :param oci.data_safe.models.PatchAlertsDetails patch_alerts_details: (required)
+ The alert details to update the status of one or more alert specified by the alert IDs.
:param str opc_request_id: (optional)
Unique identifier for the request.
- :param str page: (optional)
- For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__.
+ :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.
- __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
+ :param bool compartment_id_in_subtree: (optional)
+ Default is false.
+ When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting.
- :param int limit: (optional)
- For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
+ :param str access_level: (optional)
+ Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED.
+ Setting this to ACCESSIBLE returns only those compartments for which the
+ user has INSPECT permissions directly or indirectly (permissions can be on a
+ resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed.
- __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
+ Allowed values are: "RESTRICTED", "ACCESSIBLE"
:param obj retry_strategy: (optional)
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
@@ -27067,52 +30020,51 @@ def list_work_request_logs(self, work_request_id, **kwargs):
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.data_safe.models.WorkRequestLogEntry`
+ :return: A :class:`~oci.response.Response` object with data of type None
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use list_work_request_logs API.
+ Click `here `__ to see an example of how to use patch_alerts API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
- required_arguments = ['workRequestId']
- resource_path = "/workRequests/{workRequestId}/logs"
- method = "GET"
- operation_name = "list_work_request_logs"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/WorkRequestLogEntry/ListWorkRequestLogs"
+ required_arguments = []
+ resource_path = "/alerts"
+ method = "PATCH"
+ operation_name = "patch_alerts"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/Alert/PatchAlerts"
# Don't accept unknown kwargs
expected_kwargs = [
"allow_control_chars",
"retry_strategy",
"opc_request_id",
- "page",
- "limit"
+ "if_match",
+ "compartment_id_in_subtree",
+ "access_level"
]
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"list_work_request_logs got unknown kwargs: {extra_kwargs!r}")
-
- path_params = {
- "workRequestId": work_request_id
- }
-
- path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
+ f"patch_alerts got unknown kwargs: {extra_kwargs!r}")
- for (k, v) in six.iteritems(path_params):
- if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
- raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
+ if 'access_level' in kwargs:
+ access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"]
+ if kwargs['access_level'] not in access_level_allowed_values:
+ raise ValueError(
+ f"Invalid value for `access_level`, must be one of { access_level_allowed_values }"
+ )
query_params = {
- "page": kwargs.get("page", missing),
- "limit": kwargs.get("limit", missing)
+ "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing),
+ "accessLevel": kwargs.get("access_level", missing)
}
query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
header_params = {
"accept": "application/json",
"content-type": "application/json",
- "opc-request-id": kwargs.get("opc_request_id", missing)
+ "opc-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}
@@ -27131,10 +30083,9 @@ def list_work_request_logs(self, work_request_id, **kwargs):
self.base_client.call_api,
resource_path=resource_path,
method=method,
- path_params=path_params,
query_params=query_params,
header_params=header_params,
- response_type="list[WorkRequestLogEntry]",
+ body=patch_alerts_details,
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -27143,68 +30094,36 @@ def list_work_request_logs(self, work_request_id, **kwargs):
return self.base_client.call_api(
resource_path=resource_path,
method=method,
- path_params=path_params,
query_params=query_params,
header_params=header_params,
- response_type="list[WorkRequestLogEntry]",
+ body=patch_alerts_details,
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def list_work_requests(self, compartment_id, **kwargs):
+ def patch_discovery_job_results(self, discovery_job_id, patch_discovery_job_result_details, **kwargs):
"""
- Gets a list of work requests.
-
-
- :param str compartment_id: (required)
- A filter to return only resources that match the specified compartment OCID.
-
- :param str operation_type: (optional)
- A filter to return only work requests that match the specific operation type.
-
- :param str sort_by: (optional)
- The field used for sorting. Only one sorting parameter can be specified.
- The default order is descending.
-
- Allowed values are: "STARTTIME", "FINISHTIME", "ACCEPTEDTIME"
+ Patches one or more discovery results. You can use this operation to set the plannedAction attribute before using
+ ApplyDiscoveryJobResults to process the results based on this attribute.
- :param str sort_order: (optional)
- The sorting order for the work requests, either ascending (ASC) or descending (DESC).
- Allowed values are: "ASC", "DESC"
+ :param str discovery_job_id: (required)
+ The OCID of the discovery job.
- :param str resource_id: (optional)
- A filter to return only work requests that match the specified resource OCID.
+ :param oci.data_safe.models.PatchDiscoveryJobResultDetails patch_discovery_job_result_details: (required)
+ Details to patch discovery results.
- :param str target_database_id: (optional)
- A filter to return only work requests that are associated to the specified target database OCID.
+ :param str if_match: (optional)
+ For optimistic concurrency control. In the PUT or DELETE call
+ for a resource, set the if-match parameter to the value of the
+ etag from a previous GET or POST response for that resource.
+ The resource will be updated or deleted only if the etag you
+ provide matches the resource's current etag value.
:param str opc_request_id: (optional)
Unique identifier for the request.
- :param str page: (optional)
- For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__.
-
- __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
-
- :param int limit: (optional)
- For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__.
-
- __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine
-
- :param bool compartment_id_in_subtree: (optional)
- Default is false.
- When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting.
-
- :param str access_level: (optional)
- Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED.
- Setting this to ACCESSIBLE returns only those compartments for which the
- user has INSPECT permissions directly or indirectly (permissions can be on a
- resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed.
-
- Allowed values are: "RESTRICTED", "ACCESSIBLE"
-
:param obj retry_strategy: (optional)
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
@@ -27217,77 +30136,45 @@ def list_work_requests(self, compartment_id, **kwargs):
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
By default, the response will not allow control characters in strings
- :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.data_safe.models.WorkRequestSummary`
+ :return: A :class:`~oci.response.Response` object with data of type None
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use list_work_requests API.
+ Click `here `__ to see an example of how to use patch_discovery_job_results API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
- required_arguments = ['compartmentId']
- resource_path = "/workRequests"
- method = "GET"
- operation_name = "list_work_requests"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/WorkRequestSummary/ListWorkRequests"
+ required_arguments = ['discoveryJobId']
+ resource_path = "/discoveryJobs/{discoveryJobId}/results"
+ method = "PATCH"
+ operation_name = "patch_discovery_job_results"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/DiscoveryJob/PatchDiscoveryJobResults"
# Don't accept unknown kwargs
expected_kwargs = [
"allow_control_chars",
"retry_strategy",
- "operation_type",
- "sort_by",
- "sort_order",
- "resource_id",
- "target_database_id",
- "opc_request_id",
- "page",
- "limit",
- "compartment_id_in_subtree",
- "access_level"
+ "if_match",
+ "opc_request_id"
]
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"list_work_requests got unknown kwargs: {extra_kwargs!r}")
-
- if 'sort_by' in kwargs:
- sort_by_allowed_values = ["STARTTIME", "FINISHTIME", "ACCEPTEDTIME"]
- if kwargs['sort_by'] not in sort_by_allowed_values:
- raise ValueError(
- f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
- )
+ f"patch_discovery_job_results got unknown kwargs: {extra_kwargs!r}")
- if 'sort_order' in kwargs:
- sort_order_allowed_values = ["ASC", "DESC"]
- if kwargs['sort_order'] not in sort_order_allowed_values:
- raise ValueError(
- f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }"
- )
+ path_params = {
+ "discoveryJobId": discovery_job_id
+ }
- if 'access_level' in kwargs:
- access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"]
- if kwargs['access_level'] not in access_level_allowed_values:
- raise ValueError(
- f"Invalid value for `access_level`, must be one of { access_level_allowed_values }"
- )
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
- query_params = {
- "compartmentId": compartment_id,
- "operationType": kwargs.get("operation_type", missing),
- "sortBy": kwargs.get("sort_by", missing),
- "sortOrder": kwargs.get("sort_order", missing),
- "resourceId": kwargs.get("resource_id", missing),
- "targetDatabaseId": kwargs.get("target_database_id", missing),
- "page": kwargs.get("page", missing),
- "limit": kwargs.get("limit", missing),
- "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing),
- "accessLevel": kwargs.get("access_level", missing)
- }
- query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
+ for (k, v) in six.iteritems(path_params):
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
+ raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
header_params = {
"accept": "application/json",
"content-type": "application/json",
+ "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}
@@ -27307,9 +30194,9 @@ def list_work_requests(self, compartment_id, **kwargs):
self.base_client.call_api,
resource_path=resource_path,
method=method,
- query_params=query_params,
+ path_params=path_params,
header_params=header_params,
- response_type="list[WorkRequestSummary]",
+ body=patch_discovery_job_result_details,
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -27318,28 +30205,37 @@ def list_work_requests(self, compartment_id, **kwargs):
return self.base_client.call_api(
resource_path=resource_path,
method=method,
- query_params=query_params,
+ path_params=path_params,
header_params=header_params,
- response_type="list[WorkRequestSummary]",
+ body=patch_discovery_job_result_details,
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def mask_data(self, masking_policy_id, mask_data_details, **kwargs):
+ def patch_masking_columns(self, masking_policy_id, patch_masking_columns_details, **kwargs):
"""
- Masks data using the specified masking policy.
+ Patches one or more columns in the specified masking policy. Use it to create, or update
+ masking columns. To create masking columns, use CreateMaskingColumnDetails as the patch
+ value. And to update masking columns, use UpdateMaskingColumnDetails as the patch value.
:param str masking_policy_id: (required)
The OCID of the masking policy.
- :param oci.data_safe.models.MaskDataDetails mask_data_details: (required)
- Details to mask data.
+ :param oci.data_safe.models.PatchMaskingColumnsDetails patch_masking_columns_details: (required)
+ Details to patch masking columns.
:param str opc_request_id: (optional)
Unique identifier for the request.
+ :param str if_match: (optional)
+ For optimistic concurrency control. In the PUT or DELETE call
+ for a resource, set the if-match parameter to the value of the
+ etag from a previous GET or POST response for that resource.
+ The resource will be updated or deleted only if the etag you
+ provide matches the resource's current etag value.
+
:param obj retry_strategy: (optional)
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
@@ -27356,25 +30252,26 @@ def mask_data(self, masking_policy_id, mask_data_details, **kwargs):
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use mask_data API.
+ Click `here `__ to see an example of how to use patch_masking_columns API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
required_arguments = ['maskingPolicyId']
- resource_path = "/maskingPolicies/{maskingPolicyId}/actions/mask"
- method = "POST"
- operation_name = "mask_data"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/MaskingPolicy/MaskData"
+ resource_path = "/maskingPolicies/{maskingPolicyId}/maskingColumns"
+ method = "PATCH"
+ operation_name = "patch_masking_columns"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/MaskingColumn/PatchMaskingColumns"
# Don't accept unknown kwargs
expected_kwargs = [
"allow_control_chars",
"retry_strategy",
- "opc_request_id"
+ "opc_request_id",
+ "if_match"
]
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"mask_data got unknown kwargs: {extra_kwargs!r}")
+ f"patch_masking_columns got unknown kwargs: {extra_kwargs!r}")
path_params = {
"maskingPolicyId": masking_policy_id
@@ -27389,7 +30286,8 @@ def mask_data(self, masking_policy_id, mask_data_details, **kwargs):
header_params = {
"accept": "application/json",
"content-type": "application/json",
- "opc-request-id": kwargs.get("opc_request_id", missing)
+ "opc-request-id": kwargs.get("opc_request_id", missing),
+ "if-match": kwargs.get("if_match", missing)
}
header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
@@ -27410,7 +30308,7 @@ def mask_data(self, masking_policy_id, mask_data_details, **kwargs):
method=method,
path_params=path_params,
header_params=header_params,
- body=mask_data_details,
+ body=patch_masking_columns_details,
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -27421,22 +30319,23 @@ def mask_data(self, masking_policy_id, mask_data_details, **kwargs):
method=method,
path_params=path_params,
header_params=header_params,
- body=mask_data_details,
+ body=patch_masking_columns_details,
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def modify_global_settings(self, modify_global_settings_details, compartment_id, **kwargs):
+ def patch_sdm_masking_policy_difference_columns(self, sdm_masking_policy_difference_id, patch_sdm_masking_policy_difference_columns_details, **kwargs):
"""
- Modifies Global Settings in Data Safe in the tenancy and region.
+ Patches one or more SDM masking policy difference columns. You can use this operation to set the plannedAction attribute before using
+ ApplySdmMaskingPolicyDifference to process the difference based on this attribute.
- :param oci.data_safe.models.ModifyGlobalSettingsDetails modify_global_settings_details: (required)
- The details used to update global settings in Data Safe.
+ :param str sdm_masking_policy_difference_id: (required)
+ The OCID of the SDM masking policy difference.
- :param str compartment_id: (required)
- The OCID of the compartment.
+ :param oci.data_safe.models.PatchSdmMaskingPolicyDifferenceColumnsDetails patch_sdm_masking_policy_difference_columns_details: (required)
+ Details to patch difference columns.
:param str if_match: (optional)
For optimistic concurrency control. In the PUT or DELETE call
@@ -27448,12 +30347,6 @@ def modify_global_settings(self, modify_global_settings_details, compartment_id,
:param str opc_request_id: (optional)
Unique identifier for the request.
- :param str opc_retry_token: (optional)
- A token that uniquely identifies a request so it can be retried in case of a timeout or
- server error without risk of executing that same action again. Retry tokens expire after 24
- hours, but can be invalidated before then due to conflicting operations. For example, if a resource
- has been deleted and purged from the system, then a retry of the original creation request might be rejected.
-
:param obj retry_strategy: (optional)
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
@@ -27470,30 +30363,29 @@ def modify_global_settings(self, modify_global_settings_details, compartment_id,
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use modify_global_settings API.
+ Click `here `__ to see an example of how to use patch_sdm_masking_policy_difference_columns API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
- required_arguments = ['compartmentId']
- resource_path = "/configuration/{compartmentId}/actions/modifyGlobalSettings"
- method = "POST"
- operation_name = "modify_global_settings"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/DataSafeConfiguration/ModifyGlobalSettings"
+ required_arguments = ['sdmMaskingPolicyDifferenceId']
+ resource_path = "/sdmMaskingPolicyDifferences/{sdmMaskingPolicyDifferenceId}/differenceColumns"
+ method = "PATCH"
+ operation_name = "patch_sdm_masking_policy_difference_columns"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SdmMaskingPolicyDifference/PatchSdmMaskingPolicyDifferenceColumns"
# Don't accept unknown kwargs
expected_kwargs = [
"allow_control_chars",
"retry_strategy",
"if_match",
- "opc_request_id",
- "opc_retry_token"
+ "opc_request_id"
]
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"modify_global_settings got unknown kwargs: {extra_kwargs!r}")
+ f"patch_sdm_masking_policy_difference_columns got unknown kwargs: {extra_kwargs!r}")
path_params = {
- "compartmentId": compartment_id
+ "sdmMaskingPolicyDifferenceId": sdm_masking_policy_difference_id
}
path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
@@ -27506,8 +30398,7 @@ def modify_global_settings(self, modify_global_settings_details, compartment_id,
"accept": "application/json",
"content-type": "application/json",
"if-match": kwargs.get("if_match", missing),
- "opc-request-id": kwargs.get("opc_request_id", missing),
- "opc-retry-token": kwargs.get("opc_retry_token", missing)
+ "opc-request-id": kwargs.get("opc_request_id", missing)
}
header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
@@ -27520,7 +30411,6 @@ def modify_global_settings(self, modify_global_settings_details, compartment_id,
if retry_strategy:
if not isinstance(retry_strategy, retry.NoneRetryStrategy):
- self.base_client.add_opc_retry_token_if_needed(header_params)
self.base_client.add_opc_client_retries_header(header_params)
retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
return retry_strategy.make_retrying_call(
@@ -27529,7 +30419,7 @@ def modify_global_settings(self, modify_global_settings_details, compartment_id,
method=method,
path_params=path_params,
header_params=header_params,
- body=modify_global_settings_details,
+ body=patch_sdm_masking_policy_difference_columns_details,
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -27540,22 +30430,24 @@ def modify_global_settings(self, modify_global_settings_details, compartment_id,
method=method,
path_params=path_params,
header_params=header_params,
- body=modify_global_settings_details,
+ body=patch_sdm_masking_policy_difference_columns_details,
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def patch_alerts(self, patch_alerts_details, **kwargs):
+ def patch_sensitive_columns(self, sensitive_data_model_id, patch_sensitive_column_details, **kwargs):
"""
- Updates the status of one or more alert specified by the alert IDs.
+ Patches one or more columns in the specified sensitive data model. Use it to create, update, or delete sensitive columns.
+ To create sensitive columns, use CreateSensitiveColumnDetails as the patch value. And to update sensitive columns,
+ use UpdateSensitiveColumnDetails as the patch value.
- :param oci.data_safe.models.PatchAlertsDetails patch_alerts_details: (required)
- The alert details to update the status of one or more alert specified by the alert IDs.
+ :param str sensitive_data_model_id: (required)
+ The OCID of the sensitive data model.
- :param str opc_request_id: (optional)
- Unique identifier for the request.
+ :param oci.data_safe.models.PatchSensitiveColumnDetails patch_sensitive_column_details: (required)
+ Details to patch sensitive columns.
:param str if_match: (optional)
For optimistic concurrency control. In the PUT or DELETE call
@@ -27564,17 +30456,8 @@ def patch_alerts(self, patch_alerts_details, **kwargs):
The resource will be updated or deleted only if the etag you
provide matches the resource's current etag value.
- :param bool compartment_id_in_subtree: (optional)
- Default is false.
- When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting.
-
- :param str access_level: (optional)
- Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED.
- Setting this to ACCESSIBLE returns only those compartments for which the
- user has INSPECT permissions directly or indirectly (permissions can be on a
- resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed.
-
- Allowed values are: "RESTRICTED", "ACCESSIBLE"
+ :param str opc_request_id: (optional)
+ Unique identifier for the request.
:param obj retry_strategy: (optional)
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
@@ -27592,47 +30475,42 @@ def patch_alerts(self, patch_alerts_details, **kwargs):
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use patch_alerts API.
+ Click `here `__ to see an example of how to use patch_sensitive_columns API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
- required_arguments = []
- resource_path = "/alerts"
+ required_arguments = ['sensitiveDataModelId']
+ resource_path = "/sensitiveDataModels/{sensitiveDataModelId}/sensitiveColumns"
method = "PATCH"
- operation_name = "patch_alerts"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/Alert/PatchAlerts"
+ operation_name = "patch_sensitive_columns"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SensitiveColumn/PatchSensitiveColumns"
# Don't accept unknown kwargs
expected_kwargs = [
"allow_control_chars",
"retry_strategy",
- "opc_request_id",
"if_match",
- "compartment_id_in_subtree",
- "access_level"
+ "opc_request_id"
]
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"patch_alerts got unknown kwargs: {extra_kwargs!r}")
-
- if 'access_level' in kwargs:
- access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"]
- if kwargs['access_level'] not in access_level_allowed_values:
- raise ValueError(
- f"Invalid value for `access_level`, must be one of { access_level_allowed_values }"
- )
+ f"patch_sensitive_columns got unknown kwargs: {extra_kwargs!r}")
- query_params = {
- "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing),
- "accessLevel": kwargs.get("access_level", missing)
+ path_params = {
+ "sensitiveDataModelId": sensitive_data_model_id
}
- query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
+
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
+
+ for (k, v) in six.iteritems(path_params):
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
+ raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
header_params = {
"accept": "application/json",
"content-type": "application/json",
- "opc-request-id": kwargs.get("opc_request_id", missing),
- "if-match": kwargs.get("if_match", missing)
+ "if-match": kwargs.get("if_match", missing),
+ "opc-request-id": kwargs.get("opc_request_id", missing)
}
header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
@@ -27651,9 +30529,9 @@ def patch_alerts(self, patch_alerts_details, **kwargs):
self.base_client.call_api,
resource_path=resource_path,
method=method,
- query_params=query_params,
+ path_params=path_params,
header_params=header_params,
- body=patch_alerts_details,
+ body=patch_sensitive_column_details,
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -27662,25 +30540,24 @@ def patch_alerts(self, patch_alerts_details, **kwargs):
return self.base_client.call_api(
resource_path=resource_path,
method=method,
- query_params=query_params,
+ path_params=path_params,
header_params=header_params,
- body=patch_alerts_details,
+ body=patch_sensitive_column_details,
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def patch_discovery_job_results(self, discovery_job_id, patch_discovery_job_result_details, **kwargs):
+ def patch_target_alert_policy_association(self, patch_target_alert_policy_association_details, **kwargs):
"""
- Patches one or more discovery results. You can use this operation to set the plannedAction attribute before using
- ApplyDiscoveryJobResults to process the results based on this attribute.
+ Creates new target-alert policy associations that will be applied on the target database.
- :param str discovery_job_id: (required)
- The OCID of the discovery job.
+ :param oci.data_safe.models.PatchTargetAlertPolicyAssociationDetails patch_target_alert_policy_association_details: (required)
+ The details used to patch the target-alert policy associations.
- :param oci.data_safe.models.PatchDiscoveryJobResultDetails patch_discovery_job_result_details: (required)
- Details to patch discovery results.
+ :param str opc_request_id: (optional)
+ Unique identifier for the request.
:param str if_match: (optional)
For optimistic concurrency control. In the PUT or DELETE call
@@ -27689,9 +30566,6 @@ def patch_discovery_job_results(self, discovery_job_id, patch_discovery_job_resu
The resource will be updated or deleted only if the etag you
provide matches the resource's current etag value.
- :param str opc_request_id: (optional)
- Unique identifier for the request.
-
:param obj retry_strategy: (optional)
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
@@ -27708,42 +30582,32 @@ def patch_discovery_job_results(self, discovery_job_id, patch_discovery_job_resu
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use patch_discovery_job_results API.
+ Click `here `__ to see an example of how to use patch_target_alert_policy_association API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
- required_arguments = ['discoveryJobId']
- resource_path = "/discoveryJobs/{discoveryJobId}/results"
+ required_arguments = []
+ resource_path = "/targetAlertPolicyAssociations"
method = "PATCH"
- operation_name = "patch_discovery_job_results"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/DiscoveryJob/PatchDiscoveryJobResults"
+ operation_name = "patch_target_alert_policy_association"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/TargetAlertPolicyAssociation/PatchTargetAlertPolicyAssociation"
# Don't accept unknown kwargs
expected_kwargs = [
"allow_control_chars",
"retry_strategy",
- "if_match",
- "opc_request_id"
+ "opc_request_id",
+ "if_match"
]
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"patch_discovery_job_results got unknown kwargs: {extra_kwargs!r}")
-
- path_params = {
- "discoveryJobId": discovery_job_id
- }
-
- path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
-
- for (k, v) in six.iteritems(path_params):
- if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
- raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
+ f"patch_target_alert_policy_association got unknown kwargs: {extra_kwargs!r}")
header_params = {
"accept": "application/json",
"content-type": "application/json",
- "if-match": kwargs.get("if_match", missing),
- "opc-request-id": kwargs.get("opc_request_id", missing)
+ "opc-request-id": kwargs.get("opc_request_id", missing),
+ "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}
@@ -27762,9 +30626,8 @@ def patch_discovery_job_results(self, discovery_job_id, patch_discovery_job_resu
self.base_client.call_api,
resource_path=resource_path,
method=method,
- path_params=path_params,
header_params=header_params,
- body=patch_discovery_job_result_details,
+ body=patch_target_alert_policy_association_details,
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -27773,29 +30636,23 @@ def patch_discovery_job_results(self, discovery_job_id, patch_discovery_job_resu
return self.base_client.call_api(
resource_path=resource_path,
method=method,
- path_params=path_params,
header_params=header_params,
- body=patch_discovery_job_result_details,
+ body=patch_target_alert_policy_association_details,
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def patch_masking_columns(self, masking_policy_id, patch_masking_columns_details, **kwargs):
+ def provision_audit_policy(self, provision_audit_policy_details, audit_policy_id, **kwargs):
"""
- Patches one or more columns in the specified masking policy. Use it to create, or update
- masking columns. To create masking columns, use CreateMaskingColumnDetails as the patch
- value. And to update masking columns, use UpdateMaskingColumnDetails as the patch value.
-
+ Provision audit policy.
- :param str masking_policy_id: (required)
- The OCID of the masking policy.
- :param oci.data_safe.models.PatchMaskingColumnsDetails patch_masking_columns_details: (required)
- Details to patch masking columns.
+ :param oci.data_safe.models.ProvisionAuditPolicyDetails provision_audit_policy_details: (required)
+ Details for provisioning the given policies on the source target database.
- :param str opc_request_id: (optional)
- Unique identifier for the request.
+ :param str audit_policy_id: (required)
+ Unique audit policy identifier.
:param str if_match: (optional)
For optimistic concurrency control. In the PUT or DELETE call
@@ -27804,6 +30661,15 @@ def patch_masking_columns(self, masking_policy_id, patch_masking_columns_details
The resource will be updated or deleted only if the etag you
provide matches the resource's current etag value.
+ :param str opc_request_id: (optional)
+ Unique identifier for the request.
+
+ :param str opc_retry_token: (optional)
+ A token that uniquely identifies a request so it can be retried in case of a timeout or
+ server error without risk of executing that same action again. Retry tokens expire after 24
+ hours, but can be invalidated before then due to conflicting operations. For example, if a resource
+ has been deleted and purged from the system, then a retry of the original creation request might be rejected.
+
:param obj retry_strategy: (optional)
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
@@ -27820,29 +30686,30 @@ def patch_masking_columns(self, masking_policy_id, patch_masking_columns_details
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use patch_masking_columns API.
+ Click `here `__ to see an example of how to use provision_audit_policy API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
- required_arguments = ['maskingPolicyId']
- resource_path = "/maskingPolicies/{maskingPolicyId}/maskingColumns"
- method = "PATCH"
- operation_name = "patch_masking_columns"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/MaskingColumn/PatchMaskingColumns"
+ required_arguments = ['auditPolicyId']
+ resource_path = "/auditPolicies/{auditPolicyId}/actions/provision"
+ method = "POST"
+ operation_name = "provision_audit_policy"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/AuditPolicy/ProvisionAuditPolicy"
# Don't accept unknown kwargs
expected_kwargs = [
"allow_control_chars",
"retry_strategy",
+ "if_match",
"opc_request_id",
- "if_match"
+ "opc_retry_token"
]
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"patch_masking_columns got unknown kwargs: {extra_kwargs!r}")
+ f"provision_audit_policy got unknown kwargs: {extra_kwargs!r}")
path_params = {
- "maskingPolicyId": masking_policy_id
+ "auditPolicyId": audit_policy_id
}
path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
@@ -27854,8 +30721,9 @@ def patch_masking_columns(self, masking_policy_id, patch_masking_columns_details
header_params = {
"accept": "application/json",
"content-type": "application/json",
+ "if-match": kwargs.get("if_match", missing),
"opc-request-id": kwargs.get("opc_request_id", missing),
- "if-match": kwargs.get("if_match", missing)
+ "opc-retry-token": kwargs.get("opc_retry_token", missing)
}
header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
@@ -27868,6 +30736,7 @@ def patch_masking_columns(self, masking_policy_id, patch_masking_columns_details
if retry_strategy:
if not isinstance(retry_strategy, retry.NoneRetryStrategy):
+ self.base_client.add_opc_retry_token_if_needed(header_params)
self.base_client.add_opc_client_retries_header(header_params)
retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
return retry_strategy.make_retrying_call(
@@ -27876,7 +30745,7 @@ def patch_masking_columns(self, masking_policy_id, patch_masking_columns_details
method=method,
path_params=path_params,
header_params=header_params,
- body=patch_masking_columns_details,
+ body=provision_audit_policy_details,
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -27887,23 +30756,19 @@ def patch_masking_columns(self, masking_policy_id, patch_masking_columns_details
method=method,
path_params=path_params,
header_params=header_params,
- body=patch_masking_columns_details,
+ body=provision_audit_policy_details,
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def patch_sdm_masking_policy_difference_columns(self, sdm_masking_policy_difference_id, patch_sdm_masking_policy_difference_columns_details, **kwargs):
+ def purge_sql_collection_logs(self, sql_collection_id, **kwargs):
"""
- Patches one or more SDM masking policy difference columns. You can use this operation to set the plannedAction attribute before using
- ApplySdmMaskingPolicyDifference to process the difference based on this attribute.
-
+ Purge the SQL collection logs for the specified SqlCollection.
- :param str sdm_masking_policy_difference_id: (required)
- The OCID of the SDM masking policy difference.
- :param oci.data_safe.models.PatchSdmMaskingPolicyDifferenceColumnsDetails patch_sdm_masking_policy_difference_columns_details: (required)
- Details to patch difference columns.
+ :param str sql_collection_id: (required)
+ The OCID of the SQL collection resource.
:param str if_match: (optional)
For optimistic concurrency control. In the PUT or DELETE call
@@ -27915,6 +30780,12 @@ def patch_sdm_masking_policy_difference_columns(self, sdm_masking_policy_differe
:param str opc_request_id: (optional)
Unique identifier for the request.
+ :param str opc_retry_token: (optional)
+ A token that uniquely identifies a request so it can be retried in case of a timeout or
+ server error without risk of executing that same action again. Retry tokens expire after 24
+ hours, but can be invalidated before then due to conflicting operations. For example, if a resource
+ has been deleted and purged from the system, then a retry of the original creation request might be rejected.
+
:param obj retry_strategy: (optional)
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
@@ -27931,29 +30802,30 @@ def patch_sdm_masking_policy_difference_columns(self, sdm_masking_policy_differe
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use patch_sdm_masking_policy_difference_columns API.
+ Click `here `__ to see an example of how to use purge_sql_collection_logs API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
- required_arguments = ['sdmMaskingPolicyDifferenceId']
- resource_path = "/sdmMaskingPolicyDifferences/{sdmMaskingPolicyDifferenceId}/differenceColumns"
- method = "PATCH"
- operation_name = "patch_sdm_masking_policy_difference_columns"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SdmMaskingPolicyDifference/PatchSdmMaskingPolicyDifferenceColumns"
+ required_arguments = ['sqlCollectionId']
+ resource_path = "/sqlCollections/{sqlCollectionId}/actions/purgeLogs"
+ method = "POST"
+ operation_name = "purge_sql_collection_logs"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SqlCollection/PurgeSqlCollectionLogs"
# Don't accept unknown kwargs
expected_kwargs = [
"allow_control_chars",
"retry_strategy",
"if_match",
- "opc_request_id"
+ "opc_request_id",
+ "opc_retry_token"
]
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"patch_sdm_masking_policy_difference_columns got unknown kwargs: {extra_kwargs!r}")
+ f"purge_sql_collection_logs got unknown kwargs: {extra_kwargs!r}")
path_params = {
- "sdmMaskingPolicyDifferenceId": sdm_masking_policy_difference_id
+ "sqlCollectionId": sql_collection_id
}
path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
@@ -27966,7 +30838,8 @@ def patch_sdm_masking_policy_difference_columns(self, sdm_masking_policy_differe
"accept": "application/json",
"content-type": "application/json",
"if-match": kwargs.get("if_match", missing),
- "opc-request-id": kwargs.get("opc_request_id", missing)
+ "opc-request-id": kwargs.get("opc_request_id", missing),
+ "opc-retry-token": kwargs.get("opc_retry_token", missing)
}
header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
@@ -27979,6 +30852,7 @@ def patch_sdm_masking_policy_difference_columns(self, sdm_masking_policy_differe
if retry_strategy:
if not isinstance(retry_strategy, retry.NoneRetryStrategy):
+ self.base_client.add_opc_retry_token_if_needed(header_params)
self.base_client.add_opc_client_retries_header(header_params)
retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
return retry_strategy.make_retrying_call(
@@ -27987,7 +30861,6 @@ def patch_sdm_masking_policy_difference_columns(self, sdm_masking_policy_differe
method=method,
path_params=path_params,
header_params=header_params,
- body=patch_sdm_masking_policy_difference_columns_details,
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -27998,24 +30871,18 @@ def patch_sdm_masking_policy_difference_columns(self, sdm_masking_policy_differe
method=method,
path_params=path_params,
header_params=header_params,
- body=patch_sdm_masking_policy_difference_columns_details,
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def patch_sensitive_columns(self, sensitive_data_model_id, patch_sensitive_column_details, **kwargs):
+ def refresh_database_security_configuration(self, database_security_config_id, **kwargs):
"""
- Patches one or more columns in the specified sensitive data model. Use it to create, update, or delete sensitive columns.
- To create sensitive columns, use CreateSensitiveColumnDetails as the patch value. And to update sensitive columns,
- use UpdateSensitiveColumnDetails as the patch value.
-
+ Refreshes the specified database security configuration.
- :param str sensitive_data_model_id: (required)
- The OCID of the sensitive data model.
- :param oci.data_safe.models.PatchSensitiveColumnDetails patch_sensitive_column_details: (required)
- Details to patch sensitive columns.
+ :param str database_security_config_id: (required)
+ The OCID of the database security configuration resource.
:param str if_match: (optional)
For optimistic concurrency control. In the PUT or DELETE call
@@ -28027,6 +30894,12 @@ def patch_sensitive_columns(self, sensitive_data_model_id, patch_sensitive_colum
:param str opc_request_id: (optional)
Unique identifier for the request.
+ :param str opc_retry_token: (optional)
+ A token that uniquely identifies a request so it can be retried in case of a timeout or
+ server error without risk of executing that same action again. Retry tokens expire after 24
+ hours, but can be invalidated before then due to conflicting operations. For example, if a resource
+ has been deleted and purged from the system, then a retry of the original creation request might be rejected.
+
:param obj retry_strategy: (optional)
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
@@ -28043,29 +30916,30 @@ def patch_sensitive_columns(self, sensitive_data_model_id, patch_sensitive_colum
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use patch_sensitive_columns API.
+ Click `here `__ to see an example of how to use refresh_database_security_configuration API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
- required_arguments = ['sensitiveDataModelId']
- resource_path = "/sensitiveDataModels/{sensitiveDataModelId}/sensitiveColumns"
- method = "PATCH"
- operation_name = "patch_sensitive_columns"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SensitiveColumn/PatchSensitiveColumns"
+ required_arguments = ['databaseSecurityConfigId']
+ resource_path = "/databaseSecurityConfigs/{databaseSecurityConfigId}/actions/refresh"
+ method = "POST"
+ operation_name = "refresh_database_security_configuration"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/DatabaseSecurityConfig/RefreshDatabaseSecurityConfiguration"
# Don't accept unknown kwargs
expected_kwargs = [
"allow_control_chars",
"retry_strategy",
"if_match",
- "opc_request_id"
+ "opc_request_id",
+ "opc_retry_token"
]
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"patch_sensitive_columns got unknown kwargs: {extra_kwargs!r}")
+ f"refresh_database_security_configuration got unknown kwargs: {extra_kwargs!r}")
path_params = {
- "sensitiveDataModelId": sensitive_data_model_id
+ "databaseSecurityConfigId": database_security_config_id
}
path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
@@ -28078,7 +30952,8 @@ def patch_sensitive_columns(self, sensitive_data_model_id, patch_sensitive_colum
"accept": "application/json",
"content-type": "application/json",
"if-match": kwargs.get("if_match", missing),
- "opc-request-id": kwargs.get("opc_request_id", missing)
+ "opc-request-id": kwargs.get("opc_request_id", missing),
+ "opc-retry-token": kwargs.get("opc_retry_token", missing)
}
header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
@@ -28091,6 +30966,7 @@ def patch_sensitive_columns(self, sensitive_data_model_id, patch_sensitive_colum
if retry_strategy:
if not isinstance(retry_strategy, retry.NoneRetryStrategy):
+ self.base_client.add_opc_retry_token_if_needed(header_params)
self.base_client.add_opc_client_retries_header(header_params)
retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
return retry_strategy.make_retrying_call(
@@ -28099,7 +30975,6 @@ def patch_sensitive_columns(self, sensitive_data_model_id, patch_sensitive_colum
method=method,
path_params=path_params,
header_params=header_params,
- body=patch_sensitive_column_details,
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -28110,19 +30985,28 @@ def patch_sensitive_columns(self, sensitive_data_model_id, patch_sensitive_colum
method=method,
path_params=path_params,
header_params=header_params,
- body=patch_sensitive_column_details,
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def patch_target_alert_policy_association(self, patch_target_alert_policy_association_details, **kwargs):
+ def refresh_security_assessment(self, security_assessment_id, run_security_assessment_details, **kwargs):
"""
- Creates new target-alert policy associations that will be applied on the target database.
+ Runs a security assessment, refreshes the latest assessment, and saves it for future reference.
+ The assessment runs with a securityAssessmentId of type LATEST. Before you start, first call the ListSecurityAssessments operation with filter \"type = latest\" to get the security assessment id for the target's latest assessment.
- :param oci.data_safe.models.PatchTargetAlertPolicyAssociationDetails patch_target_alert_policy_association_details: (required)
- The details used to patch the target-alert policy associations.
+ :param str security_assessment_id: (required)
+ The OCID of the security assessment.
+
+ :param oci.data_safe.models.RunSecurityAssessmentDetails run_security_assessment_details: (required)
+ Details to create an on-demand saved security assessment.
+
+ :param str opc_retry_token: (optional)
+ A token that uniquely identifies a request so it can be retried in case of a timeout or
+ server error without risk of executing that same action again. Retry tokens expire after 24
+ hours, but can be invalidated before then due to conflicting operations. For example, if a resource
+ has been deleted and purged from the system, then a retry of the original creation request might be rejected.
:param str opc_request_id: (optional)
Unique identifier for the request.
@@ -28150,30 +31034,42 @@ def patch_target_alert_policy_association(self, patch_target_alert_policy_associ
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use patch_target_alert_policy_association API.
+ Click `here `__ to see an example of how to use refresh_security_assessment API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
- required_arguments = []
- resource_path = "/targetAlertPolicyAssociations"
- method = "PATCH"
- operation_name = "patch_target_alert_policy_association"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/TargetAlertPolicyAssociation/PatchTargetAlertPolicyAssociation"
+ required_arguments = ['securityAssessmentId']
+ resource_path = "/securityAssessments/{securityAssessmentId}/actions/refresh"
+ method = "POST"
+ operation_name = "refresh_security_assessment"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SecurityAssessment/RefreshSecurityAssessment"
# Don't accept unknown kwargs
expected_kwargs = [
"allow_control_chars",
"retry_strategy",
+ "opc_retry_token",
"opc_request_id",
"if_match"
]
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"patch_target_alert_policy_association got unknown kwargs: {extra_kwargs!r}")
+ f"refresh_security_assessment got unknown kwargs: {extra_kwargs!r}")
+
+ path_params = {
+ "securityAssessmentId": security_assessment_id
+ }
+
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
+
+ for (k, v) in six.iteritems(path_params):
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
+ raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
header_params = {
"accept": "application/json",
"content-type": "application/json",
+ "opc-retry-token": kwargs.get("opc_retry_token", missing),
"opc-request-id": kwargs.get("opc_request_id", missing),
"if-match": kwargs.get("if_match", missing)
}
@@ -28188,14 +31084,16 @@ def patch_target_alert_policy_association(self, patch_target_alert_policy_associ
if retry_strategy:
if not isinstance(retry_strategy, retry.NoneRetryStrategy):
+ self.base_client.add_opc_retry_token_if_needed(header_params)
self.base_client.add_opc_client_retries_header(header_params)
retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
return retry_strategy.make_retrying_call(
self.base_client.call_api,
resource_path=resource_path,
method=method,
+ path_params=path_params,
header_params=header_params,
- body=patch_target_alert_policy_association_details,
+ body=run_security_assessment_details,
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -28204,23 +31102,21 @@ def patch_target_alert_policy_association(self, patch_target_alert_policy_associ
return self.base_client.call_api(
resource_path=resource_path,
method=method,
+ path_params=path_params,
header_params=header_params,
- body=patch_target_alert_policy_association_details,
+ body=run_security_assessment_details,
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def provision_audit_policy(self, provision_audit_policy_details, audit_policy_id, **kwargs):
+ def refresh_sql_collection_log_insights(self, sql_collection_id, **kwargs):
"""
- Provision audit policy.
-
+ Refresh the specified SQL collection Log Insights.
- :param oci.data_safe.models.ProvisionAuditPolicyDetails provision_audit_policy_details: (required)
- Details for provisioning the given policies on the source target database.
- :param str audit_policy_id: (required)
- Unique audit policy identifier.
+ :param str sql_collection_id: (required)
+ The OCID of the SQL collection resource.
:param str if_match: (optional)
For optimistic concurrency control. In the PUT or DELETE call
@@ -28254,14 +31150,14 @@ def provision_audit_policy(self, provision_audit_policy_details, audit_policy_id
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use provision_audit_policy API.
+ Click `here `__ to see an example of how to use refresh_sql_collection_log_insights API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
- required_arguments = ['auditPolicyId']
- resource_path = "/auditPolicies/{auditPolicyId}/actions/provision"
+ required_arguments = ['sqlCollectionId']
+ resource_path = "/sqlCollections/{sqlCollectionId}/actions/refreshLogInsights"
method = "POST"
- operation_name = "provision_audit_policy"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/AuditPolicy/ProvisionAuditPolicy"
+ operation_name = "refresh_sql_collection_log_insights"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SqlCollection/RefreshSqlCollectionLogInsights"
# Don't accept unknown kwargs
expected_kwargs = [
@@ -28274,10 +31170,10 @@ def provision_audit_policy(self, provision_audit_policy_details, audit_policy_id
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"provision_audit_policy got unknown kwargs: {extra_kwargs!r}")
+ f"refresh_sql_collection_log_insights got unknown kwargs: {extra_kwargs!r}")
path_params = {
- "auditPolicyId": audit_policy_id
+ "sqlCollectionId": sql_collection_id
}
path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
@@ -28313,7 +31209,6 @@ def provision_audit_policy(self, provision_audit_policy_details, audit_policy_id
method=method,
path_params=path_params,
header_params=header_params,
- body=provision_audit_policy_details,
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -28324,19 +31219,24 @@ def provision_audit_policy(self, provision_audit_policy_details, audit_policy_id
method=method,
path_params=path_params,
header_params=header_params,
- body=provision_audit_policy_details,
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def purge_sql_collection_logs(self, sql_collection_id, **kwargs):
+ def refresh_target_database(self, target_database_id, **kwargs):
"""
- Purge the SQL collection logs for the specified SqlCollection.
+ Refreshes the Data Safe target database to update it's state.
- :param str sql_collection_id: (required)
- The OCID of the SQL collection resource.
+ :param str target_database_id: (required)
+ The OCID of the Data Safe target database.
+
+ :param str opc_retry_token: (optional)
+ A token that uniquely identifies a request so it can be retried in case of a timeout or
+ server error without risk of executing that same action again. Retry tokens expire after 24
+ hours, but can be invalidated before then due to conflicting operations. For example, if a resource
+ has been deleted and purged from the system, then a retry of the original creation request might be rejected.
:param str if_match: (optional)
For optimistic concurrency control. In the PUT or DELETE call
@@ -28348,12 +31248,6 @@ def purge_sql_collection_logs(self, sql_collection_id, **kwargs):
:param str opc_request_id: (optional)
Unique identifier for the request.
- :param str opc_retry_token: (optional)
- A token that uniquely identifies a request so it can be retried in case of a timeout or
- server error without risk of executing that same action again. Retry tokens expire after 24
- hours, but can be invalidated before then due to conflicting operations. For example, if a resource
- has been deleted and purged from the system, then a retry of the original creation request might be rejected.
-
:param obj retry_strategy: (optional)
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
@@ -28370,30 +31264,30 @@ def purge_sql_collection_logs(self, sql_collection_id, **kwargs):
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use purge_sql_collection_logs API.
+ Click `here `__ to see an example of how to use refresh_target_database API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
- required_arguments = ['sqlCollectionId']
- resource_path = "/sqlCollections/{sqlCollectionId}/actions/purgeLogs"
+ required_arguments = ['targetDatabaseId']
+ resource_path = "/targetDatabases/{targetDatabaseId}/actions/refresh"
method = "POST"
- operation_name = "purge_sql_collection_logs"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SqlCollection/PurgeSqlCollectionLogs"
+ operation_name = "refresh_target_database"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/TargetDatabase/RefreshTargetDatabase"
# Don't accept unknown kwargs
expected_kwargs = [
"allow_control_chars",
"retry_strategy",
+ "opc_retry_token",
"if_match",
- "opc_request_id",
- "opc_retry_token"
+ "opc_request_id"
]
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"purge_sql_collection_logs got unknown kwargs: {extra_kwargs!r}")
+ f"refresh_target_database got unknown kwargs: {extra_kwargs!r}")
path_params = {
- "sqlCollectionId": sql_collection_id
+ "targetDatabaseId": target_database_id
}
path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
@@ -28405,9 +31299,9 @@ def purge_sql_collection_logs(self, sql_collection_id, **kwargs):
header_params = {
"accept": "application/json",
"content-type": "application/json",
+ "opc-retry-token": kwargs.get("opc_retry_token", missing),
"if-match": kwargs.get("if_match", missing),
- "opc-request-id": kwargs.get("opc_request_id", missing),
- "opc-retry-token": kwargs.get("opc_retry_token", missing)
+ "opc-request-id": kwargs.get("opc_request_id", missing)
}
header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
@@ -28444,23 +31338,18 @@ def purge_sql_collection_logs(self, sql_collection_id, **kwargs):
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def refresh_database_security_configuration(self, database_security_config_id, **kwargs):
+ def refresh_user_assessment(self, user_assessment_id, run_user_assessment_details, **kwargs):
"""
- Refreshes the specified database security configuration.
-
+ Refreshes the latest assessment and saves it for future reference. This operation runs with a userAssessmentId of type LATEST.
+ Before you start, first call the ListUserAssessments operation with filter \"type = latest\" to get the user assessment ID for
+ the target's latest assessment.
- :param str database_security_config_id: (required)
- The OCID of the database security configuration resource.
- :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 user_assessment_id: (required)
+ The OCID of the user assessment.
- :param str opc_request_id: (optional)
- Unique identifier for the request.
+ :param oci.data_safe.models.RunUserAssessmentDetails run_user_assessment_details: (required)
+ The details required to create an on-demand saved user assessment.
:param str opc_retry_token: (optional)
A token that uniquely identifies a request so it can be retried in case of a timeout or
@@ -28468,6 +31357,16 @@ def refresh_database_security_configuration(self, database_security_config_id, *
hours, but can be invalidated before then due to conflicting operations. For example, if a resource
has been deleted and purged from the system, then a retry of the original creation request might be rejected.
+ :param str opc_request_id: (optional)
+ Unique identifier for the request.
+
+ :param str if_match: (optional)
+ For optimistic concurrency control. In the PUT or DELETE call
+ for a resource, set the if-match parameter to the value of the
+ etag from a previous GET or POST response for that resource.
+ The resource will be updated or deleted only if the etag you
+ provide matches the resource's current etag value.
+
:param obj retry_strategy: (optional)
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
@@ -28484,30 +31383,30 @@ def refresh_database_security_configuration(self, database_security_config_id, *
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use refresh_database_security_configuration API.
+ Click `here `__ to see an example of how to use refresh_user_assessment API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
- required_arguments = ['databaseSecurityConfigId']
- resource_path = "/databaseSecurityConfigs/{databaseSecurityConfigId}/actions/refresh"
+ required_arguments = ['userAssessmentId']
+ resource_path = "/userAssessments/{userAssessmentId}/actions/refresh"
method = "POST"
- operation_name = "refresh_database_security_configuration"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/DatabaseSecurityConfig/RefreshDatabaseSecurityConfiguration"
+ operation_name = "refresh_user_assessment"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/UserAssessment/RefreshUserAssessment"
# Don't accept unknown kwargs
expected_kwargs = [
"allow_control_chars",
"retry_strategy",
- "if_match",
+ "opc_retry_token",
"opc_request_id",
- "opc_retry_token"
+ "if_match"
]
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"refresh_database_security_configuration got unknown kwargs: {extra_kwargs!r}")
+ f"refresh_user_assessment got unknown kwargs: {extra_kwargs!r}")
path_params = {
- "databaseSecurityConfigId": database_security_config_id
+ "userAssessmentId": user_assessment_id
}
path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
@@ -28519,9 +31418,9 @@ def refresh_database_security_configuration(self, database_security_config_id, *
header_params = {
"accept": "application/json",
"content-type": "application/json",
- "if-match": kwargs.get("if_match", missing),
+ "opc-retry-token": kwargs.get("opc_retry_token", missing),
"opc-request-id": kwargs.get("opc_request_id", missing),
- "opc-retry-token": kwargs.get("opc_retry_token", missing)
+ "if-match": kwargs.get("if_match", missing)
}
header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
@@ -28543,6 +31442,7 @@ def refresh_database_security_configuration(self, database_security_config_id, *
method=method,
path_params=path_params,
header_params=header_params,
+ body=run_user_assessment_details,
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -28553,31 +31453,19 @@ def refresh_database_security_configuration(self, database_security_config_id, *
method=method,
path_params=path_params,
header_params=header_params,
+ body=run_user_assessment_details,
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def refresh_security_assessment(self, security_assessment_id, run_security_assessment_details, **kwargs):
+ def remove_schedule_report(self, report_definition_id, **kwargs):
"""
- Runs a security assessment, refreshes the latest assessment, and saves it for future reference.
- The assessment runs with a securityAssessmentId of type LATEST. Before you start, first call the ListSecurityAssessments operation with filter \"type = latest\" to get the security assessment id for the target's latest assessment.
-
-
- :param str security_assessment_id: (required)
- The OCID of the security assessment.
-
- :param oci.data_safe.models.RunSecurityAssessmentDetails run_security_assessment_details: (required)
- Details to create an on-demand saved security assessment.
+ Deletes the schedule of a .xls or .pdf report.
- :param str opc_retry_token: (optional)
- A token that uniquely identifies a request so it can be retried in case of a timeout or
- server error without risk of executing that same action again. Retry tokens expire after 24
- hours, but can be invalidated before then due to conflicting operations. For example, if a resource
- has been deleted and purged from the system, then a retry of the original creation request might be rejected.
- :param str opc_request_id: (optional)
- Unique identifier for the request.
+ :param str report_definition_id: (required)
+ Unique report definition identifier
:param str if_match: (optional)
For optimistic concurrency control. In the PUT or DELETE call
@@ -28586,6 +31474,15 @@ def refresh_security_assessment(self, security_assessment_id, run_security_asses
The resource will be updated or deleted only if the etag you
provide matches the resource's current etag value.
+ :param str opc_request_id: (optional)
+ Unique identifier for the request.
+
+ :param str opc_retry_token: (optional)
+ A token that uniquely identifies a request so it can be retried in case of a timeout or
+ server error without risk of executing that same action again. Retry tokens expire after 24
+ hours, but can be invalidated before then due to conflicting operations. For example, if a resource
+ has been deleted and purged from the system, then a retry of the original creation request might be rejected.
+
:param obj retry_strategy: (optional)
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
@@ -28602,30 +31499,30 @@ def refresh_security_assessment(self, security_assessment_id, run_security_asses
:rtype: :class:`~oci.response.Response`
:example:
- Click `here `__ to see an example of how to use refresh_security_assessment API.
+ Click `here `__ to see an example of how to use remove_schedule_report API.
"""
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
- required_arguments = ['securityAssessmentId']
- resource_path = "/securityAssessments/{securityAssessmentId}/actions/refresh"
+ required_arguments = ['reportDefinitionId']
+ resource_path = "/reportDefinitions/{reportDefinitionId}/actions/removeScheduleReport"
method = "POST"
- operation_name = "refresh_security_assessment"
- api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SecurityAssessment/RefreshSecurityAssessment"
+ operation_name = "remove_schedule_report"
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/ReportDefinition/RemoveScheduleReport"
# Don't accept unknown kwargs
expected_kwargs = [
"allow_control_chars",
"retry_strategy",
- "opc_retry_token",
+ "if_match",
"opc_request_id",
- "if_match"
+ "opc_retry_token"
]
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- f"refresh_security_assessment got unknown kwargs: {extra_kwargs!r}")
+ f"remove_schedule_report got unknown kwargs: {extra_kwargs!r}")
path_params = {
- "securityAssessmentId": security_assessment_id
+ "reportDefinitionId": report_definition_id
}
path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
@@ -28637,9 +31534,9 @@ def refresh_security_assessment(self, security_assessment_id, run_security_asses
header_params = {
"accept": "application/json",
"content-type": "application/json",
- "opc-retry-token": kwargs.get("opc_retry_token", missing),
+ "if-match": kwargs.get("if_match", missing),
"opc-request-id": kwargs.get("opc_request_id", missing),
- "if-match": kwargs.get("if_match", missing)
+ "opc-retry-token": kwargs.get("opc_retry_token", missing)
}
header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
@@ -28661,7 +31558,6 @@ def refresh_security_assessment(self, security_assessment_id, run_security_asses
method=method,
path_params=path_params,
header_params=header_params,
- body=run_security_assessment_details,
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
@@ -28672,19 +31568,18 @@ def refresh_security_assessment(self, security_assessment_id, run_security_asses
method=method,
path_params=path_params,
header_params=header_params,
- body=run_security_assessment_details,
allow_control_chars=kwargs.get('allow_control_chars'),
operation_name=operation_name,
api_reference_link=api_reference_link,
required_arguments=required_arguments)
- def refresh_sql_collection_log_insights(self, sql_collection_id, **kwargs):
+ def resume_audit_trail(self, audit_trail_id, **kwargs):
"""
- Refresh the specified SQL collection Log Insights.
+ Resumes the specified audit trail once it got stopped.
- :param str sql_collection_id: (required)
- The OCID of the SQL collection resource.
+ :param str audit_trail_id: (required)
+ The OCID of the audit trail.
:param str if_match: (optional)
For optimistic concurrency control. In the PUT or DELETE call
@@ -28696,12 +31591,6 @@ def refresh_sql_collection_log_insights(self, sql_collection_id, **kwargs):
:param str opc_request_id: (optional)
Unique identifier for the request.
- :param str opc_retry_token: (optional)
- A token that uniquely identifies a request so it can be retried in case of a timeout or
- server error without risk of executing that same action again. Retry tokens expire after 24
- hours, but can be invalidated before then due to conflicting operations. For example, if a resource
- has been deleted and purged from the system, then a retry of the original creation request might be rejected.
-
:param obj retry_strategy: (optional)
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
@@ -28718,30 +31607,29 @@ def refresh_sql_collection_log_insights(self, sql_collection_id, **kwargs):
:rtype: :class:`~oci.response.Response`
:example:
- Click `here