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 `__ to see an example of how to use refresh_sql_collection_log_insights API. + Click `here `__ to see an example of how to use resume_audit_trail API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['sqlCollectionId'] - resource_path = "/sqlCollections/{sqlCollectionId}/actions/refreshLogInsights" + required_arguments = ['auditTrailId'] + resource_path = "/auditTrails/{auditTrailId}/actions/resume" method = "POST" - operation_name = "refresh_sql_collection_log_insights" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SqlCollection/RefreshSqlCollectionLogInsights" + operation_name = "resume_audit_trail" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/AuditTrail/ResumeAuditTrail" # 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"refresh_sql_collection_log_insights got unknown kwargs: {extra_kwargs!r}") + f"resume_audit_trail got unknown kwargs: {extra_kwargs!r}") path_params = { - "sqlCollectionId": sql_collection_id + "auditTrailId": audit_trail_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -28754,8 +31642,7 @@ def refresh_sql_collection_log_insights(self, sql_collection_id, **kwargs): "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} @@ -28768,7 +31655,6 @@ def refresh_sql_collection_log_insights(self, sql_collection_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( @@ -28792,18 +31678,13 @@ def refresh_sql_collection_log_insights(self, sql_collection_id, **kwargs): api_reference_link=api_reference_link, required_arguments=required_arguments) - def refresh_user_assessment(self, user_assessment_id, run_user_assessment_details, **kwargs): + def resume_work_request(self, work_request_id, **kwargs): """ - 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. - + Resume the given work request. Issuing a resume does not guarantee of immediate resume of the work request. - :param str user_assessment_id: (required) - The OCID of the user assessment. - :param oci.data_safe.models.RunUserAssessmentDetails run_user_assessment_details: (required) - The details required to create an on-demand saved user assessment. + :param str work_request_id: (required) + The OCID of the work 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 @@ -28837,14 +31718,14 @@ def refresh_user_assessment(self, user_assessment_id, run_user_assessment_detail :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use refresh_user_assessment API. + Click `here `__ to see an example of how to use resume_work_request API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['userAssessmentId'] - resource_path = "/userAssessments/{userAssessmentId}/actions/refresh" + required_arguments = ['workRequestId'] + resource_path = "/workRequests/{workRequestId}/actions/resume" method = "POST" - operation_name = "refresh_user_assessment" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/UserAssessment/RefreshUserAssessment" + operation_name = "resume_work_request" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/WorkRequest/ResumeWorkRequest" # Don't accept unknown kwargs expected_kwargs = [ @@ -28857,10 +31738,10 @@ def refresh_user_assessment(self, user_assessment_id, run_user_assessment_detail extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"refresh_user_assessment got unknown kwargs: {extra_kwargs!r}") + f"resume_work_request got unknown kwargs: {extra_kwargs!r}") path_params = { - "userAssessmentId": user_assessment_id + "workRequestId": work_request_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -28896,7 +31777,6 @@ def refresh_user_assessment(self, user_assessment_id, run_user_assessment_detail 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, @@ -28907,19 +31787,18 @@ def refresh_user_assessment(self, user_assessment_id, run_user_assessment_detail 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 remove_schedule_report(self, report_definition_id, **kwargs): + def retrieve_audit_policies(self, audit_policy_id, **kwargs): """ - Deletes the schedule of a .xls or .pdf report. + Retrieves the audit policy details from the source target database. - :param str report_definition_id: (required) - Unique report definition identifier + :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 @@ -28953,14 +31832,14 @@ def remove_schedule_report(self, report_definition_id, **kwargs): :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use remove_schedule_report API. + Click `here `__ to see an example of how to use retrieve_audit_policies API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['reportDefinitionId'] - resource_path = "/reportDefinitions/{reportDefinitionId}/actions/removeScheduleReport" + required_arguments = ['auditPolicyId'] + resource_path = "/auditPolicies/{auditPolicyId}/actions/retrieveFromTarget" method = "POST" - operation_name = "remove_schedule_report" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/ReportDefinition/RemoveScheduleReport" + operation_name = "retrieve_audit_policies" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/AuditPolicy/RetrieveAuditPolicies" # Don't accept unknown kwargs expected_kwargs = [ @@ -28973,10 +31852,10 @@ def remove_schedule_report(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"remove_schedule_report got unknown kwargs: {extra_kwargs!r}") + f"retrieve_audit_policies got unknown kwargs: {extra_kwargs!r}") path_params = { - "reportDefinitionId": report_definition_id + "auditPolicyId": audit_policy_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -29027,13 +31906,16 @@ def remove_schedule_report(self, report_definition_id, **kwargs): api_reference_link=api_reference_link, required_arguments=required_arguments) - def resume_audit_trail(self, audit_trail_id, **kwargs): + def schedule_report(self, report_definition_id, schedule_report_details, **kwargs): """ - Resumes the specified audit trail once it got stopped. + Schedules a .xls or .pdf report based on parameters and report definition. - :param str audit_trail_id: (required) - The OCID of the audit trail. + :param str report_definition_id: (required) + Unique report definition identifier + + :param oci.data_safe.models.ScheduleReportDetails schedule_report_details: (required) + The details for the audit report schedule. It contains details such as schedule, MIME type .xls/.pdf and number of rows. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call @@ -29045,6 +31927,12 @@ def resume_audit_trail(self, audit_trail_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. @@ -29061,29 +31949,30 @@ def resume_audit_trail(self, audit_trail_id, **kwargs): :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use resume_audit_trail API. + Click `here `__ to see an example of how to use schedule_report API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['auditTrailId'] - resource_path = "/auditTrails/{auditTrailId}/actions/resume" + required_arguments = ['reportDefinitionId'] + resource_path = "/reportDefinitions/{reportDefinitionId}/actions/scheduleReport" method = "POST" - operation_name = "resume_audit_trail" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/AuditTrail/ResumeAuditTrail" + operation_name = "schedule_report" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/ReportDefinition/ScheduleReport" # 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"resume_audit_trail got unknown kwargs: {extra_kwargs!r}") + f"schedule_report got unknown kwargs: {extra_kwargs!r}") path_params = { - "auditTrailId": audit_trail_id + "reportDefinitionId": report_definition_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -29096,7 +31985,8 @@ def resume_audit_trail(self, audit_trail_id, **kwargs): "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} @@ -29109,6 +31999,7 @@ def resume_audit_trail(self, audit_trail_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( @@ -29117,6 +32008,7 @@ def resume_audit_trail(self, audit_trail_id, **kwargs): method=method, path_params=path_params, header_params=header_params, + body=schedule_report_details, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -29127,18 +32019,26 @@ def resume_audit_trail(self, audit_trail_id, **kwargs): method=method, path_params=path_params, header_params=header_params, + body=schedule_report_details, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def resume_work_request(self, work_request_id, **kwargs): + def set_security_assessment_baseline(self, security_assessment_id, **kwargs): """ - Resume the given work request. Issuing a resume does not guarantee of immediate resume of the work request. + Sets the saved security assessment as the baseline in the compartment where the the specified assessment resides. The security assessment needs to be of type 'SAVED'. - :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 str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the if-match parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. :param str opc_retry_token: (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or @@ -29149,12 +32049,8 @@ def resume_work_request(self, work_request_id, **kwargs): :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 oci.data_safe.models.SecurityAssessmentBaseLineDetails base_line_details: (optional) + Details of security assessment that need to be updated while setting the baseline. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. @@ -29172,30 +32068,31 @@ def resume_work_request(self, work_request_id, **kwargs): :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use resume_work_request API. + Click `here `__ to see an example of how to use set_security_assessment_baseline API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['workRequestId'] - resource_path = "/workRequests/{workRequestId}/actions/resume" + required_arguments = ['securityAssessmentId'] + resource_path = "/securityAssessments/{securityAssessmentId}/actions/setBaseline" method = "POST" - operation_name = "resume_work_request" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/WorkRequest/ResumeWorkRequest" + operation_name = "set_security_assessment_baseline" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SecurityAssessment/SetSecurityAssessmentBaseline" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", + "if_match", "opc_retry_token", "opc_request_id", - "if_match" + "base_line_details" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"resume_work_request got unknown kwargs: {extra_kwargs!r}") + f"set_security_assessment_baseline got unknown kwargs: {extra_kwargs!r}") path_params = { - "workRequestId": work_request_id + "securityAssessmentId": security_assessment_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -29207,9 +32104,9 @@ def resume_work_request(self, work_request_id, **kwargs): 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), - "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} @@ -29231,6 +32128,7 @@ def resume_work_request(self, work_request_id, **kwargs): method=method, path_params=path_params, header_params=header_params, + body=kwargs.get('base_line_details'), allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -29241,18 +32139,19 @@ def resume_work_request(self, work_request_id, **kwargs): method=method, path_params=path_params, header_params=header_params, + body=kwargs.get('base_line_details'), allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def retrieve_audit_policies(self, audit_policy_id, **kwargs): + def set_user_assessment_baseline(self, user_assessment_id, **kwargs): """ - Retrieves the audit policy details from the source target database. + Sets the saved user assessment as the baseline in the compartment where the specified assessment resides. The user assessment needs to be of type 'SAVED'. - :param str audit_policy_id: (required) - Unique audit policy identifier. + :param str user_assessment_id: (required) + The OCID of the user assessment. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call @@ -29261,15 +32160,18 @@ def retrieve_audit_policies(self, audit_policy_id, **kwargs): 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 str opc_request_id: (optional) + Unique identifier for the request. + + :param oci.data_safe.models.UserAssessmentBaseLineDetails base_line_details: (optional) + Details of user assessment that need to be updated while setting the baseline. + :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. @@ -29286,30 +32188,31 @@ def retrieve_audit_policies(self, audit_policy_id, **kwargs): :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use retrieve_audit_policies API. + Click `here `__ to see an example of how to use set_user_assessment_baseline API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['auditPolicyId'] - resource_path = "/auditPolicies/{auditPolicyId}/actions/retrieveFromTarget" + required_arguments = ['userAssessmentId'] + resource_path = "/userAssessments/{userAssessmentId}/actions/setBaseline" method = "POST" - operation_name = "retrieve_audit_policies" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/AuditPolicy/RetrieveAuditPolicies" + operation_name = "set_user_assessment_baseline" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/UserAssessment/SetUserAssessmentBaseline" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "if_match", + "opc_retry_token", "opc_request_id", - "opc_retry_token" + "base_line_details" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"retrieve_audit_policies got unknown kwargs: {extra_kwargs!r}") + f"set_user_assessment_baseline got unknown kwargs: {extra_kwargs!r}") path_params = { - "auditPolicyId": audit_policy_id + "userAssessmentId": user_assessment_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -29322,8 +32225,8 @@ def retrieve_audit_policies(self, audit_policy_id, **kwargs): "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-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} @@ -29345,6 +32248,7 @@ def retrieve_audit_policies(self, audit_policy_id, **kwargs): method=method, path_params=path_params, header_params=header_params, + body=kwargs.get('base_line_details'), allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -29355,21 +32259,22 @@ def retrieve_audit_policies(self, audit_policy_id, **kwargs): method=method, path_params=path_params, header_params=header_params, + body=kwargs.get('base_line_details'), allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def schedule_report(self, report_definition_id, schedule_report_details, **kwargs): + def start_audit_trail(self, start_audit_trail_details, audit_trail_id, **kwargs): """ - Schedules a .xls or .pdf report based on parameters and report definition. + Starts collection of audit records on the specified audit trail. - :param str report_definition_id: (required) - Unique report definition identifier + :param oci.data_safe.models.StartAuditTrailDetails start_audit_trail_details: (required) + Details for the starting audit. - :param oci.data_safe.models.ScheduleReportDetails schedule_report_details: (required) - The details for the audit report schedule. It contains details such as schedule, MIME type .xls/.pdf and number of rows. + :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 @@ -29403,14 +32308,14 @@ def schedule_report(self, report_definition_id, schedule_report_details, **kwarg :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use schedule_report API. + Click `here `__ to see an example of how to use start_audit_trail API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['reportDefinitionId'] - resource_path = "/reportDefinitions/{reportDefinitionId}/actions/scheduleReport" + required_arguments = ['auditTrailId'] + resource_path = "/auditTrails/{auditTrailId}/actions/start" method = "POST" - operation_name = "schedule_report" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/ReportDefinition/ScheduleReport" + operation_name = "start_audit_trail" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/AuditTrail/StartAuditTrail" # Don't accept unknown kwargs expected_kwargs = [ @@ -29423,10 +32328,10 @@ def schedule_report(self, report_definition_id, schedule_report_details, **kwarg extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"schedule_report got unknown kwargs: {extra_kwargs!r}") + f"start_audit_trail got unknown kwargs: {extra_kwargs!r}") path_params = { - "reportDefinitionId": report_definition_id + "auditTrailId": audit_trail_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -29462,7 +32367,7 @@ def schedule_report(self, report_definition_id, schedule_report_details, **kwarg method=method, path_params=path_params, header_params=header_params, - body=schedule_report_details, + body=start_audit_trail_details, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -29473,19 +32378,19 @@ def schedule_report(self, report_definition_id, schedule_report_details, **kwarg method=method, path_params=path_params, header_params=header_params, - body=schedule_report_details, + body=start_audit_trail_details, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def set_security_assessment_baseline(self, security_assessment_id, **kwargs): + def start_sql_collection(self, sql_collection_id, **kwargs): """ - Sets the saved security assessment as the baseline in the compartment where the the specified assessment resides. The security assessment needs to be of type 'SAVED'. + Start the specified SQL collection. - :param str security_assessment_id: (required) - The OCID of the security assessment. + :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 @@ -29494,18 +32399,15 @@ def set_security_assessment_baseline(self, security_assessment_id, **kwargs): 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 str opc_request_id: (optional) - Unique identifier for the request. - - :param oci.data_safe.models.SecurityAssessmentBaseLineDetails base_line_details: (optional) - Details of security assessment that need to be updated while setting the baseline. - :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. @@ -29522,31 +32424,30 @@ def set_security_assessment_baseline(self, security_assessment_id, **kwargs): :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use set_security_assessment_baseline API. + Click `here `__ to see an example of how to use start_sql_collection API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['securityAssessmentId'] - resource_path = "/securityAssessments/{securityAssessmentId}/actions/setBaseline" + required_arguments = ['sqlCollectionId'] + resource_path = "/sqlCollections/{sqlCollectionId}/actions/start" method = "POST" - operation_name = "set_security_assessment_baseline" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SecurityAssessment/SetSecurityAssessmentBaseline" + operation_name = "start_sql_collection" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/sqlCollection/StartSqlCollection" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "if_match", - "opc_retry_token", "opc_request_id", - "base_line_details" + "opc_retry_token" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"set_security_assessment_baseline got unknown kwargs: {extra_kwargs!r}") + f"start_sql_collection got unknown kwargs: {extra_kwargs!r}") path_params = { - "securityAssessmentId": security_assessment_id + "sqlCollectionId": sql_collection_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -29559,8 +32460,8 @@ def set_security_assessment_baseline(self, security_assessment_id, **kwargs): "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-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} @@ -29582,7 +32483,6 @@ def set_security_assessment_baseline(self, security_assessment_id, **kwargs): method=method, path_params=path_params, header_params=header_params, - body=kwargs.get('base_line_details'), allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -29593,19 +32493,18 @@ def set_security_assessment_baseline(self, security_assessment_id, **kwargs): method=method, path_params=path_params, header_params=header_params, - body=kwargs.get('base_line_details'), allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def set_user_assessment_baseline(self, user_assessment_id, **kwargs): + def stop_audit_trail(self, audit_trail_id, **kwargs): """ - Sets the saved user assessment as the baseline in the compartment where the specified assessment resides. The user assessment needs to be of type 'SAVED'. + Stops the specified audit trail. - :param str user_assessment_id: (required) - The OCID of the user assessment. + :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 @@ -29614,18 +32513,9 @@ def set_user_assessment_baseline(self, user_assessment_id, **kwargs): The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. - :param str opc_retry_token: (optional) - A token that uniquely identifies a request so it can be retried in case of a timeout or - server error without risk of executing that same action again. Retry tokens expire after 24 - hours, but can be invalidated before then due to conflicting operations. For example, if a resource - has been deleted and purged from the system, then a retry of the original creation request might be rejected. - :param str opc_request_id: (optional) Unique identifier for the request. - :param oci.data_safe.models.UserAssessmentBaseLineDetails base_line_details: (optional) - Details of user assessment that need to be updated while setting the baseline. - :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. @@ -29642,31 +32532,29 @@ def set_user_assessment_baseline(self, user_assessment_id, **kwargs): :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use set_user_assessment_baseline API. + Click `here `__ to see an example of how to use stop_audit_trail API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['userAssessmentId'] - resource_path = "/userAssessments/{userAssessmentId}/actions/setBaseline" + required_arguments = ['auditTrailId'] + resource_path = "/auditTrails/{auditTrailId}/actions/stop" method = "POST" - operation_name = "set_user_assessment_baseline" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/UserAssessment/SetUserAssessmentBaseline" + operation_name = "stop_audit_trail" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/AuditTrail/StopAuditTrail" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "if_match", - "opc_retry_token", - "opc_request_id", - "base_line_details" + "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"set_user_assessment_baseline got unknown kwargs: {extra_kwargs!r}") + f"stop_audit_trail got unknown kwargs: {extra_kwargs!r}") path_params = { - "userAssessmentId": user_assessment_id + "auditTrailId": audit_trail_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -29679,7 +32567,6 @@ def set_user_assessment_baseline(self, user_assessment_id, **kwargs): "accept": "application/json", "content-type": "application/json", "if-match": kwargs.get("if_match", missing), - "opc-retry-token": kwargs.get("opc_retry_token", missing), "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} @@ -29693,7 +32580,6 @@ def set_user_assessment_baseline(self, user_assessment_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( @@ -29702,7 +32588,6 @@ def set_user_assessment_baseline(self, user_assessment_id, **kwargs): method=method, path_params=path_params, header_params=header_params, - body=kwargs.get('base_line_details'), allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -29713,22 +32598,18 @@ def set_user_assessment_baseline(self, user_assessment_id, **kwargs): method=method, path_params=path_params, header_params=header_params, - body=kwargs.get('base_line_details'), allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def start_audit_trail(self, start_audit_trail_details, audit_trail_id, **kwargs): + def stop_sql_collection(self, sql_collection_id, **kwargs): """ - Starts collection of audit records on the specified audit trail. - + Stops the specified SQL collection. - :param oci.data_safe.models.StartAuditTrailDetails start_audit_trail_details: (required) - Details for the starting audit. - :param str audit_trail_id: (required) - The OCID of the audit trail. + :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 @@ -29762,14 +32643,14 @@ def start_audit_trail(self, start_audit_trail_details, audit_trail_id, **kwargs) :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use start_audit_trail API. + Click `here `__ to see an example of how to use stop_sql_collection API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['auditTrailId'] - resource_path = "/auditTrails/{auditTrailId}/actions/start" + required_arguments = ['sqlCollectionId'] + resource_path = "/sqlCollections/{sqlCollectionId}/actions/stop" method = "POST" - operation_name = "start_audit_trail" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/AuditTrail/StartAuditTrail" + operation_name = "stop_sql_collection" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SqlCollection/StopSqlCollection" # Don't accept unknown kwargs expected_kwargs = [ @@ -29782,10 +32663,10 @@ def start_audit_trail(self, start_audit_trail_details, audit_trail_id, **kwargs) extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"start_audit_trail got unknown kwargs: {extra_kwargs!r}") + f"stop_sql_collection got unknown kwargs: {extra_kwargs!r}") path_params = { - "auditTrailId": audit_trail_id + "sqlCollectionId": sql_collection_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -29821,7 +32702,6 @@ def start_audit_trail(self, start_audit_trail_details, audit_trail_id, **kwargs) method=method, path_params=path_params, header_params=header_params, - body=start_audit_trail_details, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -29832,19 +32712,27 @@ def start_audit_trail(self, start_audit_trail_details, audit_trail_id, **kwargs) method=method, path_params=path_params, header_params=header_params, - body=start_audit_trail_details, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def start_sql_collection(self, sql_collection_id, **kwargs): + def suspend_work_request(self, work_request_id, **kwargs): """ - Start the specified SQL collection. + Suspend the given work request. Issuing a suspend does not guarantee of a immediate suspend of the work request. - :param str sql_collection_id: (required) - The OCID of the SQL collection resource. + :param str work_request_id: (required) + The OCID of the work 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 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 @@ -29853,15 +32741,6 @@ def start_sql_collection(self, sql_collection_id, **kwargs): 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. @@ -29878,30 +32757,30 @@ def start_sql_collection(self, sql_collection_id, **kwargs): :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use start_sql_collection API. + Click `here `__ to see an example of how to use suspend_work_request API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['sqlCollectionId'] - resource_path = "/sqlCollections/{sqlCollectionId}/actions/start" + required_arguments = ['workRequestId'] + resource_path = "/workRequests/{workRequestId}/actions/suspend" method = "POST" - operation_name = "start_sql_collection" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/sqlCollection/StartSqlCollection" + operation_name = "suspend_work_request" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/WorkRequest/SuspendWorkRequest" # 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"start_sql_collection got unknown kwargs: {extra_kwargs!r}") + f"suspend_work_request got unknown kwargs: {extra_kwargs!r}") path_params = { - "sqlCollectionId": sql_collection_id + "workRequestId": work_request_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -29913,9 +32792,9 @@ def start_sql_collection(self, sql_collection_id, **kwargs): 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} @@ -29952,13 +32831,14 @@ def start_sql_collection(self, sql_collection_id, **kwargs): api_reference_link=api_reference_link, required_arguments=required_arguments) - def stop_audit_trail(self, audit_trail_id, **kwargs): + def unset_security_assessment_baseline(self, security_assessment_id, **kwargs): """ - Stops the specified audit trail. + Removes the baseline setting for the saved security assessment. The saved security assessment is no longer considered a baseline. + Sets the if-match parameter to the value of the etag from a previous GET or POST response for that resource. - :param str audit_trail_id: (required) - The OCID of the audit trail. + :param str security_assessment_id: (required) + The OCID of the security assessment. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call @@ -29967,6 +32847,12 @@ def stop_audit_trail(self, audit_trail_id, **kwargs): The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + :param str opc_retry_token: (optional) + A token that uniquely identifies a request so it can be retried in case of a timeout or + server error without risk of executing that same action again. Retry tokens expire after 24 + hours, but can be invalidated before then due to conflicting operations. For example, if a resource + has been deleted and purged from the system, then a retry of the original creation request might be rejected. + :param str opc_request_id: (optional) Unique identifier for the request. @@ -29986,29 +32872,30 @@ def stop_audit_trail(self, audit_trail_id, **kwargs): :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use stop_audit_trail API. + Click `here `__ to see an example of how to use unset_security_assessment_baseline API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['auditTrailId'] - resource_path = "/auditTrails/{auditTrailId}/actions/stop" + required_arguments = ['securityAssessmentId'] + resource_path = "/securityAssessments/{securityAssessmentId}/actions/unsetBaseline" method = "POST" - operation_name = "stop_audit_trail" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/AuditTrail/StopAuditTrail" + operation_name = "unset_security_assessment_baseline" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SecurityAssessment/UnsetSecurityAssessmentBaseline" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "if_match", + "opc_retry_token", "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"stop_audit_trail got unknown kwargs: {extra_kwargs!r}") + f"unset_security_assessment_baseline got unknown kwargs: {extra_kwargs!r}") path_params = { - "auditTrailId": audit_trail_id + "securityAssessmentId": security_assessment_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -30021,6 +32908,7 @@ def stop_audit_trail(self, audit_trail_id, **kwargs): "accept": "application/json", "content-type": "application/json", "if-match": kwargs.get("if_match", missing), + "opc-retry-token": kwargs.get("opc_retry_token", missing), "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} @@ -30034,6 +32922,7 @@ def stop_audit_trail(self, audit_trail_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( @@ -30057,13 +32946,14 @@ def stop_audit_trail(self, audit_trail_id, **kwargs): api_reference_link=api_reference_link, required_arguments=required_arguments) - def stop_sql_collection(self, sql_collection_id, **kwargs): + def unset_user_assessment_baseline(self, user_assessment_id, **kwargs): """ - Stops the specified SQL collection. + Removes the baseline setting for the saved user assessment. The saved user assessment is no longer considered a baseline. + Sets the if-match parameter to the value of the etag from a previous GET or POST response for that resource. - :param str sql_collection_id: (required) - The OCID of the SQL collection resource. + :param str user_assessment_id: (required) + The OCID of the user assessment. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call @@ -30072,15 +32962,15 @@ def stop_sql_collection(self, sql_collection_id, **kwargs): 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 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. @@ -30097,30 +32987,30 @@ def stop_sql_collection(self, sql_collection_id, **kwargs): :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use stop_sql_collection API. + Click `here `__ to see an example of how to use unset_user_assessment_baseline API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['sqlCollectionId'] - resource_path = "/sqlCollections/{sqlCollectionId}/actions/stop" + required_arguments = ['userAssessmentId'] + resource_path = "/userAssessments/{userAssessmentId}/actions/unsetBaseline" method = "POST" - operation_name = "stop_sql_collection" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SqlCollection/StopSqlCollection" + operation_name = "unset_user_assessment_baseline" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/UserAssessment/UnsetUserAssessmentBaseline" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "if_match", - "opc_request_id", - "opc_retry_token" + "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"stop_sql_collection got unknown kwargs: {extra_kwargs!r}") + f"unset_user_assessment_baseline got unknown kwargs: {extra_kwargs!r}") path_params = { - "sqlCollectionId": sql_collection_id + "userAssessmentId": user_assessment_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -30133,8 +33023,8 @@ def stop_sql_collection(self, sql_collection_id, **kwargs): "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-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} @@ -30171,22 +33061,16 @@ def stop_sql_collection(self, sql_collection_id, **kwargs): api_reference_link=api_reference_link, required_arguments=required_arguments) - def suspend_work_request(self, work_request_id, **kwargs): + def update_alert(self, alert_id, update_alert_details, **kwargs): """ - Suspend the given work request. Issuing a suspend does not guarantee of a immediate suspend of the work request. - + Updates the status of the specified alert. - :param str work_request_id: (required) - The OCID of the work 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 str alert_id: (required) + The OCID of alert. - :param str opc_request_id: (optional) - Unique identifier for the request. + :param oci.data_safe.models.UpdateAlertDetails update_alert_details: (required) + The details used to update alert status. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call @@ -30195,6 +33079,9 @@ def suspend_work_request(self, work_request_id, **kwargs): 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. @@ -30207,34 +33094,33 @@ def suspend_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 None + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.Alert` :rtype: :class:`~oci.response.Response` - :example: - Click `here `__ to see an example of how to use suspend_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}/actions/suspend" - method = "POST" - operation_name = "suspend_work_request" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/WorkRequest/SuspendWorkRequest" + :example: + Click `here `__ to see an example of how to use update_alert API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['alertId'] + resource_path = "/alerts/{alertId}" + method = "PUT" + operation_name = "update_alert" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/Alert/UpdateAlert" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "opc_retry_token", - "opc_request_id", - "if_match" + "if_match", + "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"suspend_work_request got unknown kwargs: {extra_kwargs!r}") + f"update_alert got unknown kwargs: {extra_kwargs!r}") path_params = { - "workRequestId": work_request_id + "alertId": alert_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -30246,9 +33132,8 @@ def suspend_work_request(self, work_request_id, **kwargs): 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) + "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} @@ -30261,7 +33146,6 @@ def suspend_work_request(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( @@ -30270,6 +33154,8 @@ def suspend_work_request(self, work_request_id, **kwargs): method=method, path_params=path_params, header_params=header_params, + body=update_alert_details, + response_type="Alert", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -30280,19 +33166,23 @@ def suspend_work_request(self, work_request_id, **kwargs): method=method, path_params=path_params, header_params=header_params, + body=update_alert_details, + response_type="Alert", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def unset_security_assessment_baseline(self, security_assessment_id, **kwargs): + def update_audit_archive_retrieval(self, audit_archive_retrieval_id, update_audit_archive_retrieval_details, **kwargs): """ - Removes the baseline setting for the saved security assessment. The saved security assessment is no longer considered a baseline. - Sets the if-match parameter to the value of the etag from a previous GET or POST response for that resource. + Updates the audit archive retrieval. - :param str security_assessment_id: (required) - The OCID of the security assessment. + :param str audit_archive_retrieval_id: (required) + OCID of the archive retrieval. + + :param oci.data_safe.models.UpdateAuditArchiveRetrievalDetails update_audit_archive_retrieval_details: (required) + Details to update the audit archive retrieval. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call @@ -30301,12 +33191,6 @@ def unset_security_assessment_baseline(self, security_assessment_id, **kwargs): The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. - :param str opc_retry_token: (optional) - A token that uniquely identifies a request so it can be retried in case of a timeout or - server error without risk of executing that same action again. Retry tokens expire after 24 - hours, but can be invalidated before then due to conflicting operations. For example, if a resource - has been deleted and purged from the system, then a retry of the original creation request might be rejected. - :param str opc_request_id: (optional) Unique identifier for the request. @@ -30326,30 +33210,29 @@ def unset_security_assessment_baseline(self, security_assessment_id, **kwargs): :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use unset_security_assessment_baseline API. + Click `here `__ to see an example of how to use update_audit_archive_retrieval API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['securityAssessmentId'] - resource_path = "/securityAssessments/{securityAssessmentId}/actions/unsetBaseline" - method = "POST" - operation_name = "unset_security_assessment_baseline" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SecurityAssessment/UnsetSecurityAssessmentBaseline" + required_arguments = ['auditArchiveRetrievalId'] + resource_path = "/auditArchiveRetrievals/{auditArchiveRetrievalId}" + method = "PUT" + operation_name = "update_audit_archive_retrieval" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/AuditArchiveRetrieval/UpdateAuditArchiveRetrieval" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "if_match", - "opc_retry_token", "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"unset_security_assessment_baseline got unknown kwargs: {extra_kwargs!r}") + f"update_audit_archive_retrieval got unknown kwargs: {extra_kwargs!r}") path_params = { - "securityAssessmentId": security_assessment_id + "auditArchiveRetrievalId": audit_archive_retrieval_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -30362,7 +33245,6 @@ def unset_security_assessment_baseline(self, security_assessment_id, **kwargs): "accept": "application/json", "content-type": "application/json", "if-match": kwargs.get("if_match", missing), - "opc-retry-token": kwargs.get("opc_retry_token", missing), "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} @@ -30376,7 +33258,6 @@ def unset_security_assessment_baseline(self, security_assessment_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( @@ -30385,6 +33266,7 @@ def unset_security_assessment_baseline(self, security_assessment_id, **kwargs): method=method, path_params=path_params, header_params=header_params, + body=update_audit_archive_retrieval_details, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -30395,19 +33277,22 @@ def unset_security_assessment_baseline(self, security_assessment_id, **kwargs): method=method, path_params=path_params, header_params=header_params, + body=update_audit_archive_retrieval_details, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def unset_user_assessment_baseline(self, user_assessment_id, **kwargs): + def update_audit_policy(self, audit_policy_id, update_audit_policy_details, **kwargs): """ - Removes the baseline setting for the saved user assessment. The saved user assessment is no longer considered a baseline. - Sets the if-match parameter to the value of the etag from a previous GET or POST response for that resource. + Updates the audit policy. - :param str user_assessment_id: (required) - The OCID of the user assessment. + :param str audit_policy_id: (required) + Unique audit policy identifier. + + :param oci.data_safe.models.UpdateAuditPolicyDetails update_audit_policy_details: (required) + Details to update the audit policy. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call @@ -30416,12 +33301,6 @@ def unset_user_assessment_baseline(self, user_assessment_id, **kwargs): The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. - :param str opc_retry_token: (optional) - A token that uniquely identifies a request so it can be retried in case of a timeout or - server error without risk of executing that same action again. Retry tokens expire after 24 - hours, but can be invalidated before then due to conflicting operations. For example, if a resource - has been deleted and purged from the system, then a retry of the original creation request might be rejected. - :param str opc_request_id: (optional) Unique identifier for the request. @@ -30441,30 +33320,29 @@ def unset_user_assessment_baseline(self, user_assessment_id, **kwargs): :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use unset_user_assessment_baseline API. + Click `here `__ to see an example of how to use update_audit_policy API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['userAssessmentId'] - resource_path = "/userAssessments/{userAssessmentId}/actions/unsetBaseline" - method = "POST" - operation_name = "unset_user_assessment_baseline" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/UserAssessment/UnsetUserAssessmentBaseline" + required_arguments = ['auditPolicyId'] + resource_path = "/auditPolicies/{auditPolicyId}" + method = "PUT" + operation_name = "update_audit_policy" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/AuditPolicy/UpdateAuditPolicy" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "if_match", - "opc_retry_token", "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"unset_user_assessment_baseline got unknown kwargs: {extra_kwargs!r}") + f"update_audit_policy got unknown kwargs: {extra_kwargs!r}") path_params = { - "userAssessmentId": user_assessment_id + "auditPolicyId": audit_policy_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -30477,7 +33355,6 @@ def unset_user_assessment_baseline(self, user_assessment_id, **kwargs): "accept": "application/json", "content-type": "application/json", "if-match": kwargs.get("if_match", missing), - "opc-retry-token": kwargs.get("opc_retry_token", missing), "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} @@ -30491,7 +33368,6 @@ def unset_user_assessment_baseline(self, user_assessment_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( @@ -30500,6 +33376,7 @@ def unset_user_assessment_baseline(self, user_assessment_id, **kwargs): method=method, path_params=path_params, header_params=header_params, + body=update_audit_policy_details, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -30510,21 +33387,22 @@ def unset_user_assessment_baseline(self, user_assessment_id, **kwargs): method=method, path_params=path_params, header_params=header_params, + body=update_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 update_alert(self, alert_id, update_alert_details, **kwargs): + def update_audit_profile(self, audit_profile_id, update_audit_profile_details, **kwargs): """ - Updates the status of the specified alert. + Updates one or more attributes of the specified audit profile. - :param str alert_id: (required) - The OCID of alert. + :param str audit_profile_id: (required) + The OCID of the audit. - :param oci.data_safe.models.UpdateAlertDetails update_alert_details: (required) - The details used to update alert status. + :param oci.data_safe.models.UpdateAuditProfileDetails update_audit_profile_details: (required) + The information to be updated. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call @@ -30548,18 +33426,18 @@ def update_alert(self, alert_id, update_alert_details, **kwargs): allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.Alert` + :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use update_alert API. + Click `here `__ to see an example of how to use update_audit_profile API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['alertId'] - resource_path = "/alerts/{alertId}" + required_arguments = ['auditProfileId'] + resource_path = "/auditProfiles/{auditProfileId}" method = "PUT" - operation_name = "update_alert" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/Alert/UpdateAlert" + operation_name = "update_audit_profile" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/AuditProfile/UpdateAuditProfile" # Don't accept unknown kwargs expected_kwargs = [ @@ -30571,10 +33449,10 @@ def update_alert(self, alert_id, update_alert_details, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"update_alert got unknown kwargs: {extra_kwargs!r}") + f"update_audit_profile got unknown kwargs: {extra_kwargs!r}") path_params = { - "alertId": alert_id + "auditProfileId": audit_profile_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -30608,8 +33486,7 @@ def update_alert(self, alert_id, update_alert_details, **kwargs): method=method, path_params=path_params, header_params=header_params, - body=update_alert_details, - response_type="Alert", + body=update_audit_profile_details, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -30620,23 +33497,22 @@ def update_alert(self, alert_id, update_alert_details, **kwargs): method=method, path_params=path_params, header_params=header_params, - body=update_alert_details, - response_type="Alert", + body=update_audit_profile_details, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def update_audit_archive_retrieval(self, audit_archive_retrieval_id, update_audit_archive_retrieval_details, **kwargs): + def update_audit_trail(self, audit_trail_id, update_audit_trail_details, **kwargs): """ - Updates the audit archive retrieval. + Updates one or more attributes of the specified audit trail. - :param str audit_archive_retrieval_id: (required) - OCID of the archive retrieval. + :param str audit_trail_id: (required) + The OCID of the audit trail. - :param oci.data_safe.models.UpdateAuditArchiveRetrievalDetails update_audit_archive_retrieval_details: (required) - Details to update the audit archive retrieval. + :param oci.data_safe.models.UpdateAuditTrailDetails update_audit_trail_details: (required) + The information to be updated. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call @@ -30664,14 +33540,14 @@ def update_audit_archive_retrieval(self, audit_archive_retrieval_id, update_audi :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use update_audit_archive_retrieval API. + Click `here `__ to see an example of how to use update_audit_trail API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['auditArchiveRetrievalId'] - resource_path = "/auditArchiveRetrievals/{auditArchiveRetrievalId}" + required_arguments = ['auditTrailId'] + resource_path = "/auditTrails/{auditTrailId}" method = "PUT" - operation_name = "update_audit_archive_retrieval" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/AuditArchiveRetrieval/UpdateAuditArchiveRetrieval" + operation_name = "update_audit_trail" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/AuditTrail/UpdateAuditTrail" # Don't accept unknown kwargs expected_kwargs = [ @@ -30683,10 +33559,10 @@ def update_audit_archive_retrieval(self, audit_archive_retrieval_id, update_audi extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"update_audit_archive_retrieval got unknown kwargs: {extra_kwargs!r}") + f"update_audit_trail got unknown kwargs: {extra_kwargs!r}") path_params = { - "auditArchiveRetrievalId": audit_archive_retrieval_id + "auditTrailId": audit_trail_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -30720,7 +33596,7 @@ def update_audit_archive_retrieval(self, audit_archive_retrieval_id, update_audi method=method, path_params=path_params, header_params=header_params, - body=update_audit_archive_retrieval_details, + body=update_audit_trail_details, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -30731,22 +33607,22 @@ def update_audit_archive_retrieval(self, audit_archive_retrieval_id, update_audi method=method, path_params=path_params, header_params=header_params, - body=update_audit_archive_retrieval_details, + body=update_audit_trail_details, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def update_audit_policy(self, audit_policy_id, update_audit_policy_details, **kwargs): + def update_data_safe_private_endpoint(self, data_safe_private_endpoint_id, update_data_safe_private_endpoint_details, **kwargs): """ - Updates the audit policy. + Updates one or more attributes of the specified Data Safe private endpoint. - :param str audit_policy_id: (required) - Unique audit policy identifier. + :param str data_safe_private_endpoint_id: (required) + The OCID of the private endpoint. - :param oci.data_safe.models.UpdateAuditPolicyDetails update_audit_policy_details: (required) - Details to update the audit policy. + :param oci.data_safe.models.UpdateDataSafePrivateEndpointDetails update_data_safe_private_endpoint_details: (required) + The details used to update a Data Safe private endpoint. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call @@ -30774,14 +33650,14 @@ def update_audit_policy(self, audit_policy_id, update_audit_policy_details, **kw :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use update_audit_policy API. + Click `here `__ to see an example of how to use update_data_safe_private_endpoint API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['auditPolicyId'] - resource_path = "/auditPolicies/{auditPolicyId}" + required_arguments = ['dataSafePrivateEndpointId'] + resource_path = "/dataSafePrivateEndpoints/{dataSafePrivateEndpointId}" method = "PUT" - operation_name = "update_audit_policy" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/AuditPolicy/UpdateAuditPolicy" + operation_name = "update_data_safe_private_endpoint" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/DataSafePrivateEndpoint/UpdateDataSafePrivateEndpoint" # Don't accept unknown kwargs expected_kwargs = [ @@ -30793,10 +33669,10 @@ def update_audit_policy(self, audit_policy_id, update_audit_policy_details, **kw extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"update_audit_policy got unknown kwargs: {extra_kwargs!r}") + f"update_data_safe_private_endpoint got unknown kwargs: {extra_kwargs!r}") path_params = { - "auditPolicyId": audit_policy_id + "dataSafePrivateEndpointId": data_safe_private_endpoint_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -30830,7 +33706,7 @@ def update_audit_policy(self, audit_policy_id, update_audit_policy_details, **kw method=method, path_params=path_params, header_params=header_params, - body=update_audit_policy_details, + body=update_data_safe_private_endpoint_details, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -30841,22 +33717,22 @@ def update_audit_policy(self, audit_policy_id, update_audit_policy_details, **kw method=method, path_params=path_params, header_params=header_params, - body=update_audit_policy_details, + body=update_data_safe_private_endpoint_details, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def update_audit_profile(self, audit_profile_id, update_audit_profile_details, **kwargs): + def update_database_security_config(self, database_security_config_id, update_database_security_config_details, **kwargs): """ - Updates one or more attributes of the specified audit profile. + Updates the database security configuration. - :param str audit_profile_id: (required) - The OCID of the audit. + :param str database_security_config_id: (required) + The OCID of the database security configuration resource. - :param oci.data_safe.models.UpdateAuditProfileDetails update_audit_profile_details: (required) - The information to be updated. + :param oci.data_safe.models.UpdateDatabaseSecurityConfigDetails update_database_security_config_details: (required) + Details to update the database security configuration. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call @@ -30884,14 +33760,14 @@ def update_audit_profile(self, audit_profile_id, update_audit_profile_details, * :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use update_audit_profile API. + Click `here `__ to see an example of how to use update_database_security_config API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['auditProfileId'] - resource_path = "/auditProfiles/{auditProfileId}" + required_arguments = ['databaseSecurityConfigId'] + resource_path = "/databaseSecurityConfigs/{databaseSecurityConfigId}" method = "PUT" - operation_name = "update_audit_profile" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/AuditProfile/UpdateAuditProfile" + operation_name = "update_database_security_config" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/DatabaseSecurityConfig/UpdateDatabaseSecurityConfig" # Don't accept unknown kwargs expected_kwargs = [ @@ -30903,10 +33779,10 @@ def update_audit_profile(self, audit_profile_id, update_audit_profile_details, * extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"update_audit_profile got unknown kwargs: {extra_kwargs!r}") + f"update_database_security_config got unknown kwargs: {extra_kwargs!r}") path_params = { - "auditProfileId": audit_profile_id + "databaseSecurityConfigId": database_security_config_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -30940,7 +33816,7 @@ def update_audit_profile(self, audit_profile_id, update_audit_profile_details, * method=method, path_params=path_params, header_params=header_params, - body=update_audit_profile_details, + body=update_database_security_config_details, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -30951,22 +33827,34 @@ def update_audit_profile(self, audit_profile_id, update_audit_profile_details, * method=method, path_params=path_params, header_params=header_params, - body=update_audit_profile_details, + body=update_database_security_config_details, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def update_audit_trail(self, audit_trail_id, update_audit_trail_details, **kwargs): + def update_finding(self, security_assessment_id, finding_key, update_finding_details, **kwargs): """ - Updates one or more attributes of the specified audit trail. + Updates one or more attributes of the specified finding. - :param str audit_trail_id: (required) - The OCID of the audit trail. + :param str security_assessment_id: (required) + The OCID of the security assessment. - :param oci.data_safe.models.UpdateAuditTrailDetails update_audit_trail_details: (required) - The information to be updated. + :param str finding_key: (required) + The unique key that identifies the finding. It is a string and unique within a security assessment. + + :param oci.data_safe.models.UpdateFindingDetails update_finding_details: (required) + Details to change risk of a finding. + + :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 if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call @@ -30975,9 +33863,6 @@ def update_audit_trail(self, audit_trail_id, update_audit_trail_details, **kwarg 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. @@ -30994,29 +33879,31 @@ def update_audit_trail(self, audit_trail_id, update_audit_trail_details, **kwarg :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use update_audit_trail API. + Click `here `__ to see an example of how to use update_finding API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['auditTrailId'] - resource_path = "/auditTrails/{auditTrailId}" + required_arguments = ['securityAssessmentId', 'findingKey'] + resource_path = "/securityAssessments/{securityAssessmentId}/findings/{findingKey}" method = "PUT" - operation_name = "update_audit_trail" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/AuditTrail/UpdateAuditTrail" + operation_name = "update_finding" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/Finding/UpdateFinding" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "if_match", - "opc_request_id" + "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"update_audit_trail got unknown kwargs: {extra_kwargs!r}") + f"update_finding got unknown kwargs: {extra_kwargs!r}") path_params = { - "auditTrailId": audit_trail_id + "securityAssessmentId": security_assessment_id, + "findingKey": finding_key } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -31028,8 +33915,9 @@ def update_audit_trail(self, audit_trail_id, update_audit_trail_details, **kwarg header_params = { "accept": "application/json", "content-type": "application/json", - "if-match": kwargs.get("if_match", missing), - "opc-request-id": kwargs.get("opc_request_id", missing) + "opc-retry-token": kwargs.get("opc_retry_token", missing), + "opc-request-id": kwargs.get("opc_request_id", missing), + "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} @@ -31042,6 +33930,7 @@ def update_audit_trail(self, audit_trail_id, update_audit_trail_details, **kwarg if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( @@ -31050,7 +33939,7 @@ def update_audit_trail(self, audit_trail_id, update_audit_trail_details, **kwarg method=method, path_params=path_params, header_params=header_params, - body=update_audit_trail_details, + body=update_finding_details, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -31061,22 +33950,22 @@ def update_audit_trail(self, audit_trail_id, update_audit_trail_details, **kwarg method=method, path_params=path_params, header_params=header_params, - body=update_audit_trail_details, + body=update_finding_details, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def update_data_safe_private_endpoint(self, data_safe_private_endpoint_id, update_data_safe_private_endpoint_details, **kwargs): + def update_library_masking_format(self, library_masking_format_id, update_library_masking_format_details, **kwargs): """ - Updates one or more attributes of the specified Data Safe private endpoint. + Updates one or more attributes of the specified library masking format. Note that updating the formatEntries attribute replaces all the existing masking format entries with the specified format entries. - :param str data_safe_private_endpoint_id: (required) - The OCID of the private endpoint. + :param str library_masking_format_id: (required) + The OCID of the library masking format. - :param oci.data_safe.models.UpdateDataSafePrivateEndpointDetails update_data_safe_private_endpoint_details: (required) - The details used to update a Data Safe private endpoint. + :param oci.data_safe.models.UpdateLibraryMaskingFormatDetails update_library_masking_format_details: (required) + Details to update a library masking format. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call @@ -31104,14 +33993,14 @@ def update_data_safe_private_endpoint(self, data_safe_private_endpoint_id, updat :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use update_data_safe_private_endpoint API. + Click `here `__ to see an example of how to use update_library_masking_format API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['dataSafePrivateEndpointId'] - resource_path = "/dataSafePrivateEndpoints/{dataSafePrivateEndpointId}" + required_arguments = ['libraryMaskingFormatId'] + resource_path = "/libraryMaskingFormats/{libraryMaskingFormatId}" method = "PUT" - operation_name = "update_data_safe_private_endpoint" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/DataSafePrivateEndpoint/UpdateDataSafePrivateEndpoint" + operation_name = "update_library_masking_format" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/LibraryMaskingFormat/UpdateLibraryMaskingFormat" # Don't accept unknown kwargs expected_kwargs = [ @@ -31123,10 +34012,10 @@ def update_data_safe_private_endpoint(self, data_safe_private_endpoint_id, updat extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"update_data_safe_private_endpoint got unknown kwargs: {extra_kwargs!r}") + f"update_library_masking_format got unknown kwargs: {extra_kwargs!r}") path_params = { - "dataSafePrivateEndpointId": data_safe_private_endpoint_id + "libraryMaskingFormatId": library_masking_format_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -31160,7 +34049,7 @@ def update_data_safe_private_endpoint(self, data_safe_private_endpoint_id, updat method=method, path_params=path_params, header_params=header_params, - body=update_data_safe_private_endpoint_details, + body=update_library_masking_format_details, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -31171,22 +34060,26 @@ def update_data_safe_private_endpoint(self, data_safe_private_endpoint_id, updat method=method, path_params=path_params, header_params=header_params, - body=update_data_safe_private_endpoint_details, + body=update_library_masking_format_details, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def update_database_security_config(self, database_security_config_id, update_database_security_config_details, **kwargs): + def update_masking_column(self, masking_column_key, masking_policy_id, update_masking_column_details, **kwargs): """ - Updates the database security configuration. + Updates one or more attributes of the specified masking column. Note that updating the maskingFormats + attribute replaces the currently assigned masking formats with the specified masking formats. - :param str database_security_config_id: (required) - The OCID of the database security configuration resource. + :param str masking_column_key: (required) + The unique key that identifies the masking column. It's numeric and unique within a masking policy. - :param oci.data_safe.models.UpdateDatabaseSecurityConfigDetails update_database_security_config_details: (required) - Details to update the database security configuration. + :param str masking_policy_id: (required) + The OCID of the masking policy. + + :param oci.data_safe.models.UpdateMaskingColumnDetails update_masking_column_details: (required) + Details to update a masking column. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call @@ -31214,14 +34107,14 @@ def update_database_security_config(self, database_security_config_id, update_da :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use update_database_security_config API. + Click `here `__ to see an example of how to use update_masking_column API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['databaseSecurityConfigId'] - resource_path = "/databaseSecurityConfigs/{databaseSecurityConfigId}" + required_arguments = ['maskingColumnKey', 'maskingPolicyId'] + resource_path = "/maskingPolicies/{maskingPolicyId}/maskingColumns/{maskingColumnKey}" method = "PUT" - operation_name = "update_database_security_config" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/DatabaseSecurityConfig/UpdateDatabaseSecurityConfig" + operation_name = "update_masking_column" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/MaskingColumn/UpdateMaskingColumn" # Don't accept unknown kwargs expected_kwargs = [ @@ -31233,10 +34126,11 @@ def update_database_security_config(self, database_security_config_id, update_da extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"update_database_security_config got unknown kwargs: {extra_kwargs!r}") + f"update_masking_column got unknown kwargs: {extra_kwargs!r}") path_params = { - "databaseSecurityConfigId": database_security_config_id + "maskingColumnKey": masking_column_key, + "maskingPolicyId": masking_policy_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -31270,7 +34164,7 @@ def update_database_security_config(self, database_security_config_id, update_da method=method, path_params=path_params, header_params=header_params, - body=update_database_security_config_details, + body=update_masking_column_details, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -31281,22 +34175,22 @@ def update_database_security_config(self, database_security_config_id, update_da method=method, path_params=path_params, header_params=header_params, - body=update_database_security_config_details, + body=update_masking_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 update_library_masking_format(self, library_masking_format_id, update_library_masking_format_details, **kwargs): + def update_masking_policy(self, masking_policy_id, update_masking_policy_details, **kwargs): """ - Updates one or more attributes of the specified library masking format. Note that updating the formatEntries attribute replaces all the existing masking format entries with the specified format entries. + Updates one or more attributes of the specified masking policy. - :param str library_masking_format_id: (required) - The OCID of the library masking format. + :param str masking_policy_id: (required) + The OCID of the masking policy. - :param oci.data_safe.models.UpdateLibraryMaskingFormatDetails update_library_masking_format_details: (required) - Details to update a library masking format. + :param oci.data_safe.models.UpdateMaskingPolicyDetails update_masking_policy_details: (required) + Details to update a masking policy. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call @@ -31324,14 +34218,14 @@ def update_library_masking_format(self, library_masking_format_id, update_librar :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use update_library_masking_format API. + Click `here `__ to see an example of how to use update_masking_policy 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 = ['maskingPolicyId'] + resource_path = "/maskingPolicies/{maskingPolicyId}" method = "PUT" - operation_name = "update_library_masking_format" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/LibraryMaskingFormat/UpdateLibraryMaskingFormat" + operation_name = "update_masking_policy" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/MaskingPolicy/UpdateMaskingPolicy" # Don't accept unknown kwargs expected_kwargs = [ @@ -31343,10 +34237,10 @@ def update_library_masking_format(self, library_masking_format_id, update_librar extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"update_library_masking_format got unknown kwargs: {extra_kwargs!r}") + f"update_masking_policy got unknown kwargs: {extra_kwargs!r}") path_params = { - "libraryMaskingFormatId": library_masking_format_id + "maskingPolicyId": masking_policy_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -31380,7 +34274,7 @@ def update_library_masking_format(self, library_masking_format_id, update_librar method=method, path_params=path_params, header_params=header_params, - body=update_library_masking_format_details, + body=update_masking_policy_details, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -31391,26 +34285,22 @@ def update_library_masking_format(self, library_masking_format_id, update_librar method=method, path_params=path_params, header_params=header_params, - body=update_library_masking_format_details, + body=update_masking_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 update_masking_column(self, masking_column_key, masking_policy_id, update_masking_column_details, **kwargs): + def update_on_prem_connector(self, on_prem_connector_id, update_on_prem_connector_details, **kwargs): """ - Updates one or more attributes of the specified masking column. Note that updating the maskingFormats - attribute replaces the currently assigned masking formats with the specified masking formats. - + Updates one or more attributes of the specified on-premises connector. - :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 masking_policy_id: (required) - The OCID of the masking policy. + :param str on_prem_connector_id: (required) + The OCID of the on-premises connector. - :param oci.data_safe.models.UpdateMaskingColumnDetails update_masking_column_details: (required) - Details to update a masking column. + :param oci.data_safe.models.UpdateOnPremConnectorDetails update_on_prem_connector_details: (required) + The details used to update a on-premises connector. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call @@ -31438,14 +34328,14 @@ def update_masking_column(self, masking_column_key, masking_policy_id, update_ma :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use update_masking_column API. + Click `here `__ to see an example of how to use update_on_prem_connector API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['maskingColumnKey', 'maskingPolicyId'] - resource_path = "/maskingPolicies/{maskingPolicyId}/maskingColumns/{maskingColumnKey}" + required_arguments = ['onPremConnectorId'] + resource_path = "/onPremConnectors/{onPremConnectorId}" method = "PUT" - operation_name = "update_masking_column" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/MaskingColumn/UpdateMaskingColumn" + operation_name = "update_on_prem_connector" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/OnPremConnector/UpdateOnPremConnector" # Don't accept unknown kwargs expected_kwargs = [ @@ -31457,11 +34347,10 @@ def update_masking_column(self, masking_column_key, masking_policy_id, update_ma extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"update_masking_column got unknown kwargs: {extra_kwargs!r}") + f"update_on_prem_connector got unknown kwargs: {extra_kwargs!r}") path_params = { - "maskingColumnKey": masking_column_key, - "maskingPolicyId": masking_policy_id + "onPremConnectorId": on_prem_connector_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -31495,7 +34384,7 @@ def update_masking_column(self, masking_column_key, masking_policy_id, update_ma method=method, path_params=path_params, header_params=header_params, - body=update_masking_column_details, + body=update_on_prem_connector_details, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -31506,22 +34395,28 @@ def update_masking_column(self, masking_column_key, masking_policy_id, update_ma method=method, path_params=path_params, header_params=header_params, - body=update_masking_column_details, + body=update_on_prem_connector_details, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def update_masking_policy(self, masking_policy_id, update_masking_policy_details, **kwargs): + def update_on_prem_connector_wallet(self, update_on_prem_connector_wallet_details, on_prem_connector_id, **kwargs): """ - Updates one or more attributes of the specified masking policy. + Updates the wallet for the specified on-premises connector to a new version. - :param str masking_policy_id: (required) - The OCID of the masking policy. + :param oci.data_safe.models.UpdateOnPremConnectorWalletDetails update_on_prem_connector_wallet_details: (required) + The details used to update an on-premises connector's wallet. - :param oci.data_safe.models.UpdateMaskingPolicyDetails update_masking_policy_details: (required) - Details to update a masking policy. + :param str on_prem_connector_id: (required) + The OCID of the on-premises connector. + + :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 @@ -31549,29 +34444,30 @@ def update_masking_policy(self, masking_policy_id, update_masking_policy_details :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use update_masking_policy API. + Click `here `__ to see an example of how to use update_on_prem_connector_wallet 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 = ['onPremConnectorId'] + resource_path = "/onPremConnectors/{onPremConnectorId}/wallet" method = "PUT" - operation_name = "update_masking_policy" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/MaskingPolicy/UpdateMaskingPolicy" + operation_name = "update_on_prem_connector_wallet" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/OnPremConnector/UpdateOnPremConnectorWallet" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", + "opc_retry_token", "if_match", "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"update_masking_policy got unknown kwargs: {extra_kwargs!r}") + f"update_on_prem_connector_wallet got unknown kwargs: {extra_kwargs!r}") path_params = { - "maskingPolicyId": masking_policy_id + "onPremConnectorId": on_prem_connector_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -31583,6 +34479,7 @@ def update_masking_policy(self, masking_policy_id, update_masking_policy_details 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) } @@ -31597,6 +34494,7 @@ def update_masking_policy(self, masking_policy_id, update_masking_policy_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( @@ -31605,7 +34503,7 @@ def update_masking_policy(self, masking_policy_id, update_masking_policy_details method=method, path_params=path_params, header_params=header_params, - body=update_masking_policy_details, + body=update_on_prem_connector_wallet_details, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -31616,22 +34514,25 @@ def update_masking_policy(self, masking_policy_id, update_masking_policy_details method=method, path_params=path_params, header_params=header_params, - body=update_masking_policy_details, + body=update_on_prem_connector_wallet_details, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def update_on_prem_connector(self, on_prem_connector_id, update_on_prem_connector_details, **kwargs): + def update_peer_target_database(self, target_database_id, peer_target_database_id, update_peer_target_database_details, **kwargs): """ - Updates one or more attributes of the specified on-premises connector. + Updates one or more attributes of the specified Data Safe peer target database. - :param str on_prem_connector_id: (required) - The OCID of the on-premises connector. + :param str target_database_id: (required) + The OCID of the Data Safe target database. - :param oci.data_safe.models.UpdateOnPremConnectorDetails update_on_prem_connector_details: (required) - The details used to update a on-premises connector. + :param int peer_target_database_id: (required) + The unique id of the peer target database. + + :param oci.data_safe.models.UpdatePeerTargetDatabaseDetails update_peer_target_database_details: (required) + Database details to be used to update the peer target database. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call @@ -31643,6 +34544,12 @@ def update_on_prem_connector(self, on_prem_connector_id, update_on_prem_connecto :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. @@ -31659,29 +34566,31 @@ def update_on_prem_connector(self, on_prem_connector_id, update_on_prem_connecto :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use update_on_prem_connector API. + Click `here `__ to see an example of how to use update_peer_target_database 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 = ['targetDatabaseId', 'peerTargetDatabaseId'] + resource_path = "/targetDatabases/{targetDatabaseId}/peerTargetDatabases/{peerTargetDatabaseId}" method = "PUT" - operation_name = "update_on_prem_connector" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/OnPremConnector/UpdateOnPremConnector" + operation_name = "update_peer_target_database" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/PeerTargetDatabase/UpdatePeerTargetDatabase" # 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"update_on_prem_connector got unknown kwargs: {extra_kwargs!r}") + f"update_peer_target_database got unknown kwargs: {extra_kwargs!r}") path_params = { - "onPremConnectorId": on_prem_connector_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} @@ -31694,7 +34603,8 @@ def update_on_prem_connector(self, on_prem_connector_id, update_on_prem_connecto "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} @@ -31707,6 +34617,7 @@ def update_on_prem_connector(self, on_prem_connector_id, update_on_prem_connecto 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( @@ -31715,7 +34626,7 @@ def update_on_prem_connector(self, on_prem_connector_id, update_on_prem_connecto method=method, path_params=path_params, header_params=header_params, - body=update_on_prem_connector_details, + body=update_peer_target_database_details, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -31726,28 +34637,22 @@ def update_on_prem_connector(self, on_prem_connector_id, update_on_prem_connecto method=method, path_params=path_params, header_params=header_params, - body=update_on_prem_connector_details, + body=update_peer_target_database_details, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def update_on_prem_connector_wallet(self, update_on_prem_connector_wallet_details, on_prem_connector_id, **kwargs): + def update_report(self, report_id, update_report_details, **kwargs): """ - Updates the wallet for the specified on-premises connector to a new version. + Updates the specified report. Only tags can be updated. - :param oci.data_safe.models.UpdateOnPremConnectorWalletDetails update_on_prem_connector_wallet_details: (required) - The details used to update an on-premises connector's wallet. - - :param str on_prem_connector_id: (required) - The OCID of the on-premises connector. + :param str report_id: (required) + Unique report identifier - :param str opc_retry_token: (optional) - A token that uniquely identifies a request so it can be retried in case of a timeout or - server error without risk of executing that same action again. Retry tokens expire after 24 - hours, but can be invalidated before then due to conflicting operations. For example, if a resource - has been deleted and purged from the system, then a retry of the original creation request might be rejected. + :param oci.data_safe.models.UpdateReportDetails update_report_details: (required) + Details for the modified report. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call @@ -31759,6 +34664,12 @@ def update_on_prem_connector_wallet(self, update_on_prem_connector_wallet_detail :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. @@ -31775,30 +34686,30 @@ def update_on_prem_connector_wallet(self, update_on_prem_connector_wallet_detail :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use update_on_prem_connector_wallet API. + Click `here `__ to see an example of how to use update_report API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['onPremConnectorId'] - resource_path = "/onPremConnectors/{onPremConnectorId}/wallet" + required_arguments = ['reportId'] + resource_path = "/reports/{reportId}" method = "PUT" - operation_name = "update_on_prem_connector_wallet" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/OnPremConnector/UpdateOnPremConnectorWallet" + operation_name = "update_report" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/Report/UpdateReport" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "opc_retry_token", "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"update_on_prem_connector_wallet got unknown kwargs: {extra_kwargs!r}") + f"update_report got unknown kwargs: {extra_kwargs!r}") path_params = { - "onPremConnectorId": on_prem_connector_id + "reportId": report_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -31810,9 +34721,9 @@ def update_on_prem_connector_wallet(self, update_on_prem_connector_wallet_detail header_params = { "accept": "application/json", "content-type": "application/json", - "opc-retry-token": kwargs.get("opc_retry_token", missing), "if-match": kwargs.get("if_match", missing), - "opc-request-id": kwargs.get("opc_request_id", missing) + "opc-request-id": kwargs.get("opc_request_id", missing), + "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} @@ -31834,7 +34745,7 @@ def update_on_prem_connector_wallet(self, update_on_prem_connector_wallet_detail method=method, path_params=path_params, header_params=header_params, - body=update_on_prem_connector_wallet_details, + body=update_report_details, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -31845,7 +34756,7 @@ def update_on_prem_connector_wallet(self, update_on_prem_connector_wallet_detail method=method, path_params=path_params, header_params=header_params, - body=update_on_prem_connector_wallet_details, + body=update_report_details, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, diff --git a/src/oci/data_safe/data_safe_client_composite_operations.py b/src/oci/data_safe/data_safe_client_composite_operations.py index 81aa36c28b..d2d94f9439 100644 --- a/src/oci/data_safe/data_safe_client_composite_operations.py +++ b/src/oci/data_safe/data_safe_client_composite_operations.py @@ -1149,6 +1149,47 @@ def create_on_prem_connector_and_wait_for_state(self, create_on_prem_connector_d except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def create_peer_target_database_and_wait_for_state(self, target_database_id, create_peer_target_database_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_safe.DataSafeClient.create_peer_target_database` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + to enter the given state(s). + + :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 list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.create_peer_target_database` + + :param dict waiter_kwargs: + A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` + as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait + """ + operation_result = self.client.create_peer_target_database(target_database_id, create_peer_target_database_details, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def create_report_definition_and_wait_for_state(self, create_report_definition_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ Calls :py:func:`~oci.data_safe.DataSafeClient.create_report_definition` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` @@ -1906,6 +1947,55 @@ def delete_on_prem_connector_and_wait_for_state(self, on_prem_connector_id, wait except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def delete_peer_target_database_and_wait_for_state(self, target_database_id, peer_target_database_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_safe.DataSafeClient.delete_peer_target_database` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + to enter the given state(s). + + :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 list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.delete_peer_target_database` + + :param dict waiter_kwargs: + A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` + as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait + """ + operation_result = None + try: + operation_result = self.client.delete_peer_target_database(target_database_id, peer_target_database_id, **operation_kwargs) + except oci.exceptions.ServiceError as e: + if e.status == 404: + return WAIT_RESOURCE_NOT_FOUND + else: + raise e + + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def delete_report_definition_and_wait_for_state(self, report_definition_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ Calls :py:func:`~oci.data_safe.DataSafeClient.delete_report_definition` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` @@ -3299,6 +3389,44 @@ def refresh_sql_collection_log_insights_and_wait_for_state(self, sql_collection_ except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def refresh_target_database_and_wait_for_state(self, target_database_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_safe.DataSafeClient.refresh_target_database` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + to enter the given state(s). + + :param str target_database_id: (required) + The OCID of the Data Safe target database. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.refresh_target_database` + + :param dict waiter_kwargs: + A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` + as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait + """ + operation_result = self.client.refresh_target_database(target_database_id, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def refresh_user_assessment_and_wait_for_state(self, user_assessment_id, run_user_assessment_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ Calls :py:func:`~oci.data_safe.DataSafeClient.refresh_user_assessment` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` @@ -4094,6 +4222,50 @@ def update_database_security_config_and_wait_for_state(self, database_security_c except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def update_finding_and_wait_for_state(self, security_assessment_id, finding_key, update_finding_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_safe.DataSafeClient.update_finding` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + to enter the given state(s). + + :param str security_assessment_id: (required) + The OCID of the security assessment. + + :param str finding_key: (required) + The unique key that identifies the finding. It is a string and unique within a security assessment. + + :param oci.data_safe.models.UpdateFindingDetails update_finding_details: (required) + Details to change risk of a finding. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.update_finding` + + :param dict waiter_kwargs: + A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` + as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait + """ + operation_result = self.client.update_finding(security_assessment_id, finding_key, update_finding_details, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def update_library_masking_format_and_wait_for_state(self, library_masking_format_id, update_library_masking_format_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ Calls :py:func:`~oci.data_safe.DataSafeClient.update_library_masking_format` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` @@ -4302,6 +4474,91 @@ def update_on_prem_connector_wallet_and_wait_for_state(self, update_on_prem_conn except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def update_peer_target_database_and_wait_for_state(self, target_database_id, peer_target_database_id, update_peer_target_database_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_safe.DataSafeClient.update_peer_target_database` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + to enter the given state(s). + + :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 oci.data_safe.models.UpdatePeerTargetDatabaseDetails update_peer_target_database_details: (required) + Database details to be used to update the peer target database. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.update_peer_target_database` + + :param dict waiter_kwargs: + A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` + as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait + """ + operation_result = self.client.update_peer_target_database(target_database_id, peer_target_database_id, update_peer_target_database_details, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def update_report_and_wait_for_state(self, report_id, update_report_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_safe.DataSafeClient.update_report` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + to enter the given state(s). + + :param str report_id: (required) + Unique report identifier + + :param oci.data_safe.models.UpdateReportDetails update_report_details: (required) + Details for the modified report. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.update_report` + + :param dict waiter_kwargs: + A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` + as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait + """ + operation_result = self.client.update_report(report_id, update_report_details, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def update_report_definition_and_wait_for_state(self, report_definition_id, update_report_definition_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ Calls :py:func:`~oci.data_safe.DataSafeClient.update_report_definition` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` diff --git a/src/oci/data_safe/models/__init__.py b/src/oci/data_safe/models/__init__.py index 2e183d7d54..8b9d2d828a 100644 --- a/src/oci/data_safe/models/__init__.py +++ b/src/oci/data_safe/models/__init__.py @@ -108,6 +108,7 @@ from .create_masking_column_details import CreateMaskingColumnDetails from .create_masking_policy_details import CreateMaskingPolicyDetails from .create_on_prem_connector_details import CreateOnPremConnectorDetails +from .create_peer_target_database_details import CreatePeerTargetDatabaseDetails from .create_report_definition_details import CreateReportDefinitionDetails from .create_sdm_masking_policy_difference_details import CreateSdmMaskingPolicyDifferenceDetails from .create_security_assessment_details import CreateSecurityAssessmentDetails @@ -129,6 +130,12 @@ from .database_security_config import DatabaseSecurityConfig from .database_security_config_collection import DatabaseSecurityConfigCollection from .database_security_config_summary import DatabaseSecurityConfigSummary +from .database_table_access_entry import DatabaseTableAccessEntry +from .database_table_access_entry_collection import DatabaseTableAccessEntryCollection +from .database_table_access_entry_summary import DatabaseTableAccessEntrySummary +from .database_view_access_entry import DatabaseViewAccessEntry +from .database_view_access_entry_collection import DatabaseViewAccessEntryCollection +from .database_view_access_entry_summary import DatabaseViewAccessEntrySummary from .delete_rows_format_entry import DeleteRowsFormatEntry from .deterministic_encryption_date_format_entry import DeterministicEncryptionDateFormatEntry from .deterministic_encryption_format_entry import DeterministicEncryptionFormatEntry @@ -156,7 +163,12 @@ from .enable_data_safe_configuration_details import EnableDataSafeConfigurationDetails from .entry_details import EntryDetails from .finding import Finding +from .finding_analytics_collection import FindingAnalyticsCollection +from .finding_analytics_dimensions import FindingAnalyticsDimensions +from .finding_analytics_summary import FindingAnalyticsSummary from .finding_summary import FindingSummary +from .findings_change_audit_log_collection import FindingsChangeAuditLogCollection +from .findings_change_audit_log_summary import FindingsChangeAuditLogSummary from .firewall_policy_entry_details import FirewallPolicyEntryDetails from .fixed_number_format_entry import FixedNumberFormatEntry from .fixed_string_format_entry import FixedStringFormatEntry @@ -219,6 +231,9 @@ from .patch_sensitive_column_details import PatchSensitiveColumnDetails from .patch_target_alert_policy_association_details import PatchTargetAlertPolicyAssociationDetails from .pattern_format_entry import PatternFormatEntry +from .peer_target_database import PeerTargetDatabase +from .peer_target_database_collection import PeerTargetDatabaseCollection +from .peer_target_database_summary import PeerTargetDatabaseSummary from .preserve_original_data_format_entry import PreserveOriginalDataFormatEntry from .private_endpoint import PrivateEndpoint from .profile import Profile @@ -243,6 +258,8 @@ from .report_definition_summary import ReportDefinitionSummary from .report_details import ReportDetails from .report_summary import ReportSummary +from .role_grant_path_collection import RoleGrantPathCollection +from .role_grant_path_summary import RoleGrantPathSummary from .role_summary import RoleSummary from .run_security_assessment_details import RunSecurityAssessmentDetails from .run_user_assessment_details import RunUserAssessmentDetails @@ -261,6 +278,11 @@ from .security_assessment_comparison_per_target import SecurityAssessmentComparisonPerTarget from .security_assessment_statistics import SecurityAssessmentStatistics from .security_assessment_summary import SecurityAssessmentSummary +from .security_feature_analytics_collection import SecurityFeatureAnalyticsCollection +from .security_feature_analytics_dimensions import SecurityFeatureAnalyticsDimensions +from .security_feature_analytics_summary import SecurityFeatureAnalyticsSummary +from .security_feature_collection import SecurityFeatureCollection +from .security_feature_summary import SecurityFeatureSummary from .security_policy import SecurityPolicy from .security_policy_collection import SecurityPolicyCollection from .security_policy_deployment import SecurityPolicyDeployment @@ -269,6 +291,9 @@ from .security_policy_entry_state import SecurityPolicyEntryState from .security_policy_entry_state_collection import SecurityPolicyEntryStateCollection from .security_policy_entry_state_summary import SecurityPolicyEntryStateSummary +from .security_policy_report import SecurityPolicyReport +from .security_policy_report_collection import SecurityPolicyReportCollection +from .security_policy_report_summary import SecurityPolicyReportSummary from .security_policy_summary import SecurityPolicySummary from .sensitive_category import SensitiveCategory from .sensitive_column import SensitiveColumn @@ -335,12 +360,15 @@ from .update_column_source_target_details import UpdateColumnSourceTargetDetails from .update_data_safe_private_endpoint_details import UpdateDataSafePrivateEndpointDetails from .update_database_security_config_details import UpdateDatabaseSecurityConfigDetails +from .update_finding_details import UpdateFindingDetails from .update_library_masking_format_details import UpdateLibraryMaskingFormatDetails from .update_masking_column_details import UpdateMaskingColumnDetails from .update_masking_policy_details import UpdateMaskingPolicyDetails from .update_on_prem_connector_details import UpdateOnPremConnectorDetails from .update_on_prem_connector_wallet_details import UpdateOnPremConnectorWalletDetails +from .update_peer_target_database_details import UpdatePeerTargetDatabaseDetails from .update_report_definition_details import UpdateReportDefinitionDetails +from .update_report_details import UpdateReportDetails from .update_sdm_masking_policy_difference_details import UpdateSdmMaskingPolicyDifferenceDetails from .update_security_assessment_details import UpdateSecurityAssessmentDetails from .update_security_policy_deployment_details import UpdateSecurityPolicyDeploymentDetails @@ -356,6 +384,8 @@ from .update_target_alert_policy_association_details import UpdateTargetAlertPolicyAssociationDetails from .update_target_database_details import UpdateTargetDatabaseDetails from .update_user_assessment_details import UpdateUserAssessmentDetails +from .user_access_analytics_collection import UserAccessAnalyticsCollection +from .user_access_analytics_summary import UserAccessAnalyticsSummary from .user_aggregation import UserAggregation from .user_assessment import UserAssessment from .user_assessment_base_line_details import UserAssessmentBaseLineDetails @@ -473,6 +503,7 @@ "CreateMaskingColumnDetails": CreateMaskingColumnDetails, "CreateMaskingPolicyDetails": CreateMaskingPolicyDetails, "CreateOnPremConnectorDetails": CreateOnPremConnectorDetails, + "CreatePeerTargetDatabaseDetails": CreatePeerTargetDatabaseDetails, "CreateReportDefinitionDetails": CreateReportDefinitionDetails, "CreateSdmMaskingPolicyDifferenceDetails": CreateSdmMaskingPolicyDifferenceDetails, "CreateSecurityAssessmentDetails": CreateSecurityAssessmentDetails, @@ -494,6 +525,12 @@ "DatabaseSecurityConfig": DatabaseSecurityConfig, "DatabaseSecurityConfigCollection": DatabaseSecurityConfigCollection, "DatabaseSecurityConfigSummary": DatabaseSecurityConfigSummary, + "DatabaseTableAccessEntry": DatabaseTableAccessEntry, + "DatabaseTableAccessEntryCollection": DatabaseTableAccessEntryCollection, + "DatabaseTableAccessEntrySummary": DatabaseTableAccessEntrySummary, + "DatabaseViewAccessEntry": DatabaseViewAccessEntry, + "DatabaseViewAccessEntryCollection": DatabaseViewAccessEntryCollection, + "DatabaseViewAccessEntrySummary": DatabaseViewAccessEntrySummary, "DeleteRowsFormatEntry": DeleteRowsFormatEntry, "DeterministicEncryptionDateFormatEntry": DeterministicEncryptionDateFormatEntry, "DeterministicEncryptionFormatEntry": DeterministicEncryptionFormatEntry, @@ -521,7 +558,12 @@ "EnableDataSafeConfigurationDetails": EnableDataSafeConfigurationDetails, "EntryDetails": EntryDetails, "Finding": Finding, + "FindingAnalyticsCollection": FindingAnalyticsCollection, + "FindingAnalyticsDimensions": FindingAnalyticsDimensions, + "FindingAnalyticsSummary": FindingAnalyticsSummary, "FindingSummary": FindingSummary, + "FindingsChangeAuditLogCollection": FindingsChangeAuditLogCollection, + "FindingsChangeAuditLogSummary": FindingsChangeAuditLogSummary, "FirewallPolicyEntryDetails": FirewallPolicyEntryDetails, "FixedNumberFormatEntry": FixedNumberFormatEntry, "FixedStringFormatEntry": FixedStringFormatEntry, @@ -584,6 +626,9 @@ "PatchSensitiveColumnDetails": PatchSensitiveColumnDetails, "PatchTargetAlertPolicyAssociationDetails": PatchTargetAlertPolicyAssociationDetails, "PatternFormatEntry": PatternFormatEntry, + "PeerTargetDatabase": PeerTargetDatabase, + "PeerTargetDatabaseCollection": PeerTargetDatabaseCollection, + "PeerTargetDatabaseSummary": PeerTargetDatabaseSummary, "PreserveOriginalDataFormatEntry": PreserveOriginalDataFormatEntry, "PrivateEndpoint": PrivateEndpoint, "Profile": Profile, @@ -608,6 +653,8 @@ "ReportDefinitionSummary": ReportDefinitionSummary, "ReportDetails": ReportDetails, "ReportSummary": ReportSummary, + "RoleGrantPathCollection": RoleGrantPathCollection, + "RoleGrantPathSummary": RoleGrantPathSummary, "RoleSummary": RoleSummary, "RunSecurityAssessmentDetails": RunSecurityAssessmentDetails, "RunUserAssessmentDetails": RunUserAssessmentDetails, @@ -626,6 +673,11 @@ "SecurityAssessmentComparisonPerTarget": SecurityAssessmentComparisonPerTarget, "SecurityAssessmentStatistics": SecurityAssessmentStatistics, "SecurityAssessmentSummary": SecurityAssessmentSummary, + "SecurityFeatureAnalyticsCollection": SecurityFeatureAnalyticsCollection, + "SecurityFeatureAnalyticsDimensions": SecurityFeatureAnalyticsDimensions, + "SecurityFeatureAnalyticsSummary": SecurityFeatureAnalyticsSummary, + "SecurityFeatureCollection": SecurityFeatureCollection, + "SecurityFeatureSummary": SecurityFeatureSummary, "SecurityPolicy": SecurityPolicy, "SecurityPolicyCollection": SecurityPolicyCollection, "SecurityPolicyDeployment": SecurityPolicyDeployment, @@ -634,6 +686,9 @@ "SecurityPolicyEntryState": SecurityPolicyEntryState, "SecurityPolicyEntryStateCollection": SecurityPolicyEntryStateCollection, "SecurityPolicyEntryStateSummary": SecurityPolicyEntryStateSummary, + "SecurityPolicyReport": SecurityPolicyReport, + "SecurityPolicyReportCollection": SecurityPolicyReportCollection, + "SecurityPolicyReportSummary": SecurityPolicyReportSummary, "SecurityPolicySummary": SecurityPolicySummary, "SensitiveCategory": SensitiveCategory, "SensitiveColumn": SensitiveColumn, @@ -700,12 +755,15 @@ "UpdateColumnSourceTargetDetails": UpdateColumnSourceTargetDetails, "UpdateDataSafePrivateEndpointDetails": UpdateDataSafePrivateEndpointDetails, "UpdateDatabaseSecurityConfigDetails": UpdateDatabaseSecurityConfigDetails, + "UpdateFindingDetails": UpdateFindingDetails, "UpdateLibraryMaskingFormatDetails": UpdateLibraryMaskingFormatDetails, "UpdateMaskingColumnDetails": UpdateMaskingColumnDetails, "UpdateMaskingPolicyDetails": UpdateMaskingPolicyDetails, "UpdateOnPremConnectorDetails": UpdateOnPremConnectorDetails, "UpdateOnPremConnectorWalletDetails": UpdateOnPremConnectorWalletDetails, + "UpdatePeerTargetDatabaseDetails": UpdatePeerTargetDatabaseDetails, "UpdateReportDefinitionDetails": UpdateReportDefinitionDetails, + "UpdateReportDetails": UpdateReportDetails, "UpdateSdmMaskingPolicyDifferenceDetails": UpdateSdmMaskingPolicyDifferenceDetails, "UpdateSecurityAssessmentDetails": UpdateSecurityAssessmentDetails, "UpdateSecurityPolicyDeploymentDetails": UpdateSecurityPolicyDeploymentDetails, @@ -721,6 +779,8 @@ "UpdateTargetAlertPolicyAssociationDetails": UpdateTargetAlertPolicyAssociationDetails, "UpdateTargetDatabaseDetails": UpdateTargetDatabaseDetails, "UpdateUserAssessmentDetails": UpdateUserAssessmentDetails, + "UserAccessAnalyticsCollection": UserAccessAnalyticsCollection, + "UserAccessAnalyticsSummary": UserAccessAnalyticsSummary, "UserAggregation": UserAggregation, "UserAssessment": UserAssessment, "UserAssessmentBaseLineDetails": UserAssessmentBaseLineDetails, diff --git a/src/oci/data_safe/models/audit_event_summary.py b/src/oci/data_safe/models/audit_event_summary.py index 0ce3668648..679d04e4e2 100644 --- a/src/oci/data_safe/models/audit_event_summary.py +++ b/src/oci/data_safe/models/audit_event_summary.py @@ -75,6 +75,14 @@ class AuditEventSummary(object): #: This constant has a value of "DIRECT_PATH_API" AUDIT_TYPE_DIRECT_PATH_API = "DIRECT_PATH_API" + #: A constant which can be used with the trail_source property of a AuditEventSummary. + #: This constant has a value of "TABLE" + TRAIL_SOURCE_TABLE = "TABLE" + + #: A constant which can be used with the trail_source property of a AuditEventSummary. + #: This constant has a value of "FILE" + TRAIL_SOURCE_FILE = "FILE" + def __init__(self, **kwargs): """ Initializes a new AuditEventSummary object with values from keyword arguments. @@ -218,6 +226,20 @@ def __init__(self, **kwargs): Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type audit_type: str + :param peer_target_database_key: + The value to assign to the peer_target_database_key property of this AuditEventSummary. + :type peer_target_database_key: int + + :param trail_source: + The value to assign to the trail_source property of this AuditEventSummary. + Allowed values for this property are: "TABLE", "FILE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type trail_source: str + + :param database_unique_name: + The value to assign to the database_unique_name property of this AuditEventSummary. + :type database_unique_name: str + :param freeform_tags: The value to assign to the freeform_tags property of this AuditEventSummary. :type freeform_tags: dict(str, str) @@ -260,6 +282,9 @@ def __init__(self, **kwargs): 'client_id': 'str', 'audit_policies': 'str', 'audit_type': 'str', + 'peer_target_database_key': 'int', + 'trail_source': 'str', + 'database_unique_name': 'str', 'freeform_tags': 'dict(str, str)', 'defined_tags': 'dict(str, dict(str, object))' } @@ -297,6 +322,9 @@ def __init__(self, **kwargs): 'client_id': 'clientId', 'audit_policies': 'auditPolicies', 'audit_type': 'auditType', + 'peer_target_database_key': 'peerTargetDatabaseKey', + 'trail_source': 'trailSource', + 'database_unique_name': 'databaseUniqueName', 'freeform_tags': 'freeformTags', 'defined_tags': 'definedTags' } @@ -333,6 +361,9 @@ def __init__(self, **kwargs): self._client_id = None self._audit_policies = None self._audit_type = None + self._peer_target_database_key = None + self._trail_source = None + self._database_unique_name = None self._freeform_tags = None self._defined_tags = None @@ -1140,6 +1171,84 @@ def audit_type(self, audit_type): audit_type = 'UNKNOWN_ENUM_VALUE' self._audit_type = audit_type + @property + def peer_target_database_key(self): + """ + Gets the peer_target_database_key of this AuditEventSummary. + The secondary id assigned for the peer database registered with Data Safe. + + + :return: The peer_target_database_key of this AuditEventSummary. + :rtype: int + """ + return self._peer_target_database_key + + @peer_target_database_key.setter + def peer_target_database_key(self, peer_target_database_key): + """ + Sets the peer_target_database_key of this AuditEventSummary. + The secondary id assigned for the peer database registered with Data Safe. + + + :param peer_target_database_key: The peer_target_database_key of this AuditEventSummary. + :type: int + """ + self._peer_target_database_key = peer_target_database_key + + @property + def trail_source(self): + """ + Gets the trail_source of this AuditEventSummary. + The underlying source of unified audit trail. + + Allowed values for this property are: "TABLE", "FILE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The trail_source of this AuditEventSummary. + :rtype: str + """ + return self._trail_source + + @trail_source.setter + def trail_source(self, trail_source): + """ + Sets the trail_source of this AuditEventSummary. + The underlying source of unified audit trail. + + + :param trail_source: The trail_source of this AuditEventSummary. + :type: str + """ + allowed_values = ["TABLE", "FILE"] + if not value_allowed_none_or_none_sentinel(trail_source, allowed_values): + trail_source = 'UNKNOWN_ENUM_VALUE' + self._trail_source = trail_source + + @property + def database_unique_name(self): + """ + Gets the database_unique_name of this AuditEventSummary. + Unique name of the database associated to the peer target database. + + + :return: The database_unique_name of this AuditEventSummary. + :rtype: str + """ + return self._database_unique_name + + @database_unique_name.setter + def database_unique_name(self, database_unique_name): + """ + Sets the database_unique_name of this AuditEventSummary. + Unique name of the database associated to the peer target database. + + + :param database_unique_name: The database_unique_name of this AuditEventSummary. + :type: str + """ + self._database_unique_name = database_unique_name + @property def freeform_tags(self): """ diff --git a/src/oci/data_safe/models/audit_trail.py b/src/oci/data_safe/models/audit_trail.py index 460503ffde..fe7cb05a51 100644 --- a/src/oci/data_safe/models/audit_trail.py +++ b/src/oci/data_safe/models/audit_trail.py @@ -86,6 +86,22 @@ class AuditTrail(object): #: This constant has a value of "STOPPED_FAILED" STATUS_STOPPED_FAILED = "STOPPED_FAILED" + #: A constant which can be used with the trail_source property of a AuditTrail. + #: This constant has a value of "TABLE" + TRAIL_SOURCE_TABLE = "TABLE" + + #: A constant which can be used with the trail_source property of a AuditTrail. + #: This constant has a value of "FILE" + TRAIL_SOURCE_FILE = "FILE" + + #: A constant which can be used with the purge_job_status property of a AuditTrail. + #: This constant has a value of "SUCCEEDED" + PURGE_JOB_STATUS_SUCCEEDED = "SUCCEEDED" + + #: A constant which can be used with the purge_job_status property of a AuditTrail. + #: This constant has a value of "FAILED" + PURGE_JOB_STATUS_FAILED = "FAILED" + def __init__(self, **kwargs): """ Initializes a new AuditTrail object with values from keyword arguments. @@ -159,6 +175,30 @@ def __init__(self, **kwargs): The value to assign to the time_last_collected property of this AuditTrail. :type time_last_collected: datetime + :param peer_target_database_key: + The value to assign to the peer_target_database_key property of this AuditTrail. + :type peer_target_database_key: int + + :param trail_source: + The value to assign to the trail_source property of this AuditTrail. + Allowed values for this property are: "TABLE", "FILE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type trail_source: str + + :param purge_job_time: + The value to assign to the purge_job_time property of this AuditTrail. + :type purge_job_time: datetime + + :param purge_job_status: + The value to assign to the purge_job_status property of this AuditTrail. + Allowed values for this property are: "SUCCEEDED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type purge_job_status: str + + :param purge_job_details: + The value to assign to the purge_job_details property of this AuditTrail. + :type purge_job_details: str + :param freeform_tags: The value to assign to the freeform_tags property of this AuditTrail. :type freeform_tags: dict(str, str) @@ -189,6 +229,11 @@ def __init__(self, **kwargs): 'work_request_id': 'str', 'compartment_id': 'str', 'time_last_collected': 'datetime', + 'peer_target_database_key': 'int', + 'trail_source': 'str', + 'purge_job_time': 'datetime', + 'purge_job_status': 'str', + 'purge_job_details': 'str', 'freeform_tags': 'dict(str, str)', 'defined_tags': 'dict(str, dict(str, object))', 'system_tags': 'dict(str, dict(str, object))' @@ -211,6 +256,11 @@ def __init__(self, **kwargs): 'work_request_id': 'workRequestId', 'compartment_id': 'compartmentId', 'time_last_collected': 'timeLastCollected', + 'peer_target_database_key': 'peerTargetDatabaseKey', + 'trail_source': 'trailSource', + 'purge_job_time': 'purgeJobTime', + 'purge_job_status': 'purgeJobStatus', + 'purge_job_details': 'purgeJobDetails', 'freeform_tags': 'freeformTags', 'defined_tags': 'definedTags', 'system_tags': 'systemTags' @@ -232,6 +282,11 @@ def __init__(self, **kwargs): self._work_request_id = None self._compartment_id = None self._time_last_collected = None + self._peer_target_database_key = None + self._trail_source = None + self._purge_job_time = None + self._purge_job_status = None + self._purge_job_details = None self._freeform_tags = None self._defined_tags = None self._system_tags = None @@ -638,6 +693,142 @@ def time_last_collected(self, time_last_collected): """ self._time_last_collected = time_last_collected + @property + def peer_target_database_key(self): + """ + Gets the peer_target_database_key of this AuditTrail. + The secondary id assigned for the peer database registered with Data Safe. + + + :return: The peer_target_database_key of this AuditTrail. + :rtype: int + """ + return self._peer_target_database_key + + @peer_target_database_key.setter + def peer_target_database_key(self, peer_target_database_key): + """ + Sets the peer_target_database_key of this AuditTrail. + The secondary id assigned for the peer database registered with Data Safe. + + + :param peer_target_database_key: The peer_target_database_key of this AuditTrail. + :type: int + """ + self._peer_target_database_key = peer_target_database_key + + @property + def trail_source(self): + """ + Gets the trail_source of this AuditTrail. + The underlying source of unified audit trail. + + Allowed values for this property are: "TABLE", "FILE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The trail_source of this AuditTrail. + :rtype: str + """ + return self._trail_source + + @trail_source.setter + def trail_source(self, trail_source): + """ + Sets the trail_source of this AuditTrail. + The underlying source of unified audit trail. + + + :param trail_source: The trail_source of this AuditTrail. + :type: str + """ + allowed_values = ["TABLE", "FILE"] + if not value_allowed_none_or_none_sentinel(trail_source, allowed_values): + trail_source = 'UNKNOWN_ENUM_VALUE' + self._trail_source = trail_source + + @property + def purge_job_time(self): + """ + Gets the purge_job_time of this AuditTrail. + The date and time of the last purge job. The purge job deletes audit data in the + target database every seven days so that the database's audit trail does not become too large. + In the format defined by RFC3339. + + + :return: The purge_job_time of this AuditTrail. + :rtype: datetime + """ + return self._purge_job_time + + @purge_job_time.setter + def purge_job_time(self, purge_job_time): + """ + Sets the purge_job_time of this AuditTrail. + The date and time of the last purge job. The purge job deletes audit data in the + target database every seven days so that the database's audit trail does not become too large. + In the format defined by RFC3339. + + + :param purge_job_time: The purge_job_time of this AuditTrail. + :type: datetime + """ + self._purge_job_time = purge_job_time + + @property + def purge_job_status(self): + """ + Gets the purge_job_status of this AuditTrail. + The current status of the audit trail purge job. + + Allowed values for this property are: "SUCCEEDED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The purge_job_status of this AuditTrail. + :rtype: str + """ + return self._purge_job_status + + @purge_job_status.setter + def purge_job_status(self, purge_job_status): + """ + Sets the purge_job_status of this AuditTrail. + The current status of the audit trail purge job. + + + :param purge_job_status: The purge_job_status of this AuditTrail. + :type: str + """ + allowed_values = ["SUCCEEDED", "FAILED"] + if not value_allowed_none_or_none_sentinel(purge_job_status, allowed_values): + purge_job_status = 'UNKNOWN_ENUM_VALUE' + self._purge_job_status = purge_job_status + + @property + def purge_job_details(self): + """ + Gets the purge_job_details of this AuditTrail. + The details of the audit trail purge job that ran at the time specified by purgeJobTime\". + + + :return: The purge_job_details of this AuditTrail. + :rtype: str + """ + return self._purge_job_details + + @purge_job_details.setter + def purge_job_details(self, purge_job_details): + """ + Sets the purge_job_details of this AuditTrail. + The details of the audit trail purge job that ran at the time specified by purgeJobTime\". + + + :param purge_job_details: The purge_job_details of this AuditTrail. + :type: str + """ + self._purge_job_details = purge_job_details + @property def freeform_tags(self): """ diff --git a/src/oci/data_safe/models/audit_trail_summary.py b/src/oci/data_safe/models/audit_trail_summary.py index 5dc6a63305..bb9f4b201c 100644 --- a/src/oci/data_safe/models/audit_trail_summary.py +++ b/src/oci/data_safe/models/audit_trail_summary.py @@ -148,6 +148,10 @@ def __init__(self, **kwargs): The value to assign to the audit_collection_start_time property of this AuditTrailSummary. :type audit_collection_start_time: datetime + :param peer_target_database_key: + The value to assign to the peer_target_database_key property of this AuditTrailSummary. + :type peer_target_database_key: int + :param freeform_tags: The value to assign to the freeform_tags property of this AuditTrailSummary. :type freeform_tags: dict(str, str) @@ -172,6 +176,7 @@ def __init__(self, **kwargs): 'lifecycle_details': 'str', 'is_auto_purge_enabled': 'bool', 'audit_collection_start_time': 'datetime', + 'peer_target_database_key': 'int', 'freeform_tags': 'dict(str, str)', 'defined_tags': 'dict(str, dict(str, object))' } @@ -191,6 +196,7 @@ def __init__(self, **kwargs): 'lifecycle_details': 'lifecycleDetails', 'is_auto_purge_enabled': 'isAutoPurgeEnabled', 'audit_collection_start_time': 'auditCollectionStartTime', + 'peer_target_database_key': 'peerTargetDatabaseKey', 'freeform_tags': 'freeformTags', 'defined_tags': 'definedTags' } @@ -209,6 +215,7 @@ def __init__(self, **kwargs): self._lifecycle_details = None self._is_auto_purge_enabled = None self._audit_collection_start_time = None + self._peer_target_database_key = None self._freeform_tags = None self._defined_tags = None @@ -562,6 +569,30 @@ def audit_collection_start_time(self, audit_collection_start_time): """ self._audit_collection_start_time = audit_collection_start_time + @property + def peer_target_database_key(self): + """ + Gets the peer_target_database_key of this AuditTrailSummary. + The secondary id assigned for the peer database registered with Data Safe. + + + :return: The peer_target_database_key of this AuditTrailSummary. + :rtype: int + """ + return self._peer_target_database_key + + @peer_target_database_key.setter + def peer_target_database_key(self, peer_target_database_key): + """ + Sets the peer_target_database_key of this AuditTrailSummary. + The secondary id assigned for the peer database registered with Data Safe. + + + :param peer_target_database_key: The peer_target_database_key of this AuditTrailSummary. + :type: int + """ + self._peer_target_database_key = peer_target_database_key + @property def freeform_tags(self): """ diff --git a/src/oci/data_safe/models/available_audit_volume_summary.py b/src/oci/data_safe/models/available_audit_volume_summary.py index 487d73a714..960e268773 100644 --- a/src/oci/data_safe/models/available_audit_volume_summary.py +++ b/src/oci/data_safe/models/available_audit_volume_summary.py @@ -24,6 +24,14 @@ def __init__(self, **kwargs): The value to assign to the audit_profile_id property of this AvailableAuditVolumeSummary. :type audit_profile_id: str + :param audit_trail_id: + The value to assign to the audit_trail_id property of this AvailableAuditVolumeSummary. + :type audit_trail_id: str + + :param database_unique_name: + The value to assign to the database_unique_name property of this AvailableAuditVolumeSummary. + :type database_unique_name: str + :param trail_location: The value to assign to the trail_location property of this AvailableAuditVolumeSummary. :type trail_location: str @@ -39,6 +47,8 @@ def __init__(self, **kwargs): """ self.swagger_types = { 'audit_profile_id': 'str', + 'audit_trail_id': 'str', + 'database_unique_name': 'str', 'trail_location': 'str', 'month_in_consideration': 'datetime', 'volume': 'int' @@ -46,12 +56,16 @@ def __init__(self, **kwargs): self.attribute_map = { 'audit_profile_id': 'auditProfileId', + 'audit_trail_id': 'auditTrailId', + 'database_unique_name': 'databaseUniqueName', 'trail_location': 'trailLocation', 'month_in_consideration': 'monthInConsideration', 'volume': 'volume' } self._audit_profile_id = None + self._audit_trail_id = None + self._database_unique_name = None self._trail_location = None self._month_in_consideration = None self._volume = None @@ -80,6 +94,54 @@ def audit_profile_id(self, audit_profile_id): """ self._audit_profile_id = audit_profile_id + @property + def audit_trail_id(self): + """ + Gets the audit_trail_id of this AvailableAuditVolumeSummary. + The OCID of the audit trail. + + + :return: The audit_trail_id of this AvailableAuditVolumeSummary. + :rtype: str + """ + return self._audit_trail_id + + @audit_trail_id.setter + def audit_trail_id(self, audit_trail_id): + """ + Sets the audit_trail_id of this AvailableAuditVolumeSummary. + The OCID of the audit trail. + + + :param audit_trail_id: The audit_trail_id of this AvailableAuditVolumeSummary. + :type: str + """ + self._audit_trail_id = audit_trail_id + + @property + def database_unique_name(self): + """ + Gets the database_unique_name of this AvailableAuditVolumeSummary. + Unique name of the database associated to the peer target database. + + + :return: The database_unique_name of this AvailableAuditVolumeSummary. + :rtype: str + """ + return self._database_unique_name + + @database_unique_name.setter + def database_unique_name(self, database_unique_name): + """ + Sets the database_unique_name of this AvailableAuditVolumeSummary. + Unique name of the database associated to the peer target database. + + + :param database_unique_name: The database_unique_name of this AvailableAuditVolumeSummary. + :type: str + """ + self._database_unique_name = database_unique_name + @property def trail_location(self): """ diff --git a/src/oci/data_safe/models/calculate_audit_volume_available_details.py b/src/oci/data_safe/models/calculate_audit_volume_available_details.py index 71ead6f412..fc96477d64 100644 --- a/src/oci/data_safe/models/calculate_audit_volume_available_details.py +++ b/src/oci/data_safe/models/calculate_audit_volume_available_details.py @@ -28,19 +28,26 @@ def __init__(self, **kwargs): The value to assign to the trail_locations property of this CalculateAuditVolumeAvailableDetails. :type trail_locations: list[str] + :param database_unique_name: + The value to assign to the database_unique_name property of this CalculateAuditVolumeAvailableDetails. + :type database_unique_name: str + """ self.swagger_types = { 'audit_collection_start_time': 'datetime', - 'trail_locations': 'list[str]' + 'trail_locations': 'list[str]', + 'database_unique_name': 'str' } self.attribute_map = { 'audit_collection_start_time': 'auditCollectionStartTime', - 'trail_locations': 'trailLocations' + 'trail_locations': 'trailLocations', + 'database_unique_name': 'databaseUniqueName' } self._audit_collection_start_time = None self._trail_locations = None + self._database_unique_name = None @property def audit_collection_start_time(self): @@ -69,7 +76,7 @@ def audit_collection_start_time(self, audit_collection_start_time): @property def trail_locations(self): """ - **[Required]** Gets the trail_locations of this CalculateAuditVolumeAvailableDetails. + Gets the trail_locations of this CalculateAuditVolumeAvailableDetails. The trail locations for which the audit data volume has to be calculated. @@ -90,6 +97,30 @@ def trail_locations(self, trail_locations): """ self._trail_locations = trail_locations + @property + def database_unique_name(self): + """ + Gets the database_unique_name of this CalculateAuditVolumeAvailableDetails. + Unique name of the database associated to the peer target database. + + + :return: The database_unique_name of this CalculateAuditVolumeAvailableDetails. + :rtype: str + """ + return self._database_unique_name + + @database_unique_name.setter + def database_unique_name(self, database_unique_name): + """ + Sets the database_unique_name of this CalculateAuditVolumeAvailableDetails. + Unique name of the database associated to the peer target database. + + + :param database_unique_name: The database_unique_name of this CalculateAuditVolumeAvailableDetails. + :type: str + """ + self._database_unique_name = database_unique_name + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/data_safe/models/create_peer_target_database_details.py b/src/oci/data_safe/models/create_peer_target_database_details.py new file mode 100644 index 0000000000..2ff29aa348 --- /dev/null +++ b/src/oci/data_safe/models/create_peer_target_database_details.py @@ -0,0 +1,188 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20181201 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class CreatePeerTargetDatabaseDetails(object): + """ + The details used to register the peer database of a database already registered in Data Safe. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CreatePeerTargetDatabaseDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param display_name: + The value to assign to the display_name property of this CreatePeerTargetDatabaseDetails. + :type display_name: str + + :param description: + The value to assign to the description property of this CreatePeerTargetDatabaseDetails. + :type description: str + + :param dataguard_association_id: + The value to assign to the dataguard_association_id property of this CreatePeerTargetDatabaseDetails. + :type dataguard_association_id: str + + :param database_details: + The value to assign to the database_details property of this CreatePeerTargetDatabaseDetails. + :type database_details: oci.data_safe.models.DatabaseDetails + + :param tls_config: + The value to assign to the tls_config property of this CreatePeerTargetDatabaseDetails. + :type tls_config: oci.data_safe.models.TlsConfig + + """ + self.swagger_types = { + 'display_name': 'str', + 'description': 'str', + 'dataguard_association_id': 'str', + 'database_details': 'DatabaseDetails', + 'tls_config': 'TlsConfig' + } + + self.attribute_map = { + 'display_name': 'displayName', + 'description': 'description', + 'dataguard_association_id': 'dataguardAssociationId', + 'database_details': 'databaseDetails', + 'tls_config': 'tlsConfig' + } + + self._display_name = None + self._description = None + self._dataguard_association_id = None + self._database_details = None + self._tls_config = None + + @property + def display_name(self): + """ + Gets the display_name of this CreatePeerTargetDatabaseDetails. + The display name of the peer target database in Data Safe. The name is modifiable and does not need to be unique. + + + :return: The display_name of this CreatePeerTargetDatabaseDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this CreatePeerTargetDatabaseDetails. + The display name of the peer target database in Data Safe. The name is modifiable and does not need to be unique. + + + :param display_name: The display_name of this CreatePeerTargetDatabaseDetails. + :type: str + """ + self._display_name = display_name + + @property + def description(self): + """ + Gets the description of this CreatePeerTargetDatabaseDetails. + The description of the peer target database in Data Safe. + + + :return: The description of this CreatePeerTargetDatabaseDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this CreatePeerTargetDatabaseDetails. + The description of the peer target database in Data Safe. + + + :param description: The description of this CreatePeerTargetDatabaseDetails. + :type: str + """ + self._description = description + + @property + def dataguard_association_id(self): + """ + Gets the dataguard_association_id of this CreatePeerTargetDatabaseDetails. + The OCID of the Data Guard Association resource in which the database being registered is considered as peer database to the primary database. + + + :return: The dataguard_association_id of this CreatePeerTargetDatabaseDetails. + :rtype: str + """ + return self._dataguard_association_id + + @dataguard_association_id.setter + def dataguard_association_id(self, dataguard_association_id): + """ + Sets the dataguard_association_id of this CreatePeerTargetDatabaseDetails. + The OCID of the Data Guard Association resource in which the database being registered is considered as peer database to the primary database. + + + :param dataguard_association_id: The dataguard_association_id of this CreatePeerTargetDatabaseDetails. + :type: str + """ + self._dataguard_association_id = dataguard_association_id + + @property + def database_details(self): + """ + **[Required]** Gets the database_details of this CreatePeerTargetDatabaseDetails. + + :return: The database_details of this CreatePeerTargetDatabaseDetails. + :rtype: oci.data_safe.models.DatabaseDetails + """ + return self._database_details + + @database_details.setter + def database_details(self, database_details): + """ + Sets the database_details of this CreatePeerTargetDatabaseDetails. + + :param database_details: The database_details of this CreatePeerTargetDatabaseDetails. + :type: oci.data_safe.models.DatabaseDetails + """ + self._database_details = database_details + + @property + def tls_config(self): + """ + Gets the tls_config of this CreatePeerTargetDatabaseDetails. + + :return: The tls_config of this CreatePeerTargetDatabaseDetails. + :rtype: oci.data_safe.models.TlsConfig + """ + return self._tls_config + + @tls_config.setter + def tls_config(self, tls_config): + """ + Sets the tls_config of this CreatePeerTargetDatabaseDetails. + + :param tls_config: The tls_config of this CreatePeerTargetDatabaseDetails. + :type: oci.data_safe.models.TlsConfig + """ + self._tls_config = tls_config + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/create_target_database_details.py b/src/oci/data_safe/models/create_target_database_details.py index fdbd582973..90b3dea061 100644 --- a/src/oci/data_safe/models/create_target_database_details.py +++ b/src/oci/data_safe/models/create_target_database_details.py @@ -48,6 +48,10 @@ def __init__(self, **kwargs): The value to assign to the connection_option property of this CreateTargetDatabaseDetails. :type connection_option: oci.data_safe.models.ConnectionOption + :param peer_target_database_details: + The value to assign to the peer_target_database_details property of this CreateTargetDatabaseDetails. + :type peer_target_database_details: list[oci.data_safe.models.CreatePeerTargetDatabaseDetails] + :param freeform_tags: The value to assign to the freeform_tags property of this CreateTargetDatabaseDetails. :type freeform_tags: dict(str, str) @@ -65,6 +69,7 @@ def __init__(self, **kwargs): 'credentials': 'Credentials', 'tls_config': 'TlsConfig', 'connection_option': 'ConnectionOption', + 'peer_target_database_details': 'list[CreatePeerTargetDatabaseDetails]', 'freeform_tags': 'dict(str, str)', 'defined_tags': 'dict(str, dict(str, object))' } @@ -77,6 +82,7 @@ def __init__(self, **kwargs): 'credentials': 'credentials', 'tls_config': 'tlsConfig', 'connection_option': 'connectionOption', + 'peer_target_database_details': 'peerTargetDatabaseDetails', 'freeform_tags': 'freeformTags', 'defined_tags': 'definedTags' } @@ -88,6 +94,7 @@ def __init__(self, **kwargs): self._credentials = None self._tls_config = None self._connection_option = None + self._peer_target_database_details = None self._freeform_tags = None self._defined_tags = None @@ -243,6 +250,30 @@ def connection_option(self, connection_option): """ self._connection_option = connection_option + @property + def peer_target_database_details(self): + """ + Gets the peer_target_database_details of this CreateTargetDatabaseDetails. + The details of the database to be registered as a peer target database. + + + :return: The peer_target_database_details of this CreateTargetDatabaseDetails. + :rtype: list[oci.data_safe.models.CreatePeerTargetDatabaseDetails] + """ + return self._peer_target_database_details + + @peer_target_database_details.setter + def peer_target_database_details(self, peer_target_database_details): + """ + Sets the peer_target_database_details of this CreateTargetDatabaseDetails. + The details of the database to be registered as a peer target database. + + + :param peer_target_database_details: The peer_target_database_details of this CreateTargetDatabaseDetails. + :type: list[oci.data_safe.models.CreatePeerTargetDatabaseDetails] + """ + self._peer_target_database_details = peer_target_database_details + @property def freeform_tags(self): """ diff --git a/src/oci/data_safe/models/database_table_access_entry.py b/src/oci/data_safe/models/database_table_access_entry.py new file mode 100644 index 0000000000..d226263b4a --- /dev/null +++ b/src/oci/data_safe/models/database_table_access_entry.py @@ -0,0 +1,837 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20181201 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class DatabaseTableAccessEntry(object): + """ + A DatabaseTableAccess is a resource corresponding to a row in database table access report. It contains + information about user's privilege grants that enable table access for the user. + It's a subresource of Security Policy Report resource and is always associated with a SecurityPolicyReport. + """ + + #: A constant which can be used with the access_type property of a DatabaseTableAccessEntry. + #: This constant has a value of "SELECT" + ACCESS_TYPE_SELECT = "SELECT" + + #: A constant which can be used with the access_type property of a DatabaseTableAccessEntry. + #: This constant has a value of "UPDATE" + ACCESS_TYPE_UPDATE = "UPDATE" + + #: A constant which can be used with the access_type property of a DatabaseTableAccessEntry. + #: This constant has a value of "INSERT" + ACCESS_TYPE_INSERT = "INSERT" + + #: A constant which can be used with the access_type property of a DatabaseTableAccessEntry. + #: This constant has a value of "DELETE" + ACCESS_TYPE_DELETE = "DELETE" + + #: A constant which can be used with the access_type property of a DatabaseTableAccessEntry. + #: This constant has a value of "OWNER" + ACCESS_TYPE_OWNER = "OWNER" + + #: A constant which can be used with the privilege property of a DatabaseTableAccessEntry. + #: This constant has a value of "SELECT" + PRIVILEGE_SELECT = "SELECT" + + #: A constant which can be used with the privilege property of a DatabaseTableAccessEntry. + #: This constant has a value of "UPDATE" + PRIVILEGE_UPDATE = "UPDATE" + + #: A constant which can be used with the privilege property of a DatabaseTableAccessEntry. + #: This constant has a value of "INSERT" + PRIVILEGE_INSERT = "INSERT" + + #: A constant which can be used with the privilege property of a DatabaseTableAccessEntry. + #: This constant has a value of "DELETE" + PRIVILEGE_DELETE = "DELETE" + + #: A constant which can be used with the privilege property of a DatabaseTableAccessEntry. + #: This constant has a value of "READ" + PRIVILEGE_READ = "READ" + + #: A constant which can be used with the privilege property of a DatabaseTableAccessEntry. + #: This constant has a value of "OWNER" + PRIVILEGE_OWNER = "OWNER" + + #: A constant which can be used with the privilege property of a DatabaseTableAccessEntry. + #: This constant has a value of "INDEX" + PRIVILEGE_INDEX = "INDEX" + + #: A constant which can be used with the privilege property of a DatabaseTableAccessEntry. + #: This constant has a value of "SELECT_ANY_TABLE" + PRIVILEGE_SELECT_ANY_TABLE = "SELECT_ANY_TABLE" + + #: A constant which can be used with the privilege property of a DatabaseTableAccessEntry. + #: This constant has a value of "UPDATE_ANY_TABLE" + PRIVILEGE_UPDATE_ANY_TABLE = "UPDATE_ANY_TABLE" + + #: A constant which can be used with the privilege property of a DatabaseTableAccessEntry. + #: This constant has a value of "INSERT_ANY_TABLE" + PRIVILEGE_INSERT_ANY_TABLE = "INSERT_ANY_TABLE" + + #: A constant which can be used with the privilege property of a DatabaseTableAccessEntry. + #: This constant has a value of "DELETE_ANY_TABLE" + PRIVILEGE_DELETE_ANY_TABLE = "DELETE_ANY_TABLE" + + #: A constant which can be used with the privilege property of a DatabaseTableAccessEntry. + #: This constant has a value of "READ_ANY_TABLE" + PRIVILEGE_READ_ANY_TABLE = "READ_ANY_TABLE" + + #: A constant which can be used with the privilege property of a DatabaseTableAccessEntry. + #: This constant has a value of "CREATE_ANY_INDEX" + PRIVILEGE_CREATE_ANY_INDEX = "CREATE_ANY_INDEX" + + #: A constant which can be used with the privilege_grantable property of a DatabaseTableAccessEntry. + #: This constant has a value of "ADMIN_OPTION" + PRIVILEGE_GRANTABLE_ADMIN_OPTION = "ADMIN_OPTION" + + #: A constant which can be used with the privilege_grantable property of a DatabaseTableAccessEntry. + #: This constant has a value of "GRANT_OPTION" + PRIVILEGE_GRANTABLE_GRANT_OPTION = "GRANT_OPTION" + + def __init__(self, **kwargs): + """ + Initializes a new DatabaseTableAccessEntry object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param key: + The value to assign to the key property of this DatabaseTableAccessEntry. + :type key: str + + :param grantee: + The value to assign to the grantee property of this DatabaseTableAccessEntry. + :type grantee: str + + :param access_type: + The value to assign to the access_type property of this DatabaseTableAccessEntry. + Allowed values for this property are: "SELECT", "UPDATE", "INSERT", "DELETE", "OWNER", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type access_type: str + + :param table_schema: + The value to assign to the table_schema property of this DatabaseTableAccessEntry. + :type table_schema: str + + :param table_name: + The value to assign to the table_name property of this DatabaseTableAccessEntry. + :type table_name: str + + :param privilege_type: + The value to assign to the privilege_type property of this DatabaseTableAccessEntry. + :type privilege_type: str + + :param target_id: + The value to assign to the target_id property of this DatabaseTableAccessEntry. + :type target_id: str + + :param privilege: + The value to assign to the privilege property of this DatabaseTableAccessEntry. + Allowed values for this property are: "SELECT", "UPDATE", "INSERT", "DELETE", "READ", "OWNER", "INDEX", "SELECT_ANY_TABLE", "UPDATE_ANY_TABLE", "INSERT_ANY_TABLE", "DELETE_ANY_TABLE", "READ_ANY_TABLE", "CREATE_ANY_INDEX", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type privilege: str + + :param privilege_grantable: + The value to assign to the privilege_grantable property of this DatabaseTableAccessEntry. + Allowed values for this property are: "ADMIN_OPTION", "GRANT_OPTION", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type privilege_grantable: str + + :param grant_from_role: + The value to assign to the grant_from_role property of this DatabaseTableAccessEntry. + :type grant_from_role: str + + :param access_through_object: + The value to assign to the access_through_object property of this DatabaseTableAccessEntry. + :type access_through_object: str + + :param column_name: + The value to assign to the column_name property of this DatabaseTableAccessEntry. + :type column_name: str + + :param grantor: + The value to assign to the grantor property of this DatabaseTableAccessEntry. + :type grantor: str + + :param are_all_tables_accessible: + The value to assign to the are_all_tables_accessible property of this DatabaseTableAccessEntry. + :type are_all_tables_accessible: bool + + :param is_access_constrained_by_view: + The value to assign to the is_access_constrained_by_view property of this DatabaseTableAccessEntry. + :type is_access_constrained_by_view: bool + + :param is_access_constrained_by_label_security: + The value to assign to the is_access_constrained_by_label_security property of this DatabaseTableAccessEntry. + :type is_access_constrained_by_label_security: bool + + :param is_access_constrained_by_database_vault: + The value to assign to the is_access_constrained_by_database_vault property of this DatabaseTableAccessEntry. + :type is_access_constrained_by_database_vault: bool + + :param is_access_constrained_by_virtual_private_database: + The value to assign to the is_access_constrained_by_virtual_private_database property of this DatabaseTableAccessEntry. + :type is_access_constrained_by_virtual_private_database: bool + + :param is_access_constrained_by_redaction: + The value to assign to the is_access_constrained_by_redaction property of this DatabaseTableAccessEntry. + :type is_access_constrained_by_redaction: bool + + :param is_access_constrained_by_real_application_security: + The value to assign to the is_access_constrained_by_real_application_security property of this DatabaseTableAccessEntry. + :type is_access_constrained_by_real_application_security: bool + + :param is_access_constrained_by_sql_firewall: + The value to assign to the is_access_constrained_by_sql_firewall property of this DatabaseTableAccessEntry. + :type is_access_constrained_by_sql_firewall: bool + + :param is_sensitive: + The value to assign to the is_sensitive property of this DatabaseTableAccessEntry. + :type is_sensitive: bool + + """ + self.swagger_types = { + 'key': 'str', + 'grantee': 'str', + 'access_type': 'str', + 'table_schema': 'str', + 'table_name': 'str', + 'privilege_type': 'str', + 'target_id': 'str', + 'privilege': 'str', + 'privilege_grantable': 'str', + 'grant_from_role': 'str', + 'access_through_object': 'str', + 'column_name': 'str', + 'grantor': 'str', + 'are_all_tables_accessible': 'bool', + 'is_access_constrained_by_view': 'bool', + 'is_access_constrained_by_label_security': 'bool', + 'is_access_constrained_by_database_vault': 'bool', + 'is_access_constrained_by_virtual_private_database': 'bool', + 'is_access_constrained_by_redaction': 'bool', + 'is_access_constrained_by_real_application_security': 'bool', + 'is_access_constrained_by_sql_firewall': 'bool', + 'is_sensitive': 'bool' + } + + self.attribute_map = { + 'key': 'key', + 'grantee': 'grantee', + 'access_type': 'accessType', + 'table_schema': 'tableSchema', + 'table_name': 'tableName', + 'privilege_type': 'privilegeType', + 'target_id': 'targetId', + 'privilege': 'privilege', + 'privilege_grantable': 'privilegeGrantable', + 'grant_from_role': 'grantFromRole', + 'access_through_object': 'accessThroughObject', + 'column_name': 'columnName', + 'grantor': 'grantor', + 'are_all_tables_accessible': 'areAllTablesAccessible', + 'is_access_constrained_by_view': 'isAccessConstrainedByView', + 'is_access_constrained_by_label_security': 'isAccessConstrainedByLabelSecurity', + 'is_access_constrained_by_database_vault': 'isAccessConstrainedByDatabaseVault', + 'is_access_constrained_by_virtual_private_database': 'isAccessConstrainedByVirtualPrivateDatabase', + 'is_access_constrained_by_redaction': 'isAccessConstrainedByRedaction', + 'is_access_constrained_by_real_application_security': 'isAccessConstrainedByRealApplicationSecurity', + 'is_access_constrained_by_sql_firewall': 'isAccessConstrainedBySqlFirewall', + 'is_sensitive': 'isSensitive' + } + + self._key = None + self._grantee = None + self._access_type = None + self._table_schema = None + self._table_name = None + self._privilege_type = None + self._target_id = None + self._privilege = None + self._privilege_grantable = None + self._grant_from_role = None + self._access_through_object = None + self._column_name = None + self._grantor = None + self._are_all_tables_accessible = None + self._is_access_constrained_by_view = None + self._is_access_constrained_by_label_security = None + self._is_access_constrained_by_database_vault = None + self._is_access_constrained_by_virtual_private_database = None + self._is_access_constrained_by_redaction = None + self._is_access_constrained_by_real_application_security = None + self._is_access_constrained_by_sql_firewall = None + self._is_sensitive = None + + @property + def key(self): + """ + **[Required]** Gets the key of this DatabaseTableAccessEntry. + The unique key that identifies the table access report. It is numeric and unique within a security policy report. + + + :return: The key of this DatabaseTableAccessEntry. + :rtype: str + """ + return self._key + + @key.setter + def key(self, key): + """ + Sets the key of this DatabaseTableAccessEntry. + The unique key that identifies the table access report. It is numeric and unique within a security policy report. + + + :param key: The key of this DatabaseTableAccessEntry. + :type: str + """ + self._key = key + + @property + def grantee(self): + """ + Gets the grantee of this DatabaseTableAccessEntry. + Grantee is the user who can access the table + + + :return: The grantee of this DatabaseTableAccessEntry. + :rtype: str + """ + return self._grantee + + @grantee.setter + def grantee(self, grantee): + """ + Sets the grantee of this DatabaseTableAccessEntry. + Grantee is the user who can access the table + + + :param grantee: The grantee of this DatabaseTableAccessEntry. + :type: str + """ + self._grantee = grantee + + @property + def access_type(self): + """ + Gets the access_type of this DatabaseTableAccessEntry. + The type of the access the user has on the table, there can be one or more from SELECT, UPDATE, INSERT, OWNER or DELETE. + + Allowed values for this property are: "SELECT", "UPDATE", "INSERT", "DELETE", "OWNER", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The access_type of this DatabaseTableAccessEntry. + :rtype: str + """ + return self._access_type + + @access_type.setter + def access_type(self, access_type): + """ + Sets the access_type of this DatabaseTableAccessEntry. + The type of the access the user has on the table, there can be one or more from SELECT, UPDATE, INSERT, OWNER or DELETE. + + + :param access_type: The access_type of this DatabaseTableAccessEntry. + :type: str + """ + allowed_values = ["SELECT", "UPDATE", "INSERT", "DELETE", "OWNER"] + if not value_allowed_none_or_none_sentinel(access_type, allowed_values): + access_type = 'UNKNOWN_ENUM_VALUE' + self._access_type = access_type + + @property + def table_schema(self): + """ + Gets the table_schema of this DatabaseTableAccessEntry. + The name of the schema the table belongs to. + + + :return: The table_schema of this DatabaseTableAccessEntry. + :rtype: str + """ + return self._table_schema + + @table_schema.setter + def table_schema(self, table_schema): + """ + Sets the table_schema of this DatabaseTableAccessEntry. + The name of the schema the table belongs to. + + + :param table_schema: The table_schema of this DatabaseTableAccessEntry. + :type: str + """ + self._table_schema = table_schema + + @property + def table_name(self): + """ + Gets the table_name of this DatabaseTableAccessEntry. + The name of the database table the user has access to. + + + :return: The table_name of this DatabaseTableAccessEntry. + :rtype: str + """ + return self._table_name + + @table_name.setter + def table_name(self, table_name): + """ + Sets the table_name of this DatabaseTableAccessEntry. + The name of the database table the user has access to. + + + :param table_name: The table_name of this DatabaseTableAccessEntry. + :type: str + """ + self._table_name = table_name + + @property + def privilege_type(self): + """ + Gets the privilege_type of this DatabaseTableAccessEntry. + Type of the privilege user has, this includes System Privilege, Schema Privilege, Object Privilege, Column Privilege, + Owner or Schema Privilege on a schema. + + + :return: The privilege_type of this DatabaseTableAccessEntry. + :rtype: str + """ + return self._privilege_type + + @privilege_type.setter + def privilege_type(self, privilege_type): + """ + Sets the privilege_type of this DatabaseTableAccessEntry. + Type of the privilege user has, this includes System Privilege, Schema Privilege, Object Privilege, Column Privilege, + Owner or Schema Privilege on a schema. + + + :param privilege_type: The privilege_type of this DatabaseTableAccessEntry. + :type: str + """ + self._privilege_type = privilege_type + + @property + def target_id(self): + """ + Gets the target_id of this DatabaseTableAccessEntry. + The OCID of the of the target database. + + + :return: The target_id of this DatabaseTableAccessEntry. + :rtype: str + """ + return self._target_id + + @target_id.setter + def target_id(self, target_id): + """ + Sets the target_id of this DatabaseTableAccessEntry. + The OCID of the of the target database. + + + :param target_id: The target_id of this DatabaseTableAccessEntry. + :type: str + """ + self._target_id = target_id + + @property + def privilege(self): + """ + Gets the privilege of this DatabaseTableAccessEntry. + Name of the privilege. + + Allowed values for this property are: "SELECT", "UPDATE", "INSERT", "DELETE", "READ", "OWNER", "INDEX", "SELECT_ANY_TABLE", "UPDATE_ANY_TABLE", "INSERT_ANY_TABLE", "DELETE_ANY_TABLE", "READ_ANY_TABLE", "CREATE_ANY_INDEX", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The privilege of this DatabaseTableAccessEntry. + :rtype: str + """ + return self._privilege + + @privilege.setter + def privilege(self, privilege): + """ + Sets the privilege of this DatabaseTableAccessEntry. + Name of the privilege. + + + :param privilege: The privilege of this DatabaseTableAccessEntry. + :type: str + """ + allowed_values = ["SELECT", "UPDATE", "INSERT", "DELETE", "READ", "OWNER", "INDEX", "SELECT_ANY_TABLE", "UPDATE_ANY_TABLE", "INSERT_ANY_TABLE", "DELETE_ANY_TABLE", "READ_ANY_TABLE", "CREATE_ANY_INDEX"] + if not value_allowed_none_or_none_sentinel(privilege, allowed_values): + privilege = 'UNKNOWN_ENUM_VALUE' + self._privilege = privilege + + @property + def privilege_grantable(self): + """ + Gets the privilege_grantable of this DatabaseTableAccessEntry. + Indicates whether the grantee can grant this privilege to other users. Privileges can be granted to a user or role with + GRANT_OPTION or ADMIN_OPTION + + Allowed values for this property are: "ADMIN_OPTION", "GRANT_OPTION", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The privilege_grantable of this DatabaseTableAccessEntry. + :rtype: str + """ + return self._privilege_grantable + + @privilege_grantable.setter + def privilege_grantable(self, privilege_grantable): + """ + Sets the privilege_grantable of this DatabaseTableAccessEntry. + Indicates whether the grantee can grant this privilege to other users. Privileges can be granted to a user or role with + GRANT_OPTION or ADMIN_OPTION + + + :param privilege_grantable: The privilege_grantable of this DatabaseTableAccessEntry. + :type: str + """ + allowed_values = ["ADMIN_OPTION", "GRANT_OPTION"] + if not value_allowed_none_or_none_sentinel(privilege_grantable, allowed_values): + privilege_grantable = 'UNKNOWN_ENUM_VALUE' + self._privilege_grantable = privilege_grantable + + @property + def grant_from_role(self): + """ + Gets the grant_from_role of this DatabaseTableAccessEntry. + This can be empty in case of direct grant, in case of indirect grant, this attribute displays the name of the + role which is granted to the user though which the user has access to the table. + + + :return: The grant_from_role of this DatabaseTableAccessEntry. + :rtype: str + """ + return self._grant_from_role + + @grant_from_role.setter + def grant_from_role(self, grant_from_role): + """ + Sets the grant_from_role of this DatabaseTableAccessEntry. + This can be empty in case of direct grant, in case of indirect grant, this attribute displays the name of the + role which is granted to the user though which the user has access to the table. + + + :param grant_from_role: The grant_from_role of this DatabaseTableAccessEntry. + :type: str + """ + self._grant_from_role = grant_from_role + + @property + def access_through_object(self): + """ + Gets the access_through_object of this DatabaseTableAccessEntry. + A non-null value in this field indicates the object through which user has access to table, possible values could + be table or view. + + + :return: The access_through_object of this DatabaseTableAccessEntry. + :rtype: str + """ + return self._access_through_object + + @access_through_object.setter + def access_through_object(self, access_through_object): + """ + Sets the access_through_object of this DatabaseTableAccessEntry. + A non-null value in this field indicates the object through which user has access to table, possible values could + be table or view. + + + :param access_through_object: The access_through_object of this DatabaseTableAccessEntry. + :type: str + """ + self._access_through_object = access_through_object + + @property + def column_name(self): + """ + Gets the column_name of this DatabaseTableAccessEntry. + If there are column level privileges on a table or view. + + + :return: The column_name of this DatabaseTableAccessEntry. + :rtype: str + """ + return self._column_name + + @column_name.setter + def column_name(self, column_name): + """ + Sets the column_name of this DatabaseTableAccessEntry. + If there are column level privileges on a table or view. + + + :param column_name: The column_name of this DatabaseTableAccessEntry. + :type: str + """ + self._column_name = column_name + + @property + def grantor(self): + """ + Gets the grantor of this DatabaseTableAccessEntry. + The one who granted this privilege. + + + :return: The grantor of this DatabaseTableAccessEntry. + :rtype: str + """ + return self._grantor + + @grantor.setter + def grantor(self, grantor): + """ + Sets the grantor of this DatabaseTableAccessEntry. + The one who granted this privilege. + + + :param grantor: The grantor of this DatabaseTableAccessEntry. + :type: str + """ + self._grantor = grantor + + @property + def are_all_tables_accessible(self): + """ + Gets the are_all_tables_accessible of this DatabaseTableAccessEntry. + Indicates whether the user has access to all the tables in the schema. + + + :return: The are_all_tables_accessible of this DatabaseTableAccessEntry. + :rtype: bool + """ + return self._are_all_tables_accessible + + @are_all_tables_accessible.setter + def are_all_tables_accessible(self, are_all_tables_accessible): + """ + Sets the are_all_tables_accessible of this DatabaseTableAccessEntry. + Indicates whether the user has access to all the tables in the schema. + + + :param are_all_tables_accessible: The are_all_tables_accessible of this DatabaseTableAccessEntry. + :type: bool + """ + self._are_all_tables_accessible = are_all_tables_accessible + + @property + def is_access_constrained_by_view(self): + """ + Gets the is_access_constrained_by_view of this DatabaseTableAccessEntry. + Indicates whether the access is constrained on a table via a view. + + + :return: The is_access_constrained_by_view of this DatabaseTableAccessEntry. + :rtype: bool + """ + return self._is_access_constrained_by_view + + @is_access_constrained_by_view.setter + def is_access_constrained_by_view(self, is_access_constrained_by_view): + """ + Sets the is_access_constrained_by_view of this DatabaseTableAccessEntry. + Indicates whether the access is constrained on a table via a view. + + + :param is_access_constrained_by_view: The is_access_constrained_by_view of this DatabaseTableAccessEntry. + :type: bool + """ + self._is_access_constrained_by_view = is_access_constrained_by_view + + @property + def is_access_constrained_by_label_security(self): + """ + Gets the is_access_constrained_by_label_security of this DatabaseTableAccessEntry. + Indicates whether the table access is constrained via Oracle Label Security. + + + :return: The is_access_constrained_by_label_security of this DatabaseTableAccessEntry. + :rtype: bool + """ + return self._is_access_constrained_by_label_security + + @is_access_constrained_by_label_security.setter + def is_access_constrained_by_label_security(self, is_access_constrained_by_label_security): + """ + Sets the is_access_constrained_by_label_security of this DatabaseTableAccessEntry. + Indicates whether the table access is constrained via Oracle Label Security. + + + :param is_access_constrained_by_label_security: The is_access_constrained_by_label_security of this DatabaseTableAccessEntry. + :type: bool + """ + self._is_access_constrained_by_label_security = is_access_constrained_by_label_security + + @property + def is_access_constrained_by_database_vault(self): + """ + Gets the is_access_constrained_by_database_vault of this DatabaseTableAccessEntry. + Indicates whether the table access is constrained via Oracle Database Vault. + + + :return: The is_access_constrained_by_database_vault of this DatabaseTableAccessEntry. + :rtype: bool + """ + return self._is_access_constrained_by_database_vault + + @is_access_constrained_by_database_vault.setter + def is_access_constrained_by_database_vault(self, is_access_constrained_by_database_vault): + """ + Sets the is_access_constrained_by_database_vault of this DatabaseTableAccessEntry. + Indicates whether the table access is constrained via Oracle Database Vault. + + + :param is_access_constrained_by_database_vault: The is_access_constrained_by_database_vault of this DatabaseTableAccessEntry. + :type: bool + """ + self._is_access_constrained_by_database_vault = is_access_constrained_by_database_vault + + @property + def is_access_constrained_by_virtual_private_database(self): + """ + Gets the is_access_constrained_by_virtual_private_database of this DatabaseTableAccessEntry. + Indicates whether the table access is constrained via Virtual Private Database. + + + :return: The is_access_constrained_by_virtual_private_database of this DatabaseTableAccessEntry. + :rtype: bool + """ + return self._is_access_constrained_by_virtual_private_database + + @is_access_constrained_by_virtual_private_database.setter + def is_access_constrained_by_virtual_private_database(self, is_access_constrained_by_virtual_private_database): + """ + Sets the is_access_constrained_by_virtual_private_database of this DatabaseTableAccessEntry. + Indicates whether the table access is constrained via Virtual Private Database. + + + :param is_access_constrained_by_virtual_private_database: The is_access_constrained_by_virtual_private_database of this DatabaseTableAccessEntry. + :type: bool + """ + self._is_access_constrained_by_virtual_private_database = is_access_constrained_by_virtual_private_database + + @property + def is_access_constrained_by_redaction(self): + """ + Gets the is_access_constrained_by_redaction of this DatabaseTableAccessEntry. + Indicates whether the table access is constrained via Oracle Data Redaction. + + + :return: The is_access_constrained_by_redaction of this DatabaseTableAccessEntry. + :rtype: bool + """ + return self._is_access_constrained_by_redaction + + @is_access_constrained_by_redaction.setter + def is_access_constrained_by_redaction(self, is_access_constrained_by_redaction): + """ + Sets the is_access_constrained_by_redaction of this DatabaseTableAccessEntry. + Indicates whether the table access is constrained via Oracle Data Redaction. + + + :param is_access_constrained_by_redaction: The is_access_constrained_by_redaction of this DatabaseTableAccessEntry. + :type: bool + """ + self._is_access_constrained_by_redaction = is_access_constrained_by_redaction + + @property + def is_access_constrained_by_real_application_security(self): + """ + Gets the is_access_constrained_by_real_application_security of this DatabaseTableAccessEntry. + Indicates whether the table access is constrained via Real Application Security. + + + :return: The is_access_constrained_by_real_application_security of this DatabaseTableAccessEntry. + :rtype: bool + """ + return self._is_access_constrained_by_real_application_security + + @is_access_constrained_by_real_application_security.setter + def is_access_constrained_by_real_application_security(self, is_access_constrained_by_real_application_security): + """ + Sets the is_access_constrained_by_real_application_security of this DatabaseTableAccessEntry. + Indicates whether the table access is constrained via Real Application Security. + + + :param is_access_constrained_by_real_application_security: The is_access_constrained_by_real_application_security of this DatabaseTableAccessEntry. + :type: bool + """ + self._is_access_constrained_by_real_application_security = is_access_constrained_by_real_application_security + + @property + def is_access_constrained_by_sql_firewall(self): + """ + Gets the is_access_constrained_by_sql_firewall of this DatabaseTableAccessEntry. + Indicates whether the table access is constrained via Oracle Database SQL Firewall. + + + :return: The is_access_constrained_by_sql_firewall of this DatabaseTableAccessEntry. + :rtype: bool + """ + return self._is_access_constrained_by_sql_firewall + + @is_access_constrained_by_sql_firewall.setter + def is_access_constrained_by_sql_firewall(self, is_access_constrained_by_sql_firewall): + """ + Sets the is_access_constrained_by_sql_firewall of this DatabaseTableAccessEntry. + Indicates whether the table access is constrained via Oracle Database SQL Firewall. + + + :param is_access_constrained_by_sql_firewall: The is_access_constrained_by_sql_firewall of this DatabaseTableAccessEntry. + :type: bool + """ + self._is_access_constrained_by_sql_firewall = is_access_constrained_by_sql_firewall + + @property + def is_sensitive(self): + """ + Gets the is_sensitive of this DatabaseTableAccessEntry. + Indicates whether the table is marked as sensitive. + + + :return: The is_sensitive of this DatabaseTableAccessEntry. + :rtype: bool + """ + return self._is_sensitive + + @is_sensitive.setter + def is_sensitive(self, is_sensitive): + """ + Sets the is_sensitive of this DatabaseTableAccessEntry. + Indicates whether the table is marked as sensitive. + + + :param is_sensitive: The is_sensitive of this DatabaseTableAccessEntry. + :type: bool + """ + self._is_sensitive = is_sensitive + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/database_table_access_entry_collection.py b/src/oci/data_safe/models/database_table_access_entry_collection.py new file mode 100644 index 0000000000..0bd7bebbd2 --- /dev/null +++ b/src/oci/data_safe/models/database_table_access_entry_collection.py @@ -0,0 +1,72 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20181201 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class DatabaseTableAccessEntryCollection(object): + """ + A collection of database table access summary objects. + """ + + def __init__(self, **kwargs): + """ + Initializes a new DatabaseTableAccessEntryCollection object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param items: + The value to assign to the items property of this DatabaseTableAccessEntryCollection. + :type items: list[oci.data_safe.models.DatabaseTableAccessEntrySummary] + + """ + self.swagger_types = { + 'items': 'list[DatabaseTableAccessEntrySummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this DatabaseTableAccessEntryCollection. + An array of database table access summary objects. + + + :return: The items of this DatabaseTableAccessEntryCollection. + :rtype: list[oci.data_safe.models.DatabaseTableAccessEntrySummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this DatabaseTableAccessEntryCollection. + An array of database table access summary objects. + + + :param items: The items of this DatabaseTableAccessEntryCollection. + :type: list[oci.data_safe.models.DatabaseTableAccessEntrySummary] + """ + self._items = items + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/database_table_access_entry_summary.py b/src/oci/data_safe/models/database_table_access_entry_summary.py new file mode 100644 index 0000000000..a8ecb225cf --- /dev/null +++ b/src/oci/data_safe/models/database_table_access_entry_summary.py @@ -0,0 +1,835 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20181201 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class DatabaseTableAccessEntrySummary(object): + """ + Summary of DatabaseTableAccessEntry Object. + """ + + #: A constant which can be used with the access_type property of a DatabaseTableAccessEntrySummary. + #: This constant has a value of "SELECT" + ACCESS_TYPE_SELECT = "SELECT" + + #: A constant which can be used with the access_type property of a DatabaseTableAccessEntrySummary. + #: This constant has a value of "UPDATE" + ACCESS_TYPE_UPDATE = "UPDATE" + + #: A constant which can be used with the access_type property of a DatabaseTableAccessEntrySummary. + #: This constant has a value of "INSERT" + ACCESS_TYPE_INSERT = "INSERT" + + #: A constant which can be used with the access_type property of a DatabaseTableAccessEntrySummary. + #: This constant has a value of "DELETE" + ACCESS_TYPE_DELETE = "DELETE" + + #: A constant which can be used with the access_type property of a DatabaseTableAccessEntrySummary. + #: This constant has a value of "OWNER" + ACCESS_TYPE_OWNER = "OWNER" + + #: A constant which can be used with the privilege property of a DatabaseTableAccessEntrySummary. + #: This constant has a value of "SELECT" + PRIVILEGE_SELECT = "SELECT" + + #: A constant which can be used with the privilege property of a DatabaseTableAccessEntrySummary. + #: This constant has a value of "UPDATE" + PRIVILEGE_UPDATE = "UPDATE" + + #: A constant which can be used with the privilege property of a DatabaseTableAccessEntrySummary. + #: This constant has a value of "INSERT" + PRIVILEGE_INSERT = "INSERT" + + #: A constant which can be used with the privilege property of a DatabaseTableAccessEntrySummary. + #: This constant has a value of "DELETE" + PRIVILEGE_DELETE = "DELETE" + + #: A constant which can be used with the privilege property of a DatabaseTableAccessEntrySummary. + #: This constant has a value of "READ" + PRIVILEGE_READ = "READ" + + #: A constant which can be used with the privilege property of a DatabaseTableAccessEntrySummary. + #: This constant has a value of "OWNER" + PRIVILEGE_OWNER = "OWNER" + + #: A constant which can be used with the privilege property of a DatabaseTableAccessEntrySummary. + #: This constant has a value of "INDEX" + PRIVILEGE_INDEX = "INDEX" + + #: A constant which can be used with the privilege property of a DatabaseTableAccessEntrySummary. + #: This constant has a value of "SELECT_ANY_TABLE" + PRIVILEGE_SELECT_ANY_TABLE = "SELECT_ANY_TABLE" + + #: A constant which can be used with the privilege property of a DatabaseTableAccessEntrySummary. + #: This constant has a value of "UPDATE_ANY_TABLE" + PRIVILEGE_UPDATE_ANY_TABLE = "UPDATE_ANY_TABLE" + + #: A constant which can be used with the privilege property of a DatabaseTableAccessEntrySummary. + #: This constant has a value of "INSERT_ANY_TABLE" + PRIVILEGE_INSERT_ANY_TABLE = "INSERT_ANY_TABLE" + + #: A constant which can be used with the privilege property of a DatabaseTableAccessEntrySummary. + #: This constant has a value of "DELETE_ANY_TABLE" + PRIVILEGE_DELETE_ANY_TABLE = "DELETE_ANY_TABLE" + + #: A constant which can be used with the privilege property of a DatabaseTableAccessEntrySummary. + #: This constant has a value of "READ_ANY_TABLE" + PRIVILEGE_READ_ANY_TABLE = "READ_ANY_TABLE" + + #: A constant which can be used with the privilege property of a DatabaseTableAccessEntrySummary. + #: This constant has a value of "CREATE_ANY_INDEX" + PRIVILEGE_CREATE_ANY_INDEX = "CREATE_ANY_INDEX" + + #: A constant which can be used with the privilege_grantable property of a DatabaseTableAccessEntrySummary. + #: This constant has a value of "ADMIN_OPTION" + PRIVILEGE_GRANTABLE_ADMIN_OPTION = "ADMIN_OPTION" + + #: A constant which can be used with the privilege_grantable property of a DatabaseTableAccessEntrySummary. + #: This constant has a value of "GRANT_OPTION" + PRIVILEGE_GRANTABLE_GRANT_OPTION = "GRANT_OPTION" + + def __init__(self, **kwargs): + """ + Initializes a new DatabaseTableAccessEntrySummary object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param key: + The value to assign to the key property of this DatabaseTableAccessEntrySummary. + :type key: str + + :param grantee: + The value to assign to the grantee property of this DatabaseTableAccessEntrySummary. + :type grantee: str + + :param grant_from_role: + The value to assign to the grant_from_role property of this DatabaseTableAccessEntrySummary. + :type grant_from_role: str + + :param access_type: + The value to assign to the access_type property of this DatabaseTableAccessEntrySummary. + Allowed values for this property are: "SELECT", "UPDATE", "INSERT", "DELETE", "OWNER", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type access_type: str + + :param table_schema: + The value to assign to the table_schema property of this DatabaseTableAccessEntrySummary. + :type table_schema: str + + :param table_name: + The value to assign to the table_name property of this DatabaseTableAccessEntrySummary. + :type table_name: str + + :param privilege_type: + The value to assign to the privilege_type property of this DatabaseTableAccessEntrySummary. + :type privilege_type: str + + :param target_id: + The value to assign to the target_id property of this DatabaseTableAccessEntrySummary. + :type target_id: str + + :param access_through_object: + The value to assign to the access_through_object property of this DatabaseTableAccessEntrySummary. + :type access_through_object: str + + :param privilege: + The value to assign to the privilege property of this DatabaseTableAccessEntrySummary. + Allowed values for this property are: "SELECT", "UPDATE", "INSERT", "DELETE", "READ", "OWNER", "INDEX", "SELECT_ANY_TABLE", "UPDATE_ANY_TABLE", "INSERT_ANY_TABLE", "DELETE_ANY_TABLE", "READ_ANY_TABLE", "CREATE_ANY_INDEX", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type privilege: str + + :param privilege_grantable: + The value to assign to the privilege_grantable property of this DatabaseTableAccessEntrySummary. + Allowed values for this property are: "ADMIN_OPTION", "GRANT_OPTION", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type privilege_grantable: str + + :param column_name: + The value to assign to the column_name property of this DatabaseTableAccessEntrySummary. + :type column_name: str + + :param grantor: + The value to assign to the grantor property of this DatabaseTableAccessEntrySummary. + :type grantor: str + + :param are_all_tables_accessible: + The value to assign to the are_all_tables_accessible property of this DatabaseTableAccessEntrySummary. + :type are_all_tables_accessible: bool + + :param is_access_constrained_by_view: + The value to assign to the is_access_constrained_by_view property of this DatabaseTableAccessEntrySummary. + :type is_access_constrained_by_view: bool + + :param is_access_constrained_by_label_security: + The value to assign to the is_access_constrained_by_label_security property of this DatabaseTableAccessEntrySummary. + :type is_access_constrained_by_label_security: bool + + :param is_access_constrained_by_database_vault: + The value to assign to the is_access_constrained_by_database_vault property of this DatabaseTableAccessEntrySummary. + :type is_access_constrained_by_database_vault: bool + + :param is_access_constrained_by_virtual_private_database: + The value to assign to the is_access_constrained_by_virtual_private_database property of this DatabaseTableAccessEntrySummary. + :type is_access_constrained_by_virtual_private_database: bool + + :param is_access_constrained_by_redaction: + The value to assign to the is_access_constrained_by_redaction property of this DatabaseTableAccessEntrySummary. + :type is_access_constrained_by_redaction: bool + + :param is_access_constrained_by_real_application_security: + The value to assign to the is_access_constrained_by_real_application_security property of this DatabaseTableAccessEntrySummary. + :type is_access_constrained_by_real_application_security: bool + + :param is_access_constrained_by_sql_firewall: + The value to assign to the is_access_constrained_by_sql_firewall property of this DatabaseTableAccessEntrySummary. + :type is_access_constrained_by_sql_firewall: bool + + :param is_sensitive: + The value to assign to the is_sensitive property of this DatabaseTableAccessEntrySummary. + :type is_sensitive: bool + + """ + self.swagger_types = { + 'key': 'str', + 'grantee': 'str', + 'grant_from_role': 'str', + 'access_type': 'str', + 'table_schema': 'str', + 'table_name': 'str', + 'privilege_type': 'str', + 'target_id': 'str', + 'access_through_object': 'str', + 'privilege': 'str', + 'privilege_grantable': 'str', + 'column_name': 'str', + 'grantor': 'str', + 'are_all_tables_accessible': 'bool', + 'is_access_constrained_by_view': 'bool', + 'is_access_constrained_by_label_security': 'bool', + 'is_access_constrained_by_database_vault': 'bool', + 'is_access_constrained_by_virtual_private_database': 'bool', + 'is_access_constrained_by_redaction': 'bool', + 'is_access_constrained_by_real_application_security': 'bool', + 'is_access_constrained_by_sql_firewall': 'bool', + 'is_sensitive': 'bool' + } + + self.attribute_map = { + 'key': 'key', + 'grantee': 'grantee', + 'grant_from_role': 'grantFromRole', + 'access_type': 'accessType', + 'table_schema': 'tableSchema', + 'table_name': 'tableName', + 'privilege_type': 'privilegeType', + 'target_id': 'targetId', + 'access_through_object': 'accessThroughObject', + 'privilege': 'privilege', + 'privilege_grantable': 'privilegeGrantable', + 'column_name': 'columnName', + 'grantor': 'grantor', + 'are_all_tables_accessible': 'areAllTablesAccessible', + 'is_access_constrained_by_view': 'isAccessConstrainedByView', + 'is_access_constrained_by_label_security': 'isAccessConstrainedByLabelSecurity', + 'is_access_constrained_by_database_vault': 'isAccessConstrainedByDatabaseVault', + 'is_access_constrained_by_virtual_private_database': 'isAccessConstrainedByVirtualPrivateDatabase', + 'is_access_constrained_by_redaction': 'isAccessConstrainedByRedaction', + 'is_access_constrained_by_real_application_security': 'isAccessConstrainedByRealApplicationSecurity', + 'is_access_constrained_by_sql_firewall': 'isAccessConstrainedBySqlFirewall', + 'is_sensitive': 'isSensitive' + } + + self._key = None + self._grantee = None + self._grant_from_role = None + self._access_type = None + self._table_schema = None + self._table_name = None + self._privilege_type = None + self._target_id = None + self._access_through_object = None + self._privilege = None + self._privilege_grantable = None + self._column_name = None + self._grantor = None + self._are_all_tables_accessible = None + self._is_access_constrained_by_view = None + self._is_access_constrained_by_label_security = None + self._is_access_constrained_by_database_vault = None + self._is_access_constrained_by_virtual_private_database = None + self._is_access_constrained_by_redaction = None + self._is_access_constrained_by_real_application_security = None + self._is_access_constrained_by_sql_firewall = None + self._is_sensitive = None + + @property + def key(self): + """ + **[Required]** Gets the key of this DatabaseTableAccessEntrySummary. + The unique key that identifies the table access report. It is numeric and unique within a security policy report. + + + :return: The key of this DatabaseTableAccessEntrySummary. + :rtype: str + """ + return self._key + + @key.setter + def key(self, key): + """ + Sets the key of this DatabaseTableAccessEntrySummary. + The unique key that identifies the table access report. It is numeric and unique within a security policy report. + + + :param key: The key of this DatabaseTableAccessEntrySummary. + :type: str + """ + self._key = key + + @property + def grantee(self): + """ + Gets the grantee of this DatabaseTableAccessEntrySummary. + Grantee is the user who can access the table + + + :return: The grantee of this DatabaseTableAccessEntrySummary. + :rtype: str + """ + return self._grantee + + @grantee.setter + def grantee(self, grantee): + """ + Sets the grantee of this DatabaseTableAccessEntrySummary. + Grantee is the user who can access the table + + + :param grantee: The grantee of this DatabaseTableAccessEntrySummary. + :type: str + """ + self._grantee = grantee + + @property + def grant_from_role(self): + """ + Gets the grant_from_role of this DatabaseTableAccessEntrySummary. + This can be empty in case of direct grant, in case of indirect grant, this attribute displays the name of the + role which is granted to the user though which the user has access to the table. + + + :return: The grant_from_role of this DatabaseTableAccessEntrySummary. + :rtype: str + """ + return self._grant_from_role + + @grant_from_role.setter + def grant_from_role(self, grant_from_role): + """ + Sets the grant_from_role of this DatabaseTableAccessEntrySummary. + This can be empty in case of direct grant, in case of indirect grant, this attribute displays the name of the + role which is granted to the user though which the user has access to the table. + + + :param grant_from_role: The grant_from_role of this DatabaseTableAccessEntrySummary. + :type: str + """ + self._grant_from_role = grant_from_role + + @property + def access_type(self): + """ + Gets the access_type of this DatabaseTableAccessEntrySummary. + The type of the access the user has on the table, there can be one or more from SELECT, UPDATE, INSERT, OWNER or DELETE. + + Allowed values for this property are: "SELECT", "UPDATE", "INSERT", "DELETE", "OWNER", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The access_type of this DatabaseTableAccessEntrySummary. + :rtype: str + """ + return self._access_type + + @access_type.setter + def access_type(self, access_type): + """ + Sets the access_type of this DatabaseTableAccessEntrySummary. + The type of the access the user has on the table, there can be one or more from SELECT, UPDATE, INSERT, OWNER or DELETE. + + + :param access_type: The access_type of this DatabaseTableAccessEntrySummary. + :type: str + """ + allowed_values = ["SELECT", "UPDATE", "INSERT", "DELETE", "OWNER"] + if not value_allowed_none_or_none_sentinel(access_type, allowed_values): + access_type = 'UNKNOWN_ENUM_VALUE' + self._access_type = access_type + + @property + def table_schema(self): + """ + Gets the table_schema of this DatabaseTableAccessEntrySummary. + Name of the schema the table belongs to. + + + :return: The table_schema of this DatabaseTableAccessEntrySummary. + :rtype: str + """ + return self._table_schema + + @table_schema.setter + def table_schema(self, table_schema): + """ + Sets the table_schema of this DatabaseTableAccessEntrySummary. + Name of the schema the table belongs to. + + + :param table_schema: The table_schema of this DatabaseTableAccessEntrySummary. + :type: str + """ + self._table_schema = table_schema + + @property + def table_name(self): + """ + Gets the table_name of this DatabaseTableAccessEntrySummary. + Name of the database table the user has access to. + + + :return: The table_name of this DatabaseTableAccessEntrySummary. + :rtype: str + """ + return self._table_name + + @table_name.setter + def table_name(self, table_name): + """ + Sets the table_name of this DatabaseTableAccessEntrySummary. + Name of the database table the user has access to. + + + :param table_name: The table_name of this DatabaseTableAccessEntrySummary. + :type: str + """ + self._table_name = table_name + + @property + def privilege_type(self): + """ + Gets the privilege_type of this DatabaseTableAccessEntrySummary. + Type of the privilege user has, this includes System Privilege, Schema Privilege, Object Privilege, Column Privilege, + Owner or Schema Privilege on a schema. + + + :return: The privilege_type of this DatabaseTableAccessEntrySummary. + :rtype: str + """ + return self._privilege_type + + @privilege_type.setter + def privilege_type(self, privilege_type): + """ + Sets the privilege_type of this DatabaseTableAccessEntrySummary. + Type of the privilege user has, this includes System Privilege, Schema Privilege, Object Privilege, Column Privilege, + Owner or Schema Privilege on a schema. + + + :param privilege_type: The privilege_type of this DatabaseTableAccessEntrySummary. + :type: str + """ + self._privilege_type = privilege_type + + @property + def target_id(self): + """ + Gets the target_id of this DatabaseTableAccessEntrySummary. + The OCID of the of the target database. + + + :return: The target_id of this DatabaseTableAccessEntrySummary. + :rtype: str + """ + return self._target_id + + @target_id.setter + def target_id(self, target_id): + """ + Sets the target_id of this DatabaseTableAccessEntrySummary. + The OCID of the of the target database. + + + :param target_id: The target_id of this DatabaseTableAccessEntrySummary. + :type: str + """ + self._target_id = target_id + + @property + def access_through_object(self): + """ + Gets the access_through_object of this DatabaseTableAccessEntrySummary. + A non-null value in this field indicates the object through which user has access to table, possible values could + be table or view. + + + :return: The access_through_object of this DatabaseTableAccessEntrySummary. + :rtype: str + """ + return self._access_through_object + + @access_through_object.setter + def access_through_object(self, access_through_object): + """ + Sets the access_through_object of this DatabaseTableAccessEntrySummary. + A non-null value in this field indicates the object through which user has access to table, possible values could + be table or view. + + + :param access_through_object: The access_through_object of this DatabaseTableAccessEntrySummary. + :type: str + """ + self._access_through_object = access_through_object + + @property + def privilege(self): + """ + Gets the privilege of this DatabaseTableAccessEntrySummary. + Name of the privilege. + + Allowed values for this property are: "SELECT", "UPDATE", "INSERT", "DELETE", "READ", "OWNER", "INDEX", "SELECT_ANY_TABLE", "UPDATE_ANY_TABLE", "INSERT_ANY_TABLE", "DELETE_ANY_TABLE", "READ_ANY_TABLE", "CREATE_ANY_INDEX", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The privilege of this DatabaseTableAccessEntrySummary. + :rtype: str + """ + return self._privilege + + @privilege.setter + def privilege(self, privilege): + """ + Sets the privilege of this DatabaseTableAccessEntrySummary. + Name of the privilege. + + + :param privilege: The privilege of this DatabaseTableAccessEntrySummary. + :type: str + """ + allowed_values = ["SELECT", "UPDATE", "INSERT", "DELETE", "READ", "OWNER", "INDEX", "SELECT_ANY_TABLE", "UPDATE_ANY_TABLE", "INSERT_ANY_TABLE", "DELETE_ANY_TABLE", "READ_ANY_TABLE", "CREATE_ANY_INDEX"] + if not value_allowed_none_or_none_sentinel(privilege, allowed_values): + privilege = 'UNKNOWN_ENUM_VALUE' + self._privilege = privilege + + @property + def privilege_grantable(self): + """ + Gets the privilege_grantable of this DatabaseTableAccessEntrySummary. + Whether grantee can grant this privilege to other users. Privileges can be granted to a user or role with + GRANT_OPTION or ADMIN_OPTION + + Allowed values for this property are: "ADMIN_OPTION", "GRANT_OPTION", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The privilege_grantable of this DatabaseTableAccessEntrySummary. + :rtype: str + """ + return self._privilege_grantable + + @privilege_grantable.setter + def privilege_grantable(self, privilege_grantable): + """ + Sets the privilege_grantable of this DatabaseTableAccessEntrySummary. + Whether grantee can grant this privilege to other users. Privileges can be granted to a user or role with + GRANT_OPTION or ADMIN_OPTION + + + :param privilege_grantable: The privilege_grantable of this DatabaseTableAccessEntrySummary. + :type: str + """ + allowed_values = ["ADMIN_OPTION", "GRANT_OPTION"] + if not value_allowed_none_or_none_sentinel(privilege_grantable, allowed_values): + privilege_grantable = 'UNKNOWN_ENUM_VALUE' + self._privilege_grantable = privilege_grantable + + @property + def column_name(self): + """ + Gets the column_name of this DatabaseTableAccessEntrySummary. + If there are column level privileges on a table or view. + + + :return: The column_name of this DatabaseTableAccessEntrySummary. + :rtype: str + """ + return self._column_name + + @column_name.setter + def column_name(self, column_name): + """ + Sets the column_name of this DatabaseTableAccessEntrySummary. + If there are column level privileges on a table or view. + + + :param column_name: The column_name of this DatabaseTableAccessEntrySummary. + :type: str + """ + self._column_name = column_name + + @property + def grantor(self): + """ + Gets the grantor of this DatabaseTableAccessEntrySummary. + The one who granted this privilege. + + + :return: The grantor of this DatabaseTableAccessEntrySummary. + :rtype: str + """ + return self._grantor + + @grantor.setter + def grantor(self, grantor): + """ + Sets the grantor of this DatabaseTableAccessEntrySummary. + The one who granted this privilege. + + + :param grantor: The grantor of this DatabaseTableAccessEntrySummary. + :type: str + """ + self._grantor = grantor + + @property + def are_all_tables_accessible(self): + """ + Gets the are_all_tables_accessible of this DatabaseTableAccessEntrySummary. + Indicates whether the user has access to all the tables in the schema. + + + :return: The are_all_tables_accessible of this DatabaseTableAccessEntrySummary. + :rtype: bool + """ + return self._are_all_tables_accessible + + @are_all_tables_accessible.setter + def are_all_tables_accessible(self, are_all_tables_accessible): + """ + Sets the are_all_tables_accessible of this DatabaseTableAccessEntrySummary. + Indicates whether the user has access to all the tables in the schema. + + + :param are_all_tables_accessible: The are_all_tables_accessible of this DatabaseTableAccessEntrySummary. + :type: bool + """ + self._are_all_tables_accessible = are_all_tables_accessible + + @property + def is_access_constrained_by_view(self): + """ + Gets the is_access_constrained_by_view of this DatabaseTableAccessEntrySummary. + Indicates whether the access is constrained on a table via a view. + + + :return: The is_access_constrained_by_view of this DatabaseTableAccessEntrySummary. + :rtype: bool + """ + return self._is_access_constrained_by_view + + @is_access_constrained_by_view.setter + def is_access_constrained_by_view(self, is_access_constrained_by_view): + """ + Sets the is_access_constrained_by_view of this DatabaseTableAccessEntrySummary. + Indicates whether the access is constrained on a table via a view. + + + :param is_access_constrained_by_view: The is_access_constrained_by_view of this DatabaseTableAccessEntrySummary. + :type: bool + """ + self._is_access_constrained_by_view = is_access_constrained_by_view + + @property + def is_access_constrained_by_label_security(self): + """ + Gets the is_access_constrained_by_label_security of this DatabaseTableAccessEntrySummary. + Indicates whether the table access is constrained via Oracle Label Security. + + + :return: The is_access_constrained_by_label_security of this DatabaseTableAccessEntrySummary. + :rtype: bool + """ + return self._is_access_constrained_by_label_security + + @is_access_constrained_by_label_security.setter + def is_access_constrained_by_label_security(self, is_access_constrained_by_label_security): + """ + Sets the is_access_constrained_by_label_security of this DatabaseTableAccessEntrySummary. + Indicates whether the table access is constrained via Oracle Label Security. + + + :param is_access_constrained_by_label_security: The is_access_constrained_by_label_security of this DatabaseTableAccessEntrySummary. + :type: bool + """ + self._is_access_constrained_by_label_security = is_access_constrained_by_label_security + + @property + def is_access_constrained_by_database_vault(self): + """ + Gets the is_access_constrained_by_database_vault of this DatabaseTableAccessEntrySummary. + Indicates whether the table access is constrained via Oracle Database Vault. + + + :return: The is_access_constrained_by_database_vault of this DatabaseTableAccessEntrySummary. + :rtype: bool + """ + return self._is_access_constrained_by_database_vault + + @is_access_constrained_by_database_vault.setter + def is_access_constrained_by_database_vault(self, is_access_constrained_by_database_vault): + """ + Sets the is_access_constrained_by_database_vault of this DatabaseTableAccessEntrySummary. + Indicates whether the table access is constrained via Oracle Database Vault. + + + :param is_access_constrained_by_database_vault: The is_access_constrained_by_database_vault of this DatabaseTableAccessEntrySummary. + :type: bool + """ + self._is_access_constrained_by_database_vault = is_access_constrained_by_database_vault + + @property + def is_access_constrained_by_virtual_private_database(self): + """ + Gets the is_access_constrained_by_virtual_private_database of this DatabaseTableAccessEntrySummary. + Indicates whether the table access is constrained via Virtual Private Database. + + + :return: The is_access_constrained_by_virtual_private_database of this DatabaseTableAccessEntrySummary. + :rtype: bool + """ + return self._is_access_constrained_by_virtual_private_database + + @is_access_constrained_by_virtual_private_database.setter + def is_access_constrained_by_virtual_private_database(self, is_access_constrained_by_virtual_private_database): + """ + Sets the is_access_constrained_by_virtual_private_database of this DatabaseTableAccessEntrySummary. + Indicates whether the table access is constrained via Virtual Private Database. + + + :param is_access_constrained_by_virtual_private_database: The is_access_constrained_by_virtual_private_database of this DatabaseTableAccessEntrySummary. + :type: bool + """ + self._is_access_constrained_by_virtual_private_database = is_access_constrained_by_virtual_private_database + + @property + def is_access_constrained_by_redaction(self): + """ + Gets the is_access_constrained_by_redaction of this DatabaseTableAccessEntrySummary. + Indicates whether the table access is constrained via Oracle Data Redaction. + + + :return: The is_access_constrained_by_redaction of this DatabaseTableAccessEntrySummary. + :rtype: bool + """ + return self._is_access_constrained_by_redaction + + @is_access_constrained_by_redaction.setter + def is_access_constrained_by_redaction(self, is_access_constrained_by_redaction): + """ + Sets the is_access_constrained_by_redaction of this DatabaseTableAccessEntrySummary. + Indicates whether the table access is constrained via Oracle Data Redaction. + + + :param is_access_constrained_by_redaction: The is_access_constrained_by_redaction of this DatabaseTableAccessEntrySummary. + :type: bool + """ + self._is_access_constrained_by_redaction = is_access_constrained_by_redaction + + @property + def is_access_constrained_by_real_application_security(self): + """ + Gets the is_access_constrained_by_real_application_security of this DatabaseTableAccessEntrySummary. + Indicates whether the table access is constrained via Real Application Security. + + + :return: The is_access_constrained_by_real_application_security of this DatabaseTableAccessEntrySummary. + :rtype: bool + """ + return self._is_access_constrained_by_real_application_security + + @is_access_constrained_by_real_application_security.setter + def is_access_constrained_by_real_application_security(self, is_access_constrained_by_real_application_security): + """ + Sets the is_access_constrained_by_real_application_security of this DatabaseTableAccessEntrySummary. + Indicates whether the table access is constrained via Real Application Security. + + + :param is_access_constrained_by_real_application_security: The is_access_constrained_by_real_application_security of this DatabaseTableAccessEntrySummary. + :type: bool + """ + self._is_access_constrained_by_real_application_security = is_access_constrained_by_real_application_security + + @property + def is_access_constrained_by_sql_firewall(self): + """ + Gets the is_access_constrained_by_sql_firewall of this DatabaseTableAccessEntrySummary. + Indicates whether the table access is constrained via Oracle Database SQL Firewall. + + + :return: The is_access_constrained_by_sql_firewall of this DatabaseTableAccessEntrySummary. + :rtype: bool + """ + return self._is_access_constrained_by_sql_firewall + + @is_access_constrained_by_sql_firewall.setter + def is_access_constrained_by_sql_firewall(self, is_access_constrained_by_sql_firewall): + """ + Sets the is_access_constrained_by_sql_firewall of this DatabaseTableAccessEntrySummary. + Indicates whether the table access is constrained via Oracle Database SQL Firewall. + + + :param is_access_constrained_by_sql_firewall: The is_access_constrained_by_sql_firewall of this DatabaseTableAccessEntrySummary. + :type: bool + """ + self._is_access_constrained_by_sql_firewall = is_access_constrained_by_sql_firewall + + @property + def is_sensitive(self): + """ + Gets the is_sensitive of this DatabaseTableAccessEntrySummary. + Indicates whether the table is marked as sensitive. + + + :return: The is_sensitive of this DatabaseTableAccessEntrySummary. + :rtype: bool + """ + return self._is_sensitive + + @is_sensitive.setter + def is_sensitive(self, is_sensitive): + """ + Sets the is_sensitive of this DatabaseTableAccessEntrySummary. + Indicates whether the table is marked as sensitive. + + + :param is_sensitive: The is_sensitive of this DatabaseTableAccessEntrySummary. + :type: bool + """ + self._is_sensitive = is_sensitive + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/database_view_access_entry.py b/src/oci/data_safe/models/database_view_access_entry.py new file mode 100644 index 0000000000..9f881ba2fc --- /dev/null +++ b/src/oci/data_safe/models/database_view_access_entry.py @@ -0,0 +1,772 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20181201 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class DatabaseViewAccessEntry(object): + """ + A DatabaseViewAccessEntry object is a resource corresponding to a row in view authorization report. + It's a subresource of Security Policy Report resource and is always associated with a SecurityPolicyReport. + """ + + #: A constant which can be used with the access_type property of a DatabaseViewAccessEntry. + #: This constant has a value of "SELECT" + ACCESS_TYPE_SELECT = "SELECT" + + #: A constant which can be used with the access_type property of a DatabaseViewAccessEntry. + #: This constant has a value of "UPDATE" + ACCESS_TYPE_UPDATE = "UPDATE" + + #: A constant which can be used with the access_type property of a DatabaseViewAccessEntry. + #: This constant has a value of "INSERT" + ACCESS_TYPE_INSERT = "INSERT" + + #: A constant which can be used with the access_type property of a DatabaseViewAccessEntry. + #: This constant has a value of "DELETE" + ACCESS_TYPE_DELETE = "DELETE" + + #: A constant which can be used with the access_type property of a DatabaseViewAccessEntry. + #: This constant has a value of "OWNER" + ACCESS_TYPE_OWNER = "OWNER" + + #: A constant which can be used with the privilege property of a DatabaseViewAccessEntry. + #: This constant has a value of "SELECT" + PRIVILEGE_SELECT = "SELECT" + + #: A constant which can be used with the privilege property of a DatabaseViewAccessEntry. + #: This constant has a value of "UPDATE" + PRIVILEGE_UPDATE = "UPDATE" + + #: A constant which can be used with the privilege property of a DatabaseViewAccessEntry. + #: This constant has a value of "INSERT" + PRIVILEGE_INSERT = "INSERT" + + #: A constant which can be used with the privilege property of a DatabaseViewAccessEntry. + #: This constant has a value of "DELETE" + PRIVILEGE_DELETE = "DELETE" + + #: A constant which can be used with the privilege property of a DatabaseViewAccessEntry. + #: This constant has a value of "READ" + PRIVILEGE_READ = "READ" + + #: A constant which can be used with the privilege property of a DatabaseViewAccessEntry. + #: This constant has a value of "OWNER" + PRIVILEGE_OWNER = "OWNER" + + #: A constant which can be used with the privilege property of a DatabaseViewAccessEntry. + #: This constant has a value of "INDEX" + PRIVILEGE_INDEX = "INDEX" + + #: A constant which can be used with the privilege property of a DatabaseViewAccessEntry. + #: This constant has a value of "SELECT_ANY_TABLE" + PRIVILEGE_SELECT_ANY_TABLE = "SELECT_ANY_TABLE" + + #: A constant which can be used with the privilege property of a DatabaseViewAccessEntry. + #: This constant has a value of "UPDATE_ANY_TABLE" + PRIVILEGE_UPDATE_ANY_TABLE = "UPDATE_ANY_TABLE" + + #: A constant which can be used with the privilege property of a DatabaseViewAccessEntry. + #: This constant has a value of "INSERT_ANY_TABLE" + PRIVILEGE_INSERT_ANY_TABLE = "INSERT_ANY_TABLE" + + #: A constant which can be used with the privilege property of a DatabaseViewAccessEntry. + #: This constant has a value of "DELETE_ANY_TABLE" + PRIVILEGE_DELETE_ANY_TABLE = "DELETE_ANY_TABLE" + + #: A constant which can be used with the privilege property of a DatabaseViewAccessEntry. + #: This constant has a value of "READ_ANY_TABLE" + PRIVILEGE_READ_ANY_TABLE = "READ_ANY_TABLE" + + #: A constant which can be used with the privilege property of a DatabaseViewAccessEntry. + #: This constant has a value of "CREATE_ANY_INDEX" + PRIVILEGE_CREATE_ANY_INDEX = "CREATE_ANY_INDEX" + + #: A constant which can be used with the privilege_grantable property of a DatabaseViewAccessEntry. + #: This constant has a value of "ADMIN_OPTION" + PRIVILEGE_GRANTABLE_ADMIN_OPTION = "ADMIN_OPTION" + + #: A constant which can be used with the privilege_grantable property of a DatabaseViewAccessEntry. + #: This constant has a value of "GRANT_OPTION" + PRIVILEGE_GRANTABLE_GRANT_OPTION = "GRANT_OPTION" + + def __init__(self, **kwargs): + """ + Initializes a new DatabaseViewAccessEntry object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param key: + The value to assign to the key property of this DatabaseViewAccessEntry. + :type key: str + + :param grantee: + The value to assign to the grantee property of this DatabaseViewAccessEntry. + :type grantee: str + + :param access_type: + The value to assign to the access_type property of this DatabaseViewAccessEntry. + Allowed values for this property are: "SELECT", "UPDATE", "INSERT", "DELETE", "OWNER", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type access_type: str + + :param table_schema: + The value to assign to the table_schema property of this DatabaseViewAccessEntry. + :type table_schema: str + + :param table_name: + The value to assign to the table_name property of this DatabaseViewAccessEntry. + :type table_name: str + + :param privilege_type: + The value to assign to the privilege_type property of this DatabaseViewAccessEntry. + :type privilege_type: str + + :param target_id: + The value to assign to the target_id property of this DatabaseViewAccessEntry. + :type target_id: str + + :param privilege: + The value to assign to the privilege property of this DatabaseViewAccessEntry. + Allowed values for this property are: "SELECT", "UPDATE", "INSERT", "DELETE", "READ", "OWNER", "INDEX", "SELECT_ANY_TABLE", "UPDATE_ANY_TABLE", "INSERT_ANY_TABLE", "DELETE_ANY_TABLE", "READ_ANY_TABLE", "CREATE_ANY_INDEX", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type privilege: str + + :param privilege_grantable: + The value to assign to the privilege_grantable property of this DatabaseViewAccessEntry. + Allowed values for this property are: "ADMIN_OPTION", "GRANT_OPTION", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type privilege_grantable: str + + :param grant_from_role: + The value to assign to the grant_from_role property of this DatabaseViewAccessEntry. + :type grant_from_role: str + + :param view_schema: + The value to assign to the view_schema property of this DatabaseViewAccessEntry. + :type view_schema: str + + :param view_name: + The value to assign to the view_name property of this DatabaseViewAccessEntry. + :type view_name: str + + :param view_text: + The value to assign to the view_text property of this DatabaseViewAccessEntry. + :type view_text: str + + :param column_name: + The value to assign to the column_name property of this DatabaseViewAccessEntry. + :type column_name: str + + :param grantor: + The value to assign to the grantor property of this DatabaseViewAccessEntry. + :type grantor: str + + :param is_access_constrained_by_database_vault: + The value to assign to the is_access_constrained_by_database_vault property of this DatabaseViewAccessEntry. + :type is_access_constrained_by_database_vault: bool + + :param is_access_constrained_by_virtual_private_database: + The value to assign to the is_access_constrained_by_virtual_private_database property of this DatabaseViewAccessEntry. + :type is_access_constrained_by_virtual_private_database: bool + + :param is_access_constrained_by_redaction: + The value to assign to the is_access_constrained_by_redaction property of this DatabaseViewAccessEntry. + :type is_access_constrained_by_redaction: bool + + :param is_access_constrained_by_real_application_security: + The value to assign to the is_access_constrained_by_real_application_security property of this DatabaseViewAccessEntry. + :type is_access_constrained_by_real_application_security: bool + + :param is_access_constrained_by_sql_firewall: + The value to assign to the is_access_constrained_by_sql_firewall property of this DatabaseViewAccessEntry. + :type is_access_constrained_by_sql_firewall: bool + + """ + self.swagger_types = { + 'key': 'str', + 'grantee': 'str', + 'access_type': 'str', + 'table_schema': 'str', + 'table_name': 'str', + 'privilege_type': 'str', + 'target_id': 'str', + 'privilege': 'str', + 'privilege_grantable': 'str', + 'grant_from_role': 'str', + 'view_schema': 'str', + 'view_name': 'str', + 'view_text': 'str', + 'column_name': 'str', + 'grantor': 'str', + 'is_access_constrained_by_database_vault': 'bool', + 'is_access_constrained_by_virtual_private_database': 'bool', + 'is_access_constrained_by_redaction': 'bool', + 'is_access_constrained_by_real_application_security': 'bool', + 'is_access_constrained_by_sql_firewall': 'bool' + } + + self.attribute_map = { + 'key': 'key', + 'grantee': 'grantee', + 'access_type': 'accessType', + 'table_schema': 'tableSchema', + 'table_name': 'tableName', + 'privilege_type': 'privilegeType', + 'target_id': 'targetId', + 'privilege': 'privilege', + 'privilege_grantable': 'privilegeGrantable', + 'grant_from_role': 'grantFromRole', + 'view_schema': 'viewSchema', + 'view_name': 'viewName', + 'view_text': 'viewText', + 'column_name': 'columnName', + 'grantor': 'grantor', + 'is_access_constrained_by_database_vault': 'isAccessConstrainedByDatabaseVault', + 'is_access_constrained_by_virtual_private_database': 'isAccessConstrainedByVirtualPrivateDatabase', + 'is_access_constrained_by_redaction': 'isAccessConstrainedByRedaction', + 'is_access_constrained_by_real_application_security': 'isAccessConstrainedByRealApplicationSecurity', + 'is_access_constrained_by_sql_firewall': 'isAccessConstrainedBySqlFirewall' + } + + self._key = None + self._grantee = None + self._access_type = None + self._table_schema = None + self._table_name = None + self._privilege_type = None + self._target_id = None + self._privilege = None + self._privilege_grantable = None + self._grant_from_role = None + self._view_schema = None + self._view_name = None + self._view_text = None + self._column_name = None + self._grantor = None + self._is_access_constrained_by_database_vault = None + self._is_access_constrained_by_virtual_private_database = None + self._is_access_constrained_by_redaction = None + self._is_access_constrained_by_real_application_security = None + self._is_access_constrained_by_sql_firewall = None + + @property + def key(self): + """ + **[Required]** Gets the key of this DatabaseViewAccessEntry. + The unique key that identifies the table access report. It is numeric and unique within a security policy report. + + + :return: The key of this DatabaseViewAccessEntry. + :rtype: str + """ + return self._key + + @key.setter + def key(self, key): + """ + Sets the key of this DatabaseViewAccessEntry. + The unique key that identifies the table access report. It is numeric and unique within a security policy report. + + + :param key: The key of this DatabaseViewAccessEntry. + :type: str + """ + self._key = key + + @property + def grantee(self): + """ + **[Required]** Gets the grantee of this DatabaseViewAccessEntry. + Grantee is the user who can access the table or view + + + :return: The grantee of this DatabaseViewAccessEntry. + :rtype: str + """ + return self._grantee + + @grantee.setter + def grantee(self, grantee): + """ + Sets the grantee of this DatabaseViewAccessEntry. + Grantee is the user who can access the table or view + + + :param grantee: The grantee of this DatabaseViewAccessEntry. + :type: str + """ + self._grantee = grantee + + @property + def access_type(self): + """ + Gets the access_type of this DatabaseViewAccessEntry. + The type of the access the user has on the table, there can be one or more from SELECT, UPDATE, INSERT or DELETE. + + Allowed values for this property are: "SELECT", "UPDATE", "INSERT", "DELETE", "OWNER", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The access_type of this DatabaseViewAccessEntry. + :rtype: str + """ + return self._access_type + + @access_type.setter + def access_type(self, access_type): + """ + Sets the access_type of this DatabaseViewAccessEntry. + The type of the access the user has on the table, there can be one or more from SELECT, UPDATE, INSERT or DELETE. + + + :param access_type: The access_type of this DatabaseViewAccessEntry. + :type: str + """ + allowed_values = ["SELECT", "UPDATE", "INSERT", "DELETE", "OWNER"] + if not value_allowed_none_or_none_sentinel(access_type, allowed_values): + access_type = 'UNKNOWN_ENUM_VALUE' + self._access_type = access_type + + @property + def table_schema(self): + """ + Gets the table_schema of this DatabaseViewAccessEntry. + The name of the schema the table belongs to. + + + :return: The table_schema of this DatabaseViewAccessEntry. + :rtype: str + """ + return self._table_schema + + @table_schema.setter + def table_schema(self, table_schema): + """ + Sets the table_schema of this DatabaseViewAccessEntry. + The name of the schema the table belongs to. + + + :param table_schema: The table_schema of this DatabaseViewAccessEntry. + :type: str + """ + self._table_schema = table_schema + + @property + def table_name(self): + """ + Gets the table_name of this DatabaseViewAccessEntry. + The name of the database table the user has access to. + + + :return: The table_name of this DatabaseViewAccessEntry. + :rtype: str + """ + return self._table_name + + @table_name.setter + def table_name(self, table_name): + """ + Sets the table_name of this DatabaseViewAccessEntry. + The name of the database table the user has access to. + + + :param table_name: The table_name of this DatabaseViewAccessEntry. + :type: str + """ + self._table_name = table_name + + @property + def privilege_type(self): + """ + Gets the privilege_type of this DatabaseViewAccessEntry. + Type of the privilege user has, this includes System Privilege, Schema Privilege, Object Privilege, Column Privilege, + Owner or Schema Privilege on a schema. + + + :return: The privilege_type of this DatabaseViewAccessEntry. + :rtype: str + """ + return self._privilege_type + + @privilege_type.setter + def privilege_type(self, privilege_type): + """ + Sets the privilege_type of this DatabaseViewAccessEntry. + Type of the privilege user has, this includes System Privilege, Schema Privilege, Object Privilege, Column Privilege, + Owner or Schema Privilege on a schema. + + + :param privilege_type: The privilege_type of this DatabaseViewAccessEntry. + :type: str + """ + self._privilege_type = privilege_type + + @property + def target_id(self): + """ + Gets the target_id of this DatabaseViewAccessEntry. + The OCID of the of the target database. + + + :return: The target_id of this DatabaseViewAccessEntry. + :rtype: str + """ + return self._target_id + + @target_id.setter + def target_id(self, target_id): + """ + Sets the target_id of this DatabaseViewAccessEntry. + The OCID of the of the target database. + + + :param target_id: The target_id of this DatabaseViewAccessEntry. + :type: str + """ + self._target_id = target_id + + @property + def privilege(self): + """ + Gets the privilege of this DatabaseViewAccessEntry. + The name of the privilege. + + Allowed values for this property are: "SELECT", "UPDATE", "INSERT", "DELETE", "READ", "OWNER", "INDEX", "SELECT_ANY_TABLE", "UPDATE_ANY_TABLE", "INSERT_ANY_TABLE", "DELETE_ANY_TABLE", "READ_ANY_TABLE", "CREATE_ANY_INDEX", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The privilege of this DatabaseViewAccessEntry. + :rtype: str + """ + return self._privilege + + @privilege.setter + def privilege(self, privilege): + """ + Sets the privilege of this DatabaseViewAccessEntry. + The name of the privilege. + + + :param privilege: The privilege of this DatabaseViewAccessEntry. + :type: str + """ + allowed_values = ["SELECT", "UPDATE", "INSERT", "DELETE", "READ", "OWNER", "INDEX", "SELECT_ANY_TABLE", "UPDATE_ANY_TABLE", "INSERT_ANY_TABLE", "DELETE_ANY_TABLE", "READ_ANY_TABLE", "CREATE_ANY_INDEX"] + if not value_allowed_none_or_none_sentinel(privilege, allowed_values): + privilege = 'UNKNOWN_ENUM_VALUE' + self._privilege = privilege + + @property + def privilege_grantable(self): + """ + Gets the privilege_grantable of this DatabaseViewAccessEntry. + Indicates whether the grantee can grant this privilege to other users. Privileges can be granted to a user or role with + GRANT_OPTION or ADMIN_OPTION + + Allowed values for this property are: "ADMIN_OPTION", "GRANT_OPTION", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The privilege_grantable of this DatabaseViewAccessEntry. + :rtype: str + """ + return self._privilege_grantable + + @privilege_grantable.setter + def privilege_grantable(self, privilege_grantable): + """ + Sets the privilege_grantable of this DatabaseViewAccessEntry. + Indicates whether the grantee can grant this privilege to other users. Privileges can be granted to a user or role with + GRANT_OPTION or ADMIN_OPTION + + + :param privilege_grantable: The privilege_grantable of this DatabaseViewAccessEntry. + :type: str + """ + allowed_values = ["ADMIN_OPTION", "GRANT_OPTION"] + if not value_allowed_none_or_none_sentinel(privilege_grantable, allowed_values): + privilege_grantable = 'UNKNOWN_ENUM_VALUE' + self._privilege_grantable = privilege_grantable + + @property + def grant_from_role(self): + """ + Gets the grant_from_role of this DatabaseViewAccessEntry. + This can be empty in case of direct grant, in case of indirect grant, this attribute displays the name of the + role which is granted to the user though which the user has access to the table. + + + :return: The grant_from_role of this DatabaseViewAccessEntry. + :rtype: str + """ + return self._grant_from_role + + @grant_from_role.setter + def grant_from_role(self, grant_from_role): + """ + Sets the grant_from_role of this DatabaseViewAccessEntry. + This can be empty in case of direct grant, in case of indirect grant, this attribute displays the name of the + role which is granted to the user though which the user has access to the table. + + + :param grant_from_role: The grant_from_role of this DatabaseViewAccessEntry. + :type: str + """ + self._grant_from_role = grant_from_role + + @property + def view_schema(self): + """ + Gets the view_schema of this DatabaseViewAccessEntry. + The name of the schema. + + + :return: The view_schema of this DatabaseViewAccessEntry. + :rtype: str + """ + return self._view_schema + + @view_schema.setter + def view_schema(self, view_schema): + """ + Sets the view_schema of this DatabaseViewAccessEntry. + The name of the schema. + + + :param view_schema: The view_schema of this DatabaseViewAccessEntry. + :type: str + """ + self._view_schema = view_schema + + @property + def view_name(self): + """ + Gets the view_name of this DatabaseViewAccessEntry. + The name of the view. + + + :return: The view_name of this DatabaseViewAccessEntry. + :rtype: str + """ + return self._view_name + + @view_name.setter + def view_name(self, view_name): + """ + Sets the view_name of this DatabaseViewAccessEntry. + The name of the view. + + + :param view_name: The view_name of this DatabaseViewAccessEntry. + :type: str + """ + self._view_name = view_name + + @property + def view_text(self): + """ + Gets the view_text of this DatabaseViewAccessEntry. + Definition of the view. + + + :return: The view_text of this DatabaseViewAccessEntry. + :rtype: str + """ + return self._view_text + + @view_text.setter + def view_text(self, view_text): + """ + Sets the view_text of this DatabaseViewAccessEntry. + Definition of the view. + + + :param view_text: The view_text of this DatabaseViewAccessEntry. + :type: str + """ + self._view_text = view_text + + @property + def column_name(self): + """ + Gets the column_name of this DatabaseViewAccessEntry. + If there are column level privileges on a table or view. + + + :return: The column_name of this DatabaseViewAccessEntry. + :rtype: str + """ + return self._column_name + + @column_name.setter + def column_name(self, column_name): + """ + Sets the column_name of this DatabaseViewAccessEntry. + If there are column level privileges on a table or view. + + + :param column_name: The column_name of this DatabaseViewAccessEntry. + :type: str + """ + self._column_name = column_name + + @property + def grantor(self): + """ + Gets the grantor of this DatabaseViewAccessEntry. + The user who granted the privilege. + + + :return: The grantor of this DatabaseViewAccessEntry. + :rtype: str + """ + return self._grantor + + @grantor.setter + def grantor(self, grantor): + """ + Sets the grantor of this DatabaseViewAccessEntry. + The user who granted the privilege. + + + :param grantor: The grantor of this DatabaseViewAccessEntry. + :type: str + """ + self._grantor = grantor + + @property + def is_access_constrained_by_database_vault(self): + """ + Gets the is_access_constrained_by_database_vault of this DatabaseViewAccessEntry. + Indicates whether the table access is constrained via Oracle Database Vault. + + + :return: The is_access_constrained_by_database_vault of this DatabaseViewAccessEntry. + :rtype: bool + """ + return self._is_access_constrained_by_database_vault + + @is_access_constrained_by_database_vault.setter + def is_access_constrained_by_database_vault(self, is_access_constrained_by_database_vault): + """ + Sets the is_access_constrained_by_database_vault of this DatabaseViewAccessEntry. + Indicates whether the table access is constrained via Oracle Database Vault. + + + :param is_access_constrained_by_database_vault: The is_access_constrained_by_database_vault of this DatabaseViewAccessEntry. + :type: bool + """ + self._is_access_constrained_by_database_vault = is_access_constrained_by_database_vault + + @property + def is_access_constrained_by_virtual_private_database(self): + """ + Gets the is_access_constrained_by_virtual_private_database of this DatabaseViewAccessEntry. + Indicates whether the view access is constrained via Virtual Private Database. + + + :return: The is_access_constrained_by_virtual_private_database of this DatabaseViewAccessEntry. + :rtype: bool + """ + return self._is_access_constrained_by_virtual_private_database + + @is_access_constrained_by_virtual_private_database.setter + def is_access_constrained_by_virtual_private_database(self, is_access_constrained_by_virtual_private_database): + """ + Sets the is_access_constrained_by_virtual_private_database of this DatabaseViewAccessEntry. + Indicates whether the view access is constrained via Virtual Private Database. + + + :param is_access_constrained_by_virtual_private_database: The is_access_constrained_by_virtual_private_database of this DatabaseViewAccessEntry. + :type: bool + """ + self._is_access_constrained_by_virtual_private_database = is_access_constrained_by_virtual_private_database + + @property + def is_access_constrained_by_redaction(self): + """ + Gets the is_access_constrained_by_redaction of this DatabaseViewAccessEntry. + Indicates whether the view access is constrained via Oracle Data Redaction. + + + :return: The is_access_constrained_by_redaction of this DatabaseViewAccessEntry. + :rtype: bool + """ + return self._is_access_constrained_by_redaction + + @is_access_constrained_by_redaction.setter + def is_access_constrained_by_redaction(self, is_access_constrained_by_redaction): + """ + Sets the is_access_constrained_by_redaction of this DatabaseViewAccessEntry. + Indicates whether the view access is constrained via Oracle Data Redaction. + + + :param is_access_constrained_by_redaction: The is_access_constrained_by_redaction of this DatabaseViewAccessEntry. + :type: bool + """ + self._is_access_constrained_by_redaction = is_access_constrained_by_redaction + + @property + def is_access_constrained_by_real_application_security(self): + """ + Gets the is_access_constrained_by_real_application_security of this DatabaseViewAccessEntry. + Indicates whether the view access is constrained via Real Application Security. + + + :return: The is_access_constrained_by_real_application_security of this DatabaseViewAccessEntry. + :rtype: bool + """ + return self._is_access_constrained_by_real_application_security + + @is_access_constrained_by_real_application_security.setter + def is_access_constrained_by_real_application_security(self, is_access_constrained_by_real_application_security): + """ + Sets the is_access_constrained_by_real_application_security of this DatabaseViewAccessEntry. + Indicates whether the view access is constrained via Real Application Security. + + + :param is_access_constrained_by_real_application_security: The is_access_constrained_by_real_application_security of this DatabaseViewAccessEntry. + :type: bool + """ + self._is_access_constrained_by_real_application_security = is_access_constrained_by_real_application_security + + @property + def is_access_constrained_by_sql_firewall(self): + """ + Gets the is_access_constrained_by_sql_firewall of this DatabaseViewAccessEntry. + Indicates whether the view access is constrained via Oracle Database SQL Firewall. + + + :return: The is_access_constrained_by_sql_firewall of this DatabaseViewAccessEntry. + :rtype: bool + """ + return self._is_access_constrained_by_sql_firewall + + @is_access_constrained_by_sql_firewall.setter + def is_access_constrained_by_sql_firewall(self, is_access_constrained_by_sql_firewall): + """ + Sets the is_access_constrained_by_sql_firewall of this DatabaseViewAccessEntry. + Indicates whether the view access is constrained via Oracle Database SQL Firewall. + + + :param is_access_constrained_by_sql_firewall: The is_access_constrained_by_sql_firewall of this DatabaseViewAccessEntry. + :type: bool + """ + self._is_access_constrained_by_sql_firewall = is_access_constrained_by_sql_firewall + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/database_view_access_entry_collection.py b/src/oci/data_safe/models/database_view_access_entry_collection.py new file mode 100644 index 0000000000..e593800f53 --- /dev/null +++ b/src/oci/data_safe/models/database_view_access_entry_collection.py @@ -0,0 +1,72 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20181201 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class DatabaseViewAccessEntryCollection(object): + """ + A collection of database view access summary objects. + """ + + def __init__(self, **kwargs): + """ + Initializes a new DatabaseViewAccessEntryCollection object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param items: + The value to assign to the items property of this DatabaseViewAccessEntryCollection. + :type items: list[oci.data_safe.models.DatabaseViewAccessEntrySummary] + + """ + self.swagger_types = { + 'items': 'list[DatabaseViewAccessEntrySummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this DatabaseViewAccessEntryCollection. + An array of database view access summary objects. + + + :return: The items of this DatabaseViewAccessEntryCollection. + :rtype: list[oci.data_safe.models.DatabaseViewAccessEntrySummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this DatabaseViewAccessEntryCollection. + An array of database view access summary objects. + + + :param items: The items of this DatabaseViewAccessEntryCollection. + :type: list[oci.data_safe.models.DatabaseViewAccessEntrySummary] + """ + self._items = items + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/database_view_access_entry_summary.py b/src/oci/data_safe/models/database_view_access_entry_summary.py new file mode 100644 index 0000000000..ed45186e0e --- /dev/null +++ b/src/oci/data_safe/models/database_view_access_entry_summary.py @@ -0,0 +1,771 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20181201 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class DatabaseViewAccessEntrySummary(object): + """ + Summary of DatabaseViewAccess Object. + """ + + #: A constant which can be used with the access_type property of a DatabaseViewAccessEntrySummary. + #: This constant has a value of "SELECT" + ACCESS_TYPE_SELECT = "SELECT" + + #: A constant which can be used with the access_type property of a DatabaseViewAccessEntrySummary. + #: This constant has a value of "UPDATE" + ACCESS_TYPE_UPDATE = "UPDATE" + + #: A constant which can be used with the access_type property of a DatabaseViewAccessEntrySummary. + #: This constant has a value of "INSERT" + ACCESS_TYPE_INSERT = "INSERT" + + #: A constant which can be used with the access_type property of a DatabaseViewAccessEntrySummary. + #: This constant has a value of "DELETE" + ACCESS_TYPE_DELETE = "DELETE" + + #: A constant which can be used with the access_type property of a DatabaseViewAccessEntrySummary. + #: This constant has a value of "OWNER" + ACCESS_TYPE_OWNER = "OWNER" + + #: A constant which can be used with the privilege property of a DatabaseViewAccessEntrySummary. + #: This constant has a value of "SELECT" + PRIVILEGE_SELECT = "SELECT" + + #: A constant which can be used with the privilege property of a DatabaseViewAccessEntrySummary. + #: This constant has a value of "UPDATE" + PRIVILEGE_UPDATE = "UPDATE" + + #: A constant which can be used with the privilege property of a DatabaseViewAccessEntrySummary. + #: This constant has a value of "INSERT" + PRIVILEGE_INSERT = "INSERT" + + #: A constant which can be used with the privilege property of a DatabaseViewAccessEntrySummary. + #: This constant has a value of "DELETE" + PRIVILEGE_DELETE = "DELETE" + + #: A constant which can be used with the privilege property of a DatabaseViewAccessEntrySummary. + #: This constant has a value of "READ" + PRIVILEGE_READ = "READ" + + #: A constant which can be used with the privilege property of a DatabaseViewAccessEntrySummary. + #: This constant has a value of "OWNER" + PRIVILEGE_OWNER = "OWNER" + + #: A constant which can be used with the privilege property of a DatabaseViewAccessEntrySummary. + #: This constant has a value of "INDEX" + PRIVILEGE_INDEX = "INDEX" + + #: A constant which can be used with the privilege property of a DatabaseViewAccessEntrySummary. + #: This constant has a value of "SELECT_ANY_TABLE" + PRIVILEGE_SELECT_ANY_TABLE = "SELECT_ANY_TABLE" + + #: A constant which can be used with the privilege property of a DatabaseViewAccessEntrySummary. + #: This constant has a value of "UPDATE_ANY_TABLE" + PRIVILEGE_UPDATE_ANY_TABLE = "UPDATE_ANY_TABLE" + + #: A constant which can be used with the privilege property of a DatabaseViewAccessEntrySummary. + #: This constant has a value of "INSERT_ANY_TABLE" + PRIVILEGE_INSERT_ANY_TABLE = "INSERT_ANY_TABLE" + + #: A constant which can be used with the privilege property of a DatabaseViewAccessEntrySummary. + #: This constant has a value of "DELETE_ANY_TABLE" + PRIVILEGE_DELETE_ANY_TABLE = "DELETE_ANY_TABLE" + + #: A constant which can be used with the privilege property of a DatabaseViewAccessEntrySummary. + #: This constant has a value of "READ_ANY_TABLE" + PRIVILEGE_READ_ANY_TABLE = "READ_ANY_TABLE" + + #: A constant which can be used with the privilege property of a DatabaseViewAccessEntrySummary. + #: This constant has a value of "CREATE_ANY_INDEX" + PRIVILEGE_CREATE_ANY_INDEX = "CREATE_ANY_INDEX" + + #: A constant which can be used with the privilege_grantable property of a DatabaseViewAccessEntrySummary. + #: This constant has a value of "ADMIN_OPTION" + PRIVILEGE_GRANTABLE_ADMIN_OPTION = "ADMIN_OPTION" + + #: A constant which can be used with the privilege_grantable property of a DatabaseViewAccessEntrySummary. + #: This constant has a value of "GRANT_OPTION" + PRIVILEGE_GRANTABLE_GRANT_OPTION = "GRANT_OPTION" + + def __init__(self, **kwargs): + """ + Initializes a new DatabaseViewAccessEntrySummary object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param key: + The value to assign to the key property of this DatabaseViewAccessEntrySummary. + :type key: str + + :param grantee: + The value to assign to the grantee property of this DatabaseViewAccessEntrySummary. + :type grantee: str + + :param grant_from_role: + The value to assign to the grant_from_role property of this DatabaseViewAccessEntrySummary. + :type grant_from_role: str + + :param access_type: + The value to assign to the access_type property of this DatabaseViewAccessEntrySummary. + Allowed values for this property are: "SELECT", "UPDATE", "INSERT", "DELETE", "OWNER", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type access_type: str + + :param privilege: + The value to assign to the privilege property of this DatabaseViewAccessEntrySummary. + Allowed values for this property are: "SELECT", "UPDATE", "INSERT", "DELETE", "READ", "OWNER", "INDEX", "SELECT_ANY_TABLE", "UPDATE_ANY_TABLE", "INSERT_ANY_TABLE", "DELETE_ANY_TABLE", "READ_ANY_TABLE", "CREATE_ANY_INDEX", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type privilege: str + + :param target_id: + The value to assign to the target_id property of this DatabaseViewAccessEntrySummary. + :type target_id: str + + :param privilege_grantable: + The value to assign to the privilege_grantable property of this DatabaseViewAccessEntrySummary. + Allowed values for this property are: "ADMIN_OPTION", "GRANT_OPTION", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type privilege_grantable: str + + :param privilege_type: + The value to assign to the privilege_type property of this DatabaseViewAccessEntrySummary. + :type privilege_type: str + + :param table_schema: + The value to assign to the table_schema property of this DatabaseViewAccessEntrySummary. + :type table_schema: str + + :param table_name: + The value to assign to the table_name property of this DatabaseViewAccessEntrySummary. + :type table_name: str + + :param view_schema: + The value to assign to the view_schema property of this DatabaseViewAccessEntrySummary. + :type view_schema: str + + :param view_name: + The value to assign to the view_name property of this DatabaseViewAccessEntrySummary. + :type view_name: str + + :param view_text: + The value to assign to the view_text property of this DatabaseViewAccessEntrySummary. + :type view_text: str + + :param column_name: + The value to assign to the column_name property of this DatabaseViewAccessEntrySummary. + :type column_name: str + + :param grantor: + The value to assign to the grantor property of this DatabaseViewAccessEntrySummary. + :type grantor: str + + :param is_access_constrained_by_database_vault: + The value to assign to the is_access_constrained_by_database_vault property of this DatabaseViewAccessEntrySummary. + :type is_access_constrained_by_database_vault: bool + + :param is_access_constrained_by_virtual_private_database: + The value to assign to the is_access_constrained_by_virtual_private_database property of this DatabaseViewAccessEntrySummary. + :type is_access_constrained_by_virtual_private_database: bool + + :param is_access_constrained_by_redaction: + The value to assign to the is_access_constrained_by_redaction property of this DatabaseViewAccessEntrySummary. + :type is_access_constrained_by_redaction: bool + + :param is_access_constrained_by_real_application_security: + The value to assign to the is_access_constrained_by_real_application_security property of this DatabaseViewAccessEntrySummary. + :type is_access_constrained_by_real_application_security: bool + + :param is_access_constrained_by_sql_firewall: + The value to assign to the is_access_constrained_by_sql_firewall property of this DatabaseViewAccessEntrySummary. + :type is_access_constrained_by_sql_firewall: bool + + """ + self.swagger_types = { + 'key': 'str', + 'grantee': 'str', + 'grant_from_role': 'str', + 'access_type': 'str', + 'privilege': 'str', + 'target_id': 'str', + 'privilege_grantable': 'str', + 'privilege_type': 'str', + 'table_schema': 'str', + 'table_name': 'str', + 'view_schema': 'str', + 'view_name': 'str', + 'view_text': 'str', + 'column_name': 'str', + 'grantor': 'str', + 'is_access_constrained_by_database_vault': 'bool', + 'is_access_constrained_by_virtual_private_database': 'bool', + 'is_access_constrained_by_redaction': 'bool', + 'is_access_constrained_by_real_application_security': 'bool', + 'is_access_constrained_by_sql_firewall': 'bool' + } + + self.attribute_map = { + 'key': 'key', + 'grantee': 'grantee', + 'grant_from_role': 'grantFromRole', + 'access_type': 'accessType', + 'privilege': 'privilege', + 'target_id': 'targetId', + 'privilege_grantable': 'privilegeGrantable', + 'privilege_type': 'privilegeType', + 'table_schema': 'tableSchema', + 'table_name': 'tableName', + 'view_schema': 'viewSchema', + 'view_name': 'viewName', + 'view_text': 'viewText', + 'column_name': 'columnName', + 'grantor': 'grantor', + 'is_access_constrained_by_database_vault': 'isAccessConstrainedByDatabaseVault', + 'is_access_constrained_by_virtual_private_database': 'isAccessConstrainedByVirtualPrivateDatabase', + 'is_access_constrained_by_redaction': 'isAccessConstrainedByRedaction', + 'is_access_constrained_by_real_application_security': 'isAccessConstrainedByRealApplicationSecurity', + 'is_access_constrained_by_sql_firewall': 'isAccessConstrainedBySqlFirewall' + } + + self._key = None + self._grantee = None + self._grant_from_role = None + self._access_type = None + self._privilege = None + self._target_id = None + self._privilege_grantable = None + self._privilege_type = None + self._table_schema = None + self._table_name = None + self._view_schema = None + self._view_name = None + self._view_text = None + self._column_name = None + self._grantor = None + self._is_access_constrained_by_database_vault = None + self._is_access_constrained_by_virtual_private_database = None + self._is_access_constrained_by_redaction = None + self._is_access_constrained_by_real_application_security = None + self._is_access_constrained_by_sql_firewall = None + + @property + def key(self): + """ + **[Required]** Gets the key of this DatabaseViewAccessEntrySummary. + The unique key that identifies the view report. It is numeric and unique within a security policy report. + + + :return: The key of this DatabaseViewAccessEntrySummary. + :rtype: str + """ + return self._key + + @key.setter + def key(self, key): + """ + Sets the key of this DatabaseViewAccessEntrySummary. + The unique key that identifies the view report. It is numeric and unique within a security policy report. + + + :param key: The key of this DatabaseViewAccessEntrySummary. + :type: str + """ + self._key = key + + @property + def grantee(self): + """ + **[Required]** Gets the grantee of this DatabaseViewAccessEntrySummary. + Grantee is the user who can access the view. + + + :return: The grantee of this DatabaseViewAccessEntrySummary. + :rtype: str + """ + return self._grantee + + @grantee.setter + def grantee(self, grantee): + """ + Sets the grantee of this DatabaseViewAccessEntrySummary. + Grantee is the user who can access the view. + + + :param grantee: The grantee of this DatabaseViewAccessEntrySummary. + :type: str + """ + self._grantee = grantee + + @property + def grant_from_role(self): + """ + Gets the grant_from_role of this DatabaseViewAccessEntrySummary. + This can be empty in case of direct grant, in case of indirect grant, this attribute displays the name of the + role which is granted to the user though which the user has access to the table. + + + :return: The grant_from_role of this DatabaseViewAccessEntrySummary. + :rtype: str + """ + return self._grant_from_role + + @grant_from_role.setter + def grant_from_role(self, grant_from_role): + """ + Sets the grant_from_role of this DatabaseViewAccessEntrySummary. + This can be empty in case of direct grant, in case of indirect grant, this attribute displays the name of the + role which is granted to the user though which the user has access to the table. + + + :param grant_from_role: The grant_from_role of this DatabaseViewAccessEntrySummary. + :type: str + """ + self._grant_from_role = grant_from_role + + @property + def access_type(self): + """ + Gets the access_type of this DatabaseViewAccessEntrySummary. + The type of the access the user has on the table, there can be one or more from SELECT, DELETE, INSERT, READ or UPDATE. + + Allowed values for this property are: "SELECT", "UPDATE", "INSERT", "DELETE", "OWNER", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The access_type of this DatabaseViewAccessEntrySummary. + :rtype: str + """ + return self._access_type + + @access_type.setter + def access_type(self, access_type): + """ + Sets the access_type of this DatabaseViewAccessEntrySummary. + The type of the access the user has on the table, there can be one or more from SELECT, DELETE, INSERT, READ or UPDATE. + + + :param access_type: The access_type of this DatabaseViewAccessEntrySummary. + :type: str + """ + allowed_values = ["SELECT", "UPDATE", "INSERT", "DELETE", "OWNER"] + if not value_allowed_none_or_none_sentinel(access_type, allowed_values): + access_type = 'UNKNOWN_ENUM_VALUE' + self._access_type = access_type + + @property + def privilege(self): + """ + Gets the privilege of this DatabaseViewAccessEntrySummary. + The name of the privilege. + + Allowed values for this property are: "SELECT", "UPDATE", "INSERT", "DELETE", "READ", "OWNER", "INDEX", "SELECT_ANY_TABLE", "UPDATE_ANY_TABLE", "INSERT_ANY_TABLE", "DELETE_ANY_TABLE", "READ_ANY_TABLE", "CREATE_ANY_INDEX", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The privilege of this DatabaseViewAccessEntrySummary. + :rtype: str + """ + return self._privilege + + @privilege.setter + def privilege(self, privilege): + """ + Sets the privilege of this DatabaseViewAccessEntrySummary. + The name of the privilege. + + + :param privilege: The privilege of this DatabaseViewAccessEntrySummary. + :type: str + """ + allowed_values = ["SELECT", "UPDATE", "INSERT", "DELETE", "READ", "OWNER", "INDEX", "SELECT_ANY_TABLE", "UPDATE_ANY_TABLE", "INSERT_ANY_TABLE", "DELETE_ANY_TABLE", "READ_ANY_TABLE", "CREATE_ANY_INDEX"] + if not value_allowed_none_or_none_sentinel(privilege, allowed_values): + privilege = 'UNKNOWN_ENUM_VALUE' + self._privilege = privilege + + @property + def target_id(self): + """ + Gets the target_id of this DatabaseViewAccessEntrySummary. + The OCID of the of the target database. + + + :return: The target_id of this DatabaseViewAccessEntrySummary. + :rtype: str + """ + return self._target_id + + @target_id.setter + def target_id(self, target_id): + """ + Sets the target_id of this DatabaseViewAccessEntrySummary. + The OCID of the of the target database. + + + :param target_id: The target_id of this DatabaseViewAccessEntrySummary. + :type: str + """ + self._target_id = target_id + + @property + def privilege_grantable(self): + """ + Gets the privilege_grantable of this DatabaseViewAccessEntrySummary. + Indicates whether the grantee can grant this privilege to other users. Privileges can be granted to a user or role with + GRANT_OPTION or ADMIN_OPTION + + Allowed values for this property are: "ADMIN_OPTION", "GRANT_OPTION", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The privilege_grantable of this DatabaseViewAccessEntrySummary. + :rtype: str + """ + return self._privilege_grantable + + @privilege_grantable.setter + def privilege_grantable(self, privilege_grantable): + """ + Sets the privilege_grantable of this DatabaseViewAccessEntrySummary. + Indicates whether the grantee can grant this privilege to other users. Privileges can be granted to a user or role with + GRANT_OPTION or ADMIN_OPTION + + + :param privilege_grantable: The privilege_grantable of this DatabaseViewAccessEntrySummary. + :type: str + """ + allowed_values = ["ADMIN_OPTION", "GRANT_OPTION"] + if not value_allowed_none_or_none_sentinel(privilege_grantable, allowed_values): + privilege_grantable = 'UNKNOWN_ENUM_VALUE' + self._privilege_grantable = privilege_grantable + + @property + def privilege_type(self): + """ + Gets the privilege_type of this DatabaseViewAccessEntrySummary. + Type of the privilege user has, this includes System Privilege, Schema Privilege, Object Privilege, Column Privilege, + Owner or Schema Privilege on a schema. + + + :return: The privilege_type of this DatabaseViewAccessEntrySummary. + :rtype: str + """ + return self._privilege_type + + @privilege_type.setter + def privilege_type(self, privilege_type): + """ + Sets the privilege_type of this DatabaseViewAccessEntrySummary. + Type of the privilege user has, this includes System Privilege, Schema Privilege, Object Privilege, Column Privilege, + Owner or Schema Privilege on a schema. + + + :param privilege_type: The privilege_type of this DatabaseViewAccessEntrySummary. + :type: str + """ + self._privilege_type = privilege_type + + @property + def table_schema(self): + """ + Gets the table_schema of this DatabaseViewAccessEntrySummary. + The name of the schema + + + :return: The table_schema of this DatabaseViewAccessEntrySummary. + :rtype: str + """ + return self._table_schema + + @table_schema.setter + def table_schema(self, table_schema): + """ + Sets the table_schema of this DatabaseViewAccessEntrySummary. + The name of the schema + + + :param table_schema: The table_schema of this DatabaseViewAccessEntrySummary. + :type: str + """ + self._table_schema = table_schema + + @property + def table_name(self): + """ + Gets the table_name of this DatabaseViewAccessEntrySummary. + The name of the table. + + + :return: The table_name of this DatabaseViewAccessEntrySummary. + :rtype: str + """ + return self._table_name + + @table_name.setter + def table_name(self, table_name): + """ + Sets the table_name of this DatabaseViewAccessEntrySummary. + The name of the table. + + + :param table_name: The table_name of this DatabaseViewAccessEntrySummary. + :type: str + """ + self._table_name = table_name + + @property + def view_schema(self): + """ + Gets the view_schema of this DatabaseViewAccessEntrySummary. + The name of the schema. + + + :return: The view_schema of this DatabaseViewAccessEntrySummary. + :rtype: str + """ + return self._view_schema + + @view_schema.setter + def view_schema(self, view_schema): + """ + Sets the view_schema of this DatabaseViewAccessEntrySummary. + The name of the schema. + + + :param view_schema: The view_schema of this DatabaseViewAccessEntrySummary. + :type: str + """ + self._view_schema = view_schema + + @property + def view_name(self): + """ + Gets the view_name of this DatabaseViewAccessEntrySummary. + The name of the view. + + + :return: The view_name of this DatabaseViewAccessEntrySummary. + :rtype: str + """ + return self._view_name + + @view_name.setter + def view_name(self, view_name): + """ + Sets the view_name of this DatabaseViewAccessEntrySummary. + The name of the view. + + + :param view_name: The view_name of this DatabaseViewAccessEntrySummary. + :type: str + """ + self._view_name = view_name + + @property + def view_text(self): + """ + Gets the view_text of this DatabaseViewAccessEntrySummary. + The definition of the view. + + + :return: The view_text of this DatabaseViewAccessEntrySummary. + :rtype: str + """ + return self._view_text + + @view_text.setter + def view_text(self, view_text): + """ + Sets the view_text of this DatabaseViewAccessEntrySummary. + The definition of the view. + + + :param view_text: The view_text of this DatabaseViewAccessEntrySummary. + :type: str + """ + self._view_text = view_text + + @property + def column_name(self): + """ + Gets the column_name of this DatabaseViewAccessEntrySummary. + The name of column when there are column level privileges on a table or view. + + + :return: The column_name of this DatabaseViewAccessEntrySummary. + :rtype: str + """ + return self._column_name + + @column_name.setter + def column_name(self, column_name): + """ + Sets the column_name of this DatabaseViewAccessEntrySummary. + The name of column when there are column level privileges on a table or view. + + + :param column_name: The column_name of this DatabaseViewAccessEntrySummary. + :type: str + """ + self._column_name = column_name + + @property + def grantor(self): + """ + Gets the grantor of this DatabaseViewAccessEntrySummary. + The user who granted the privilege. + + + :return: The grantor of this DatabaseViewAccessEntrySummary. + :rtype: str + """ + return self._grantor + + @grantor.setter + def grantor(self, grantor): + """ + Sets the grantor of this DatabaseViewAccessEntrySummary. + The user who granted the privilege. + + + :param grantor: The grantor of this DatabaseViewAccessEntrySummary. + :type: str + """ + self._grantor = grantor + + @property + def is_access_constrained_by_database_vault(self): + """ + Gets the is_access_constrained_by_database_vault of this DatabaseViewAccessEntrySummary. + Indicates whether the table access is constrained via Oracle Database Vault. + + + :return: The is_access_constrained_by_database_vault of this DatabaseViewAccessEntrySummary. + :rtype: bool + """ + return self._is_access_constrained_by_database_vault + + @is_access_constrained_by_database_vault.setter + def is_access_constrained_by_database_vault(self, is_access_constrained_by_database_vault): + """ + Sets the is_access_constrained_by_database_vault of this DatabaseViewAccessEntrySummary. + Indicates whether the table access is constrained via Oracle Database Vault. + + + :param is_access_constrained_by_database_vault: The is_access_constrained_by_database_vault of this DatabaseViewAccessEntrySummary. + :type: bool + """ + self._is_access_constrained_by_database_vault = is_access_constrained_by_database_vault + + @property + def is_access_constrained_by_virtual_private_database(self): + """ + Gets the is_access_constrained_by_virtual_private_database of this DatabaseViewAccessEntrySummary. + Indicates whether the view access is constrained via Virtual Private Database. + + + :return: The is_access_constrained_by_virtual_private_database of this DatabaseViewAccessEntrySummary. + :rtype: bool + """ + return self._is_access_constrained_by_virtual_private_database + + @is_access_constrained_by_virtual_private_database.setter + def is_access_constrained_by_virtual_private_database(self, is_access_constrained_by_virtual_private_database): + """ + Sets the is_access_constrained_by_virtual_private_database of this DatabaseViewAccessEntrySummary. + Indicates whether the view access is constrained via Virtual Private Database. + + + :param is_access_constrained_by_virtual_private_database: The is_access_constrained_by_virtual_private_database of this DatabaseViewAccessEntrySummary. + :type: bool + """ + self._is_access_constrained_by_virtual_private_database = is_access_constrained_by_virtual_private_database + + @property + def is_access_constrained_by_redaction(self): + """ + Gets the is_access_constrained_by_redaction of this DatabaseViewAccessEntrySummary. + Indicates whether the view access is constrained via Oracle Data Redaction. + + + :return: The is_access_constrained_by_redaction of this DatabaseViewAccessEntrySummary. + :rtype: bool + """ + return self._is_access_constrained_by_redaction + + @is_access_constrained_by_redaction.setter + def is_access_constrained_by_redaction(self, is_access_constrained_by_redaction): + """ + Sets the is_access_constrained_by_redaction of this DatabaseViewAccessEntrySummary. + Indicates whether the view access is constrained via Oracle Data Redaction. + + + :param is_access_constrained_by_redaction: The is_access_constrained_by_redaction of this DatabaseViewAccessEntrySummary. + :type: bool + """ + self._is_access_constrained_by_redaction = is_access_constrained_by_redaction + + @property + def is_access_constrained_by_real_application_security(self): + """ + Gets the is_access_constrained_by_real_application_security of this DatabaseViewAccessEntrySummary. + Indicates whether the view access is constrained via Real Application Security. + + + :return: The is_access_constrained_by_real_application_security of this DatabaseViewAccessEntrySummary. + :rtype: bool + """ + return self._is_access_constrained_by_real_application_security + + @is_access_constrained_by_real_application_security.setter + def is_access_constrained_by_real_application_security(self, is_access_constrained_by_real_application_security): + """ + Sets the is_access_constrained_by_real_application_security of this DatabaseViewAccessEntrySummary. + Indicates whether the view access is constrained via Real Application Security. + + + :param is_access_constrained_by_real_application_security: The is_access_constrained_by_real_application_security of this DatabaseViewAccessEntrySummary. + :type: bool + """ + self._is_access_constrained_by_real_application_security = is_access_constrained_by_real_application_security + + @property + def is_access_constrained_by_sql_firewall(self): + """ + Gets the is_access_constrained_by_sql_firewall of this DatabaseViewAccessEntrySummary. + Indicates whether the view access is constrained via Oracle Database SQL Firewall. + + + :return: The is_access_constrained_by_sql_firewall of this DatabaseViewAccessEntrySummary. + :rtype: bool + """ + return self._is_access_constrained_by_sql_firewall + + @is_access_constrained_by_sql_firewall.setter + def is_access_constrained_by_sql_firewall(self, is_access_constrained_by_sql_firewall): + """ + Sets the is_access_constrained_by_sql_firewall of this DatabaseViewAccessEntrySummary. + Indicates whether the view access is constrained via Oracle Database SQL Firewall. + + + :param is_access_constrained_by_sql_firewall: The is_access_constrained_by_sql_firewall of this DatabaseViewAccessEntrySummary. + :type: bool + """ + self._is_access_constrained_by_sql_firewall = is_access_constrained_by_sql_firewall + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/diffs.py b/src/oci/data_safe/models/diffs.py index 57aaddd1b1..6d671ebf43 100644 --- a/src/oci/data_safe/models/diffs.py +++ b/src/oci/data_safe/models/diffs.py @@ -39,6 +39,10 @@ class Diffs(object): #: This constant has a value of "PASS" SEVERITY_PASS = "PASS" + #: A constant which can be used with the severity property of a Diffs. + #: This constant has a value of "DEFERRED" + SEVERITY_DEFERRED = "DEFERRED" + def __init__(self, **kwargs): """ Initializes a new Diffs object with values from keyword arguments. @@ -66,7 +70,7 @@ def __init__(self, **kwargs): :param severity: The value to assign to the severity property of this Diffs. - Allowed values for this property are: "HIGH", "MEDIUM", "LOW", "EVALUATE", "ADVISORY", "PASS", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "HIGH", "MEDIUM", "LOW", "EVALUATE", "ADVISORY", "PASS", "DEFERRED", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type severity: str @@ -214,7 +218,7 @@ def severity(self): Gets the severity of this Diffs. The severity of this diff. - Allowed values for this property are: "HIGH", "MEDIUM", "LOW", "EVALUATE", "ADVISORY", "PASS", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "HIGH", "MEDIUM", "LOW", "EVALUATE", "ADVISORY", "PASS", "DEFERRED", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -233,7 +237,7 @@ def severity(self, severity): :param severity: The severity of this Diffs. :type: str """ - allowed_values = ["HIGH", "MEDIUM", "LOW", "EVALUATE", "ADVISORY", "PASS"] + allowed_values = ["HIGH", "MEDIUM", "LOW", "EVALUATE", "ADVISORY", "PASS", "DEFERRED"] if not value_allowed_none_or_none_sentinel(severity, allowed_values): severity = 'UNKNOWN_ENUM_VALUE' self._severity = severity diff --git a/src/oci/data_safe/models/finding.py b/src/oci/data_safe/models/finding.py index 44184b34aa..9aee42058a 100644 --- a/src/oci/data_safe/models/finding.py +++ b/src/oci/data_safe/models/finding.py @@ -39,6 +39,26 @@ class Finding(object): #: This constant has a value of "PASS" SEVERITY_PASS = "PASS" + #: A constant which can be used with the severity property of a Finding. + #: This constant has a value of "DEFERRED" + SEVERITY_DEFERRED = "DEFERRED" + + #: A constant which can be used with the lifecycle_state property of a Finding. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a Finding. + #: This constant has a value of "UPDATING" + LIFECYCLE_STATE_UPDATING = "UPDATING" + + #: A constant which can be used with the lifecycle_state property of a Finding. + #: This constant has a value of "NEEDS_ATTENTION" + LIFECYCLE_STATE_NEEDS_ATTENTION = "NEEDS_ATTENTION" + + #: A constant which can be used with the lifecycle_state property of a Finding. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + def __init__(self, **kwargs): """ Initializes a new Finding object with values from keyword arguments. @@ -50,10 +70,18 @@ def __init__(self, **kwargs): :param severity: The value to assign to the severity property of this Finding. - Allowed values for this property are: "HIGH", "MEDIUM", "LOW", "EVALUATE", "ADVISORY", "PASS", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "HIGH", "MEDIUM", "LOW", "EVALUATE", "ADVISORY", "PASS", "DEFERRED", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type severity: str + :param assessment_id: + The value to assign to the assessment_id property of this Finding. + :type assessment_id: str + + :param target_id: + The value to assign to the target_id property of this Finding. + :type target_id: str + :param title: The value to assign to the title property of this Finding. :type title: str @@ -74,34 +102,98 @@ def __init__(self, **kwargs): The value to assign to the references property of this Finding. :type references: oci.data_safe.models.References + :param oracle_defined_severity: + The value to assign to the oracle_defined_severity property of this Finding. + :type oracle_defined_severity: str + + :param is_risk_modified: + The value to assign to the is_risk_modified property of this Finding. + :type is_risk_modified: bool + + :param has_target_db_risk_level_changed: + The value to assign to the has_target_db_risk_level_changed property of this Finding. + :type has_target_db_risk_level_changed: bool + + :param justification: + The value to assign to the justification property of this Finding. + :type justification: str + + :param time_valid_until: + The value to assign to the time_valid_until property of this Finding. + :type time_valid_until: datetime + + :param time_updated: + The value to assign to the time_updated property of this Finding. + :type time_updated: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this Finding. + Allowed values for this property are: "ACTIVE", "UPDATING", "NEEDS_ATTENTION", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param lifecycle_details: + The value to assign to the lifecycle_details property of this Finding. + :type lifecycle_details: str + """ self.swagger_types = { 'key': 'str', 'severity': 'str', + 'assessment_id': 'str', + 'target_id': 'str', 'title': 'str', 'remarks': 'str', 'details': 'object', 'summary': 'str', - 'references': 'References' + 'references': 'References', + 'oracle_defined_severity': 'str', + 'is_risk_modified': 'bool', + 'has_target_db_risk_level_changed': 'bool', + 'justification': 'str', + 'time_valid_until': 'datetime', + 'time_updated': 'datetime', + 'lifecycle_state': 'str', + 'lifecycle_details': 'str' } self.attribute_map = { 'key': 'key', 'severity': 'severity', + 'assessment_id': 'assessmentId', + 'target_id': 'targetId', 'title': 'title', 'remarks': 'remarks', 'details': 'details', 'summary': 'summary', - 'references': 'references' + 'references': 'references', + 'oracle_defined_severity': 'oracleDefinedSeverity', + 'is_risk_modified': 'isRiskModified', + 'has_target_db_risk_level_changed': 'hasTargetDbRiskLevelChanged', + 'justification': 'justification', + 'time_valid_until': 'timeValidUntil', + 'time_updated': 'timeUpdated', + 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails' } self._key = None self._severity = None + self._assessment_id = None + self._target_id = None self._title = None self._remarks = None self._details = None self._summary = None self._references = None + self._oracle_defined_severity = None + self._is_risk_modified = None + self._has_target_db_risk_level_changed = None + self._justification = None + self._time_valid_until = None + self._time_updated = None + self._lifecycle_state = None + self._lifecycle_details = None @property def key(self): @@ -133,7 +225,7 @@ def severity(self): Gets the severity of this Finding. The severity of the finding. - Allowed values for this property are: "HIGH", "MEDIUM", "LOW", "EVALUATE", "ADVISORY", "PASS", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "HIGH", "MEDIUM", "LOW", "EVALUATE", "ADVISORY", "PASS", "DEFERRED", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -152,11 +244,59 @@ def severity(self, severity): :param severity: The severity of this Finding. :type: str """ - allowed_values = ["HIGH", "MEDIUM", "LOW", "EVALUATE", "ADVISORY", "PASS"] + allowed_values = ["HIGH", "MEDIUM", "LOW", "EVALUATE", "ADVISORY", "PASS", "DEFERRED"] if not value_allowed_none_or_none_sentinel(severity, allowed_values): severity = 'UNKNOWN_ENUM_VALUE' self._severity = severity + @property + def assessment_id(self): + """ + Gets the assessment_id of this Finding. + The OCID of the assessment that generated this finding. + + + :return: The assessment_id of this Finding. + :rtype: str + """ + return self._assessment_id + + @assessment_id.setter + def assessment_id(self, assessment_id): + """ + Sets the assessment_id of this Finding. + The OCID of the assessment that generated this finding. + + + :param assessment_id: The assessment_id of this Finding. + :type: str + """ + self._assessment_id = assessment_id + + @property + def target_id(self): + """ + Gets the target_id of this Finding. + The OCID of the target database. + + + :return: The target_id of this Finding. + :rtype: str + """ + return self._target_id + + @target_id.setter + def target_id(self, target_id): + """ + Sets the target_id of this Finding. + The OCID of the target database. + + + :param target_id: The target_id of this Finding. + :type: str + """ + self._target_id = target_id + @property def title(self): """ @@ -277,6 +417,208 @@ def references(self, references): """ self._references = references + @property + def oracle_defined_severity(self): + """ + Gets the oracle_defined_severity of this Finding. + The severity of the finding as determined by security assessment. This cannot be modified by user. + + + :return: The oracle_defined_severity of this Finding. + :rtype: str + """ + return self._oracle_defined_severity + + @oracle_defined_severity.setter + def oracle_defined_severity(self, oracle_defined_severity): + """ + Sets the oracle_defined_severity of this Finding. + The severity of the finding as determined by security assessment. This cannot be modified by user. + + + :param oracle_defined_severity: The oracle_defined_severity of this Finding. + :type: str + """ + self._oracle_defined_severity = oracle_defined_severity + + @property + def is_risk_modified(self): + """ + Gets the is_risk_modified of this Finding. + Determines if this risk level was modified by user. + + + :return: The is_risk_modified of this Finding. + :rtype: bool + """ + return self._is_risk_modified + + @is_risk_modified.setter + def is_risk_modified(self, is_risk_modified): + """ + Sets the is_risk_modified of this Finding. + Determines if this risk level was modified by user. + + + :param is_risk_modified: The is_risk_modified of this Finding. + :type: bool + """ + self._is_risk_modified = is_risk_modified + + @property + def has_target_db_risk_level_changed(self): + """ + Gets the has_target_db_risk_level_changed of this Finding. + Determines if this risk level has changed on the target database since the last time 'severity' was modified by user. + + + :return: The has_target_db_risk_level_changed of this Finding. + :rtype: bool + """ + return self._has_target_db_risk_level_changed + + @has_target_db_risk_level_changed.setter + def has_target_db_risk_level_changed(self, has_target_db_risk_level_changed): + """ + Sets the has_target_db_risk_level_changed of this Finding. + Determines if this risk level has changed on the target database since the last time 'severity' was modified by user. + + + :param has_target_db_risk_level_changed: The has_target_db_risk_level_changed of this Finding. + :type: bool + """ + self._has_target_db_risk_level_changed = has_target_db_risk_level_changed + + @property + def justification(self): + """ + Gets the justification of this Finding. + User provided reason for accepting or modifying this finding if they choose to do so. + + + :return: The justification of this Finding. + :rtype: str + """ + return self._justification + + @justification.setter + def justification(self, justification): + """ + Sets the justification of this Finding. + User provided reason for accepting or modifying this finding if they choose to do so. + + + :param justification: The justification of this Finding. + :type: str + """ + self._justification = justification + + @property + def time_valid_until(self): + """ + Gets the time_valid_until of this Finding. + The time until which the change in severity(deferred/modified) of this finding is valid. + + + :return: The time_valid_until of this Finding. + :rtype: datetime + """ + return self._time_valid_until + + @time_valid_until.setter + def time_valid_until(self, time_valid_until): + """ + Sets the time_valid_until of this Finding. + The time until which the change in severity(deferred/modified) of this finding is valid. + + + :param time_valid_until: The time_valid_until of this Finding. + :type: datetime + """ + self._time_valid_until = time_valid_until + + @property + def time_updated(self): + """ + Gets the time_updated of this Finding. + The date and time the risk level of finding was last updated, in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_updated of this Finding. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this Finding. + The date and time the risk level of finding was last updated, in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_updated: The time_updated of this Finding. + :type: datetime + """ + self._time_updated = time_updated + + @property + def lifecycle_state(self): + """ + Gets the lifecycle_state of this Finding. + The current state of the finding. + + Allowed values for this property are: "ACTIVE", "UPDATING", "NEEDS_ATTENTION", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this Finding. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this Finding. + The current state of the finding. + + + :param lifecycle_state: The lifecycle_state of this Finding. + :type: str + """ + allowed_values = ["ACTIVE", "UPDATING", "NEEDS_ATTENTION", "FAILED"] + if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): + lifecycle_state = 'UNKNOWN_ENUM_VALUE' + self._lifecycle_state = lifecycle_state + + @property + def lifecycle_details(self): + """ + Gets the lifecycle_details of this Finding. + Details about the current state of the finding. + + + :return: The lifecycle_details of this Finding. + :rtype: str + """ + return self._lifecycle_details + + @lifecycle_details.setter + def lifecycle_details(self, lifecycle_details): + """ + Sets the lifecycle_details of this Finding. + Details about the current state of the finding. + + + :param lifecycle_details: The lifecycle_details of this Finding. + :type: str + """ + self._lifecycle_details = lifecycle_details + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/data_safe/models/finding_analytics_collection.py b/src/oci/data_safe/models/finding_analytics_collection.py new file mode 100644 index 0000000000..97ec3685e1 --- /dev/null +++ b/src/oci/data_safe/models/finding_analytics_collection.py @@ -0,0 +1,72 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20181201 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class FindingAnalyticsCollection(object): + """ + The collection of the summary objects of the analytics data of findings or top findings. + """ + + def __init__(self, **kwargs): + """ + Initializes a new FindingAnalyticsCollection object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param items: + The value to assign to the items property of this FindingAnalyticsCollection. + :type items: list[oci.data_safe.models.FindingAnalyticsSummary] + + """ + self.swagger_types = { + 'items': 'list[FindingAnalyticsSummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this FindingAnalyticsCollection. + The array of the summary objects of the analytics data of findings or top findings. + + + :return: The items of this FindingAnalyticsCollection. + :rtype: list[oci.data_safe.models.FindingAnalyticsSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this FindingAnalyticsCollection. + The array of the summary objects of the analytics data of findings or top findings. + + + :param items: The items of this FindingAnalyticsCollection. + :type: list[oci.data_safe.models.FindingAnalyticsSummary] + """ + self._items = items + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/finding_analytics_dimensions.py b/src/oci/data_safe/models/finding_analytics_dimensions.py new file mode 100644 index 0000000000..f1862d056a --- /dev/null +++ b/src/oci/data_safe/models/finding_analytics_dimensions.py @@ -0,0 +1,299 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20181201 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class FindingAnalyticsDimensions(object): + """ + The scope of analytics data. + """ + + #: A constant which can be used with the top_finding_status property of a FindingAnalyticsDimensions. + #: This constant has a value of "RISK" + TOP_FINDING_STATUS_RISK = "RISK" + + #: A constant which can be used with the top_finding_status property of a FindingAnalyticsDimensions. + #: This constant has a value of "EVALUATE" + TOP_FINDING_STATUS_EVALUATE = "EVALUATE" + + #: A constant which can be used with the top_finding_status property of a FindingAnalyticsDimensions. + #: This constant has a value of "ADVISORY" + TOP_FINDING_STATUS_ADVISORY = "ADVISORY" + + #: A constant which can be used with the top_finding_status property of a FindingAnalyticsDimensions. + #: This constant has a value of "PASS" + TOP_FINDING_STATUS_PASS = "PASS" + + #: A constant which can be used with the top_finding_status property of a FindingAnalyticsDimensions. + #: This constant has a value of "DEFERRED" + TOP_FINDING_STATUS_DEFERRED = "DEFERRED" + + #: A constant which can be used with the severity property of a FindingAnalyticsDimensions. + #: This constant has a value of "HIGH" + SEVERITY_HIGH = "HIGH" + + #: A constant which can be used with the severity property of a FindingAnalyticsDimensions. + #: This constant has a value of "MEDIUM" + SEVERITY_MEDIUM = "MEDIUM" + + #: A constant which can be used with the severity property of a FindingAnalyticsDimensions. + #: This constant has a value of "LOW" + SEVERITY_LOW = "LOW" + + #: A constant which can be used with the severity property of a FindingAnalyticsDimensions. + #: This constant has a value of "EVALUATE" + SEVERITY_EVALUATE = "EVALUATE" + + #: A constant which can be used with the severity property of a FindingAnalyticsDimensions. + #: This constant has a value of "ADVISORY" + SEVERITY_ADVISORY = "ADVISORY" + + #: A constant which can be used with the severity property of a FindingAnalyticsDimensions. + #: This constant has a value of "PASS" + SEVERITY_PASS = "PASS" + + #: A constant which can be used with the severity property of a FindingAnalyticsDimensions. + #: This constant has a value of "DEFERRED" + SEVERITY_DEFERRED = "DEFERRED" + + def __init__(self, **kwargs): + """ + Initializes a new FindingAnalyticsDimensions object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param key: + The value to assign to the key property of this FindingAnalyticsDimensions. + :type key: str + + :param top_finding_category: + The value to assign to the top_finding_category property of this FindingAnalyticsDimensions. + :type top_finding_category: str + + :param title: + The value to assign to the title property of this FindingAnalyticsDimensions. + :type title: str + + :param top_finding_status: + The value to assign to the top_finding_status property of this FindingAnalyticsDimensions. + Allowed values for this property are: "RISK", "EVALUATE", "ADVISORY", "PASS", "DEFERRED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type top_finding_status: str + + :param severity: + The value to assign to the severity property of this FindingAnalyticsDimensions. + Allowed values for this property are: "HIGH", "MEDIUM", "LOW", "EVALUATE", "ADVISORY", "PASS", "DEFERRED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type severity: str + + :param target_id: + The value to assign to the target_id property of this FindingAnalyticsDimensions. + :type target_id: str + + """ + self.swagger_types = { + 'key': 'str', + 'top_finding_category': 'str', + 'title': 'str', + 'top_finding_status': 'str', + 'severity': 'str', + 'target_id': 'str' + } + + self.attribute_map = { + 'key': 'key', + 'top_finding_category': 'topFindingCategory', + 'title': 'title', + 'top_finding_status': 'topFindingStatus', + 'severity': 'severity', + 'target_id': 'targetId' + } + + self._key = None + self._top_finding_category = None + self._title = None + self._top_finding_status = None + self._severity = None + self._target_id = None + + @property + def key(self): + """ + Gets the key of this FindingAnalyticsDimensions. + 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. + + + :return: The key of this FindingAnalyticsDimensions. + :rtype: str + """ + return self._key + + @key.setter + def key(self, key): + """ + Sets the key of this FindingAnalyticsDimensions. + 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 key: The key of this FindingAnalyticsDimensions. + :type: str + """ + self._key = key + + @property + def top_finding_category(self): + """ + Gets the top_finding_category of this FindingAnalyticsDimensions. + The category of the top finding. + + + :return: The top_finding_category of this FindingAnalyticsDimensions. + :rtype: str + """ + return self._top_finding_category + + @top_finding_category.setter + def top_finding_category(self, top_finding_category): + """ + Sets the top_finding_category of this FindingAnalyticsDimensions. + The category of the top finding. + + + :param top_finding_category: The top_finding_category of this FindingAnalyticsDimensions. + :type: str + """ + self._top_finding_category = top_finding_category + + @property + def title(self): + """ + Gets the title of this FindingAnalyticsDimensions. + The short title of the finding. + + + :return: The title of this FindingAnalyticsDimensions. + :rtype: str + """ + return self._title + + @title.setter + def title(self, title): + """ + Sets the title of this FindingAnalyticsDimensions. + The short title of the finding. + + + :param title: The title of this FindingAnalyticsDimensions. + :type: str + """ + self._title = title + + @property + def top_finding_status(self): + """ + Gets the top_finding_status of this FindingAnalyticsDimensions. + The status of the top finding. + All findings will have \"severity\" to indicate the risk level, but only top findings will have \"status\". + Possible status: Pass / Risk (Low, Medium, High)/ Evaluate / Advisory / Deferred + Instead of having \"Low, Medium, High\" in severity, \"Risk\" will include these three situations in status. + + Allowed values for this property are: "RISK", "EVALUATE", "ADVISORY", "PASS", "DEFERRED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The top_finding_status of this FindingAnalyticsDimensions. + :rtype: str + """ + return self._top_finding_status + + @top_finding_status.setter + def top_finding_status(self, top_finding_status): + """ + Sets the top_finding_status of this FindingAnalyticsDimensions. + The status of the top finding. + All findings will have \"severity\" to indicate the risk level, but only top findings will have \"status\". + Possible status: Pass / Risk (Low, Medium, High)/ Evaluate / Advisory / Deferred + Instead of having \"Low, Medium, High\" in severity, \"Risk\" will include these three situations in status. + + + :param top_finding_status: The top_finding_status of this FindingAnalyticsDimensions. + :type: str + """ + allowed_values = ["RISK", "EVALUATE", "ADVISORY", "PASS", "DEFERRED"] + if not value_allowed_none_or_none_sentinel(top_finding_status, allowed_values): + top_finding_status = 'UNKNOWN_ENUM_VALUE' + self._top_finding_status = top_finding_status + + @property + def severity(self): + """ + Gets the severity of this FindingAnalyticsDimensions. + The severity (risk level) of the finding. + + Allowed values for this property are: "HIGH", "MEDIUM", "LOW", "EVALUATE", "ADVISORY", "PASS", "DEFERRED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The severity of this FindingAnalyticsDimensions. + :rtype: str + """ + return self._severity + + @severity.setter + def severity(self, severity): + """ + Sets the severity of this FindingAnalyticsDimensions. + The severity (risk level) of the finding. + + + :param severity: The severity of this FindingAnalyticsDimensions. + :type: str + """ + allowed_values = ["HIGH", "MEDIUM", "LOW", "EVALUATE", "ADVISORY", "PASS", "DEFERRED"] + if not value_allowed_none_or_none_sentinel(severity, allowed_values): + severity = 'UNKNOWN_ENUM_VALUE' + self._severity = severity + + @property + def target_id(self): + """ + Gets the target_id of this FindingAnalyticsDimensions. + The OCID of the target database. + + + :return: The target_id of this FindingAnalyticsDimensions. + :rtype: str + """ + return self._target_id + + @target_id.setter + def target_id(self, target_id): + """ + Sets the target_id of this FindingAnalyticsDimensions. + The OCID of the target database. + + + :param target_id: The target_id of this FindingAnalyticsDimensions. + :type: str + """ + self._target_id = target_id + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/finding_analytics_summary.py b/src/oci/data_safe/models/finding_analytics_summary.py new file mode 100644 index 0000000000..2de2e7aec4 --- /dev/null +++ b/src/oci/data_safe/models/finding_analytics_summary.py @@ -0,0 +1,148 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20181201 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class FindingAnalyticsSummary(object): + """ + The summary of information about the analytics data of findings or top findings. + It includes details such as metric name, findinKey, + title (topFindingCategory for top finding), severity (topFindingStatus for top finding) and targetId. + """ + + #: A constant which can be used with the metric_name property of a FindingAnalyticsSummary. + #: This constant has a value of "TOP_FINDING_STATS" + METRIC_NAME_TOP_FINDING_STATS = "TOP_FINDING_STATS" + + #: A constant which can be used with the metric_name property of a FindingAnalyticsSummary. + #: This constant has a value of "FINDING_STATS" + METRIC_NAME_FINDING_STATS = "FINDING_STATS" + + def __init__(self, **kwargs): + """ + Initializes a new FindingAnalyticsSummary object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param metric_name: + The value to assign to the metric_name property of this FindingAnalyticsSummary. + Allowed values for this property are: "TOP_FINDING_STATS", "FINDING_STATS", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type metric_name: str + + :param dimensions: + The value to assign to the dimensions property of this FindingAnalyticsSummary. + :type dimensions: oci.data_safe.models.FindingAnalyticsDimensions + + :param count: + The value to assign to the count property of this FindingAnalyticsSummary. + :type count: int + + """ + self.swagger_types = { + 'metric_name': 'str', + 'dimensions': 'FindingAnalyticsDimensions', + 'count': 'int' + } + + self.attribute_map = { + 'metric_name': 'metricName', + 'dimensions': 'dimensions', + 'count': 'count' + } + + self._metric_name = None + self._dimensions = None + self._count = None + + @property + def metric_name(self): + """ + **[Required]** Gets the metric_name of this FindingAnalyticsSummary. + The name of the aggregation metric. + + Allowed values for this property are: "TOP_FINDING_STATS", "FINDING_STATS", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The metric_name of this FindingAnalyticsSummary. + :rtype: str + """ + return self._metric_name + + @metric_name.setter + def metric_name(self, metric_name): + """ + Sets the metric_name of this FindingAnalyticsSummary. + The name of the aggregation metric. + + + :param metric_name: The metric_name of this FindingAnalyticsSummary. + :type: str + """ + allowed_values = ["TOP_FINDING_STATS", "FINDING_STATS"] + if not value_allowed_none_or_none_sentinel(metric_name, allowed_values): + metric_name = 'UNKNOWN_ENUM_VALUE' + self._metric_name = metric_name + + @property + def dimensions(self): + """ + Gets the dimensions of this FindingAnalyticsSummary. + + :return: The dimensions of this FindingAnalyticsSummary. + :rtype: oci.data_safe.models.FindingAnalyticsDimensions + """ + return self._dimensions + + @dimensions.setter + def dimensions(self, dimensions): + """ + Sets the dimensions of this FindingAnalyticsSummary. + + :param dimensions: The dimensions of this FindingAnalyticsSummary. + :type: oci.data_safe.models.FindingAnalyticsDimensions + """ + self._dimensions = dimensions + + @property + def count(self): + """ + **[Required]** Gets the count of this FindingAnalyticsSummary. + The total count for the aggregation metric. + + + :return: The count of this FindingAnalyticsSummary. + :rtype: int + """ + return self._count + + @count.setter + def count(self, count): + """ + Sets the count of this FindingAnalyticsSummary. + The total count for the aggregation metric. + + + :param count: The count of this FindingAnalyticsSummary. + :type: int + """ + self._count = count + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/finding_summary.py b/src/oci/data_safe/models/finding_summary.py index d1d10b859b..1bf7eb9bb0 100644 --- a/src/oci/data_safe/models/finding_summary.py +++ b/src/oci/data_safe/models/finding_summary.py @@ -39,6 +39,26 @@ class FindingSummary(object): #: This constant has a value of "PASS" SEVERITY_PASS = "PASS" + #: A constant which can be used with the severity property of a FindingSummary. + #: This constant has a value of "DEFERRED" + SEVERITY_DEFERRED = "DEFERRED" + + #: A constant which can be used with the lifecycle_state property of a FindingSummary. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a FindingSummary. + #: This constant has a value of "UPDATING" + LIFECYCLE_STATE_UPDATING = "UPDATING" + + #: A constant which can be used with the lifecycle_state property of a FindingSummary. + #: This constant has a value of "NEEDS_ATTENTION" + LIFECYCLE_STATE_NEEDS_ATTENTION = "NEEDS_ATTENTION" + + #: A constant which can be used with the lifecycle_state property of a FindingSummary. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + def __init__(self, **kwargs): """ Initializes a new FindingSummary object with values from keyword arguments. @@ -46,7 +66,7 @@ def __init__(self, **kwargs): :param severity: The value to assign to the severity property of this FindingSummary. - Allowed values for this property are: "HIGH", "MEDIUM", "LOW", "EVALUATE", "ADVISORY", "PASS", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "HIGH", "MEDIUM", "LOW", "EVALUATE", "ADVISORY", "PASS", "DEFERRED", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type severity: str @@ -62,6 +82,10 @@ def __init__(self, **kwargs): The value to assign to the key property of this FindingSummary. :type key: str + :param is_top_finding: + The value to assign to the is_top_finding property of this FindingSummary. + :type is_top_finding: bool + :param title: The value to assign to the title property of this FindingSummary. :type title: str @@ -82,17 +106,60 @@ def __init__(self, **kwargs): The value to assign to the references property of this FindingSummary. :type references: oci.data_safe.models.References + :param oracle_defined_severity: + The value to assign to the oracle_defined_severity property of this FindingSummary. + :type oracle_defined_severity: str + + :param is_risk_modified: + The value to assign to the is_risk_modified property of this FindingSummary. + :type is_risk_modified: bool + + :param has_target_db_risk_level_changed: + The value to assign to the has_target_db_risk_level_changed property of this FindingSummary. + :type has_target_db_risk_level_changed: bool + + :param justification: + The value to assign to the justification property of this FindingSummary. + :type justification: str + + :param time_valid_until: + The value to assign to the time_valid_until property of this FindingSummary. + :type time_valid_until: datetime + + :param time_updated: + The value to assign to the time_updated property of this FindingSummary. + :type time_updated: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this FindingSummary. + Allowed values for this property are: "ACTIVE", "UPDATING", "NEEDS_ATTENTION", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param lifecycle_details: + The value to assign to the lifecycle_details property of this FindingSummary. + :type lifecycle_details: str + """ self.swagger_types = { 'severity': 'str', 'assessment_id': 'str', 'target_id': 'str', 'key': 'str', + 'is_top_finding': 'bool', 'title': 'str', 'remarks': 'str', 'details': 'object', 'summary': 'str', - 'references': 'References' + 'references': 'References', + 'oracle_defined_severity': 'str', + 'is_risk_modified': 'bool', + 'has_target_db_risk_level_changed': 'bool', + 'justification': 'str', + 'time_valid_until': 'datetime', + 'time_updated': 'datetime', + 'lifecycle_state': 'str', + 'lifecycle_details': 'str' } self.attribute_map = { @@ -100,22 +167,40 @@ def __init__(self, **kwargs): 'assessment_id': 'assessmentId', 'target_id': 'targetId', 'key': 'key', + 'is_top_finding': 'isTopFinding', 'title': 'title', 'remarks': 'remarks', 'details': 'details', 'summary': 'summary', - 'references': 'references' + 'references': 'references', + 'oracle_defined_severity': 'oracleDefinedSeverity', + 'is_risk_modified': 'isRiskModified', + 'has_target_db_risk_level_changed': 'hasTargetDbRiskLevelChanged', + 'justification': 'justification', + 'time_valid_until': 'timeValidUntil', + 'time_updated': 'timeUpdated', + 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails' } self._severity = None self._assessment_id = None self._target_id = None self._key = None + self._is_top_finding = None self._title = None self._remarks = None self._details = None self._summary = None self._references = None + self._oracle_defined_severity = None + self._is_risk_modified = None + self._has_target_db_risk_level_changed = None + self._justification = None + self._time_valid_until = None + self._time_updated = None + self._lifecycle_state = None + self._lifecycle_details = None @property def severity(self): @@ -123,7 +208,7 @@ def severity(self): Gets the severity of this FindingSummary. The severity of the finding as determined by security assessment and is same as oracleDefinedSeverity, unless modified by user. - Allowed values for this property are: "HIGH", "MEDIUM", "LOW", "EVALUATE", "ADVISORY", "PASS", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "HIGH", "MEDIUM", "LOW", "EVALUATE", "ADVISORY", "PASS", "DEFERRED", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -142,7 +227,7 @@ def severity(self, severity): :param severity: The severity of this FindingSummary. :type: str """ - allowed_values = ["HIGH", "MEDIUM", "LOW", "EVALUATE", "ADVISORY", "PASS"] + allowed_values = ["HIGH", "MEDIUM", "LOW", "EVALUATE", "ADVISORY", "PASS", "DEFERRED"] if not value_allowed_none_or_none_sentinel(severity, allowed_values): severity = 'UNKNOWN_ENUM_VALUE' self._severity = severity @@ -219,6 +304,30 @@ def key(self, key): """ self._key = key + @property + def is_top_finding(self): + """ + Gets the is_top_finding of this FindingSummary. + Indicates whether a given finding is marked as topFinding or not. + + + :return: The is_top_finding of this FindingSummary. + :rtype: bool + """ + return self._is_top_finding + + @is_top_finding.setter + def is_top_finding(self, is_top_finding): + """ + Sets the is_top_finding of this FindingSummary. + Indicates whether a given finding is marked as topFinding or not. + + + :param is_top_finding: The is_top_finding of this FindingSummary. + :type: bool + """ + self._is_top_finding = is_top_finding + @property def title(self): """ @@ -339,6 +448,208 @@ def references(self, references): """ self._references = references + @property + def oracle_defined_severity(self): + """ + Gets the oracle_defined_severity of this FindingSummary. + The severity of the finding as determined by security assessment. This cannot be modified by user. + + + :return: The oracle_defined_severity of this FindingSummary. + :rtype: str + """ + return self._oracle_defined_severity + + @oracle_defined_severity.setter + def oracle_defined_severity(self, oracle_defined_severity): + """ + Sets the oracle_defined_severity of this FindingSummary. + The severity of the finding as determined by security assessment. This cannot be modified by user. + + + :param oracle_defined_severity: The oracle_defined_severity of this FindingSummary. + :type: str + """ + self._oracle_defined_severity = oracle_defined_severity + + @property + def is_risk_modified(self): + """ + Gets the is_risk_modified of this FindingSummary. + Determines if this risk level was modified by user. + + + :return: The is_risk_modified of this FindingSummary. + :rtype: bool + """ + return self._is_risk_modified + + @is_risk_modified.setter + def is_risk_modified(self, is_risk_modified): + """ + Sets the is_risk_modified of this FindingSummary. + Determines if this risk level was modified by user. + + + :param is_risk_modified: The is_risk_modified of this FindingSummary. + :type: bool + """ + self._is_risk_modified = is_risk_modified + + @property + def has_target_db_risk_level_changed(self): + """ + Gets the has_target_db_risk_level_changed of this FindingSummary. + Determines if this risk level has changed on the target database since the last time 'severity' was modified by user. + + + :return: The has_target_db_risk_level_changed of this FindingSummary. + :rtype: bool + """ + return self._has_target_db_risk_level_changed + + @has_target_db_risk_level_changed.setter + def has_target_db_risk_level_changed(self, has_target_db_risk_level_changed): + """ + Sets the has_target_db_risk_level_changed of this FindingSummary. + Determines if this risk level has changed on the target database since the last time 'severity' was modified by user. + + + :param has_target_db_risk_level_changed: The has_target_db_risk_level_changed of this FindingSummary. + :type: bool + """ + self._has_target_db_risk_level_changed = has_target_db_risk_level_changed + + @property + def justification(self): + """ + Gets the justification of this FindingSummary. + User provided reason for accepting or modifying this finding if they choose to do so. + + + :return: The justification of this FindingSummary. + :rtype: str + """ + return self._justification + + @justification.setter + def justification(self, justification): + """ + Sets the justification of this FindingSummary. + User provided reason for accepting or modifying this finding if they choose to do so. + + + :param justification: The justification of this FindingSummary. + :type: str + """ + self._justification = justification + + @property + def time_valid_until(self): + """ + Gets the time_valid_until of this FindingSummary. + The time until which the change in severity(deferred / modified) of this finding is valid. + + + :return: The time_valid_until of this FindingSummary. + :rtype: datetime + """ + return self._time_valid_until + + @time_valid_until.setter + def time_valid_until(self, time_valid_until): + """ + Sets the time_valid_until of this FindingSummary. + The time until which the change in severity(deferred / modified) of this finding is valid. + + + :param time_valid_until: The time_valid_until of this FindingSummary. + :type: datetime + """ + self._time_valid_until = time_valid_until + + @property + def time_updated(self): + """ + Gets the time_updated of this FindingSummary. + The date and time the risk level of finding was last updated, in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_updated of this FindingSummary. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this FindingSummary. + The date and time the risk level of finding was last updated, in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_updated: The time_updated of this FindingSummary. + :type: datetime + """ + self._time_updated = time_updated + + @property + def lifecycle_state(self): + """ + Gets the lifecycle_state of this FindingSummary. + The current state of the finding. + + Allowed values for this property are: "ACTIVE", "UPDATING", "NEEDS_ATTENTION", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this FindingSummary. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this FindingSummary. + The current state of the finding. + + + :param lifecycle_state: The lifecycle_state of this FindingSummary. + :type: str + """ + allowed_values = ["ACTIVE", "UPDATING", "NEEDS_ATTENTION", "FAILED"] + if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): + lifecycle_state = 'UNKNOWN_ENUM_VALUE' + self._lifecycle_state = lifecycle_state + + @property + def lifecycle_details(self): + """ + Gets the lifecycle_details of this FindingSummary. + Details about the current state of the finding. + + + :return: The lifecycle_details of this FindingSummary. + :rtype: str + """ + return self._lifecycle_details + + @lifecycle_details.setter + def lifecycle_details(self, lifecycle_details): + """ + Sets the lifecycle_details of this FindingSummary. + Details about the current state of the finding. + + + :param lifecycle_details: The lifecycle_details of this FindingSummary. + :type: str + """ + self._lifecycle_details = lifecycle_details + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/data_safe/models/findings_change_audit_log_collection.py b/src/oci/data_safe/models/findings_change_audit_log_collection.py new file mode 100644 index 0000000000..5dbbc10b1b --- /dev/null +++ b/src/oci/data_safe/models/findings_change_audit_log_collection.py @@ -0,0 +1,72 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20181201 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class FindingsChangeAuditLogCollection(object): + """ + A collection of of all finding risk change audit log summary objects. + """ + + def __init__(self, **kwargs): + """ + Initializes a new FindingsChangeAuditLogCollection object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param items: + The value to assign to the items property of this FindingsChangeAuditLogCollection. + :type items: list[oci.data_safe.models.FindingsChangeAuditLogSummary] + + """ + self.swagger_types = { + 'items': 'list[FindingsChangeAuditLogSummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this FindingsChangeAuditLogCollection. + An array of finding risk change audit log summary objects. + + + :return: The items of this FindingsChangeAuditLogCollection. + :rtype: list[oci.data_safe.models.FindingsChangeAuditLogSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this FindingsChangeAuditLogCollection. + An array of finding risk change audit log summary objects. + + + :param items: The items of this FindingsChangeAuditLogCollection. + :type: list[oci.data_safe.models.FindingsChangeAuditLogSummary] + """ + self._items = items + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/findings_change_audit_log_summary.py b/src/oci/data_safe/models/findings_change_audit_log_summary.py new file mode 100644 index 0000000000..bbe234ae76 --- /dev/null +++ b/src/oci/data_safe/models/findings_change_audit_log_summary.py @@ -0,0 +1,458 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20181201 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class FindingsChangeAuditLogSummary(object): + """ + Summary of audit log of risk updates of findings of specified security assessment. + """ + + def __init__(self, **kwargs): + """ + Initializes a new FindingsChangeAuditLogSummary object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param key: + The value to assign to the key property of this FindingsChangeAuditLogSummary. + :type key: str + + :param finding_key: + The value to assign to the finding_key property of this FindingsChangeAuditLogSummary. + :type finding_key: str + + :param finding_title: + The value to assign to the finding_title property of this FindingsChangeAuditLogSummary. + :type finding_title: str + + :param assessment_id: + The value to assign to the assessment_id property of this FindingsChangeAuditLogSummary. + :type assessment_id: str + + :param target_id: + The value to assign to the target_id property of this FindingsChangeAuditLogSummary. + :type target_id: str + + :param time_updated: + The value to assign to the time_updated property of this FindingsChangeAuditLogSummary. + :type time_updated: datetime + + :param severity: + The value to assign to the severity property of this FindingsChangeAuditLogSummary. + :type severity: str + + :param oracle_defined_severity: + The value to assign to the oracle_defined_severity property of this FindingsChangeAuditLogSummary. + :type oracle_defined_severity: str + + :param is_risk_deferred: + The value to assign to the is_risk_deferred property of this FindingsChangeAuditLogSummary. + :type is_risk_deferred: bool + + :param previous_severity: + The value to assign to the previous_severity property of this FindingsChangeAuditLogSummary. + :type previous_severity: str + + :param justification: + The value to assign to the justification property of this FindingsChangeAuditLogSummary. + :type justification: str + + :param time_valid_until: + The value to assign to the time_valid_until property of this FindingsChangeAuditLogSummary. + :type time_valid_until: datetime + + :param modified_by: + The value to assign to the modified_by property of this FindingsChangeAuditLogSummary. + :type modified_by: str + + """ + self.swagger_types = { + 'key': 'str', + 'finding_key': 'str', + 'finding_title': 'str', + 'assessment_id': 'str', + 'target_id': 'str', + 'time_updated': 'datetime', + 'severity': 'str', + 'oracle_defined_severity': 'str', + 'is_risk_deferred': 'bool', + 'previous_severity': 'str', + 'justification': 'str', + 'time_valid_until': 'datetime', + 'modified_by': 'str' + } + + self.attribute_map = { + 'key': 'key', + 'finding_key': 'findingKey', + 'finding_title': 'findingTitle', + 'assessment_id': 'assessmentId', + 'target_id': 'targetId', + 'time_updated': 'timeUpdated', + 'severity': 'severity', + 'oracle_defined_severity': 'oracleDefinedSeverity', + 'is_risk_deferred': 'isRiskDeferred', + 'previous_severity': 'previousSeverity', + 'justification': 'justification', + 'time_valid_until': 'timeValidUntil', + 'modified_by': 'modifiedBy' + } + + self._key = None + self._finding_key = None + self._finding_title = None + self._assessment_id = None + self._target_id = None + self._time_updated = None + self._severity = None + self._oracle_defined_severity = None + self._is_risk_deferred = None + self._previous_severity = None + self._justification = None + self._time_valid_until = None + self._modified_by = None + + @property + def key(self): + """ + **[Required]** Gets the key of this FindingsChangeAuditLogSummary. + The unique key that identifies the finding risk change. + + + :return: The key of this FindingsChangeAuditLogSummary. + :rtype: str + """ + return self._key + + @key.setter + def key(self, key): + """ + Sets the key of this FindingsChangeAuditLogSummary. + The unique key that identifies the finding risk change. + + + :param key: The key of this FindingsChangeAuditLogSummary. + :type: str + """ + self._key = key + + @property + def finding_key(self): + """ + **[Required]** Gets the finding_key of this FindingsChangeAuditLogSummary. + The unique key that identifies the finding. + + + :return: The finding_key of this FindingsChangeAuditLogSummary. + :rtype: str + """ + return self._finding_key + + @finding_key.setter + def finding_key(self, finding_key): + """ + Sets the finding_key of this FindingsChangeAuditLogSummary. + The unique key that identifies the finding. + + + :param finding_key: The finding_key of this FindingsChangeAuditLogSummary. + :type: str + """ + self._finding_key = finding_key + + @property + def finding_title(self): + """ + **[Required]** Gets the finding_title of this FindingsChangeAuditLogSummary. + The short title for the finding whose risk is being modified. + + + :return: The finding_title of this FindingsChangeAuditLogSummary. + :rtype: str + """ + return self._finding_title + + @finding_title.setter + def finding_title(self, finding_title): + """ + Sets the finding_title of this FindingsChangeAuditLogSummary. + The short title for the finding whose risk is being modified. + + + :param finding_title: The finding_title of this FindingsChangeAuditLogSummary. + :type: str + """ + self._finding_title = finding_title + + @property + def assessment_id(self): + """ + **[Required]** Gets the assessment_id of this FindingsChangeAuditLogSummary. + The OCID of the latest security assessment. + + + :return: The assessment_id of this FindingsChangeAuditLogSummary. + :rtype: str + """ + return self._assessment_id + + @assessment_id.setter + def assessment_id(self, assessment_id): + """ + Sets the assessment_id of this FindingsChangeAuditLogSummary. + The OCID of the latest security assessment. + + + :param assessment_id: The assessment_id of this FindingsChangeAuditLogSummary. + :type: str + """ + self._assessment_id = assessment_id + + @property + def target_id(self): + """ + **[Required]** Gets the target_id of this FindingsChangeAuditLogSummary. + The OCID of the target database. + + + :return: The target_id of this FindingsChangeAuditLogSummary. + :rtype: str + """ + return self._target_id + + @target_id.setter + def target_id(self, target_id): + """ + Sets the target_id of this FindingsChangeAuditLogSummary. + The OCID of the target database. + + + :param target_id: The target_id of this FindingsChangeAuditLogSummary. + :type: str + """ + self._target_id = target_id + + @property + def time_updated(self): + """ + **[Required]** Gets the time_updated of this FindingsChangeAuditLogSummary. + The date and time the risk level of finding was last updated, in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_updated of this FindingsChangeAuditLogSummary. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this FindingsChangeAuditLogSummary. + The date and time the risk level of finding was last updated, in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_updated: The time_updated of this FindingsChangeAuditLogSummary. + :type: datetime + """ + self._time_updated = time_updated + + @property + def severity(self): + """ + **[Required]** Gets the severity of this FindingsChangeAuditLogSummary. + The original severity / risk level of the finding as determined by security assessment. + + + :return: The severity of this FindingsChangeAuditLogSummary. + :rtype: str + """ + return self._severity + + @severity.setter + def severity(self, severity): + """ + Sets the severity of this FindingsChangeAuditLogSummary. + The original severity / risk level of the finding as determined by security assessment. + + + :param severity: The severity of this FindingsChangeAuditLogSummary. + :type: str + """ + self._severity = severity + + @property + def oracle_defined_severity(self): + """ + **[Required]** Gets the oracle_defined_severity of this FindingsChangeAuditLogSummary. + The severity of the finding as determined by security assessment by Oracle. + + + :return: The oracle_defined_severity of this FindingsChangeAuditLogSummary. + :rtype: str + """ + return self._oracle_defined_severity + + @oracle_defined_severity.setter + def oracle_defined_severity(self, oracle_defined_severity): + """ + Sets the oracle_defined_severity of this FindingsChangeAuditLogSummary. + The severity of the finding as determined by security assessment by Oracle. + + + :param oracle_defined_severity: The oracle_defined_severity of this FindingsChangeAuditLogSummary. + :type: str + """ + self._oracle_defined_severity = oracle_defined_severity + + @property + def is_risk_deferred(self): + """ + **[Required]** Gets the is_risk_deferred of this FindingsChangeAuditLogSummary. + Determines if the user has deferred the risk level of this finding when he is ok with it + and does not plan to do anything about it. + + + :return: The is_risk_deferred of this FindingsChangeAuditLogSummary. + :rtype: bool + """ + return self._is_risk_deferred + + @is_risk_deferred.setter + def is_risk_deferred(self, is_risk_deferred): + """ + Sets the is_risk_deferred of this FindingsChangeAuditLogSummary. + Determines if the user has deferred the risk level of this finding when he is ok with it + and does not plan to do anything about it. + + + :param is_risk_deferred: The is_risk_deferred of this FindingsChangeAuditLogSummary. + :type: bool + """ + self._is_risk_deferred = is_risk_deferred + + @property + def previous_severity(self): + """ + **[Required]** Gets the previous_severity of this FindingsChangeAuditLogSummary. + If the risk level is changed more than once, the previous modified value. + + + :return: The previous_severity of this FindingsChangeAuditLogSummary. + :rtype: str + """ + return self._previous_severity + + @previous_severity.setter + def previous_severity(self, previous_severity): + """ + Sets the previous_severity of this FindingsChangeAuditLogSummary. + If the risk level is changed more than once, the previous modified value. + + + :param previous_severity: The previous_severity of this FindingsChangeAuditLogSummary. + :type: str + """ + self._previous_severity = previous_severity + + @property + def justification(self): + """ + **[Required]** Gets the justification of this FindingsChangeAuditLogSummary. + The justification given by the user for accepting or modifying the risk level. + + + :return: The justification of this FindingsChangeAuditLogSummary. + :rtype: str + """ + return self._justification + + @justification.setter + def justification(self, justification): + """ + Sets the justification of this FindingsChangeAuditLogSummary. + The justification given by the user for accepting or modifying the risk level. + + + :param justification: The justification of this FindingsChangeAuditLogSummary. + :type: str + """ + self._justification = justification + + @property + def time_valid_until(self): + """ + Gets the time_valid_until of this FindingsChangeAuditLogSummary. + The date and time, in the format defined by `RFC3339`__, + the risk level change as updated by user is valid until. After this date passes, the risk level + will be that of what is determined by the latest security assessment. + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_valid_until of this FindingsChangeAuditLogSummary. + :rtype: datetime + """ + return self._time_valid_until + + @time_valid_until.setter + def time_valid_until(self, time_valid_until): + """ + Sets the time_valid_until of this FindingsChangeAuditLogSummary. + The date and time, in the format defined by `RFC3339`__, + the risk level change as updated by user is valid until. After this date passes, the risk level + will be that of what is determined by the latest security assessment. + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_valid_until: The time_valid_until of this FindingsChangeAuditLogSummary. + :type: datetime + """ + self._time_valid_until = time_valid_until + + @property + def modified_by(self): + """ + **[Required]** Gets the modified_by of this FindingsChangeAuditLogSummary. + The user who initiated change of risk level of the finding + + + :return: The modified_by of this FindingsChangeAuditLogSummary. + :rtype: str + """ + return self._modified_by + + @modified_by.setter + def modified_by(self, modified_by): + """ + Sets the modified_by of this FindingsChangeAuditLogSummary. + The user who initiated change of risk level of the finding + + + :param modified_by: The modified_by of this FindingsChangeAuditLogSummary. + :type: str + """ + self._modified_by = modified_by + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/peer_target_database.py b/src/oci/data_safe/models/peer_target_database.py new file mode 100644 index 0000000000..f6886e1081 --- /dev/null +++ b/src/oci/data_safe/models/peer_target_database.py @@ -0,0 +1,414 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20181201 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class PeerTargetDatabase(object): + """ + The details of the peer target database in Data Safe. + """ + + #: A constant which can be used with the lifecycle_state property of a PeerTargetDatabase. + #: This constant has a value of "CREATING" + LIFECYCLE_STATE_CREATING = "CREATING" + + #: A constant which can be used with the lifecycle_state property of a PeerTargetDatabase. + #: This constant has a value of "UPDATING" + LIFECYCLE_STATE_UPDATING = "UPDATING" + + #: A constant which can be used with the lifecycle_state property of a PeerTargetDatabase. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a PeerTargetDatabase. + #: This constant has a value of "INACTIVE" + LIFECYCLE_STATE_INACTIVE = "INACTIVE" + + #: A constant which can be used with the lifecycle_state property of a PeerTargetDatabase. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + #: A constant which can be used with the lifecycle_state property of a PeerTargetDatabase. + #: This constant has a value of "DELETED" + LIFECYCLE_STATE_DELETED = "DELETED" + + #: A constant which can be used with the lifecycle_state property of a PeerTargetDatabase. + #: This constant has a value of "NEEDS_ATTENTION" + LIFECYCLE_STATE_NEEDS_ATTENTION = "NEEDS_ATTENTION" + + #: A constant which can be used with the lifecycle_state property of a PeerTargetDatabase. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + def __init__(self, **kwargs): + """ + Initializes a new PeerTargetDatabase object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param display_name: + The value to assign to the display_name property of this PeerTargetDatabase. + :type display_name: str + + :param description: + The value to assign to the description property of this PeerTargetDatabase. + :type description: str + + :param key: + The value to assign to the key property of this PeerTargetDatabase. + :type key: int + + :param dataguard_association_id: + The value to assign to the dataguard_association_id property of this PeerTargetDatabase. + :type dataguard_association_id: str + + :param time_created: + The value to assign to the time_created property of this PeerTargetDatabase. + :type time_created: datetime + + :param role: + The value to assign to the role property of this PeerTargetDatabase. + :type role: str + + :param database_unique_name: + The value to assign to the database_unique_name property of this PeerTargetDatabase. + :type database_unique_name: str + + :param database_details: + The value to assign to the database_details property of this PeerTargetDatabase. + :type database_details: oci.data_safe.models.DatabaseDetails + + :param tls_config: + The value to assign to the tls_config property of this PeerTargetDatabase. + :type tls_config: oci.data_safe.models.TlsConfig + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this PeerTargetDatabase. + Allowed values for this property are: "CREATING", "UPDATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", "NEEDS_ATTENTION", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param lifecycle_details: + The value to assign to the lifecycle_details property of this PeerTargetDatabase. + :type lifecycle_details: str + + """ + self.swagger_types = { + 'display_name': 'str', + 'description': 'str', + 'key': 'int', + 'dataguard_association_id': 'str', + 'time_created': 'datetime', + 'role': 'str', + 'database_unique_name': 'str', + 'database_details': 'DatabaseDetails', + 'tls_config': 'TlsConfig', + 'lifecycle_state': 'str', + 'lifecycle_details': 'str' + } + + self.attribute_map = { + 'display_name': 'displayName', + 'description': 'description', + 'key': 'key', + 'dataguard_association_id': 'dataguardAssociationId', + 'time_created': 'timeCreated', + 'role': 'role', + 'database_unique_name': 'databaseUniqueName', + 'database_details': 'databaseDetails', + 'tls_config': 'tlsConfig', + 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails' + } + + self._display_name = None + self._description = None + self._key = None + self._dataguard_association_id = None + self._time_created = None + self._role = None + self._database_unique_name = None + self._database_details = None + self._tls_config = None + self._lifecycle_state = None + self._lifecycle_details = None + + @property + def display_name(self): + """ + **[Required]** Gets the display_name of this PeerTargetDatabase. + The display name of the peer target database in Data Safe. + + + :return: The display_name of this PeerTargetDatabase. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this PeerTargetDatabase. + The display name of the peer target database in Data Safe. + + + :param display_name: The display_name of this PeerTargetDatabase. + :type: str + """ + self._display_name = display_name + + @property + def description(self): + """ + Gets the description of this PeerTargetDatabase. + The description of the peer target database in Data Safe. + + + :return: The description of this PeerTargetDatabase. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this PeerTargetDatabase. + The description of the peer target database in Data Safe. + + + :param description: The description of this PeerTargetDatabase. + :type: str + """ + self._description = description + + @property + def key(self): + """ + **[Required]** Gets the key of this PeerTargetDatabase. + The secondary key assigned for the peer target database in Data Safe. + + + :return: The key of this PeerTargetDatabase. + :rtype: int + """ + return self._key + + @key.setter + def key(self, key): + """ + Sets the key of this PeerTargetDatabase. + The secondary key assigned for the peer target database in Data Safe. + + + :param key: The key of this PeerTargetDatabase. + :type: int + """ + self._key = key + + @property + def dataguard_association_id(self): + """ + **[Required]** Gets the dataguard_association_id of this PeerTargetDatabase. + The OCID of the Data Guard Association resource in which the database associated to the peer target database is considered as peer database to the primary database. + + + :return: The dataguard_association_id of this PeerTargetDatabase. + :rtype: str + """ + return self._dataguard_association_id + + @dataguard_association_id.setter + def dataguard_association_id(self, dataguard_association_id): + """ + Sets the dataguard_association_id of this PeerTargetDatabase. + The OCID of the Data Guard Association resource in which the database associated to the peer target database is considered as peer database to the primary database. + + + :param dataguard_association_id: The dataguard_association_id of this PeerTargetDatabase. + :type: str + """ + self._dataguard_association_id = dataguard_association_id + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this PeerTargetDatabase. + The date and time of the peer target database registration in Data Safe. + + + :return: The time_created of this PeerTargetDatabase. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this PeerTargetDatabase. + The date and time of the peer target database registration in Data Safe. + + + :param time_created: The time_created of this PeerTargetDatabase. + :type: datetime + """ + self._time_created = time_created + + @property + def role(self): + """ + Gets the role of this PeerTargetDatabase. + Role of the database associated to the peer target database. + + + :return: The role of this PeerTargetDatabase. + :rtype: str + """ + return self._role + + @role.setter + def role(self, role): + """ + Sets the role of this PeerTargetDatabase. + Role of the database associated to the peer target database. + + + :param role: The role of this PeerTargetDatabase. + :type: str + """ + self._role = role + + @property + def database_unique_name(self): + """ + Gets the database_unique_name of this PeerTargetDatabase. + Unique name of the database associated to the peer target database. + + + :return: The database_unique_name of this PeerTargetDatabase. + :rtype: str + """ + return self._database_unique_name + + @database_unique_name.setter + def database_unique_name(self, database_unique_name): + """ + Sets the database_unique_name of this PeerTargetDatabase. + Unique name of the database associated to the peer target database. + + + :param database_unique_name: The database_unique_name of this PeerTargetDatabase. + :type: str + """ + self._database_unique_name = database_unique_name + + @property + def database_details(self): + """ + **[Required]** Gets the database_details of this PeerTargetDatabase. + + :return: The database_details of this PeerTargetDatabase. + :rtype: oci.data_safe.models.DatabaseDetails + """ + return self._database_details + + @database_details.setter + def database_details(self, database_details): + """ + Sets the database_details of this PeerTargetDatabase. + + :param database_details: The database_details of this PeerTargetDatabase. + :type: oci.data_safe.models.DatabaseDetails + """ + self._database_details = database_details + + @property + def tls_config(self): + """ + Gets the tls_config of this PeerTargetDatabase. + + :return: The tls_config of this PeerTargetDatabase. + :rtype: oci.data_safe.models.TlsConfig + """ + return self._tls_config + + @tls_config.setter + def tls_config(self, tls_config): + """ + Sets the tls_config of this PeerTargetDatabase. + + :param tls_config: The tls_config of this PeerTargetDatabase. + :type: oci.data_safe.models.TlsConfig + """ + self._tls_config = tls_config + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this PeerTargetDatabase. + The current state of the peer target database in Data Safe. + + Allowed values for this property are: "CREATING", "UPDATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", "NEEDS_ATTENTION", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this PeerTargetDatabase. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this PeerTargetDatabase. + The current state of the peer target database in Data Safe. + + + :param lifecycle_state: The lifecycle_state of this PeerTargetDatabase. + :type: str + """ + allowed_values = ["CREATING", "UPDATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", "NEEDS_ATTENTION", "FAILED"] + if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): + lifecycle_state = 'UNKNOWN_ENUM_VALUE' + self._lifecycle_state = lifecycle_state + + @property + def lifecycle_details(self): + """ + Gets the lifecycle_details of this PeerTargetDatabase. + Details about the current state of the peer target database in Data Safe. + + + :return: The lifecycle_details of this PeerTargetDatabase. + :rtype: str + """ + return self._lifecycle_details + + @lifecycle_details.setter + def lifecycle_details(self, lifecycle_details): + """ + Sets the lifecycle_details of this PeerTargetDatabase. + Details about the current state of the peer target database in Data Safe. + + + :param lifecycle_details: The lifecycle_details of this PeerTargetDatabase. + :type: str + """ + self._lifecycle_details = lifecycle_details + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/peer_target_database_collection.py b/src/oci/data_safe/models/peer_target_database_collection.py new file mode 100644 index 0000000000..5fc79388e1 --- /dev/null +++ b/src/oci/data_safe/models/peer_target_database_collection.py @@ -0,0 +1,134 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20181201 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class PeerTargetDatabaseCollection(object): + """ + Summary of peer target databases of a primary target database. + """ + + def __init__(self, **kwargs): + """ + Initializes a new PeerTargetDatabaseCollection object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param compartment_id: + The value to assign to the compartment_id property of this PeerTargetDatabaseCollection. + :type compartment_id: str + + :param target_database_id: + The value to assign to the target_database_id property of this PeerTargetDatabaseCollection. + :type target_database_id: str + + :param items: + The value to assign to the items property of this PeerTargetDatabaseCollection. + :type items: list[oci.data_safe.models.PeerTargetDatabaseSummary] + + """ + self.swagger_types = { + 'compartment_id': 'str', + 'target_database_id': 'str', + 'items': 'list[PeerTargetDatabaseSummary]' + } + + self.attribute_map = { + 'compartment_id': 'compartmentId', + 'target_database_id': 'targetDatabaseId', + 'items': 'items' + } + + self._compartment_id = None + self._target_database_id = None + self._items = None + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this PeerTargetDatabaseCollection. + The OCID of the compartment that contains the primary target database. + + + :return: The compartment_id of this PeerTargetDatabaseCollection. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this PeerTargetDatabaseCollection. + The OCID of the compartment that contains the primary target database. + + + :param compartment_id: The compartment_id of this PeerTargetDatabaseCollection. + :type: str + """ + self._compartment_id = compartment_id + + @property + def target_database_id(self): + """ + **[Required]** Gets the target_database_id of this PeerTargetDatabaseCollection. + The OCID of the Data Safe target database. + + + :return: The target_database_id of this PeerTargetDatabaseCollection. + :rtype: str + """ + return self._target_database_id + + @target_database_id.setter + def target_database_id(self, target_database_id): + """ + Sets the target_database_id of this PeerTargetDatabaseCollection. + The OCID of the Data Safe target database. + + + :param target_database_id: The target_database_id of this PeerTargetDatabaseCollection. + :type: str + """ + self._target_database_id = target_database_id + + @property + def items(self): + """ + Gets the items of this PeerTargetDatabaseCollection. + The list of peer target databases associated to the primary target database. + + + :return: The items of this PeerTargetDatabaseCollection. + :rtype: list[oci.data_safe.models.PeerTargetDatabaseSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this PeerTargetDatabaseCollection. + The list of peer target databases associated to the primary target database. + + + :param items: The items of this PeerTargetDatabaseCollection. + :type: list[oci.data_safe.models.PeerTargetDatabaseSummary] + """ + self._items = items + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/peer_target_database_summary.py b/src/oci/data_safe/models/peer_target_database_summary.py new file mode 100644 index 0000000000..bf014f1e7c --- /dev/null +++ b/src/oci/data_safe/models/peer_target_database_summary.py @@ -0,0 +1,360 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20181201 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class PeerTargetDatabaseSummary(object): + """ + The details of the peer target database in Data Safe. + """ + + #: A constant which can be used with the lifecycle_state property of a PeerTargetDatabaseSummary. + #: This constant has a value of "CREATING" + LIFECYCLE_STATE_CREATING = "CREATING" + + #: A constant which can be used with the lifecycle_state property of a PeerTargetDatabaseSummary. + #: This constant has a value of "UPDATING" + LIFECYCLE_STATE_UPDATING = "UPDATING" + + #: A constant which can be used with the lifecycle_state property of a PeerTargetDatabaseSummary. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a PeerTargetDatabaseSummary. + #: This constant has a value of "INACTIVE" + LIFECYCLE_STATE_INACTIVE = "INACTIVE" + + #: A constant which can be used with the lifecycle_state property of a PeerTargetDatabaseSummary. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + #: A constant which can be used with the lifecycle_state property of a PeerTargetDatabaseSummary. + #: This constant has a value of "DELETED" + LIFECYCLE_STATE_DELETED = "DELETED" + + #: A constant which can be used with the lifecycle_state property of a PeerTargetDatabaseSummary. + #: This constant has a value of "NEEDS_ATTENTION" + LIFECYCLE_STATE_NEEDS_ATTENTION = "NEEDS_ATTENTION" + + #: A constant which can be used with the lifecycle_state property of a PeerTargetDatabaseSummary. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + def __init__(self, **kwargs): + """ + Initializes a new PeerTargetDatabaseSummary object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param display_name: + The value to assign to the display_name property of this PeerTargetDatabaseSummary. + :type display_name: str + + :param description: + The value to assign to the description property of this PeerTargetDatabaseSummary. + :type description: str + + :param key: + The value to assign to the key property of this PeerTargetDatabaseSummary. + :type key: int + + :param role: + The value to assign to the role property of this PeerTargetDatabaseSummary. + :type role: str + + :param database_unique_name: + The value to assign to the database_unique_name property of this PeerTargetDatabaseSummary. + :type database_unique_name: str + + :param dataguard_association_id: + The value to assign to the dataguard_association_id property of this PeerTargetDatabaseSummary. + :type dataguard_association_id: str + + :param time_created: + The value to assign to the time_created property of this PeerTargetDatabaseSummary. + :type time_created: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this PeerTargetDatabaseSummary. + Allowed values for this property are: "CREATING", "UPDATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", "NEEDS_ATTENTION", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param lifecycle_details: + The value to assign to the lifecycle_details property of this PeerTargetDatabaseSummary. + :type lifecycle_details: str + + """ + self.swagger_types = { + 'display_name': 'str', + 'description': 'str', + 'key': 'int', + 'role': 'str', + 'database_unique_name': 'str', + 'dataguard_association_id': 'str', + 'time_created': 'datetime', + 'lifecycle_state': 'str', + 'lifecycle_details': 'str' + } + + self.attribute_map = { + 'display_name': 'displayName', + 'description': 'description', + 'key': 'key', + 'role': 'role', + 'database_unique_name': 'databaseUniqueName', + 'dataguard_association_id': 'dataguardAssociationId', + 'time_created': 'timeCreated', + 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails' + } + + self._display_name = None + self._description = None + self._key = None + self._role = None + self._database_unique_name = None + self._dataguard_association_id = None + self._time_created = None + self._lifecycle_state = None + self._lifecycle_details = None + + @property + def display_name(self): + """ + **[Required]** Gets the display_name of this PeerTargetDatabaseSummary. + The display name of the peer target database in Data Safe. + + + :return: The display_name of this PeerTargetDatabaseSummary. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this PeerTargetDatabaseSummary. + The display name of the peer target database in Data Safe. + + + :param display_name: The display_name of this PeerTargetDatabaseSummary. + :type: str + """ + self._display_name = display_name + + @property + def description(self): + """ + Gets the description of this PeerTargetDatabaseSummary. + The description of the peer target database in Data Safe. + + + :return: The description of this PeerTargetDatabaseSummary. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this PeerTargetDatabaseSummary. + The description of the peer target database in Data Safe. + + + :param description: The description of this PeerTargetDatabaseSummary. + :type: str + """ + self._description = description + + @property + def key(self): + """ + **[Required]** Gets the key of this PeerTargetDatabaseSummary. + The secondary id assigned for the peer target database in Data Safe. + + + :return: The key of this PeerTargetDatabaseSummary. + :rtype: int + """ + return self._key + + @key.setter + def key(self, key): + """ + Sets the key of this PeerTargetDatabaseSummary. + The secondary id assigned for the peer target database in Data Safe. + + + :param key: The key of this PeerTargetDatabaseSummary. + :type: int + """ + self._key = key + + @property + def role(self): + """ + Gets the role of this PeerTargetDatabaseSummary. + Role of the database associated to the peer target database. + + + :return: The role of this PeerTargetDatabaseSummary. + :rtype: str + """ + return self._role + + @role.setter + def role(self, role): + """ + Sets the role of this PeerTargetDatabaseSummary. + Role of the database associated to the peer target database. + + + :param role: The role of this PeerTargetDatabaseSummary. + :type: str + """ + self._role = role + + @property + def database_unique_name(self): + """ + Gets the database_unique_name of this PeerTargetDatabaseSummary. + Unique name of the database associated to the peer target database. + + + :return: The database_unique_name of this PeerTargetDatabaseSummary. + :rtype: str + """ + return self._database_unique_name + + @database_unique_name.setter + def database_unique_name(self, database_unique_name): + """ + Sets the database_unique_name of this PeerTargetDatabaseSummary. + Unique name of the database associated to the peer target database. + + + :param database_unique_name: The database_unique_name of this PeerTargetDatabaseSummary. + :type: str + """ + self._database_unique_name = database_unique_name + + @property + def dataguard_association_id(self): + """ + **[Required]** Gets the dataguard_association_id of this PeerTargetDatabaseSummary. + The OCID of the Data Guard Association resource in which the database associated to the peer target database is considered as peer database to the primary database. + + + :return: The dataguard_association_id of this PeerTargetDatabaseSummary. + :rtype: str + """ + return self._dataguard_association_id + + @dataguard_association_id.setter + def dataguard_association_id(self, dataguard_association_id): + """ + Sets the dataguard_association_id of this PeerTargetDatabaseSummary. + The OCID of the Data Guard Association resource in which the database associated to the peer target database is considered as peer database to the primary database. + + + :param dataguard_association_id: The dataguard_association_id of this PeerTargetDatabaseSummary. + :type: str + """ + self._dataguard_association_id = dataguard_association_id + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this PeerTargetDatabaseSummary. + The date and time of the peer target database registration in Data Safe. + + + :return: The time_created of this PeerTargetDatabaseSummary. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this PeerTargetDatabaseSummary. + The date and time of the peer target database registration in Data Safe. + + + :param time_created: The time_created of this PeerTargetDatabaseSummary. + :type: datetime + """ + self._time_created = time_created + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this PeerTargetDatabaseSummary. + The current state of the peer target database in Data Safe. + + Allowed values for this property are: "CREATING", "UPDATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", "NEEDS_ATTENTION", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this PeerTargetDatabaseSummary. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this PeerTargetDatabaseSummary. + The current state of the peer target database in Data Safe. + + + :param lifecycle_state: The lifecycle_state of this PeerTargetDatabaseSummary. + :type: str + """ + allowed_values = ["CREATING", "UPDATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", "NEEDS_ATTENTION", "FAILED"] + if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): + lifecycle_state = 'UNKNOWN_ENUM_VALUE' + self._lifecycle_state = lifecycle_state + + @property + def lifecycle_details(self): + """ + Gets the lifecycle_details of this PeerTargetDatabaseSummary. + Details about the current state of the peer target database in Data Safe. + + + :return: The lifecycle_details of this PeerTargetDatabaseSummary. + :rtype: str + """ + return self._lifecycle_details + + @lifecycle_details.setter + def lifecycle_details(self, lifecycle_details): + """ + Sets the lifecycle_details of this PeerTargetDatabaseSummary. + Details about the current state of the peer target database in Data Safe. + + + :param lifecycle_details: The lifecycle_details of this PeerTargetDatabaseSummary. + :type: str + """ + self._lifecycle_details = lifecycle_details + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/role_grant_path_collection.py b/src/oci/data_safe/models/role_grant_path_collection.py new file mode 100644 index 0000000000..d819109f75 --- /dev/null +++ b/src/oci/data_safe/models/role_grant_path_collection.py @@ -0,0 +1,72 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20181201 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class RoleGrantPathCollection(object): + """ + A collection of role grant path summary objects. + """ + + def __init__(self, **kwargs): + """ + Initializes a new RoleGrantPathCollection object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param items: + The value to assign to the items property of this RoleGrantPathCollection. + :type items: list[oci.data_safe.models.RoleGrantPathSummary] + + """ + self.swagger_types = { + 'items': 'list[RoleGrantPathSummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this RoleGrantPathCollection. + An array of grant path summary objects. + + + :return: The items of this RoleGrantPathCollection. + :rtype: list[oci.data_safe.models.RoleGrantPathSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this RoleGrantPathCollection. + An array of grant path summary objects. + + + :param items: The items of this RoleGrantPathCollection. + :type: list[oci.data_safe.models.RoleGrantPathSummary] + """ + self._items = items + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/role_grant_path_summary.py b/src/oci/data_safe/models/role_grant_path_summary.py new file mode 100644 index 0000000000..147b9f5c93 --- /dev/null +++ b/src/oci/data_safe/models/role_grant_path_summary.py @@ -0,0 +1,169 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20181201 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class RoleGrantPathSummary(object): + """ + The summary of user role grant paths. + """ + + def __init__(self, **kwargs): + """ + Initializes a new RoleGrantPathSummary object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param key: + The value to assign to the key property of this RoleGrantPathSummary. + :type key: str + + :param grantee: + The value to assign to the grantee property of this RoleGrantPathSummary. + :type grantee: str + + :param granted_role: + The value to assign to the granted_role property of this RoleGrantPathSummary. + :type granted_role: str + + :param depth_level: + The value to assign to the depth_level property of this RoleGrantPathSummary. + :type depth_level: int + + """ + self.swagger_types = { + 'key': 'str', + 'grantee': 'str', + 'granted_role': 'str', + 'depth_level': 'int' + } + + self.attribute_map = { + 'key': 'key', + 'grantee': 'grantee', + 'granted_role': 'grantedRole', + 'depth_level': 'depthLevel' + } + + self._key = None + self._grantee = None + self._granted_role = None + self._depth_level = None + + @property + def key(self): + """ + **[Required]** Gets the key of this RoleGrantPathSummary. + The unique key of a role grant. + + + :return: The key of this RoleGrantPathSummary. + :rtype: str + """ + return self._key + + @key.setter + def key(self, key): + """ + Sets the key of this RoleGrantPathSummary. + The unique key of a role grant. + + + :param key: The key of this RoleGrantPathSummary. + :type: str + """ + self._key = key + + @property + def grantee(self): + """ + Gets the grantee of this RoleGrantPathSummary. + Grantee is the user who can access the table. + + + :return: The grantee of this RoleGrantPathSummary. + :rtype: str + """ + return self._grantee + + @grantee.setter + def grantee(self, grantee): + """ + Sets the grantee of this RoleGrantPathSummary. + Grantee is the user who can access the table. + + + :param grantee: The grantee of this RoleGrantPathSummary. + :type: str + """ + self._grantee = grantee + + @property + def granted_role(self): + """ + Gets the granted_role of this RoleGrantPathSummary. + The name of the role. + + + :return: The granted_role of this RoleGrantPathSummary. + :rtype: str + """ + return self._granted_role + + @granted_role.setter + def granted_role(self, granted_role): + """ + Sets the granted_role of this RoleGrantPathSummary. + The name of the role. + + + :param granted_role: The granted_role of this RoleGrantPathSummary. + :type: str + """ + self._granted_role = granted_role + + @property + def depth_level(self): + """ + Gets the depth_level of this RoleGrantPathSummary. + The grant depth level of the indirect grant. + An indirectly granted role/privilege is granted to the user through another role. + The depth level indicates how deep a privilege is within the grant hierarchy. + + + :return: The depth_level of this RoleGrantPathSummary. + :rtype: int + """ + return self._depth_level + + @depth_level.setter + def depth_level(self, depth_level): + """ + Sets the depth_level of this RoleGrantPathSummary. + The grant depth level of the indirect grant. + An indirectly granted role/privilege is granted to the user through another role. + The depth level indicates how deep a privilege is within the grant hierarchy. + + + :param depth_level: The depth_level of this RoleGrantPathSummary. + :type: int + """ + self._depth_level = depth_level + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/security_assessment_statistics.py b/src/oci/data_safe/models/security_assessment_statistics.py index d8dc2af33b..3ad0be97af 100644 --- a/src/oci/data_safe/models/security_assessment_statistics.py +++ b/src/oci/data_safe/models/security_assessment_statistics.py @@ -53,6 +53,10 @@ def __init__(self, **kwargs): The value to assign to the _pass property of this SecurityAssessmentStatistics. :type _pass: oci.data_safe.models.SectionStatistics + :param deferred: + The value to assign to the deferred property of this SecurityAssessmentStatistics. + :type deferred: oci.data_safe.models.SectionStatistics + """ self.swagger_types = { 'targets_count': 'int', @@ -61,7 +65,8 @@ def __init__(self, **kwargs): 'low_risk': 'SectionStatistics', 'advisory': 'SectionStatistics', 'evaluate': 'SectionStatistics', - '_pass': 'SectionStatistics' + '_pass': 'SectionStatistics', + 'deferred': 'SectionStatistics' } self.attribute_map = { @@ -71,7 +76,8 @@ def __init__(self, **kwargs): 'low_risk': 'lowRisk', 'advisory': 'advisory', 'evaluate': 'evaluate', - '_pass': 'pass' + '_pass': 'pass', + 'deferred': 'deferred' } self._targets_count = None @@ -81,6 +87,7 @@ def __init__(self, **kwargs): self._advisory = None self._evaluate = None self.__pass = None + self._deferred = None @property def targets_count(self): @@ -226,6 +233,26 @@ def _pass(self, _pass): """ self.__pass = _pass + @property + def deferred(self): + """ + Gets the deferred of this SecurityAssessmentStatistics. + + :return: The deferred of this SecurityAssessmentStatistics. + :rtype: oci.data_safe.models.SectionStatistics + """ + return self._deferred + + @deferred.setter + def deferred(self, deferred): + """ + Sets the deferred of this SecurityAssessmentStatistics. + + :param deferred: The deferred of this SecurityAssessmentStatistics. + :type: oci.data_safe.models.SectionStatistics + """ + self._deferred = deferred + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/data_safe/models/security_feature_analytics_collection.py b/src/oci/data_safe/models/security_feature_analytics_collection.py new file mode 100644 index 0000000000..aa9e80aa0d --- /dev/null +++ b/src/oci/data_safe/models/security_feature_analytics_collection.py @@ -0,0 +1,72 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20181201 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class SecurityFeatureAnalyticsCollection(object): + """ + The collection of database security feature analytics summary. + """ + + def __init__(self, **kwargs): + """ + Initializes a new SecurityFeatureAnalyticsCollection object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param items: + The value to assign to the items property of this SecurityFeatureAnalyticsCollection. + :type items: list[oci.data_safe.models.SecurityFeatureAnalyticsSummary] + + """ + self.swagger_types = { + 'items': 'list[SecurityFeatureAnalyticsSummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this SecurityFeatureAnalyticsCollection. + The array of database security feature analytics summary. + + + :return: The items of this SecurityFeatureAnalyticsCollection. + :rtype: list[oci.data_safe.models.SecurityFeatureAnalyticsSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this SecurityFeatureAnalyticsCollection. + The array of database security feature analytics summary. + + + :param items: The items of this SecurityFeatureAnalyticsCollection. + :type: list[oci.data_safe.models.SecurityFeatureAnalyticsSummary] + """ + self._items = items + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/security_feature_analytics_dimensions.py b/src/oci/data_safe/models/security_feature_analytics_dimensions.py new file mode 100644 index 0000000000..c8ca273646 --- /dev/null +++ b/src/oci/data_safe/models/security_feature_analytics_dimensions.py @@ -0,0 +1,124 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20181201 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class SecurityFeatureAnalyticsDimensions(object): + """ + The scope of analytics data. + """ + + #: A constant which can be used with the security_feature property of a SecurityFeatureAnalyticsDimensions. + #: This constant has a value of "UNIFIED_AUDIT" + SECURITY_FEATURE_UNIFIED_AUDIT = "UNIFIED_AUDIT" + + #: A constant which can be used with the security_feature property of a SecurityFeatureAnalyticsDimensions. + #: This constant has a value of "FINE_GRAINED_AUDIT" + SECURITY_FEATURE_FINE_GRAINED_AUDIT = "FINE_GRAINED_AUDIT" + + #: A constant which can be used with the security_feature property of a SecurityFeatureAnalyticsDimensions. + #: This constant has a value of "TRADITIONAL_AUDIT" + SECURITY_FEATURE_TRADITIONAL_AUDIT = "TRADITIONAL_AUDIT" + + #: A constant which can be used with the security_feature property of a SecurityFeatureAnalyticsDimensions. + #: This constant has a value of "DATABASE_VAULT" + SECURITY_FEATURE_DATABASE_VAULT = "DATABASE_VAULT" + + #: A constant which can be used with the security_feature property of a SecurityFeatureAnalyticsDimensions. + #: This constant has a value of "PRIVILEGE_ANALYSIS" + SECURITY_FEATURE_PRIVILEGE_ANALYSIS = "PRIVILEGE_ANALYSIS" + + #: A constant which can be used with the security_feature property of a SecurityFeatureAnalyticsDimensions. + #: This constant has a value of "TABLESPACE_ENCRYPTION" + SECURITY_FEATURE_TABLESPACE_ENCRYPTION = "TABLESPACE_ENCRYPTION" + + #: A constant which can be used with the security_feature property of a SecurityFeatureAnalyticsDimensions. + #: This constant has a value of "COLUMN_ENCRYPTION" + SECURITY_FEATURE_COLUMN_ENCRYPTION = "COLUMN_ENCRYPTION" + + #: A constant which can be used with the security_feature property of a SecurityFeatureAnalyticsDimensions. + #: This constant has a value of "NETWORK_ENCRYPTION" + SECURITY_FEATURE_NETWORK_ENCRYPTION = "NETWORK_ENCRYPTION" + + #: A constant which can be used with the security_feature property of a SecurityFeatureAnalyticsDimensions. + #: This constant has a value of "PASSWORD_AUTHENTICATION" + SECURITY_FEATURE_PASSWORD_AUTHENTICATION = "PASSWORD_AUTHENTICATION" + + #: A constant which can be used with the security_feature property of a SecurityFeatureAnalyticsDimensions. + #: This constant has a value of "GLOBAL_AUTHENTICATION" + SECURITY_FEATURE_GLOBAL_AUTHENTICATION = "GLOBAL_AUTHENTICATION" + + #: A constant which can be used with the security_feature property of a SecurityFeatureAnalyticsDimensions. + #: This constant has a value of "EXTERNAL_AUTHENTICATION" + SECURITY_FEATURE_EXTERNAL_AUTHENTICATION = "EXTERNAL_AUTHENTICATION" + + def __init__(self, **kwargs): + """ + Initializes a new SecurityFeatureAnalyticsDimensions object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param security_feature: + The value to assign to the security_feature property of this SecurityFeatureAnalyticsDimensions. + Allowed values for this property are: "UNIFIED_AUDIT", "FINE_GRAINED_AUDIT", "TRADITIONAL_AUDIT", "DATABASE_VAULT", "PRIVILEGE_ANALYSIS", "TABLESPACE_ENCRYPTION", "COLUMN_ENCRYPTION", "NETWORK_ENCRYPTION", "PASSWORD_AUTHENTICATION", "GLOBAL_AUTHENTICATION", "EXTERNAL_AUTHENTICATION", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type security_feature: str + + """ + self.swagger_types = { + 'security_feature': 'str' + } + + self.attribute_map = { + 'security_feature': 'securityFeature' + } + + self._security_feature = None + + @property + def security_feature(self): + """ + Gets the security_feature of this SecurityFeatureAnalyticsDimensions. + The name of the security feature. + + Allowed values for this property are: "UNIFIED_AUDIT", "FINE_GRAINED_AUDIT", "TRADITIONAL_AUDIT", "DATABASE_VAULT", "PRIVILEGE_ANALYSIS", "TABLESPACE_ENCRYPTION", "COLUMN_ENCRYPTION", "NETWORK_ENCRYPTION", "PASSWORD_AUTHENTICATION", "GLOBAL_AUTHENTICATION", "EXTERNAL_AUTHENTICATION", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The security_feature of this SecurityFeatureAnalyticsDimensions. + :rtype: str + """ + return self._security_feature + + @security_feature.setter + def security_feature(self, security_feature): + """ + Sets the security_feature of this SecurityFeatureAnalyticsDimensions. + The name of the security feature. + + + :param security_feature: The security_feature of this SecurityFeatureAnalyticsDimensions. + :type: str + """ + allowed_values = ["UNIFIED_AUDIT", "FINE_GRAINED_AUDIT", "TRADITIONAL_AUDIT", "DATABASE_VAULT", "PRIVILEGE_ANALYSIS", "TABLESPACE_ENCRYPTION", "COLUMN_ENCRYPTION", "NETWORK_ENCRYPTION", "PASSWORD_AUTHENTICATION", "GLOBAL_AUTHENTICATION", "EXTERNAL_AUTHENTICATION"] + if not value_allowed_none_or_none_sentinel(security_feature, allowed_values): + security_feature = 'UNKNOWN_ENUM_VALUE' + self._security_feature = security_feature + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/security_feature_analytics_summary.py b/src/oci/data_safe/models/security_feature_analytics_summary.py new file mode 100644 index 0000000000..9e877712d5 --- /dev/null +++ b/src/oci/data_safe/models/security_feature_analytics_summary.py @@ -0,0 +1,142 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20181201 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class SecurityFeatureAnalyticsSummary(object): + """ + The summary of database security feature analytics data. + """ + + #: A constant which can be used with the metric_name property of a SecurityFeatureAnalyticsSummary. + #: This constant has a value of "SECURITY_FEATURE_STATS" + METRIC_NAME_SECURITY_FEATURE_STATS = "SECURITY_FEATURE_STATS" + + def __init__(self, **kwargs): + """ + Initializes a new SecurityFeatureAnalyticsSummary object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param metric_name: + The value to assign to the metric_name property of this SecurityFeatureAnalyticsSummary. + Allowed values for this property are: "SECURITY_FEATURE_STATS", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type metric_name: str + + :param dimensions: + The value to assign to the dimensions property of this SecurityFeatureAnalyticsSummary. + :type dimensions: oci.data_safe.models.SecurityFeatureAnalyticsDimensions + + :param count: + The value to assign to the count property of this SecurityFeatureAnalyticsSummary. + :type count: int + + """ + self.swagger_types = { + 'metric_name': 'str', + 'dimensions': 'SecurityFeatureAnalyticsDimensions', + 'count': 'int' + } + + self.attribute_map = { + 'metric_name': 'metricName', + 'dimensions': 'dimensions', + 'count': 'count' + } + + self._metric_name = None + self._dimensions = None + self._count = None + + @property + def metric_name(self): + """ + **[Required]** Gets the metric_name of this SecurityFeatureAnalyticsSummary. + The name of the aggregation metric. + + Allowed values for this property are: "SECURITY_FEATURE_STATS", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The metric_name of this SecurityFeatureAnalyticsSummary. + :rtype: str + """ + return self._metric_name + + @metric_name.setter + def metric_name(self, metric_name): + """ + Sets the metric_name of this SecurityFeatureAnalyticsSummary. + The name of the aggregation metric. + + + :param metric_name: The metric_name of this SecurityFeatureAnalyticsSummary. + :type: str + """ + allowed_values = ["SECURITY_FEATURE_STATS"] + if not value_allowed_none_or_none_sentinel(metric_name, allowed_values): + metric_name = 'UNKNOWN_ENUM_VALUE' + self._metric_name = metric_name + + @property + def dimensions(self): + """ + Gets the dimensions of this SecurityFeatureAnalyticsSummary. + + :return: The dimensions of this SecurityFeatureAnalyticsSummary. + :rtype: oci.data_safe.models.SecurityFeatureAnalyticsDimensions + """ + return self._dimensions + + @dimensions.setter + def dimensions(self, dimensions): + """ + Sets the dimensions of this SecurityFeatureAnalyticsSummary. + + :param dimensions: The dimensions of this SecurityFeatureAnalyticsSummary. + :type: oci.data_safe.models.SecurityFeatureAnalyticsDimensions + """ + self._dimensions = dimensions + + @property + def count(self): + """ + **[Required]** Gets the count of this SecurityFeatureAnalyticsSummary. + The total count for the aggregation metric. + + + :return: The count of this SecurityFeatureAnalyticsSummary. + :rtype: int + """ + return self._count + + @count.setter + def count(self, count): + """ + Sets the count of this SecurityFeatureAnalyticsSummary. + The total count for the aggregation metric. + + + :param count: The count of this SecurityFeatureAnalyticsSummary. + :type: int + """ + self._count = count + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/security_feature_collection.py b/src/oci/data_safe/models/security_feature_collection.py new file mode 100644 index 0000000000..80feec3575 --- /dev/null +++ b/src/oci/data_safe/models/security_feature_collection.py @@ -0,0 +1,72 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20181201 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class SecurityFeatureCollection(object): + """ + Collection of database security feature summary. + """ + + def __init__(self, **kwargs): + """ + Initializes a new SecurityFeatureCollection object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param items: + The value to assign to the items property of this SecurityFeatureCollection. + :type items: list[oci.data_safe.models.SecurityFeatureSummary] + + """ + self.swagger_types = { + 'items': 'list[SecurityFeatureSummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this SecurityFeatureCollection. + Array of database security feature summary. + + + :return: The items of this SecurityFeatureCollection. + :rtype: list[oci.data_safe.models.SecurityFeatureSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this SecurityFeatureCollection. + Array of database security feature summary. + + + :param items: The items of this SecurityFeatureCollection. + :type: list[oci.data_safe.models.SecurityFeatureSummary] + """ + self._items = items + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/security_feature_summary.py b/src/oci/data_safe/models/security_feature_summary.py new file mode 100644 index 0000000000..5759bc2ccc --- /dev/null +++ b/src/oci/data_safe/models/security_feature_summary.py @@ -0,0 +1,773 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20181201 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class SecurityFeatureSummary(object): + """ + The details of database security feature usage available on a given compartment. + """ + + #: A constant which can be used with the unified_audit property of a SecurityFeatureSummary. + #: This constant has a value of "ENABLED" + UNIFIED_AUDIT_ENABLED = "ENABLED" + + #: A constant which can be used with the unified_audit property of a SecurityFeatureSummary. + #: This constant has a value of "DISABLED" + UNIFIED_AUDIT_DISABLED = "DISABLED" + + #: A constant which can be used with the unified_audit property of a SecurityFeatureSummary. + #: This constant has a value of "NONE" + UNIFIED_AUDIT_NONE = "NONE" + + #: A constant which can be used with the fine_grained_audit property of a SecurityFeatureSummary. + #: This constant has a value of "ENABLED" + FINE_GRAINED_AUDIT_ENABLED = "ENABLED" + + #: A constant which can be used with the fine_grained_audit property of a SecurityFeatureSummary. + #: This constant has a value of "DISABLED" + FINE_GRAINED_AUDIT_DISABLED = "DISABLED" + + #: A constant which can be used with the fine_grained_audit property of a SecurityFeatureSummary. + #: This constant has a value of "NONE" + FINE_GRAINED_AUDIT_NONE = "NONE" + + #: A constant which can be used with the traditional_audit property of a SecurityFeatureSummary. + #: This constant has a value of "ENABLED" + TRADITIONAL_AUDIT_ENABLED = "ENABLED" + + #: A constant which can be used with the traditional_audit property of a SecurityFeatureSummary. + #: This constant has a value of "DISABLED" + TRADITIONAL_AUDIT_DISABLED = "DISABLED" + + #: A constant which can be used with the traditional_audit property of a SecurityFeatureSummary. + #: This constant has a value of "NONE" + TRADITIONAL_AUDIT_NONE = "NONE" + + #: A constant which can be used with the database_vault property of a SecurityFeatureSummary. + #: This constant has a value of "ENABLED" + DATABASE_VAULT_ENABLED = "ENABLED" + + #: A constant which can be used with the database_vault property of a SecurityFeatureSummary. + #: This constant has a value of "DISABLED" + DATABASE_VAULT_DISABLED = "DISABLED" + + #: A constant which can be used with the database_vault property of a SecurityFeatureSummary. + #: This constant has a value of "NONE" + DATABASE_VAULT_NONE = "NONE" + + #: A constant which can be used with the privilege_analysis property of a SecurityFeatureSummary. + #: This constant has a value of "ENABLED" + PRIVILEGE_ANALYSIS_ENABLED = "ENABLED" + + #: A constant which can be used with the privilege_analysis property of a SecurityFeatureSummary. + #: This constant has a value of "DISABLED" + PRIVILEGE_ANALYSIS_DISABLED = "DISABLED" + + #: A constant which can be used with the privilege_analysis property of a SecurityFeatureSummary. + #: This constant has a value of "NONE" + PRIVILEGE_ANALYSIS_NONE = "NONE" + + #: A constant which can be used with the tablespace_encryption property of a SecurityFeatureSummary. + #: This constant has a value of "ENABLED" + TABLESPACE_ENCRYPTION_ENABLED = "ENABLED" + + #: A constant which can be used with the tablespace_encryption property of a SecurityFeatureSummary. + #: This constant has a value of "DISABLED" + TABLESPACE_ENCRYPTION_DISABLED = "DISABLED" + + #: A constant which can be used with the tablespace_encryption property of a SecurityFeatureSummary. + #: This constant has a value of "NONE" + TABLESPACE_ENCRYPTION_NONE = "NONE" + + #: A constant which can be used with the column_encryption property of a SecurityFeatureSummary. + #: This constant has a value of "ENABLED" + COLUMN_ENCRYPTION_ENABLED = "ENABLED" + + #: A constant which can be used with the column_encryption property of a SecurityFeatureSummary. + #: This constant has a value of "DISABLED" + COLUMN_ENCRYPTION_DISABLED = "DISABLED" + + #: A constant which can be used with the column_encryption property of a SecurityFeatureSummary. + #: This constant has a value of "NONE" + COLUMN_ENCRYPTION_NONE = "NONE" + + #: A constant which can be used with the network_encryption property of a SecurityFeatureSummary. + #: This constant has a value of "ENABLED" + NETWORK_ENCRYPTION_ENABLED = "ENABLED" + + #: A constant which can be used with the network_encryption property of a SecurityFeatureSummary. + #: This constant has a value of "DISABLED" + NETWORK_ENCRYPTION_DISABLED = "DISABLED" + + #: A constant which can be used with the network_encryption property of a SecurityFeatureSummary. + #: This constant has a value of "NONE" + NETWORK_ENCRYPTION_NONE = "NONE" + + #: A constant which can be used with the password_authentication property of a SecurityFeatureSummary. + #: This constant has a value of "ENABLED" + PASSWORD_AUTHENTICATION_ENABLED = "ENABLED" + + #: A constant which can be used with the password_authentication property of a SecurityFeatureSummary. + #: This constant has a value of "DISABLED" + PASSWORD_AUTHENTICATION_DISABLED = "DISABLED" + + #: A constant which can be used with the password_authentication property of a SecurityFeatureSummary. + #: This constant has a value of "NONE" + PASSWORD_AUTHENTICATION_NONE = "NONE" + + #: A constant which can be used with the global_authentication property of a SecurityFeatureSummary. + #: This constant has a value of "ENABLED" + GLOBAL_AUTHENTICATION_ENABLED = "ENABLED" + + #: A constant which can be used with the global_authentication property of a SecurityFeatureSummary. + #: This constant has a value of "DISABLED" + GLOBAL_AUTHENTICATION_DISABLED = "DISABLED" + + #: A constant which can be used with the global_authentication property of a SecurityFeatureSummary. + #: This constant has a value of "NONE" + GLOBAL_AUTHENTICATION_NONE = "NONE" + + #: A constant which can be used with the external_authentication property of a SecurityFeatureSummary. + #: This constant has a value of "ENABLED" + EXTERNAL_AUTHENTICATION_ENABLED = "ENABLED" + + #: A constant which can be used with the external_authentication property of a SecurityFeatureSummary. + #: This constant has a value of "DISABLED" + EXTERNAL_AUTHENTICATION_DISABLED = "DISABLED" + + #: A constant which can be used with the external_authentication property of a SecurityFeatureSummary. + #: This constant has a value of "NONE" + EXTERNAL_AUTHENTICATION_NONE = "NONE" + + def __init__(self, **kwargs): + """ + Initializes a new SecurityFeatureSummary object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param compartment_id: + The value to assign to the compartment_id property of this SecurityFeatureSummary. + :type compartment_id: str + + :param target_id: + The value to assign to the target_id property of this SecurityFeatureSummary. + :type target_id: str + + :param assessment_id: + The value to assign to the assessment_id property of this SecurityFeatureSummary. + :type assessment_id: str + + :param unified_audit: + The value to assign to the unified_audit property of this SecurityFeatureSummary. + Allowed values for this property are: "ENABLED", "DISABLED", "NONE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type unified_audit: str + + :param fine_grained_audit: + The value to assign to the fine_grained_audit property of this SecurityFeatureSummary. + Allowed values for this property are: "ENABLED", "DISABLED", "NONE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type fine_grained_audit: str + + :param traditional_audit: + The value to assign to the traditional_audit property of this SecurityFeatureSummary. + Allowed values for this property are: "ENABLED", "DISABLED", "NONE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type traditional_audit: str + + :param database_vault: + The value to assign to the database_vault property of this SecurityFeatureSummary. + Allowed values for this property are: "ENABLED", "DISABLED", "NONE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type database_vault: str + + :param privilege_analysis: + The value to assign to the privilege_analysis property of this SecurityFeatureSummary. + Allowed values for this property are: "ENABLED", "DISABLED", "NONE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type privilege_analysis: str + + :param tablespace_encryption: + The value to assign to the tablespace_encryption property of this SecurityFeatureSummary. + Allowed values for this property are: "ENABLED", "DISABLED", "NONE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type tablespace_encryption: str + + :param column_encryption: + The value to assign to the column_encryption property of this SecurityFeatureSummary. + Allowed values for this property are: "ENABLED", "DISABLED", "NONE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type column_encryption: str + + :param network_encryption: + The value to assign to the network_encryption property of this SecurityFeatureSummary. + Allowed values for this property are: "ENABLED", "DISABLED", "NONE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type network_encryption: str + + :param password_authentication: + The value to assign to the password_authentication property of this SecurityFeatureSummary. + Allowed values for this property are: "ENABLED", "DISABLED", "NONE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type password_authentication: str + + :param global_authentication: + The value to assign to the global_authentication property of this SecurityFeatureSummary. + Allowed values for this property are: "ENABLED", "DISABLED", "NONE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type global_authentication: str + + :param external_authentication: + The value to assign to the external_authentication property of this SecurityFeatureSummary. + Allowed values for this property are: "ENABLED", "DISABLED", "NONE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type external_authentication: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this SecurityFeatureSummary. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this SecurityFeatureSummary. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'compartment_id': 'str', + 'target_id': 'str', + 'assessment_id': 'str', + 'unified_audit': 'str', + 'fine_grained_audit': 'str', + 'traditional_audit': 'str', + 'database_vault': 'str', + 'privilege_analysis': 'str', + 'tablespace_encryption': 'str', + 'column_encryption': 'str', + 'network_encryption': 'str', + 'password_authentication': 'str', + 'global_authentication': 'str', + 'external_authentication': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'compartment_id': 'compartmentId', + 'target_id': 'targetId', + 'assessment_id': 'assessmentId', + 'unified_audit': 'unifiedAudit', + 'fine_grained_audit': 'fineGrainedAudit', + 'traditional_audit': 'traditionalAudit', + 'database_vault': 'databaseVault', + 'privilege_analysis': 'privilegeAnalysis', + 'tablespace_encryption': 'tablespaceEncryption', + 'column_encryption': 'columnEncryption', + 'network_encryption': 'networkEncryption', + 'password_authentication': 'passwordAuthentication', + 'global_authentication': 'globalAuthentication', + 'external_authentication': 'externalAuthentication', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._compartment_id = None + self._target_id = None + self._assessment_id = None + self._unified_audit = None + self._fine_grained_audit = None + self._traditional_audit = None + self._database_vault = None + self._privilege_analysis = None + self._tablespace_encryption = None + self._column_encryption = None + self._network_encryption = None + self._password_authentication = None + self._global_authentication = None + self._external_authentication = None + self._freeform_tags = None + self._defined_tags = None + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this SecurityFeatureSummary. + The OCID of the compartment. + + + :return: The compartment_id of this SecurityFeatureSummary. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this SecurityFeatureSummary. + The OCID of the compartment. + + + :param compartment_id: The compartment_id of this SecurityFeatureSummary. + :type: str + """ + self._compartment_id = compartment_id + + @property + def target_id(self): + """ + **[Required]** Gets the target_id of this SecurityFeatureSummary. + The OCID of the target database. + + + :return: The target_id of this SecurityFeatureSummary. + :rtype: str + """ + return self._target_id + + @target_id.setter + def target_id(self, target_id): + """ + Sets the target_id of this SecurityFeatureSummary. + The OCID of the target database. + + + :param target_id: The target_id of this SecurityFeatureSummary. + :type: str + """ + self._target_id = target_id + + @property + def assessment_id(self): + """ + **[Required]** Gets the assessment_id of this SecurityFeatureSummary. + The OCID of the assessment that generates this security feature usage result. + + + :return: The assessment_id of this SecurityFeatureSummary. + :rtype: str + """ + return self._assessment_id + + @assessment_id.setter + def assessment_id(self, assessment_id): + """ + Sets the assessment_id of this SecurityFeatureSummary. + The OCID of the assessment that generates this security feature usage result. + + + :param assessment_id: The assessment_id of this SecurityFeatureSummary. + :type: str + """ + self._assessment_id = assessment_id + + @property + def unified_audit(self): + """ + **[Required]** Gets the unified_audit of this SecurityFeatureSummary. + The usage of security feature - Unified Audit. + + Allowed values for this property are: "ENABLED", "DISABLED", "NONE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The unified_audit of this SecurityFeatureSummary. + :rtype: str + """ + return self._unified_audit + + @unified_audit.setter + def unified_audit(self, unified_audit): + """ + Sets the unified_audit of this SecurityFeatureSummary. + The usage of security feature - Unified Audit. + + + :param unified_audit: The unified_audit of this SecurityFeatureSummary. + :type: str + """ + allowed_values = ["ENABLED", "DISABLED", "NONE"] + if not value_allowed_none_or_none_sentinel(unified_audit, allowed_values): + unified_audit = 'UNKNOWN_ENUM_VALUE' + self._unified_audit = unified_audit + + @property + def fine_grained_audit(self): + """ + **[Required]** Gets the fine_grained_audit of this SecurityFeatureSummary. + The usage of security feature - Fine Grained Audit. + + Allowed values for this property are: "ENABLED", "DISABLED", "NONE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The fine_grained_audit of this SecurityFeatureSummary. + :rtype: str + """ + return self._fine_grained_audit + + @fine_grained_audit.setter + def fine_grained_audit(self, fine_grained_audit): + """ + Sets the fine_grained_audit of this SecurityFeatureSummary. + The usage of security feature - Fine Grained Audit. + + + :param fine_grained_audit: The fine_grained_audit of this SecurityFeatureSummary. + :type: str + """ + allowed_values = ["ENABLED", "DISABLED", "NONE"] + if not value_allowed_none_or_none_sentinel(fine_grained_audit, allowed_values): + fine_grained_audit = 'UNKNOWN_ENUM_VALUE' + self._fine_grained_audit = fine_grained_audit + + @property + def traditional_audit(self): + """ + **[Required]** Gets the traditional_audit of this SecurityFeatureSummary. + The usage of security feature - Traditional Audit. + + Allowed values for this property are: "ENABLED", "DISABLED", "NONE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The traditional_audit of this SecurityFeatureSummary. + :rtype: str + """ + return self._traditional_audit + + @traditional_audit.setter + def traditional_audit(self, traditional_audit): + """ + Sets the traditional_audit of this SecurityFeatureSummary. + The usage of security feature - Traditional Audit. + + + :param traditional_audit: The traditional_audit of this SecurityFeatureSummary. + :type: str + """ + allowed_values = ["ENABLED", "DISABLED", "NONE"] + if not value_allowed_none_or_none_sentinel(traditional_audit, allowed_values): + traditional_audit = 'UNKNOWN_ENUM_VALUE' + self._traditional_audit = traditional_audit + + @property + def database_vault(self): + """ + **[Required]** Gets the database_vault of this SecurityFeatureSummary. + The usage of security feature - Database Vault. + + Allowed values for this property are: "ENABLED", "DISABLED", "NONE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The database_vault of this SecurityFeatureSummary. + :rtype: str + """ + return self._database_vault + + @database_vault.setter + def database_vault(self, database_vault): + """ + Sets the database_vault of this SecurityFeatureSummary. + The usage of security feature - Database Vault. + + + :param database_vault: The database_vault of this SecurityFeatureSummary. + :type: str + """ + allowed_values = ["ENABLED", "DISABLED", "NONE"] + if not value_allowed_none_or_none_sentinel(database_vault, allowed_values): + database_vault = 'UNKNOWN_ENUM_VALUE' + self._database_vault = database_vault + + @property + def privilege_analysis(self): + """ + **[Required]** Gets the privilege_analysis of this SecurityFeatureSummary. + The usage of security feature - Privilege Analysis. + + Allowed values for this property are: "ENABLED", "DISABLED", "NONE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The privilege_analysis of this SecurityFeatureSummary. + :rtype: str + """ + return self._privilege_analysis + + @privilege_analysis.setter + def privilege_analysis(self, privilege_analysis): + """ + Sets the privilege_analysis of this SecurityFeatureSummary. + The usage of security feature - Privilege Analysis. + + + :param privilege_analysis: The privilege_analysis of this SecurityFeatureSummary. + :type: str + """ + allowed_values = ["ENABLED", "DISABLED", "NONE"] + if not value_allowed_none_or_none_sentinel(privilege_analysis, allowed_values): + privilege_analysis = 'UNKNOWN_ENUM_VALUE' + self._privilege_analysis = privilege_analysis + + @property + def tablespace_encryption(self): + """ + **[Required]** Gets the tablespace_encryption of this SecurityFeatureSummary. + The usage of security feature - Tablespace Encryption. + + Allowed values for this property are: "ENABLED", "DISABLED", "NONE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The tablespace_encryption of this SecurityFeatureSummary. + :rtype: str + """ + return self._tablespace_encryption + + @tablespace_encryption.setter + def tablespace_encryption(self, tablespace_encryption): + """ + Sets the tablespace_encryption of this SecurityFeatureSummary. + The usage of security feature - Tablespace Encryption. + + + :param tablespace_encryption: The tablespace_encryption of this SecurityFeatureSummary. + :type: str + """ + allowed_values = ["ENABLED", "DISABLED", "NONE"] + if not value_allowed_none_or_none_sentinel(tablespace_encryption, allowed_values): + tablespace_encryption = 'UNKNOWN_ENUM_VALUE' + self._tablespace_encryption = tablespace_encryption + + @property + def column_encryption(self): + """ + **[Required]** Gets the column_encryption of this SecurityFeatureSummary. + The usage of security feature - Column Encryption. + + Allowed values for this property are: "ENABLED", "DISABLED", "NONE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The column_encryption of this SecurityFeatureSummary. + :rtype: str + """ + return self._column_encryption + + @column_encryption.setter + def column_encryption(self, column_encryption): + """ + Sets the column_encryption of this SecurityFeatureSummary. + The usage of security feature - Column Encryption. + + + :param column_encryption: The column_encryption of this SecurityFeatureSummary. + :type: str + """ + allowed_values = ["ENABLED", "DISABLED", "NONE"] + if not value_allowed_none_or_none_sentinel(column_encryption, allowed_values): + column_encryption = 'UNKNOWN_ENUM_VALUE' + self._column_encryption = column_encryption + + @property + def network_encryption(self): + """ + **[Required]** Gets the network_encryption of this SecurityFeatureSummary. + The usage of security feature - Network Encryption. + + Allowed values for this property are: "ENABLED", "DISABLED", "NONE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The network_encryption of this SecurityFeatureSummary. + :rtype: str + """ + return self._network_encryption + + @network_encryption.setter + def network_encryption(self, network_encryption): + """ + Sets the network_encryption of this SecurityFeatureSummary. + The usage of security feature - Network Encryption. + + + :param network_encryption: The network_encryption of this SecurityFeatureSummary. + :type: str + """ + allowed_values = ["ENABLED", "DISABLED", "NONE"] + if not value_allowed_none_or_none_sentinel(network_encryption, allowed_values): + network_encryption = 'UNKNOWN_ENUM_VALUE' + self._network_encryption = network_encryption + + @property + def password_authentication(self): + """ + **[Required]** Gets the password_authentication of this SecurityFeatureSummary. + The usage of security feature - Password Authentication. + + Allowed values for this property are: "ENABLED", "DISABLED", "NONE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The password_authentication of this SecurityFeatureSummary. + :rtype: str + """ + return self._password_authentication + + @password_authentication.setter + def password_authentication(self, password_authentication): + """ + Sets the password_authentication of this SecurityFeatureSummary. + The usage of security feature - Password Authentication. + + + :param password_authentication: The password_authentication of this SecurityFeatureSummary. + :type: str + """ + allowed_values = ["ENABLED", "DISABLED", "NONE"] + if not value_allowed_none_or_none_sentinel(password_authentication, allowed_values): + password_authentication = 'UNKNOWN_ENUM_VALUE' + self._password_authentication = password_authentication + + @property + def global_authentication(self): + """ + **[Required]** Gets the global_authentication of this SecurityFeatureSummary. + The usage of security feature - Global Authentication. + + Allowed values for this property are: "ENABLED", "DISABLED", "NONE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The global_authentication of this SecurityFeatureSummary. + :rtype: str + """ + return self._global_authentication + + @global_authentication.setter + def global_authentication(self, global_authentication): + """ + Sets the global_authentication of this SecurityFeatureSummary. + The usage of security feature - Global Authentication. + + + :param global_authentication: The global_authentication of this SecurityFeatureSummary. + :type: str + """ + allowed_values = ["ENABLED", "DISABLED", "NONE"] + if not value_allowed_none_or_none_sentinel(global_authentication, allowed_values): + global_authentication = 'UNKNOWN_ENUM_VALUE' + self._global_authentication = global_authentication + + @property + def external_authentication(self): + """ + **[Required]** Gets the external_authentication of this SecurityFeatureSummary. + The usage of security feature - External Authentication. + + Allowed values for this property are: "ENABLED", "DISABLED", "NONE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The external_authentication of this SecurityFeatureSummary. + :rtype: str + """ + return self._external_authentication + + @external_authentication.setter + def external_authentication(self, external_authentication): + """ + Sets the external_authentication of this SecurityFeatureSummary. + The usage of security feature - External Authentication. + + + :param external_authentication: The external_authentication of this SecurityFeatureSummary. + :type: str + """ + allowed_values = ["ENABLED", "DISABLED", "NONE"] + if not value_allowed_none_or_none_sentinel(external_authentication, allowed_values): + external_authentication = 'UNKNOWN_ENUM_VALUE' + self._external_authentication = external_authentication + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this SecurityFeatureSummary. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this SecurityFeatureSummary. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this SecurityFeatureSummary. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this SecurityFeatureSummary. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this SecurityFeatureSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this SecurityFeatureSummary. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this SecurityFeatureSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this SecurityFeatureSummary. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/security_policy_report.py b/src/oci/data_safe/models/security_policy_report.py new file mode 100644 index 0000000000..99eb5e8612 --- /dev/null +++ b/src/oci/data_safe/models/security_policy_report.py @@ -0,0 +1,475 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20181201 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class SecurityPolicyReport(object): + """ + The resource represents the security policy report + """ + + #: A constant which can be used with the lifecycle_state property of a SecurityPolicyReport. + #: This constant has a value of "CREATING" + LIFECYCLE_STATE_CREATING = "CREATING" + + #: A constant which can be used with the lifecycle_state property of a SecurityPolicyReport. + #: This constant has a value of "SUCCEEDED" + LIFECYCLE_STATE_SUCCEEDED = "SUCCEEDED" + + #: A constant which can be used with the lifecycle_state property of a SecurityPolicyReport. + #: This constant has a value of "UPDATING" + LIFECYCLE_STATE_UPDATING = "UPDATING" + + #: A constant which can be used with the lifecycle_state property of a SecurityPolicyReport. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + #: A constant which can be used with the lifecycle_state property of a SecurityPolicyReport. + #: This constant has a value of "DELETED" + LIFECYCLE_STATE_DELETED = "DELETED" + + #: A constant which can be used with the lifecycle_state property of a SecurityPolicyReport. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + #: A constant which can be used with the lifecycle_state property of a SecurityPolicyReport. + #: This constant has a value of "NEEDS_ATTENTION" + LIFECYCLE_STATE_NEEDS_ATTENTION = "NEEDS_ATTENTION" + + def __init__(self, **kwargs): + """ + Initializes a new SecurityPolicyReport object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param id: + The value to assign to the id property of this SecurityPolicyReport. + :type id: str + + :param time_created: + The value to assign to the time_created property of this SecurityPolicyReport. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this SecurityPolicyReport. + :type time_updated: datetime + + :param compartment_id: + The value to assign to the compartment_id property of this SecurityPolicyReport. + :type compartment_id: str + + :param display_name: + The value to assign to the display_name property of this SecurityPolicyReport. + :type display_name: str + + :param target_id: + The value to assign to the target_id property of this SecurityPolicyReport. + :type target_id: str + + :param description: + The value to assign to the description property of this SecurityPolicyReport. + :type description: str + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this SecurityPolicyReport. + Allowed values for this property are: "CREATING", "SUCCEEDED", "UPDATING", "DELETING", "DELETED", "FAILED", "NEEDS_ATTENTION", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param lifecycle_details: + The value to assign to the lifecycle_details property of this SecurityPolicyReport. + :type lifecycle_details: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this SecurityPolicyReport. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this SecurityPolicyReport. + :type defined_tags: dict(str, dict(str, object)) + + :param system_tags: + The value to assign to the system_tags property of this SecurityPolicyReport. + :type system_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'id': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'compartment_id': 'str', + 'display_name': 'str', + 'target_id': 'str', + 'description': 'str', + 'lifecycle_state': 'str', + 'lifecycle_details': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'id': 'id', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'compartment_id': 'compartmentId', + 'display_name': 'displayName', + 'target_id': 'targetId', + 'description': 'description', + 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags' + } + + self._id = None + self._time_created = None + self._time_updated = None + self._compartment_id = None + self._display_name = None + self._target_id = None + self._description = None + self._lifecycle_state = None + self._lifecycle_details = None + self._freeform_tags = None + self._defined_tags = None + self._system_tags = None + + @property + def id(self): + """ + **[Required]** Gets the id of this SecurityPolicyReport. + The OCID of the security policy report. + + + :return: The id of this SecurityPolicyReport. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this SecurityPolicyReport. + The OCID of the security policy report. + + + :param id: The id of this SecurityPolicyReport. + :type: str + """ + self._id = id + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this SecurityPolicyReport. + The date and time the security policy report was created, in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_created of this SecurityPolicyReport. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this SecurityPolicyReport. + The date and time the security policy report was created, in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_created: The time_created of this SecurityPolicyReport. + :type: datetime + """ + self._time_created = time_created + + @property + def time_updated(self): + """ + Gets the time_updated of this SecurityPolicyReport. + The date and time the security policy report was last updated, in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_updated of this SecurityPolicyReport. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this SecurityPolicyReport. + The date and time the security policy report was last updated, in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_updated: The time_updated of this SecurityPolicyReport. + :type: datetime + """ + self._time_updated = time_updated + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this SecurityPolicyReport. + The OCID of the compartment that contains the security policy report. + + + :return: The compartment_id of this SecurityPolicyReport. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this SecurityPolicyReport. + The OCID of the compartment that contains the security policy report. + + + :param compartment_id: The compartment_id of this SecurityPolicyReport. + :type: str + """ + self._compartment_id = compartment_id + + @property + def display_name(self): + """ + **[Required]** Gets the display_name of this SecurityPolicyReport. + The display name of the security policy report. + + + :return: The display_name of this SecurityPolicyReport. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this SecurityPolicyReport. + The display name of the security policy report. + + + :param display_name: The display_name of this SecurityPolicyReport. + :type: str + """ + self._display_name = display_name + + @property + def target_id(self): + """ + **[Required]** Gets the target_id of this SecurityPolicyReport. + The OCID of the of the target database. + + + :return: The target_id of this SecurityPolicyReport. + :rtype: str + """ + return self._target_id + + @target_id.setter + def target_id(self, target_id): + """ + Sets the target_id of this SecurityPolicyReport. + The OCID of the of the target database. + + + :param target_id: The target_id of this SecurityPolicyReport. + :type: str + """ + self._target_id = target_id + + @property + def description(self): + """ + Gets the description of this SecurityPolicyReport. + The description of the security policy report. + + + :return: The description of this SecurityPolicyReport. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this SecurityPolicyReport. + The description of the security policy report. + + + :param description: The description of this SecurityPolicyReport. + :type: str + """ + self._description = description + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this SecurityPolicyReport. + The current state of the security policy report. + + Allowed values for this property are: "CREATING", "SUCCEEDED", "UPDATING", "DELETING", "DELETED", "FAILED", "NEEDS_ATTENTION", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this SecurityPolicyReport. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this SecurityPolicyReport. + The current state of the security policy report. + + + :param lifecycle_state: The lifecycle_state of this SecurityPolicyReport. + :type: str + """ + allowed_values = ["CREATING", "SUCCEEDED", "UPDATING", "DELETING", "DELETED", "FAILED", "NEEDS_ATTENTION"] + if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): + lifecycle_state = 'UNKNOWN_ENUM_VALUE' + self._lifecycle_state = lifecycle_state + + @property + def lifecycle_details(self): + """ + Gets the lifecycle_details of this SecurityPolicyReport. + Details about the current state of the security policy report. + + + :return: The lifecycle_details of this SecurityPolicyReport. + :rtype: str + """ + return self._lifecycle_details + + @lifecycle_details.setter + def lifecycle_details(self, lifecycle_details): + """ + Sets the lifecycle_details of this SecurityPolicyReport. + Details about the current state of the security policy report. + + + :param lifecycle_details: The lifecycle_details of this SecurityPolicyReport. + :type: str + """ + self._lifecycle_details = lifecycle_details + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this SecurityPolicyReport. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this SecurityPolicyReport. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this SecurityPolicyReport. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this SecurityPolicyReport. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this SecurityPolicyReport. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this SecurityPolicyReport. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this SecurityPolicyReport. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this SecurityPolicyReport. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def system_tags(self): + """ + Gets the system_tags of this SecurityPolicyReport. + System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. + Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}` + + + :return: The system_tags of this SecurityPolicyReport. + :rtype: dict(str, dict(str, object)) + """ + return self._system_tags + + @system_tags.setter + def system_tags(self, system_tags): + """ + Sets the system_tags of this SecurityPolicyReport. + System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. + Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}` + + + :param system_tags: The system_tags of this SecurityPolicyReport. + :type: dict(str, dict(str, object)) + """ + self._system_tags = system_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/security_policy_report_collection.py b/src/oci/data_safe/models/security_policy_report_collection.py new file mode 100644 index 0000000000..9cb3e6b328 --- /dev/null +++ b/src/oci/data_safe/models/security_policy_report_collection.py @@ -0,0 +1,72 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20181201 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class SecurityPolicyReportCollection(object): + """ + Collection of security policy report summary. + """ + + def __init__(self, **kwargs): + """ + Initializes a new SecurityPolicyReportCollection object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param items: + The value to assign to the items property of this SecurityPolicyReportCollection. + :type items: list[oci.data_safe.models.SecurityPolicyReportSummary] + + """ + self.swagger_types = { + 'items': 'list[SecurityPolicyReportSummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this SecurityPolicyReportCollection. + Array of security policy report summary. + + + :return: The items of this SecurityPolicyReportCollection. + :rtype: list[oci.data_safe.models.SecurityPolicyReportSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this SecurityPolicyReportCollection. + Array of security policy report summary. + + + :param items: The items of this SecurityPolicyReportCollection. + :type: list[oci.data_safe.models.SecurityPolicyReportSummary] + """ + self._items = items + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/security_policy_report_summary.py b/src/oci/data_safe/models/security_policy_report_summary.py new file mode 100644 index 0000000000..f81d7d6795 --- /dev/null +++ b/src/oci/data_safe/models/security_policy_report_summary.py @@ -0,0 +1,442 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20181201 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class SecurityPolicyReportSummary(object): + """ + The resource represents a container for all the security policy reports in Data Safe. + """ + + #: A constant which can be used with the lifecycle_state property of a SecurityPolicyReportSummary. + #: This constant has a value of "CREATING" + LIFECYCLE_STATE_CREATING = "CREATING" + + #: A constant which can be used with the lifecycle_state property of a SecurityPolicyReportSummary. + #: This constant has a value of "SUCCEEDED" + LIFECYCLE_STATE_SUCCEEDED = "SUCCEEDED" + + #: A constant which can be used with the lifecycle_state property of a SecurityPolicyReportSummary. + #: This constant has a value of "UPDATING" + LIFECYCLE_STATE_UPDATING = "UPDATING" + + #: A constant which can be used with the lifecycle_state property of a SecurityPolicyReportSummary. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + #: A constant which can be used with the lifecycle_state property of a SecurityPolicyReportSummary. + #: This constant has a value of "DELETED" + LIFECYCLE_STATE_DELETED = "DELETED" + + #: A constant which can be used with the lifecycle_state property of a SecurityPolicyReportSummary. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + #: A constant which can be used with the lifecycle_state property of a SecurityPolicyReportSummary. + #: This constant has a value of "NEEDS_ATTENTION" + LIFECYCLE_STATE_NEEDS_ATTENTION = "NEEDS_ATTENTION" + + def __init__(self, **kwargs): + """ + Initializes a new SecurityPolicyReportSummary object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param id: + The value to assign to the id property of this SecurityPolicyReportSummary. + :type id: str + + :param time_created: + The value to assign to the time_created property of this SecurityPolicyReportSummary. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this SecurityPolicyReportSummary. + :type time_updated: datetime + + :param compartment_id: + The value to assign to the compartment_id property of this SecurityPolicyReportSummary. + :type compartment_id: str + + :param display_name: + The value to assign to the display_name property of this SecurityPolicyReportSummary. + :type display_name: str + + :param target_id: + The value to assign to the target_id property of this SecurityPolicyReportSummary. + :type target_id: str + + :param description: + The value to assign to the description property of this SecurityPolicyReportSummary. + :type description: str + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this SecurityPolicyReportSummary. + Allowed values for this property are: "CREATING", "SUCCEEDED", "UPDATING", "DELETING", "DELETED", "FAILED", "NEEDS_ATTENTION", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param lifecycle_details: + The value to assign to the lifecycle_details property of this SecurityPolicyReportSummary. + :type lifecycle_details: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this SecurityPolicyReportSummary. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this SecurityPolicyReportSummary. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'id': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'compartment_id': 'str', + 'display_name': 'str', + 'target_id': 'str', + 'description': 'str', + 'lifecycle_state': 'str', + 'lifecycle_details': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'id': 'id', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'compartment_id': 'compartmentId', + 'display_name': 'displayName', + 'target_id': 'targetId', + 'description': 'description', + 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._id = None + self._time_created = None + self._time_updated = None + self._compartment_id = None + self._display_name = None + self._target_id = None + self._description = None + self._lifecycle_state = None + self._lifecycle_details = None + self._freeform_tags = None + self._defined_tags = None + + @property + def id(self): + """ + **[Required]** Gets the id of this SecurityPolicyReportSummary. + The OCID of the security policy report. + + + :return: The id of this SecurityPolicyReportSummary. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this SecurityPolicyReportSummary. + The OCID of the security policy report. + + + :param id: The id of this SecurityPolicyReportSummary. + :type: str + """ + self._id = id + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this SecurityPolicyReportSummary. + The date and time the security policy report was created, in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_created of this SecurityPolicyReportSummary. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this SecurityPolicyReportSummary. + The date and time the security policy report was created, in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_created: The time_created of this SecurityPolicyReportSummary. + :type: datetime + """ + self._time_created = time_created + + @property + def time_updated(self): + """ + Gets the time_updated of this SecurityPolicyReportSummary. + The date and time the security policy report was last updated, in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_updated of this SecurityPolicyReportSummary. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this SecurityPolicyReportSummary. + The date and time the security policy report was last updated, in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_updated: The time_updated of this SecurityPolicyReportSummary. + :type: datetime + """ + self._time_updated = time_updated + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this SecurityPolicyReportSummary. + The OCID of the compartment that contains the security policy report. + + + :return: The compartment_id of this SecurityPolicyReportSummary. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this SecurityPolicyReportSummary. + The OCID of the compartment that contains the security policy report. + + + :param compartment_id: The compartment_id of this SecurityPolicyReportSummary. + :type: str + """ + self._compartment_id = compartment_id + + @property + def display_name(self): + """ + **[Required]** Gets the display_name of this SecurityPolicyReportSummary. + The display name of the security policy report. + + + :return: The display_name of this SecurityPolicyReportSummary. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this SecurityPolicyReportSummary. + The display name of the security policy report. + + + :param display_name: The display_name of this SecurityPolicyReportSummary. + :type: str + """ + self._display_name = display_name + + @property + def target_id(self): + """ + **[Required]** Gets the target_id of this SecurityPolicyReportSummary. + The OCID of the of the target database. + + + :return: The target_id of this SecurityPolicyReportSummary. + :rtype: str + """ + return self._target_id + + @target_id.setter + def target_id(self, target_id): + """ + Sets the target_id of this SecurityPolicyReportSummary. + The OCID of the of the target database. + + + :param target_id: The target_id of this SecurityPolicyReportSummary. + :type: str + """ + self._target_id = target_id + + @property + def description(self): + """ + Gets the description of this SecurityPolicyReportSummary. + The description of the security policy report. + + + :return: The description of this SecurityPolicyReportSummary. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this SecurityPolicyReportSummary. + The description of the security policy report. + + + :param description: The description of this SecurityPolicyReportSummary. + :type: str + """ + self._description = description + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this SecurityPolicyReportSummary. + The current state of the security policy report. + + Allowed values for this property are: "CREATING", "SUCCEEDED", "UPDATING", "DELETING", "DELETED", "FAILED", "NEEDS_ATTENTION", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this SecurityPolicyReportSummary. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this SecurityPolicyReportSummary. + The current state of the security policy report. + + + :param lifecycle_state: The lifecycle_state of this SecurityPolicyReportSummary. + :type: str + """ + allowed_values = ["CREATING", "SUCCEEDED", "UPDATING", "DELETING", "DELETED", "FAILED", "NEEDS_ATTENTION"] + if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): + lifecycle_state = 'UNKNOWN_ENUM_VALUE' + self._lifecycle_state = lifecycle_state + + @property + def lifecycle_details(self): + """ + Gets the lifecycle_details of this SecurityPolicyReportSummary. + Details about the current state of the security policy report. + + + :return: The lifecycle_details of this SecurityPolicyReportSummary. + :rtype: str + """ + return self._lifecycle_details + + @lifecycle_details.setter + def lifecycle_details(self, lifecycle_details): + """ + Sets the lifecycle_details of this SecurityPolicyReportSummary. + Details about the current state of the security policy report. + + + :param lifecycle_details: The lifecycle_details of this SecurityPolicyReportSummary. + :type: str + """ + self._lifecycle_details = lifecycle_details + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this SecurityPolicyReportSummary. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this SecurityPolicyReportSummary. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this SecurityPolicyReportSummary. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this SecurityPolicyReportSummary. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this SecurityPolicyReportSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this SecurityPolicyReportSummary. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this SecurityPolicyReportSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this SecurityPolicyReportSummary. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/target_database.py b/src/oci/data_safe/models/target_database.py index 234e731e9d..fd9173c4c4 100644 --- a/src/oci/data_safe/models/target_database.py +++ b/src/oci/data_safe/models/target_database.py @@ -106,6 +106,10 @@ def __init__(self, **kwargs): The value to assign to the time_updated property of this TargetDatabase. :type time_updated: datetime + :param peer_target_databases: + The value to assign to the peer_target_databases property of this TargetDatabase. + :type peer_target_databases: list[oci.data_safe.models.PeerTargetDatabase] + :param freeform_tags: The value to assign to the freeform_tags property of this TargetDatabase. :type freeform_tags: dict(str, str) @@ -133,6 +137,7 @@ def __init__(self, **kwargs): 'lifecycle_details': 'str', 'time_created': 'datetime', 'time_updated': 'datetime', + 'peer_target_databases': 'list[PeerTargetDatabase]', 'freeform_tags': 'dict(str, str)', 'defined_tags': 'dict(str, dict(str, object))', 'system_tags': 'dict(str, dict(str, object))' @@ -152,6 +157,7 @@ def __init__(self, **kwargs): 'lifecycle_details': 'lifecycleDetails', 'time_created': 'timeCreated', 'time_updated': 'timeUpdated', + 'peer_target_databases': 'peerTargetDatabases', 'freeform_tags': 'freeformTags', 'defined_tags': 'definedTags', 'system_tags': 'systemTags' @@ -170,6 +176,7 @@ def __init__(self, **kwargs): self._lifecycle_details = None self._time_created = None self._time_updated = None + self._peer_target_databases = None self._freeform_tags = None self._defined_tags = None self._system_tags = None @@ -476,6 +483,30 @@ def time_updated(self, time_updated): """ self._time_updated = time_updated + @property + def peer_target_databases(self): + """ + Gets the peer_target_databases of this TargetDatabase. + The OCIDs of associated resources like database, Data Safe private endpoint, etc. + + + :return: The peer_target_databases of this TargetDatabase. + :rtype: list[oci.data_safe.models.PeerTargetDatabase] + """ + return self._peer_target_databases + + @peer_target_databases.setter + def peer_target_databases(self, peer_target_databases): + """ + Sets the peer_target_databases of this TargetDatabase. + The OCIDs of associated resources like database, Data Safe private endpoint, etc. + + + :param peer_target_databases: The peer_target_databases of this TargetDatabase. + :type: list[oci.data_safe.models.PeerTargetDatabase] + """ + self._peer_target_databases = peer_target_databases + @property def freeform_tags(self): """ diff --git a/src/oci/data_safe/models/update_finding_details.py b/src/oci/data_safe/models/update_finding_details.py new file mode 100644 index 0000000000..2c102bf888 --- /dev/null +++ b/src/oci/data_safe/models/update_finding_details.py @@ -0,0 +1,134 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20181201 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class UpdateFindingDetails(object): + """ + Details to update a finding in a security assessment. + """ + + def __init__(self, **kwargs): + """ + Initializes a new UpdateFindingDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param severity: + The value to assign to the severity property of this UpdateFindingDetails. + :type severity: str + + :param justification: + The value to assign to the justification property of this UpdateFindingDetails. + :type justification: str + + :param time_valid_until: + The value to assign to the time_valid_until property of this UpdateFindingDetails. + :type time_valid_until: datetime + + """ + self.swagger_types = { + 'severity': 'str', + 'justification': 'str', + 'time_valid_until': 'datetime' + } + + self.attribute_map = { + 'severity': 'severity', + 'justification': 'justification', + 'time_valid_until': 'timeValidUntil' + } + + self._severity = None + self._justification = None + self._time_valid_until = None + + @property + def severity(self): + """ + Gets the severity of this UpdateFindingDetails. + The severity of the finding as defined or changed by the user. + + + :return: The severity of this UpdateFindingDetails. + :rtype: str + """ + return self._severity + + @severity.setter + def severity(self, severity): + """ + Sets the severity of this UpdateFindingDetails. + The severity of the finding as defined or changed by the user. + + + :param severity: The severity of this UpdateFindingDetails. + :type: str + """ + self._severity = severity + + @property + def justification(self): + """ + Gets the justification of this UpdateFindingDetails. + User provided reason for accepting or modifying this finding if they choose to do so. + + + :return: The justification of this UpdateFindingDetails. + :rtype: str + """ + return self._justification + + @justification.setter + def justification(self, justification): + """ + Sets the justification of this UpdateFindingDetails. + User provided reason for accepting or modifying this finding if they choose to do so. + + + :param justification: The justification of this UpdateFindingDetails. + :type: str + """ + self._justification = justification + + @property + def time_valid_until(self): + """ + Gets the time_valid_until of this UpdateFindingDetails. + The time until which the change in severity (deferred / modified) got the given finding is valid. + + + :return: The time_valid_until of this UpdateFindingDetails. + :rtype: datetime + """ + return self._time_valid_until + + @time_valid_until.setter + def time_valid_until(self, time_valid_until): + """ + Sets the time_valid_until of this UpdateFindingDetails. + The time until which the change in severity (deferred / modified) got the given finding is valid. + + + :param time_valid_until: The time_valid_until of this UpdateFindingDetails. + :type: datetime + """ + self._time_valid_until = time_valid_until + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/update_peer_target_database_details.py b/src/oci/data_safe/models/update_peer_target_database_details.py new file mode 100644 index 0000000000..b18ab6189c --- /dev/null +++ b/src/oci/data_safe/models/update_peer_target_database_details.py @@ -0,0 +1,157 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20181201 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class UpdatePeerTargetDatabaseDetails(object): + """ + The details of the peer database used for updating the peer target database in Data Safe. + """ + + def __init__(self, **kwargs): + """ + Initializes a new UpdatePeerTargetDatabaseDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param display_name: + The value to assign to the display_name property of this UpdatePeerTargetDatabaseDetails. + :type display_name: str + + :param description: + The value to assign to the description property of this UpdatePeerTargetDatabaseDetails. + :type description: str + + :param database_details: + The value to assign to the database_details property of this UpdatePeerTargetDatabaseDetails. + :type database_details: oci.data_safe.models.DatabaseDetails + + :param tls_config: + The value to assign to the tls_config property of this UpdatePeerTargetDatabaseDetails. + :type tls_config: oci.data_safe.models.TlsConfig + + """ + self.swagger_types = { + 'display_name': 'str', + 'description': 'str', + 'database_details': 'DatabaseDetails', + 'tls_config': 'TlsConfig' + } + + self.attribute_map = { + 'display_name': 'displayName', + 'description': 'description', + 'database_details': 'databaseDetails', + 'tls_config': 'tlsConfig' + } + + self._display_name = None + self._description = None + self._database_details = None + self._tls_config = None + + @property + def display_name(self): + """ + Gets the display_name of this UpdatePeerTargetDatabaseDetails. + The display name of the peer target database in Data Safe. + + + :return: The display_name of this UpdatePeerTargetDatabaseDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this UpdatePeerTargetDatabaseDetails. + The display name of the peer target database in Data Safe. + + + :param display_name: The display_name of this UpdatePeerTargetDatabaseDetails. + :type: str + """ + self._display_name = display_name + + @property + def description(self): + """ + Gets the description of this UpdatePeerTargetDatabaseDetails. + The description of the peer target database in Data Safe. + + + :return: The description of this UpdatePeerTargetDatabaseDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this UpdatePeerTargetDatabaseDetails. + The description of the peer target database in Data Safe. + + + :param description: The description of this UpdatePeerTargetDatabaseDetails. + :type: str + """ + self._description = description + + @property + def database_details(self): + """ + Gets the database_details of this UpdatePeerTargetDatabaseDetails. + + :return: The database_details of this UpdatePeerTargetDatabaseDetails. + :rtype: oci.data_safe.models.DatabaseDetails + """ + return self._database_details + + @database_details.setter + def database_details(self, database_details): + """ + Sets the database_details of this UpdatePeerTargetDatabaseDetails. + + :param database_details: The database_details of this UpdatePeerTargetDatabaseDetails. + :type: oci.data_safe.models.DatabaseDetails + """ + self._database_details = database_details + + @property + def tls_config(self): + """ + Gets the tls_config of this UpdatePeerTargetDatabaseDetails. + + :return: The tls_config of this UpdatePeerTargetDatabaseDetails. + :rtype: oci.data_safe.models.TlsConfig + """ + return self._tls_config + + @tls_config.setter + def tls_config(self, tls_config): + """ + Sets the tls_config of this UpdatePeerTargetDatabaseDetails. + + :param tls_config: The tls_config of this UpdatePeerTargetDatabaseDetails. + :type: oci.data_safe.models.TlsConfig + """ + self._tls_config = tls_config + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/update_report_details.py b/src/oci/data_safe/models/update_report_details.py new file mode 100644 index 0000000000..08cdba500b --- /dev/null +++ b/src/oci/data_safe/models/update_report_details.py @@ -0,0 +1,119 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20181201 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class UpdateReportDetails(object): + """ + The details for updating the report. + """ + + def __init__(self, **kwargs): + """ + Initializes a new UpdateReportDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param freeform_tags: + The value to assign to the freeform_tags property of this UpdateReportDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this UpdateReportDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._freeform_tags = None + self._defined_tags = None + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this UpdateReportDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this UpdateReportDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this UpdateReportDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this UpdateReportDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this UpdateReportDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this UpdateReportDetails. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this UpdateReportDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this UpdateReportDetails. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/user_access_analytics_collection.py b/src/oci/data_safe/models/user_access_analytics_collection.py new file mode 100644 index 0000000000..3930ec0982 --- /dev/null +++ b/src/oci/data_safe/models/user_access_analytics_collection.py @@ -0,0 +1,72 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20181201 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class UserAccessAnalyticsCollection(object): + """ + A collection of user access analytics summary objects. + """ + + def __init__(self, **kwargs): + """ + Initializes a new UserAccessAnalyticsCollection object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param items: + The value to assign to the items property of this UserAccessAnalyticsCollection. + :type items: list[oci.data_safe.models.UserAccessAnalyticsSummary] + + """ + self.swagger_types = { + 'items': 'list[UserAccessAnalyticsSummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this UserAccessAnalyticsCollection. + An array of user access analytics summary objects. + + + :return: The items of this UserAccessAnalyticsCollection. + :rtype: list[oci.data_safe.models.UserAccessAnalyticsSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this UserAccessAnalyticsCollection. + An array of user access analytics summary objects. + + + :param items: The items of this UserAccessAnalyticsCollection. + :type: list[oci.data_safe.models.UserAccessAnalyticsSummary] + """ + self._items = items + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/user_access_analytics_summary.py b/src/oci/data_safe/models/user_access_analytics_summary.py new file mode 100644 index 0000000000..9313e3ae63 --- /dev/null +++ b/src/oci/data_safe/models/user_access_analytics_summary.py @@ -0,0 +1,103 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20181201 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class UserAccessAnalyticsSummary(object): + """ + Summary of user access analytics data + """ + + def __init__(self, **kwargs): + """ + Initializes a new UserAccessAnalyticsSummary object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param count: + The value to assign to the count property of this UserAccessAnalyticsSummary. + :type count: int + + :param user_name: + The value to assign to the user_name property of this UserAccessAnalyticsSummary. + :type user_name: str + + """ + self.swagger_types = { + 'count': 'int', + 'user_name': 'str' + } + + self.attribute_map = { + 'count': 'count', + 'user_name': 'userName' + } + + self._count = None + self._user_name = None + + @property + def count(self): + """ + **[Required]** Gets the count of this UserAccessAnalyticsSummary. + The total count of schemas a user can access + + + :return: The count of this UserAccessAnalyticsSummary. + :rtype: int + """ + return self._count + + @count.setter + def count(self, count): + """ + Sets the count of this UserAccessAnalyticsSummary. + The total count of schemas a user can access + + + :param count: The count of this UserAccessAnalyticsSummary. + :type: int + """ + self._count = count + + @property + def user_name(self): + """ + **[Required]** Gets the user_name of this UserAccessAnalyticsSummary. + Name of the user. + + + :return: The user_name of this UserAccessAnalyticsSummary. + :rtype: str + """ + return self._user_name + + @user_name.setter + def user_name(self, user_name): + """ + Sets the user_name of this UserAccessAnalyticsSummary. + Name of the user. + + + :param user_name: The user_name of this UserAccessAnalyticsSummary. + :type: str + """ + self._user_name = user_name + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/user_summary.py b/src/oci/data_safe/models/user_summary.py index 569fbd9f1e..0d3969d806 100644 --- a/src/oci/data_safe/models/user_summary.py +++ b/src/oci/data_safe/models/user_summary.py @@ -160,6 +160,14 @@ def __init__(self, **kwargs): Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type admin_roles: list[str] + :param are_all_schemas_accessible: + The value to assign to the are_all_schemas_accessible property of this UserSummary. + :type are_all_schemas_accessible: bool + + :param schema_list: + The value to assign to the schema_list property of this UserSummary. + :type schema_list: list[str] + """ self.swagger_types = { 'key': 'str', @@ -173,7 +181,9 @@ def __init__(self, **kwargs): 'user_profile': 'str', 'time_password_changed': 'datetime', 'user_types': 'list[str]', - 'admin_roles': 'list[str]' + 'admin_roles': 'list[str]', + 'are_all_schemas_accessible': 'bool', + 'schema_list': 'list[str]' } self.attribute_map = { @@ -188,7 +198,9 @@ def __init__(self, **kwargs): 'user_profile': 'userProfile', 'time_password_changed': 'timePasswordChanged', 'user_types': 'userTypes', - 'admin_roles': 'adminRoles' + 'admin_roles': 'adminRoles', + 'are_all_schemas_accessible': 'areAllSchemasAccessible', + 'schema_list': 'schemaList' } self._key = None @@ -203,6 +215,8 @@ def __init__(self, **kwargs): self._time_password_changed = None self._user_types = None self._admin_roles = None + self._are_all_schemas_accessible = None + self._schema_list = None @property def key(self): @@ -546,6 +560,54 @@ def admin_roles(self, admin_roles): admin_roles[:] = ['UNKNOWN_ENUM_VALUE' if not value_allowed_none_or_none_sentinel(x, allowed_values) else x for x in admin_roles] self._admin_roles = admin_roles + @property + def are_all_schemas_accessible(self): + """ + Gets the are_all_schemas_accessible of this UserSummary. + Indicates whether the user has access to all the schemas. + + + :return: The are_all_schemas_accessible of this UserSummary. + :rtype: bool + """ + return self._are_all_schemas_accessible + + @are_all_schemas_accessible.setter + def are_all_schemas_accessible(self, are_all_schemas_accessible): + """ + Sets the are_all_schemas_accessible of this UserSummary. + Indicates whether the user has access to all the schemas. + + + :param are_all_schemas_accessible: The are_all_schemas_accessible of this UserSummary. + :type: bool + """ + self._are_all_schemas_accessible = are_all_schemas_accessible + + @property + def schema_list(self): + """ + Gets the schema_list of this UserSummary. + The list of database schemas current user can access. + + + :return: The schema_list of this UserSummary. + :rtype: list[str] + """ + return self._schema_list + + @schema_list.setter + def schema_list(self, schema_list): + """ + Sets the schema_list of this UserSummary. + The list of database schemas current user can access. + + + :param schema_list: The schema_list of this UserSummary. + :type: list[str] + """ + self._schema_list = schema_list + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/data_safe/models/work_request.py b/src/oci/data_safe/models/work_request.py index 045c3c7ca8..dd5dc9ec7d 100644 --- a/src/oci/data_safe/models/work_request.py +++ b/src/oci/data_safe/models/work_request.py @@ -79,6 +79,22 @@ class WorkRequest(object): #: This constant has a value of "CHANGE_TARGET_DATABASE_COMPARTMENT" OPERATION_TYPE_CHANGE_TARGET_DATABASE_COMPARTMENT = "CHANGE_TARGET_DATABASE_COMPARTMENT" + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "CREATE_PEER_TARGET_DATABASE" + OPERATION_TYPE_CREATE_PEER_TARGET_DATABASE = "CREATE_PEER_TARGET_DATABASE" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "UPDATE_PEER_TARGET_DATABASE" + OPERATION_TYPE_UPDATE_PEER_TARGET_DATABASE = "UPDATE_PEER_TARGET_DATABASE" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "DELETE_PEER_TARGET_DATABASE" + OPERATION_TYPE_DELETE_PEER_TARGET_DATABASE = "DELETE_PEER_TARGET_DATABASE" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "REFRESH_TARGET_DATABASE" + OPERATION_TYPE_REFRESH_TARGET_DATABASE = "REFRESH_TARGET_DATABASE" + #: A constant which can be used with the operation_type property of a WorkRequest. #: This constant has a value of "PROVISION_POLICY" OPERATION_TYPE_PROVISION_POLICY = "PROVISION_POLICY" @@ -171,6 +187,10 @@ class WorkRequest(object): #: This constant has a value of "UPDATE_SECURITY_ASSESSMENT" OPERATION_TYPE_UPDATE_SECURITY_ASSESSMENT = "UPDATE_SECURITY_ASSESSMENT" + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "UPDATE_FINDING_RISK" + OPERATION_TYPE_UPDATE_FINDING_RISK = "UPDATE_FINDING_RISK" + #: A constant which can be used with the operation_type property of a WorkRequest. #: This constant has a value of "CHANGE_SECURITY_ASSESSMENT_COMPARTMENT" OPERATION_TYPE_CHANGE_SECURITY_ASSESSMENT_COMPARTMENT = "CHANGE_SECURITY_ASSESSMENT_COMPARTMENT" @@ -491,6 +511,18 @@ class WorkRequest(object): #: This constant has a value of "ABORT_MASKING" OPERATION_TYPE_ABORT_MASKING = "ABORT_MASKING" + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "CREATE_SECURITY_POLICY_REPORT" + OPERATION_TYPE_CREATE_SECURITY_POLICY_REPORT = "CREATE_SECURITY_POLICY_REPORT" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "REFRESH_SECURITY_POLICY_CACHE" + OPERATION_TYPE_REFRESH_SECURITY_POLICY_CACHE = "REFRESH_SECURITY_POLICY_CACHE" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "DELETE_SECURITY_POLICY_CACHE" + OPERATION_TYPE_DELETE_SECURITY_POLICY_CACHE = "DELETE_SECURITY_POLICY_CACHE" + #: A constant which can be used with the operation_type property of a WorkRequest. #: This constant has a value of "CREATE_SCHEDULE" OPERATION_TYPE_CREATE_SCHEDULE = "CREATE_SCHEDULE" @@ -546,7 +578,7 @@ def __init__(self, **kwargs): :param operation_type: The value to assign to the operation_type property of this WorkRequest. - Allowed values for this property are: "ENABLE_DATA_SAFE_CONFIGURATION", "CREATE_PRIVATE_ENDPOINT", "UPDATE_PRIVATE_ENDPOINT", "DELETE_PRIVATE_ENDPOINT", "CHANGE_PRIVATE_ENDPOINT_COMPARTMENT", "CREATE_ONPREM_CONNECTOR", "UPDATE_ONPREM_CONNECTOR", "DELETE_ONPREM_CONNECTOR", "UPDATE_ONPREM_CONNECTOR_WALLET", "CHANGE_ONPREM_CONNECTOR_COMPARTMENT", "CREATE_TARGET_DATABASE", "UPDATE_TARGET_DATABASE", "ACTIVATE_TARGET_DATABASE", "DEACTIVATE_TARGET_DATABASE", "DELETE_TARGET_DATABASE", "CHANGE_TARGET_DATABASE_COMPARTMENT", "PROVISION_POLICY", "RETRIEVE_POLICY", "UPDATE_POLICY", "CHANGE_POLICY_COMPARTMENT", "CREATE_USER_ASSESSMENT", "ASSESS_USER_ASSESSMENT", "CREATE_SNAPSHOT_USER_ASSESSMENT", "CREATE_SCHEDULE_USER_ASSESSMENT", "COMPARE_WITH_BASELINE_USER_ASSESSMENT", "DELETE_USER_ASSESSMENT", "UPDATE_USER_ASSESSMENT", "CHANGE_USER_ASSESSMENT_COMPARTMENT", "SET_USER_ASSESSMENT_BASELINE", "UNSET_USER_ASSESSMENT_BASELINE", "GENERATE_USER_ASSESSMENT_REPORT", "CREATE_SECURITY_ASSESSMENT", "CREATE_SECURITY_ASSESSMENT_NOW", "ASSESS_SECURITY_ASSESSMENT", "CREATE_SNAPSHOT_SECURITY_ASSESSMENT", "CREATE_SCHEDULE_SECURITY_ASSESSMENT", "COMPARE_WITH_BASELINE_SECURITY_ASSESSMENT", "DELETE_SECURITY_ASSESSMENT", "UPDATE_SECURITY_ASSESSMENT", "CHANGE_SECURITY_ASSESSMENT_COMPARTMENT", "SET_SECURITY_ASSESSMENT_BASELINE", "UNSET_SECURITY_ASSESSMENT_BASELINE", "GENERATE_SECURITY_ASSESSMENT_REPORT", "CREATE_AUDIT_PROFILE", "CALCULATE_VOLUME", "CALCULATE_COLLECTED_VOLUME", "CREATE_DB_SECURITY_CONFIG", "REFRESH_DB_SECURITY_CONFIG", "UPDATE_DB_SECURITY_CONFIG", "CHANGE_DB_SECURITY_CONFIG_COMPARTMENT", "GENERATE_FIREWALL_POLICY", "UPDATE_FIREWALL_POLICY", "CHANGE_FIREWALL_POLICY_COMPARTMENT", "DELETE_FIREWALL_POLICY", "CREATE_SQL_COLLECTION", "UPDATE_SQL_COLLECTION", "START_SQL_COLLECTION", "STOP_SQL_COLLECTION", "DELETE_SQL_COLLECTION", "CHANGE_SQL_COLLECTION_COMPARTMENT", "REFRESH_SQL_COLLECTION_LOG_INSIGHTS", "PURGE_SQL_COLLECTION_LOGS", "REFRESH_VIOLATIONS", "UPDATE_SECURITY_POLICY", "CHANGE_SECURITY_POLICY_COMPARTMENT", "UPDATE_SECURITY_POLICY_DEPLOYMENT", "CHANGE_SECURITY_POLICY_DEPLOYMENT_COMPARTMENT", "AUDIT_TRAIL", "DELETE_AUDIT_TRAIL", "DISCOVER_AUDIT_TRAILS", "UPDATE_AUDIT_TRAIL", "UPDATE_AUDIT_PROFILE", "AUDIT_CHANGE_COMPARTMENT", "CREATE_REPORT_DEFINITION", "UPDATE_REPORT_DEFINITION", "CHANGE_REPORT_DEFINITION_COMPARTMENT", "DELETE_REPORT_DEFINITION", "GENERATE_REPORT", "CHANGE_REPORT_COMPARTMENT", "DELETE_ARCHIVE_RETRIEVAL", "CREATE_ARCHIVE_RETRIEVAL", "UPDATE_ARCHIVE_RETRIEVAL", "CHANGE_ARCHIVE_RETRIEVAL_COMPARTMENT", "UPDATE_ALERT", "TARGET_ALERT_POLICY_ASSOCIATION", "CREATE_SENSITIVE_DATA_MODEL", "UPDATE_SENSITIVE_DATA_MODEL", "DELETE_SENSITIVE_DATA_MODEL", "UPLOAD_SENSITIVE_DATA_MODEL", "GENERATE_SENSITIVE_DATA_MODEL_FOR_DOWNLOAD", "CREATE_SENSITIVE_COLUMN", "UPDATE_SENSITIVE_COLUMN", "PATCH_SENSITIVE_COLUMNS", "CREATE_DISCOVERY_JOB", "DELETE_DISCOVERY_JOB", "PATCH_DISCOVERY_JOB_RESULT", "APPLY_DISCOVERY_JOB_RESULT", "GENERATE_DISCOVERY_REPORT", "CREATE_SENSITIVE_TYPE", "UPDATE_SENSITIVE_TYPE", "CREATE_MASKING_POLICY", "UPDATE_MASKING_POLICY", "DELETE_MASKING_POLICY", "UPLOAD_MASKING_POLICY", "GENERATE_MASKING_POLICY_FOR_DOWNLOAD", "CREATE_MASKING_COLUMN", "UPDATE_MASKING_COLUMN", "PATCH_MASKING_COLUMNS", "GENERATE_MASKING_REPORT", "CREATE_LIBRARY_MASKING_FORMAT", "UPDATE_LIBRARY_MASKING_FORMAT", "ADD_COLUMNS_FROM_SDM", "MASKING_JOB", "CREATE_DIFFERENCE", "DELETE_DIFFERENCE", "UPDATE_DIFFERENCE", "PATCH_DIFFERENCE", "APPLY_DIFFERENCE", "ABORT_MASKING", "CREATE_SCHEDULE", "REMOVE_SCHEDULE_REPORT", "UPDATE_ALL_ALERT", "PATCH_TARGET_ALERT_POLICY_ASSOCIATION", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "ENABLE_DATA_SAFE_CONFIGURATION", "CREATE_PRIVATE_ENDPOINT", "UPDATE_PRIVATE_ENDPOINT", "DELETE_PRIVATE_ENDPOINT", "CHANGE_PRIVATE_ENDPOINT_COMPARTMENT", "CREATE_ONPREM_CONNECTOR", "UPDATE_ONPREM_CONNECTOR", "DELETE_ONPREM_CONNECTOR", "UPDATE_ONPREM_CONNECTOR_WALLET", "CHANGE_ONPREM_CONNECTOR_COMPARTMENT", "CREATE_TARGET_DATABASE", "UPDATE_TARGET_DATABASE", "ACTIVATE_TARGET_DATABASE", "DEACTIVATE_TARGET_DATABASE", "DELETE_TARGET_DATABASE", "CHANGE_TARGET_DATABASE_COMPARTMENT", "CREATE_PEER_TARGET_DATABASE", "UPDATE_PEER_TARGET_DATABASE", "DELETE_PEER_TARGET_DATABASE", "REFRESH_TARGET_DATABASE", "PROVISION_POLICY", "RETRIEVE_POLICY", "UPDATE_POLICY", "CHANGE_POLICY_COMPARTMENT", "CREATE_USER_ASSESSMENT", "ASSESS_USER_ASSESSMENT", "CREATE_SNAPSHOT_USER_ASSESSMENT", "CREATE_SCHEDULE_USER_ASSESSMENT", "COMPARE_WITH_BASELINE_USER_ASSESSMENT", "DELETE_USER_ASSESSMENT", "UPDATE_USER_ASSESSMENT", "CHANGE_USER_ASSESSMENT_COMPARTMENT", "SET_USER_ASSESSMENT_BASELINE", "UNSET_USER_ASSESSMENT_BASELINE", "GENERATE_USER_ASSESSMENT_REPORT", "CREATE_SECURITY_ASSESSMENT", "CREATE_SECURITY_ASSESSMENT_NOW", "ASSESS_SECURITY_ASSESSMENT", "CREATE_SNAPSHOT_SECURITY_ASSESSMENT", "CREATE_SCHEDULE_SECURITY_ASSESSMENT", "COMPARE_WITH_BASELINE_SECURITY_ASSESSMENT", "DELETE_SECURITY_ASSESSMENT", "UPDATE_SECURITY_ASSESSMENT", "UPDATE_FINDING_RISK", "CHANGE_SECURITY_ASSESSMENT_COMPARTMENT", "SET_SECURITY_ASSESSMENT_BASELINE", "UNSET_SECURITY_ASSESSMENT_BASELINE", "GENERATE_SECURITY_ASSESSMENT_REPORT", "CREATE_AUDIT_PROFILE", "CALCULATE_VOLUME", "CALCULATE_COLLECTED_VOLUME", "CREATE_DB_SECURITY_CONFIG", "REFRESH_DB_SECURITY_CONFIG", "UPDATE_DB_SECURITY_CONFIG", "CHANGE_DB_SECURITY_CONFIG_COMPARTMENT", "GENERATE_FIREWALL_POLICY", "UPDATE_FIREWALL_POLICY", "CHANGE_FIREWALL_POLICY_COMPARTMENT", "DELETE_FIREWALL_POLICY", "CREATE_SQL_COLLECTION", "UPDATE_SQL_COLLECTION", "START_SQL_COLLECTION", "STOP_SQL_COLLECTION", "DELETE_SQL_COLLECTION", "CHANGE_SQL_COLLECTION_COMPARTMENT", "REFRESH_SQL_COLLECTION_LOG_INSIGHTS", "PURGE_SQL_COLLECTION_LOGS", "REFRESH_VIOLATIONS", "UPDATE_SECURITY_POLICY", "CHANGE_SECURITY_POLICY_COMPARTMENT", "UPDATE_SECURITY_POLICY_DEPLOYMENT", "CHANGE_SECURITY_POLICY_DEPLOYMENT_COMPARTMENT", "AUDIT_TRAIL", "DELETE_AUDIT_TRAIL", "DISCOVER_AUDIT_TRAILS", "UPDATE_AUDIT_TRAIL", "UPDATE_AUDIT_PROFILE", "AUDIT_CHANGE_COMPARTMENT", "CREATE_REPORT_DEFINITION", "UPDATE_REPORT_DEFINITION", "CHANGE_REPORT_DEFINITION_COMPARTMENT", "DELETE_REPORT_DEFINITION", "GENERATE_REPORT", "CHANGE_REPORT_COMPARTMENT", "DELETE_ARCHIVE_RETRIEVAL", "CREATE_ARCHIVE_RETRIEVAL", "UPDATE_ARCHIVE_RETRIEVAL", "CHANGE_ARCHIVE_RETRIEVAL_COMPARTMENT", "UPDATE_ALERT", "TARGET_ALERT_POLICY_ASSOCIATION", "CREATE_SENSITIVE_DATA_MODEL", "UPDATE_SENSITIVE_DATA_MODEL", "DELETE_SENSITIVE_DATA_MODEL", "UPLOAD_SENSITIVE_DATA_MODEL", "GENERATE_SENSITIVE_DATA_MODEL_FOR_DOWNLOAD", "CREATE_SENSITIVE_COLUMN", "UPDATE_SENSITIVE_COLUMN", "PATCH_SENSITIVE_COLUMNS", "CREATE_DISCOVERY_JOB", "DELETE_DISCOVERY_JOB", "PATCH_DISCOVERY_JOB_RESULT", "APPLY_DISCOVERY_JOB_RESULT", "GENERATE_DISCOVERY_REPORT", "CREATE_SENSITIVE_TYPE", "UPDATE_SENSITIVE_TYPE", "CREATE_MASKING_POLICY", "UPDATE_MASKING_POLICY", "DELETE_MASKING_POLICY", "UPLOAD_MASKING_POLICY", "GENERATE_MASKING_POLICY_FOR_DOWNLOAD", "CREATE_MASKING_COLUMN", "UPDATE_MASKING_COLUMN", "PATCH_MASKING_COLUMNS", "GENERATE_MASKING_REPORT", "CREATE_LIBRARY_MASKING_FORMAT", "UPDATE_LIBRARY_MASKING_FORMAT", "ADD_COLUMNS_FROM_SDM", "MASKING_JOB", "CREATE_DIFFERENCE", "DELETE_DIFFERENCE", "UPDATE_DIFFERENCE", "PATCH_DIFFERENCE", "APPLY_DIFFERENCE", "ABORT_MASKING", "CREATE_SECURITY_POLICY_REPORT", "REFRESH_SECURITY_POLICY_CACHE", "DELETE_SECURITY_POLICY_CACHE", "CREATE_SCHEDULE", "REMOVE_SCHEDULE_REPORT", "UPDATE_ALL_ALERT", "PATCH_TARGET_ALERT_POLICY_ASSOCIATION", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type operation_type: str @@ -625,7 +657,7 @@ def operation_type(self): **[Required]** Gets the operation_type of this WorkRequest. The resources that are affected by the work request. - Allowed values for this property are: "ENABLE_DATA_SAFE_CONFIGURATION", "CREATE_PRIVATE_ENDPOINT", "UPDATE_PRIVATE_ENDPOINT", "DELETE_PRIVATE_ENDPOINT", "CHANGE_PRIVATE_ENDPOINT_COMPARTMENT", "CREATE_ONPREM_CONNECTOR", "UPDATE_ONPREM_CONNECTOR", "DELETE_ONPREM_CONNECTOR", "UPDATE_ONPREM_CONNECTOR_WALLET", "CHANGE_ONPREM_CONNECTOR_COMPARTMENT", "CREATE_TARGET_DATABASE", "UPDATE_TARGET_DATABASE", "ACTIVATE_TARGET_DATABASE", "DEACTIVATE_TARGET_DATABASE", "DELETE_TARGET_DATABASE", "CHANGE_TARGET_DATABASE_COMPARTMENT", "PROVISION_POLICY", "RETRIEVE_POLICY", "UPDATE_POLICY", "CHANGE_POLICY_COMPARTMENT", "CREATE_USER_ASSESSMENT", "ASSESS_USER_ASSESSMENT", "CREATE_SNAPSHOT_USER_ASSESSMENT", "CREATE_SCHEDULE_USER_ASSESSMENT", "COMPARE_WITH_BASELINE_USER_ASSESSMENT", "DELETE_USER_ASSESSMENT", "UPDATE_USER_ASSESSMENT", "CHANGE_USER_ASSESSMENT_COMPARTMENT", "SET_USER_ASSESSMENT_BASELINE", "UNSET_USER_ASSESSMENT_BASELINE", "GENERATE_USER_ASSESSMENT_REPORT", "CREATE_SECURITY_ASSESSMENT", "CREATE_SECURITY_ASSESSMENT_NOW", "ASSESS_SECURITY_ASSESSMENT", "CREATE_SNAPSHOT_SECURITY_ASSESSMENT", "CREATE_SCHEDULE_SECURITY_ASSESSMENT", "COMPARE_WITH_BASELINE_SECURITY_ASSESSMENT", "DELETE_SECURITY_ASSESSMENT", "UPDATE_SECURITY_ASSESSMENT", "CHANGE_SECURITY_ASSESSMENT_COMPARTMENT", "SET_SECURITY_ASSESSMENT_BASELINE", "UNSET_SECURITY_ASSESSMENT_BASELINE", "GENERATE_SECURITY_ASSESSMENT_REPORT", "CREATE_AUDIT_PROFILE", "CALCULATE_VOLUME", "CALCULATE_COLLECTED_VOLUME", "CREATE_DB_SECURITY_CONFIG", "REFRESH_DB_SECURITY_CONFIG", "UPDATE_DB_SECURITY_CONFIG", "CHANGE_DB_SECURITY_CONFIG_COMPARTMENT", "GENERATE_FIREWALL_POLICY", "UPDATE_FIREWALL_POLICY", "CHANGE_FIREWALL_POLICY_COMPARTMENT", "DELETE_FIREWALL_POLICY", "CREATE_SQL_COLLECTION", "UPDATE_SQL_COLLECTION", "START_SQL_COLLECTION", "STOP_SQL_COLLECTION", "DELETE_SQL_COLLECTION", "CHANGE_SQL_COLLECTION_COMPARTMENT", "REFRESH_SQL_COLLECTION_LOG_INSIGHTS", "PURGE_SQL_COLLECTION_LOGS", "REFRESH_VIOLATIONS", "UPDATE_SECURITY_POLICY", "CHANGE_SECURITY_POLICY_COMPARTMENT", "UPDATE_SECURITY_POLICY_DEPLOYMENT", "CHANGE_SECURITY_POLICY_DEPLOYMENT_COMPARTMENT", "AUDIT_TRAIL", "DELETE_AUDIT_TRAIL", "DISCOVER_AUDIT_TRAILS", "UPDATE_AUDIT_TRAIL", "UPDATE_AUDIT_PROFILE", "AUDIT_CHANGE_COMPARTMENT", "CREATE_REPORT_DEFINITION", "UPDATE_REPORT_DEFINITION", "CHANGE_REPORT_DEFINITION_COMPARTMENT", "DELETE_REPORT_DEFINITION", "GENERATE_REPORT", "CHANGE_REPORT_COMPARTMENT", "DELETE_ARCHIVE_RETRIEVAL", "CREATE_ARCHIVE_RETRIEVAL", "UPDATE_ARCHIVE_RETRIEVAL", "CHANGE_ARCHIVE_RETRIEVAL_COMPARTMENT", "UPDATE_ALERT", "TARGET_ALERT_POLICY_ASSOCIATION", "CREATE_SENSITIVE_DATA_MODEL", "UPDATE_SENSITIVE_DATA_MODEL", "DELETE_SENSITIVE_DATA_MODEL", "UPLOAD_SENSITIVE_DATA_MODEL", "GENERATE_SENSITIVE_DATA_MODEL_FOR_DOWNLOAD", "CREATE_SENSITIVE_COLUMN", "UPDATE_SENSITIVE_COLUMN", "PATCH_SENSITIVE_COLUMNS", "CREATE_DISCOVERY_JOB", "DELETE_DISCOVERY_JOB", "PATCH_DISCOVERY_JOB_RESULT", "APPLY_DISCOVERY_JOB_RESULT", "GENERATE_DISCOVERY_REPORT", "CREATE_SENSITIVE_TYPE", "UPDATE_SENSITIVE_TYPE", "CREATE_MASKING_POLICY", "UPDATE_MASKING_POLICY", "DELETE_MASKING_POLICY", "UPLOAD_MASKING_POLICY", "GENERATE_MASKING_POLICY_FOR_DOWNLOAD", "CREATE_MASKING_COLUMN", "UPDATE_MASKING_COLUMN", "PATCH_MASKING_COLUMNS", "GENERATE_MASKING_REPORT", "CREATE_LIBRARY_MASKING_FORMAT", "UPDATE_LIBRARY_MASKING_FORMAT", "ADD_COLUMNS_FROM_SDM", "MASKING_JOB", "CREATE_DIFFERENCE", "DELETE_DIFFERENCE", "UPDATE_DIFFERENCE", "PATCH_DIFFERENCE", "APPLY_DIFFERENCE", "ABORT_MASKING", "CREATE_SCHEDULE", "REMOVE_SCHEDULE_REPORT", "UPDATE_ALL_ALERT", "PATCH_TARGET_ALERT_POLICY_ASSOCIATION", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "ENABLE_DATA_SAFE_CONFIGURATION", "CREATE_PRIVATE_ENDPOINT", "UPDATE_PRIVATE_ENDPOINT", "DELETE_PRIVATE_ENDPOINT", "CHANGE_PRIVATE_ENDPOINT_COMPARTMENT", "CREATE_ONPREM_CONNECTOR", "UPDATE_ONPREM_CONNECTOR", "DELETE_ONPREM_CONNECTOR", "UPDATE_ONPREM_CONNECTOR_WALLET", "CHANGE_ONPREM_CONNECTOR_COMPARTMENT", "CREATE_TARGET_DATABASE", "UPDATE_TARGET_DATABASE", "ACTIVATE_TARGET_DATABASE", "DEACTIVATE_TARGET_DATABASE", "DELETE_TARGET_DATABASE", "CHANGE_TARGET_DATABASE_COMPARTMENT", "CREATE_PEER_TARGET_DATABASE", "UPDATE_PEER_TARGET_DATABASE", "DELETE_PEER_TARGET_DATABASE", "REFRESH_TARGET_DATABASE", "PROVISION_POLICY", "RETRIEVE_POLICY", "UPDATE_POLICY", "CHANGE_POLICY_COMPARTMENT", "CREATE_USER_ASSESSMENT", "ASSESS_USER_ASSESSMENT", "CREATE_SNAPSHOT_USER_ASSESSMENT", "CREATE_SCHEDULE_USER_ASSESSMENT", "COMPARE_WITH_BASELINE_USER_ASSESSMENT", "DELETE_USER_ASSESSMENT", "UPDATE_USER_ASSESSMENT", "CHANGE_USER_ASSESSMENT_COMPARTMENT", "SET_USER_ASSESSMENT_BASELINE", "UNSET_USER_ASSESSMENT_BASELINE", "GENERATE_USER_ASSESSMENT_REPORT", "CREATE_SECURITY_ASSESSMENT", "CREATE_SECURITY_ASSESSMENT_NOW", "ASSESS_SECURITY_ASSESSMENT", "CREATE_SNAPSHOT_SECURITY_ASSESSMENT", "CREATE_SCHEDULE_SECURITY_ASSESSMENT", "COMPARE_WITH_BASELINE_SECURITY_ASSESSMENT", "DELETE_SECURITY_ASSESSMENT", "UPDATE_SECURITY_ASSESSMENT", "UPDATE_FINDING_RISK", "CHANGE_SECURITY_ASSESSMENT_COMPARTMENT", "SET_SECURITY_ASSESSMENT_BASELINE", "UNSET_SECURITY_ASSESSMENT_BASELINE", "GENERATE_SECURITY_ASSESSMENT_REPORT", "CREATE_AUDIT_PROFILE", "CALCULATE_VOLUME", "CALCULATE_COLLECTED_VOLUME", "CREATE_DB_SECURITY_CONFIG", "REFRESH_DB_SECURITY_CONFIG", "UPDATE_DB_SECURITY_CONFIG", "CHANGE_DB_SECURITY_CONFIG_COMPARTMENT", "GENERATE_FIREWALL_POLICY", "UPDATE_FIREWALL_POLICY", "CHANGE_FIREWALL_POLICY_COMPARTMENT", "DELETE_FIREWALL_POLICY", "CREATE_SQL_COLLECTION", "UPDATE_SQL_COLLECTION", "START_SQL_COLLECTION", "STOP_SQL_COLLECTION", "DELETE_SQL_COLLECTION", "CHANGE_SQL_COLLECTION_COMPARTMENT", "REFRESH_SQL_COLLECTION_LOG_INSIGHTS", "PURGE_SQL_COLLECTION_LOGS", "REFRESH_VIOLATIONS", "UPDATE_SECURITY_POLICY", "CHANGE_SECURITY_POLICY_COMPARTMENT", "UPDATE_SECURITY_POLICY_DEPLOYMENT", "CHANGE_SECURITY_POLICY_DEPLOYMENT_COMPARTMENT", "AUDIT_TRAIL", "DELETE_AUDIT_TRAIL", "DISCOVER_AUDIT_TRAILS", "UPDATE_AUDIT_TRAIL", "UPDATE_AUDIT_PROFILE", "AUDIT_CHANGE_COMPARTMENT", "CREATE_REPORT_DEFINITION", "UPDATE_REPORT_DEFINITION", "CHANGE_REPORT_DEFINITION_COMPARTMENT", "DELETE_REPORT_DEFINITION", "GENERATE_REPORT", "CHANGE_REPORT_COMPARTMENT", "DELETE_ARCHIVE_RETRIEVAL", "CREATE_ARCHIVE_RETRIEVAL", "UPDATE_ARCHIVE_RETRIEVAL", "CHANGE_ARCHIVE_RETRIEVAL_COMPARTMENT", "UPDATE_ALERT", "TARGET_ALERT_POLICY_ASSOCIATION", "CREATE_SENSITIVE_DATA_MODEL", "UPDATE_SENSITIVE_DATA_MODEL", "DELETE_SENSITIVE_DATA_MODEL", "UPLOAD_SENSITIVE_DATA_MODEL", "GENERATE_SENSITIVE_DATA_MODEL_FOR_DOWNLOAD", "CREATE_SENSITIVE_COLUMN", "UPDATE_SENSITIVE_COLUMN", "PATCH_SENSITIVE_COLUMNS", "CREATE_DISCOVERY_JOB", "DELETE_DISCOVERY_JOB", "PATCH_DISCOVERY_JOB_RESULT", "APPLY_DISCOVERY_JOB_RESULT", "GENERATE_DISCOVERY_REPORT", "CREATE_SENSITIVE_TYPE", "UPDATE_SENSITIVE_TYPE", "CREATE_MASKING_POLICY", "UPDATE_MASKING_POLICY", "DELETE_MASKING_POLICY", "UPLOAD_MASKING_POLICY", "GENERATE_MASKING_POLICY_FOR_DOWNLOAD", "CREATE_MASKING_COLUMN", "UPDATE_MASKING_COLUMN", "PATCH_MASKING_COLUMNS", "GENERATE_MASKING_REPORT", "CREATE_LIBRARY_MASKING_FORMAT", "UPDATE_LIBRARY_MASKING_FORMAT", "ADD_COLUMNS_FROM_SDM", "MASKING_JOB", "CREATE_DIFFERENCE", "DELETE_DIFFERENCE", "UPDATE_DIFFERENCE", "PATCH_DIFFERENCE", "APPLY_DIFFERENCE", "ABORT_MASKING", "CREATE_SECURITY_POLICY_REPORT", "REFRESH_SECURITY_POLICY_CACHE", "DELETE_SECURITY_POLICY_CACHE", "CREATE_SCHEDULE", "REMOVE_SCHEDULE_REPORT", "UPDATE_ALL_ALERT", "PATCH_TARGET_ALERT_POLICY_ASSOCIATION", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -644,7 +676,7 @@ def operation_type(self, operation_type): :param operation_type: The operation_type of this WorkRequest. :type: str """ - allowed_values = ["ENABLE_DATA_SAFE_CONFIGURATION", "CREATE_PRIVATE_ENDPOINT", "UPDATE_PRIVATE_ENDPOINT", "DELETE_PRIVATE_ENDPOINT", "CHANGE_PRIVATE_ENDPOINT_COMPARTMENT", "CREATE_ONPREM_CONNECTOR", "UPDATE_ONPREM_CONNECTOR", "DELETE_ONPREM_CONNECTOR", "UPDATE_ONPREM_CONNECTOR_WALLET", "CHANGE_ONPREM_CONNECTOR_COMPARTMENT", "CREATE_TARGET_DATABASE", "UPDATE_TARGET_DATABASE", "ACTIVATE_TARGET_DATABASE", "DEACTIVATE_TARGET_DATABASE", "DELETE_TARGET_DATABASE", "CHANGE_TARGET_DATABASE_COMPARTMENT", "PROVISION_POLICY", "RETRIEVE_POLICY", "UPDATE_POLICY", "CHANGE_POLICY_COMPARTMENT", "CREATE_USER_ASSESSMENT", "ASSESS_USER_ASSESSMENT", "CREATE_SNAPSHOT_USER_ASSESSMENT", "CREATE_SCHEDULE_USER_ASSESSMENT", "COMPARE_WITH_BASELINE_USER_ASSESSMENT", "DELETE_USER_ASSESSMENT", "UPDATE_USER_ASSESSMENT", "CHANGE_USER_ASSESSMENT_COMPARTMENT", "SET_USER_ASSESSMENT_BASELINE", "UNSET_USER_ASSESSMENT_BASELINE", "GENERATE_USER_ASSESSMENT_REPORT", "CREATE_SECURITY_ASSESSMENT", "CREATE_SECURITY_ASSESSMENT_NOW", "ASSESS_SECURITY_ASSESSMENT", "CREATE_SNAPSHOT_SECURITY_ASSESSMENT", "CREATE_SCHEDULE_SECURITY_ASSESSMENT", "COMPARE_WITH_BASELINE_SECURITY_ASSESSMENT", "DELETE_SECURITY_ASSESSMENT", "UPDATE_SECURITY_ASSESSMENT", "CHANGE_SECURITY_ASSESSMENT_COMPARTMENT", "SET_SECURITY_ASSESSMENT_BASELINE", "UNSET_SECURITY_ASSESSMENT_BASELINE", "GENERATE_SECURITY_ASSESSMENT_REPORT", "CREATE_AUDIT_PROFILE", "CALCULATE_VOLUME", "CALCULATE_COLLECTED_VOLUME", "CREATE_DB_SECURITY_CONFIG", "REFRESH_DB_SECURITY_CONFIG", "UPDATE_DB_SECURITY_CONFIG", "CHANGE_DB_SECURITY_CONFIG_COMPARTMENT", "GENERATE_FIREWALL_POLICY", "UPDATE_FIREWALL_POLICY", "CHANGE_FIREWALL_POLICY_COMPARTMENT", "DELETE_FIREWALL_POLICY", "CREATE_SQL_COLLECTION", "UPDATE_SQL_COLLECTION", "START_SQL_COLLECTION", "STOP_SQL_COLLECTION", "DELETE_SQL_COLLECTION", "CHANGE_SQL_COLLECTION_COMPARTMENT", "REFRESH_SQL_COLLECTION_LOG_INSIGHTS", "PURGE_SQL_COLLECTION_LOGS", "REFRESH_VIOLATIONS", "UPDATE_SECURITY_POLICY", "CHANGE_SECURITY_POLICY_COMPARTMENT", "UPDATE_SECURITY_POLICY_DEPLOYMENT", "CHANGE_SECURITY_POLICY_DEPLOYMENT_COMPARTMENT", "AUDIT_TRAIL", "DELETE_AUDIT_TRAIL", "DISCOVER_AUDIT_TRAILS", "UPDATE_AUDIT_TRAIL", "UPDATE_AUDIT_PROFILE", "AUDIT_CHANGE_COMPARTMENT", "CREATE_REPORT_DEFINITION", "UPDATE_REPORT_DEFINITION", "CHANGE_REPORT_DEFINITION_COMPARTMENT", "DELETE_REPORT_DEFINITION", "GENERATE_REPORT", "CHANGE_REPORT_COMPARTMENT", "DELETE_ARCHIVE_RETRIEVAL", "CREATE_ARCHIVE_RETRIEVAL", "UPDATE_ARCHIVE_RETRIEVAL", "CHANGE_ARCHIVE_RETRIEVAL_COMPARTMENT", "UPDATE_ALERT", "TARGET_ALERT_POLICY_ASSOCIATION", "CREATE_SENSITIVE_DATA_MODEL", "UPDATE_SENSITIVE_DATA_MODEL", "DELETE_SENSITIVE_DATA_MODEL", "UPLOAD_SENSITIVE_DATA_MODEL", "GENERATE_SENSITIVE_DATA_MODEL_FOR_DOWNLOAD", "CREATE_SENSITIVE_COLUMN", "UPDATE_SENSITIVE_COLUMN", "PATCH_SENSITIVE_COLUMNS", "CREATE_DISCOVERY_JOB", "DELETE_DISCOVERY_JOB", "PATCH_DISCOVERY_JOB_RESULT", "APPLY_DISCOVERY_JOB_RESULT", "GENERATE_DISCOVERY_REPORT", "CREATE_SENSITIVE_TYPE", "UPDATE_SENSITIVE_TYPE", "CREATE_MASKING_POLICY", "UPDATE_MASKING_POLICY", "DELETE_MASKING_POLICY", "UPLOAD_MASKING_POLICY", "GENERATE_MASKING_POLICY_FOR_DOWNLOAD", "CREATE_MASKING_COLUMN", "UPDATE_MASKING_COLUMN", "PATCH_MASKING_COLUMNS", "GENERATE_MASKING_REPORT", "CREATE_LIBRARY_MASKING_FORMAT", "UPDATE_LIBRARY_MASKING_FORMAT", "ADD_COLUMNS_FROM_SDM", "MASKING_JOB", "CREATE_DIFFERENCE", "DELETE_DIFFERENCE", "UPDATE_DIFFERENCE", "PATCH_DIFFERENCE", "APPLY_DIFFERENCE", "ABORT_MASKING", "CREATE_SCHEDULE", "REMOVE_SCHEDULE_REPORT", "UPDATE_ALL_ALERT", "PATCH_TARGET_ALERT_POLICY_ASSOCIATION"] + allowed_values = ["ENABLE_DATA_SAFE_CONFIGURATION", "CREATE_PRIVATE_ENDPOINT", "UPDATE_PRIVATE_ENDPOINT", "DELETE_PRIVATE_ENDPOINT", "CHANGE_PRIVATE_ENDPOINT_COMPARTMENT", "CREATE_ONPREM_CONNECTOR", "UPDATE_ONPREM_CONNECTOR", "DELETE_ONPREM_CONNECTOR", "UPDATE_ONPREM_CONNECTOR_WALLET", "CHANGE_ONPREM_CONNECTOR_COMPARTMENT", "CREATE_TARGET_DATABASE", "UPDATE_TARGET_DATABASE", "ACTIVATE_TARGET_DATABASE", "DEACTIVATE_TARGET_DATABASE", "DELETE_TARGET_DATABASE", "CHANGE_TARGET_DATABASE_COMPARTMENT", "CREATE_PEER_TARGET_DATABASE", "UPDATE_PEER_TARGET_DATABASE", "DELETE_PEER_TARGET_DATABASE", "REFRESH_TARGET_DATABASE", "PROVISION_POLICY", "RETRIEVE_POLICY", "UPDATE_POLICY", "CHANGE_POLICY_COMPARTMENT", "CREATE_USER_ASSESSMENT", "ASSESS_USER_ASSESSMENT", "CREATE_SNAPSHOT_USER_ASSESSMENT", "CREATE_SCHEDULE_USER_ASSESSMENT", "COMPARE_WITH_BASELINE_USER_ASSESSMENT", "DELETE_USER_ASSESSMENT", "UPDATE_USER_ASSESSMENT", "CHANGE_USER_ASSESSMENT_COMPARTMENT", "SET_USER_ASSESSMENT_BASELINE", "UNSET_USER_ASSESSMENT_BASELINE", "GENERATE_USER_ASSESSMENT_REPORT", "CREATE_SECURITY_ASSESSMENT", "CREATE_SECURITY_ASSESSMENT_NOW", "ASSESS_SECURITY_ASSESSMENT", "CREATE_SNAPSHOT_SECURITY_ASSESSMENT", "CREATE_SCHEDULE_SECURITY_ASSESSMENT", "COMPARE_WITH_BASELINE_SECURITY_ASSESSMENT", "DELETE_SECURITY_ASSESSMENT", "UPDATE_SECURITY_ASSESSMENT", "UPDATE_FINDING_RISK", "CHANGE_SECURITY_ASSESSMENT_COMPARTMENT", "SET_SECURITY_ASSESSMENT_BASELINE", "UNSET_SECURITY_ASSESSMENT_BASELINE", "GENERATE_SECURITY_ASSESSMENT_REPORT", "CREATE_AUDIT_PROFILE", "CALCULATE_VOLUME", "CALCULATE_COLLECTED_VOLUME", "CREATE_DB_SECURITY_CONFIG", "REFRESH_DB_SECURITY_CONFIG", "UPDATE_DB_SECURITY_CONFIG", "CHANGE_DB_SECURITY_CONFIG_COMPARTMENT", "GENERATE_FIREWALL_POLICY", "UPDATE_FIREWALL_POLICY", "CHANGE_FIREWALL_POLICY_COMPARTMENT", "DELETE_FIREWALL_POLICY", "CREATE_SQL_COLLECTION", "UPDATE_SQL_COLLECTION", "START_SQL_COLLECTION", "STOP_SQL_COLLECTION", "DELETE_SQL_COLLECTION", "CHANGE_SQL_COLLECTION_COMPARTMENT", "REFRESH_SQL_COLLECTION_LOG_INSIGHTS", "PURGE_SQL_COLLECTION_LOGS", "REFRESH_VIOLATIONS", "UPDATE_SECURITY_POLICY", "CHANGE_SECURITY_POLICY_COMPARTMENT", "UPDATE_SECURITY_POLICY_DEPLOYMENT", "CHANGE_SECURITY_POLICY_DEPLOYMENT_COMPARTMENT", "AUDIT_TRAIL", "DELETE_AUDIT_TRAIL", "DISCOVER_AUDIT_TRAILS", "UPDATE_AUDIT_TRAIL", "UPDATE_AUDIT_PROFILE", "AUDIT_CHANGE_COMPARTMENT", "CREATE_REPORT_DEFINITION", "UPDATE_REPORT_DEFINITION", "CHANGE_REPORT_DEFINITION_COMPARTMENT", "DELETE_REPORT_DEFINITION", "GENERATE_REPORT", "CHANGE_REPORT_COMPARTMENT", "DELETE_ARCHIVE_RETRIEVAL", "CREATE_ARCHIVE_RETRIEVAL", "UPDATE_ARCHIVE_RETRIEVAL", "CHANGE_ARCHIVE_RETRIEVAL_COMPARTMENT", "UPDATE_ALERT", "TARGET_ALERT_POLICY_ASSOCIATION", "CREATE_SENSITIVE_DATA_MODEL", "UPDATE_SENSITIVE_DATA_MODEL", "DELETE_SENSITIVE_DATA_MODEL", "UPLOAD_SENSITIVE_DATA_MODEL", "GENERATE_SENSITIVE_DATA_MODEL_FOR_DOWNLOAD", "CREATE_SENSITIVE_COLUMN", "UPDATE_SENSITIVE_COLUMN", "PATCH_SENSITIVE_COLUMNS", "CREATE_DISCOVERY_JOB", "DELETE_DISCOVERY_JOB", "PATCH_DISCOVERY_JOB_RESULT", "APPLY_DISCOVERY_JOB_RESULT", "GENERATE_DISCOVERY_REPORT", "CREATE_SENSITIVE_TYPE", "UPDATE_SENSITIVE_TYPE", "CREATE_MASKING_POLICY", "UPDATE_MASKING_POLICY", "DELETE_MASKING_POLICY", "UPLOAD_MASKING_POLICY", "GENERATE_MASKING_POLICY_FOR_DOWNLOAD", "CREATE_MASKING_COLUMN", "UPDATE_MASKING_COLUMN", "PATCH_MASKING_COLUMNS", "GENERATE_MASKING_REPORT", "CREATE_LIBRARY_MASKING_FORMAT", "UPDATE_LIBRARY_MASKING_FORMAT", "ADD_COLUMNS_FROM_SDM", "MASKING_JOB", "CREATE_DIFFERENCE", "DELETE_DIFFERENCE", "UPDATE_DIFFERENCE", "PATCH_DIFFERENCE", "APPLY_DIFFERENCE", "ABORT_MASKING", "CREATE_SECURITY_POLICY_REPORT", "REFRESH_SECURITY_POLICY_CACHE", "DELETE_SECURITY_POLICY_CACHE", "CREATE_SCHEDULE", "REMOVE_SCHEDULE_REPORT", "UPDATE_ALL_ALERT", "PATCH_TARGET_ALERT_POLICY_ASSOCIATION"] if not value_allowed_none_or_none_sentinel(operation_type, allowed_values): operation_type = 'UNKNOWN_ENUM_VALUE' self._operation_type = operation_type diff --git a/src/oci/data_safe/models/work_request_summary.py b/src/oci/data_safe/models/work_request_summary.py index 7102fe9a9b..9d8415c289 100644 --- a/src/oci/data_safe/models/work_request_summary.py +++ b/src/oci/data_safe/models/work_request_summary.py @@ -95,6 +95,22 @@ class WorkRequestSummary(object): #: This constant has a value of "CHANGE_TARGET_DATABASE_COMPARTMENT" OPERATION_TYPE_CHANGE_TARGET_DATABASE_COMPARTMENT = "CHANGE_TARGET_DATABASE_COMPARTMENT" + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "CREATE_PEER_TARGET_DATABASE" + OPERATION_TYPE_CREATE_PEER_TARGET_DATABASE = "CREATE_PEER_TARGET_DATABASE" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "UPDATE_PEER_TARGET_DATABASE" + OPERATION_TYPE_UPDATE_PEER_TARGET_DATABASE = "UPDATE_PEER_TARGET_DATABASE" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "DELETE_PEER_TARGET_DATABASE" + OPERATION_TYPE_DELETE_PEER_TARGET_DATABASE = "DELETE_PEER_TARGET_DATABASE" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "REFRESH_TARGET_DATABASE" + OPERATION_TYPE_REFRESH_TARGET_DATABASE = "REFRESH_TARGET_DATABASE" + #: A constant which can be used with the operation_type property of a WorkRequestSummary. #: This constant has a value of "CREATE_USER_ASSESSMENT" OPERATION_TYPE_CREATE_USER_ASSESSMENT = "CREATE_USER_ASSESSMENT" @@ -171,6 +187,10 @@ class WorkRequestSummary(object): #: This constant has a value of "UPDATE_SECURITY_ASSESSMENT" OPERATION_TYPE_UPDATE_SECURITY_ASSESSMENT = "UPDATE_SECURITY_ASSESSMENT" + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "UPDATE_FINDING_RISK" + OPERATION_TYPE_UPDATE_FINDING_RISK = "UPDATE_FINDING_RISK" + #: A constant which can be used with the operation_type property of a WorkRequestSummary. #: This constant has a value of "CHANGE_SECURITY_ASSESSMENT_COMPARTMENT" OPERATION_TYPE_CHANGE_SECURITY_ASSESSMENT_COMPARTMENT = "CHANGE_SECURITY_ASSESSMENT_COMPARTMENT" @@ -487,6 +507,18 @@ class WorkRequestSummary(object): #: This constant has a value of "ABORT_MASKING" OPERATION_TYPE_ABORT_MASKING = "ABORT_MASKING" + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "CREATE_SECURITY_POLICY_REPORT" + OPERATION_TYPE_CREATE_SECURITY_POLICY_REPORT = "CREATE_SECURITY_POLICY_REPORT" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "REFRESH_SECURITY_POLICY_CACHE" + OPERATION_TYPE_REFRESH_SECURITY_POLICY_CACHE = "REFRESH_SECURITY_POLICY_CACHE" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "DELETE_SECURITY_POLICY_CACHE" + OPERATION_TYPE_DELETE_SECURITY_POLICY_CACHE = "DELETE_SECURITY_POLICY_CACHE" + #: A constant which can be used with the operation_type property of a WorkRequestSummary. #: This constant has a value of "CREATE_SCHEDULE" OPERATION_TYPE_CREATE_SCHEDULE = "CREATE_SCHEDULE" @@ -542,7 +574,7 @@ def __init__(self, **kwargs): :param operation_type: The value to assign to the operation_type property of this WorkRequestSummary. - Allowed values for this property are: "ENABLE_DATA_SAFE_CONFIGURATION", "CREATE_PRIVATE_ENDPOINT", "UPDATE_PRIVATE_ENDPOINT", "DELETE_PRIVATE_ENDPOINT", "CHANGE_PRIVATE_ENDPOINT_COMPARTMENT", "CREATE_ONPREM_CONNECTOR", "UPDATE_ONPREM_CONNECTOR", "DELETE_ONPREM_CONNECTOR", "UPDATE_ONPREM_CONNECTOR_WALLET", "CHANGE_ONPREM_CONNECTOR_COMPARTMENT", "PROVISION_POLICY", "RETRIEVE_POLICY", "UPDATE_POLICY", "CHANGE_POLICY_COMPARTMENT", "CREATE_TARGET_DATABASE", "UPDATE_TARGET_DATABASE", "ACTIVATE_TARGET_DATABASE", "DEACTIVATE_TARGET_DATABASE", "DELETE_TARGET_DATABASE", "CHANGE_TARGET_DATABASE_COMPARTMENT", "CREATE_USER_ASSESSMENT", "ASSESS_USER_ASSESSMENT", "CREATE_SNAPSHOT_USER_ASSESSMENT", "CREATE_SCHEDULE_USER_ASSESSMENT", "COMPARE_WITH_BASELINE_USER_ASSESSMENT", "DELETE_USER_ASSESSMENT", "UPDATE_USER_ASSESSMENT", "CHANGE_USER_ASSESSMENT_COMPARTMENT", "SET_USER_ASSESSMENT_BASELINE", "UNSET_USER_ASSESSMENT_BASELINE", "GENERATE_USER_ASSESSMENT_REPORT", "CREATE_SECURITY_ASSESSMENT", "CREATE_SECURITY_ASSESSMENT_NOW", "ASSESS_SECURITY_ASSESSMENT", "CREATE_SNAPSHOT_SECURITY_ASSESSMENT", "CREATE_SCHEDULE_SECURITY_ASSESSMENT", "COMPARE_WITH_BASELINE_SECURITY_ASSESSMENT", "DELETE_SECURITY_ASSESSMENT", "UPDATE_SECURITY_ASSESSMENT", "CHANGE_SECURITY_ASSESSMENT_COMPARTMENT", "SET_SECURITY_ASSESSMENT_BASELINE", "UNSET_SECURITY_ASSESSMENT_BASELINE", "GENERATE_SECURITY_ASSESSMENT_REPORT", "CALCULATE_VOLUME", "CALCULATE_COLLECTED_VOLUME", "CREATE_DB_SECURITY_CONFIG", "REFRESH_DB_SECURITY_CONFIG", "UPDATE_DB_SECURITY_CONFIG", "CHANGE_DB_SECURITY_CONFIG_COMPARTMENT", "GENERATE_FIREWALL_POLICY", "UPDATE_FIREWALL_POLICY", "CHANGE_FIREWALL_POLICY_COMPARTMENT", "DELETE_FIREWALL_POLICY", "CREATE_SQL_COLLECTION", "UPDATE_SQL_COLLECTION", "START_SQL_COLLECTION", "STOP_SQL_COLLECTION", "DELETE_SQL_COLLECTION", "CHANGE_SQL_COLLECTION_COMPARTMENT", "REFRESH_SQL_COLLECTION_LOG_INSIGHTS", "PURGE_SQL_COLLECTION_LOGS", "REFRESH_VIOLATIONS", "UPDATE_SECURITY_POLICY", "CHANGE_SECURITY_POLICY_COMPARTMENT", "UPDATE_SECURITY_POLICY_DEPLOYMENT", "CHANGE_SECURITY_POLICY_DEPLOYMENT_COMPARTMENT", "AUDIT_TRAIL", "DELETE_AUDIT_TRAIL", "DISCOVER_AUDIT_TRAILS", "UPDATE_AUDIT_TRAIL", "UPDATE_AUDIT_PROFILE", "AUDIT_CHANGE_COMPARTMENT", "CREATE_REPORT_DEFINITION", "UPDATE_REPORT_DEFINITION", "CHANGE_REPORT_DEFINITION_COMPARTMENT", "DELETE_REPORT_DEFINITION", "GENERATE_REPORT", "CHANGE_REPORT_COMPARTMENT", "DELETE_ARCHIVE_RETRIEVAL", "CREATE_ARCHIVE_RETRIEVAL", "UPDATE_ARCHIVE_RETRIEVAL", "CHANGE_ARCHIVE_RETRIEVAL_COMPARTMENT", "UPDATE_ALERT", "TARGET_ALERT_POLICY_ASSOCIATION", "CREATE_SENSITIVE_DATA_MODEL", "UPDATE_SENSITIVE_DATA_MODEL", "DELETE_SENSITIVE_DATA_MODEL", "UPLOAD_SENSITIVE_DATA_MODEL", "GENERATE_SENSITIVE_DATA_MODEL_FOR_DOWNLOAD", "CREATE_SENSITIVE_COLUMN", "UPDATE_SENSITIVE_COLUMN", "PATCH_SENSITIVE_COLUMNS", "CREATE_DISCOVERY_JOB", "DELETE_DISCOVERY_JOB", "PATCH_DISCOVERY_JOB_RESULT", "APPLY_DISCOVERY_JOB_RESULT", "GENERATE_DISCOVERY_REPORT", "CREATE_SENSITIVE_TYPE", "UPDATE_SENSITIVE_TYPE", "CREATE_MASKING_POLICY", "UPDATE_MASKING_POLICY", "DELETE_MASKING_POLICY", "UPLOAD_MASKING_POLICY", "GENERATE_MASKING_POLICY_FOR_DOWNLOAD", "CREATE_MASKING_COLUMN", "UPDATE_MASKING_COLUMN", "PATCH_MASKING_COLUMNS", "GENERATE_MASKING_REPORT", "CREATE_LIBRARY_MASKING_FORMAT", "UPDATE_LIBRARY_MASKING_FORMAT", "ADD_COLUMNS_FROM_SDM", "MASKING_JOB", "CREATE_DIFFERENCE", "DELETE_DIFFERENCE", "UPDATE_DIFFERENCE", "PATCH_DIFFERENCE", "APPLY_DIFFERENCE", "ABORT_MASKING", "CREATE_SCHEDULE", "REMOVE_SCHEDULE_REPORT", "UPDATE_ALL_ALERT", "PATCH_TARGET_ALERT_POLICY_ASSOCIATION", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "ENABLE_DATA_SAFE_CONFIGURATION", "CREATE_PRIVATE_ENDPOINT", "UPDATE_PRIVATE_ENDPOINT", "DELETE_PRIVATE_ENDPOINT", "CHANGE_PRIVATE_ENDPOINT_COMPARTMENT", "CREATE_ONPREM_CONNECTOR", "UPDATE_ONPREM_CONNECTOR", "DELETE_ONPREM_CONNECTOR", "UPDATE_ONPREM_CONNECTOR_WALLET", "CHANGE_ONPREM_CONNECTOR_COMPARTMENT", "PROVISION_POLICY", "RETRIEVE_POLICY", "UPDATE_POLICY", "CHANGE_POLICY_COMPARTMENT", "CREATE_TARGET_DATABASE", "UPDATE_TARGET_DATABASE", "ACTIVATE_TARGET_DATABASE", "DEACTIVATE_TARGET_DATABASE", "DELETE_TARGET_DATABASE", "CHANGE_TARGET_DATABASE_COMPARTMENT", "CREATE_PEER_TARGET_DATABASE", "UPDATE_PEER_TARGET_DATABASE", "DELETE_PEER_TARGET_DATABASE", "REFRESH_TARGET_DATABASE", "CREATE_USER_ASSESSMENT", "ASSESS_USER_ASSESSMENT", "CREATE_SNAPSHOT_USER_ASSESSMENT", "CREATE_SCHEDULE_USER_ASSESSMENT", "COMPARE_WITH_BASELINE_USER_ASSESSMENT", "DELETE_USER_ASSESSMENT", "UPDATE_USER_ASSESSMENT", "CHANGE_USER_ASSESSMENT_COMPARTMENT", "SET_USER_ASSESSMENT_BASELINE", "UNSET_USER_ASSESSMENT_BASELINE", "GENERATE_USER_ASSESSMENT_REPORT", "CREATE_SECURITY_ASSESSMENT", "CREATE_SECURITY_ASSESSMENT_NOW", "ASSESS_SECURITY_ASSESSMENT", "CREATE_SNAPSHOT_SECURITY_ASSESSMENT", "CREATE_SCHEDULE_SECURITY_ASSESSMENT", "COMPARE_WITH_BASELINE_SECURITY_ASSESSMENT", "DELETE_SECURITY_ASSESSMENT", "UPDATE_SECURITY_ASSESSMENT", "UPDATE_FINDING_RISK", "CHANGE_SECURITY_ASSESSMENT_COMPARTMENT", "SET_SECURITY_ASSESSMENT_BASELINE", "UNSET_SECURITY_ASSESSMENT_BASELINE", "GENERATE_SECURITY_ASSESSMENT_REPORT", "CALCULATE_VOLUME", "CALCULATE_COLLECTED_VOLUME", "CREATE_DB_SECURITY_CONFIG", "REFRESH_DB_SECURITY_CONFIG", "UPDATE_DB_SECURITY_CONFIG", "CHANGE_DB_SECURITY_CONFIG_COMPARTMENT", "GENERATE_FIREWALL_POLICY", "UPDATE_FIREWALL_POLICY", "CHANGE_FIREWALL_POLICY_COMPARTMENT", "DELETE_FIREWALL_POLICY", "CREATE_SQL_COLLECTION", "UPDATE_SQL_COLLECTION", "START_SQL_COLLECTION", "STOP_SQL_COLLECTION", "DELETE_SQL_COLLECTION", "CHANGE_SQL_COLLECTION_COMPARTMENT", "REFRESH_SQL_COLLECTION_LOG_INSIGHTS", "PURGE_SQL_COLLECTION_LOGS", "REFRESH_VIOLATIONS", "UPDATE_SECURITY_POLICY", "CHANGE_SECURITY_POLICY_COMPARTMENT", "UPDATE_SECURITY_POLICY_DEPLOYMENT", "CHANGE_SECURITY_POLICY_DEPLOYMENT_COMPARTMENT", "AUDIT_TRAIL", "DELETE_AUDIT_TRAIL", "DISCOVER_AUDIT_TRAILS", "UPDATE_AUDIT_TRAIL", "UPDATE_AUDIT_PROFILE", "AUDIT_CHANGE_COMPARTMENT", "CREATE_REPORT_DEFINITION", "UPDATE_REPORT_DEFINITION", "CHANGE_REPORT_DEFINITION_COMPARTMENT", "DELETE_REPORT_DEFINITION", "GENERATE_REPORT", "CHANGE_REPORT_COMPARTMENT", "DELETE_ARCHIVE_RETRIEVAL", "CREATE_ARCHIVE_RETRIEVAL", "UPDATE_ARCHIVE_RETRIEVAL", "CHANGE_ARCHIVE_RETRIEVAL_COMPARTMENT", "UPDATE_ALERT", "TARGET_ALERT_POLICY_ASSOCIATION", "CREATE_SENSITIVE_DATA_MODEL", "UPDATE_SENSITIVE_DATA_MODEL", "DELETE_SENSITIVE_DATA_MODEL", "UPLOAD_SENSITIVE_DATA_MODEL", "GENERATE_SENSITIVE_DATA_MODEL_FOR_DOWNLOAD", "CREATE_SENSITIVE_COLUMN", "UPDATE_SENSITIVE_COLUMN", "PATCH_SENSITIVE_COLUMNS", "CREATE_DISCOVERY_JOB", "DELETE_DISCOVERY_JOB", "PATCH_DISCOVERY_JOB_RESULT", "APPLY_DISCOVERY_JOB_RESULT", "GENERATE_DISCOVERY_REPORT", "CREATE_SENSITIVE_TYPE", "UPDATE_SENSITIVE_TYPE", "CREATE_MASKING_POLICY", "UPDATE_MASKING_POLICY", "DELETE_MASKING_POLICY", "UPLOAD_MASKING_POLICY", "GENERATE_MASKING_POLICY_FOR_DOWNLOAD", "CREATE_MASKING_COLUMN", "UPDATE_MASKING_COLUMN", "PATCH_MASKING_COLUMNS", "GENERATE_MASKING_REPORT", "CREATE_LIBRARY_MASKING_FORMAT", "UPDATE_LIBRARY_MASKING_FORMAT", "ADD_COLUMNS_FROM_SDM", "MASKING_JOB", "CREATE_DIFFERENCE", "DELETE_DIFFERENCE", "UPDATE_DIFFERENCE", "PATCH_DIFFERENCE", "APPLY_DIFFERENCE", "ABORT_MASKING", "CREATE_SECURITY_POLICY_REPORT", "REFRESH_SECURITY_POLICY_CACHE", "DELETE_SECURITY_POLICY_CACHE", "CREATE_SCHEDULE", "REMOVE_SCHEDULE_REPORT", "UPDATE_ALL_ALERT", "PATCH_TARGET_ALERT_POLICY_ASSOCIATION", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type operation_type: str @@ -621,7 +653,7 @@ def operation_type(self): **[Required]** Gets the operation_type of this WorkRequestSummary. The asynchronous operation tracked by this work request. - Allowed values for this property are: "ENABLE_DATA_SAFE_CONFIGURATION", "CREATE_PRIVATE_ENDPOINT", "UPDATE_PRIVATE_ENDPOINT", "DELETE_PRIVATE_ENDPOINT", "CHANGE_PRIVATE_ENDPOINT_COMPARTMENT", "CREATE_ONPREM_CONNECTOR", "UPDATE_ONPREM_CONNECTOR", "DELETE_ONPREM_CONNECTOR", "UPDATE_ONPREM_CONNECTOR_WALLET", "CHANGE_ONPREM_CONNECTOR_COMPARTMENT", "PROVISION_POLICY", "RETRIEVE_POLICY", "UPDATE_POLICY", "CHANGE_POLICY_COMPARTMENT", "CREATE_TARGET_DATABASE", "UPDATE_TARGET_DATABASE", "ACTIVATE_TARGET_DATABASE", "DEACTIVATE_TARGET_DATABASE", "DELETE_TARGET_DATABASE", "CHANGE_TARGET_DATABASE_COMPARTMENT", "CREATE_USER_ASSESSMENT", "ASSESS_USER_ASSESSMENT", "CREATE_SNAPSHOT_USER_ASSESSMENT", "CREATE_SCHEDULE_USER_ASSESSMENT", "COMPARE_WITH_BASELINE_USER_ASSESSMENT", "DELETE_USER_ASSESSMENT", "UPDATE_USER_ASSESSMENT", "CHANGE_USER_ASSESSMENT_COMPARTMENT", "SET_USER_ASSESSMENT_BASELINE", "UNSET_USER_ASSESSMENT_BASELINE", "GENERATE_USER_ASSESSMENT_REPORT", "CREATE_SECURITY_ASSESSMENT", "CREATE_SECURITY_ASSESSMENT_NOW", "ASSESS_SECURITY_ASSESSMENT", "CREATE_SNAPSHOT_SECURITY_ASSESSMENT", "CREATE_SCHEDULE_SECURITY_ASSESSMENT", "COMPARE_WITH_BASELINE_SECURITY_ASSESSMENT", "DELETE_SECURITY_ASSESSMENT", "UPDATE_SECURITY_ASSESSMENT", "CHANGE_SECURITY_ASSESSMENT_COMPARTMENT", "SET_SECURITY_ASSESSMENT_BASELINE", "UNSET_SECURITY_ASSESSMENT_BASELINE", "GENERATE_SECURITY_ASSESSMENT_REPORT", "CALCULATE_VOLUME", "CALCULATE_COLLECTED_VOLUME", "CREATE_DB_SECURITY_CONFIG", "REFRESH_DB_SECURITY_CONFIG", "UPDATE_DB_SECURITY_CONFIG", "CHANGE_DB_SECURITY_CONFIG_COMPARTMENT", "GENERATE_FIREWALL_POLICY", "UPDATE_FIREWALL_POLICY", "CHANGE_FIREWALL_POLICY_COMPARTMENT", "DELETE_FIREWALL_POLICY", "CREATE_SQL_COLLECTION", "UPDATE_SQL_COLLECTION", "START_SQL_COLLECTION", "STOP_SQL_COLLECTION", "DELETE_SQL_COLLECTION", "CHANGE_SQL_COLLECTION_COMPARTMENT", "REFRESH_SQL_COLLECTION_LOG_INSIGHTS", "PURGE_SQL_COLLECTION_LOGS", "REFRESH_VIOLATIONS", "UPDATE_SECURITY_POLICY", "CHANGE_SECURITY_POLICY_COMPARTMENT", "UPDATE_SECURITY_POLICY_DEPLOYMENT", "CHANGE_SECURITY_POLICY_DEPLOYMENT_COMPARTMENT", "AUDIT_TRAIL", "DELETE_AUDIT_TRAIL", "DISCOVER_AUDIT_TRAILS", "UPDATE_AUDIT_TRAIL", "UPDATE_AUDIT_PROFILE", "AUDIT_CHANGE_COMPARTMENT", "CREATE_REPORT_DEFINITION", "UPDATE_REPORT_DEFINITION", "CHANGE_REPORT_DEFINITION_COMPARTMENT", "DELETE_REPORT_DEFINITION", "GENERATE_REPORT", "CHANGE_REPORT_COMPARTMENT", "DELETE_ARCHIVE_RETRIEVAL", "CREATE_ARCHIVE_RETRIEVAL", "UPDATE_ARCHIVE_RETRIEVAL", "CHANGE_ARCHIVE_RETRIEVAL_COMPARTMENT", "UPDATE_ALERT", "TARGET_ALERT_POLICY_ASSOCIATION", "CREATE_SENSITIVE_DATA_MODEL", "UPDATE_SENSITIVE_DATA_MODEL", "DELETE_SENSITIVE_DATA_MODEL", "UPLOAD_SENSITIVE_DATA_MODEL", "GENERATE_SENSITIVE_DATA_MODEL_FOR_DOWNLOAD", "CREATE_SENSITIVE_COLUMN", "UPDATE_SENSITIVE_COLUMN", "PATCH_SENSITIVE_COLUMNS", "CREATE_DISCOVERY_JOB", "DELETE_DISCOVERY_JOB", "PATCH_DISCOVERY_JOB_RESULT", "APPLY_DISCOVERY_JOB_RESULT", "GENERATE_DISCOVERY_REPORT", "CREATE_SENSITIVE_TYPE", "UPDATE_SENSITIVE_TYPE", "CREATE_MASKING_POLICY", "UPDATE_MASKING_POLICY", "DELETE_MASKING_POLICY", "UPLOAD_MASKING_POLICY", "GENERATE_MASKING_POLICY_FOR_DOWNLOAD", "CREATE_MASKING_COLUMN", "UPDATE_MASKING_COLUMN", "PATCH_MASKING_COLUMNS", "GENERATE_MASKING_REPORT", "CREATE_LIBRARY_MASKING_FORMAT", "UPDATE_LIBRARY_MASKING_FORMAT", "ADD_COLUMNS_FROM_SDM", "MASKING_JOB", "CREATE_DIFFERENCE", "DELETE_DIFFERENCE", "UPDATE_DIFFERENCE", "PATCH_DIFFERENCE", "APPLY_DIFFERENCE", "ABORT_MASKING", "CREATE_SCHEDULE", "REMOVE_SCHEDULE_REPORT", "UPDATE_ALL_ALERT", "PATCH_TARGET_ALERT_POLICY_ASSOCIATION", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "ENABLE_DATA_SAFE_CONFIGURATION", "CREATE_PRIVATE_ENDPOINT", "UPDATE_PRIVATE_ENDPOINT", "DELETE_PRIVATE_ENDPOINT", "CHANGE_PRIVATE_ENDPOINT_COMPARTMENT", "CREATE_ONPREM_CONNECTOR", "UPDATE_ONPREM_CONNECTOR", "DELETE_ONPREM_CONNECTOR", "UPDATE_ONPREM_CONNECTOR_WALLET", "CHANGE_ONPREM_CONNECTOR_COMPARTMENT", "PROVISION_POLICY", "RETRIEVE_POLICY", "UPDATE_POLICY", "CHANGE_POLICY_COMPARTMENT", "CREATE_TARGET_DATABASE", "UPDATE_TARGET_DATABASE", "ACTIVATE_TARGET_DATABASE", "DEACTIVATE_TARGET_DATABASE", "DELETE_TARGET_DATABASE", "CHANGE_TARGET_DATABASE_COMPARTMENT", "CREATE_PEER_TARGET_DATABASE", "UPDATE_PEER_TARGET_DATABASE", "DELETE_PEER_TARGET_DATABASE", "REFRESH_TARGET_DATABASE", "CREATE_USER_ASSESSMENT", "ASSESS_USER_ASSESSMENT", "CREATE_SNAPSHOT_USER_ASSESSMENT", "CREATE_SCHEDULE_USER_ASSESSMENT", "COMPARE_WITH_BASELINE_USER_ASSESSMENT", "DELETE_USER_ASSESSMENT", "UPDATE_USER_ASSESSMENT", "CHANGE_USER_ASSESSMENT_COMPARTMENT", "SET_USER_ASSESSMENT_BASELINE", "UNSET_USER_ASSESSMENT_BASELINE", "GENERATE_USER_ASSESSMENT_REPORT", "CREATE_SECURITY_ASSESSMENT", "CREATE_SECURITY_ASSESSMENT_NOW", "ASSESS_SECURITY_ASSESSMENT", "CREATE_SNAPSHOT_SECURITY_ASSESSMENT", "CREATE_SCHEDULE_SECURITY_ASSESSMENT", "COMPARE_WITH_BASELINE_SECURITY_ASSESSMENT", "DELETE_SECURITY_ASSESSMENT", "UPDATE_SECURITY_ASSESSMENT", "UPDATE_FINDING_RISK", "CHANGE_SECURITY_ASSESSMENT_COMPARTMENT", "SET_SECURITY_ASSESSMENT_BASELINE", "UNSET_SECURITY_ASSESSMENT_BASELINE", "GENERATE_SECURITY_ASSESSMENT_REPORT", "CALCULATE_VOLUME", "CALCULATE_COLLECTED_VOLUME", "CREATE_DB_SECURITY_CONFIG", "REFRESH_DB_SECURITY_CONFIG", "UPDATE_DB_SECURITY_CONFIG", "CHANGE_DB_SECURITY_CONFIG_COMPARTMENT", "GENERATE_FIREWALL_POLICY", "UPDATE_FIREWALL_POLICY", "CHANGE_FIREWALL_POLICY_COMPARTMENT", "DELETE_FIREWALL_POLICY", "CREATE_SQL_COLLECTION", "UPDATE_SQL_COLLECTION", "START_SQL_COLLECTION", "STOP_SQL_COLLECTION", "DELETE_SQL_COLLECTION", "CHANGE_SQL_COLLECTION_COMPARTMENT", "REFRESH_SQL_COLLECTION_LOG_INSIGHTS", "PURGE_SQL_COLLECTION_LOGS", "REFRESH_VIOLATIONS", "UPDATE_SECURITY_POLICY", "CHANGE_SECURITY_POLICY_COMPARTMENT", "UPDATE_SECURITY_POLICY_DEPLOYMENT", "CHANGE_SECURITY_POLICY_DEPLOYMENT_COMPARTMENT", "AUDIT_TRAIL", "DELETE_AUDIT_TRAIL", "DISCOVER_AUDIT_TRAILS", "UPDATE_AUDIT_TRAIL", "UPDATE_AUDIT_PROFILE", "AUDIT_CHANGE_COMPARTMENT", "CREATE_REPORT_DEFINITION", "UPDATE_REPORT_DEFINITION", "CHANGE_REPORT_DEFINITION_COMPARTMENT", "DELETE_REPORT_DEFINITION", "GENERATE_REPORT", "CHANGE_REPORT_COMPARTMENT", "DELETE_ARCHIVE_RETRIEVAL", "CREATE_ARCHIVE_RETRIEVAL", "UPDATE_ARCHIVE_RETRIEVAL", "CHANGE_ARCHIVE_RETRIEVAL_COMPARTMENT", "UPDATE_ALERT", "TARGET_ALERT_POLICY_ASSOCIATION", "CREATE_SENSITIVE_DATA_MODEL", "UPDATE_SENSITIVE_DATA_MODEL", "DELETE_SENSITIVE_DATA_MODEL", "UPLOAD_SENSITIVE_DATA_MODEL", "GENERATE_SENSITIVE_DATA_MODEL_FOR_DOWNLOAD", "CREATE_SENSITIVE_COLUMN", "UPDATE_SENSITIVE_COLUMN", "PATCH_SENSITIVE_COLUMNS", "CREATE_DISCOVERY_JOB", "DELETE_DISCOVERY_JOB", "PATCH_DISCOVERY_JOB_RESULT", "APPLY_DISCOVERY_JOB_RESULT", "GENERATE_DISCOVERY_REPORT", "CREATE_SENSITIVE_TYPE", "UPDATE_SENSITIVE_TYPE", "CREATE_MASKING_POLICY", "UPDATE_MASKING_POLICY", "DELETE_MASKING_POLICY", "UPLOAD_MASKING_POLICY", "GENERATE_MASKING_POLICY_FOR_DOWNLOAD", "CREATE_MASKING_COLUMN", "UPDATE_MASKING_COLUMN", "PATCH_MASKING_COLUMNS", "GENERATE_MASKING_REPORT", "CREATE_LIBRARY_MASKING_FORMAT", "UPDATE_LIBRARY_MASKING_FORMAT", "ADD_COLUMNS_FROM_SDM", "MASKING_JOB", "CREATE_DIFFERENCE", "DELETE_DIFFERENCE", "UPDATE_DIFFERENCE", "PATCH_DIFFERENCE", "APPLY_DIFFERENCE", "ABORT_MASKING", "CREATE_SECURITY_POLICY_REPORT", "REFRESH_SECURITY_POLICY_CACHE", "DELETE_SECURITY_POLICY_CACHE", "CREATE_SCHEDULE", "REMOVE_SCHEDULE_REPORT", "UPDATE_ALL_ALERT", "PATCH_TARGET_ALERT_POLICY_ASSOCIATION", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -640,7 +672,7 @@ def operation_type(self, operation_type): :param operation_type: The operation_type of this WorkRequestSummary. :type: str """ - allowed_values = ["ENABLE_DATA_SAFE_CONFIGURATION", "CREATE_PRIVATE_ENDPOINT", "UPDATE_PRIVATE_ENDPOINT", "DELETE_PRIVATE_ENDPOINT", "CHANGE_PRIVATE_ENDPOINT_COMPARTMENT", "CREATE_ONPREM_CONNECTOR", "UPDATE_ONPREM_CONNECTOR", "DELETE_ONPREM_CONNECTOR", "UPDATE_ONPREM_CONNECTOR_WALLET", "CHANGE_ONPREM_CONNECTOR_COMPARTMENT", "PROVISION_POLICY", "RETRIEVE_POLICY", "UPDATE_POLICY", "CHANGE_POLICY_COMPARTMENT", "CREATE_TARGET_DATABASE", "UPDATE_TARGET_DATABASE", "ACTIVATE_TARGET_DATABASE", "DEACTIVATE_TARGET_DATABASE", "DELETE_TARGET_DATABASE", "CHANGE_TARGET_DATABASE_COMPARTMENT", "CREATE_USER_ASSESSMENT", "ASSESS_USER_ASSESSMENT", "CREATE_SNAPSHOT_USER_ASSESSMENT", "CREATE_SCHEDULE_USER_ASSESSMENT", "COMPARE_WITH_BASELINE_USER_ASSESSMENT", "DELETE_USER_ASSESSMENT", "UPDATE_USER_ASSESSMENT", "CHANGE_USER_ASSESSMENT_COMPARTMENT", "SET_USER_ASSESSMENT_BASELINE", "UNSET_USER_ASSESSMENT_BASELINE", "GENERATE_USER_ASSESSMENT_REPORT", "CREATE_SECURITY_ASSESSMENT", "CREATE_SECURITY_ASSESSMENT_NOW", "ASSESS_SECURITY_ASSESSMENT", "CREATE_SNAPSHOT_SECURITY_ASSESSMENT", "CREATE_SCHEDULE_SECURITY_ASSESSMENT", "COMPARE_WITH_BASELINE_SECURITY_ASSESSMENT", "DELETE_SECURITY_ASSESSMENT", "UPDATE_SECURITY_ASSESSMENT", "CHANGE_SECURITY_ASSESSMENT_COMPARTMENT", "SET_SECURITY_ASSESSMENT_BASELINE", "UNSET_SECURITY_ASSESSMENT_BASELINE", "GENERATE_SECURITY_ASSESSMENT_REPORT", "CALCULATE_VOLUME", "CALCULATE_COLLECTED_VOLUME", "CREATE_DB_SECURITY_CONFIG", "REFRESH_DB_SECURITY_CONFIG", "UPDATE_DB_SECURITY_CONFIG", "CHANGE_DB_SECURITY_CONFIG_COMPARTMENT", "GENERATE_FIREWALL_POLICY", "UPDATE_FIREWALL_POLICY", "CHANGE_FIREWALL_POLICY_COMPARTMENT", "DELETE_FIREWALL_POLICY", "CREATE_SQL_COLLECTION", "UPDATE_SQL_COLLECTION", "START_SQL_COLLECTION", "STOP_SQL_COLLECTION", "DELETE_SQL_COLLECTION", "CHANGE_SQL_COLLECTION_COMPARTMENT", "REFRESH_SQL_COLLECTION_LOG_INSIGHTS", "PURGE_SQL_COLLECTION_LOGS", "REFRESH_VIOLATIONS", "UPDATE_SECURITY_POLICY", "CHANGE_SECURITY_POLICY_COMPARTMENT", "UPDATE_SECURITY_POLICY_DEPLOYMENT", "CHANGE_SECURITY_POLICY_DEPLOYMENT_COMPARTMENT", "AUDIT_TRAIL", "DELETE_AUDIT_TRAIL", "DISCOVER_AUDIT_TRAILS", "UPDATE_AUDIT_TRAIL", "UPDATE_AUDIT_PROFILE", "AUDIT_CHANGE_COMPARTMENT", "CREATE_REPORT_DEFINITION", "UPDATE_REPORT_DEFINITION", "CHANGE_REPORT_DEFINITION_COMPARTMENT", "DELETE_REPORT_DEFINITION", "GENERATE_REPORT", "CHANGE_REPORT_COMPARTMENT", "DELETE_ARCHIVE_RETRIEVAL", "CREATE_ARCHIVE_RETRIEVAL", "UPDATE_ARCHIVE_RETRIEVAL", "CHANGE_ARCHIVE_RETRIEVAL_COMPARTMENT", "UPDATE_ALERT", "TARGET_ALERT_POLICY_ASSOCIATION", "CREATE_SENSITIVE_DATA_MODEL", "UPDATE_SENSITIVE_DATA_MODEL", "DELETE_SENSITIVE_DATA_MODEL", "UPLOAD_SENSITIVE_DATA_MODEL", "GENERATE_SENSITIVE_DATA_MODEL_FOR_DOWNLOAD", "CREATE_SENSITIVE_COLUMN", "UPDATE_SENSITIVE_COLUMN", "PATCH_SENSITIVE_COLUMNS", "CREATE_DISCOVERY_JOB", "DELETE_DISCOVERY_JOB", "PATCH_DISCOVERY_JOB_RESULT", "APPLY_DISCOVERY_JOB_RESULT", "GENERATE_DISCOVERY_REPORT", "CREATE_SENSITIVE_TYPE", "UPDATE_SENSITIVE_TYPE", "CREATE_MASKING_POLICY", "UPDATE_MASKING_POLICY", "DELETE_MASKING_POLICY", "UPLOAD_MASKING_POLICY", "GENERATE_MASKING_POLICY_FOR_DOWNLOAD", "CREATE_MASKING_COLUMN", "UPDATE_MASKING_COLUMN", "PATCH_MASKING_COLUMNS", "GENERATE_MASKING_REPORT", "CREATE_LIBRARY_MASKING_FORMAT", "UPDATE_LIBRARY_MASKING_FORMAT", "ADD_COLUMNS_FROM_SDM", "MASKING_JOB", "CREATE_DIFFERENCE", "DELETE_DIFFERENCE", "UPDATE_DIFFERENCE", "PATCH_DIFFERENCE", "APPLY_DIFFERENCE", "ABORT_MASKING", "CREATE_SCHEDULE", "REMOVE_SCHEDULE_REPORT", "UPDATE_ALL_ALERT", "PATCH_TARGET_ALERT_POLICY_ASSOCIATION"] + allowed_values = ["ENABLE_DATA_SAFE_CONFIGURATION", "CREATE_PRIVATE_ENDPOINT", "UPDATE_PRIVATE_ENDPOINT", "DELETE_PRIVATE_ENDPOINT", "CHANGE_PRIVATE_ENDPOINT_COMPARTMENT", "CREATE_ONPREM_CONNECTOR", "UPDATE_ONPREM_CONNECTOR", "DELETE_ONPREM_CONNECTOR", "UPDATE_ONPREM_CONNECTOR_WALLET", "CHANGE_ONPREM_CONNECTOR_COMPARTMENT", "PROVISION_POLICY", "RETRIEVE_POLICY", "UPDATE_POLICY", "CHANGE_POLICY_COMPARTMENT", "CREATE_TARGET_DATABASE", "UPDATE_TARGET_DATABASE", "ACTIVATE_TARGET_DATABASE", "DEACTIVATE_TARGET_DATABASE", "DELETE_TARGET_DATABASE", "CHANGE_TARGET_DATABASE_COMPARTMENT", "CREATE_PEER_TARGET_DATABASE", "UPDATE_PEER_TARGET_DATABASE", "DELETE_PEER_TARGET_DATABASE", "REFRESH_TARGET_DATABASE", "CREATE_USER_ASSESSMENT", "ASSESS_USER_ASSESSMENT", "CREATE_SNAPSHOT_USER_ASSESSMENT", "CREATE_SCHEDULE_USER_ASSESSMENT", "COMPARE_WITH_BASELINE_USER_ASSESSMENT", "DELETE_USER_ASSESSMENT", "UPDATE_USER_ASSESSMENT", "CHANGE_USER_ASSESSMENT_COMPARTMENT", "SET_USER_ASSESSMENT_BASELINE", "UNSET_USER_ASSESSMENT_BASELINE", "GENERATE_USER_ASSESSMENT_REPORT", "CREATE_SECURITY_ASSESSMENT", "CREATE_SECURITY_ASSESSMENT_NOW", "ASSESS_SECURITY_ASSESSMENT", "CREATE_SNAPSHOT_SECURITY_ASSESSMENT", "CREATE_SCHEDULE_SECURITY_ASSESSMENT", "COMPARE_WITH_BASELINE_SECURITY_ASSESSMENT", "DELETE_SECURITY_ASSESSMENT", "UPDATE_SECURITY_ASSESSMENT", "UPDATE_FINDING_RISK", "CHANGE_SECURITY_ASSESSMENT_COMPARTMENT", "SET_SECURITY_ASSESSMENT_BASELINE", "UNSET_SECURITY_ASSESSMENT_BASELINE", "GENERATE_SECURITY_ASSESSMENT_REPORT", "CALCULATE_VOLUME", "CALCULATE_COLLECTED_VOLUME", "CREATE_DB_SECURITY_CONFIG", "REFRESH_DB_SECURITY_CONFIG", "UPDATE_DB_SECURITY_CONFIG", "CHANGE_DB_SECURITY_CONFIG_COMPARTMENT", "GENERATE_FIREWALL_POLICY", "UPDATE_FIREWALL_POLICY", "CHANGE_FIREWALL_POLICY_COMPARTMENT", "DELETE_FIREWALL_POLICY", "CREATE_SQL_COLLECTION", "UPDATE_SQL_COLLECTION", "START_SQL_COLLECTION", "STOP_SQL_COLLECTION", "DELETE_SQL_COLLECTION", "CHANGE_SQL_COLLECTION_COMPARTMENT", "REFRESH_SQL_COLLECTION_LOG_INSIGHTS", "PURGE_SQL_COLLECTION_LOGS", "REFRESH_VIOLATIONS", "UPDATE_SECURITY_POLICY", "CHANGE_SECURITY_POLICY_COMPARTMENT", "UPDATE_SECURITY_POLICY_DEPLOYMENT", "CHANGE_SECURITY_POLICY_DEPLOYMENT_COMPARTMENT", "AUDIT_TRAIL", "DELETE_AUDIT_TRAIL", "DISCOVER_AUDIT_TRAILS", "UPDATE_AUDIT_TRAIL", "UPDATE_AUDIT_PROFILE", "AUDIT_CHANGE_COMPARTMENT", "CREATE_REPORT_DEFINITION", "UPDATE_REPORT_DEFINITION", "CHANGE_REPORT_DEFINITION_COMPARTMENT", "DELETE_REPORT_DEFINITION", "GENERATE_REPORT", "CHANGE_REPORT_COMPARTMENT", "DELETE_ARCHIVE_RETRIEVAL", "CREATE_ARCHIVE_RETRIEVAL", "UPDATE_ARCHIVE_RETRIEVAL", "CHANGE_ARCHIVE_RETRIEVAL_COMPARTMENT", "UPDATE_ALERT", "TARGET_ALERT_POLICY_ASSOCIATION", "CREATE_SENSITIVE_DATA_MODEL", "UPDATE_SENSITIVE_DATA_MODEL", "DELETE_SENSITIVE_DATA_MODEL", "UPLOAD_SENSITIVE_DATA_MODEL", "GENERATE_SENSITIVE_DATA_MODEL_FOR_DOWNLOAD", "CREATE_SENSITIVE_COLUMN", "UPDATE_SENSITIVE_COLUMN", "PATCH_SENSITIVE_COLUMNS", "CREATE_DISCOVERY_JOB", "DELETE_DISCOVERY_JOB", "PATCH_DISCOVERY_JOB_RESULT", "APPLY_DISCOVERY_JOB_RESULT", "GENERATE_DISCOVERY_REPORT", "CREATE_SENSITIVE_TYPE", "UPDATE_SENSITIVE_TYPE", "CREATE_MASKING_POLICY", "UPDATE_MASKING_POLICY", "DELETE_MASKING_POLICY", "UPLOAD_MASKING_POLICY", "GENERATE_MASKING_POLICY_FOR_DOWNLOAD", "CREATE_MASKING_COLUMN", "UPDATE_MASKING_COLUMN", "PATCH_MASKING_COLUMNS", "GENERATE_MASKING_REPORT", "CREATE_LIBRARY_MASKING_FORMAT", "UPDATE_LIBRARY_MASKING_FORMAT", "ADD_COLUMNS_FROM_SDM", "MASKING_JOB", "CREATE_DIFFERENCE", "DELETE_DIFFERENCE", "UPDATE_DIFFERENCE", "PATCH_DIFFERENCE", "APPLY_DIFFERENCE", "ABORT_MASKING", "CREATE_SECURITY_POLICY_REPORT", "REFRESH_SECURITY_POLICY_CACHE", "DELETE_SECURITY_POLICY_CACHE", "CREATE_SCHEDULE", "REMOVE_SCHEDULE_REPORT", "UPDATE_ALL_ALERT", "PATCH_TARGET_ALERT_POLICY_ASSOCIATION"] if not value_allowed_none_or_none_sentinel(operation_type, allowed_values): operation_type = 'UNKNOWN_ENUM_VALUE' self._operation_type = operation_type diff --git a/src/oci/identity_domains/identity_domains_client.py b/src/oci/identity_domains/identity_domains_client.py index 9f1d788d71..d323d7dcff 100644 --- a/src/oci/identity_domains/identity_domains_client.py +++ b/src/oci/identity_domains/identity_domains_client.py @@ -5537,7 +5537,7 @@ def delete_api_key(self, api_key_id, **kwargs): resource_path = "/admin/v1/ApiKeys/{apiKeyId}" method = "DELETE" operation_name = "delete_api_key" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/ApiKey/DeleteApiKey" # Don't accept unknown kwargs expected_kwargs = [ @@ -5658,7 +5658,7 @@ def delete_app(self, app_id, **kwargs): resource_path = "/admin/v1/Apps/{appId}" method = "DELETE" operation_name = "delete_app" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/App/DeleteApp" # Don't accept unknown kwargs expected_kwargs = [ @@ -5779,7 +5779,7 @@ def delete_app_role(self, app_role_id, **kwargs): resource_path = "/admin/v1/AppRoles/{appRoleId}" method = "DELETE" operation_name = "delete_app_role" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/AppRole/DeleteAppRole" # Don't accept unknown kwargs expected_kwargs = [ @@ -5900,7 +5900,7 @@ def delete_approval_workflow(self, approval_workflow_id, **kwargs): resource_path = "/admin/v1/ApprovalWorkflows/{approvalWorkflowId}" method = "DELETE" operation_name = "delete_approval_workflow" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/ApprovalWorkflow/DeleteApprovalWorkflow" # Don't accept unknown kwargs expected_kwargs = [ @@ -6021,7 +6021,7 @@ def delete_approval_workflow_assignment(self, approval_workflow_assignment_id, * resource_path = "/admin/v1/ApprovalWorkflowAssignments/{approvalWorkflowAssignmentId}" method = "DELETE" operation_name = "delete_approval_workflow_assignment" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/ApprovalWorkflowAssignment/DeleteApprovalWorkflowAssignment" # Don't accept unknown kwargs expected_kwargs = [ @@ -6142,7 +6142,7 @@ def delete_approval_workflow_step(self, approval_workflow_step_id, **kwargs): resource_path = "/admin/v1/ApprovalWorkflowSteps/{approvalWorkflowStepId}" method = "DELETE" operation_name = "delete_approval_workflow_step" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/ApprovalWorkflowStep/DeleteApprovalWorkflowStep" # Don't accept unknown kwargs expected_kwargs = [ @@ -6263,7 +6263,7 @@ def delete_auth_token(self, auth_token_id, **kwargs): resource_path = "/admin/v1/AuthTokens/{authTokenId}" method = "DELETE" operation_name = "delete_auth_token" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/AuthToken/DeleteAuthToken" # Don't accept unknown kwargs expected_kwargs = [ @@ -6384,7 +6384,7 @@ def delete_cloud_gate(self, cloud_gate_id, **kwargs): resource_path = "/admin/v1/CloudGates/{cloudGateId}" method = "DELETE" operation_name = "delete_cloud_gate" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/CloudGate/DeleteCloudGate" # Don't accept unknown kwargs expected_kwargs = [ @@ -6505,7 +6505,7 @@ def delete_cloud_gate_mapping(self, cloud_gate_mapping_id, **kwargs): resource_path = "/admin/v1/CloudGateMappings/{cloudGateMappingId}" method = "DELETE" operation_name = "delete_cloud_gate_mapping" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/CloudGateMapping/DeleteCloudGateMapping" # Don't accept unknown kwargs expected_kwargs = [ @@ -6626,7 +6626,7 @@ def delete_cloud_gate_server(self, cloud_gate_server_id, **kwargs): resource_path = "/admin/v1/CloudGateServers/{cloudGateServerId}" method = "DELETE" operation_name = "delete_cloud_gate_server" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/CloudGateServer/DeleteCloudGateServer" # Don't accept unknown kwargs expected_kwargs = [ @@ -6747,7 +6747,7 @@ def delete_condition(self, condition_id, **kwargs): resource_path = "/admin/v1/Conditions/{conditionId}" method = "DELETE" operation_name = "delete_condition" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Condition/DeleteCondition" # Don't accept unknown kwargs expected_kwargs = [ @@ -6868,7 +6868,7 @@ def delete_customer_secret_key(self, customer_secret_key_id, **kwargs): resource_path = "/admin/v1/CustomerSecretKeys/{customerSecretKeyId}" method = "DELETE" operation_name = "delete_customer_secret_key" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/CustomerSecretKey/DeleteCustomerSecretKey" # Don't accept unknown kwargs expected_kwargs = [ @@ -6989,7 +6989,7 @@ def delete_dynamic_resource_group(self, dynamic_resource_group_id, **kwargs): resource_path = "/admin/v1/DynamicResourceGroups/{dynamicResourceGroupId}" method = "DELETE" operation_name = "delete_dynamic_resource_group" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/DynamicResourceGroup/DeleteDynamicResourceGroup" # Don't accept unknown kwargs expected_kwargs = [ @@ -7110,7 +7110,7 @@ def delete_grant(self, grant_id, **kwargs): resource_path = "/admin/v1/Grants/{grantId}" method = "DELETE" operation_name = "delete_grant" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Grant/DeleteGrant" # Don't accept unknown kwargs expected_kwargs = [ @@ -7231,7 +7231,7 @@ def delete_group(self, group_id, **kwargs): resource_path = "/admin/v1/Groups/{groupId}" method = "DELETE" operation_name = "delete_group" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Group/DeleteGroup" # Don't accept unknown kwargs expected_kwargs = [ @@ -7352,7 +7352,7 @@ def delete_identity_propagation_trust(self, identity_propagation_trust_id, **kwa resource_path = "/admin/v1/IdentityPropagationTrusts/{identityPropagationTrustId}" method = "DELETE" operation_name = "delete_identity_propagation_trust" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/IdentityPropagationTrust/DeleteIdentityPropagationTrust" # Don't accept unknown kwargs expected_kwargs = [ @@ -7473,7 +7473,7 @@ def delete_identity_provider(self, identity_provider_id, **kwargs): resource_path = "/admin/v1/IdentityProviders/{identityProviderId}" method = "DELETE" operation_name = "delete_identity_provider" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/IdentityProvider/DeleteIdentityProvider" # Don't accept unknown kwargs expected_kwargs = [ @@ -7594,7 +7594,7 @@ def delete_my_api_key(self, my_api_key_id, **kwargs): resource_path = "/admin/v1/MyApiKeys/{myApiKeyId}" method = "DELETE" operation_name = "delete_my_api_key" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/MyApiKey/DeleteMyApiKey" # Don't accept unknown kwargs expected_kwargs = [ @@ -7715,7 +7715,7 @@ def delete_my_auth_token(self, my_auth_token_id, **kwargs): resource_path = "/admin/v1/MyAuthTokens/{myAuthTokenId}" method = "DELETE" operation_name = "delete_my_auth_token" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/MyAuthToken/DeleteMyAuthToken" # Don't accept unknown kwargs expected_kwargs = [ @@ -7836,7 +7836,7 @@ def delete_my_customer_secret_key(self, my_customer_secret_key_id, **kwargs): resource_path = "/admin/v1/MyCustomerSecretKeys/{myCustomerSecretKeyId}" method = "DELETE" operation_name = "delete_my_customer_secret_key" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/MyCustomerSecretKey/DeleteMyCustomerSecretKey" # Don't accept unknown kwargs expected_kwargs = [ @@ -7957,7 +7957,7 @@ def delete_my_device(self, my_device_id, **kwargs): resource_path = "/admin/v1/MyDevices/{myDeviceId}" method = "DELETE" operation_name = "delete_my_device" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/MyDevice/DeleteMyDevice" # Don't accept unknown kwargs expected_kwargs = [ @@ -8078,7 +8078,7 @@ def delete_my_o_auth2_client_credential(self, my_o_auth2_client_credential_id, * resource_path = "/admin/v1/MyOAuth2ClientCredentials/{myOAuth2ClientCredentialId}" method = "DELETE" operation_name = "delete_my_o_auth2_client_credential" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/MyOAuth2ClientCredential/DeleteMyOAuth2ClientCredential" # Don't accept unknown kwargs expected_kwargs = [ @@ -8199,7 +8199,7 @@ def delete_my_smtp_credential(self, my_smtp_credential_id, **kwargs): resource_path = "/admin/v1/MySmtpCredentials/{mySmtpCredentialId}" method = "DELETE" operation_name = "delete_my_smtp_credential" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/MySmtpCredential/DeleteMySmtpCredential" # Don't accept unknown kwargs expected_kwargs = [ @@ -8320,7 +8320,7 @@ def delete_my_support_account(self, my_support_account_id, **kwargs): resource_path = "/admin/v1/MySupportAccounts/{mySupportAccountId}" method = "DELETE" operation_name = "delete_my_support_account" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/MySupportAccount/DeleteMySupportAccount" # Don't accept unknown kwargs expected_kwargs = [ @@ -8441,7 +8441,7 @@ def delete_my_trusted_user_agent(self, my_trusted_user_agent_id, **kwargs): resource_path = "/admin/v1/MyTrustedUserAgents/{myTrustedUserAgentId}" method = "DELETE" operation_name = "delete_my_trusted_user_agent" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/MyTrustedUserAgent/DeleteMyTrustedUserAgent" # Don't accept unknown kwargs expected_kwargs = [ @@ -8562,7 +8562,7 @@ def delete_my_user_db_credential(self, my_user_db_credential_id, **kwargs): resource_path = "/admin/v1/MyUserDbCredentials/{myUserDbCredentialId}" method = "DELETE" operation_name = "delete_my_user_db_credential" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/MyUserDbCredential/DeleteMyUserDbCredential" # Don't accept unknown kwargs expected_kwargs = [ @@ -8683,7 +8683,7 @@ def delete_network_perimeter(self, network_perimeter_id, **kwargs): resource_path = "/admin/v1/NetworkPerimeters/{networkPerimeterId}" method = "DELETE" operation_name = "delete_network_perimeter" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/NetworkPerimeter/DeleteNetworkPerimeter" # Don't accept unknown kwargs expected_kwargs = [ @@ -8804,7 +8804,7 @@ def delete_o_auth2_client_credential(self, o_auth2_client_credential_id, **kwarg resource_path = "/admin/v1/OAuth2ClientCredentials/{oAuth2ClientCredentialId}" method = "DELETE" operation_name = "delete_o_auth2_client_credential" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/OAuth2ClientCredential/DeleteOAuth2ClientCredential" # Don't accept unknown kwargs expected_kwargs = [ @@ -8925,7 +8925,7 @@ def delete_o_auth_client_certificate(self, o_auth_client_certificate_id, **kwarg resource_path = "/admin/v1/OAuthClientCertificates/{oAuthClientCertificateId}" method = "DELETE" operation_name = "delete_o_auth_client_certificate" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/OAuthClientCertificate/DeleteOAuthClientCertificate" # Don't accept unknown kwargs expected_kwargs = [ @@ -9046,7 +9046,7 @@ def delete_o_auth_partner_certificate(self, o_auth_partner_certificate_id, **kwa resource_path = "/admin/v1/OAuthPartnerCertificates/{oAuthPartnerCertificateId}" method = "DELETE" operation_name = "delete_o_auth_partner_certificate" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/OAuthPartnerCertificate/DeleteOAuthPartnerCertificate" # Don't accept unknown kwargs expected_kwargs = [ @@ -9167,7 +9167,7 @@ def delete_password_policy(self, password_policy_id, **kwargs): resource_path = "/admin/v1/PasswordPolicies/{passwordPolicyId}" method = "DELETE" operation_name = "delete_password_policy" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/PasswordPolicy/DeletePasswordPolicy" # Don't accept unknown kwargs expected_kwargs = [ @@ -9288,7 +9288,7 @@ def delete_policy(self, policy_id, **kwargs): resource_path = "/admin/v1/Policies/{policyId}" method = "DELETE" operation_name = "delete_policy" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Policy/DeletePolicy" # Don't accept unknown kwargs expected_kwargs = [ @@ -9409,7 +9409,7 @@ def delete_rule(self, rule_id, **kwargs): resource_path = "/admin/v1/Rules/{ruleId}" method = "DELETE" operation_name = "delete_rule" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Rule/DeleteRule" # Don't accept unknown kwargs expected_kwargs = [ @@ -9530,7 +9530,7 @@ def delete_security_question(self, security_question_id, **kwargs): resource_path = "/admin/v1/SecurityQuestions/{securityQuestionId}" method = "DELETE" operation_name = "delete_security_question" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/SecurityQuestion/DeleteSecurityQuestion" # Don't accept unknown kwargs expected_kwargs = [ @@ -9651,7 +9651,7 @@ def delete_self_registration_profile(self, self_registration_profile_id, **kwarg resource_path = "/admin/v1/SelfRegistrationProfiles/{selfRegistrationProfileId}" method = "DELETE" operation_name = "delete_self_registration_profile" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/SelfRegistrationProfile/DeleteSelfRegistrationProfile" # Don't accept unknown kwargs expected_kwargs = [ @@ -9772,7 +9772,7 @@ def delete_smtp_credential(self, smtp_credential_id, **kwargs): resource_path = "/admin/v1/SmtpCredentials/{smtpCredentialId}" method = "DELETE" operation_name = "delete_smtp_credential" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/SmtpCredential/DeleteSmtpCredential" # Don't accept unknown kwargs expected_kwargs = [ @@ -9893,7 +9893,7 @@ def delete_user(self, user_id, **kwargs): resource_path = "/admin/v1/Users/{userId}" method = "DELETE" operation_name = "delete_user" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/User/DeleteUser" # Don't accept unknown kwargs expected_kwargs = [ @@ -10014,7 +10014,7 @@ def delete_user_db_credential(self, user_db_credential_id, **kwargs): resource_path = "/admin/v1/UserDbCredentials/{userDbCredentialId}" method = "DELETE" operation_name = "delete_user_db_credential" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/UserDbCredential/DeleteUserDbCredential" # Don't accept unknown kwargs expected_kwargs = [ @@ -10137,7 +10137,7 @@ def get_account_mgmt_info(self, account_mgmt_info_id, **kwargs): resource_path = "/admin/v1/AccountMgmtInfos/{accountMgmtInfoId}" method = "GET" operation_name = "get_account_mgmt_info" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/AccountMgmtInfo/GetAccountMgmtInfo" # Don't accept unknown kwargs expected_kwargs = [ @@ -10270,7 +10270,7 @@ def get_account_recovery_setting(self, account_recovery_setting_id, **kwargs): resource_path = "/admin/v1/AccountRecoverySettings/{accountRecoverySettingId}" method = "GET" operation_name = "get_account_recovery_setting" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/AccountRecoverySetting/GetAccountRecoverySetting" # Don't accept unknown kwargs expected_kwargs = [ @@ -10403,7 +10403,7 @@ def get_api_key(self, api_key_id, **kwargs): resource_path = "/admin/v1/ApiKeys/{apiKeyId}" method = "GET" operation_name = "get_api_key" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/ApiKey/GetApiKey" # Don't accept unknown kwargs expected_kwargs = [ @@ -10536,7 +10536,7 @@ def get_app(self, app_id, **kwargs): resource_path = "/admin/v1/Apps/{appId}" method = "GET" operation_name = "get_app" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/App/GetApp" # Don't accept unknown kwargs expected_kwargs = [ @@ -10669,7 +10669,7 @@ def get_app_role(self, app_role_id, **kwargs): resource_path = "/admin/v1/AppRoles/{appRoleId}" method = "GET" operation_name = "get_app_role" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/AppRole/GetAppRole" # Don't accept unknown kwargs expected_kwargs = [ @@ -10802,7 +10802,7 @@ def get_approval_workflow(self, approval_workflow_id, **kwargs): resource_path = "/admin/v1/ApprovalWorkflows/{approvalWorkflowId}" method = "GET" operation_name = "get_approval_workflow" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/ApprovalWorkflow/GetApprovalWorkflow" # Don't accept unknown kwargs expected_kwargs = [ @@ -10935,7 +10935,7 @@ def get_approval_workflow_assignment(self, approval_workflow_assignment_id, **kw resource_path = "/admin/v1/ApprovalWorkflowAssignments/{approvalWorkflowAssignmentId}" method = "GET" operation_name = "get_approval_workflow_assignment" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/ApprovalWorkflowAssignment/GetApprovalWorkflowAssignment" # Don't accept unknown kwargs expected_kwargs = [ @@ -11068,7 +11068,7 @@ def get_approval_workflow_step(self, approval_workflow_step_id, **kwargs): resource_path = "/admin/v1/ApprovalWorkflowSteps/{approvalWorkflowStepId}" method = "GET" operation_name = "get_approval_workflow_step" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/ApprovalWorkflowStep/GetApprovalWorkflowStep" # Don't accept unknown kwargs expected_kwargs = [ @@ -11201,7 +11201,7 @@ def get_auth_token(self, auth_token_id, **kwargs): resource_path = "/admin/v1/AuthTokens/{authTokenId}" method = "GET" operation_name = "get_auth_token" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/AuthToken/GetAuthToken" # Don't accept unknown kwargs expected_kwargs = [ @@ -11334,7 +11334,7 @@ def get_authentication_factor_setting(self, authentication_factor_setting_id, ** resource_path = "/admin/v1/AuthenticationFactorSettings/{authenticationFactorSettingId}" method = "GET" operation_name = "get_authentication_factor_setting" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/AuthenticationFactorSetting/GetAuthenticationFactorSetting" # Don't accept unknown kwargs expected_kwargs = [ @@ -11467,7 +11467,7 @@ def get_branding_setting(self, branding_setting_id, **kwargs): resource_path = "/admin/v1/BrandingSettings/{brandingSettingId}" method = "GET" operation_name = "get_branding_setting" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/BrandingSetting/GetBrandingSetting" # Don't accept unknown kwargs expected_kwargs = [ @@ -11600,7 +11600,7 @@ def get_cloud_gate(self, cloud_gate_id, **kwargs): resource_path = "/admin/v1/CloudGates/{cloudGateId}" method = "GET" operation_name = "get_cloud_gate" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/CloudGate/GetCloudGate" # Don't accept unknown kwargs expected_kwargs = [ @@ -11733,7 +11733,7 @@ def get_cloud_gate_mapping(self, cloud_gate_mapping_id, **kwargs): resource_path = "/admin/v1/CloudGateMappings/{cloudGateMappingId}" method = "GET" operation_name = "get_cloud_gate_mapping" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/CloudGateMapping/GetCloudGateMapping" # Don't accept unknown kwargs expected_kwargs = [ @@ -11866,7 +11866,7 @@ def get_cloud_gate_server(self, cloud_gate_server_id, **kwargs): resource_path = "/admin/v1/CloudGateServers/{cloudGateServerId}" method = "GET" operation_name = "get_cloud_gate_server" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/CloudGateServer/GetCloudGateServer" # Don't accept unknown kwargs expected_kwargs = [ @@ -11999,7 +11999,7 @@ def get_condition(self, condition_id, **kwargs): resource_path = "/admin/v1/Conditions/{conditionId}" method = "GET" operation_name = "get_condition" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Condition/GetCondition" # Don't accept unknown kwargs expected_kwargs = [ @@ -12132,7 +12132,7 @@ def get_customer_secret_key(self, customer_secret_key_id, **kwargs): resource_path = "/admin/v1/CustomerSecretKeys/{customerSecretKeyId}" method = "GET" operation_name = "get_customer_secret_key" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/CustomerSecretKey/GetCustomerSecretKey" # Don't accept unknown kwargs expected_kwargs = [ @@ -12265,7 +12265,7 @@ def get_dynamic_resource_group(self, dynamic_resource_group_id, **kwargs): resource_path = "/admin/v1/DynamicResourceGroups/{dynamicResourceGroupId}" method = "GET" operation_name = "get_dynamic_resource_group" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/DynamicResourceGroup/GetDynamicResourceGroup" # Don't accept unknown kwargs expected_kwargs = [ @@ -12398,7 +12398,7 @@ def get_grant(self, grant_id, **kwargs): resource_path = "/admin/v1/Grants/{grantId}" method = "GET" operation_name = "get_grant" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Grant/GetGrant" # Don't accept unknown kwargs expected_kwargs = [ @@ -12531,7 +12531,7 @@ def get_group(self, group_id, **kwargs): resource_path = "/admin/v1/Groups/{groupId}" method = "GET" operation_name = "get_group" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Group/GetGroup" # Don't accept unknown kwargs expected_kwargs = [ @@ -12664,7 +12664,7 @@ def get_identity_propagation_trust(self, identity_propagation_trust_id, **kwargs resource_path = "/admin/v1/IdentityPropagationTrusts/{identityPropagationTrustId}" method = "GET" operation_name = "get_identity_propagation_trust" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/IdentityPropagationTrust/GetIdentityPropagationTrust" # Don't accept unknown kwargs expected_kwargs = [ @@ -12797,7 +12797,7 @@ def get_identity_provider(self, identity_provider_id, **kwargs): resource_path = "/admin/v1/IdentityProviders/{identityProviderId}" method = "GET" operation_name = "get_identity_provider" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/IdentityProvider/GetIdentityProvider" # Don't accept unknown kwargs expected_kwargs = [ @@ -12930,7 +12930,7 @@ def get_identity_setting(self, identity_setting_id, **kwargs): resource_path = "/admin/v1/IdentitySettings/{identitySettingId}" method = "GET" operation_name = "get_identity_setting" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/IdentitySetting/GetIdentitySetting" # Don't accept unknown kwargs expected_kwargs = [ @@ -13063,7 +13063,7 @@ def get_kmsi_setting(self, kmsi_setting_id, **kwargs): resource_path = "/admin/v1/KmsiSettings/{kmsiSettingId}" method = "GET" operation_name = "get_kmsi_setting" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/KmsiSetting/GetKmsiSetting" # Don't accept unknown kwargs expected_kwargs = [ @@ -13193,7 +13193,7 @@ def get_me(self, **kwargs): resource_path = "/admin/v1/Me" method = "GET" operation_name = "get_me" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Me/GetMe" # Don't accept unknown kwargs expected_kwargs = [ @@ -13306,7 +13306,7 @@ def get_my_api_key(self, my_api_key_id, **kwargs): resource_path = "/admin/v1/MyApiKeys/{myApiKeyId}" method = "GET" operation_name = "get_my_api_key" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/MyApiKey/GetMyApiKey" # Don't accept unknown kwargs expected_kwargs = [ @@ -13413,7 +13413,7 @@ def get_my_auth_token(self, my_auth_token_id, **kwargs): resource_path = "/admin/v1/MyAuthTokens/{myAuthTokenId}" method = "GET" operation_name = "get_my_auth_token" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/MyAuthToken/GetMyAuthToken" # Don't accept unknown kwargs expected_kwargs = [ @@ -13520,7 +13520,7 @@ def get_my_completed_approval(self, my_completed_approval_id, **kwargs): resource_path = "/admin/v1/MyCompletedApprovals/{myCompletedApprovalId}" method = "GET" operation_name = "get_my_completed_approval" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/MyCompletedApproval/GetMyCompletedApproval" # Don't accept unknown kwargs expected_kwargs = [ @@ -13627,7 +13627,7 @@ def get_my_customer_secret_key(self, my_customer_secret_key_id, **kwargs): resource_path = "/admin/v1/MyCustomerSecretKeys/{myCustomerSecretKeyId}" method = "GET" operation_name = "get_my_customer_secret_key" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/MyCustomerSecretKey/GetMyCustomerSecretKey" # Don't accept unknown kwargs expected_kwargs = [ @@ -13742,7 +13742,7 @@ def get_my_device(self, my_device_id, **kwargs): resource_path = "/admin/v1/MyDevices/{myDeviceId}" method = "GET" operation_name = "get_my_device" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/MyDevice/GetMyDevice" # Don't accept unknown kwargs expected_kwargs = [ @@ -13867,7 +13867,7 @@ def get_my_o_auth2_client_credential(self, my_o_auth2_client_credential_id, **kw resource_path = "/admin/v1/MyOAuth2ClientCredentials/{myOAuth2ClientCredentialId}" method = "GET" operation_name = "get_my_o_auth2_client_credential" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/MyOAuth2ClientCredential/GetMyOAuth2ClientCredential" # Don't accept unknown kwargs expected_kwargs = [ @@ -13974,7 +13974,7 @@ def get_my_pending_approval(self, my_pending_approval_id, **kwargs): resource_path = "/admin/v1/MyPendingApprovals/{myPendingApprovalId}" method = "GET" operation_name = "get_my_pending_approval" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/MyPendingApproval/GetMyPendingApproval" # Don't accept unknown kwargs expected_kwargs = [ @@ -14089,7 +14089,7 @@ def get_my_request(self, my_request_id, **kwargs): resource_path = "/admin/v1/MyRequests/{myRequestId}" method = "GET" operation_name = "get_my_request" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/MyRequest/GetMyRequest" # Don't accept unknown kwargs expected_kwargs = [ @@ -14214,7 +14214,7 @@ def get_my_smtp_credential(self, my_smtp_credential_id, **kwargs): resource_path = "/admin/v1/MySmtpCredentials/{mySmtpCredentialId}" method = "GET" operation_name = "get_my_smtp_credential" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/MySmtpCredential/GetMySmtpCredential" # Don't accept unknown kwargs expected_kwargs = [ @@ -14321,7 +14321,7 @@ def get_my_support_account(self, my_support_account_id, **kwargs): resource_path = "/admin/v1/MySupportAccounts/{mySupportAccountId}" method = "GET" operation_name = "get_my_support_account" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/MySupportAccount/GetMySupportAccount" # Don't accept unknown kwargs expected_kwargs = [ @@ -14436,7 +14436,7 @@ def get_my_trusted_user_agent(self, my_trusted_user_agent_id, **kwargs): resource_path = "/admin/v1/MyTrustedUserAgents/{myTrustedUserAgentId}" method = "GET" operation_name = "get_my_trusted_user_agent" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/MyTrustedUserAgent/GetMyTrustedUserAgent" # Don't accept unknown kwargs expected_kwargs = [ @@ -14561,7 +14561,7 @@ def get_my_user_db_credential(self, my_user_db_credential_id, **kwargs): resource_path = "/admin/v1/MyUserDbCredentials/{myUserDbCredentialId}" method = "GET" operation_name = "get_my_user_db_credential" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/MyUserDbCredential/GetMyUserDbCredential" # Don't accept unknown kwargs expected_kwargs = [ @@ -14676,7 +14676,7 @@ def get_network_perimeter(self, network_perimeter_id, **kwargs): resource_path = "/admin/v1/NetworkPerimeters/{networkPerimeterId}" method = "GET" operation_name = "get_network_perimeter" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/NetworkPerimeter/GetNetworkPerimeter" # Don't accept unknown kwargs expected_kwargs = [ @@ -14809,7 +14809,7 @@ def get_notification_setting(self, notification_setting_id, **kwargs): resource_path = "/admin/v1/NotificationSettings/{notificationSettingId}" method = "GET" operation_name = "get_notification_setting" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/NotificationSetting/GetNotificationSetting" # Don't accept unknown kwargs expected_kwargs = [ @@ -14942,7 +14942,7 @@ def get_o_auth2_client_credential(self, o_auth2_client_credential_id, **kwargs): resource_path = "/admin/v1/OAuth2ClientCredentials/{oAuth2ClientCredentialId}" method = "GET" operation_name = "get_o_auth2_client_credential" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/OAuth2ClientCredential/GetOAuth2ClientCredential" # Don't accept unknown kwargs expected_kwargs = [ @@ -15067,7 +15067,7 @@ def get_o_auth_client_certificate(self, o_auth_client_certificate_id, **kwargs): resource_path = "/admin/v1/OAuthClientCertificates/{oAuthClientCertificateId}" method = "GET" operation_name = "get_o_auth_client_certificate" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/OAuthClientCertificate/GetOAuthClientCertificate" # Don't accept unknown kwargs expected_kwargs = [ @@ -15174,7 +15174,7 @@ def get_o_auth_partner_certificate(self, o_auth_partner_certificate_id, **kwargs resource_path = "/admin/v1/OAuthPartnerCertificates/{oAuthPartnerCertificateId}" method = "GET" operation_name = "get_o_auth_partner_certificate" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/OAuthPartnerCertificate/GetOAuthPartnerCertificate" # Don't accept unknown kwargs expected_kwargs = [ @@ -15289,7 +15289,7 @@ def get_password_policy(self, password_policy_id, **kwargs): resource_path = "/admin/v1/PasswordPolicies/{passwordPolicyId}" method = "GET" operation_name = "get_password_policy" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/PasswordPolicy/GetPasswordPolicy" # Don't accept unknown kwargs expected_kwargs = [ @@ -15422,7 +15422,7 @@ def get_policy(self, policy_id, **kwargs): resource_path = "/admin/v1/Policies/{policyId}" method = "GET" operation_name = "get_policy" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Policy/GetPolicy" # Don't accept unknown kwargs expected_kwargs = [ @@ -15555,7 +15555,7 @@ def get_rule(self, rule_id, **kwargs): resource_path = "/admin/v1/Rules/{ruleId}" method = "GET" operation_name = "get_rule" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Rule/GetRule" # Don't accept unknown kwargs expected_kwargs = [ @@ -15680,7 +15680,7 @@ def get_schema(self, schema_id, **kwargs): resource_path = "/admin/v1/Schemas/{schemaId}" method = "GET" operation_name = "get_schema" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Schema/GetSchema" # Don't accept unknown kwargs expected_kwargs = [ @@ -15795,7 +15795,7 @@ def get_security_question(self, security_question_id, **kwargs): resource_path = "/admin/v1/SecurityQuestions/{securityQuestionId}" method = "GET" operation_name = "get_security_question" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/SecurityQuestion/GetSecurityQuestion" # Don't accept unknown kwargs expected_kwargs = [ @@ -15928,7 +15928,7 @@ def get_security_question_setting(self, security_question_setting_id, **kwargs): resource_path = "/admin/v1/SecurityQuestionSettings/{securityQuestionSettingId}" method = "GET" operation_name = "get_security_question_setting" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/SecurityQuestionSetting/GetSecurityQuestionSetting" # Don't accept unknown kwargs expected_kwargs = [ @@ -16061,7 +16061,7 @@ def get_self_registration_profile(self, self_registration_profile_id, **kwargs): resource_path = "/admin/v1/SelfRegistrationProfiles/{selfRegistrationProfileId}" method = "GET" operation_name = "get_self_registration_profile" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/SelfRegistrationProfile/GetSelfRegistrationProfile" # Don't accept unknown kwargs expected_kwargs = [ @@ -16194,7 +16194,7 @@ def get_setting(self, setting_id, **kwargs): resource_path = "/admin/v1/Settings/{settingId}" method = "GET" operation_name = "get_setting" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Setting/GetSetting" # Don't accept unknown kwargs expected_kwargs = [ @@ -16327,7 +16327,7 @@ def get_smtp_credential(self, smtp_credential_id, **kwargs): resource_path = "/admin/v1/SmtpCredentials/{smtpCredentialId}" method = "GET" operation_name = "get_smtp_credential" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/SmtpCredential/GetSmtpCredential" # Don't accept unknown kwargs expected_kwargs = [ @@ -16460,7 +16460,7 @@ def get_user(self, user_id, **kwargs): resource_path = "/admin/v1/Users/{userId}" method = "GET" operation_name = "get_user" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/User/GetUser" # Don't accept unknown kwargs expected_kwargs = [ @@ -16593,7 +16593,7 @@ def get_user_attributes_setting(self, user_attributes_setting_id, **kwargs): resource_path = "/admin/v1/UserAttributesSettings/{userAttributesSettingId}" method = "GET" operation_name = "get_user_attributes_setting" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/UserAttributesSetting/GetUserAttributesSetting" # Don't accept unknown kwargs expected_kwargs = [ @@ -16726,7 +16726,7 @@ def get_user_db_credential(self, user_db_credential_id, **kwargs): resource_path = "/admin/v1/UserDbCredentials/{userDbCredentialId}" method = "GET" operation_name = "get_user_db_credential" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/UserDbCredential/GetUserDbCredential" # Don't accept unknown kwargs expected_kwargs = [ @@ -16881,7 +16881,7 @@ def list_account_mgmt_infos(self, **kwargs): resource_path = "/admin/v1/AccountMgmtInfos" method = "GET" operation_name = "list_account_mgmt_infos" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/AccountMgmtInfos/ListAccountMgmtInfos" # Don't accept unknown kwargs expected_kwargs = [ @@ -17026,7 +17026,7 @@ def list_account_recovery_settings(self, **kwargs): resource_path = "/admin/v1/AccountRecoverySettings" method = "GET" operation_name = "list_account_recovery_settings" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/AccountRecoverySettings/ListAccountRecoverySettings" # Don't accept unknown kwargs expected_kwargs = [ @@ -17173,7 +17173,7 @@ def list_api_keys(self, **kwargs): resource_path = "/admin/v1/ApiKeys" method = "GET" operation_name = "list_api_keys" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/ApiKeys/ListApiKeys" # Don't accept unknown kwargs expected_kwargs = [ @@ -17337,7 +17337,7 @@ def list_app_roles(self, **kwargs): resource_path = "/admin/v1/AppRoles" method = "GET" operation_name = "list_app_roles" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/AppRoles/ListAppRoles" # Don't accept unknown kwargs expected_kwargs = [ @@ -17501,7 +17501,7 @@ def list_approval_workflow_assignments(self, **kwargs): resource_path = "/admin/v1/ApprovalWorkflowAssignments" method = "GET" operation_name = "list_approval_workflow_assignments" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/ApprovalWorkflowAssignments/ListApprovalWorkflowAssignments" # Don't accept unknown kwargs expected_kwargs = [ @@ -17665,7 +17665,7 @@ def list_approval_workflow_steps(self, **kwargs): resource_path = "/admin/v1/ApprovalWorkflowSteps" method = "GET" operation_name = "list_approval_workflow_steps" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/ApprovalWorkflowSteps/ListApprovalWorkflowSteps" # Don't accept unknown kwargs expected_kwargs = [ @@ -17829,7 +17829,7 @@ def list_approval_workflows(self, **kwargs): resource_path = "/admin/v1/ApprovalWorkflows" method = "GET" operation_name = "list_approval_workflows" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/ApprovalWorkflows/ListApprovalWorkflows" # Don't accept unknown kwargs expected_kwargs = [ @@ -17993,7 +17993,7 @@ def list_apps(self, **kwargs): resource_path = "/admin/v1/Apps" method = "GET" operation_name = "list_apps" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Apps/ListApps" # Don't accept unknown kwargs expected_kwargs = [ @@ -18157,7 +18157,7 @@ def list_auth_tokens(self, **kwargs): resource_path = "/admin/v1/AuthTokens" method = "GET" operation_name = "list_auth_tokens" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/AuthTokens/ListAuthTokens" # Don't accept unknown kwargs expected_kwargs = [ @@ -18302,7 +18302,7 @@ def list_authentication_factor_settings(self, **kwargs): resource_path = "/admin/v1/AuthenticationFactorSettings" method = "GET" operation_name = "list_authentication_factor_settings" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/AuthenticationFactorSettings/ListAuthenticationFactorSettings" # Don't accept unknown kwargs expected_kwargs = [ @@ -18430,7 +18430,7 @@ def list_branding_settings(self, **kwargs): resource_path = "/admin/v1/BrandingSettings" method = "GET" operation_name = "list_branding_settings" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/BrandingSettings/ListBrandingSettings" # Don't accept unknown kwargs expected_kwargs = [ @@ -18577,7 +18577,7 @@ def list_cloud_gate_mappings(self, **kwargs): resource_path = "/admin/v1/CloudGateMappings" method = "GET" operation_name = "list_cloud_gate_mappings" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/CloudGateMappings/ListCloudGateMappings" # Don't accept unknown kwargs expected_kwargs = [ @@ -18741,7 +18741,7 @@ def list_cloud_gate_servers(self, **kwargs): resource_path = "/admin/v1/CloudGateServers" method = "GET" operation_name = "list_cloud_gate_servers" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/CloudGateServers/ListCloudGateServers" # Don't accept unknown kwargs expected_kwargs = [ @@ -18905,7 +18905,7 @@ def list_cloud_gates(self, **kwargs): resource_path = "/admin/v1/CloudGates" method = "GET" operation_name = "list_cloud_gates" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/CloudGates/ListCloudGates" # Don't accept unknown kwargs expected_kwargs = [ @@ -19069,7 +19069,7 @@ def list_conditions(self, **kwargs): resource_path = "/admin/v1/Conditions" method = "GET" operation_name = "list_conditions" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Conditions/ListConditions" # Don't accept unknown kwargs expected_kwargs = [ @@ -19233,7 +19233,7 @@ def list_customer_secret_keys(self, **kwargs): resource_path = "/admin/v1/CustomerSecretKeys" method = "GET" operation_name = "list_customer_secret_keys" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/CustomerSecretKeys/ListCustomerSecretKeys" # Don't accept unknown kwargs expected_kwargs = [ @@ -19397,7 +19397,7 @@ def list_dynamic_resource_groups(self, **kwargs): resource_path = "/admin/v1/DynamicResourceGroups" method = "GET" operation_name = "list_dynamic_resource_groups" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/DynamicResourceGroups/ListDynamicResourceGroups" # Don't accept unknown kwargs expected_kwargs = [ @@ -19561,7 +19561,7 @@ def list_grants(self, **kwargs): resource_path = "/admin/v1/Grants" method = "GET" operation_name = "list_grants" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Grants/ListGrants" # Don't accept unknown kwargs expected_kwargs = [ @@ -19725,7 +19725,7 @@ def list_groups(self, **kwargs): resource_path = "/admin/v1/Groups" method = "GET" operation_name = "list_groups" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Groups/ListGroups" # Don't accept unknown kwargs expected_kwargs = [ @@ -19889,7 +19889,7 @@ def list_identity_propagation_trusts(self, **kwargs): resource_path = "/admin/v1/IdentityPropagationTrusts" method = "GET" operation_name = "list_identity_propagation_trusts" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/IdentityPropagationTrusts/ListIdentityPropagationTrusts" # Don't accept unknown kwargs expected_kwargs = [ @@ -20053,7 +20053,7 @@ def list_identity_providers(self, **kwargs): resource_path = "/admin/v1/IdentityProviders" method = "GET" operation_name = "list_identity_providers" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/IdentityProviders/ListIdentityProviders" # Don't accept unknown kwargs expected_kwargs = [ @@ -20198,7 +20198,7 @@ def list_identity_settings(self, **kwargs): resource_path = "/admin/v1/IdentitySettings" method = "GET" operation_name = "list_identity_settings" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/IdentitySettings/ListIdentitySettings" # Don't accept unknown kwargs expected_kwargs = [ @@ -20326,7 +20326,7 @@ def list_kmsi_settings(self, **kwargs): resource_path = "/admin/v1/KmsiSettings" method = "GET" operation_name = "list_kmsi_settings" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/KmsiSettings/ListKmsiSettings" # Don't accept unknown kwargs expected_kwargs = [ @@ -20465,7 +20465,7 @@ def list_my_api_keys(self, **kwargs): resource_path = "/admin/v1/MyApiKeys" method = "GET" operation_name = "list_my_api_keys" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/MyApiKeys/ListMyApiKeys" # Don't accept unknown kwargs expected_kwargs = [ @@ -20609,7 +20609,7 @@ def list_my_apps(self, **kwargs): resource_path = "/admin/v1/MyApps" method = "GET" operation_name = "list_my_apps" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/MyApps/ListMyApps" # Don't accept unknown kwargs expected_kwargs = [ @@ -20753,7 +20753,7 @@ def list_my_auth_tokens(self, **kwargs): resource_path = "/admin/v1/MyAuthTokens" method = "GET" operation_name = "list_my_auth_tokens" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/MyAuthTokens/ListMyAuthTokens" # Don't accept unknown kwargs expected_kwargs = [ @@ -20897,7 +20897,7 @@ def list_my_completed_approvals(self, **kwargs): resource_path = "/admin/v1/MyCompletedApprovals" method = "GET" operation_name = "list_my_completed_approvals" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/MyCompletedApprovals/ListMyCompletedApprovals" # Don't accept unknown kwargs expected_kwargs = [ @@ -21041,7 +21041,7 @@ def list_my_customer_secret_keys(self, **kwargs): resource_path = "/admin/v1/MyCustomerSecretKeys" method = "GET" operation_name = "list_my_customer_secret_keys" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/MyCustomerSecretKeys/ListMyCustomerSecretKeys" # Don't accept unknown kwargs expected_kwargs = [ @@ -21193,7 +21193,7 @@ def list_my_devices(self, **kwargs): resource_path = "/admin/v1/MyDevices" method = "GET" operation_name = "list_my_devices" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/MyDevices/ListMyDevices" # Don't accept unknown kwargs expected_kwargs = [ @@ -21357,7 +21357,7 @@ def list_my_groups(self, **kwargs): resource_path = "/admin/v1/MyGroups" method = "GET" operation_name = "list_my_groups" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/MyGroups/ListMyGroups" # Don't accept unknown kwargs expected_kwargs = [ @@ -21513,7 +21513,7 @@ def list_my_o_auth2_client_credentials(self, **kwargs): resource_path = "/admin/v1/MyOAuth2ClientCredentials" method = "GET" operation_name = "list_my_o_auth2_client_credentials" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/MyOAuth2ClientCredentials/ListMyOAuth2ClientCredentials" # Don't accept unknown kwargs expected_kwargs = [ @@ -21657,7 +21657,7 @@ def list_my_pending_approvals(self, **kwargs): resource_path = "/admin/v1/MyPendingApprovals" method = "GET" operation_name = "list_my_pending_approvals" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/MyPendingApprovals/ListMyPendingApprovals" # Don't accept unknown kwargs expected_kwargs = [ @@ -21801,7 +21801,7 @@ def list_my_requestable_groups(self, **kwargs): resource_path = "/admin/v1/MyRequestableGroups" method = "GET" operation_name = "list_my_requestable_groups" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/MyRequestableGroups/ListMyRequestableGroups" # Don't accept unknown kwargs expected_kwargs = [ @@ -21953,7 +21953,7 @@ def list_my_requests(self, **kwargs): resource_path = "/admin/v1/MyRequests" method = "GET" operation_name = "list_my_requests" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/MyRequests/ListMyRequests" # Don't accept unknown kwargs expected_kwargs = [ @@ -22109,7 +22109,7 @@ def list_my_smtp_credentials(self, **kwargs): resource_path = "/admin/v1/MySmtpCredentials" method = "GET" operation_name = "list_my_smtp_credentials" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/MySmtpCredentials/ListMySmtpCredentials" # Don't accept unknown kwargs expected_kwargs = [ @@ -22253,7 +22253,7 @@ def list_my_support_accounts(self, **kwargs): resource_path = "/admin/v1/MySupportAccounts" method = "GET" operation_name = "list_my_support_accounts" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/MySupportAccounts/ListMySupportAccounts" # Don't accept unknown kwargs expected_kwargs = [ @@ -22405,7 +22405,7 @@ def list_my_trusted_user_agents(self, **kwargs): resource_path = "/admin/v1/MyTrustedUserAgents" method = "GET" operation_name = "list_my_trusted_user_agents" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/MyTrustedUserAgents/ListMyTrustedUserAgents" # Don't accept unknown kwargs expected_kwargs = [ @@ -22561,7 +22561,7 @@ def list_my_user_db_credentials(self, **kwargs): resource_path = "/admin/v1/MyUserDbCredentials" method = "GET" operation_name = "list_my_user_db_credentials" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/MyUserDbCredentials/ListMyUserDbCredentials" # Don't accept unknown kwargs expected_kwargs = [ @@ -22713,7 +22713,7 @@ def list_network_perimeters(self, **kwargs): resource_path = "/admin/v1/NetworkPerimeters" method = "GET" operation_name = "list_network_perimeters" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/NetworkPerimeters/ListNetworkPerimeters" # Don't accept unknown kwargs expected_kwargs = [ @@ -22858,7 +22858,7 @@ def list_notification_settings(self, **kwargs): resource_path = "/admin/v1/NotificationSettings" method = "GET" operation_name = "list_notification_settings" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/NotificationSettings/ListNotificationSettings" # Don't accept unknown kwargs expected_kwargs = [ @@ -23005,7 +23005,7 @@ def list_o_auth2_client_credentials(self, **kwargs): resource_path = "/admin/v1/OAuth2ClientCredentials" method = "GET" operation_name = "list_o_auth2_client_credentials" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/OAuth2ClientCredentials/ListOAuth2ClientCredentials" # Don't accept unknown kwargs expected_kwargs = [ @@ -23161,7 +23161,7 @@ def list_o_auth_client_certificates(self, **kwargs): resource_path = "/admin/v1/OAuthClientCertificates" method = "GET" operation_name = "list_o_auth_client_certificates" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/OAuthClientCertificates/ListOAuthClientCertificates" # Don't accept unknown kwargs expected_kwargs = [ @@ -23305,7 +23305,7 @@ def list_o_auth_partner_certificates(self, **kwargs): resource_path = "/admin/v1/OAuthPartnerCertificates" method = "GET" operation_name = "list_o_auth_partner_certificates" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/OAuthPartnerCertificates/ListOAuthPartnerCertificates" # Don't accept unknown kwargs expected_kwargs = [ @@ -23457,7 +23457,7 @@ def list_password_policies(self, **kwargs): resource_path = "/admin/v1/PasswordPolicies" method = "GET" operation_name = "list_password_policies" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/PasswordPolicies/ListPasswordPolicies" # Don't accept unknown kwargs expected_kwargs = [ @@ -23621,7 +23621,7 @@ def list_policies(self, **kwargs): resource_path = "/admin/v1/Policies" method = "GET" operation_name = "list_policies" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Policies/ListPolicies" # Don't accept unknown kwargs expected_kwargs = [ @@ -23785,7 +23785,7 @@ def list_resource_type_schema_attributes(self, **kwargs): resource_path = "/admin/v1/ResourceTypeSchemaAttributes" method = "GET" operation_name = "list_resource_type_schema_attributes" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/ResourceTypeSchemaAttributes/ListResourceTypeSchemaAttributes" # Don't accept unknown kwargs expected_kwargs = [ @@ -23949,7 +23949,7 @@ def list_rules(self, **kwargs): resource_path = "/admin/v1/Rules" method = "GET" operation_name = "list_rules" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Rules/ListRules" # Don't accept unknown kwargs expected_kwargs = [ @@ -24102,7 +24102,7 @@ def list_schemas(self, **kwargs): resource_path = "/admin/v1/Schemas" method = "GET" operation_name = "list_schemas" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Schemas/ListSchemas" # Don't accept unknown kwargs expected_kwargs = [ @@ -24233,7 +24233,7 @@ def list_security_question_settings(self, **kwargs): resource_path = "/admin/v1/SecurityQuestionSettings" method = "GET" operation_name = "list_security_question_settings" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/SecurityQuestionSettings/ListSecurityQuestionSettings" # Don't accept unknown kwargs expected_kwargs = [ @@ -24380,7 +24380,7 @@ def list_security_questions(self, **kwargs): resource_path = "/admin/v1/SecurityQuestions" method = "GET" operation_name = "list_security_questions" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/SecurityQuestions/ListSecurityQuestions" # Don't accept unknown kwargs expected_kwargs = [ @@ -24544,7 +24544,7 @@ def list_self_registration_profiles(self, **kwargs): resource_path = "/admin/v1/SelfRegistrationProfiles" method = "GET" operation_name = "list_self_registration_profiles" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/SelfRegistrationProfiles/ListSelfRegistrationProfiles" # Don't accept unknown kwargs expected_kwargs = [ @@ -24689,7 +24689,7 @@ def list_settings(self, **kwargs): resource_path = "/admin/v1/Settings" method = "GET" operation_name = "list_settings" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Settings/ListSettings" # Don't accept unknown kwargs expected_kwargs = [ @@ -24836,7 +24836,7 @@ def list_smtp_credentials(self, **kwargs): resource_path = "/admin/v1/SmtpCredentials" method = "GET" operation_name = "list_smtp_credentials" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/SmtpCredentials/ListSmtpCredentials" # Don't accept unknown kwargs expected_kwargs = [ @@ -24981,7 +24981,7 @@ def list_user_attributes_settings(self, **kwargs): resource_path = "/admin/v1/UserAttributesSettings" method = "GET" operation_name = "list_user_attributes_settings" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/UserAttributesSettings/ListUserAttributesSettings" # Don't accept unknown kwargs expected_kwargs = [ @@ -25128,7 +25128,7 @@ def list_user_db_credentials(self, **kwargs): resource_path = "/admin/v1/UserDbCredentials" method = "GET" operation_name = "list_user_db_credentials" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/UserDbCredentials/ListUserDbCredentials" # Don't accept unknown kwargs expected_kwargs = [ @@ -25292,7 +25292,7 @@ def list_users(self, **kwargs): resource_path = "/admin/v1/Users" method = "GET" operation_name = "list_users" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Users/ListUsers" # Don't accept unknown kwargs expected_kwargs = [ @@ -25452,7 +25452,7 @@ def patch_account_recovery_setting(self, account_recovery_setting_id, **kwargs): resource_path = "/admin/v1/AccountRecoverySettings/{accountRecoverySettingId}" method = "PATCH" operation_name = "patch_account_recovery_setting" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/AccountRecoverySetting/PatchAccountRecoverySetting" # Don't accept unknown kwargs expected_kwargs = [ @@ -25608,7 +25608,7 @@ def patch_api_key(self, api_key_id, **kwargs): resource_path = "/admin/v1/ApiKeys/{apiKeyId}" method = "PATCH" operation_name = "patch_api_key" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/ApiKey/PatchApiKey" # Don't accept unknown kwargs expected_kwargs = [ @@ -25764,7 +25764,7 @@ def patch_app(self, app_id, **kwargs): resource_path = "/admin/v1/Apps/{appId}" method = "PATCH" operation_name = "patch_app" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/App/PatchApp" # Don't accept unknown kwargs expected_kwargs = [ @@ -25920,7 +25920,7 @@ def patch_app_role(self, app_role_id, **kwargs): resource_path = "/admin/v1/AppRoles/{appRoleId}" method = "PATCH" operation_name = "patch_app_role" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/AppRole/PatchAppRole" # Don't accept unknown kwargs expected_kwargs = [ @@ -26076,7 +26076,7 @@ def patch_approval_workflow(self, approval_workflow_id, **kwargs): resource_path = "/admin/v1/ApprovalWorkflows/{approvalWorkflowId}" method = "PATCH" operation_name = "patch_approval_workflow" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/ApprovalWorkflow/PatchApprovalWorkflow" # Don't accept unknown kwargs expected_kwargs = [ @@ -26232,7 +26232,7 @@ def patch_approval_workflow_step(self, approval_workflow_step_id, **kwargs): resource_path = "/admin/v1/ApprovalWorkflowSteps/{approvalWorkflowStepId}" method = "PATCH" operation_name = "patch_approval_workflow_step" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/ApprovalWorkflowStep/PatchApprovalWorkflowStep" # Don't accept unknown kwargs expected_kwargs = [ @@ -26388,7 +26388,7 @@ def patch_auth_token(self, auth_token_id, **kwargs): resource_path = "/admin/v1/AuthTokens/{authTokenId}" method = "PATCH" operation_name = "patch_auth_token" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/AuthToken/PatchAuthToken" # Don't accept unknown kwargs expected_kwargs = [ @@ -26544,7 +26544,7 @@ def patch_cloud_gate(self, cloud_gate_id, **kwargs): resource_path = "/admin/v1/CloudGates/{cloudGateId}" method = "PATCH" operation_name = "patch_cloud_gate" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/CloudGate/PatchCloudGate" # Don't accept unknown kwargs expected_kwargs = [ @@ -26700,7 +26700,7 @@ def patch_cloud_gate_mapping(self, cloud_gate_mapping_id, **kwargs): resource_path = "/admin/v1/CloudGateMappings/{cloudGateMappingId}" method = "PATCH" operation_name = "patch_cloud_gate_mapping" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/CloudGateMapping/PatchCloudGateMapping" # Don't accept unknown kwargs expected_kwargs = [ @@ -26856,7 +26856,7 @@ def patch_cloud_gate_server(self, cloud_gate_server_id, **kwargs): resource_path = "/admin/v1/CloudGateServers/{cloudGateServerId}" method = "PATCH" operation_name = "patch_cloud_gate_server" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/CloudGateServer/PatchCloudGateServer" # Don't accept unknown kwargs expected_kwargs = [ @@ -27012,7 +27012,7 @@ def patch_condition(self, condition_id, **kwargs): resource_path = "/admin/v1/Conditions/{conditionId}" method = "PATCH" operation_name = "patch_condition" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Condition/PatchCondition" # Don't accept unknown kwargs expected_kwargs = [ @@ -27168,7 +27168,7 @@ def patch_customer_secret_key(self, customer_secret_key_id, **kwargs): resource_path = "/admin/v1/CustomerSecretKeys/{customerSecretKeyId}" method = "PATCH" operation_name = "patch_customer_secret_key" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/CustomerSecretKey/PatchCustomerSecretKey" # Don't accept unknown kwargs expected_kwargs = [ @@ -27324,7 +27324,7 @@ def patch_dynamic_resource_group(self, dynamic_resource_group_id, **kwargs): resource_path = "/admin/v1/DynamicResourceGroups/{dynamicResourceGroupId}" method = "PATCH" operation_name = "patch_dynamic_resource_group" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/DynamicResourceGroup/PatchDynamicResourceGroup" # Don't accept unknown kwargs expected_kwargs = [ @@ -27480,7 +27480,7 @@ def patch_grant(self, grant_id, **kwargs): resource_path = "/admin/v1/Grants/{grantId}" method = "PATCH" operation_name = "patch_grant" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Grant/PatchGrant" # Don't accept unknown kwargs expected_kwargs = [ @@ -27636,7 +27636,7 @@ def patch_group(self, group_id, **kwargs): resource_path = "/admin/v1/Groups/{groupId}" method = "PATCH" operation_name = "patch_group" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Group/PatchGroup" # Don't accept unknown kwargs expected_kwargs = [ @@ -27794,7 +27794,7 @@ def patch_identity_propagation_trust(self, identity_propagation_trust_id, **kwar resource_path = "/admin/v1/IdentityPropagationTrusts/{identityPropagationTrustId}" method = "PATCH" operation_name = "patch_identity_propagation_trust" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/IdentityPropagationTrust/PatchIdentityPropagationTrust" # Don't accept unknown kwargs expected_kwargs = [ @@ -27950,7 +27950,7 @@ def patch_identity_provider(self, identity_provider_id, **kwargs): resource_path = "/admin/v1/IdentityProviders/{identityProviderId}" method = "PATCH" operation_name = "patch_identity_provider" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/IdentityProvider/PatchIdentityProvider" # Don't accept unknown kwargs expected_kwargs = [ @@ -28106,7 +28106,7 @@ def patch_identity_setting(self, identity_setting_id, **kwargs): resource_path = "/admin/v1/IdentitySettings/{identitySettingId}" method = "PATCH" operation_name = "patch_identity_setting" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/IdentitySetting/PatchIdentitySetting" # Don't accept unknown kwargs expected_kwargs = [ @@ -28262,7 +28262,7 @@ def patch_kmsi_setting(self, kmsi_setting_id, **kwargs): resource_path = "/admin/v1/KmsiSettings/{kmsiSettingId}" method = "PATCH" operation_name = "patch_kmsi_setting" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/KmsiSetting/PatchKmsiSetting" # Don't accept unknown kwargs expected_kwargs = [ @@ -28415,7 +28415,7 @@ def patch_me(self, **kwargs): resource_path = "/admin/v1/Me" method = "PATCH" operation_name = "patch_me" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Me/PatchMe" # Don't accept unknown kwargs expected_kwargs = [ @@ -28551,7 +28551,7 @@ def patch_my_api_key(self, my_api_key_id, **kwargs): resource_path = "/admin/v1/MyApiKeys/{myApiKeyId}" method = "PATCH" operation_name = "patch_my_api_key" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/MyApiKey/PatchMyApiKey" # Don't accept unknown kwargs expected_kwargs = [ @@ -28681,7 +28681,7 @@ def patch_my_auth_token(self, my_auth_token_id, **kwargs): resource_path = "/admin/v1/MyAuthTokens/{myAuthTokenId}" method = "PATCH" operation_name = "patch_my_auth_token" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/MyAuthToken/PatchMyAuthToken" # Don't accept unknown kwargs expected_kwargs = [ @@ -28811,7 +28811,7 @@ def patch_my_customer_secret_key(self, my_customer_secret_key_id, **kwargs): resource_path = "/admin/v1/MyCustomerSecretKeys/{myCustomerSecretKeyId}" method = "PATCH" operation_name = "patch_my_customer_secret_key" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/MyCustomerSecretKey/PatchMyCustomerSecretKey" # Don't accept unknown kwargs expected_kwargs = [ @@ -28949,7 +28949,7 @@ def patch_my_device(self, my_device_id, **kwargs): resource_path = "/admin/v1/MyDevices/{myDeviceId}" method = "PATCH" operation_name = "patch_my_device" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/MyDevice/PatchMyDevice" # Don't accept unknown kwargs expected_kwargs = [ @@ -29097,7 +29097,7 @@ def patch_my_o_auth2_client_credential(self, my_o_auth2_client_credential_id, ** resource_path = "/admin/v1/MyOAuth2ClientCredentials/{myOAuth2ClientCredentialId}" method = "PATCH" operation_name = "patch_my_o_auth2_client_credential" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/MyOAuth2ClientCredential/PatchMyOAuth2ClientCredential" # Don't accept unknown kwargs expected_kwargs = [ @@ -29227,7 +29227,7 @@ def patch_my_pending_approval(self, my_pending_approval_id, **kwargs): resource_path = "/admin/v1/MyPendingApprovals/{myPendingApprovalId}" method = "PATCH" operation_name = "patch_my_pending_approval" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/MyPendingApproval/PatchMyPendingApproval" # Don't accept unknown kwargs expected_kwargs = [ @@ -29365,7 +29365,7 @@ def patch_my_request(self, my_request_id, **kwargs): resource_path = "/admin/v1/MyRequests/{myRequestId}" method = "PATCH" operation_name = "patch_my_request" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/MyRequest/PatchMyRequest" # Don't accept unknown kwargs expected_kwargs = [ @@ -29513,7 +29513,7 @@ def patch_my_smtp_credential(self, my_smtp_credential_id, **kwargs): resource_path = "/admin/v1/MySmtpCredentials/{mySmtpCredentialId}" method = "PATCH" operation_name = "patch_my_smtp_credential" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/MySmtpCredential/PatchMySmtpCredential" # Don't accept unknown kwargs expected_kwargs = [ @@ -29651,7 +29651,7 @@ def patch_network_perimeter(self, network_perimeter_id, **kwargs): resource_path = "/admin/v1/NetworkPerimeters/{networkPerimeterId}" method = "PATCH" operation_name = "patch_network_perimeter" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/NetworkPerimeter/PatchNetworkPerimeter" # Don't accept unknown kwargs expected_kwargs = [ @@ -29807,7 +29807,7 @@ def patch_o_auth2_client_credential(self, o_auth2_client_credential_id, **kwargs resource_path = "/admin/v1/OAuth2ClientCredentials/{oAuth2ClientCredentialId}" method = "PATCH" operation_name = "patch_o_auth2_client_credential" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/OAuth2ClientCredential/PatchOAuth2ClientCredential" # Don't accept unknown kwargs expected_kwargs = [ @@ -29963,7 +29963,7 @@ def patch_password_policy(self, password_policy_id, **kwargs): resource_path = "/admin/v1/PasswordPolicies/{passwordPolicyId}" method = "PATCH" operation_name = "patch_password_policy" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/PasswordPolicy/PatchPasswordPolicy" # Don't accept unknown kwargs expected_kwargs = [ @@ -30119,7 +30119,7 @@ def patch_policy(self, policy_id, **kwargs): resource_path = "/admin/v1/Policies/{policyId}" method = "PATCH" operation_name = "patch_policy" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Policy/PatchPolicy" # Don't accept unknown kwargs expected_kwargs = [ @@ -30275,7 +30275,7 @@ def patch_rule(self, rule_id, **kwargs): resource_path = "/admin/v1/Rules/{ruleId}" method = "PATCH" operation_name = "patch_rule" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Rule/PatchRule" # Don't accept unknown kwargs expected_kwargs = [ @@ -30423,7 +30423,7 @@ def patch_schema(self, schema_id, **kwargs): resource_path = "/admin/v1/Schemas/{schemaId}" method = "PATCH" operation_name = "patch_schema" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Schema/PatchSchema" # Don't accept unknown kwargs expected_kwargs = [ @@ -30561,7 +30561,7 @@ def patch_security_question(self, security_question_id, **kwargs): resource_path = "/admin/v1/SecurityQuestions/{securityQuestionId}" method = "PATCH" operation_name = "patch_security_question" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/SecurityQuestion/PatchSecurityQuestion" # Don't accept unknown kwargs expected_kwargs = [ @@ -30717,7 +30717,7 @@ def patch_security_question_setting(self, security_question_setting_id, **kwargs resource_path = "/admin/v1/SecurityQuestionSettings/{securityQuestionSettingId}" method = "PATCH" operation_name = "patch_security_question_setting" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/SecurityQuestionSetting/PatchSecurityQuestionSetting" # Don't accept unknown kwargs expected_kwargs = [ @@ -30873,7 +30873,7 @@ def patch_self_registration_profile(self, self_registration_profile_id, **kwargs resource_path = "/admin/v1/SelfRegistrationProfiles/{selfRegistrationProfileId}" method = "PATCH" operation_name = "patch_self_registration_profile" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/SelfRegistrationProfile/PatchSelfRegistrationProfile" # Don't accept unknown kwargs expected_kwargs = [ @@ -31029,7 +31029,7 @@ def patch_setting(self, setting_id, **kwargs): resource_path = "/admin/v1/Settings/{settingId}" method = "PATCH" operation_name = "patch_setting" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Setting/PatchSetting" # Don't accept unknown kwargs expected_kwargs = [ @@ -31185,7 +31185,7 @@ def patch_smtp_credential(self, smtp_credential_id, **kwargs): resource_path = "/admin/v1/SmtpCredentials/{smtpCredentialId}" method = "PATCH" operation_name = "patch_smtp_credential" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/SmtpCredential/PatchSmtpCredential" # Don't accept unknown kwargs expected_kwargs = [ @@ -31341,7 +31341,7 @@ def patch_user(self, user_id, **kwargs): resource_path = "/admin/v1/Users/{userId}" method = "PATCH" operation_name = "patch_user" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/User/PatchUser" # Don't accept unknown kwargs expected_kwargs = [ @@ -31497,7 +31497,7 @@ def patch_user_attributes_setting(self, user_attributes_setting_id, **kwargs): resource_path = "/admin/v1/UserAttributesSettings/{userAttributesSettingId}" method = "PATCH" operation_name = "patch_user_attributes_setting" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/UserAttributesSetting/PatchUserAttributesSetting" # Don't accept unknown kwargs expected_kwargs = [ @@ -31653,7 +31653,7 @@ def put_account_recovery_setting(self, account_recovery_setting_id, **kwargs): resource_path = "/admin/v1/AccountRecoverySettings/{accountRecoverySettingId}" method = "PUT" operation_name = "put_account_recovery_setting" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/AccountRecoverySetting/PutAccountRecoverySetting" # Don't accept unknown kwargs expected_kwargs = [ @@ -31809,7 +31809,7 @@ def put_app(self, app_id, **kwargs): resource_path = "/admin/v1/Apps/{appId}" method = "PUT" operation_name = "put_app" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/App/PutApp" # Don't accept unknown kwargs expected_kwargs = [ @@ -31965,7 +31965,7 @@ def put_app_status_changer(self, app_status_changer_id, **kwargs): resource_path = "/admin/v1/AppStatusChanger/{appStatusChangerId}" method = "PUT" operation_name = "put_app_status_changer" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/AppStatusChanger/PutAppStatusChanger" # Don't accept unknown kwargs expected_kwargs = [ @@ -32121,7 +32121,7 @@ def put_approval_workflow(self, approval_workflow_id, **kwargs): resource_path = "/admin/v1/ApprovalWorkflows/{approvalWorkflowId}" method = "PUT" operation_name = "put_approval_workflow" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/ApprovalWorkflow/PutApprovalWorkflow" # Don't accept unknown kwargs expected_kwargs = [ @@ -32277,7 +32277,7 @@ def put_authentication_factor_setting(self, authentication_factor_setting_id, ** resource_path = "/admin/v1/AuthenticationFactorSettings/{authenticationFactorSettingId}" method = "PUT" operation_name = "put_authentication_factor_setting" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/AuthenticationFactorSetting/PutAuthenticationFactorSetting" # Don't accept unknown kwargs expected_kwargs = [ @@ -32433,7 +32433,7 @@ def put_cloud_gate(self, cloud_gate_id, **kwargs): resource_path = "/admin/v1/CloudGates/{cloudGateId}" method = "PUT" operation_name = "put_cloud_gate" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/CloudGate/PutCloudGate" # Don't accept unknown kwargs expected_kwargs = [ @@ -32589,7 +32589,7 @@ def put_cloud_gate_mapping(self, cloud_gate_mapping_id, **kwargs): resource_path = "/admin/v1/CloudGateMappings/{cloudGateMappingId}" method = "PUT" operation_name = "put_cloud_gate_mapping" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/CloudGateMapping/PutCloudGateMapping" # Don't accept unknown kwargs expected_kwargs = [ @@ -32745,7 +32745,7 @@ def put_cloud_gate_server(self, cloud_gate_server_id, **kwargs): resource_path = "/admin/v1/CloudGateServers/{cloudGateServerId}" method = "PUT" operation_name = "put_cloud_gate_server" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/CloudGateServer/PutCloudGateServer" # Don't accept unknown kwargs expected_kwargs = [ @@ -32901,7 +32901,7 @@ def put_condition(self, condition_id, **kwargs): resource_path = "/admin/v1/Conditions/{conditionId}" method = "PUT" operation_name = "put_condition" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Condition/PutCondition" # Don't accept unknown kwargs expected_kwargs = [ @@ -33057,7 +33057,7 @@ def put_dynamic_resource_group(self, dynamic_resource_group_id, **kwargs): resource_path = "/admin/v1/DynamicResourceGroups/{dynamicResourceGroupId}" method = "PUT" operation_name = "put_dynamic_resource_group" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/DynamicResourceGroup/PutDynamicResourceGroup" # Don't accept unknown kwargs expected_kwargs = [ @@ -33213,7 +33213,7 @@ def put_group(self, group_id, **kwargs): resource_path = "/admin/v1/Groups/{groupId}" method = "PUT" operation_name = "put_group" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Group/PutGroup" # Don't accept unknown kwargs expected_kwargs = [ @@ -33371,7 +33371,7 @@ def put_identity_propagation_trust(self, identity_propagation_trust_id, **kwargs resource_path = "/admin/v1/IdentityPropagationTrusts/{identityPropagationTrustId}" method = "PUT" operation_name = "put_identity_propagation_trust" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/IdentityPropagationTrust/PutIdentityPropagationTrust" # Don't accept unknown kwargs expected_kwargs = [ @@ -33527,7 +33527,7 @@ def put_identity_provider(self, identity_provider_id, **kwargs): resource_path = "/admin/v1/IdentityProviders/{identityProviderId}" method = "PUT" operation_name = "put_identity_provider" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/IdentityProvider/PutIdentityProvider" # Don't accept unknown kwargs expected_kwargs = [ @@ -33683,7 +33683,7 @@ def put_identity_setting(self, identity_setting_id, **kwargs): resource_path = "/admin/v1/IdentitySettings/{identitySettingId}" method = "PUT" operation_name = "put_identity_setting" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/IdentitySetting/PutIdentitySetting" # Don't accept unknown kwargs expected_kwargs = [ @@ -33839,7 +33839,7 @@ def put_kmsi_setting(self, kmsi_setting_id, **kwargs): resource_path = "/admin/v1/KmsiSettings/{kmsiSettingId}" method = "PUT" operation_name = "put_kmsi_setting" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/KmsiSetting/PutKmsiSetting" # Don't accept unknown kwargs expected_kwargs = [ @@ -33992,7 +33992,7 @@ def put_me(self, **kwargs): resource_path = "/admin/v1/Me" method = "PUT" operation_name = "put_me" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Me/PutMe" # Don't accept unknown kwargs expected_kwargs = [ @@ -34125,7 +34125,7 @@ def put_me_password_changer(self, **kwargs): resource_path = "/admin/v1/MePasswordChanger" method = "PUT" operation_name = "put_me_password_changer" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/MePasswordChanger/PutMePasswordChanger" # Don't accept unknown kwargs expected_kwargs = [ @@ -34251,7 +34251,7 @@ def put_network_perimeter(self, network_perimeter_id, **kwargs): resource_path = "/admin/v1/NetworkPerimeters/{networkPerimeterId}" method = "PUT" operation_name = "put_network_perimeter" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/NetworkPerimeter/PutNetworkPerimeter" # Don't accept unknown kwargs expected_kwargs = [ @@ -34407,7 +34407,7 @@ def put_notification_setting(self, notification_setting_id, **kwargs): resource_path = "/admin/v1/NotificationSettings/{notificationSettingId}" method = "PUT" operation_name = "put_notification_setting" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/NotificationSetting/PutNotificationSetting" # Don't accept unknown kwargs expected_kwargs = [ @@ -34563,7 +34563,7 @@ def put_password_policy(self, password_policy_id, **kwargs): resource_path = "/admin/v1/PasswordPolicies/{passwordPolicyId}" method = "PUT" operation_name = "put_password_policy" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/PasswordPolicy/PutPasswordPolicy" # Don't accept unknown kwargs expected_kwargs = [ @@ -34719,7 +34719,7 @@ def put_policy(self, policy_id, **kwargs): resource_path = "/admin/v1/Policies/{policyId}" method = "PUT" operation_name = "put_policy" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Policy/PutPolicy" # Don't accept unknown kwargs expected_kwargs = [ @@ -34875,7 +34875,7 @@ def put_rule(self, rule_id, **kwargs): resource_path = "/admin/v1/Rules/{ruleId}" method = "PUT" operation_name = "put_rule" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Rule/PutRule" # Don't accept unknown kwargs expected_kwargs = [ @@ -35023,7 +35023,7 @@ def put_schema(self, schema_id, **kwargs): resource_path = "/admin/v1/Schemas/{schemaId}" method = "PUT" operation_name = "put_schema" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Schema/PutSchema" # Don't accept unknown kwargs expected_kwargs = [ @@ -35161,7 +35161,7 @@ def put_security_question_setting(self, security_question_setting_id, **kwargs): resource_path = "/admin/v1/SecurityQuestionSettings/{securityQuestionSettingId}" method = "PUT" operation_name = "put_security_question_setting" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/SecurityQuestionSetting/PutSecurityQuestionSetting" # Don't accept unknown kwargs expected_kwargs = [ @@ -35317,7 +35317,7 @@ def put_self_registration_profile(self, self_registration_profile_id, **kwargs): resource_path = "/admin/v1/SelfRegistrationProfiles/{selfRegistrationProfileId}" method = "PUT" operation_name = "put_self_registration_profile" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/SelfRegistrationProfile/PutSelfRegistrationProfile" # Don't accept unknown kwargs expected_kwargs = [ @@ -35473,7 +35473,7 @@ def put_setting(self, setting_id, **kwargs): resource_path = "/admin/v1/Settings/{settingId}" method = "PUT" operation_name = "put_setting" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Setting/PutSetting" # Don't accept unknown kwargs expected_kwargs = [ @@ -35629,7 +35629,7 @@ def put_user(self, user_id, **kwargs): resource_path = "/admin/v1/Users/{userId}" method = "PUT" operation_name = "put_user" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/User/PutUser" # Don't accept unknown kwargs expected_kwargs = [ @@ -35777,7 +35777,7 @@ def put_user_capabilities_changer(self, user_capabilities_changer_id, **kwargs): resource_path = "/admin/v1/UserCapabilitiesChanger/{userCapabilitiesChangerId}" method = "PUT" operation_name = "put_user_capabilities_changer" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/UserCapabilitiesChanger/PutUserCapabilitiesChanger" # Don't accept unknown kwargs expected_kwargs = [ @@ -35907,7 +35907,7 @@ def put_user_password_changer(self, user_password_changer_id, **kwargs): resource_path = "/admin/v1/UserPasswordChanger/{userPasswordChangerId}" method = "PUT" operation_name = "put_user_password_changer" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/UserPasswordChanger/PutUserPasswordChanger" # Don't accept unknown kwargs expected_kwargs = [ @@ -36037,7 +36037,7 @@ def put_user_password_resetter(self, user_password_resetter_id, **kwargs): resource_path = "/admin/v1/UserPasswordResetter/{userPasswordResetterId}" method = "PUT" operation_name = "put_user_password_resetter" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/UserPasswordResetter/PutUserPasswordResetter" # Don't accept unknown kwargs expected_kwargs = [ @@ -36175,7 +36175,7 @@ def put_user_status_changer(self, user_status_changer_id, **kwargs): resource_path = "/admin/v1/UserStatusChanger/{userStatusChangerId}" method = "PUT" operation_name = "put_user_status_changer" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/UserStatusChanger/PutUserStatusChanger" # Don't accept unknown kwargs expected_kwargs = [ @@ -36311,7 +36311,7 @@ def search_account_mgmt_infos(self, **kwargs): resource_path = "/admin/v1/AccountMgmtInfos/.search" method = "POST" operation_name = "search_account_mgmt_infos" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/AccountMgmtInfos/SearchAccountMgmtInfos" # Don't accept unknown kwargs expected_kwargs = [ @@ -36425,7 +36425,7 @@ def search_api_keys(self, **kwargs): resource_path = "/admin/v1/ApiKeys/.search" method = "POST" operation_name = "search_api_keys" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/ApiKeys/SearchApiKeys" # Don't accept unknown kwargs expected_kwargs = [ @@ -36539,7 +36539,7 @@ def search_app_roles(self, **kwargs): resource_path = "/admin/v1/AppRoles/.search" method = "POST" operation_name = "search_app_roles" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/AppRoles/SearchAppRoles" # Don't accept unknown kwargs expected_kwargs = [ @@ -36653,7 +36653,7 @@ def search_apps(self, **kwargs): resource_path = "/admin/v1/Apps/.search" method = "POST" operation_name = "search_apps" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Apps/SearchApps" # Don't accept unknown kwargs expected_kwargs = [ @@ -36767,7 +36767,7 @@ def search_auth_tokens(self, **kwargs): resource_path = "/admin/v1/AuthTokens/.search" method = "POST" operation_name = "search_auth_tokens" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/AuthTokens/SearchAuthTokens" # Don't accept unknown kwargs expected_kwargs = [ @@ -36881,7 +36881,7 @@ def search_authentication_factor_settings(self, **kwargs): resource_path = "/admin/v1/AuthenticationFactorSettings/.search" method = "POST" operation_name = "search_authentication_factor_settings" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/AuthenticationFactorSettings/SearchAuthenticationFactorSettings" # Don't accept unknown kwargs expected_kwargs = [ @@ -36995,7 +36995,7 @@ def search_cloud_gate_mappings(self, **kwargs): resource_path = "/admin/v1/CloudGateMappings/.search" method = "POST" operation_name = "search_cloud_gate_mappings" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/CloudGateMappings/SearchCloudGateMappings" # Don't accept unknown kwargs expected_kwargs = [ @@ -37109,7 +37109,7 @@ def search_cloud_gate_servers(self, **kwargs): resource_path = "/admin/v1/CloudGateServers/.search" method = "POST" operation_name = "search_cloud_gate_servers" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/CloudGateServers/SearchCloudGateServers" # Don't accept unknown kwargs expected_kwargs = [ @@ -37223,7 +37223,7 @@ def search_cloud_gates(self, **kwargs): resource_path = "/admin/v1/CloudGates/.search" method = "POST" operation_name = "search_cloud_gates" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/CloudGates/SearchCloudGates" # Don't accept unknown kwargs expected_kwargs = [ @@ -37337,7 +37337,7 @@ def search_conditions(self, **kwargs): resource_path = "/admin/v1/Conditions/.search" method = "POST" operation_name = "search_conditions" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Conditions/SearchConditions" # Don't accept unknown kwargs expected_kwargs = [ @@ -37451,7 +37451,7 @@ def search_customer_secret_keys(self, **kwargs): resource_path = "/admin/v1/CustomerSecretKeys/.search" method = "POST" operation_name = "search_customer_secret_keys" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/CustomerSecretKeys/SearchCustomerSecretKeys" # Don't accept unknown kwargs expected_kwargs = [ @@ -37565,7 +37565,7 @@ def search_dynamic_resource_groups(self, **kwargs): resource_path = "/admin/v1/DynamicResourceGroups/.search" method = "POST" operation_name = "search_dynamic_resource_groups" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/DynamicResourceGroups/SearchDynamicResourceGroups" # Don't accept unknown kwargs expected_kwargs = [ @@ -37679,7 +37679,7 @@ def search_grants(self, **kwargs): resource_path = "/admin/v1/Grants/.search" method = "POST" operation_name = "search_grants" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Grants/SearchGrants" # Don't accept unknown kwargs expected_kwargs = [ @@ -37793,7 +37793,7 @@ def search_groups(self, **kwargs): resource_path = "/admin/v1/Groups/.search" method = "POST" operation_name = "search_groups" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Groups/SearchGroups" # Don't accept unknown kwargs expected_kwargs = [ @@ -37907,7 +37907,7 @@ def search_identity_providers(self, **kwargs): resource_path = "/admin/v1/IdentityProviders/.search" method = "POST" operation_name = "search_identity_providers" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/IdentityProviders/SearchIdentityProviders" # Don't accept unknown kwargs expected_kwargs = [ @@ -38021,7 +38021,7 @@ def search_identity_settings(self, **kwargs): resource_path = "/admin/v1/IdentitySettings/.search" method = "POST" operation_name = "search_identity_settings" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/IdentitySettings/SearchIdentitySettings" # Don't accept unknown kwargs expected_kwargs = [ @@ -38135,7 +38135,7 @@ def search_kmsi_settings(self, **kwargs): resource_path = "/admin/v1/KmsiSettings/.search" method = "POST" operation_name = "search_kmsi_settings" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/KmsiSettings/SearchKmsiSettings" # Don't accept unknown kwargs expected_kwargs = [ @@ -38249,7 +38249,7 @@ def search_my_apps(self, **kwargs): resource_path = "/admin/v1/MyApps/.search" method = "POST" operation_name = "search_my_apps" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/MyApps/SearchMyApps" # Don't accept unknown kwargs expected_kwargs = [ @@ -38363,7 +38363,7 @@ def search_my_groups(self, **kwargs): resource_path = "/admin/v1/MyGroups/.search" method = "POST" operation_name = "search_my_groups" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/MyGroups/SearchMyGroups" # Don't accept unknown kwargs expected_kwargs = [ @@ -38477,7 +38477,7 @@ def search_my_requestable_groups(self, **kwargs): resource_path = "/admin/v1/MyRequestableGroups/.search" method = "POST" operation_name = "search_my_requestable_groups" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/MyRequestableGroups/SearchMyRequestableGroups" # Don't accept unknown kwargs expected_kwargs = [ @@ -38591,7 +38591,7 @@ def search_my_requests(self, **kwargs): resource_path = "/admin/v1/MyRequests/.search" method = "POST" operation_name = "search_my_requests" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/MyRequests/SearchMyRequests" # Don't accept unknown kwargs expected_kwargs = [ @@ -38705,7 +38705,7 @@ def search_network_perimeters(self, **kwargs): resource_path = "/admin/v1/NetworkPerimeters/.search" method = "POST" operation_name = "search_network_perimeters" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/NetworkPerimeters/SearchNetworkPerimeters" # Don't accept unknown kwargs expected_kwargs = [ @@ -38819,7 +38819,7 @@ def search_notification_settings(self, **kwargs): resource_path = "/admin/v1/NotificationSettings/.search" method = "POST" operation_name = "search_notification_settings" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/NotificationSettings/SearchNotificationSettings" # Don't accept unknown kwargs expected_kwargs = [ @@ -38933,7 +38933,7 @@ def search_o_auth2_client_credentials(self, **kwargs): resource_path = "/admin/v1/OAuth2ClientCredentials/.search" method = "POST" operation_name = "search_o_auth2_client_credentials" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/OAuth2ClientCredentials/SearchOAuth2ClientCredentials" # Don't accept unknown kwargs expected_kwargs = [ @@ -39047,7 +39047,7 @@ def search_o_auth_client_certificates(self, **kwargs): resource_path = "/admin/v1/OAuthClientCertificates/.search" method = "POST" operation_name = "search_o_auth_client_certificates" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/OAuthClientCertificates/SearchOAuthClientCertificates" # Don't accept unknown kwargs expected_kwargs = [ @@ -39161,7 +39161,7 @@ def search_o_auth_partner_certificates(self, **kwargs): resource_path = "/admin/v1/OAuthPartnerCertificates/.search" method = "POST" operation_name = "search_o_auth_partner_certificates" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/OAuthPartnerCertificates/SearchOAuthPartnerCertificates" # Don't accept unknown kwargs expected_kwargs = [ @@ -39275,7 +39275,7 @@ def search_password_policies(self, **kwargs): resource_path = "/admin/v1/PasswordPolicies/.search" method = "POST" operation_name = "search_password_policies" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/PasswordPolicies/SearchPasswordPolicies" # Don't accept unknown kwargs expected_kwargs = [ @@ -39389,7 +39389,7 @@ def search_policies(self, **kwargs): resource_path = "/admin/v1/Policies/.search" method = "POST" operation_name = "search_policies" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Policies/SearchPolicies" # Don't accept unknown kwargs expected_kwargs = [ @@ -39503,7 +39503,7 @@ def search_resource_type_schema_attributes(self, **kwargs): resource_path = "/admin/v1/ResourceTypeSchemaAttributes/.search" method = "POST" operation_name = "search_resource_type_schema_attributes" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/ResourceTypeSchemaAttributes/SearchResourceTypeSchemaAttributes" # Don't accept unknown kwargs expected_kwargs = [ @@ -39617,7 +39617,7 @@ def search_rules(self, **kwargs): resource_path = "/admin/v1/Rules/.search" method = "POST" operation_name = "search_rules" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Rules/SearchRules" # Don't accept unknown kwargs expected_kwargs = [ @@ -39731,7 +39731,7 @@ def search_schemas(self, **kwargs): resource_path = "/admin/v1/Schemas/.search" method = "POST" operation_name = "search_schemas" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Schemas/SearchSchemas" # Don't accept unknown kwargs expected_kwargs = [ @@ -39845,7 +39845,7 @@ def search_security_question_settings(self, **kwargs): resource_path = "/admin/v1/SecurityQuestionSettings/.search" method = "POST" operation_name = "search_security_question_settings" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/SecurityQuestionSettings/SearchSecurityQuestionSettings" # Don't accept unknown kwargs expected_kwargs = [ @@ -39959,7 +39959,7 @@ def search_security_questions(self, **kwargs): resource_path = "/admin/v1/SecurityQuestions/.search" method = "POST" operation_name = "search_security_questions" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/SecurityQuestions/SearchSecurityQuestions" # Don't accept unknown kwargs expected_kwargs = [ @@ -40073,7 +40073,7 @@ def search_self_registration_profiles(self, **kwargs): resource_path = "/admin/v1/SelfRegistrationProfiles/.search" method = "POST" operation_name = "search_self_registration_profiles" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/SelfRegistrationProfiles/SearchSelfRegistrationProfiles" # Don't accept unknown kwargs expected_kwargs = [ @@ -40187,7 +40187,7 @@ def search_settings(self, **kwargs): resource_path = "/admin/v1/Settings/.search" method = "POST" operation_name = "search_settings" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Settings/SearchSettings" # Don't accept unknown kwargs expected_kwargs = [ @@ -40301,7 +40301,7 @@ def search_smtp_credentials(self, **kwargs): resource_path = "/admin/v1/SmtpCredentials/.search" method = "POST" operation_name = "search_smtp_credentials" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/SmtpCredentials/SearchSmtpCredentials" # Don't accept unknown kwargs expected_kwargs = [ @@ -40415,7 +40415,7 @@ def search_user_attributes_settings(self, **kwargs): resource_path = "/admin/v1/UserAttributesSettings/.search" method = "POST" operation_name = "search_user_attributes_settings" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/UserAttributesSettings/SearchUserAttributesSettings" # Don't accept unknown kwargs expected_kwargs = [ @@ -40529,7 +40529,7 @@ def search_user_db_credentials(self, **kwargs): resource_path = "/admin/v1/UserDbCredentials/.search" method = "POST" operation_name = "search_user_db_credentials" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/UserDbCredentials/SearchUserDbCredentials" # Don't accept unknown kwargs expected_kwargs = [ @@ -40643,7 +40643,7 @@ def search_users(self, **kwargs): resource_path = "/admin/v1/Users/.search" method = "POST" operation_name = "search_users" - api_reference_link = "" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Users/SearchUsers" # Don't accept unknown kwargs expected_kwargs = [ diff --git a/src/oci/monitoring/models/__init__.py b/src/oci/monitoring/models/__init__.py index ff8a23ba9c..4e9761b546 100644 --- a/src/oci/monitoring/models/__init__.py +++ b/src/oci/monitoring/models/__init__.py @@ -14,8 +14,16 @@ from .alarm_history_entry import AlarmHistoryEntry from .alarm_status_summary import AlarmStatusSummary from .alarm_summary import AlarmSummary +from .alarm_suppression import AlarmSuppression +from .alarm_suppression_alarm_target import AlarmSuppressionAlarmTarget +from .alarm_suppression_collection import AlarmSuppressionCollection +from .alarm_suppression_history_item import AlarmSuppressionHistoryItem +from .alarm_suppression_history_item_collection import AlarmSuppressionHistoryItemCollection +from .alarm_suppression_summary import AlarmSuppressionSummary +from .alarm_suppression_target import AlarmSuppressionTarget from .change_alarm_compartment_details import ChangeAlarmCompartmentDetails from .create_alarm_details import CreateAlarmDetails +from .create_alarm_suppression_details import CreateAlarmSuppressionDetails from .datapoint import Datapoint from .failed_metric_record import FailedMetricRecord from .list_metrics_details import ListMetricsDetails @@ -25,6 +33,7 @@ from .post_metric_data_details import PostMetricDataDetails from .post_metric_data_response_details import PostMetricDataResponseDetails from .retrieve_dimension_states_details import RetrieveDimensionStatesDetails +from .summarize_alarm_suppression_history_details import SummarizeAlarmSuppressionHistoryDetails from .summarize_metrics_data_details import SummarizeMetricsDataDetails from .suppression import Suppression from .update_alarm_details import UpdateAlarmDetails @@ -39,8 +48,16 @@ "AlarmHistoryEntry": AlarmHistoryEntry, "AlarmStatusSummary": AlarmStatusSummary, "AlarmSummary": AlarmSummary, + "AlarmSuppression": AlarmSuppression, + "AlarmSuppressionAlarmTarget": AlarmSuppressionAlarmTarget, + "AlarmSuppressionCollection": AlarmSuppressionCollection, + "AlarmSuppressionHistoryItem": AlarmSuppressionHistoryItem, + "AlarmSuppressionHistoryItemCollection": AlarmSuppressionHistoryItemCollection, + "AlarmSuppressionSummary": AlarmSuppressionSummary, + "AlarmSuppressionTarget": AlarmSuppressionTarget, "ChangeAlarmCompartmentDetails": ChangeAlarmCompartmentDetails, "CreateAlarmDetails": CreateAlarmDetails, + "CreateAlarmSuppressionDetails": CreateAlarmSuppressionDetails, "Datapoint": Datapoint, "FailedMetricRecord": FailedMetricRecord, "ListMetricsDetails": ListMetricsDetails, @@ -50,6 +67,7 @@ "PostMetricDataDetails": PostMetricDataDetails, "PostMetricDataResponseDetails": PostMetricDataResponseDetails, "RetrieveDimensionStatesDetails": RetrieveDimensionStatesDetails, + "SummarizeAlarmSuppressionHistoryDetails": SummarizeAlarmSuppressionHistoryDetails, "SummarizeMetricsDataDetails": SummarizeMetricsDataDetails, "Suppression": Suppression, "UpdateAlarmDetails": UpdateAlarmDetails diff --git a/src/oci/monitoring/models/aggregated_datapoint.py b/src/oci/monitoring/models/aggregated_datapoint.py index 6c63f4e4e8..1c37a4ee5c 100644 --- a/src/oci/monitoring/models/aggregated_datapoint.py +++ b/src/oci/monitoring/models/aggregated_datapoint.py @@ -48,7 +48,7 @@ def timestamp(self): **[Required]** Gets the timestamp of this AggregatedDatapoint. The date and time associated with the value of this data point. Format defined by RFC3339. - Example: `2019-02-01T01:02:29.600Z` + Example: `2023-02-01T01:02:29.600Z` :return: The timestamp of this AggregatedDatapoint. @@ -62,7 +62,7 @@ def timestamp(self, timestamp): Sets the timestamp of this AggregatedDatapoint. The date and time associated with the value of this data point. Format defined by RFC3339. - Example: `2019-02-01T01:02:29.600Z` + Example: `2023-02-01T01:02:29.600Z` :param timestamp: The timestamp of this AggregatedDatapoint. diff --git a/src/oci/monitoring/models/alarm.py b/src/oci/monitoring/models/alarm.py index 01ef91fbf1..c45d10bad7 100644 --- a/src/oci/monitoring/models/alarm.py +++ b/src/oci/monitoring/models/alarm.py @@ -667,7 +667,7 @@ def body(self): Gets the body of this Alarm. The human-readable content of the delivered alarm notification. Oracle recommends providing guidance to operators for resolving the alarm condition. Consider adding links to standard runbook - practices. + practices. Avoid entering confidential information. Example: `High CPU usage alert. Follow runbook instructions for resolution.` @@ -683,7 +683,7 @@ def body(self, body): Sets the body of this Alarm. The human-readable content of the delivered alarm notification. Oracle recommends providing guidance to operators for resolving the alarm condition. Consider adding links to standard runbook - practices. + practices. Avoid entering confidential information. Example: `High CPU usage alert. Follow runbook instructions for resolution.` @@ -762,8 +762,7 @@ def destinations(self): A list of destinations for alarm notifications. Each destination is represented by the `OCID`__ of a related resource, such as a :class:`NotificationTopic`. - Supported destination services: Notifications - , Streaming. + Supported destination services: Notifications, Streaming. Limit: One destination per supported destination service. __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm @@ -781,8 +780,7 @@ def destinations(self, destinations): A list of destinations for alarm notifications. Each destination is represented by the `OCID`__ of a related resource, such as a :class:`NotificationTopic`. - Supported destination services: Notifications - , Streaming. + Supported destination services: Notifications, Streaming. Limit: One destination per supported destination service. __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm @@ -973,7 +971,7 @@ def time_created(self): **[Required]** Gets the time_created of this Alarm. The date and time the alarm was created. Format defined by RFC3339. - Example: `2019-02-01T01:02:29.600Z` + Example: `2023-02-01T01:02:29.600Z` :return: The time_created of this Alarm. @@ -987,7 +985,7 @@ def time_created(self, time_created): Sets the time_created of this Alarm. The date and time the alarm was created. Format defined by RFC3339. - Example: `2019-02-01T01:02:29.600Z` + Example: `2023-02-01T01:02:29.600Z` :param time_created: The time_created of this Alarm. @@ -1001,7 +999,7 @@ def time_updated(self): **[Required]** Gets the time_updated of this Alarm. The date and time the alarm was last updated. Format defined by RFC3339. - Example: `2019-02-03T01:02:29.600Z` + Example: `2023-02-03T01:02:29.600Z` :return: The time_updated of this Alarm. @@ -1015,7 +1013,7 @@ def time_updated(self, time_updated): Sets the time_updated of this Alarm. The date and time the alarm was last updated. Format defined by RFC3339. - Example: `2019-02-03T01:02:29.600Z` + Example: `2023-02-03T01:02:29.600Z` :param time_updated: The time_updated of this Alarm. diff --git a/src/oci/monitoring/models/alarm_history_entry.py b/src/oci/monitoring/models/alarm_history_entry.py index f51e5842ac..1e07aa05e3 100644 --- a/src/oci/monitoring/models/alarm_history_entry.py +++ b/src/oci/monitoring/models/alarm_history_entry.py @@ -88,7 +88,7 @@ def timestamp(self): **[Required]** Gets the timestamp of this AlarmHistoryEntry. Timestamp for this alarm history entry. Format defined by RFC3339. - Example: `2019-02-01T01:02:29.600Z` + Example: `2023-02-01T01:02:29.600Z` :return: The timestamp of this AlarmHistoryEntry. @@ -102,7 +102,7 @@ def timestamp(self, timestamp): Sets the timestamp of this AlarmHistoryEntry. Timestamp for this alarm history entry. Format defined by RFC3339. - Example: `2019-02-01T01:02:29.600Z` + Example: `2023-02-01T01:02:29.600Z` :param timestamp: The timestamp of this AlarmHistoryEntry. @@ -117,7 +117,7 @@ def timestamp_triggered(self): Timestamp for the transition of the alarm state. For example, the time when the alarm transitioned from OK to Firing. Available for state transition entries only. Note: A three-minute lag for this value accounts for any late-arriving metrics. - Example: `2019-02-01T0:59:00.789Z` + Example: `2023-02-01T0:59:00.789Z` :return: The timestamp_triggered of this AlarmHistoryEntry. @@ -132,7 +132,7 @@ def timestamp_triggered(self, timestamp_triggered): Timestamp for the transition of the alarm state. For example, the time when the alarm transitioned from OK to Firing. Available for state transition entries only. Note: A three-minute lag for this value accounts for any late-arriving metrics. - Example: `2019-02-01T0:59:00.789Z` + Example: `2023-02-01T0:59:00.789Z` :param timestamp_triggered: The timestamp_triggered of this AlarmHistoryEntry. diff --git a/src/oci/monitoring/models/alarm_status_summary.py b/src/oci/monitoring/models/alarm_status_summary.py index 32a4f17c5d..95180bc9be 100644 --- a/src/oci/monitoring/models/alarm_status_summary.py +++ b/src/oci/monitoring/models/alarm_status_summary.py @@ -178,7 +178,7 @@ def display_name(self, display_name): def severity(self): """ **[Required]** Gets the severity of this AlarmStatusSummary. - The configured severity of the alarm. + The perceived type of response required when the alarm is in the \"FIRING\" state. Example: `CRITICAL` @@ -195,7 +195,7 @@ def severity(self): def severity(self, severity): """ Sets the severity of this AlarmStatusSummary. - The configured severity of the alarm. + The perceived type of response required when the alarm is in the \"FIRING\" state. Example: `CRITICAL` @@ -215,7 +215,7 @@ def timestamp_triggered(self): Timestamp for the transition of the alarm state. For example, the time when the alarm transitioned from OK to Firing. Note: A three-minute lag for this value accounts for any late-arriving metrics. - Example: `2019-02-01T01:02:29.600Z` + Example: `2023-02-01T01:02:29.600Z` :return: The timestamp_triggered of this AlarmStatusSummary. @@ -230,7 +230,7 @@ def timestamp_triggered(self, timestamp_triggered): Timestamp for the transition of the alarm state. For example, the time when the alarm transitioned from OK to Firing. Note: A three-minute lag for this value accounts for any late-arriving metrics. - Example: `2019-02-01T01:02:29.600Z` + Example: `2023-02-01T01:02:29.600Z` :param timestamp_triggered: The timestamp_triggered of this AlarmStatusSummary. diff --git a/src/oci/monitoring/models/alarm_summary.py b/src/oci/monitoring/models/alarm_summary.py index 350a8f8bdf..97254d64b7 100644 --- a/src/oci/monitoring/models/alarm_summary.py +++ b/src/oci/monitoring/models/alarm_summary.py @@ -94,6 +94,10 @@ def __init__(self, **kwargs): The value to assign to the is_enabled property of this AlarmSummary. :type is_enabled: bool + :param is_notifications_per_metric_dimension_enabled: + The value to assign to the is_notifications_per_metric_dimension_enabled property of this AlarmSummary. + :type is_notifications_per_metric_dimension_enabled: bool + :param freeform_tags: The value to assign to the freeform_tags property of this AlarmSummary. :type freeform_tags: dict(str, str) @@ -118,6 +122,7 @@ def __init__(self, **kwargs): 'destinations': 'list[str]', 'suppression': 'Suppression', 'is_enabled': 'bool', + 'is_notifications_per_metric_dimension_enabled': 'bool', 'freeform_tags': 'dict(str, str)', 'defined_tags': 'dict(str, dict(str, object))', 'lifecycle_state': 'str' @@ -134,6 +139,7 @@ def __init__(self, **kwargs): 'destinations': 'destinations', 'suppression': 'suppression', 'is_enabled': 'isEnabled', + 'is_notifications_per_metric_dimension_enabled': 'isNotificationsPerMetricDimensionEnabled', 'freeform_tags': 'freeformTags', 'defined_tags': 'definedTags', 'lifecycle_state': 'lifecycleState' @@ -149,6 +155,7 @@ def __init__(self, **kwargs): self._destinations = None self._suppression = None self._is_enabled = None + self._is_notifications_per_metric_dimension_enabled = None self._freeform_tags = None self._defined_tags = None self._lifecycle_state = None @@ -389,7 +396,7 @@ def query(self, query): def severity(self): """ **[Required]** Gets the severity of this AlarmSummary. - The perceived severity of the alarm with regard to the affected system. + The perceived type of response required when the alarm is in the \"FIRING\" state. Example: `CRITICAL` @@ -406,7 +413,7 @@ def severity(self): def severity(self, severity): """ Sets the severity of this AlarmSummary. - The perceived severity of the alarm with regard to the affected system. + The perceived type of response required when the alarm is in the \"FIRING\" state. Example: `CRITICAL` @@ -426,8 +433,7 @@ def destinations(self): A list of destinations for alarm notifications. Each destination is represented by the `OCID`__ of a related resource, such as a :class:`NotificationTopic`. - Supported destination services: Notifications - , Streaming. + Supported destination services: Notifications, Streaming. Limit: One destination per supported destination service. __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm @@ -445,8 +451,7 @@ def destinations(self, destinations): A list of destinations for alarm notifications. Each destination is represented by the `OCID`__ of a related resource, such as a :class:`NotificationTopic`. - Supported destination services: Notifications - , Streaming. + Supported destination services: Notifications, Streaming. Limit: One destination per supported destination service. __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm @@ -509,6 +514,38 @@ def is_enabled(self, is_enabled): """ self._is_enabled = is_enabled + @property + def is_notifications_per_metric_dimension_enabled(self): + """ + Gets the is_notifications_per_metric_dimension_enabled of this AlarmSummary. + Whether the alarm sends a separate message for each metric stream. + See `Creating an Alarm That Splits Messages by Metric Stream`__. + Example: `true` + + __ https://docs.cloud.oracle.com/iaas/Content/Monitoring/Tasks/create-alarm-split.htm + + + :return: The is_notifications_per_metric_dimension_enabled of this AlarmSummary. + :rtype: bool + """ + return self._is_notifications_per_metric_dimension_enabled + + @is_notifications_per_metric_dimension_enabled.setter + def is_notifications_per_metric_dimension_enabled(self, is_notifications_per_metric_dimension_enabled): + """ + Sets the is_notifications_per_metric_dimension_enabled of this AlarmSummary. + Whether the alarm sends a separate message for each metric stream. + See `Creating an Alarm That Splits Messages by Metric Stream`__. + Example: `true` + + __ https://docs.cloud.oracle.com/iaas/Content/Monitoring/Tasks/create-alarm-split.htm + + + :param is_notifications_per_metric_dimension_enabled: The is_notifications_per_metric_dimension_enabled of this AlarmSummary. + :type: bool + """ + self._is_notifications_per_metric_dimension_enabled = is_notifications_per_metric_dimension_enabled + @property def freeform_tags(self): """ diff --git a/src/oci/monitoring/models/alarm_suppression.py b/src/oci/monitoring/models/alarm_suppression.py new file mode 100644 index 0000000000..67e8fb07da --- /dev/null +++ b/src/oci/monitoring/models/alarm_suppression.py @@ -0,0 +1,506 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20180401 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class AlarmSuppression(object): + """ + The configuration details for a dimension-specific alarm suppression. + """ + + #: A constant which can be used with the lifecycle_state property of a AlarmSuppression. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a AlarmSuppression. + #: This constant has a value of "DELETED" + LIFECYCLE_STATE_DELETED = "DELETED" + + def __init__(self, **kwargs): + """ + Initializes a new AlarmSuppression object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param id: + The value to assign to the id property of this AlarmSuppression. + :type id: str + + :param compartment_id: + The value to assign to the compartment_id property of this AlarmSuppression. + :type compartment_id: str + + :param alarm_suppression_target: + The value to assign to the alarm_suppression_target property of this AlarmSuppression. + :type alarm_suppression_target: oci.monitoring.models.AlarmSuppressionTarget + + :param display_name: + The value to assign to the display_name property of this AlarmSuppression. + :type display_name: str + + :param description: + The value to assign to the description property of this AlarmSuppression. + :type description: str + + :param dimensions: + The value to assign to the dimensions property of this AlarmSuppression. + :type dimensions: dict(str, str) + + :param time_suppress_from: + The value to assign to the time_suppress_from property of this AlarmSuppression. + :type time_suppress_from: datetime + + :param time_suppress_until: + The value to assign to the time_suppress_until property of this AlarmSuppression. + :type time_suppress_until: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this AlarmSuppression. + Allowed values for this property are: "ACTIVE", "DELETED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param time_created: + The value to assign to the time_created property of this AlarmSuppression. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this AlarmSuppression. + :type time_updated: datetime + + :param freeform_tags: + The value to assign to the freeform_tags property of this AlarmSuppression. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this AlarmSuppression. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'id': 'str', + 'compartment_id': 'str', + 'alarm_suppression_target': 'AlarmSuppressionTarget', + 'display_name': 'str', + 'description': 'str', + 'dimensions': 'dict(str, str)', + 'time_suppress_from': 'datetime', + 'time_suppress_until': 'datetime', + 'lifecycle_state': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'id': 'id', + 'compartment_id': 'compartmentId', + 'alarm_suppression_target': 'alarmSuppressionTarget', + 'display_name': 'displayName', + 'description': 'description', + 'dimensions': 'dimensions', + 'time_suppress_from': 'timeSuppressFrom', + 'time_suppress_until': 'timeSuppressUntil', + 'lifecycle_state': 'lifecycleState', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._id = None + self._compartment_id = None + self._alarm_suppression_target = None + self._display_name = None + self._description = None + self._dimensions = None + self._time_suppress_from = None + self._time_suppress_until = None + self._lifecycle_state = None + self._time_created = None + self._time_updated = None + self._freeform_tags = None + self._defined_tags = None + + @property + def id(self): + """ + **[Required]** Gets the id of this AlarmSuppression. + The `OCID`__ of the alarm suppression. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The id of this AlarmSuppression. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this AlarmSuppression. + The `OCID`__ of the alarm suppression. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param id: The id of this AlarmSuppression. + :type: str + """ + self._id = id + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this AlarmSuppression. + The `OCID`__ of the compartment containing the alarm suppression. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The compartment_id of this AlarmSuppression. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this AlarmSuppression. + The `OCID`__ of the compartment containing the alarm suppression. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param compartment_id: The compartment_id of this AlarmSuppression. + :type: str + """ + self._compartment_id = compartment_id + + @property + def alarm_suppression_target(self): + """ + **[Required]** Gets the alarm_suppression_target of this AlarmSuppression. + + :return: The alarm_suppression_target of this AlarmSuppression. + :rtype: oci.monitoring.models.AlarmSuppressionTarget + """ + return self._alarm_suppression_target + + @alarm_suppression_target.setter + def alarm_suppression_target(self, alarm_suppression_target): + """ + Sets the alarm_suppression_target of this AlarmSuppression. + + :param alarm_suppression_target: The alarm_suppression_target of this AlarmSuppression. + :type: oci.monitoring.models.AlarmSuppressionTarget + """ + self._alarm_suppression_target = alarm_suppression_target + + @property + def display_name(self): + """ + **[Required]** Gets the display_name of this AlarmSuppression. + A user-friendly name for the alarm suppression. It does not have to be unique, and it's changeable. Avoid entering confidential information. + + + :return: The display_name of this AlarmSuppression. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this AlarmSuppression. + A user-friendly name for the alarm suppression. It does not have to be unique, and it's changeable. Avoid entering confidential information. + + + :param display_name: The display_name of this AlarmSuppression. + :type: str + """ + self._display_name = display_name + + @property + def description(self): + """ + Gets the description of this AlarmSuppression. + Human-readable reason for this alarm suppression. + It does not have to be unique, and it's changeable. + Avoid entering confidential information. + + Oracle recommends including tracking information for the event or associated work, + such as a ticket number. + + Example: `Planned outage due to change IT-1234.` + + + :return: The description of this AlarmSuppression. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this AlarmSuppression. + Human-readable reason for this alarm suppression. + It does not have to be unique, and it's changeable. + Avoid entering confidential information. + + Oracle recommends including tracking information for the event or associated work, + such as a ticket number. + + Example: `Planned outage due to change IT-1234.` + + + :param description: The description of this AlarmSuppression. + :type: str + """ + self._description = description + + @property + def dimensions(self): + """ + **[Required]** Gets the dimensions of this AlarmSuppression. + Configured dimension filter for suppressing alarm state entries that include the set of specified dimension key-value pairs. + + Example: `{\"resourceId\": \"ocid1.instance.region1.phx.exampleuniqueID\"}` + + + :return: The dimensions of this AlarmSuppression. + :rtype: dict(str, str) + """ + return self._dimensions + + @dimensions.setter + def dimensions(self, dimensions): + """ + Sets the dimensions of this AlarmSuppression. + Configured dimension filter for suppressing alarm state entries that include the set of specified dimension key-value pairs. + + Example: `{\"resourceId\": \"ocid1.instance.region1.phx.exampleuniqueID\"}` + + + :param dimensions: The dimensions of this AlarmSuppression. + :type: dict(str, str) + """ + self._dimensions = dimensions + + @property + def time_suppress_from(self): + """ + **[Required]** Gets the time_suppress_from of this AlarmSuppression. + The start date and time for the suppression to take place, inclusive. Format defined by RFC3339. + + Example: `2018-02-01T01:02:29.600Z` + + + :return: The time_suppress_from of this AlarmSuppression. + :rtype: datetime + """ + return self._time_suppress_from + + @time_suppress_from.setter + def time_suppress_from(self, time_suppress_from): + """ + Sets the time_suppress_from of this AlarmSuppression. + The start date and time for the suppression to take place, inclusive. Format defined by RFC3339. + + Example: `2018-02-01T01:02:29.600Z` + + + :param time_suppress_from: The time_suppress_from of this AlarmSuppression. + :type: datetime + """ + self._time_suppress_from = time_suppress_from + + @property + def time_suppress_until(self): + """ + **[Required]** Gets the time_suppress_until of this AlarmSuppression. + The end date and time for the suppression to take place, inclusive. Format defined by RFC3339. + + Example: `2018-02-01T02:02:29.600Z` + + + :return: The time_suppress_until of this AlarmSuppression. + :rtype: datetime + """ + return self._time_suppress_until + + @time_suppress_until.setter + def time_suppress_until(self, time_suppress_until): + """ + Sets the time_suppress_until of this AlarmSuppression. + The end date and time for the suppression to take place, inclusive. Format defined by RFC3339. + + Example: `2018-02-01T02:02:29.600Z` + + + :param time_suppress_until: The time_suppress_until of this AlarmSuppression. + :type: datetime + """ + self._time_suppress_until = time_suppress_until + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this AlarmSuppression. + The current lifecycle state of the alarm suppression. + + Example: `DELETED` + + Allowed values for this property are: "ACTIVE", "DELETED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this AlarmSuppression. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this AlarmSuppression. + The current lifecycle state of the alarm suppression. + + Example: `DELETED` + + + :param lifecycle_state: The lifecycle_state of this AlarmSuppression. + :type: str + """ + allowed_values = ["ACTIVE", "DELETED"] + if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): + lifecycle_state = 'UNKNOWN_ENUM_VALUE' + self._lifecycle_state = lifecycle_state + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this AlarmSuppression. + The date and time the alarm suppression was created. Format defined by RFC3339. + + Example: `2018-02-01T01:02:29.600Z` + + + :return: The time_created of this AlarmSuppression. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this AlarmSuppression. + The date and time the alarm suppression was created. Format defined by RFC3339. + + Example: `2018-02-01T01:02:29.600Z` + + + :param time_created: The time_created of this AlarmSuppression. + :type: datetime + """ + self._time_created = time_created + + @property + def time_updated(self): + """ + **[Required]** Gets the time_updated of this AlarmSuppression. + The date and time the alarm suppression was last updated (deleted). Format defined by RFC3339. + + Example: `2018-02-03T01:02:29.600Z` + + + :return: The time_updated of this AlarmSuppression. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this AlarmSuppression. + The date and time the alarm suppression was last updated (deleted). Format defined by RFC3339. + + Example: `2018-02-03T01:02:29.600Z` + + + :param time_updated: The time_updated of this AlarmSuppression. + :type: datetime + """ + self._time_updated = time_updated + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this AlarmSuppression. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + Example: `{\"Department\": \"Finance\"}` + + + :return: The freeform_tags of this AlarmSuppression. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this AlarmSuppression. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + Example: `{\"Department\": \"Finance\"}` + + + :param freeform_tags: The freeform_tags of this AlarmSuppression. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this AlarmSuppression. + Usage of predefined tag keys. These predefined keys are scoped to namespaces. + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + + :return: The defined_tags of this AlarmSuppression. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this AlarmSuppression. + Usage of predefined tag keys. These predefined keys are scoped to namespaces. + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + + :param defined_tags: The defined_tags of this AlarmSuppression. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/monitoring/models/alarm_suppression_alarm_target.py b/src/oci/monitoring/models/alarm_suppression_alarm_target.py new file mode 100644 index 0000000000..7ba9499c84 --- /dev/null +++ b/src/oci/monitoring/models/alarm_suppression_alarm_target.py @@ -0,0 +1,86 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20180401 + +from .alarm_suppression_target import AlarmSuppressionTarget +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class AlarmSuppressionAlarmTarget(AlarmSuppressionTarget): + """ + The alarm target of the alarm suppression. + """ + + def __init__(self, **kwargs): + """ + Initializes a new AlarmSuppressionAlarmTarget object with values from keyword arguments. The default value of the :py:attr:`~oci.monitoring.models.AlarmSuppressionAlarmTarget.target_type` attribute + of this class is ``ALARM`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param target_type: + The value to assign to the target_type property of this AlarmSuppressionAlarmTarget. + Allowed values for this property are: "ALARM" + :type target_type: str + + :param alarm_id: + The value to assign to the alarm_id property of this AlarmSuppressionAlarmTarget. + :type alarm_id: str + + """ + self.swagger_types = { + 'target_type': 'str', + 'alarm_id': 'str' + } + + self.attribute_map = { + 'target_type': 'targetType', + 'alarm_id': 'alarmId' + } + + self._target_type = None + self._alarm_id = None + self._target_type = 'ALARM' + + @property + def alarm_id(self): + """ + **[Required]** Gets the alarm_id of this AlarmSuppressionAlarmTarget. + The `OCID`__ of the alarm that is the target of the alarm suppression. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The alarm_id of this AlarmSuppressionAlarmTarget. + :rtype: str + """ + return self._alarm_id + + @alarm_id.setter + def alarm_id(self, alarm_id): + """ + Sets the alarm_id of this AlarmSuppressionAlarmTarget. + The `OCID`__ of the alarm that is the target of the alarm suppression. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param alarm_id: The alarm_id of this AlarmSuppressionAlarmTarget. + :type: str + """ + self._alarm_id = alarm_id + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/monitoring/models/alarm_suppression_collection.py b/src/oci/monitoring/models/alarm_suppression_collection.py new file mode 100644 index 0000000000..dda550590a --- /dev/null +++ b/src/oci/monitoring/models/alarm_suppression_collection.py @@ -0,0 +1,72 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20180401 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class AlarmSuppressionCollection(object): + """ + Collection of property summaries for dimension-specific alarm suppressions. + """ + + def __init__(self, **kwargs): + """ + Initializes a new AlarmSuppressionCollection object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param items: + The value to assign to the items property of this AlarmSuppressionCollection. + :type items: list[oci.monitoring.models.AlarmSuppressionSummary] + + """ + self.swagger_types = { + 'items': 'list[AlarmSuppressionSummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this AlarmSuppressionCollection. + List of property summaries for dimension-specific alarm suppressions. + + + :return: The items of this AlarmSuppressionCollection. + :rtype: list[oci.monitoring.models.AlarmSuppressionSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this AlarmSuppressionCollection. + List of property summaries for dimension-specific alarm suppressions. + + + :param items: The items of this AlarmSuppressionCollection. + :type: list[oci.monitoring.models.AlarmSuppressionSummary] + """ + self._items = items + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/monitoring/models/alarm_suppression_history_item.py b/src/oci/monitoring/models/alarm_suppression_history_item.py new file mode 100644 index 0000000000..307ff112a1 --- /dev/null +++ b/src/oci/monitoring/models/alarm_suppression_history_item.py @@ -0,0 +1,335 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20180401 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class AlarmSuppressionHistoryItem(object): + """ + A summary of properties for the specified alarm suppression history item. + """ + + #: A constant which can be used with the level property of a AlarmSuppressionHistoryItem. + #: This constant has a value of "ALARM" + LEVEL_ALARM = "ALARM" + + #: A constant which can be used with the level property of a AlarmSuppressionHistoryItem. + #: This constant has a value of "DIMENSION" + LEVEL_DIMENSION = "DIMENSION" + + def __init__(self, **kwargs): + """ + Initializes a new AlarmSuppressionHistoryItem object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param suppression_id: + The value to assign to the suppression_id property of this AlarmSuppressionHistoryItem. + :type suppression_id: str + + :param alarm_suppression_target: + The value to assign to the alarm_suppression_target property of this AlarmSuppressionHistoryItem. + :type alarm_suppression_target: oci.monitoring.models.AlarmSuppressionTarget + + :param level: + The value to assign to the level property of this AlarmSuppressionHistoryItem. + Allowed values for this property are: "ALARM", "DIMENSION", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type level: str + + :param display_name: + The value to assign to the display_name property of this AlarmSuppressionHistoryItem. + :type display_name: str + + :param description: + The value to assign to the description property of this AlarmSuppressionHistoryItem. + :type description: str + + :param dimensions: + The value to assign to the dimensions property of this AlarmSuppressionHistoryItem. + :type dimensions: dict(str, str) + + :param time_effective_from: + The value to assign to the time_effective_from property of this AlarmSuppressionHistoryItem. + :type time_effective_from: datetime + + :param time_effective_until: + The value to assign to the time_effective_until property of this AlarmSuppressionHistoryItem. + :type time_effective_until: datetime + + """ + self.swagger_types = { + 'suppression_id': 'str', + 'alarm_suppression_target': 'AlarmSuppressionTarget', + 'level': 'str', + 'display_name': 'str', + 'description': 'str', + 'dimensions': 'dict(str, str)', + 'time_effective_from': 'datetime', + 'time_effective_until': 'datetime' + } + + self.attribute_map = { + 'suppression_id': 'suppressionId', + 'alarm_suppression_target': 'alarmSuppressionTarget', + 'level': 'level', + 'display_name': 'displayName', + 'description': 'description', + 'dimensions': 'dimensions', + 'time_effective_from': 'timeEffectiveFrom', + 'time_effective_until': 'timeEffectiveUntil' + } + + self._suppression_id = None + self._alarm_suppression_target = None + self._level = None + self._display_name = None + self._description = None + self._dimensions = None + self._time_effective_from = None + self._time_effective_until = None + + @property + def suppression_id(self): + """ + **[Required]** Gets the suppression_id of this AlarmSuppressionHistoryItem. + The `OCID`__ of the alarm suppression. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The suppression_id of this AlarmSuppressionHistoryItem. + :rtype: str + """ + return self._suppression_id + + @suppression_id.setter + def suppression_id(self, suppression_id): + """ + Sets the suppression_id of this AlarmSuppressionHistoryItem. + The `OCID`__ of the alarm suppression. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param suppression_id: The suppression_id of this AlarmSuppressionHistoryItem. + :type: str + """ + self._suppression_id = suppression_id + + @property + def alarm_suppression_target(self): + """ + **[Required]** Gets the alarm_suppression_target of this AlarmSuppressionHistoryItem. + + :return: The alarm_suppression_target of this AlarmSuppressionHistoryItem. + :rtype: oci.monitoring.models.AlarmSuppressionTarget + """ + return self._alarm_suppression_target + + @alarm_suppression_target.setter + def alarm_suppression_target(self, alarm_suppression_target): + """ + Sets the alarm_suppression_target of this AlarmSuppressionHistoryItem. + + :param alarm_suppression_target: The alarm_suppression_target of this AlarmSuppressionHistoryItem. + :type: oci.monitoring.models.AlarmSuppressionTarget + """ + self._alarm_suppression_target = alarm_suppression_target + + @property + def level(self): + """ + **[Required]** Gets the level of this AlarmSuppressionHistoryItem. + The level of this alarm suppression. + `ALARM` indicates a suppression of the entire alarm, regardless of dimension. + `DIMENSION` indicates a suppression configured for specified dimensions. + + Allowed values for this property are: "ALARM", "DIMENSION", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The level of this AlarmSuppressionHistoryItem. + :rtype: str + """ + return self._level + + @level.setter + def level(self, level): + """ + Sets the level of this AlarmSuppressionHistoryItem. + The level of this alarm suppression. + `ALARM` indicates a suppression of the entire alarm, regardless of dimension. + `DIMENSION` indicates a suppression configured for specified dimensions. + + + :param level: The level of this AlarmSuppressionHistoryItem. + :type: str + """ + allowed_values = ["ALARM", "DIMENSION"] + if not value_allowed_none_or_none_sentinel(level, allowed_values): + level = 'UNKNOWN_ENUM_VALUE' + self._level = level + + @property + def display_name(self): + """ + **[Required]** Gets the display_name of this AlarmSuppressionHistoryItem. + A user-friendly name for the alarm suppression. It does not have to be unique, and it's changeable. Avoid entering confidential information. + + + :return: The display_name of this AlarmSuppressionHistoryItem. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this AlarmSuppressionHistoryItem. + A user-friendly name for the alarm suppression. It does not have to be unique, and it's changeable. Avoid entering confidential information. + + + :param display_name: The display_name of this AlarmSuppressionHistoryItem. + :type: str + """ + self._display_name = display_name + + @property + def description(self): + """ + Gets the description of this AlarmSuppressionHistoryItem. + Human-readable reason for this alarm suppression. + It does not have to be unique, and it's changeable. + Avoid entering confidential information. + + Oracle recommends including tracking information for the event or associated work, + such as a ticket number. + + Example: `Planned outage due to change IT-1234.` + + + :return: The description of this AlarmSuppressionHistoryItem. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this AlarmSuppressionHistoryItem. + Human-readable reason for this alarm suppression. + It does not have to be unique, and it's changeable. + Avoid entering confidential information. + + Oracle recommends including tracking information for the event or associated work, + such as a ticket number. + + Example: `Planned outage due to change IT-1234.` + + + :param description: The description of this AlarmSuppressionHistoryItem. + :type: str + """ + self._description = description + + @property + def dimensions(self): + """ + Gets the dimensions of this AlarmSuppressionHistoryItem. + Configured dimension filter for suppressing alarm state entries that include the set of specified dimension key-value pairs. + + Example: `{\"resourceId\": \"ocid1.instance.region1.phx.exampleuniqueID\"}` + + + :return: The dimensions of this AlarmSuppressionHistoryItem. + :rtype: dict(str, str) + """ + return self._dimensions + + @dimensions.setter + def dimensions(self, dimensions): + """ + Sets the dimensions of this AlarmSuppressionHistoryItem. + Configured dimension filter for suppressing alarm state entries that include the set of specified dimension key-value pairs. + + Example: `{\"resourceId\": \"ocid1.instance.region1.phx.exampleuniqueID\"}` + + + :param dimensions: The dimensions of this AlarmSuppressionHistoryItem. + :type: dict(str, str) + """ + self._dimensions = dimensions + + @property + def time_effective_from(self): + """ + **[Required]** Gets the time_effective_from of this AlarmSuppressionHistoryItem. + The start date and time for the suppression actually starts, inclusive. Format defined by RFC3339. + + Example: `2023-02-01T01:02:29.600Z` + + + :return: The time_effective_from of this AlarmSuppressionHistoryItem. + :rtype: datetime + """ + return self._time_effective_from + + @time_effective_from.setter + def time_effective_from(self, time_effective_from): + """ + Sets the time_effective_from of this AlarmSuppressionHistoryItem. + The start date and time for the suppression actually starts, inclusive. Format defined by RFC3339. + + Example: `2023-02-01T01:02:29.600Z` + + + :param time_effective_from: The time_effective_from of this AlarmSuppressionHistoryItem. + :type: datetime + """ + self._time_effective_from = time_effective_from + + @property + def time_effective_until(self): + """ + **[Required]** Gets the time_effective_until of this AlarmSuppressionHistoryItem. + The end date and time for the suppression actually ends, inclusive. Format defined by RFC3339. + + Example: `2023-02-01T02:02:29.600Z` + + + :return: The time_effective_until of this AlarmSuppressionHistoryItem. + :rtype: datetime + """ + return self._time_effective_until + + @time_effective_until.setter + def time_effective_until(self, time_effective_until): + """ + Sets the time_effective_until of this AlarmSuppressionHistoryItem. + The end date and time for the suppression actually ends, inclusive. Format defined by RFC3339. + + Example: `2023-02-01T02:02:29.600Z` + + + :param time_effective_until: The time_effective_until of this AlarmSuppressionHistoryItem. + :type: datetime + """ + self._time_effective_until = time_effective_until + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/monitoring/models/alarm_suppression_history_item_collection.py b/src/oci/monitoring/models/alarm_suppression_history_item_collection.py new file mode 100644 index 0000000000..5a88013fd3 --- /dev/null +++ b/src/oci/monitoring/models/alarm_suppression_history_item_collection.py @@ -0,0 +1,72 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20180401 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class AlarmSuppressionHistoryItemCollection(object): + """ + Collection of property summaries for alarm suppression history items. + """ + + def __init__(self, **kwargs): + """ + Initializes a new AlarmSuppressionHistoryItemCollection object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param items: + The value to assign to the items property of this AlarmSuppressionHistoryItemCollection. + :type items: list[oci.monitoring.models.AlarmSuppressionHistoryItem] + + """ + self.swagger_types = { + 'items': 'list[AlarmSuppressionHistoryItem]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this AlarmSuppressionHistoryItemCollection. + List of alarm suppression history items. + + + :return: The items of this AlarmSuppressionHistoryItemCollection. + :rtype: list[oci.monitoring.models.AlarmSuppressionHistoryItem] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this AlarmSuppressionHistoryItemCollection. + List of alarm suppression history items. + + + :param items: The items of this AlarmSuppressionHistoryItemCollection. + :type: list[oci.monitoring.models.AlarmSuppressionHistoryItem] + """ + self._items = items + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/monitoring/models/alarm_suppression_summary.py b/src/oci/monitoring/models/alarm_suppression_summary.py new file mode 100644 index 0000000000..b508134ea2 --- /dev/null +++ b/src/oci/monitoring/models/alarm_suppression_summary.py @@ -0,0 +1,490 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20180401 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class AlarmSuppressionSummary(object): + """ + A summary of properties for the specified dimension-specific alarm suppression. + """ + + def __init__(self, **kwargs): + """ + Initializes a new AlarmSuppressionSummary object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param id: + The value to assign to the id property of this AlarmSuppressionSummary. + :type id: str + + :param compartment_id: + The value to assign to the compartment_id property of this AlarmSuppressionSummary. + :type compartment_id: str + + :param alarm_suppression_target: + The value to assign to the alarm_suppression_target property of this AlarmSuppressionSummary. + :type alarm_suppression_target: oci.monitoring.models.AlarmSuppressionTarget + + :param display_name: + The value to assign to the display_name property of this AlarmSuppressionSummary. + :type display_name: str + + :param description: + The value to assign to the description property of this AlarmSuppressionSummary. + :type description: str + + :param dimensions: + The value to assign to the dimensions property of this AlarmSuppressionSummary. + :type dimensions: dict(str, str) + + :param time_suppress_from: + The value to assign to the time_suppress_from property of this AlarmSuppressionSummary. + :type time_suppress_from: datetime + + :param time_suppress_until: + The value to assign to the time_suppress_until property of this AlarmSuppressionSummary. + :type time_suppress_until: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this AlarmSuppressionSummary. + :type lifecycle_state: str + + :param time_created: + The value to assign to the time_created property of this AlarmSuppressionSummary. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this AlarmSuppressionSummary. + :type time_updated: datetime + + :param freeform_tags: + The value to assign to the freeform_tags property of this AlarmSuppressionSummary. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this AlarmSuppressionSummary. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'id': 'str', + 'compartment_id': 'str', + 'alarm_suppression_target': 'AlarmSuppressionTarget', + 'display_name': 'str', + 'description': 'str', + 'dimensions': 'dict(str, str)', + 'time_suppress_from': 'datetime', + 'time_suppress_until': 'datetime', + 'lifecycle_state': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'id': 'id', + 'compartment_id': 'compartmentId', + 'alarm_suppression_target': 'alarmSuppressionTarget', + 'display_name': 'displayName', + 'description': 'description', + 'dimensions': 'dimensions', + 'time_suppress_from': 'timeSuppressFrom', + 'time_suppress_until': 'timeSuppressUntil', + 'lifecycle_state': 'lifecycleState', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._id = None + self._compartment_id = None + self._alarm_suppression_target = None + self._display_name = None + self._description = None + self._dimensions = None + self._time_suppress_from = None + self._time_suppress_until = None + self._lifecycle_state = None + self._time_created = None + self._time_updated = None + self._freeform_tags = None + self._defined_tags = None + + @property + def id(self): + """ + **[Required]** Gets the id of this AlarmSuppressionSummary. + The `OCID`__ of the alarm suppression. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The id of this AlarmSuppressionSummary. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this AlarmSuppressionSummary. + The `OCID`__ of the alarm suppression. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param id: The id of this AlarmSuppressionSummary. + :type: str + """ + self._id = id + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this AlarmSuppressionSummary. + The `OCID`__ of the compartment containing the alarm suppression. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The compartment_id of this AlarmSuppressionSummary. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this AlarmSuppressionSummary. + The `OCID`__ of the compartment containing the alarm suppression. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param compartment_id: The compartment_id of this AlarmSuppressionSummary. + :type: str + """ + self._compartment_id = compartment_id + + @property + def alarm_suppression_target(self): + """ + **[Required]** Gets the alarm_suppression_target of this AlarmSuppressionSummary. + + :return: The alarm_suppression_target of this AlarmSuppressionSummary. + :rtype: oci.monitoring.models.AlarmSuppressionTarget + """ + return self._alarm_suppression_target + + @alarm_suppression_target.setter + def alarm_suppression_target(self, alarm_suppression_target): + """ + Sets the alarm_suppression_target of this AlarmSuppressionSummary. + + :param alarm_suppression_target: The alarm_suppression_target of this AlarmSuppressionSummary. + :type: oci.monitoring.models.AlarmSuppressionTarget + """ + self._alarm_suppression_target = alarm_suppression_target + + @property + def display_name(self): + """ + **[Required]** Gets the display_name of this AlarmSuppressionSummary. + A user-friendly name for the alarm suppression. It does not have to be unique, and it's changeable. Avoid entering confidential information. + + + :return: The display_name of this AlarmSuppressionSummary. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this AlarmSuppressionSummary. + A user-friendly name for the alarm suppression. It does not have to be unique, and it's changeable. Avoid entering confidential information. + + + :param display_name: The display_name of this AlarmSuppressionSummary. + :type: str + """ + self._display_name = display_name + + @property + def description(self): + """ + Gets the description of this AlarmSuppressionSummary. + Human-readable reason for this alarm suppression. + It does not have to be unique, and it's changeable. + Avoid entering confidential information. + + Oracle recommends including tracking information for the event or associated work, + such as a ticket number. + + Example: `Planned outage due to change IT-1234.` + + + :return: The description of this AlarmSuppressionSummary. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this AlarmSuppressionSummary. + Human-readable reason for this alarm suppression. + It does not have to be unique, and it's changeable. + Avoid entering confidential information. + + Oracle recommends including tracking information for the event or associated work, + such as a ticket number. + + Example: `Planned outage due to change IT-1234.` + + + :param description: The description of this AlarmSuppressionSummary. + :type: str + """ + self._description = description + + @property + def dimensions(self): + """ + **[Required]** Gets the dimensions of this AlarmSuppressionSummary. + Configured dimension filter for suppressing alarm state entries that include the set of specified dimension key-value pairs. + + Example: `{\"resourceId\": \"ocid1.instance.region1.phx.exampleuniqueID\"}` + + + :return: The dimensions of this AlarmSuppressionSummary. + :rtype: dict(str, str) + """ + return self._dimensions + + @dimensions.setter + def dimensions(self, dimensions): + """ + Sets the dimensions of this AlarmSuppressionSummary. + Configured dimension filter for suppressing alarm state entries that include the set of specified dimension key-value pairs. + + Example: `{\"resourceId\": \"ocid1.instance.region1.phx.exampleuniqueID\"}` + + + :param dimensions: The dimensions of this AlarmSuppressionSummary. + :type: dict(str, str) + """ + self._dimensions = dimensions + + @property + def time_suppress_from(self): + """ + **[Required]** Gets the time_suppress_from of this AlarmSuppressionSummary. + The start date and time for the suppression to take place, inclusive. Format defined by RFC3339. + + Example: `2023-02-01T01:02:29.600Z` + + + :return: The time_suppress_from of this AlarmSuppressionSummary. + :rtype: datetime + """ + return self._time_suppress_from + + @time_suppress_from.setter + def time_suppress_from(self, time_suppress_from): + """ + Sets the time_suppress_from of this AlarmSuppressionSummary. + The start date and time for the suppression to take place, inclusive. Format defined by RFC3339. + + Example: `2023-02-01T01:02:29.600Z` + + + :param time_suppress_from: The time_suppress_from of this AlarmSuppressionSummary. + :type: datetime + """ + self._time_suppress_from = time_suppress_from + + @property + def time_suppress_until(self): + """ + **[Required]** Gets the time_suppress_until of this AlarmSuppressionSummary. + The end date and time for the suppression to take place, inclusive. Format defined by RFC3339. + + Example: `2023-02-01T02:02:29.600Z` + + + :return: The time_suppress_until of this AlarmSuppressionSummary. + :rtype: datetime + """ + return self._time_suppress_until + + @time_suppress_until.setter + def time_suppress_until(self, time_suppress_until): + """ + Sets the time_suppress_until of this AlarmSuppressionSummary. + The end date and time for the suppression to take place, inclusive. Format defined by RFC3339. + + Example: `2023-02-01T02:02:29.600Z` + + + :param time_suppress_until: The time_suppress_until of this AlarmSuppressionSummary. + :type: datetime + """ + self._time_suppress_until = time_suppress_until + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this AlarmSuppressionSummary. + The current lifecycle state of the alarm suppression. + + Example: `DELETED` + + + :return: The lifecycle_state of this AlarmSuppressionSummary. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this AlarmSuppressionSummary. + The current lifecycle state of the alarm suppression. + + Example: `DELETED` + + + :param lifecycle_state: The lifecycle_state of this AlarmSuppressionSummary. + :type: str + """ + self._lifecycle_state = lifecycle_state + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this AlarmSuppressionSummary. + The date and time the alarm suppression was created. Format defined by RFC3339. + + Example: `2023-02-01T01:02:29.600Z` + + + :return: The time_created of this AlarmSuppressionSummary. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this AlarmSuppressionSummary. + The date and time the alarm suppression was created. Format defined by RFC3339. + + Example: `2023-02-01T01:02:29.600Z` + + + :param time_created: The time_created of this AlarmSuppressionSummary. + :type: datetime + """ + self._time_created = time_created + + @property + def time_updated(self): + """ + **[Required]** Gets the time_updated of this AlarmSuppressionSummary. + The date and time the alarm suppression was last updated (deleted). Format defined by RFC3339. + + Example: `2023-02-03T01:02:29.600Z` + + + :return: The time_updated of this AlarmSuppressionSummary. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this AlarmSuppressionSummary. + The date and time the alarm suppression was last updated (deleted). Format defined by RFC3339. + + Example: `2023-02-03T01:02:29.600Z` + + + :param time_updated: The time_updated of this AlarmSuppressionSummary. + :type: datetime + """ + self._time_updated = time_updated + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this AlarmSuppressionSummary. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + Example: `{\"bar-key\": \"value\"}` + + + :return: The freeform_tags of this AlarmSuppressionSummary. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this AlarmSuppressionSummary. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + Example: `{\"bar-key\": \"value\"}` + + + :param freeform_tags: The freeform_tags of this AlarmSuppressionSummary. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this AlarmSuppressionSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. + Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + + :return: The defined_tags of this AlarmSuppressionSummary. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this AlarmSuppressionSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. + Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + + :param defined_tags: The defined_tags of this AlarmSuppressionSummary. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/monitoring/models/alarm_suppression_target.py b/src/oci/monitoring/models/alarm_suppression_target.py new file mode 100644 index 0000000000..7b82726a64 --- /dev/null +++ b/src/oci/monitoring/models/alarm_suppression_target.py @@ -0,0 +1,101 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20180401 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class AlarmSuppressionTarget(object): + """ + The target of the alarm suppression. + """ + + #: A constant which can be used with the target_type property of a AlarmSuppressionTarget. + #: This constant has a value of "ALARM" + TARGET_TYPE_ALARM = "ALARM" + + def __init__(self, **kwargs): + """ + Initializes a new AlarmSuppressionTarget object with values from keyword arguments. This class has the following subclasses and if you are using this class as input + to a service operations then you should favor using a subclass over the base class: + + * :class:`~oci.monitoring.models.AlarmSuppressionAlarmTarget` + + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param target_type: + The value to assign to the target_type property of this AlarmSuppressionTarget. + Allowed values for this property are: "ALARM", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type target_type: str + + """ + self.swagger_types = { + 'target_type': 'str' + } + + self.attribute_map = { + 'target_type': 'targetType' + } + + self._target_type = None + + @staticmethod + def get_subtype(object_dictionary): + """ + Given the hash representation of a subtype of this class, + use the info in the hash to return the class of the subtype. + """ + type = object_dictionary['targetType'] + + if type == 'ALARM': + return 'AlarmSuppressionAlarmTarget' + else: + return 'AlarmSuppressionTarget' + + @property + def target_type(self): + """ + **[Required]** Gets the target_type of this AlarmSuppressionTarget. + The type of the alarm suppression target. + + Allowed values for this property are: "ALARM", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The target_type of this AlarmSuppressionTarget. + :rtype: str + """ + return self._target_type + + @target_type.setter + def target_type(self, target_type): + """ + Sets the target_type of this AlarmSuppressionTarget. + The type of the alarm suppression target. + + + :param target_type: The target_type of this AlarmSuppressionTarget. + :type: str + """ + allowed_values = ["ALARM"] + if not value_allowed_none_or_none_sentinel(target_type, allowed_values): + target_type = 'UNKNOWN_ENUM_VALUE' + self._target_type = target_type + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/monitoring/models/create_alarm_details.py b/src/oci/monitoring/models/create_alarm_details.py index 1d7ee217c9..b65e096403 100644 --- a/src/oci/monitoring/models/create_alarm_details.py +++ b/src/oci/monitoring/models/create_alarm_details.py @@ -658,8 +658,7 @@ def destinations(self): A list of destinations for alarm notifications. Each destination is represented by the `OCID`__ of a related resource, such as a :class:`NotificationTopic`. - Supported destination services: Notifications - , Streaming. + Supported destination services: Notifications, Streaming. Limit: One destination per supported destination service. __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm @@ -677,8 +676,7 @@ def destinations(self, destinations): A list of destinations for alarm notifications. Each destination is represented by the `OCID`__ of a related resource, such as a :class:`NotificationTopic`. - Supported destination services: Notifications - , Streaming. + Supported destination services: Notifications, Streaming. Limit: One destination per supported destination service. __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm diff --git a/src/oci/monitoring/models/create_alarm_suppression_details.py b/src/oci/monitoring/models/create_alarm_suppression_details.py new file mode 100644 index 0000000000..97093f4aeb --- /dev/null +++ b/src/oci/monitoring/models/create_alarm_suppression_details.py @@ -0,0 +1,327 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20180401 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class CreateAlarmSuppressionDetails(object): + """ + The configuration details for creating a dimension-specific alarm suppression. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CreateAlarmSuppressionDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param alarm_suppression_target: + The value to assign to the alarm_suppression_target property of this CreateAlarmSuppressionDetails. + :type alarm_suppression_target: oci.monitoring.models.AlarmSuppressionTarget + + :param display_name: + The value to assign to the display_name property of this CreateAlarmSuppressionDetails. + :type display_name: str + + :param description: + The value to assign to the description property of this CreateAlarmSuppressionDetails. + :type description: str + + :param dimensions: + The value to assign to the dimensions property of this CreateAlarmSuppressionDetails. + :type dimensions: dict(str, str) + + :param time_suppress_from: + The value to assign to the time_suppress_from property of this CreateAlarmSuppressionDetails. + :type time_suppress_from: datetime + + :param time_suppress_until: + The value to assign to the time_suppress_until property of this CreateAlarmSuppressionDetails. + :type time_suppress_until: datetime + + :param freeform_tags: + The value to assign to the freeform_tags property of this CreateAlarmSuppressionDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this CreateAlarmSuppressionDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'alarm_suppression_target': 'AlarmSuppressionTarget', + 'display_name': 'str', + 'description': 'str', + 'dimensions': 'dict(str, str)', + 'time_suppress_from': 'datetime', + 'time_suppress_until': 'datetime', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'alarm_suppression_target': 'alarmSuppressionTarget', + 'display_name': 'displayName', + 'description': 'description', + 'dimensions': 'dimensions', + 'time_suppress_from': 'timeSuppressFrom', + 'time_suppress_until': 'timeSuppressUntil', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._alarm_suppression_target = None + self._display_name = None + self._description = None + self._dimensions = None + self._time_suppress_from = None + self._time_suppress_until = None + self._freeform_tags = None + self._defined_tags = None + + @property + def alarm_suppression_target(self): + """ + **[Required]** Gets the alarm_suppression_target of this CreateAlarmSuppressionDetails. + + :return: The alarm_suppression_target of this CreateAlarmSuppressionDetails. + :rtype: oci.monitoring.models.AlarmSuppressionTarget + """ + return self._alarm_suppression_target + + @alarm_suppression_target.setter + def alarm_suppression_target(self, alarm_suppression_target): + """ + Sets the alarm_suppression_target of this CreateAlarmSuppressionDetails. + + :param alarm_suppression_target: The alarm_suppression_target of this CreateAlarmSuppressionDetails. + :type: oci.monitoring.models.AlarmSuppressionTarget + """ + self._alarm_suppression_target = alarm_suppression_target + + @property + def display_name(self): + """ + **[Required]** Gets the display_name of this CreateAlarmSuppressionDetails. + A user-friendly name for the alarm suppression. It does not have to be unique, and it's changeable. Avoid entering confidential information. + + + :return: The display_name of this CreateAlarmSuppressionDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this CreateAlarmSuppressionDetails. + A user-friendly name for the alarm suppression. It does not have to be unique, and it's changeable. Avoid entering confidential information. + + + :param display_name: The display_name of this CreateAlarmSuppressionDetails. + :type: str + """ + self._display_name = display_name + + @property + def description(self): + """ + Gets the description of this CreateAlarmSuppressionDetails. + Human-readable reason for this alarm suppression. + It does not have to be unique, and it's changeable. + Avoid entering confidential information. + + Oracle recommends including tracking information for the event or associated work, + such as a ticket number. + + Example: `Planned outage due to change IT-1234.` + + + :return: The description of this CreateAlarmSuppressionDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this CreateAlarmSuppressionDetails. + Human-readable reason for this alarm suppression. + It does not have to be unique, and it's changeable. + Avoid entering confidential information. + + Oracle recommends including tracking information for the event or associated work, + such as a ticket number. + + Example: `Planned outage due to change IT-1234.` + + + :param description: The description of this CreateAlarmSuppressionDetails. + :type: str + """ + self._description = description + + @property + def dimensions(self): + """ + **[Required]** Gets the dimensions of this CreateAlarmSuppressionDetails. + A filter to suppress only alarm state entries that include the set of specified dimension key-value pairs. + If you specify {\"availabilityDomain\": \"phx-ad-1\"} + and the alarm state entry corresponds to the set {\"availabilityDomain\": \"phx-ad-1\" and \"resourceId\": \"ocid1.instance.region1.phx.exampleuniqueID\"}, + then this alarm will be included for suppression. + + The value cannot be an empty object. + Only a single value is allowed per key. No grouping of multiple values is allowed under the same key. + Maximum characters (after serialization): 4000. This maximum satisfies typical use cases. + The response for an exceeded maximum is `HTTP 400` with an \"dimensions values are too long\" message. + + + :return: The dimensions of this CreateAlarmSuppressionDetails. + :rtype: dict(str, str) + """ + return self._dimensions + + @dimensions.setter + def dimensions(self, dimensions): + """ + Sets the dimensions of this CreateAlarmSuppressionDetails. + A filter to suppress only alarm state entries that include the set of specified dimension key-value pairs. + If you specify {\"availabilityDomain\": \"phx-ad-1\"} + and the alarm state entry corresponds to the set {\"availabilityDomain\": \"phx-ad-1\" and \"resourceId\": \"ocid1.instance.region1.phx.exampleuniqueID\"}, + then this alarm will be included for suppression. + + The value cannot be an empty object. + Only a single value is allowed per key. No grouping of multiple values is allowed under the same key. + Maximum characters (after serialization): 4000. This maximum satisfies typical use cases. + The response for an exceeded maximum is `HTTP 400` with an \"dimensions values are too long\" message. + + + :param dimensions: The dimensions of this CreateAlarmSuppressionDetails. + :type: dict(str, str) + """ + self._dimensions = dimensions + + @property + def time_suppress_from(self): + """ + **[Required]** Gets the time_suppress_from of this CreateAlarmSuppressionDetails. + The start date and time for the suppression to take place, inclusive. Format defined by RFC3339. + + Example: `2023-02-01T01:02:29.600Z` + + + :return: The time_suppress_from of this CreateAlarmSuppressionDetails. + :rtype: datetime + """ + return self._time_suppress_from + + @time_suppress_from.setter + def time_suppress_from(self, time_suppress_from): + """ + Sets the time_suppress_from of this CreateAlarmSuppressionDetails. + The start date and time for the suppression to take place, inclusive. Format defined by RFC3339. + + Example: `2023-02-01T01:02:29.600Z` + + + :param time_suppress_from: The time_suppress_from of this CreateAlarmSuppressionDetails. + :type: datetime + """ + self._time_suppress_from = time_suppress_from + + @property + def time_suppress_until(self): + """ + **[Required]** Gets the time_suppress_until of this CreateAlarmSuppressionDetails. + The end date and time for the suppression to take place, inclusive. Format defined by RFC3339. + + Example: `2023-02-01T02:02:29.600Z` + + + :return: The time_suppress_until of this CreateAlarmSuppressionDetails. + :rtype: datetime + """ + return self._time_suppress_until + + @time_suppress_until.setter + def time_suppress_until(self, time_suppress_until): + """ + Sets the time_suppress_until of this CreateAlarmSuppressionDetails. + The end date and time for the suppression to take place, inclusive. Format defined by RFC3339. + + Example: `2023-02-01T02:02:29.600Z` + + + :param time_suppress_until: The time_suppress_until of this CreateAlarmSuppressionDetails. + :type: datetime + """ + self._time_suppress_until = time_suppress_until + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this CreateAlarmSuppressionDetails. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + Example: `{\"Department\": \"Finance\"}` + + + :return: The freeform_tags of this CreateAlarmSuppressionDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this CreateAlarmSuppressionDetails. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + Example: `{\"Department\": \"Finance\"}` + + + :param freeform_tags: The freeform_tags of this CreateAlarmSuppressionDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this CreateAlarmSuppressionDetails. + Usage of predefined tag keys. These predefined keys are scoped to namespaces. + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + + :return: The defined_tags of this CreateAlarmSuppressionDetails. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this CreateAlarmSuppressionDetails. + Usage of predefined tag keys. These predefined keys are scoped to namespaces. + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + + :param defined_tags: The defined_tags of this CreateAlarmSuppressionDetails. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/monitoring/models/datapoint.py b/src/oci/monitoring/models/datapoint.py index fcfce6b5cf..73157ad9ab 100644 --- a/src/oci/monitoring/models/datapoint.py +++ b/src/oci/monitoring/models/datapoint.py @@ -56,7 +56,7 @@ def timestamp(self): Timestamp for this metric value. Format defined by RFC3339. For a data point to be posted, its timestamp must be near current time (less than two hours in the past and less than 10 minutes in the future). - Example: `2019-02-01T01:02:29.600Z` + Example: `2023-02-01T01:02:29.600Z` :return: The timestamp of this Datapoint. @@ -71,7 +71,7 @@ def timestamp(self, timestamp): Timestamp for this metric value. Format defined by RFC3339. For a data point to be posted, its timestamp must be near current time (less than two hours in the past and less than 10 minutes in the future). - Example: `2019-02-01T01:02:29.600Z` + Example: `2023-02-01T01:02:29.600Z` :param timestamp: The timestamp of this Datapoint. diff --git a/src/oci/monitoring/models/list_metrics_details.py b/src/oci/monitoring/models/list_metrics_details.py index ce4752c3df..ba114d2ea3 100644 --- a/src/oci/monitoring/models/list_metrics_details.py +++ b/src/oci/monitoring/models/list_metrics_details.py @@ -195,7 +195,7 @@ def dimension_filters(self): Qualifiers that you want to use when searching for metric definitions. Available dimensions vary by metric namespace. Each dimension takes the form of a key-value pair. - Example: `\"resourceId\": \"ocid1.instance.region1.phx.exampleuniqueID\"` + Example: `{\"resourceId\": \"ocid1.instance.region1.phx.exampleuniqueID\"}` :return: The dimension_filters of this ListMetricsDetails. @@ -210,7 +210,7 @@ def dimension_filters(self, dimension_filters): Qualifiers that you want to use when searching for metric definitions. Available dimensions vary by metric namespace. Each dimension takes the form of a key-value pair. - Example: `\"resourceId\": \"ocid1.instance.region1.phx.exampleuniqueID\"` + Example: `{\"resourceId\": \"ocid1.instance.region1.phx.exampleuniqueID\"}` :param dimension_filters: The dimension_filters of this ListMetricsDetails. diff --git a/src/oci/monitoring/models/metric.py b/src/oci/monitoring/models/metric.py index a08aa16353..ee935d2e1a 100644 --- a/src/oci/monitoring/models/metric.py +++ b/src/oci/monitoring/models/metric.py @@ -190,7 +190,7 @@ def dimensions(self): Qualifiers provided in a metric definition. Available dimensions vary by metric namespace. Each dimension takes the form of a key-value pair. - Example: `\"resourceId\": \"ocid1.instance.region1.phx.exampleuniqueID\"` + Example: `{\"resourceId\": \"ocid1.instance.region1.phx.exampleuniqueID\"}` :return: The dimensions of this Metric. @@ -205,7 +205,7 @@ def dimensions(self, dimensions): Qualifiers provided in a metric definition. Available dimensions vary by metric namespace. Each dimension takes the form of a key-value pair. - Example: `\"resourceId\": \"ocid1.instance.region1.phx.exampleuniqueID\"` + Example: `{\"resourceId\": \"ocid1.instance.region1.phx.exampleuniqueID\"}` :param dimensions: The dimensions of this Metric. diff --git a/src/oci/monitoring/models/metric_data.py b/src/oci/monitoring/models/metric_data.py index 3cc2a3dd1e..bc5ff8894d 100644 --- a/src/oci/monitoring/models/metric_data.py +++ b/src/oci/monitoring/models/metric_data.py @@ -229,7 +229,7 @@ def dimensions(self): Qualifiers provided in the definition of the returned metric. Available dimensions vary by metric namespace. Each dimension takes the form of a key-value pair. - Example: `\"resourceId\": \"ocid1.instance.region1.phx.exampleuniqueID\"` + Example: `{\"resourceId\": \"ocid1.instance.region1.phx.exampleuniqueID\"}` :return: The dimensions of this MetricData. @@ -244,7 +244,7 @@ def dimensions(self, dimensions): Qualifiers provided in the definition of the returned metric. Available dimensions vary by metric namespace. Each dimension takes the form of a key-value pair. - Example: `\"resourceId\": \"ocid1.instance.region1.phx.exampleuniqueID\"` + Example: `{\"resourceId\": \"ocid1.instance.region1.phx.exampleuniqueID\"}` :param dimensions: The dimensions of this MetricData. diff --git a/src/oci/monitoring/models/metric_data_details.py b/src/oci/monitoring/models/metric_data_details.py index 1ecfa13f9c..cac26efd15 100644 --- a/src/oci/monitoring/models/metric_data_details.py +++ b/src/oci/monitoring/models/metric_data_details.py @@ -83,7 +83,7 @@ def namespace(self): **[Required]** Gets the namespace of this MetricDataDetails. The source service or application emitting the metric. - A valid namespace value starts with an alphabetical character and includes only alphanumeric characters and underscores. The \"oci_\" prefix is reserved. + A valid namespace value starts with an alphabetical character and includes only alphanumeric characters and underscores. Custom metrics can't use the following reserved prefixes: `oci_` and `oracle_` Avoid entering confidential information. Example: `my_namespace` @@ -100,7 +100,7 @@ def namespace(self, namespace): Sets the namespace of this MetricDataDetails. The source service or application emitting the metric. - A valid namespace value starts with an alphabetical character and includes only alphanumeric characters and underscores. The \"oci_\" prefix is reserved. + A valid namespace value starts with an alphabetical character and includes only alphanumeric characters and underscores. Custom metrics can't use the following reserved prefixes: `oci_` and `oracle_` Avoid entering confidential information. Example: `my_namespace` @@ -177,7 +177,7 @@ def name(self): **[Required]** Gets the name of this MetricDataDetails. The name of the metric. - A valid name value starts with an alphabetical character and includes only alphanumeric characters, dots, underscores, hyphens, and dollar signs. The `oci_` prefix is reserved. + A valid name value starts with an alphabetical character and includes only alphanumeric characters, dots, underscores, hyphens, and dollar signs. Avoid entering confidential information. Example: `my_app.success_rate` @@ -194,7 +194,7 @@ def name(self, name): Sets the name of this MetricDataDetails. The name of the metric. - A valid name value starts with an alphabetical character and includes only alphanumeric characters, dots, underscores, hyphens, and dollar signs. The `oci_` prefix is reserved. + A valid name value starts with an alphabetical character and includes only alphanumeric characters, dots, underscores, hyphens, and dollar signs. Avoid entering confidential information. Example: `my_app.success_rate` @@ -215,7 +215,7 @@ def dimensions(self): A valid dimension value includes only Unicode characters. The character limit for a dimension value is 512. Empty strings are not allowed for keys or values. Avoid entering confidential information. - Example: `\"resourceId\": \"ocid1.instance.region1.phx.exampleuniqueID\"` + Example: `{\"resourceId\": \"ocid1.instance.region1.phx.exampleuniqueID\"}` :return: The dimensions of this MetricDataDetails. @@ -233,7 +233,7 @@ def dimensions(self, dimensions): A valid dimension value includes only Unicode characters. The character limit for a dimension value is 512. Empty strings are not allowed for keys or values. Avoid entering confidential information. - Example: `\"resourceId\": \"ocid1.instance.region1.phx.exampleuniqueID\"` + Example: `{\"resourceId\": \"ocid1.instance.region1.phx.exampleuniqueID\"}` :param dimensions: The dimensions of this MetricDataDetails. diff --git a/src/oci/monitoring/models/summarize_alarm_suppression_history_details.py b/src/oci/monitoring/models/summarize_alarm_suppression_history_details.py new file mode 100644 index 0000000000..067d235463 --- /dev/null +++ b/src/oci/monitoring/models/summarize_alarm_suppression_history_details.py @@ -0,0 +1,164 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20180401 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class SummarizeAlarmSuppressionHistoryDetails(object): + """ + The configuration details for returning history of suppressions for the specified alarm. + """ + + def __init__(self, **kwargs): + """ + Initializes a new SummarizeAlarmSuppressionHistoryDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param dimensions: + The value to assign to the dimensions property of this SummarizeAlarmSuppressionHistoryDetails. + :type dimensions: dict(str, str) + + :param time_suppress_from_greater_than_or_equal_to: + The value to assign to the time_suppress_from_greater_than_or_equal_to property of this SummarizeAlarmSuppressionHistoryDetails. + :type time_suppress_from_greater_than_or_equal_to: datetime + + :param time_suppress_from_less_than: + The value to assign to the time_suppress_from_less_than property of this SummarizeAlarmSuppressionHistoryDetails. + :type time_suppress_from_less_than: datetime + + """ + self.swagger_types = { + 'dimensions': 'dict(str, str)', + 'time_suppress_from_greater_than_or_equal_to': 'datetime', + 'time_suppress_from_less_than': 'datetime' + } + + self.attribute_map = { + 'dimensions': 'dimensions', + 'time_suppress_from_greater_than_or_equal_to': 'timeSuppressFromGreaterThanOrEqualTo', + 'time_suppress_from_less_than': 'timeSuppressFromLessThan' + } + + self._dimensions = None + self._time_suppress_from_greater_than_or_equal_to = None + self._time_suppress_from_less_than = None + + @property + def dimensions(self): + """ + Gets the dimensions of this SummarizeAlarmSuppressionHistoryDetails. + A filter to suppress only alarm state entries that include the set of specified dimension key-value pairs. + If you specify {\"availabilityDomain\": \"phx-ad-1\"} + and the alarm state entry corresponds to the set {\"availabilityDomain\": \"phx-ad-1\" and \"resourceId\": \"ocid1.instance.region1.phx.exampleuniqueID\"}, + then this alarm will be included for suppression. + + Example: `{\"resourceId\": \"ocid1.instance.region1.phx.exampleuniqueID\"}` + + + :return: The dimensions of this SummarizeAlarmSuppressionHistoryDetails. + :rtype: dict(str, str) + """ + return self._dimensions + + @dimensions.setter + def dimensions(self, dimensions): + """ + Sets the dimensions of this SummarizeAlarmSuppressionHistoryDetails. + A filter to suppress only alarm state entries that include the set of specified dimension key-value pairs. + If you specify {\"availabilityDomain\": \"phx-ad-1\"} + and the alarm state entry corresponds to the set {\"availabilityDomain\": \"phx-ad-1\" and \"resourceId\": \"ocid1.instance.region1.phx.exampleuniqueID\"}, + then this alarm will be included for suppression. + + Example: `{\"resourceId\": \"ocid1.instance.region1.phx.exampleuniqueID\"}` + + + :param dimensions: The dimensions of this SummarizeAlarmSuppressionHistoryDetails. + :type: dict(str, str) + """ + self._dimensions = dimensions + + @property + def time_suppress_from_greater_than_or_equal_to(self): + """ + Gets the time_suppress_from_greater_than_or_equal_to of this SummarizeAlarmSuppressionHistoryDetails. + A filter to return only entries with \"timeSuppressFrom\" time occurring on or after the specified time. + + The value cannot be a future time. + Format defined by RFC3339. + + Example: `2023-02-01T01:02:29.600Z` + + + :return: The time_suppress_from_greater_than_or_equal_to of this SummarizeAlarmSuppressionHistoryDetails. + :rtype: datetime + """ + return self._time_suppress_from_greater_than_or_equal_to + + @time_suppress_from_greater_than_or_equal_to.setter + def time_suppress_from_greater_than_or_equal_to(self, time_suppress_from_greater_than_or_equal_to): + """ + Sets the time_suppress_from_greater_than_or_equal_to of this SummarizeAlarmSuppressionHistoryDetails. + A filter to return only entries with \"timeSuppressFrom\" time occurring on or after the specified time. + + The value cannot be a future time. + Format defined by RFC3339. + + Example: `2023-02-01T01:02:29.600Z` + + + :param time_suppress_from_greater_than_or_equal_to: The time_suppress_from_greater_than_or_equal_to of this SummarizeAlarmSuppressionHistoryDetails. + :type: datetime + """ + self._time_suppress_from_greater_than_or_equal_to = time_suppress_from_greater_than_or_equal_to + + @property + def time_suppress_from_less_than(self): + """ + Gets the time_suppress_from_less_than of this SummarizeAlarmSuppressionHistoryDetails. + A filter to return only entries with \"timeSuppressFrom\" time occurring before the specified time. + + The value cannot be a future time. + Format defined by RFC3339. + + Example: `2023-02-01T01:02:29.600Z` + + + :return: The time_suppress_from_less_than of this SummarizeAlarmSuppressionHistoryDetails. + :rtype: datetime + """ + return self._time_suppress_from_less_than + + @time_suppress_from_less_than.setter + def time_suppress_from_less_than(self, time_suppress_from_less_than): + """ + Sets the time_suppress_from_less_than of this SummarizeAlarmSuppressionHistoryDetails. + A filter to return only entries with \"timeSuppressFrom\" time occurring before the specified time. + + The value cannot be a future time. + Format defined by RFC3339. + + Example: `2023-02-01T01:02:29.600Z` + + + :param time_suppress_from_less_than: The time_suppress_from_less_than of this SummarizeAlarmSuppressionHistoryDetails. + :type: datetime + """ + self._time_suppress_from_less_than = time_suppress_from_less_than + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/monitoring/models/summarize_metrics_data_details.py b/src/oci/monitoring/models/summarize_metrics_data_details.py index 29a9e0ed46..0559de1d5b 100644 --- a/src/oci/monitoring/models/summarize_metrics_data_details.py +++ b/src/oci/monitoring/models/summarize_metrics_data_details.py @@ -137,6 +137,7 @@ def query(self): aggregate. The query must specify a metric, statistic, and interval. Supported values for interval depend on the specified time range. More interval values are supported for smaller time ranges. You can optionally specify dimensions and grouping functions. + When specifying a dimension value, surround it with double quotes, and escape each double quote with a backslash (`\\`) character. Supported grouping functions: `grouping()`, `groupBy()`. Construct your query to avoid exceeding limits on returned data. See :class:`MetricData`. @@ -146,7 +147,9 @@ def query(self): For available dimensions, review the metric definition for the supported service. See `Supported Services`__. - Example: `CpuUtilization[1m].sum()` + Example 1: `CpuUtilization[1m].sum()` + + Example 2 (escaped double quotes for value string): `CpuUtilization[1m]{resourceId = \\\"<instance_OCID>\\\"}.max()` __ https://docs.cloud.oracle.com/iaas/Content/Monitoring/Reference/mql.htm __ https://docs.cloud.oracle.com/iaas/Content/Monitoring/Concepts/monitoringoverview.htm#SupportedServices @@ -165,6 +168,7 @@ def query(self, query): aggregate. The query must specify a metric, statistic, and interval. Supported values for interval depend on the specified time range. More interval values are supported for smaller time ranges. You can optionally specify dimensions and grouping functions. + When specifying a dimension value, surround it with double quotes, and escape each double quote with a backslash (`\\`) character. Supported grouping functions: `grouping()`, `groupBy()`. Construct your query to avoid exceeding limits on returned data. See :class:`MetricData`. @@ -174,7 +178,9 @@ def query(self, query): For available dimensions, review the metric definition for the supported service. See `Supported Services`__. - Example: `CpuUtilization[1m].sum()` + Example 1: `CpuUtilization[1m].sum()` + + Example 2 (escaped double quotes for value string): `CpuUtilization[1m]{resourceId = \\\"<instance_OCID>\\\"}.max()` __ https://docs.cloud.oracle.com/iaas/Content/Monitoring/Reference/mql.htm __ https://docs.cloud.oracle.com/iaas/Content/Monitoring/Concepts/monitoringoverview.htm#SupportedServices @@ -193,7 +199,7 @@ def start_time(self): Format is defined by RFC3339. The response includes metric data points for the startTime. Default value: the timestamp 3 hours before the call was sent. - Example: `2019-02-01T01:02:29.600Z` + Example: `2023-02-01T01:02:29.600Z` :return: The start_time of this SummarizeMetricsDataDetails. @@ -209,7 +215,7 @@ def start_time(self, start_time): Format is defined by RFC3339. The response includes metric data points for the startTime. Default value: the timestamp 3 hours before the call was sent. - Example: `2019-02-01T01:02:29.600Z` + Example: `2023-02-01T01:02:29.600Z` :param start_time: The start_time of this SummarizeMetricsDataDetails. @@ -225,7 +231,7 @@ def end_time(self): Format is defined by RFC3339. The response excludes metric data points for the endTime. Default value: the timestamp representing when the call was sent. - Example: `2019-02-01T02:02:29.600Z` + Example: `2023-02-01T02:02:29.600Z` :return: The end_time of this SummarizeMetricsDataDetails. @@ -241,7 +247,7 @@ def end_time(self, end_time): Format is defined by RFC3339. The response excludes metric data points for the endTime. Default value: the timestamp representing when the call was sent. - Example: `2019-02-01T02:02:29.600Z` + Example: `2023-02-01T02:02:29.600Z` :param end_time: The end_time of this SummarizeMetricsDataDetails. diff --git a/src/oci/monitoring/models/suppression.py b/src/oci/monitoring/models/suppression.py index 69458ec8d4..d598d6cac8 100644 --- a/src/oci/monitoring/models/suppression.py +++ b/src/oci/monitoring/models/suppression.py @@ -12,7 +12,8 @@ @init_model_state_from_kwargs class Suppression(object): """ - The configuration details for suppressing an alarm. + The configuration details for an alarm-wide suppression. + For dimension-specific suppressions, see :class:`AlarmSuppression`. For information about alarms, see `Alarms Overview`__. @@ -97,7 +98,7 @@ def time_suppress_from(self): **[Required]** Gets the time_suppress_from of this Suppression. The start date and time for the suppression to take place, inclusive. Format defined by RFC3339. - Example: `2019-02-01T01:02:29.600Z` + Example: `2023-02-01T01:02:29.600Z` :return: The time_suppress_from of this Suppression. @@ -111,7 +112,7 @@ def time_suppress_from(self, time_suppress_from): Sets the time_suppress_from of this Suppression. The start date and time for the suppression to take place, inclusive. Format defined by RFC3339. - Example: `2019-02-01T01:02:29.600Z` + Example: `2023-02-01T01:02:29.600Z` :param time_suppress_from: The time_suppress_from of this Suppression. @@ -125,7 +126,7 @@ def time_suppress_until(self): **[Required]** Gets the time_suppress_until of this Suppression. The end date and time for the suppression to take place, inclusive. Format defined by RFC3339. - Example: `2019-02-01T02:02:29.600Z` + Example: `2023-02-01T02:02:29.600Z` :return: The time_suppress_until of this Suppression. @@ -139,7 +140,7 @@ def time_suppress_until(self, time_suppress_until): Sets the time_suppress_until of this Suppression. The end date and time for the suppression to take place, inclusive. Format defined by RFC3339. - Example: `2019-02-01T02:02:29.600Z` + Example: `2023-02-01T02:02:29.600Z` :param time_suppress_until: The time_suppress_until of this Suppression. diff --git a/src/oci/monitoring/models/update_alarm_details.py b/src/oci/monitoring/models/update_alarm_details.py index a3c7492828..28f536ea7b 100644 --- a/src/oci/monitoring/models/update_alarm_details.py +++ b/src/oci/monitoring/models/update_alarm_details.py @@ -656,8 +656,7 @@ def destinations(self): A list of destinations for alarm notifications. Each destination is represented by the `OCID`__ of a related resource, such as a :class:`NotificationTopic`. - Supported destination services: Notifications - , Streaming. + Supported destination services: Notifications, Streaming. Limit: One destination per supported destination service. __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm @@ -675,8 +674,7 @@ def destinations(self, destinations): A list of destinations for alarm notifications. Each destination is represented by the `OCID`__ of a related resource, such as a :class:`NotificationTopic`. - Supported destination services: Notifications - , Streaming. + Supported destination services: Notifications, Streaming. Limit: One destination per supported destination service. __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm diff --git a/src/oci/monitoring/monitoring_client.py b/src/oci/monitoring/monitoring_client.py index e71145eaf9..2fc16718a3 100644 --- a/src/oci/monitoring/monitoring_client.py +++ b/src/oci/monitoring/monitoring_client.py @@ -23,7 +23,7 @@ class MonitoringClient(object): """ Use the Monitoring API to manage metric queries and alarms for assessing the health, capacity, and performance of your cloud resources. - Endpoints vary by operation. For PostMetric, use the `telemetry-ingestion` endpoints; for all other operations, use the `telemetry` endpoints. + Endpoints vary by operation. For PostMetricData, use the `telemetry-ingestion` endpoints; for all other operations, use the `telemetry` endpoints. For more information, see [the Monitoring documentation](/iaas/Content/Monitoring/home.htm). """ @@ -350,6 +350,112 @@ def create_alarm(self, create_alarm_details, **kwargs): api_reference_link=api_reference_link, required_arguments=required_arguments) + def create_alarm_suppression(self, create_alarm_suppression_details, **kwargs): + """ + Creates a dimension-specific suppression for an alarm. + + For important limits information, see + `Limits on Monitoring`__. + + This call is subject to a Monitoring limit that applies to the total number of requests across all alarm operations. + Monitoring might throttle this call to reject an otherwise valid request when the total rate of alarm operations exceeds 10 requests, + or transactions, per second (TPS) for a given tenancy. + + __ https://docs.cloud.oracle.com/iaas/Content/Monitoring/Concepts/monitoringoverview.htm#limits + + + :param oci.monitoring.models.CreateAlarmSuppressionDetails create_alarm_suppression_details: (required) + The details of the alarm suppression to be created + + :param str opc_request_id: (optional) + Customer part of the request identifier token. If you need to contact Oracle about a particular + request, please provide the complete request ID. + + :param str opc_retry_token: (optional) + A token that uniquely identifies a request so it can be retried in case of a timeout or + server error without risk of executing that same action again. Retry tokens expire after 24 + hours, but can be invalidated before then due to conflicting operations. For example, if a resource + has been deleted and purged from the system, then a retry of the original creation request + might be rejected. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.monitoring.models.AlarmSuppression` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use create_alarm_suppression API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = [] + resource_path = "/alarmSuppressions" + method = "POST" + operation_name = "create_alarm_suppression" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/monitoring/20180401/AlarmSuppression/CreateAlarmSuppression" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "opc_request_id", + "opc_retry_token" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + f"create_alarm_suppression got unknown kwargs: {extra_kwargs!r}") + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing), + "opc-retry-token": kwargs.get("opc_retry_token", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + header_params=header_params, + body=create_alarm_suppression_details, + response_type="AlarmSuppression", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + header_params=header_params, + body=create_alarm_suppression_details, + response_type="AlarmSuppression", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + def delete_alarm(self, alarm_id, **kwargs): """ Deletes the specified alarm. @@ -415,7 +521,380 @@ def delete_alarm(self, alarm_id, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"delete_alarm got unknown kwargs: {extra_kwargs!r}") + f"delete_alarm got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "alarmId": alarm_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: + 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_alarm_suppression(self, alarm_suppression_id, **kwargs): + """ + Deletes the specified alarm suppression. + + For important limits information, see + `Limits on Monitoring`__. + + This call is subject to a Monitoring limit that applies to the total number of requests across all alarm operations. + Monitoring might throttle this call to reject an otherwise valid request when the total rate of alarm operations exceeds 10 requests, + or transactions, per second (TPS) for a given tenancy. + + __ https://docs.cloud.oracle.com/iaas/Content/Monitoring/Concepts/monitoringoverview.htm#limits + + + :param str alarm_suppression_id: (required) + The `OCID`__ of the alarm suppression. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param str opc_request_id: (optional) + Customer part of the request identifier token. If you need to contact Oracle about a particular + request, please provide the complete request ID. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + parameter to the value of the etag from a previous GET or POST response for that resource. The resource + will be updated or deleted only if the etag you provide matches the resource's current etag value. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type None + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use delete_alarm_suppression API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['alarmSuppressionId'] + resource_path = "/alarmSuppressions/{alarmSuppressionId}" + method = "DELETE" + operation_name = "delete_alarm_suppression" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/monitoring/20180401/AlarmSuppression/DeleteAlarmSuppression" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "opc_request_id", + "if_match" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + f"delete_alarm_suppression got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "alarmSuppressionId": alarm_suppression_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing), + "if-match": kwargs.get("if_match", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + + def get_alarm(self, alarm_id, **kwargs): + """ + Gets the specified alarm. + For more information, see + `Getting an Alarm`__. + For important limits information, see + `Limits on Monitoring`__. + + This call is subject to a Monitoring limit that applies to the total number of requests across all alarm operations. + Monitoring might throttle this call to reject an otherwise valid request when the total rate of alarm operations exceeds 10 requests, + or transactions, per second (TPS) for a given tenancy. + + __ https://docs.cloud.oracle.com/iaas/Content/Monitoring/Tasks/get-alarm.htm + __ https://docs.cloud.oracle.com/iaas/Content/Monitoring/Concepts/monitoringoverview.htm#limits + + + :param str alarm_id: (required) + The `OCID`__ of an alarm. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param str opc_request_id: (optional) + Customer part of the request identifier token. If you need to contact Oracle about a particular + request, please provide the complete request ID. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + 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.monitoring.models.Alarm` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_alarm API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['alarmId'] + resource_path = "/alarms/{alarmId}" + method = "GET" + operation_name = "get_alarm" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/monitoring/20180401/Alarm/GetAlarm" + + # 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_alarm got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "alarmId": alarm_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="Alarm", + 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="Alarm", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + + def get_alarm_history(self, alarm_id, **kwargs): + """ + Get the history of the specified alarm. + For more information, see + `Getting History of an Alarm`__. + For important limits information, see + `Limits on Monitoring`__. + + This call is subject to a Monitoring limit that applies to the total number of requests across all alarm operations. + Monitoring might throttle this call to reject an otherwise valid request when the total rate of alarm operations exceeds 10 requests, + or transactions, per second (TPS) for a given tenancy. + + __ https://docs.cloud.oracle.com/iaas/Content/Monitoring/Tasks/get-alarm-history.htm + __ https://docs.cloud.oracle.com/iaas/Content/Monitoring/Concepts/monitoringoverview.htm#limits + + + :param str alarm_id: (required) + The `OCID`__ of an alarm. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param str opc_request_id: (optional) + Customer part of the request identifier token. If you need to contact Oracle about a particular + request, please provide the complete request ID. + + :param str alarm_historytype: (optional) + The type of history entries to retrieve. State history (STATE_HISTORY) or state transition history (STATE_TRANSITION_HISTORY). + If not specified, entries of both types are retrieved. + + Example: `STATE_HISTORY` + + Allowed values are: "STATE_HISTORY", "STATE_TRANSITION_HISTORY" + + :param str page: (optional) + For list pagination. The value of the `opc-next-page` response header from the previous \"List\" call. + For important details about how pagination works, see + `List Pagination`__. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine + + :param int limit: (optional) + For list pagination. The maximum number of results per page, or items to return in a paginated \"List\" call. + For important details about how pagination works, see + `List Pagination`__. + + Default: 1000 + + Example: 500 + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine + + :param datetime timestamp_greater_than_or_equal_to: (optional) + A filter to return only alarm history entries with timestamps occurring on or after the specified date and time. Format defined by RFC3339. + + Example: `2023-01-01T01:00:00.789Z` + + :param datetime timestamp_less_than: (optional) + A filter to return only alarm history entries with timestamps occurring before the specified date and time. Format defined by RFC3339. + + Example: `2023-01-02T01:00:00.789Z` + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.monitoring.models.AlarmHistoryCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_alarm_history API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['alarmId'] + resource_path = "/alarms/{alarmId}/history" + method = "GET" + operation_name = "get_alarm_history" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/monitoring/20180401/AlarmHistoryCollection/GetAlarmHistory" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "opc_request_id", + "alarm_historytype", + "page", + "limit", + "timestamp_greater_than_or_equal_to", + "timestamp_less_than" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + f"get_alarm_history got unknown kwargs: {extra_kwargs!r}") path_params = { "alarmId": alarm_id @@ -427,10 +906,25 @@ def delete_alarm(self, alarm_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 'alarm_historytype' in kwargs: + alarm_historytype_allowed_values = ["STATE_HISTORY", "STATE_TRANSITION_HISTORY"] + if kwargs['alarm_historytype'] not in alarm_historytype_allowed_values: + raise ValueError( + f"Invalid value for `alarm_historytype`, must be one of { alarm_historytype_allowed_values }" + ) + + query_params = { + "alarmHistorytype": kwargs.get("alarm_historytype", missing), + "page": kwargs.get("page", missing), + "limit": kwargs.get("limit", missing), + "timestampGreaterThanOrEqualTo": kwargs.get("timestamp_greater_than_or_equal_to", missing), + "timestampLessThan": kwargs.get("timestamp_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} + 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} @@ -449,7 +943,9 @@ def delete_alarm(self, alarm_id, **kwargs): resource_path=resource_path, method=method, path_params=path_params, + query_params=query_params, header_params=header_params, + response_type="AlarmHistoryCollection", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -459,17 +955,18 @@ def delete_alarm(self, alarm_id, **kwargs): resource_path=resource_path, method=method, path_params=path_params, + query_params=query_params, header_params=header_params, + response_type="AlarmHistoryCollection", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def get_alarm(self, alarm_id, **kwargs): + def get_alarm_suppression(self, alarm_suppression_id, **kwargs): """ - Gets the specified alarm. - For more information, see - `Getting an Alarm`__. + Gets the specified alarm suppression. + For important limits information, see `Limits on Monitoring`__. @@ -477,12 +974,11 @@ def get_alarm(self, alarm_id, **kwargs): Monitoring might throttle this call to reject an otherwise valid request when the total rate of alarm operations exceeds 10 requests, or transactions, per second (TPS) for a given tenancy. - __ https://docs.cloud.oracle.com/iaas/Content/Monitoring/Tasks/get-alarm.htm __ https://docs.cloud.oracle.com/iaas/Content/Monitoring/Concepts/monitoringoverview.htm#limits - :param str alarm_id: (required) - The `OCID`__ of an alarm. + :param str alarm_suppression_id: (required) + The `OCID`__ of the alarm suppression. __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm @@ -502,18 +998,18 @@ def get_alarm(self, alarm_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.monitoring.models.Alarm` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.monitoring.models.AlarmSuppression` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use get_alarm API. + Click `here `__ to see an example of how to use get_alarm_suppression API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['alarmId'] - resource_path = "/alarms/{alarmId}" + required_arguments = ['alarmSuppressionId'] + resource_path = "/alarmSuppressions/{alarmSuppressionId}" method = "GET" - operation_name = "get_alarm" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/monitoring/20180401/Alarm/GetAlarm" + operation_name = "get_alarm_suppression" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/monitoring/20180401/AlarmSuppression/GetAlarmSuppression" # Don't accept unknown kwargs expected_kwargs = [ @@ -524,10 +1020,10 @@ def get_alarm(self, alarm_id, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"get_alarm got unknown kwargs: {extra_kwargs!r}") + f"get_alarm_suppression got unknown kwargs: {extra_kwargs!r}") path_params = { - "alarmId": alarm_id + "alarmSuppressionId": alarm_suppression_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -558,7 +1054,7 @@ def get_alarm(self, alarm_id, **kwargs): method=method, path_params=path_params, header_params=header_params, - response_type="Alarm", + response_type="AlarmSuppression", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -569,17 +1065,17 @@ def get_alarm(self, alarm_id, **kwargs): method=method, path_params=path_params, header_params=header_params, - response_type="Alarm", + response_type="AlarmSuppression", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def get_alarm_history(self, alarm_id, **kwargs): + def list_alarm_suppressions(self, alarm_id, **kwargs): """ - Get the history of the specified alarm. - For more information, see - `Getting History of an Alarm`__. + Lists alarm suppressions for the specified alarm. + Only dimension-level suppressions are listed. Alarm-level suppressions are not listed. + For important limits information, see `Limits on Monitoring`__. @@ -587,12 +1083,11 @@ def get_alarm_history(self, alarm_id, **kwargs): Monitoring might throttle this call to reject an otherwise valid request when the total rate of alarm operations exceeds 10 requests, or transactions, per second (TPS) for a given tenancy. - __ https://docs.cloud.oracle.com/iaas/Content/Monitoring/Tasks/get-alarm-history.htm __ https://docs.cloud.oracle.com/iaas/Content/Monitoring/Concepts/monitoringoverview.htm#limits :param str alarm_id: (required) - The `OCID`__ of an alarm. + The `OCID`__ of the alarm that is the target of the alarm suppression. __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm @@ -600,13 +1095,29 @@ def get_alarm_history(self, alarm_id, **kwargs): Customer part of the request identifier token. If you need to contact Oracle about a particular request, please provide the complete request ID. - :param str alarm_historytype: (optional) - The type of history entries to retrieve. State history (STATE_HISTORY) or state transition history (STATE_TRANSITION_HISTORY). - If not specified, entries of both types are retrieved. + :param str display_name: (optional) + A filter to return only resources that match the given display name exactly. + Use this filter to list a alarm suppression by name. + Alternatively, when you know the alarm suppression OCID, use the GetAlarmSuppression operation. - Example: `STATE_HISTORY` + :param str lifecycle_state: (optional) + A filter to return only resources that match the given lifecycle state exactly. When not specified, only resources in the ACTIVE lifecycle state are listed. - Allowed values are: "STATE_HISTORY", "STATE_TRANSITION_HISTORY" + Allowed values are: "ACTIVE", "DELETED" + + :param str sort_by: (optional) + The field to use when sorting returned alarm suppressions. Only one sorting level is provided. + + Example: `timeCreated` + + Allowed values are: "displayName", "timeCreated", "timeSuppressFrom" + + :param str sort_order: (optional) + The sort order to use when sorting returned alarm suppressions. Ascending (ASC) or descending (DESC). + + Example: `ASC` + + Allowed values are: "ASC", "DESC" :param str page: (optional) For list pagination. The value of the `opc-next-page` response header from the previous \"List\" call. @@ -626,16 +1137,6 @@ def get_alarm_history(self, alarm_id, **kwargs): __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine - :param datetime timestamp_greater_than_or_equal_to: (optional) - A filter to return only alarm history entries with timestamps occurring on or after the specified date and time. Format defined by RFC3339. - - Example: `2019-01-01T01:00:00.789Z` - - :param datetime timestamp_less_than: (optional) - A filter to return only alarm history entries with timestamps occurring before the specified date and time. Format defined by RFC3339. - - Example: `2019-01-02T01:00:00.789Z` - :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. @@ -648,58 +1149,65 @@ def get_alarm_history(self, alarm_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.monitoring.models.AlarmHistoryCollection` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.monitoring.models.AlarmSuppressionCollection` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use get_alarm_history API. + Click `here `__ to see an example of how to use list_alarm_suppressions API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. required_arguments = ['alarmId'] - resource_path = "/alarms/{alarmId}/history" + resource_path = "/alarmSuppressions" method = "GET" - operation_name = "get_alarm_history" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/monitoring/20180401/AlarmHistoryCollection/GetAlarmHistory" + operation_name = "list_alarm_suppressions" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/monitoring/20180401/AlarmSuppressionCollection/ListAlarmSuppressions" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "opc_request_id", - "alarm_historytype", + "display_name", + "lifecycle_state", + "sort_by", + "sort_order", "page", - "limit", - "timestamp_greater_than_or_equal_to", - "timestamp_less_than" + "limit" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"get_alarm_history got unknown kwargs: {extra_kwargs!r}") - - path_params = { - "alarmId": alarm_id - } + f"list_alarm_suppressions got unknown kwargs: {extra_kwargs!r}") - 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 = ["ACTIVE", "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_by' in kwargs: + sort_by_allowed_values = ["displayName", "timeCreated", "timeSuppressFrom"] + 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 'alarm_historytype' in kwargs: - alarm_historytype_allowed_values = ["STATE_HISTORY", "STATE_TRANSITION_HISTORY"] - if kwargs['alarm_historytype'] not in alarm_historytype_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 `alarm_historytype`, must be one of { alarm_historytype_allowed_values }" + f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }" ) query_params = { - "alarmHistorytype": kwargs.get("alarm_historytype", missing), + "alarmId": alarm_id, + "displayName": kwargs.get("display_name", missing), + "lifecycleState": kwargs.get("lifecycle_state", missing), + "sortBy": kwargs.get("sort_by", missing), + "sortOrder": kwargs.get("sort_order", missing), "page": kwargs.get("page", missing), - "limit": kwargs.get("limit", missing), - "timestampGreaterThanOrEqualTo": kwargs.get("timestamp_greater_than_or_equal_to", missing), - "timestampLessThan": kwargs.get("timestamp_less_than", 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} @@ -723,10 +1231,9 @@ def get_alarm_history(self, alarm_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="AlarmHistoryCollection", + response_type="AlarmSuppressionCollection", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -735,10 +1242,9 @@ def get_alarm_history(self, alarm_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="AlarmHistoryCollection", + response_type="AlarmSuppressionCollection", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -941,6 +1447,7 @@ def list_alarms_status(self, compartment_id, **kwargs): List the status of each alarm in the specified compartment. Status is collective, across all metric streams in the alarm. To list alarm status for each metric stream, use :func:`retrieve_dimension_states`. + Optionally filter by resource or status value. For more information, see `Listing Alarm Statuses`__. For important limits information, see @@ -1011,8 +1518,8 @@ def list_alarms_status(self, compartment_id, **kwargs): Allowed values are: "ASC", "DESC" :param str resource_id: (optional) - The `OCID`__ of a resource that is monitored by the - metric that you are searching for. + A filter to return only the resource with the specified `OCID`__. + The resource must be monitored by the metric that you are searching for. Example: `ocid1.instance.oc1.phx.exampleuniqueID` @@ -1025,17 +1532,16 @@ def list_alarms_status(self, compartment_id, **kwargs): Example: `logging-analytics` :param str entity_id: (optional) - The `OCID`__ of the entity monitored by the - metric that you are searching for. + A filter to return only resources that match the given entity `OCID`__ exactly. + The resource (entity) must be monitored by the metric that you are searching for. Example: `ocid1.instance.oc1.phx.exampleuniqueID` __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm :param str status: (optional) - The status of the metric stream to use for alarm filtering. For example, set `StatusQueryParam` to - \"FIRING\" to filter results to metric streams of the alarm with that status. Default behaviour is to return - alarms irrespective of metric streams' status. + A filter to return only metric streams that match the specified status. + For example, the value \"FIRING\" returns only firing metric streams. Example: `FIRING` @@ -1698,6 +2204,148 @@ def retrieve_dimension_states(self, alarm_id, **kwargs): api_reference_link=api_reference_link, required_arguments=required_arguments) + def summarize_alarm_suppression_history(self, alarm_id, **kwargs): + """ + Returns history of suppressions for the specified alarm, including both dimension-specific and and alarm-wide suppressions. + + For important limits information, see + `Limits on Monitoring`__. + + This call is subject to a Monitoring limit that applies to the total number of requests across all alarm operations. + Monitoring might throttle this call to reject an otherwise valid request when the total rate of alarm operations exceeds 10 requests, + or transactions, per second (TPS) for a given tenancy. + + __ https://docs.cloud.oracle.com/iaas/Content/Monitoring/Concepts/monitoringoverview.htm#limits + + + :param str alarm_id: (required) + The `OCID`__ of an alarm. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param str opc_request_id: (optional) + Customer part of the request identifier token. If you need to contact Oracle about a particular + request, please provide the complete request ID. + + :param str page: (optional) + For list pagination. The value of the `opc-next-page` response header from the previous \"List\" call. + For important details about how pagination works, see + `List Pagination`__. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine + + :param int limit: (optional) + For list pagination. The maximum number of results per page, or items to return in a paginated \"List\" call. + For important details about how pagination works, see + `List Pagination`__. + + Default: 1000 + + Example: 500 + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine + + :param oci.monitoring.models.SummarizeAlarmSuppressionHistoryDetails summarize_alarm_suppression_history_details: (optional) + summarize history details + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.monitoring.models.AlarmSuppressionHistoryItemCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use summarize_alarm_suppression_history API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['alarmId'] + resource_path = "/alarms/{alarmId}/actions/summarizeAlarmSuppressionHistory" + method = "POST" + operation_name = "summarize_alarm_suppression_history" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/monitoring/20180401/AlarmSuppression/SummarizeAlarmSuppressionHistory" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "opc_request_id", + "page", + "limit", + "summarize_alarm_suppression_history_details" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + f"summarize_alarm_suppression_history got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "alarmId": alarm_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 = { + "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) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=kwargs.get('summarize_alarm_suppression_history_details'), + response_type="AlarmSuppressionHistoryItemCollection", + 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, + body=kwargs.get('summarize_alarm_suppression_history_details'), + response_type="AlarmSuppressionHistoryItemCollection", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + def summarize_metrics_data(self, compartment_id, summarize_metrics_data_details, **kwargs): """ Returns aggregated data that match the criteria specified in the request. Compartment OCID required. diff --git a/src/oci/monitoring/monitoring_client_composite_operations.py b/src/oci/monitoring/monitoring_client_composite_operations.py index 5fd5fdae30..d72882d39d 100644 --- a/src/oci/monitoring/monitoring_client_composite_operations.py +++ b/src/oci/monitoring/monitoring_client_composite_operations.py @@ -68,6 +68,49 @@ def create_alarm_and_wait_for_state(self, create_alarm_details, wait_for_states= except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def create_alarm_suppression_and_wait_for_state(self, create_alarm_suppression_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.monitoring.MonitoringClient.create_alarm_suppression` and waits for the :py:class:`~oci.monitoring.models.AlarmSuppression` acted upon + to enter the given state(s). + + :param oci.monitoring.models.CreateAlarmSuppressionDetails create_alarm_suppression_details: (required) + The details of the alarm suppression to be created + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.monitoring.models.AlarmSuppression.lifecycle_state` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.monitoring.MonitoringClient.create_alarm_suppression` + + :param dict waiter_kwargs: + A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` + as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait + """ + operation_result = self.client.create_alarm_suppression(create_alarm_suppression_details, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + alarm_suppression_id = operation_result.data.id + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_alarm_suppression(alarm_suppression_id), # noqa: F821 + evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except (NameError, TypeError) as e: + if not e.args: + e.args = ('',) + e.args = e.args + ('This composite operation is currently not supported in the SDK. Please use the operation from the service client and use waiters as an alternative. For more information on waiters, visit: "https://docs.oracle.com/en-us/iaas/tools/python/latest/api/waiters.html"', ) + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def delete_alarm_and_wait_for_state(self, alarm_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ Calls :py:func:`~oci.monitoring.MonitoringClient.delete_alarm` and waits for the :py:class:`~oci.monitoring.models.Alarm` acted upon @@ -130,6 +173,68 @@ def delete_alarm_and_wait_for_state(self, alarm_id, wait_for_states=[], operatio except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def delete_alarm_suppression_and_wait_for_state(self, alarm_suppression_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.monitoring.MonitoringClient.delete_alarm_suppression` and waits for the :py:class:`~oci.monitoring.models.AlarmSuppression` acted upon + to enter the given state(s). + + :param str alarm_suppression_id: (required) + The `OCID`__ of the alarm suppression. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.monitoring.models.AlarmSuppression.lifecycle_state` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.monitoring.MonitoringClient.delete_alarm_suppression` + + :param dict waiter_kwargs: + A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` + as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait + """ + initial_get_result = self.client.get_alarm_suppression(alarm_suppression_id) + operation_result = None + try: + operation_result = self.client.delete_alarm_suppression(alarm_suppression_id, **operation_kwargs) + except oci.exceptions.ServiceError as e: + if e.status == 404: + return WAIT_RESOURCE_NOT_FOUND + else: + raise e + + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + + try: + if ("succeed_on_not_found" in waiter_kwargs) and (waiter_kwargs["succeed_on_not_found"] is False): + self.client.base_client.logger.warning("The waiter kwarg succeed_on_not_found was passed as False for the delete composite operation delete_alarm_suppression, this would result in the operation to fail if the resource is not found! Please, do not pass this kwarg if this was not intended") + else: + """ + If the user does not send in this value, we set it to True by default. + We are doing this because during a delete resource scenario and waiting on its state, the service can + return a 404 NOT FOUND exception as the resource was deleted and a get on its state would fail + """ + waiter_kwargs["succeed_on_not_found"] = True + waiter_result = oci.wait_until( + self.client, + initial_get_result, # noqa: F821 + evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except (NameError, TypeError) as e: + if not e.args: + e.args = ('',) + e.args = e.args + ('This composite operation is currently not supported in the SDK. Please use the operation from the service client and use waiters as an alternative. For more information on waiters, visit: "https://docs.oracle.com/en-us/iaas/tools/python/latest/api/waiters.html"', ) + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def update_alarm_and_wait_for_state(self, alarm_id, update_alarm_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ Calls :py:func:`~oci.monitoring.MonitoringClient.update_alarm` and waits for the :py:class:`~oci.monitoring.models.Alarm` acted upon diff --git a/src/oci/version.py b/src/oci/version.py index cc0f274367..117e5a6d4c 100644 --- a/src/oci/version.py +++ b/src/oci/version.py @@ -2,4 +2,4 @@ # Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. -__version__ = "2.118.2" +__version__ = "2.119.0"