diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index c522f099a3..29f95c5d26 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -4,6 +4,19 @@ All notable changes to this project will be documented in this file.
The format is based on `Keep a Changelog `_.
+====================
+2.3.1 - 2019-08-20
+====================
+
+Added
+-----
+* Support for the Limits service
+* Support for archiving to Object Storage in the Streaming service
+* Support for etags on resources in the Streaming service
+* Support for Key Management service (KMS) encryption of file systems in the File Storage service
+* Support for moving public IP, DHCP, local peering gateway, internet gateway, network security group, and DRG attachment resources across compartments in the Networking service
+* Support for multi-origin, basic cache, certificate mapping, and OCI Monitoring service integration in the Web Application Acceleration and Security service
+
====================
2.3.0 - 2019-08-13
====================
diff --git a/README-development.rst b/README-development.rst
index c9e2ce1809..6390bec5a9 100644
--- a/README-development.rst
+++ b/README-development.rst
@@ -2,6 +2,10 @@
Development
============
+The target audience for this README is developers wanting to contribute to the
+SDK. If you wish to use the SDK with your own programs, please see
+README.rst
+
Getting Started
===============
Assuming that you have Python and `virtualenv` installed, set up your environment and install the required dependencies like this:
diff --git a/docs/api/core.rst b/docs/api/core.rst
index 960fa3c5ea..8144ee0b17 100644
--- a/docs/api/core.rst
+++ b/docs/api/core.rst
@@ -58,12 +58,17 @@ Core Services
oci.core.models.ChangeCpeCompartmentDetails
oci.core.models.ChangeCrossConnectCompartmentDetails
oci.core.models.ChangeCrossConnectGroupCompartmentDetails
+ oci.core.models.ChangeDhcpOptionsCompartmentDetails
oci.core.models.ChangeIPSecConnectionCompartmentDetails
oci.core.models.ChangeImageCompartmentDetails
oci.core.models.ChangeInstanceCompartmentDetails
oci.core.models.ChangeInstanceConfigurationCompartmentDetails
oci.core.models.ChangeInstancePoolCompartmentDetails
+ oci.core.models.ChangeInternetGatewayCompartmentDetails
+ oci.core.models.ChangeLocalPeeringGatewayCompartmentDetails
oci.core.models.ChangeNatGatewayCompartmentDetails
+ oci.core.models.ChangeNetworkSecurityGroupCompartmentDetails
+ oci.core.models.ChangePublicIpCompartmentDetails
oci.core.models.ChangeRemotePeeringConnectionCompartmentDetails
oci.core.models.ChangeRouteTableCompartmentDetails
oci.core.models.ChangeSecurityListCompartmentDetails
diff --git a/docs/api/core/models/oci.core.models.ChangeDhcpOptionsCompartmentDetails.rst b/docs/api/core/models/oci.core.models.ChangeDhcpOptionsCompartmentDetails.rst
new file mode 100644
index 0000000000..32182bd18a
--- /dev/null
+++ b/docs/api/core/models/oci.core.models.ChangeDhcpOptionsCompartmentDetails.rst
@@ -0,0 +1,11 @@
+ChangeDhcpOptionsCompartmentDetails
+===================================
+
+.. currentmodule:: oci.core.models
+
+.. autoclass:: ChangeDhcpOptionsCompartmentDetails
+ :show-inheritance:
+ :special-members: __init__
+ :members:
+ :undoc-members:
+ :inherited-members:
\ No newline at end of file
diff --git a/docs/api/core/models/oci.core.models.ChangeInternetGatewayCompartmentDetails.rst b/docs/api/core/models/oci.core.models.ChangeInternetGatewayCompartmentDetails.rst
new file mode 100644
index 0000000000..5c094b8523
--- /dev/null
+++ b/docs/api/core/models/oci.core.models.ChangeInternetGatewayCompartmentDetails.rst
@@ -0,0 +1,11 @@
+ChangeInternetGatewayCompartmentDetails
+=======================================
+
+.. currentmodule:: oci.core.models
+
+.. autoclass:: ChangeInternetGatewayCompartmentDetails
+ :show-inheritance:
+ :special-members: __init__
+ :members:
+ :undoc-members:
+ :inherited-members:
\ No newline at end of file
diff --git a/docs/api/core/models/oci.core.models.ChangeLocalPeeringGatewayCompartmentDetails.rst b/docs/api/core/models/oci.core.models.ChangeLocalPeeringGatewayCompartmentDetails.rst
new file mode 100644
index 0000000000..14899ad2de
--- /dev/null
+++ b/docs/api/core/models/oci.core.models.ChangeLocalPeeringGatewayCompartmentDetails.rst
@@ -0,0 +1,11 @@
+ChangeLocalPeeringGatewayCompartmentDetails
+===========================================
+
+.. currentmodule:: oci.core.models
+
+.. autoclass:: ChangeLocalPeeringGatewayCompartmentDetails
+ :show-inheritance:
+ :special-members: __init__
+ :members:
+ :undoc-members:
+ :inherited-members:
\ No newline at end of file
diff --git a/docs/api/core/models/oci.core.models.ChangeNetworkSecurityGroupCompartmentDetails.rst b/docs/api/core/models/oci.core.models.ChangeNetworkSecurityGroupCompartmentDetails.rst
new file mode 100644
index 0000000000..b3f90d165e
--- /dev/null
+++ b/docs/api/core/models/oci.core.models.ChangeNetworkSecurityGroupCompartmentDetails.rst
@@ -0,0 +1,11 @@
+ChangeNetworkSecurityGroupCompartmentDetails
+============================================
+
+.. currentmodule:: oci.core.models
+
+.. autoclass:: ChangeNetworkSecurityGroupCompartmentDetails
+ :show-inheritance:
+ :special-members: __init__
+ :members:
+ :undoc-members:
+ :inherited-members:
\ No newline at end of file
diff --git a/docs/api/core/models/oci.core.models.ChangePublicIpCompartmentDetails.rst b/docs/api/core/models/oci.core.models.ChangePublicIpCompartmentDetails.rst
new file mode 100644
index 0000000000..92cda0cc4c
--- /dev/null
+++ b/docs/api/core/models/oci.core.models.ChangePublicIpCompartmentDetails.rst
@@ -0,0 +1,11 @@
+ChangePublicIpCompartmentDetails
+================================
+
+.. currentmodule:: oci.core.models
+
+.. autoclass:: ChangePublicIpCompartmentDetails
+ :show-inheritance:
+ :special-members: __init__
+ :members:
+ :undoc-members:
+ :inherited-members:
\ No newline at end of file
diff --git a/docs/api/landing.rst b/docs/api/landing.rst
index f2dcf63b6b..f75c4b29c9 100644
--- a/docs/api/landing.rst
+++ b/docs/api/landing.rst
@@ -30,6 +30,7 @@ API Reference
* :doc:`Kms Crypto `
* :doc:`Kms Management `
* :doc:`Kms Vault `
+* :doc:`Limits `
* :doc:`Quotas `
* :doc:`Load Balancer `
* :doc:`Monitoring `
diff --git a/docs/api/limits.rst b/docs/api/limits.rst
index 2ceb583697..00435e7846 100644
--- a/docs/api/limits.rst
+++ b/docs/api/limits.rst
@@ -6,7 +6,9 @@ Limits
:nosignatures:
:template: autosummary/service_client.rst
+ oci.limits.LimitsClient
oci.limits.QuotasClient
+ oci.limits.LimitsClientCompositeOperations
oci.limits.QuotasClientCompositeOperations
--------
@@ -19,6 +21,10 @@ Limits
:template: autosummary/model_class.rst
oci.limits.models.CreateQuotaDetails
+ oci.limits.models.LimitDefinitionSummary
+ oci.limits.models.LimitValueSummary
oci.limits.models.Quota
oci.limits.models.QuotaSummary
+ oci.limits.models.ResourceAvailability
+ oci.limits.models.ServiceSummary
oci.limits.models.UpdateQuotaDetails
diff --git a/docs/api/limits/client/oci.limits.LimitsClient.rst b/docs/api/limits/client/oci.limits.LimitsClient.rst
new file mode 100644
index 0000000000..6c53a0cf51
--- /dev/null
+++ b/docs/api/limits/client/oci.limits.LimitsClient.rst
@@ -0,0 +1,8 @@
+LimitsClient
+============
+
+.. currentmodule:: oci.limits
+
+.. autoclass:: LimitsClient
+ :special-members: __init__
+ :members:
\ No newline at end of file
diff --git a/docs/api/limits/client/oci.limits.LimitsClientCompositeOperations.rst b/docs/api/limits/client/oci.limits.LimitsClientCompositeOperations.rst
new file mode 100644
index 0000000000..ef41eaffc0
--- /dev/null
+++ b/docs/api/limits/client/oci.limits.LimitsClientCompositeOperations.rst
@@ -0,0 +1,8 @@
+LimitsClientCompositeOperations
+===============================
+
+.. currentmodule:: oci.limits
+
+.. autoclass:: LimitsClientCompositeOperations
+ :special-members: __init__
+ :members:
\ No newline at end of file
diff --git a/docs/api/limits/models/oci.limits.models.LimitDefinitionSummary.rst b/docs/api/limits/models/oci.limits.models.LimitDefinitionSummary.rst
new file mode 100644
index 0000000000..e34c1dde31
--- /dev/null
+++ b/docs/api/limits/models/oci.limits.models.LimitDefinitionSummary.rst
@@ -0,0 +1,11 @@
+LimitDefinitionSummary
+======================
+
+.. currentmodule:: oci.limits.models
+
+.. autoclass:: LimitDefinitionSummary
+ :show-inheritance:
+ :special-members: __init__
+ :members:
+ :undoc-members:
+ :inherited-members:
\ No newline at end of file
diff --git a/docs/api/limits/models/oci.limits.models.LimitValueSummary.rst b/docs/api/limits/models/oci.limits.models.LimitValueSummary.rst
new file mode 100644
index 0000000000..32d193ddbe
--- /dev/null
+++ b/docs/api/limits/models/oci.limits.models.LimitValueSummary.rst
@@ -0,0 +1,11 @@
+LimitValueSummary
+=================
+
+.. currentmodule:: oci.limits.models
+
+.. autoclass:: LimitValueSummary
+ :show-inheritance:
+ :special-members: __init__
+ :members:
+ :undoc-members:
+ :inherited-members:
\ No newline at end of file
diff --git a/docs/api/limits/models/oci.limits.models.ResourceAvailability.rst b/docs/api/limits/models/oci.limits.models.ResourceAvailability.rst
new file mode 100644
index 0000000000..acfab9ce07
--- /dev/null
+++ b/docs/api/limits/models/oci.limits.models.ResourceAvailability.rst
@@ -0,0 +1,11 @@
+ResourceAvailability
+====================
+
+.. currentmodule:: oci.limits.models
+
+.. autoclass:: ResourceAvailability
+ :show-inheritance:
+ :special-members: __init__
+ :members:
+ :undoc-members:
+ :inherited-members:
\ No newline at end of file
diff --git a/docs/api/limits/models/oci.limits.models.ServiceSummary.rst b/docs/api/limits/models/oci.limits.models.ServiceSummary.rst
new file mode 100644
index 0000000000..6cb8b92b9f
--- /dev/null
+++ b/docs/api/limits/models/oci.limits.models.ServiceSummary.rst
@@ -0,0 +1,11 @@
+ServiceSummary
+==============
+
+.. currentmodule:: oci.limits.models
+
+.. autoclass:: ServiceSummary
+ :show-inheritance:
+ :special-members: __init__
+ :members:
+ :undoc-members:
+ :inherited-members:
\ No newline at end of file
diff --git a/docs/api/streaming.rst b/docs/api/streaming.rst
index b4bb8e6c40..618a8d6732 100644
--- a/docs/api/streaming.rst
+++ b/docs/api/streaming.rst
@@ -20,7 +20,10 @@ Streaming
:nosignatures:
:template: autosummary/model_class.rst
+ oci.streaming.models.Archiver
+ oci.streaming.models.ArchiverError
oci.streaming.models.ChangeStreamCompartmentDetails
+ oci.streaming.models.CreateArchiverDetails
oci.streaming.models.CreateCursorDetails
oci.streaming.models.CreateGroupCursorDetails
oci.streaming.models.CreateStreamDetails
@@ -34,5 +37,6 @@ Streaming
oci.streaming.models.PutMessagesResultEntry
oci.streaming.models.Stream
oci.streaming.models.StreamSummary
+ oci.streaming.models.UpdateArchiverDetails
oci.streaming.models.UpdateGroupDetails
oci.streaming.models.UpdateStreamDetails
diff --git a/docs/api/streaming/models/oci.streaming.models.Archiver.rst b/docs/api/streaming/models/oci.streaming.models.Archiver.rst
new file mode 100644
index 0000000000..b8d716b2ab
--- /dev/null
+++ b/docs/api/streaming/models/oci.streaming.models.Archiver.rst
@@ -0,0 +1,11 @@
+Archiver
+========
+
+.. currentmodule:: oci.streaming.models
+
+.. autoclass:: Archiver
+ :show-inheritance:
+ :special-members: __init__
+ :members:
+ :undoc-members:
+ :inherited-members:
\ No newline at end of file
diff --git a/docs/api/streaming/models/oci.streaming.models.ArchiverError.rst b/docs/api/streaming/models/oci.streaming.models.ArchiverError.rst
new file mode 100644
index 0000000000..8845779c45
--- /dev/null
+++ b/docs/api/streaming/models/oci.streaming.models.ArchiverError.rst
@@ -0,0 +1,11 @@
+ArchiverError
+=============
+
+.. currentmodule:: oci.streaming.models
+
+.. autoclass:: ArchiverError
+ :show-inheritance:
+ :special-members: __init__
+ :members:
+ :undoc-members:
+ :inherited-members:
\ No newline at end of file
diff --git a/docs/api/streaming/models/oci.streaming.models.CreateArchiverDetails.rst b/docs/api/streaming/models/oci.streaming.models.CreateArchiverDetails.rst
new file mode 100644
index 0000000000..d2d21a6dda
--- /dev/null
+++ b/docs/api/streaming/models/oci.streaming.models.CreateArchiverDetails.rst
@@ -0,0 +1,11 @@
+CreateArchiverDetails
+=====================
+
+.. currentmodule:: oci.streaming.models
+
+.. autoclass:: CreateArchiverDetails
+ :show-inheritance:
+ :special-members: __init__
+ :members:
+ :undoc-members:
+ :inherited-members:
\ No newline at end of file
diff --git a/docs/api/streaming/models/oci.streaming.models.UpdateArchiverDetails.rst b/docs/api/streaming/models/oci.streaming.models.UpdateArchiverDetails.rst
new file mode 100644
index 0000000000..2d91694e8e
--- /dev/null
+++ b/docs/api/streaming/models/oci.streaming.models.UpdateArchiverDetails.rst
@@ -0,0 +1,11 @@
+UpdateArchiverDetails
+=====================
+
+.. currentmodule:: oci.streaming.models
+
+.. autoclass:: UpdateArchiverDetails
+ :show-inheritance:
+ :special-members: __init__
+ :members:
+ :undoc-members:
+ :inherited-members:
\ No newline at end of file
diff --git a/docs/api/waas.rst b/docs/api/waas.rst
index e40304e259..3418b562d1 100644
--- a/docs/api/waas.rst
+++ b/docs/api/waas.rst
@@ -20,8 +20,13 @@ Waas
oci.waas.models.AccessRule
oci.waas.models.AccessRuleCriteria
+ oci.waas.models.AddressList
+ oci.waas.models.AddressListSummary
oci.waas.models.AddressRateLimiting
oci.waas.models.BlockChallengeSettings
+ oci.waas.models.CachingRule
+ oci.waas.models.CachingRuleCriteria
+ oci.waas.models.CachingRuleSummary
oci.waas.models.Captcha
oci.waas.models.Certificate
oci.waas.models.CertificateExtensions
@@ -29,10 +34,17 @@ Waas
oci.waas.models.CertificatePublicKeyInfo
oci.waas.models.CertificateSubjectName
oci.waas.models.CertificateSummary
+ oci.waas.models.ChangeAddressListCompartmentDetails
oci.waas.models.ChangeCertificateCompartmentDetails
+ oci.waas.models.ChangeCustomProtectionRuleCompartmentDetails
oci.waas.models.ChangeWaasPolicyCompartmentDetails
+ oci.waas.models.CreateAddressListDetails
oci.waas.models.CreateCertificateDetails
+ oci.waas.models.CreateCustomProtectionRuleDetails
oci.waas.models.CreateWaasPolicyDetails
+ oci.waas.models.CustomProtectionRule
+ oci.waas.models.CustomProtectionRuleSetting
+ oci.waas.models.CustomProtectionRuleSummary
oci.waas.models.DeviceFingerprintChallenge
oci.waas.models.EdgeSubnet
oci.waas.models.GoodBot
@@ -40,17 +52,23 @@ Waas
oci.waas.models.HumanInteractionChallenge
oci.waas.models.JsChallenge
oci.waas.models.Origin
+ oci.waas.models.OriginGroup
+ oci.waas.models.OriginGroupOrigins
oci.waas.models.PolicyConfig
oci.waas.models.ProtectionRule
oci.waas.models.ProtectionRuleAction
oci.waas.models.ProtectionRuleExclusion
oci.waas.models.ProtectionSettings
+ oci.waas.models.PurgeCache
oci.waas.models.Recommendation
oci.waas.models.ThreatFeed
oci.waas.models.ThreatFeedAction
+ oci.waas.models.UpdateAddressListDetails
oci.waas.models.UpdateCertificateDetails
+ oci.waas.models.UpdateCustomProtectionRuleDetails
oci.waas.models.UpdateWaasPolicyDetails
oci.waas.models.WaasPolicy
+ oci.waas.models.WaasPolicyCustomProtectionRuleSummary
oci.waas.models.WaasPolicySummary
oci.waas.models.WafBlockedRequest
oci.waas.models.WafConfig
diff --git a/docs/api/waas/models/oci.waas.models.AddressList.rst b/docs/api/waas/models/oci.waas.models.AddressList.rst
new file mode 100644
index 0000000000..3cf859f665
--- /dev/null
+++ b/docs/api/waas/models/oci.waas.models.AddressList.rst
@@ -0,0 +1,11 @@
+AddressList
+===========
+
+.. currentmodule:: oci.waas.models
+
+.. autoclass:: AddressList
+ :show-inheritance:
+ :special-members: __init__
+ :members:
+ :undoc-members:
+ :inherited-members:
\ No newline at end of file
diff --git a/docs/api/waas/models/oci.waas.models.AddressListSummary.rst b/docs/api/waas/models/oci.waas.models.AddressListSummary.rst
new file mode 100644
index 0000000000..9180f027e3
--- /dev/null
+++ b/docs/api/waas/models/oci.waas.models.AddressListSummary.rst
@@ -0,0 +1,11 @@
+AddressListSummary
+==================
+
+.. currentmodule:: oci.waas.models
+
+.. autoclass:: AddressListSummary
+ :show-inheritance:
+ :special-members: __init__
+ :members:
+ :undoc-members:
+ :inherited-members:
\ No newline at end of file
diff --git a/docs/api/waas/models/oci.waas.models.CachingRule.rst b/docs/api/waas/models/oci.waas.models.CachingRule.rst
new file mode 100644
index 0000000000..70685fddb3
--- /dev/null
+++ b/docs/api/waas/models/oci.waas.models.CachingRule.rst
@@ -0,0 +1,11 @@
+CachingRule
+===========
+
+.. currentmodule:: oci.waas.models
+
+.. autoclass:: CachingRule
+ :show-inheritance:
+ :special-members: __init__
+ :members:
+ :undoc-members:
+ :inherited-members:
\ No newline at end of file
diff --git a/docs/api/waas/models/oci.waas.models.CachingRuleCriteria.rst b/docs/api/waas/models/oci.waas.models.CachingRuleCriteria.rst
new file mode 100644
index 0000000000..aa452f9026
--- /dev/null
+++ b/docs/api/waas/models/oci.waas.models.CachingRuleCriteria.rst
@@ -0,0 +1,11 @@
+CachingRuleCriteria
+===================
+
+.. currentmodule:: oci.waas.models
+
+.. autoclass:: CachingRuleCriteria
+ :show-inheritance:
+ :special-members: __init__
+ :members:
+ :undoc-members:
+ :inherited-members:
\ No newline at end of file
diff --git a/docs/api/waas/models/oci.waas.models.CachingRuleSummary.rst b/docs/api/waas/models/oci.waas.models.CachingRuleSummary.rst
new file mode 100644
index 0000000000..602bab743b
--- /dev/null
+++ b/docs/api/waas/models/oci.waas.models.CachingRuleSummary.rst
@@ -0,0 +1,11 @@
+CachingRuleSummary
+==================
+
+.. currentmodule:: oci.waas.models
+
+.. autoclass:: CachingRuleSummary
+ :show-inheritance:
+ :special-members: __init__
+ :members:
+ :undoc-members:
+ :inherited-members:
\ No newline at end of file
diff --git a/docs/api/waas/models/oci.waas.models.ChangeAddressListCompartmentDetails.rst b/docs/api/waas/models/oci.waas.models.ChangeAddressListCompartmentDetails.rst
new file mode 100644
index 0000000000..5daf2b92eb
--- /dev/null
+++ b/docs/api/waas/models/oci.waas.models.ChangeAddressListCompartmentDetails.rst
@@ -0,0 +1,11 @@
+ChangeAddressListCompartmentDetails
+===================================
+
+.. currentmodule:: oci.waas.models
+
+.. autoclass:: ChangeAddressListCompartmentDetails
+ :show-inheritance:
+ :special-members: __init__
+ :members:
+ :undoc-members:
+ :inherited-members:
\ No newline at end of file
diff --git a/docs/api/waas/models/oci.waas.models.ChangeCustomProtectionRuleCompartmentDetails.rst b/docs/api/waas/models/oci.waas.models.ChangeCustomProtectionRuleCompartmentDetails.rst
new file mode 100644
index 0000000000..6924941295
--- /dev/null
+++ b/docs/api/waas/models/oci.waas.models.ChangeCustomProtectionRuleCompartmentDetails.rst
@@ -0,0 +1,11 @@
+ChangeCustomProtectionRuleCompartmentDetails
+============================================
+
+.. currentmodule:: oci.waas.models
+
+.. autoclass:: ChangeCustomProtectionRuleCompartmentDetails
+ :show-inheritance:
+ :special-members: __init__
+ :members:
+ :undoc-members:
+ :inherited-members:
\ No newline at end of file
diff --git a/docs/api/waas/models/oci.waas.models.CreateAddressListDetails.rst b/docs/api/waas/models/oci.waas.models.CreateAddressListDetails.rst
new file mode 100644
index 0000000000..ca670e20c7
--- /dev/null
+++ b/docs/api/waas/models/oci.waas.models.CreateAddressListDetails.rst
@@ -0,0 +1,11 @@
+CreateAddressListDetails
+========================
+
+.. currentmodule:: oci.waas.models
+
+.. autoclass:: CreateAddressListDetails
+ :show-inheritance:
+ :special-members: __init__
+ :members:
+ :undoc-members:
+ :inherited-members:
\ No newline at end of file
diff --git a/docs/api/waas/models/oci.waas.models.CreateCustomProtectionRuleDetails.rst b/docs/api/waas/models/oci.waas.models.CreateCustomProtectionRuleDetails.rst
new file mode 100644
index 0000000000..6a2859ff8b
--- /dev/null
+++ b/docs/api/waas/models/oci.waas.models.CreateCustomProtectionRuleDetails.rst
@@ -0,0 +1,11 @@
+CreateCustomProtectionRuleDetails
+=================================
+
+.. currentmodule:: oci.waas.models
+
+.. autoclass:: CreateCustomProtectionRuleDetails
+ :show-inheritance:
+ :special-members: __init__
+ :members:
+ :undoc-members:
+ :inherited-members:
\ No newline at end of file
diff --git a/docs/api/waas/models/oci.waas.models.CustomProtectionRule.rst b/docs/api/waas/models/oci.waas.models.CustomProtectionRule.rst
new file mode 100644
index 0000000000..f5fb50244f
--- /dev/null
+++ b/docs/api/waas/models/oci.waas.models.CustomProtectionRule.rst
@@ -0,0 +1,11 @@
+CustomProtectionRule
+====================
+
+.. currentmodule:: oci.waas.models
+
+.. autoclass:: CustomProtectionRule
+ :show-inheritance:
+ :special-members: __init__
+ :members:
+ :undoc-members:
+ :inherited-members:
\ No newline at end of file
diff --git a/docs/api/waas/models/oci.waas.models.CustomProtectionRuleSetting.rst b/docs/api/waas/models/oci.waas.models.CustomProtectionRuleSetting.rst
new file mode 100644
index 0000000000..41a4e0dc7b
--- /dev/null
+++ b/docs/api/waas/models/oci.waas.models.CustomProtectionRuleSetting.rst
@@ -0,0 +1,11 @@
+CustomProtectionRuleSetting
+===========================
+
+.. currentmodule:: oci.waas.models
+
+.. autoclass:: CustomProtectionRuleSetting
+ :show-inheritance:
+ :special-members: __init__
+ :members:
+ :undoc-members:
+ :inherited-members:
\ No newline at end of file
diff --git a/docs/api/waas/models/oci.waas.models.CustomProtectionRuleSummary.rst b/docs/api/waas/models/oci.waas.models.CustomProtectionRuleSummary.rst
new file mode 100644
index 0000000000..ba5366ba7d
--- /dev/null
+++ b/docs/api/waas/models/oci.waas.models.CustomProtectionRuleSummary.rst
@@ -0,0 +1,11 @@
+CustomProtectionRuleSummary
+===========================
+
+.. currentmodule:: oci.waas.models
+
+.. autoclass:: CustomProtectionRuleSummary
+ :show-inheritance:
+ :special-members: __init__
+ :members:
+ :undoc-members:
+ :inherited-members:
\ No newline at end of file
diff --git a/docs/api/waas/models/oci.waas.models.OriginGroup.rst b/docs/api/waas/models/oci.waas.models.OriginGroup.rst
new file mode 100644
index 0000000000..7124fadb3e
--- /dev/null
+++ b/docs/api/waas/models/oci.waas.models.OriginGroup.rst
@@ -0,0 +1,11 @@
+OriginGroup
+===========
+
+.. currentmodule:: oci.waas.models
+
+.. autoclass:: OriginGroup
+ :show-inheritance:
+ :special-members: __init__
+ :members:
+ :undoc-members:
+ :inherited-members:
\ No newline at end of file
diff --git a/docs/api/waas/models/oci.waas.models.OriginGroupOrigins.rst b/docs/api/waas/models/oci.waas.models.OriginGroupOrigins.rst
new file mode 100644
index 0000000000..d640b2af0b
--- /dev/null
+++ b/docs/api/waas/models/oci.waas.models.OriginGroupOrigins.rst
@@ -0,0 +1,11 @@
+OriginGroupOrigins
+==================
+
+.. currentmodule:: oci.waas.models
+
+.. autoclass:: OriginGroupOrigins
+ :show-inheritance:
+ :special-members: __init__
+ :members:
+ :undoc-members:
+ :inherited-members:
\ No newline at end of file
diff --git a/docs/api/waas/models/oci.waas.models.PurgeCache.rst b/docs/api/waas/models/oci.waas.models.PurgeCache.rst
new file mode 100644
index 0000000000..7c25e43001
--- /dev/null
+++ b/docs/api/waas/models/oci.waas.models.PurgeCache.rst
@@ -0,0 +1,11 @@
+PurgeCache
+==========
+
+.. currentmodule:: oci.waas.models
+
+.. autoclass:: PurgeCache
+ :show-inheritance:
+ :special-members: __init__
+ :members:
+ :undoc-members:
+ :inherited-members:
\ No newline at end of file
diff --git a/docs/api/waas/models/oci.waas.models.UpdateAddressListDetails.rst b/docs/api/waas/models/oci.waas.models.UpdateAddressListDetails.rst
new file mode 100644
index 0000000000..10f87d8851
--- /dev/null
+++ b/docs/api/waas/models/oci.waas.models.UpdateAddressListDetails.rst
@@ -0,0 +1,11 @@
+UpdateAddressListDetails
+========================
+
+.. currentmodule:: oci.waas.models
+
+.. autoclass:: UpdateAddressListDetails
+ :show-inheritance:
+ :special-members: __init__
+ :members:
+ :undoc-members:
+ :inherited-members:
\ No newline at end of file
diff --git a/docs/api/waas/models/oci.waas.models.UpdateCustomProtectionRuleDetails.rst b/docs/api/waas/models/oci.waas.models.UpdateCustomProtectionRuleDetails.rst
new file mode 100644
index 0000000000..1334933541
--- /dev/null
+++ b/docs/api/waas/models/oci.waas.models.UpdateCustomProtectionRuleDetails.rst
@@ -0,0 +1,11 @@
+UpdateCustomProtectionRuleDetails
+=================================
+
+.. currentmodule:: oci.waas.models
+
+.. autoclass:: UpdateCustomProtectionRuleDetails
+ :show-inheritance:
+ :special-members: __init__
+ :members:
+ :undoc-members:
+ :inherited-members:
\ No newline at end of file
diff --git a/docs/api/waas/models/oci.waas.models.WaasPolicyCustomProtectionRuleSummary.rst b/docs/api/waas/models/oci.waas.models.WaasPolicyCustomProtectionRuleSummary.rst
new file mode 100644
index 0000000000..ae8bc02b71
--- /dev/null
+++ b/docs/api/waas/models/oci.waas.models.WaasPolicyCustomProtectionRuleSummary.rst
@@ -0,0 +1,11 @@
+WaasPolicyCustomProtectionRuleSummary
+=====================================
+
+.. currentmodule:: oci.waas.models
+
+.. autoclass:: WaasPolicyCustomProtectionRuleSummary
+ :show-inheritance:
+ :special-members: __init__
+ :members:
+ :undoc-members:
+ :inherited-members:
\ No newline at end of file
diff --git a/src/oci/core/compute_management_client.py b/src/oci/core/compute_management_client.py
index 394182a7db..64eb4721fb 100644
--- a/src/oci/core/compute_management_client.py
+++ b/src/oci/core/compute_management_client.py
@@ -392,7 +392,8 @@ def change_instance_pool_compartment(self, instance_pool_id, change_instance_poo
def create_instance_configuration(self, create_instance_configuration, **kwargs):
"""
CreateInstanceConfiguration
- Creates an instance configuration
+ Creates an instance configuration. An instance configuration is a template that defines the
+ settings to use when creating Compute instances.
:param CreateInstanceConfigurationBase create_instance_configuration: (required)
@@ -890,7 +891,13 @@ def get_instance_pool_load_balancer_attachment(self, instance_pool_id, instance_
def launch_instance_configuration(self, instance_configuration_id, instance_configuration, **kwargs):
"""
LaunchInstanceConfiguration
- Launch an instance from an instance configuration
+ Launches an instance from an instance configuration.
+
+ If the instance configuration does not include all of the parameters that are
+ required to launch an instance, such as the availability domain and subnet ID, you must
+ provide these parameters when you launch an instance from the instance configuration.
+ For more information, see the :class:`InstanceConfiguration`
+ resource.
:param str instance_configuration_id: (required)
@@ -974,7 +981,7 @@ def launch_instance_configuration(self, instance_configuration_id, instance_conf
def list_instance_configurations(self, compartment_id, **kwargs):
"""
ListInstanceConfigurations
- Lists the available instanceConfigurations in the specific compartment.
+ Lists the instance configurations in the specified compartment.
:param str compartment_id: (required)
@@ -1794,7 +1801,7 @@ def terminate_instance_pool(self, instance_pool_id, **kwargs):
def update_instance_configuration(self, instance_configuration_id, update_instance_configuration_details, **kwargs):
"""
UpdateInstanceConfiguration
- Updates the freeFormTags, definedTags, and display name of an instance configuration.
+ Updates the free-form tags, defined tags, and display name of an instance configuration.
:param str instance_configuration_id: (required)
diff --git a/src/oci/core/models/__init__.py b/src/oci/core/models/__init__.py
index 1aefacf842..9f11a91513 100644
--- a/src/oci/core/models/__init__.py
+++ b/src/oci/core/models/__init__.py
@@ -37,12 +37,17 @@
from .change_cpe_compartment_details import ChangeCpeCompartmentDetails
from .change_cross_connect_compartment_details import ChangeCrossConnectCompartmentDetails
from .change_cross_connect_group_compartment_details import ChangeCrossConnectGroupCompartmentDetails
+from .change_dhcp_options_compartment_details import ChangeDhcpOptionsCompartmentDetails
from .change_ip_sec_connection_compartment_details import ChangeIPSecConnectionCompartmentDetails
from .change_image_compartment_details import ChangeImageCompartmentDetails
from .change_instance_compartment_details import ChangeInstanceCompartmentDetails
from .change_instance_configuration_compartment_details import ChangeInstanceConfigurationCompartmentDetails
from .change_instance_pool_compartment_details import ChangeInstancePoolCompartmentDetails
+from .change_internet_gateway_compartment_details import ChangeInternetGatewayCompartmentDetails
+from .change_local_peering_gateway_compartment_details import ChangeLocalPeeringGatewayCompartmentDetails
from .change_nat_gateway_compartment_details import ChangeNatGatewayCompartmentDetails
+from .change_network_security_group_compartment_details import ChangeNetworkSecurityGroupCompartmentDetails
+from .change_public_ip_compartment_details import ChangePublicIpCompartmentDetails
from .change_remote_peering_connection_compartment_details import ChangeRemotePeeringConnectionCompartmentDetails
from .change_route_table_compartment_details import ChangeRouteTableCompartmentDetails
from .change_security_list_compartment_details import ChangeSecurityListCompartmentDetails
@@ -301,12 +306,17 @@
"ChangeCpeCompartmentDetails": ChangeCpeCompartmentDetails,
"ChangeCrossConnectCompartmentDetails": ChangeCrossConnectCompartmentDetails,
"ChangeCrossConnectGroupCompartmentDetails": ChangeCrossConnectGroupCompartmentDetails,
+ "ChangeDhcpOptionsCompartmentDetails": ChangeDhcpOptionsCompartmentDetails,
"ChangeIPSecConnectionCompartmentDetails": ChangeIPSecConnectionCompartmentDetails,
"ChangeImageCompartmentDetails": ChangeImageCompartmentDetails,
"ChangeInstanceCompartmentDetails": ChangeInstanceCompartmentDetails,
"ChangeInstanceConfigurationCompartmentDetails": ChangeInstanceConfigurationCompartmentDetails,
"ChangeInstancePoolCompartmentDetails": ChangeInstancePoolCompartmentDetails,
+ "ChangeInternetGatewayCompartmentDetails": ChangeInternetGatewayCompartmentDetails,
+ "ChangeLocalPeeringGatewayCompartmentDetails": ChangeLocalPeeringGatewayCompartmentDetails,
"ChangeNatGatewayCompartmentDetails": ChangeNatGatewayCompartmentDetails,
+ "ChangeNetworkSecurityGroupCompartmentDetails": ChangeNetworkSecurityGroupCompartmentDetails,
+ "ChangePublicIpCompartmentDetails": ChangePublicIpCompartmentDetails,
"ChangeRemotePeeringConnectionCompartmentDetails": ChangeRemotePeeringConnectionCompartmentDetails,
"ChangeRouteTableCompartmentDetails": ChangeRouteTableCompartmentDetails,
"ChangeSecurityListCompartmentDetails": ChangeSecurityListCompartmentDetails,
diff --git a/src/oci/core/models/add_security_rule_details.py b/src/oci/core/models/add_security_rule_details.py
index 1cfdf864d5..17207a1c6e 100644
--- a/src/oci/core/models/add_security_rule_details.py
+++ b/src/oci/core/models/add_security_rule_details.py
@@ -141,7 +141,7 @@ def __init__(self, **kwargs):
def description(self):
"""
Gets the description of this AddSecurityRuleDetails.
- An optional description of your choice for the rule.
+ An optional description of your choice for the rule. Avoid entering confidential information.
:return: The description of this AddSecurityRuleDetails.
@@ -153,7 +153,7 @@ def description(self):
def description(self, description):
"""
Sets the description of this AddSecurityRuleDetails.
- An optional description of your choice for the rule.
+ An optional description of your choice for the rule. Avoid entering confidential information.
:param description: The description of this AddSecurityRuleDetails.
@@ -171,6 +171,7 @@ def destination(self):
Allowed values:
* An IP address range in CIDR notation. For example: `192.168.1.0/24` or `2001:0db8:0123:45::/56`
+ Note that IPv6 addressing is currently supported only in the Government Cloud.
* The `cidrBlock` value for a :class:`Service`, if you're
setting up a security rule for traffic destined for a particular `Service` through
@@ -196,6 +197,7 @@ def destination(self, destination):
Allowed values:
* An IP address range in CIDR notation. For example: `192.168.1.0/24` or `2001:0db8:0123:45::/56`
+ Note that IPv6 addressing is currently supported only in the Government Cloud.
* The `cidrBlock` value for a :class:`Service`, if you're
setting up a security rule for traffic destined for a particular `Service` through
@@ -421,6 +423,7 @@ def source(self):
Allowed values:
* An IP address range in CIDR notation. For example: `192.168.1.0/24` or `2001:0db8:0123:45::/56`
+ Note that IPv6 addressing is currently supported only in the Government Cloud.
* The `cidrBlock` value for a :class:`Service`, if you're
setting up a security rule for traffic coming from a particular `Service` through
@@ -446,6 +449,7 @@ def source(self, source):
Allowed values:
* An IP address range in CIDR notation. For example: `192.168.1.0/24` or `2001:0db8:0123:45::/56`
+ Note that IPv6 addressing is currently supported only in the Government Cloud.
* The `cidrBlock` value for a :class:`Service`, if you're
setting up a security rule for traffic coming from a particular `Service` through
@@ -473,7 +477,7 @@ def source_type(self):
:class:`Service` (the rule is for traffic coming from a
particular `Service` through a service gateway).
- * `NETWORK_SECURITY_GROUP`: If the rule's `destination` is the OCID of a
+ * `NETWORK_SECURITY_GROUP`: If the rule's `source` is the OCID of a
:class:`NetworkSecurityGroup`.
Allowed values for this property are: "CIDR_BLOCK", "SERVICE_CIDR_BLOCK", "NETWORK_SECURITY_GROUP"
@@ -496,7 +500,7 @@ def source_type(self, source_type):
:class:`Service` (the rule is for traffic coming from a
particular `Service` through a service gateway).
- * `NETWORK_SECURITY_GROUP`: If the rule's `destination` is the OCID of a
+ * `NETWORK_SECURITY_GROUP`: If the rule's `source` is the OCID of a
:class:`NetworkSecurityGroup`.
diff --git a/src/oci/core/models/attach_vnic_details.py b/src/oci/core/models/attach_vnic_details.py
index 003249920b..b6d0e7796d 100644
--- a/src/oci/core/models/attach_vnic_details.py
+++ b/src/oci/core/models/attach_vnic_details.py
@@ -82,6 +82,7 @@ def display_name(self):
"""
Gets the display_name of this AttachVnicDetails.
A user-friendly name for the attachment. Does not have to be unique, and it cannot be changed.
+ Avoid entering confidential information.
:return: The display_name of this AttachVnicDetails.
@@ -94,6 +95,7 @@ def display_name(self, display_name):
"""
Sets the display_name of this AttachVnicDetails.
A user-friendly name for the attachment. Does not have to be unique, and it cannot be changed.
+ Avoid entering confidential information.
:param display_name: The display_name of this AttachVnicDetails.
diff --git a/src/oci/core/models/capture_console_history_details.py b/src/oci/core/models/capture_console_history_details.py
index fdd2e5118f..251caed58a 100644
--- a/src/oci/core/models/capture_console_history_details.py
+++ b/src/oci/core/models/capture_console_history_details.py
@@ -92,6 +92,7 @@ def display_name(self):
"""
Gets the display_name of this CaptureConsoleHistoryDetails.
A user-friendly name. Does not have to be unique, and it's changeable.
+ Avoid entering confidential information.
:return: The display_name of this CaptureConsoleHistoryDetails.
@@ -104,6 +105,7 @@ def display_name(self, display_name):
"""
Sets the display_name of this CaptureConsoleHistoryDetails.
A user-friendly name. Does not have to be unique, and it's changeable.
+ Avoid entering confidential information.
:param display_name: The display_name of this CaptureConsoleHistoryDetails.
diff --git a/src/oci/core/models/change_dhcp_options_compartment_details.py b/src/oci/core/models/change_dhcp_options_compartment_details.py
new file mode 100644
index 0000000000..3d99f14ba9
--- /dev/null
+++ b/src/oci/core/models/change_dhcp_options_compartment_details.py
@@ -0,0 +1,75 @@
+# coding: utf-8
+# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
+
+
+from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401
+from oci.decorators import init_model_state_from_kwargs
+
+
+@init_model_state_from_kwargs
+class ChangeDhcpOptionsCompartmentDetails(object):
+ """
+ The configuration details for the move operation.
+ """
+
+ def __init__(self, **kwargs):
+ """
+ Initializes a new ChangeDhcpOptionsCompartmentDetails 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 ChangeDhcpOptionsCompartmentDetails.
+ :type compartment_id: str
+
+ """
+ self.swagger_types = {
+ 'compartment_id': 'str'
+ }
+
+ self.attribute_map = {
+ 'compartment_id': 'compartmentId'
+ }
+
+ self._compartment_id = None
+
+ @property
+ def compartment_id(self):
+ """
+ **[Required]** Gets the compartment_id of this ChangeDhcpOptionsCompartmentDetails.
+ The `OCID`__ of the compartment to move the
+ set of DHCP options to.
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
+
+
+ :return: The compartment_id of this ChangeDhcpOptionsCompartmentDetails.
+ :rtype: str
+ """
+ return self._compartment_id
+
+ @compartment_id.setter
+ def compartment_id(self, compartment_id):
+ """
+ Sets the compartment_id of this ChangeDhcpOptionsCompartmentDetails.
+ The `OCID`__ of the compartment to move the
+ set of DHCP options to.
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
+
+
+ :param compartment_id: The compartment_id of this ChangeDhcpOptionsCompartmentDetails.
+ :type: str
+ """
+ self._compartment_id = compartment_id
+
+ def __repr__(self):
+ return formatted_flat_dict(self)
+
+ def __eq__(self, other):
+ if other is None:
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ return not self == other
diff --git a/src/oci/core/models/change_internet_gateway_compartment_details.py b/src/oci/core/models/change_internet_gateway_compartment_details.py
new file mode 100644
index 0000000000..83304c1b18
--- /dev/null
+++ b/src/oci/core/models/change_internet_gateway_compartment_details.py
@@ -0,0 +1,75 @@
+# coding: utf-8
+# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
+
+
+from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401
+from oci.decorators import init_model_state_from_kwargs
+
+
+@init_model_state_from_kwargs
+class ChangeInternetGatewayCompartmentDetails(object):
+ """
+ The configuration details for the move operation.
+ """
+
+ def __init__(self, **kwargs):
+ """
+ Initializes a new ChangeInternetGatewayCompartmentDetails 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 ChangeInternetGatewayCompartmentDetails.
+ :type compartment_id: str
+
+ """
+ self.swagger_types = {
+ 'compartment_id': 'str'
+ }
+
+ self.attribute_map = {
+ 'compartment_id': 'compartmentId'
+ }
+
+ self._compartment_id = None
+
+ @property
+ def compartment_id(self):
+ """
+ **[Required]** Gets the compartment_id of this ChangeInternetGatewayCompartmentDetails.
+ The `OCID`__ of the compartment to move the
+ internet gateway to.
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
+
+
+ :return: The compartment_id of this ChangeInternetGatewayCompartmentDetails.
+ :rtype: str
+ """
+ return self._compartment_id
+
+ @compartment_id.setter
+ def compartment_id(self, compartment_id):
+ """
+ Sets the compartment_id of this ChangeInternetGatewayCompartmentDetails.
+ The `OCID`__ of the compartment to move the
+ internet gateway to.
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
+
+
+ :param compartment_id: The compartment_id of this ChangeInternetGatewayCompartmentDetails.
+ :type: str
+ """
+ self._compartment_id = compartment_id
+
+ def __repr__(self):
+ return formatted_flat_dict(self)
+
+ def __eq__(self, other):
+ if other is None:
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ return not self == other
diff --git a/src/oci/core/models/change_local_peering_gateway_compartment_details.py b/src/oci/core/models/change_local_peering_gateway_compartment_details.py
new file mode 100644
index 0000000000..630c501de2
--- /dev/null
+++ b/src/oci/core/models/change_local_peering_gateway_compartment_details.py
@@ -0,0 +1,75 @@
+# coding: utf-8
+# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
+
+
+from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401
+from oci.decorators import init_model_state_from_kwargs
+
+
+@init_model_state_from_kwargs
+class ChangeLocalPeeringGatewayCompartmentDetails(object):
+ """
+ The configuration details for the move operation.
+ """
+
+ def __init__(self, **kwargs):
+ """
+ Initializes a new ChangeLocalPeeringGatewayCompartmentDetails 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 ChangeLocalPeeringGatewayCompartmentDetails.
+ :type compartment_id: str
+
+ """
+ self.swagger_types = {
+ 'compartment_id': 'str'
+ }
+
+ self.attribute_map = {
+ 'compartment_id': 'compartmentId'
+ }
+
+ self._compartment_id = None
+
+ @property
+ def compartment_id(self):
+ """
+ **[Required]** Gets the compartment_id of this ChangeLocalPeeringGatewayCompartmentDetails.
+ The `OCID`__ of the compartment to move the
+ local peering gateway to.
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
+
+
+ :return: The compartment_id of this ChangeLocalPeeringGatewayCompartmentDetails.
+ :rtype: str
+ """
+ return self._compartment_id
+
+ @compartment_id.setter
+ def compartment_id(self, compartment_id):
+ """
+ Sets the compartment_id of this ChangeLocalPeeringGatewayCompartmentDetails.
+ The `OCID`__ of the compartment to move the
+ local peering gateway to.
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
+
+
+ :param compartment_id: The compartment_id of this ChangeLocalPeeringGatewayCompartmentDetails.
+ :type: str
+ """
+ self._compartment_id = compartment_id
+
+ def __repr__(self):
+ return formatted_flat_dict(self)
+
+ def __eq__(self, other):
+ if other is None:
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ return not self == other
diff --git a/src/oci/core/models/change_network_security_group_compartment_details.py b/src/oci/core/models/change_network_security_group_compartment_details.py
new file mode 100644
index 0000000000..c125395838
--- /dev/null
+++ b/src/oci/core/models/change_network_security_group_compartment_details.py
@@ -0,0 +1,75 @@
+# coding: utf-8
+# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
+
+
+from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401
+from oci.decorators import init_model_state_from_kwargs
+
+
+@init_model_state_from_kwargs
+class ChangeNetworkSecurityGroupCompartmentDetails(object):
+ """
+ ChangeNetworkSecurityGroupCompartmentDetails model.
+ """
+
+ def __init__(self, **kwargs):
+ """
+ Initializes a new ChangeNetworkSecurityGroupCompartmentDetails 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 ChangeNetworkSecurityGroupCompartmentDetails.
+ :type compartment_id: str
+
+ """
+ self.swagger_types = {
+ 'compartment_id': 'str'
+ }
+
+ self.attribute_map = {
+ 'compartment_id': 'compartmentId'
+ }
+
+ self._compartment_id = None
+
+ @property
+ def compartment_id(self):
+ """
+ **[Required]** Gets the compartment_id of this ChangeNetworkSecurityGroupCompartmentDetails.
+ The `OCID`__ of the compartment to move the network
+ security group to.
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
+
+
+ :return: The compartment_id of this ChangeNetworkSecurityGroupCompartmentDetails.
+ :rtype: str
+ """
+ return self._compartment_id
+
+ @compartment_id.setter
+ def compartment_id(self, compartment_id):
+ """
+ Sets the compartment_id of this ChangeNetworkSecurityGroupCompartmentDetails.
+ The `OCID`__ of the compartment to move the network
+ security group to.
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
+
+
+ :param compartment_id: The compartment_id of this ChangeNetworkSecurityGroupCompartmentDetails.
+ :type: str
+ """
+ self._compartment_id = compartment_id
+
+ def __repr__(self):
+ return formatted_flat_dict(self)
+
+ def __eq__(self, other):
+ if other is None:
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ return not self == other
diff --git a/src/oci/core/models/change_public_ip_compartment_details.py b/src/oci/core/models/change_public_ip_compartment_details.py
new file mode 100644
index 0000000000..296d97e39a
--- /dev/null
+++ b/src/oci/core/models/change_public_ip_compartment_details.py
@@ -0,0 +1,75 @@
+# coding: utf-8
+# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
+
+
+from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401
+from oci.decorators import init_model_state_from_kwargs
+
+
+@init_model_state_from_kwargs
+class ChangePublicIpCompartmentDetails(object):
+ """
+ The configuration details for the move operation.
+ """
+
+ def __init__(self, **kwargs):
+ """
+ Initializes a new ChangePublicIpCompartmentDetails 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 ChangePublicIpCompartmentDetails.
+ :type compartment_id: str
+
+ """
+ self.swagger_types = {
+ 'compartment_id': 'str'
+ }
+
+ self.attribute_map = {
+ 'compartment_id': 'compartmentId'
+ }
+
+ self._compartment_id = None
+
+ @property
+ def compartment_id(self):
+ """
+ **[Required]** Gets the compartment_id of this ChangePublicIpCompartmentDetails.
+ The `OCID`__ of the compartment to move the
+ public IP to.
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
+
+
+ :return: The compartment_id of this ChangePublicIpCompartmentDetails.
+ :rtype: str
+ """
+ return self._compartment_id
+
+ @compartment_id.setter
+ def compartment_id(self, compartment_id):
+ """
+ Sets the compartment_id of this ChangePublicIpCompartmentDetails.
+ The `OCID`__ of the compartment to move the
+ public IP to.
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
+
+
+ :param compartment_id: The compartment_id of this ChangePublicIpCompartmentDetails.
+ :type: str
+ """
+ self._compartment_id = compartment_id
+
+ def __repr__(self):
+ return formatted_flat_dict(self)
+
+ def __eq__(self, other):
+ if other is None:
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ return not self == other
diff --git a/src/oci/core/models/create_drg_attachment_details.py b/src/oci/core/models/create_drg_attachment_details.py
index cff28ac702..f493102dfa 100644
--- a/src/oci/core/models/create_drg_attachment_details.py
+++ b/src/oci/core/models/create_drg_attachment_details.py
@@ -111,10 +111,13 @@ def route_table_id(self):
table. The Networking service does NOT automatically associate the attached VCN's default route table
with the DRG attachment.
- For information about why you would associate a route table with a DRG attachment, see
- `Advanced Scenario: Transit Routing`__.
+ For information about why you would associate a route table with a DRG attachment, see:
+
+ * `Transit Routing: Access to Multiple VCNs in Same Region`__
+ * `Transit Routing: Private Access to Oracle Services`__
__ https://docs.cloud.oracle.com/Content/Network/Tasks/transitrouting.htm
+ __ https://docs.cloud.oracle.com/Content/Network/Tasks/transitroutingoracleservices.htm
:return: The route_table_id of this CreateDrgAttachmentDetails.
@@ -132,10 +135,13 @@ def route_table_id(self, route_table_id):
table. The Networking service does NOT automatically associate the attached VCN's default route table
with the DRG attachment.
- For information about why you would associate a route table with a DRG attachment, see
- `Advanced Scenario: Transit Routing`__.
+ For information about why you would associate a route table with a DRG attachment, see:
+
+ * `Transit Routing: Access to Multiple VCNs in Same Region`__
+ * `Transit Routing: Private Access to Oracle Services`__
__ https://docs.cloud.oracle.com/Content/Network/Tasks/transitrouting.htm
+ __ https://docs.cloud.oracle.com/Content/Network/Tasks/transitroutingoracleservices.htm
:param route_table_id: The route_table_id of this CreateDrgAttachmentDetails.
diff --git a/src/oci/core/models/create_image_details.py b/src/oci/core/models/create_image_details.py
index e48e4d65b2..592880c3de 100644
--- a/src/oci/core/models/create_image_details.py
+++ b/src/oci/core/models/create_image_details.py
@@ -95,7 +95,7 @@ def __init__(self, **kwargs):
def compartment_id(self):
"""
**[Required]** Gets the compartment_id of this CreateImageDetails.
- The OCID of the compartment containing the instance you want to use as the basis for the image.
+ The OCID of the compartment you want the image to be created in.
:return: The compartment_id of this CreateImageDetails.
@@ -107,7 +107,7 @@ def compartment_id(self):
def compartment_id(self, compartment_id):
"""
Sets the compartment_id of this CreateImageDetails.
- The OCID of the compartment containing the instance you want to use as the basis for the image.
+ The OCID of the compartment you want the image to be created in.
:param compartment_id: The compartment_id of this CreateImageDetails.
diff --git a/src/oci/core/models/create_instance_configuration_base.py b/src/oci/core/models/create_instance_configuration_base.py
index 6804d82323..86e1720497 100644
--- a/src/oci/core/models/create_instance_configuration_base.py
+++ b/src/oci/core/models/create_instance_configuration_base.py
@@ -9,7 +9,7 @@
@init_model_state_from_kwargs
class CreateInstanceConfigurationBase(object):
"""
- An instance configuration that can be used to launch
+ Creation details for an instance configuration.
"""
#: A constant which can be used with the source property of a CreateInstanceConfigurationBase.
@@ -94,7 +94,10 @@ def get_subtype(object_dictionary):
def compartment_id(self):
"""
**[Required]** Gets the compartment_id of this CreateInstanceConfigurationBase.
- The OCID of the compartment containing the instance configuration.
+ The `OCID`__ of the compartment
+ containing the instance configuration.
+
+ __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
:return: The compartment_id of this CreateInstanceConfigurationBase.
@@ -106,7 +109,10 @@ def compartment_id(self):
def compartment_id(self, compartment_id):
"""
Sets the compartment_id of this CreateInstanceConfigurationBase.
- The OCID of the compartment containing the instance configuration.
+ The `OCID`__ of the compartment
+ containing the instance configuration.
+
+ __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
:param compartment_id: The compartment_id of this CreateInstanceConfigurationBase.
@@ -152,7 +158,8 @@ def defined_tags(self, defined_tags):
def display_name(self):
"""
Gets the display_name of this CreateInstanceConfigurationBase.
- A user-friendly name for the instance configuration
+ A user-friendly name for the instance configuration. Does not have to be unique,
+ and it's changeable. Avoid entering confidential information.
:return: The display_name of this CreateInstanceConfigurationBase.
@@ -164,7 +171,8 @@ def display_name(self):
def display_name(self, display_name):
"""
Sets the display_name of this CreateInstanceConfigurationBase.
- A user-friendly name for the instance configuration
+ A user-friendly name for the instance configuration. Does not have to be unique,
+ and it's changeable. Avoid entering confidential information.
:param display_name: The display_name of this CreateInstanceConfigurationBase.
@@ -210,9 +218,17 @@ def freeform_tags(self, freeform_tags):
def source(self):
"""
Gets the source of this CreateInstanceConfigurationBase.
- The source of the instance configuration:
- NONE for creating a new instance configuration from the API input. INSTANCE for creating a new instance
- configuration from an existing instance. The default is NONE.
+ The source of the instance configuration. An instance configuration defines the
+ settings to use when creating Compute instances, including details
+ such as the base image, shape, and metadata. You can also specify the associated resources for the
+ instance, such as block volume attachments and network configuration.
+
+ The following values are supported:
+
+ * `NONE`: Creates an instance configuration using the list of settings that you specify.
+
+ * `INSTANCE`: Creates an instance configuration using an existing instance as a template. The
+ instance configuration uses the same settings as the instance.
Allowed values for this property are: "NONE", "INSTANCE"
@@ -226,9 +242,17 @@ def source(self):
def source(self, source):
"""
Sets the source of this CreateInstanceConfigurationBase.
- The source of the instance configuration:
- NONE for creating a new instance configuration from the API input. INSTANCE for creating a new instance
- configuration from an existing instance. The default is NONE.
+ The source of the instance configuration. An instance configuration defines the
+ settings to use when creating Compute instances, including details
+ such as the base image, shape, and metadata. You can also specify the associated resources for the
+ instance, such as block volume attachments and network configuration.
+
+ The following values are supported:
+
+ * `NONE`: Creates an instance configuration using the list of settings that you specify.
+
+ * `INSTANCE`: Creates an instance configuration using an existing instance as a template. The
+ instance configuration uses the same settings as the instance.
:param source: The source of this CreateInstanceConfigurationBase.
diff --git a/src/oci/core/models/create_instance_configuration_details.py b/src/oci/core/models/create_instance_configuration_details.py
index a024488619..0da89b5b1c 100644
--- a/src/oci/core/models/create_instance_configuration_details.py
+++ b/src/oci/core/models/create_instance_configuration_details.py
@@ -9,7 +9,7 @@
@init_model_state_from_kwargs
class CreateInstanceConfigurationDetails(CreateInstanceConfigurationBase):
"""
- Create an instance configuration from API input.
+ Details for creating an instance configuration by providing a list of configuration settings.
"""
def __init__(self, **kwargs):
diff --git a/src/oci/core/models/create_instance_configuration_from_instance_details.py b/src/oci/core/models/create_instance_configuration_from_instance_details.py
index 55a28c15f1..3fa6ac1a02 100644
--- a/src/oci/core/models/create_instance_configuration_from_instance_details.py
+++ b/src/oci/core/models/create_instance_configuration_from_instance_details.py
@@ -9,7 +9,7 @@
@init_model_state_from_kwargs
class CreateInstanceConfigurationFromInstanceDetails(CreateInstanceConfigurationBase):
"""
- Create an instance configuration from an existing instance.
+ Details for creating an instance configuration using an existing instance as a template.
"""
def __init__(self, **kwargs):
@@ -74,7 +74,10 @@ def __init__(self, **kwargs):
def instance_id(self):
"""
**[Required]** Gets the instance_id of this CreateInstanceConfigurationFromInstanceDetails.
- The ID of the instance that will be used to create instance configuration.
+ The `OCID`__ of the instance to use to create the
+ instance configuration.
+
+ __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
:return: The instance_id of this CreateInstanceConfigurationFromInstanceDetails.
@@ -86,7 +89,10 @@ def instance_id(self):
def instance_id(self, instance_id):
"""
Sets the instance_id of this CreateInstanceConfigurationFromInstanceDetails.
- The ID of the instance that will be used to create instance configuration.
+ The `OCID`__ of the instance to use to create the
+ instance configuration.
+
+ __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
:param instance_id: The instance_id of this CreateInstanceConfigurationFromInstanceDetails.
diff --git a/src/oci/core/models/create_instance_pool_details.py b/src/oci/core/models/create_instance_pool_details.py
index 690f751c2a..1337037cdf 100644
--- a/src/oci/core/models/create_instance_pool_details.py
+++ b/src/oci/core/models/create_instance_pool_details.py
@@ -143,7 +143,8 @@ def defined_tags(self, defined_tags):
def display_name(self):
"""
Gets the display_name of this CreateInstancePoolDetails.
- The user-friendly name. Does not have to be unique.
+ A user-friendly name for the instance pool. Does not have to be unique, and it's
+ changeable. Avoid entering confidential information.
:return: The display_name of this CreateInstancePoolDetails.
@@ -155,7 +156,8 @@ def display_name(self):
def display_name(self, display_name):
"""
Sets the display_name of this CreateInstancePoolDetails.
- The user-friendly name. Does not have to be unique.
+ A user-friendly name for the instance pool. Does not have to be unique, and it's
+ changeable. Avoid entering confidential information.
:param display_name: The display_name of this CreateInstancePoolDetails.
diff --git a/src/oci/core/models/create_local_peering_gateway_details.py b/src/oci/core/models/create_local_peering_gateway_details.py
index ec90c6f8d9..a7d2089398 100644
--- a/src/oci/core/models/create_local_peering_gateway_details.py
+++ b/src/oci/core/models/create_local_peering_gateway_details.py
@@ -196,7 +196,7 @@ def route_table_id(self):
with the LPG.
For information about why you would associate a route table with an LPG, see
- `Advanced Scenario: Transit Routing`__.
+ `Transit Routing: Access to Multiple VCNs in Same Region`__.
__ https://docs.cloud.oracle.com/Content/Network/Tasks/transitrouting.htm
@@ -217,7 +217,7 @@ def route_table_id(self, route_table_id):
with the LPG.
For information about why you would associate a route table with an LPG, see
- `Advanced Scenario: Transit Routing`__.
+ `Transit Routing: Access to Multiple VCNs in Same Region`__.
__ https://docs.cloud.oracle.com/Content/Network/Tasks/transitrouting.htm
diff --git a/src/oci/core/models/create_service_gateway_details.py b/src/oci/core/models/create_service_gateway_details.py
index c8c0ccd281..67579adf75 100644
--- a/src/oci/core/models/create_service_gateway_details.py
+++ b/src/oci/core/models/create_service_gateway_details.py
@@ -207,7 +207,7 @@ def route_table_id(self):
with the service gateway.
For information about why you would associate a route table with a service gateway, see
- `Transit Routing: Private Access to Oracle Services Network`__.
+ `Transit Routing: Private Access to Oracle Services`__.
__ https://docs.cloud.oracle.com/Content/Network/Tasks/transitroutingoracleservices.htm
@@ -228,7 +228,7 @@ def route_table_id(self, route_table_id):
with the service gateway.
For information about why you would associate a route table with a service gateway, see
- `Transit Routing: Private Access to Oracle Services Network`__.
+ `Transit Routing: Private Access to Oracle Services`__.
__ https://docs.cloud.oracle.com/Content/Network/Tasks/transitroutingoracleservices.htm
diff --git a/src/oci/core/models/create_volume_group_backup_details.py b/src/oci/core/models/create_volume_group_backup_details.py
index d3a935baed..8e852652f3 100644
--- a/src/oci/core/models/create_volume_group_backup_details.py
+++ b/src/oci/core/models/create_volume_group_backup_details.py
@@ -138,7 +138,8 @@ def defined_tags(self, defined_tags):
def display_name(self):
"""
Gets the display_name of this CreateVolumeGroupBackupDetails.
- A user-friendly name for the volume group backup. Does not have to be unique and it's changeable.
+ A user-friendly name for the volume group backup. Does not have
+ to be unique and it's changeable. Avoid entering confidential information.
:return: The display_name of this CreateVolumeGroupBackupDetails.
@@ -150,7 +151,8 @@ def display_name(self):
def display_name(self, display_name):
"""
Sets the display_name of this CreateVolumeGroupBackupDetails.
- A user-friendly name for the volume group backup. Does not have to be unique and it's changeable.
+ A user-friendly name for the volume group backup. Does not have
+ to be unique and it's changeable. Avoid entering confidential information.
:param display_name: The display_name of this CreateVolumeGroupBackupDetails.
diff --git a/src/oci/core/models/create_volume_group_details.py b/src/oci/core/models/create_volume_group_details.py
index d1e486436d..c90b6c1e56 100644
--- a/src/oci/core/models/create_volume_group_details.py
+++ b/src/oci/core/models/create_volume_group_details.py
@@ -153,7 +153,7 @@ def defined_tags(self, defined_tags):
def display_name(self):
"""
Gets the display_name of this CreateVolumeGroupDetails.
- A user-friendly name for the volume group. Does not have to be unique, and it's changeable.
+ A user-friendly name for the volume group. Does not have to be unique, and it's changeable. Avoid entering confidential information.
:return: The display_name of this CreateVolumeGroupDetails.
@@ -165,7 +165,7 @@ def display_name(self):
def display_name(self, display_name):
"""
Sets the display_name of this CreateVolumeGroupDetails.
- A user-friendly name for the volume group. Does not have to be unique, and it's changeable.
+ A user-friendly name for the volume group. Does not have to be unique, and it's changeable. Avoid entering confidential information.
:param display_name: The display_name of this CreateVolumeGroupDetails.
diff --git a/src/oci/core/models/cross_connect_mapping.py b/src/oci/core/models/cross_connect_mapping.py
index 2c2e422a76..7e60d309ed 100644
--- a/src/oci/core/models/cross_connect_mapping.py
+++ b/src/oci/core/models/cross_connect_mapping.py
@@ -250,6 +250,8 @@ def customer_bgp_peering_ipv6(self):
There's one exception: for a public virtual circuit, Oracle specifies the BGP IPv6 addresses.
+ Note that IPv6 addressing is currently supported only in the Government Cloud.
+
Example: `2001:db8::1/64`
@@ -270,6 +272,8 @@ def customer_bgp_peering_ipv6(self, customer_bgp_peering_ipv6):
There's one exception: for a public virtual circuit, Oracle specifies the BGP IPv6 addresses.
+ Note that IPv6 addressing is currently supported only in the Government Cloud.
+
Example: `2001:db8::1/64`
@@ -289,6 +293,8 @@ def oracle_bgp_peering_ipv6(self):
There's one exception: for a public virtual circuit, Oracle specifies the BGP IPv6 addresses.
+ Note that IPv6 addressing is currently supported only in the Government Cloud.
+
Example: `2001:db8::2/64`
@@ -308,6 +314,8 @@ def oracle_bgp_peering_ipv6(self, oracle_bgp_peering_ipv6):
There's one exception: for a public virtual circuit, Oracle specifies the BGP IPv6 addresses.
+ Note that IPv6 addressing is currently supported only in the Government Cloud.
+
Example: `2001:db8::2/64`
diff --git a/src/oci/core/models/drg_attachment.py b/src/oci/core/models/drg_attachment.py
index 34d7d250bf..587f3b11f6 100644
--- a/src/oci/core/models/drg_attachment.py
+++ b/src/oci/core/models/drg_attachment.py
@@ -237,11 +237,15 @@ def lifecycle_state(self, lifecycle_state):
def route_table_id(self):
"""
Gets the route_table_id of this DrgAttachment.
- The OCID of the route table the DRG attachment is using. For information about why you
- would associate a route table with a DRG attachment, see
- `Advanced Scenario: Transit Routing`__.
+ The OCID of the route table the DRG attachment is using.
+
+ For information about why you would associate a route table with a DRG attachment, see:
+
+ * `Transit Routing: Access to Multiple VCNs in Same Region`__
+ * `Transit Routing: Private Access to Oracle Services`__
__ https://docs.cloud.oracle.com/Content/Network/Tasks/transitrouting.htm
+ __ https://docs.cloud.oracle.com/Content/Network/Tasks/transitroutingoracleservices.htm
:return: The route_table_id of this DrgAttachment.
@@ -253,11 +257,15 @@ def route_table_id(self):
def route_table_id(self, route_table_id):
"""
Sets the route_table_id of this DrgAttachment.
- The OCID of the route table the DRG attachment is using. For information about why you
- would associate a route table with a DRG attachment, see
- `Advanced Scenario: Transit Routing`__.
+ The OCID of the route table the DRG attachment is using.
+
+ For information about why you would associate a route table with a DRG attachment, see:
+
+ * `Transit Routing: Access to Multiple VCNs in Same Region`__
+ * `Transit Routing: Private Access to Oracle Services`__
__ https://docs.cloud.oracle.com/Content/Network/Tasks/transitrouting.htm
+ __ https://docs.cloud.oracle.com/Content/Network/Tasks/transitroutingoracleservices.htm
:param route_table_id: The route_table_id of this DrgAttachment.
diff --git a/src/oci/core/models/egress_security_rule.py b/src/oci/core/models/egress_security_rule.py
index 960cf1d54f..a490948466 100644
--- a/src/oci/core/models/egress_security_rule.py
+++ b/src/oci/core/models/egress_security_rule.py
@@ -94,6 +94,7 @@ def destination(self):
Allowed values:
* IP address range in CIDR notation. For example: `192.168.1.0/24` or `2001:0db8:0123:45::/56`
+ Note that IPv6 addressing is currently supported only in the Government Cloud.
* The `cidrBlock` value for a :class:`Service`, if you're
setting up a security list rule for traffic destined for a particular `Service` through
@@ -115,6 +116,7 @@ def destination(self, destination):
Allowed values:
* IP address range in CIDR notation. For example: `192.168.1.0/24` or `2001:0db8:0123:45::/56`
+ Note that IPv6 addressing is currently supported only in the Government Cloud.
* The `cidrBlock` value for a :class:`Service`, if you're
setting up a security list rule for traffic destined for a particular `Service` through
diff --git a/src/oci/core/models/image.py b/src/oci/core/models/image.py
index 9f569a5c00..976b527ff8 100644
--- a/src/oci/core/models/image.py
+++ b/src/oci/core/models/image.py
@@ -239,6 +239,7 @@ def create_image_allowed(self):
**[Required]** Gets the create_image_allowed of this Image.
Whether instances launched with this image can be used to create new images.
For example, you cannot create an image of an Oracle Database instance.
+
Example: `true`
@@ -253,6 +254,7 @@ def create_image_allowed(self, create_image_allowed):
Sets the create_image_allowed of this Image.
Whether instances launched with this image can be used to create new images.
For example, you cannot create an image of an Oracle Database instance.
+
Example: `true`
@@ -301,6 +303,7 @@ def display_name(self):
Gets the display_name of this Image.
A user-friendly name for the image. It does not have to be unique, and it's changeable.
Avoid entering confidential information.
+
You cannot use an Oracle-provided image name as a custom image name.
Example: `My custom Oracle Linux image`
@@ -317,6 +320,7 @@ def display_name(self, display_name):
Sets the display_name of this Image.
A user-friendly name for the image. It does not have to be unique, and it's changeable.
Avoid entering confidential information.
+
You cannot use an Oracle-provided image name as a custom image name.
Example: `My custom Oracle Linux image`
diff --git a/src/oci/core/models/ingress_security_rule.py b/src/oci/core/models/ingress_security_rule.py
index 9cef19bc9c..dbc7f95668 100644
--- a/src/oci/core/models/ingress_security_rule.py
+++ b/src/oci/core/models/ingress_security_rule.py
@@ -209,7 +209,8 @@ def source(self):
Allowed values:
- * IP address range in CIDR notation. For example: `192.168.1.0/24` or `2001:0db8:0123:45::/56`
+ * IP address range in CIDR notation. For example: `192.168.1.0/24` or `2001:0db8:0123:45::/56`.
+ Note that IPv6 addressing is currently supported only in the Government Cloud.
* The `cidrBlock` value for a :class:`Service`, if you're
setting up a security list rule for traffic coming from a particular `Service` through
@@ -230,7 +231,8 @@ def source(self, source):
Allowed values:
- * IP address range in CIDR notation. For example: `192.168.1.0/24` or `2001:0db8:0123:45::/56`
+ * IP address range in CIDR notation. For example: `192.168.1.0/24` or `2001:0db8:0123:45::/56`.
+ Note that IPv6 addressing is currently supported only in the Government Cloud.
* The `cidrBlock` value for a :class:`Service`, if you're
setting up a security list rule for traffic coming from a particular `Service` through
diff --git a/src/oci/core/models/instance_configuration.py b/src/oci/core/models/instance_configuration.py
index cc3d7f70f7..f00382d194 100644
--- a/src/oci/core/models/instance_configuration.py
+++ b/src/oci/core/models/instance_configuration.py
@@ -9,8 +9,8 @@
@init_model_state_from_kwargs
class InstanceConfiguration(object):
"""
- An instance configuration is a template that defines the settings to use when creating Compute instances
- as part of an instance pool. For more information about instance pools and instance configurations, see
+ An instance configuration is a template that defines the settings to use when creating Compute instances.
+ For more information about instance configurations, see
`Managing Compute Instances`__.
__ https://docs.cloud.oracle.com/Content/Compute/Concepts/instancemanagement.htm
@@ -89,7 +89,10 @@ def __init__(self, **kwargs):
def compartment_id(self):
"""
**[Required]** Gets the compartment_id of this InstanceConfiguration.
- The OCID of the compartment containing the instance configuration.
+ The `OCID`__ of the compartment
+ containing the instance configuration.
+
+ __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
:return: The compartment_id of this InstanceConfiguration.
@@ -101,7 +104,10 @@ def compartment_id(self):
def compartment_id(self, compartment_id):
"""
Sets the compartment_id of this InstanceConfiguration.
- The OCID of the compartment containing the instance configuration.
+ The `OCID`__ of the compartment
+ containing the instance configuration.
+
+ __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
:param compartment_id: The compartment_id of this InstanceConfiguration.
@@ -147,7 +153,7 @@ def defined_tags(self, defined_tags):
def display_name(self):
"""
Gets the display_name of this InstanceConfiguration.
- A user-friendly name for the instance configuration
+ A user-friendly name for the instance configuration.
:return: The display_name of this InstanceConfiguration.
@@ -159,7 +165,7 @@ def display_name(self):
def display_name(self, display_name):
"""
Sets the display_name of this InstanceConfiguration.
- A user-friendly name for the instance configuration
+ A user-friendly name for the instance configuration.
:param display_name: The display_name of this InstanceConfiguration.
@@ -205,7 +211,9 @@ def freeform_tags(self, freeform_tags):
def id(self):
"""
**[Required]** Gets the id of this InstanceConfiguration.
- The OCID of the instance configuration
+ The `OCID`__ of the instance configuration.
+
+ __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
:return: The id of this InstanceConfiguration.
@@ -217,7 +225,9 @@ def id(self):
def id(self, id):
"""
Sets the id of this InstanceConfiguration.
- The OCID of the instance configuration
+ The `OCID`__ of the instance configuration.
+
+ __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
:param id: The id of this InstanceConfiguration.
@@ -249,8 +259,9 @@ def instance_details(self, instance_details):
def deferred_fields(self):
"""
Gets the deferred_fields of this InstanceConfiguration.
- The required details when using the :func:`launch_instance_configuration` operation.
- These attributes are optional when using the :func:`create_instance_configuration` operation.
+ Parameters that were not specified when the instance configuration was created, but that
+ are required to launch an instance from the instance configuration. See the
+ :func:`launch_instance_configuration` operation.
:return: The deferred_fields of this InstanceConfiguration.
@@ -262,8 +273,9 @@ def deferred_fields(self):
def deferred_fields(self, deferred_fields):
"""
Sets the deferred_fields of this InstanceConfiguration.
- The required details when using the :func:`launch_instance_configuration` operation.
- These attributes are optional when using the :func:`create_instance_configuration` operation.
+ Parameters that were not specified when the instance configuration was created, but that
+ are required to launch an instance from the instance configuration. See the
+ :func:`launch_instance_configuration` operation.
:param deferred_fields: The deferred_fields of this InstanceConfiguration.
@@ -276,6 +288,7 @@ def time_created(self):
"""
**[Required]** Gets the time_created of this InstanceConfiguration.
The date and time the instance configuration was created, in the format defined by RFC3339.
+
Example: `2016-08-25T21:10:29.600Z`
@@ -289,6 +302,7 @@ def time_created(self, time_created):
"""
Sets the time_created of this InstanceConfiguration.
The date and time the instance configuration was created, in the format defined by RFC3339.
+
Example: `2016-08-25T21:10:29.600Z`
diff --git a/src/oci/core/models/ipv6.py b/src/oci/core/models/ipv6.py
index af98b940ad..47ee3be4e9 100644
--- a/src/oci/core/models/ipv6.py
+++ b/src/oci/core/models/ipv6.py
@@ -15,6 +15,8 @@ class Ipv6(object):
You can create and assign an IPv6 to any VNIC that is in an IPv6-enabled subnet in an
IPv6-enabled VCN.
+ **Note:** IPv6 addressing is currently supported only in the Government Cloud.
+
For important details about IPv6 addressing in a VCN, see `IPv6 Addresses`__.
__ https://docs.cloud.oracle.com/Content/Network/Concepts/ipv6.htm
diff --git a/src/oci/core/models/launch_options.py b/src/oci/core/models/launch_options.py
index d4baeb7b80..311082dcc7 100644
--- a/src/oci/core/models/launch_options.py
+++ b/src/oci/core/models/launch_options.py
@@ -221,9 +221,10 @@ def firmware(self, firmware):
def network_type(self):
"""
**[Required]** Gets the network_type of this LaunchOptions.
- Emulation type for NIC.
+ Emulation type for the physical network interface card (NIC).
* `E1000` - Emulated Gigabit ethernet controller. Compatible with Linux e1000 network driver.
- * `VFIO` - Direct attached Virtual Function network controller. Default for Oracle provided images.
+ * `VFIO` - Direct attached Virtual Function network controller. This is the networking type
+ when you launch an instance using hardware-assisted (SR-IOV) networking.
* `PARAVIRTUALIZED` - VM instances launch with paravirtualized devices using virtio drivers.
Allowed values for this property are: "E1000", "VFIO", "PARAVIRTUALIZED", 'UNKNOWN_ENUM_VALUE'.
@@ -239,9 +240,10 @@ def network_type(self):
def network_type(self, network_type):
"""
Sets the network_type of this LaunchOptions.
- Emulation type for NIC.
+ Emulation type for the physical network interface card (NIC).
* `E1000` - Emulated Gigabit ethernet controller. Compatible with Linux e1000 network driver.
- * `VFIO` - Direct attached Virtual Function network controller. Default for Oracle provided images.
+ * `VFIO` - Direct attached Virtual Function network controller. This is the networking type
+ when you launch an instance using hardware-assisted (SR-IOV) networking.
* `PARAVIRTUALIZED` - VM instances launch with paravirtualized devices using virtio drivers.
diff --git a/src/oci/core/models/local_peering_gateway.py b/src/oci/core/models/local_peering_gateway.py
index 4aa072eb22..fd1029fdc0 100644
--- a/src/oci/core/models/local_peering_gateway.py
+++ b/src/oci/core/models/local_peering_gateway.py
@@ -505,9 +505,10 @@ def peering_status_details(self, peering_status_details):
def route_table_id(self):
"""
Gets the route_table_id of this LocalPeeringGateway.
- The OCID of the route table the LPG is using. For information about why you
- would associate a route table with an LPG, see
- `Advanced Scenario: Transit Routing`__.
+ The OCID of the route table the LPG is using.
+
+ For information about why you would associate a route table with an LPG, see
+ `Transit Routing: Access to Multiple VCNs in Same Region`__.
__ https://docs.cloud.oracle.com/Content/Network/Tasks/transitrouting.htm
@@ -521,9 +522,10 @@ def route_table_id(self):
def route_table_id(self, route_table_id):
"""
Sets the route_table_id of this LocalPeeringGateway.
- The OCID of the route table the LPG is using. For information about why you
- would associate a route table with an LPG, see
- `Advanced Scenario: Transit Routing`__.
+ The OCID of the route table the LPG is using.
+
+ For information about why you would associate a route table with an LPG, see
+ `Transit Routing: Access to Multiple VCNs in Same Region`__.
__ https://docs.cloud.oracle.com/Content/Network/Tasks/transitrouting.htm
diff --git a/src/oci/core/models/route_rule.py b/src/oci/core/models/route_rule.py
index 9a10b5fa5e..3b5496a572 100644
--- a/src/oci/core/models/route_rule.py
+++ b/src/oci/core/models/route_rule.py
@@ -115,7 +115,8 @@ def destination(self):
* IP address range in CIDR notation. Can be an IPv4 or IPv6 CIDR. For example: `192.168.1.0/24`
or `2001:0db8:0123:45::/56`. If you set this to an IPv6 CIDR, the route rule's target
- can only be a DRG or internet gateway.
+ can only be a DRG or internet gateway. Note that IPv6 addressing is currently supported only
+ in the Government Cloud.
* The `cidrBlock` value for a :class:`Service`, if you're
setting up a route rule for traffic destined for a particular `Service` through
@@ -138,7 +139,8 @@ def destination(self, destination):
* IP address range in CIDR notation. Can be an IPv4 or IPv6 CIDR. For example: `192.168.1.0/24`
or `2001:0db8:0123:45::/56`. If you set this to an IPv6 CIDR, the route rule's target
- can only be a DRG or internet gateway.
+ can only be a DRG or internet gateway. Note that IPv6 addressing is currently supported only
+ in the Government Cloud.
* The `cidrBlock` value for a :class:`Service`, if you're
setting up a route rule for traffic destined for a particular `Service` through
diff --git a/src/oci/core/models/security_rule.py b/src/oci/core/models/security_rule.py
index 631a149642..21ea0995b6 100644
--- a/src/oci/core/models/security_rule.py
+++ b/src/oci/core/models/security_rule.py
@@ -197,6 +197,7 @@ def destination(self):
Allowed values:
* An IP address range in CIDR notation. For example: `192.168.1.0/24` or `2001:0db8:0123:45::/56`
+ Note that IPv6 addressing is currently supported only in the Government Cloud.
* The `cidrBlock` value for a :class:`Service`, if you're
setting up a security rule for traffic destined for a particular `Service` through
@@ -222,6 +223,7 @@ def destination(self, destination):
Allowed values:
* An IP address range in CIDR notation. For example: `192.168.1.0/24` or `2001:0db8:0123:45::/56`
+ Note that IPv6 addressing is currently supported only in the Government Cloud.
* The `cidrBlock` value for a :class:`Service`, if you're
setting up a security rule for traffic destined for a particular `Service` through
@@ -501,6 +503,7 @@ def source(self):
Allowed values:
* An IP address range in CIDR notation. For example: `192.168.1.0/24` or `2001:0db8:0123:45::/56`
+ Note that IPv6 addressing is currently supported only in the Government Cloud.
* The `cidrBlock` value for a :class:`Service`, if you're
setting up a security rule for traffic coming from a particular `Service` through
@@ -526,6 +529,7 @@ def source(self, source):
Allowed values:
* An IP address range in CIDR notation. For example: `192.168.1.0/24` or `2001:0db8:0123:45::/56`
+ Note that IPv6 addressing is currently supported only in the Government Cloud.
* The `cidrBlock` value for a :class:`Service`, if you're
setting up a security rule for traffic coming from a particular `Service` through
@@ -553,7 +557,7 @@ def source_type(self):
:class:`Service` (the rule is for traffic coming from a
particular `Service` through a service gateway).
- * `NETWORK_SECURITY_GROUP`: If the rule's `destination` is the OCID of a
+ * `NETWORK_SECURITY_GROUP`: If the rule's `source` is the OCID of a
:class:`NetworkSecurityGroup`.
Allowed values for this property are: "CIDR_BLOCK", "SERVICE_CIDR_BLOCK", "NETWORK_SECURITY_GROUP", 'UNKNOWN_ENUM_VALUE'.
@@ -577,7 +581,7 @@ def source_type(self, source_type):
:class:`Service` (the rule is for traffic coming from a
particular `Service` through a service gateway).
- * `NETWORK_SECURITY_GROUP`: If the rule's `destination` is the OCID of a
+ * `NETWORK_SECURITY_GROUP`: If the rule's `source` is the OCID of a
:class:`NetworkSecurityGroup`.
diff --git a/src/oci/core/models/service_gateway.py b/src/oci/core/models/service_gateway.py
index 16cdd9f79b..65ed863fb4 100644
--- a/src/oci/core/models/service_gateway.py
+++ b/src/oci/core/models/service_gateway.py
@@ -352,9 +352,10 @@ def lifecycle_state(self, lifecycle_state):
def route_table_id(self):
"""
Gets the route_table_id of this ServiceGateway.
- The OCID of the route table the service gateway is using. For information about why you
- would associate a route table with a service gateway, see
- `Transit Routing: Private Access to Oracle Services Network`__.
+ The OCID of the route table the service gateway is using.
+
+ For information about why you would associate a route table with a service gateway, see
+ `Transit Routing: Private Access to Oracle Services`__.
__ https://docs.cloud.oracle.com/Content/Network/Tasks/transitroutingoracleservices.htm
@@ -368,9 +369,10 @@ def route_table_id(self):
def route_table_id(self, route_table_id):
"""
Sets the route_table_id of this ServiceGateway.
- The OCID of the route table the service gateway is using. For information about why you
- would associate a route table with a service gateway, see
- `Transit Routing: Private Access to Oracle Services Network`__.
+ The OCID of the route table the service gateway is using.
+
+ For information about why you would associate a route table with a service gateway, see
+ `Transit Routing: Private Access to Oracle Services`__.
__ https://docs.cloud.oracle.com/Content/Network/Tasks/transitroutingoracleservices.htm
diff --git a/src/oci/core/models/subnet.py b/src/oci/core/models/subnet.py
index d0ff5a6db2..7ac100f45e 100644
--- a/src/oci/core/models/subnet.py
+++ b/src/oci/core/models/subnet.py
@@ -486,7 +486,8 @@ def ipv6_cidr_block(self):
"""
Gets the ipv6_cidr_block of this Subnet.
For an IPv6-enabled subnet, this is the IPv6 CIDR block for the subnet's private IP address
- space. The subnet size is always /64.
+ space. The subnet size is always /64. Note that IPv6 addressing is currently supported only
+ in the Government Cloud.
Example: `2001:0db8:0123:1111::/64`
@@ -501,7 +502,8 @@ def ipv6_cidr_block(self, ipv6_cidr_block):
"""
Sets the ipv6_cidr_block of this Subnet.
For an IPv6-enabled subnet, this is the IPv6 CIDR block for the subnet's private IP address
- space. The subnet size is always /64.
+ space. The subnet size is always /64. Note that IPv6 addressing is currently supported only
+ in the Government Cloud.
Example: `2001:0db8:0123:1111::/64`
diff --git a/src/oci/core/models/update_console_history_details.py b/src/oci/core/models/update_console_history_details.py
index 5b43c4cd95..2dd5b81391 100644
--- a/src/oci/core/models/update_console_history_details.py
+++ b/src/oci/core/models/update_console_history_details.py
@@ -85,6 +85,7 @@ def display_name(self):
"""
Gets the display_name of this UpdateConsoleHistoryDetails.
A user-friendly name. Does not have to be unique, and it's changeable.
+ Avoid entering confidential information.
:return: The display_name of this UpdateConsoleHistoryDetails.
@@ -97,6 +98,7 @@ def display_name(self, display_name):
"""
Sets the display_name of this UpdateConsoleHistoryDetails.
A user-friendly name. Does not have to be unique, and it's changeable.
+ Avoid entering confidential information.
:param display_name: The display_name of this UpdateConsoleHistoryDetails.
diff --git a/src/oci/core/models/update_drg_attachment_details.py b/src/oci/core/models/update_drg_attachment_details.py
index 9470c294c4..c63ea381c7 100644
--- a/src/oci/core/models/update_drg_attachment_details.py
+++ b/src/oci/core/models/update_drg_attachment_details.py
@@ -69,11 +69,15 @@ def display_name(self, display_name):
def route_table_id(self):
"""
Gets the route_table_id of this UpdateDrgAttachmentDetails.
- The OCID of the route table the DRG attachment will use. For information about why you
- would associate a route table with a DRG attachment, see
- `Advanced Scenario: Transit Routing`__.
+ The OCID of the route table the DRG attachment will use.
+
+ For information about why you would associate a route table with a DRG attachment, see:
+
+ * `Transit Routing: Access to Multiple VCNs in Same Region`__
+ * `Transit Routing: Private Access to Oracle Services`__
__ https://docs.cloud.oracle.com/Content/Network/Tasks/transitrouting.htm
+ __ https://docs.cloud.oracle.com/Content/Network/Tasks/transitroutingoracleservices.htm
:return: The route_table_id of this UpdateDrgAttachmentDetails.
@@ -85,11 +89,15 @@ def route_table_id(self):
def route_table_id(self, route_table_id):
"""
Sets the route_table_id of this UpdateDrgAttachmentDetails.
- The OCID of the route table the DRG attachment will use. For information about why you
- would associate a route table with a DRG attachment, see
- `Advanced Scenario: Transit Routing`__.
+ The OCID of the route table the DRG attachment will use.
+
+ For information about why you would associate a route table with a DRG attachment, see:
+
+ * `Transit Routing: Access to Multiple VCNs in Same Region`__
+ * `Transit Routing: Private Access to Oracle Services`__
__ https://docs.cloud.oracle.com/Content/Network/Tasks/transitrouting.htm
+ __ https://docs.cloud.oracle.com/Content/Network/Tasks/transitroutingoracleservices.htm
:param route_table_id: The route_table_id of this UpdateDrgAttachmentDetails.
diff --git a/src/oci/core/models/update_instance_pool_details.py b/src/oci/core/models/update_instance_pool_details.py
index e0202d05c1..f0301479f5 100644
--- a/src/oci/core/models/update_instance_pool_details.py
+++ b/src/oci/core/models/update_instance_pool_details.py
@@ -105,7 +105,8 @@ def defined_tags(self, defined_tags):
def display_name(self):
"""
Gets the display_name of this UpdateInstancePoolDetails.
- The user-friendly name. Does not have to be unique.
+ A user-friendly name for the instance pool. Does not have to be unique, and it's
+ changeable. Avoid entering confidential information.
:return: The display_name of this UpdateInstancePoolDetails.
@@ -117,7 +118,8 @@ def display_name(self):
def display_name(self, display_name):
"""
Sets the display_name of this UpdateInstancePoolDetails.
- The user-friendly name. Does not have to be unique.
+ A user-friendly name for the instance pool. Does not have to be unique, and it's
+ changeable. Avoid entering confidential information.
:param display_name: The display_name of this UpdateInstancePoolDetails.
diff --git a/src/oci/core/models/update_local_peering_gateway_details.py b/src/oci/core/models/update_local_peering_gateway_details.py
index 475be66362..8693701854 100644
--- a/src/oci/core/models/update_local_peering_gateway_details.py
+++ b/src/oci/core/models/update_local_peering_gateway_details.py
@@ -151,9 +151,10 @@ def freeform_tags(self, freeform_tags):
def route_table_id(self):
"""
Gets the route_table_id of this UpdateLocalPeeringGatewayDetails.
- The OCID of the route table the LPG will use. For information about why you
- would associate a route table with an LPG, see
- `Advanced Scenario: Transit Routing`__.
+ The OCID of the route table the LPG will use.
+
+ For information about why you would associate a route table with an LPG, see
+ `Transit Routing: Access to Multiple VCNs in Same Region`__.
__ https://docs.cloud.oracle.com/Content/Network/Tasks/transitrouting.htm
@@ -167,9 +168,10 @@ def route_table_id(self):
def route_table_id(self, route_table_id):
"""
Sets the route_table_id of this UpdateLocalPeeringGatewayDetails.
- The OCID of the route table the LPG will use. For information about why you
- would associate a route table with an LPG, see
- `Advanced Scenario: Transit Routing`__.
+ The OCID of the route table the LPG will use.
+
+ For information about why you would associate a route table with an LPG, see
+ `Transit Routing: Access to Multiple VCNs in Same Region`__.
__ https://docs.cloud.oracle.com/Content/Network/Tasks/transitrouting.htm
diff --git a/src/oci/core/models/update_network_security_group_details.py b/src/oci/core/models/update_network_security_group_details.py
index 6fa808c601..7d2ad4e4df 100644
--- a/src/oci/core/models/update_network_security_group_details.py
+++ b/src/oci/core/models/update_network_security_group_details.py
@@ -85,6 +85,7 @@ def display_name(self):
"""
Gets the display_name of this UpdateNetworkSecurityGroupDetails.
A user-friendly name. Does not have to be unique, and it's changeable.
+ Avoid entering confidential information.
:return: The display_name of this UpdateNetworkSecurityGroupDetails.
@@ -97,6 +98,7 @@ def display_name(self, display_name):
"""
Sets the display_name of this UpdateNetworkSecurityGroupDetails.
A user-friendly name. Does not have to be unique, and it's changeable.
+ Avoid entering confidential information.
:param display_name: The display_name of this UpdateNetworkSecurityGroupDetails.
diff --git a/src/oci/core/models/update_security_rule_details.py b/src/oci/core/models/update_security_rule_details.py
index 8e09282bb4..03db5c9c7c 100644
--- a/src/oci/core/models/update_security_rule_details.py
+++ b/src/oci/core/models/update_security_rule_details.py
@@ -148,7 +148,7 @@ def __init__(self, **kwargs):
def description(self):
"""
Gets the description of this UpdateSecurityRuleDetails.
- An optional description of your choice for the rule.
+ An optional description of your choice for the rule. Avoid entering confidential information.
:return: The description of this UpdateSecurityRuleDetails.
@@ -160,7 +160,7 @@ def description(self):
def description(self, description):
"""
Sets the description of this UpdateSecurityRuleDetails.
- An optional description of your choice for the rule.
+ An optional description of your choice for the rule. Avoid entering confidential information.
:param description: The description of this UpdateSecurityRuleDetails.
@@ -178,6 +178,7 @@ def destination(self):
Allowed values:
* An IP address range in CIDR notation. For example: `192.168.1.0/24` or `2001:0db8:0123:45::/56`
+ Note that IPv6 addressing is currently supported only in the Government Cloud.
* The `cidrBlock` value for a :class:`Service`, if you're
setting up a security rule for traffic destined for a particular `Service` through
@@ -203,6 +204,7 @@ def destination(self, destination):
Allowed values:
* An IP address range in CIDR notation. For example: `192.168.1.0/24` or `2001:0db8:0123:45::/56`
+ Note that IPv6 addressing is currently supported only in the Government Cloud.
* The `cidrBlock` value for a :class:`Service`, if you're
setting up a security rule for traffic destined for a particular `Service` through
@@ -458,6 +460,7 @@ def source(self):
Allowed values:
* An IP address range in CIDR notation. For example: `192.168.1.0/24` or `2001:0db8:0123:45::/56`
+ Note that IPv6 addressing is currently supported only in the Government Cloud.
* The `cidrBlock` value for a :class:`Service`, if you're
setting up a security rule for traffic coming from a particular `Service` through
@@ -483,6 +486,7 @@ def source(self, source):
Allowed values:
* An IP address range in CIDR notation. For example: `192.168.1.0/24` or `2001:0db8:0123:45::/56`
+ Note that IPv6 addressing is currently supported only in the Government Cloud.
* The `cidrBlock` value for a :class:`Service`, if you're
setting up a security rule for traffic coming from a particular `Service` through
@@ -510,7 +514,7 @@ def source_type(self):
:class:`Service` (the rule is for traffic coming from a
particular `Service` through a service gateway).
- * `NETWORK_SECURITY_GROUP`: If the rule's `destination` is the OCID of a
+ * `NETWORK_SECURITY_GROUP`: If the rule's `source` is the OCID of a
:class:`NetworkSecurityGroup`.
Allowed values for this property are: "CIDR_BLOCK", "SERVICE_CIDR_BLOCK", "NETWORK_SECURITY_GROUP"
@@ -533,7 +537,7 @@ def source_type(self, source_type):
:class:`Service` (the rule is for traffic coming from a
particular `Service` through a service gateway).
- * `NETWORK_SECURITY_GROUP`: If the rule's `destination` is the OCID of a
+ * `NETWORK_SECURITY_GROUP`: If the rule's `source` is the OCID of a
:class:`NetworkSecurityGroup`.
diff --git a/src/oci/core/models/update_service_gateway_details.py b/src/oci/core/models/update_service_gateway_details.py
index 4dd6e0613e..6fb23e9d5d 100644
--- a/src/oci/core/models/update_service_gateway_details.py
+++ b/src/oci/core/models/update_service_gateway_details.py
@@ -195,9 +195,10 @@ def freeform_tags(self, freeform_tags):
def route_table_id(self):
"""
Gets the route_table_id of this UpdateServiceGatewayDetails.
- The OCID of the route table the service gateway will use. For information about why you
- would associate a route table with a service gateway, see
- `Transit Routing: Private Access to Oracle Services Network`__.
+ The OCID of the route table the service gateway will use.
+
+ For information about why you would associate a route table with a service gateway, see
+ `Transit Routing: Private Access to Oracle Services`__.
__ https://docs.cloud.oracle.com/Content/Network/Tasks/transitroutingoracleservices.htm
@@ -211,9 +212,10 @@ def route_table_id(self):
def route_table_id(self, route_table_id):
"""
Sets the route_table_id of this UpdateServiceGatewayDetails.
- The OCID of the route table the service gateway will use. For information about why you
- would associate a route table with a service gateway, see
- `Transit Routing: Private Access to Oracle Services Network`__.
+ The OCID of the route table the service gateway will use.
+
+ For information about why you would associate a route table with a service gateway, see
+ `Transit Routing: Private Access to Oracle Services`__.
__ https://docs.cloud.oracle.com/Content/Network/Tasks/transitroutingoracleservices.htm
diff --git a/src/oci/core/models/update_vnic_details.py b/src/oci/core/models/update_vnic_details.py
index 3ca3f5e192..7b6966e976 100644
--- a/src/oci/core/models/update_vnic_details.py
+++ b/src/oci/core/models/update_vnic_details.py
@@ -106,6 +106,7 @@ def display_name(self):
"""
Gets the display_name of this UpdateVnicDetails.
A user-friendly name. Does not have to be unique, and it's changeable.
+ Avoid entering confidential information.
:return: The display_name of this UpdateVnicDetails.
@@ -118,6 +119,7 @@ def display_name(self, display_name):
"""
Sets the display_name of this UpdateVnicDetails.
A user-friendly name. Does not have to be unique, and it's changeable.
+ Avoid entering confidential information.
:param display_name: The display_name of this UpdateVnicDetails.
diff --git a/src/oci/core/models/update_volume_backup_details.py b/src/oci/core/models/update_volume_backup_details.py
index 91f5b12c7b..590d7d32ff 100644
--- a/src/oci/core/models/update_volume_backup_details.py
+++ b/src/oci/core/models/update_volume_backup_details.py
@@ -84,7 +84,7 @@ def defined_tags(self, defined_tags):
def display_name(self):
"""
Gets the display_name of this UpdateVolumeBackupDetails.
- A friendly user-specified name for the volume backup.
+ A user-friendly name for the volume backup.
Avoid entering confidential information.
@@ -97,7 +97,7 @@ def display_name(self):
def display_name(self, display_name):
"""
Sets the display_name of this UpdateVolumeBackupDetails.
- A friendly user-specified name for the volume backup.
+ A user-friendly name for the volume backup.
Avoid entering confidential information.
diff --git a/src/oci/core/models/update_volume_group_backup_details.py b/src/oci/core/models/update_volume_group_backup_details.py
index 51349ef989..b4331187f6 100644
--- a/src/oci/core/models/update_volume_group_backup_details.py
+++ b/src/oci/core/models/update_volume_group_backup_details.py
@@ -84,7 +84,7 @@ def defined_tags(self, defined_tags):
def display_name(self):
"""
Gets the display_name of this UpdateVolumeGroupBackupDetails.
- A friendly user-specified name for the volume group backup.
+ A user-friendly name for the volume group backup. Avoid entering confidential information.
:return: The display_name of this UpdateVolumeGroupBackupDetails.
@@ -96,7 +96,7 @@ def display_name(self):
def display_name(self, display_name):
"""
Sets the display_name of this UpdateVolumeGroupBackupDetails.
- A friendly user-specified name for the volume group backup.
+ A user-friendly name for the volume group backup. Avoid entering confidential information.
:param display_name: The display_name of this UpdateVolumeGroupBackupDetails.
diff --git a/src/oci/core/models/update_volume_group_details.py b/src/oci/core/models/update_volume_group_details.py
index 09373f8ba7..5efd24115d 100644
--- a/src/oci/core/models/update_volume_group_details.py
+++ b/src/oci/core/models/update_volume_group_details.py
@@ -91,7 +91,7 @@ def defined_tags(self, defined_tags):
def display_name(self):
"""
Gets the display_name of this UpdateVolumeGroupDetails.
- A user-friendly name for the volume group.
+ A user-friendly name for the volume group. Avoid entering confidential information.
:return: The display_name of this UpdateVolumeGroupDetails.
@@ -103,7 +103,7 @@ def display_name(self):
def display_name(self, display_name):
"""
Sets the display_name of this UpdateVolumeGroupDetails.
- A user-friendly name for the volume group.
+ A user-friendly name for the volume group. Avoid entering confidential information.
:param display_name: The display_name of this UpdateVolumeGroupDetails.
diff --git a/src/oci/core/models/vcn.py b/src/oci/core/models/vcn.py
index 656911528b..42c2090011 100644
--- a/src/oci/core/models/vcn.py
+++ b/src/oci/core/models/vcn.py
@@ -460,7 +460,8 @@ def ipv6_cidr_block(self):
For an IPv6-enabled VCN, this is the IPv6 CIDR block for the VCN's private IP address space.
The VCN size is always /48. If you don't provide a value when creating the VCN, Oracle
provides one and uses that *same* CIDR for the `ipv6PublicCidrBlock`. If you do provide a
- value, Oracle provides a *different* CIDR for the `ipv6PublicCidrBlock`.
+ value, Oracle provides a *different* CIDR for the `ipv6PublicCidrBlock`. Note that IPv6
+ addressing is currently supported only in the Government Cloud.
Example: `2001:0db8:0123::/48`
@@ -477,7 +478,8 @@ def ipv6_cidr_block(self, ipv6_cidr_block):
For an IPv6-enabled VCN, this is the IPv6 CIDR block for the VCN's private IP address space.
The VCN size is always /48. If you don't provide a value when creating the VCN, Oracle
provides one and uses that *same* CIDR for the `ipv6PublicCidrBlock`. If you do provide a
- value, Oracle provides a *different* CIDR for the `ipv6PublicCidrBlock`.
+ value, Oracle provides a *different* CIDR for the `ipv6PublicCidrBlock`. Note that IPv6
+ addressing is currently supported only in the Government Cloud.
Example: `2001:0db8:0123::/48`
diff --git a/src/oci/core/models/volume_backup_schedule.py b/src/oci/core/models/volume_backup_schedule.py
index d8688f8dec..eb9a0e67a3 100644
--- a/src/oci/core/models/volume_backup_schedule.py
+++ b/src/oci/core/models/volume_backup_schedule.py
@@ -118,7 +118,7 @@ def backup_type(self, backup_type):
@property
def offset_seconds(self):
"""
- **[Required]** Gets the offset_seconds of this VolumeBackupSchedule.
+ Gets the offset_seconds of this VolumeBackupSchedule.
The number of seconds that the backup time should be shifted from the default interval boundaries specified by the period. Backup time = Frequency start time + Offset.
diff --git a/src/oci/core/virtual_network_client.py b/src/oci/core/virtual_network_client.py
index 236d242041..bc73762b72 100644
--- a/src/oci/core/virtual_network_client.py
+++ b/src/oci/core/virtual_network_client.py
@@ -664,6 +664,190 @@ def change_cross_connect_group_compartment(self, cross_connect_group_id, change_
header_params=header_params,
body=change_cross_connect_group_compartment_details)
+ def change_dhcp_options_compartment(self, dhcp_id, change_dhcp_options_compartment_details, **kwargs):
+ """
+ ChangeDhcpOptionsCompartment
+ Moves a set of DHCP options into a different compartment within the same tenancy. For information
+ about moving resources between compartments, see
+ `Moving Resources to a Different Compartment`__.
+
+ __ https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes
+
+
+ :param str dhcp_id: (required)
+ The OCID for the set of DHCP options.
+
+ :param ChangeDhcpOptionsCompartmentDetails change_dhcp_options_compartment_details: (required)
+ Request to change the compartment of a set of DHCP Options.
+
+ :param str opc_request_id: (optional)
+ Unique identifier for the request.
+ If you need to contact Oracle about a particular request, please provide the request ID.
+
+ :param str 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
+ may be rejected).
+
+ :param obj retry_strategy: (optional)
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
+
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY`
+ is also available. The specifics of the default retry strategy are described `here `__.
+
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
+
+ :return: A :class:`~oci.response.Response` object with data of type None
+ :rtype: :class:`~oci.response.Response`
+ """
+ resource_path = "/dhcps/{dhcpId}/actions/changeCompartment"
+ method = "POST"
+
+ # Don't accept unknown kwargs
+ expected_kwargs = [
+ "retry_strategy",
+ "opc_request_id",
+ "opc_retry_token"
+ ]
+ extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs]
+ if extra_kwargs:
+ raise ValueError(
+ "change_dhcp_options_compartment got unknown kwargs: {!r}".format(extra_kwargs))
+
+ path_params = {
+ "dhcpId": dhcp_id
+ }
+
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
+
+ for (k, v) in six.iteritems(path_params):
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
+ raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
+
+ header_params = {
+ "accept": "application/json",
+ "content-type": "application/json",
+ "opc-request-id": kwargs.get("opc_request_id", missing),
+ "opc-retry-token": kwargs.get("opc_retry_token", missing)
+ }
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
+
+ retry_strategy = self.retry_strategy
+ if kwargs.get('retry_strategy'):
+ retry_strategy = kwargs.get('retry_strategy')
+
+ if retry_strategy:
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
+ self.base_client.add_opc_retry_token_if_needed(header_params)
+ return retry_strategy.make_retrying_call(
+ self.base_client.call_api,
+ resource_path=resource_path,
+ method=method,
+ path_params=path_params,
+ header_params=header_params,
+ body=change_dhcp_options_compartment_details)
+ else:
+ return self.base_client.call_api(
+ resource_path=resource_path,
+ method=method,
+ path_params=path_params,
+ header_params=header_params,
+ body=change_dhcp_options_compartment_details)
+
+ def change_internet_gateway_compartment(self, ig_id, change_internet_gateway_compartment_details, **kwargs):
+ """
+ ChangeInternetGatewayCompartment
+ Moves an internet gateway into a different compartment within the same tenancy. For information
+ about moving resources between compartments, see
+ `Moving Resources to a Different Compartment`__.
+
+ __ https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes
+
+
+ :param str ig_id: (required)
+ The OCID of the internet gateway.
+
+ :param ChangeInternetGatewayCompartmentDetails change_internet_gateway_compartment_details: (required)
+ Request to change the compartment of an internet gateway.
+
+ :param str opc_request_id: (optional)
+ Unique identifier for the request.
+ If you need to contact Oracle about a particular request, please provide the request ID.
+
+ :param str 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
+ may be rejected).
+
+ :param obj retry_strategy: (optional)
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
+
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY`
+ is also available. The specifics of the default retry strategy are described `here `__.
+
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
+
+ :return: A :class:`~oci.response.Response` object with data of type None
+ :rtype: :class:`~oci.response.Response`
+ """
+ resource_path = "/internetGateways/{igId}/actions/changeCompartment"
+ method = "POST"
+
+ # Don't accept unknown kwargs
+ expected_kwargs = [
+ "retry_strategy",
+ "opc_request_id",
+ "opc_retry_token"
+ ]
+ extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs]
+ if extra_kwargs:
+ raise ValueError(
+ "change_internet_gateway_compartment got unknown kwargs: {!r}".format(extra_kwargs))
+
+ path_params = {
+ "igId": ig_id
+ }
+
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
+
+ for (k, v) in six.iteritems(path_params):
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
+ raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
+
+ header_params = {
+ "accept": "application/json",
+ "content-type": "application/json",
+ "opc-request-id": kwargs.get("opc_request_id", missing),
+ "opc-retry-token": kwargs.get("opc_retry_token", missing)
+ }
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
+
+ retry_strategy = self.retry_strategy
+ if kwargs.get('retry_strategy'):
+ retry_strategy = kwargs.get('retry_strategy')
+
+ if retry_strategy:
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
+ self.base_client.add_opc_retry_token_if_needed(header_params)
+ return retry_strategy.make_retrying_call(
+ self.base_client.call_api,
+ resource_path=resource_path,
+ method=method,
+ path_params=path_params,
+ header_params=header_params,
+ body=change_internet_gateway_compartment_details)
+ else:
+ return self.base_client.call_api(
+ resource_path=resource_path,
+ method=method,
+ path_params=path_params,
+ header_params=header_params,
+ body=change_internet_gateway_compartment_details)
+
def change_ip_sec_connection_compartment(self, ipsc_id, change_ip_sec_connection_compartment_details, **kwargs):
"""
ChangeIPSecConnectionCompartment
@@ -756,6 +940,98 @@ def change_ip_sec_connection_compartment(self, ipsc_id, change_ip_sec_connection
header_params=header_params,
body=change_ip_sec_connection_compartment_details)
+ def change_local_peering_gateway_compartment(self, local_peering_gateway_id, change_local_peering_gateway_compartment_details, **kwargs):
+ """
+ ChangeLocalPeeringGatewayCompartment
+ Moves a local peering gateway into a different compartment within the same tenancy. For information
+ about moving resources between compartments, see
+ `Moving Resources to a Different Compartment`__.
+
+ __ https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes
+
+
+ :param str local_peering_gateway_id: (required)
+ The OCID of the local peering gateway.
+
+ :param ChangeLocalPeeringGatewayCompartmentDetails change_local_peering_gateway_compartment_details: (required)
+ Request to change the compartment of a given local peering gateway.
+
+ :param str opc_request_id: (optional)
+ Unique identifier for the request.
+ If you need to contact Oracle about a particular request, please provide the request ID.
+
+ :param str 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
+ may be rejected).
+
+ :param obj retry_strategy: (optional)
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
+
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY`
+ is also available. The specifics of the default retry strategy are described `here `__.
+
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
+
+ :return: A :class:`~oci.response.Response` object with data of type None
+ :rtype: :class:`~oci.response.Response`
+ """
+ resource_path = "/localPeeringGateways/{localPeeringGatewayId}/actions/changeCompartment"
+ method = "POST"
+
+ # Don't accept unknown kwargs
+ expected_kwargs = [
+ "retry_strategy",
+ "opc_request_id",
+ "opc_retry_token"
+ ]
+ extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs]
+ if extra_kwargs:
+ raise ValueError(
+ "change_local_peering_gateway_compartment got unknown kwargs: {!r}".format(extra_kwargs))
+
+ path_params = {
+ "localPeeringGatewayId": local_peering_gateway_id
+ }
+
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
+
+ for (k, v) in six.iteritems(path_params):
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
+ raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
+
+ header_params = {
+ "accept": "application/json",
+ "content-type": "application/json",
+ "opc-request-id": kwargs.get("opc_request_id", missing),
+ "opc-retry-token": kwargs.get("opc_retry_token", missing)
+ }
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
+
+ retry_strategy = self.retry_strategy
+ if kwargs.get('retry_strategy'):
+ retry_strategy = kwargs.get('retry_strategy')
+
+ if retry_strategy:
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
+ self.base_client.add_opc_retry_token_if_needed(header_params)
+ return retry_strategy.make_retrying_call(
+ self.base_client.call_api,
+ resource_path=resource_path,
+ method=method,
+ path_params=path_params,
+ header_params=header_params,
+ body=change_local_peering_gateway_compartment_details)
+ else:
+ return self.base_client.call_api(
+ resource_path=resource_path,
+ method=method,
+ path_params=path_params,
+ header_params=header_params,
+ body=change_local_peering_gateway_compartment_details)
+
def change_nat_gateway_compartment(self, nat_gateway_id, change_nat_gateway_compartment_details, **kwargs):
"""
ChangeNatGatewayCompartment
@@ -850,6 +1126,194 @@ def change_nat_gateway_compartment(self, nat_gateway_id, change_nat_gateway_comp
header_params=header_params,
body=change_nat_gateway_compartment_details)
+ def change_network_security_group_compartment(self, network_security_group_id, change_network_security_group_compartment_details, **kwargs):
+ """
+ ChangeNetworkSecurityGroupCompartment
+ Moves a network security group into a different compartment within the same tenancy. For
+ information about moving resources between compartments, see `Moving Resources to a Different Compartment`__.
+
+ __ https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes
+
+
+ :param str network_security_group_id: (required)
+ The `OCID`__ of the network security group.
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
+
+ :param ChangeNetworkSecurityGroupCompartmentDetails change_network_security_group_compartment_details: (required)
+ Request to change the compartment of a network security group.
+
+ :param str opc_request_id: (optional)
+ Unique identifier for the request.
+ If you need to contact Oracle about a particular request, please provide the request ID.
+
+ :param str 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
+ may be rejected).
+
+ :param obj retry_strategy: (optional)
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
+
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY`
+ is also available. The specifics of the default retry strategy are described `here `__.
+
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
+
+ :return: A :class:`~oci.response.Response` object with data of type None
+ :rtype: :class:`~oci.response.Response`
+ """
+ resource_path = "/networkSecurityGroups/{networkSecurityGroupId}/actions/changeCompartment"
+ method = "POST"
+
+ # Don't accept unknown kwargs
+ expected_kwargs = [
+ "retry_strategy",
+ "opc_request_id",
+ "opc_retry_token"
+ ]
+ extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs]
+ if extra_kwargs:
+ raise ValueError(
+ "change_network_security_group_compartment got unknown kwargs: {!r}".format(extra_kwargs))
+
+ path_params = {
+ "networkSecurityGroupId": network_security_group_id
+ }
+
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
+
+ for (k, v) in six.iteritems(path_params):
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
+ raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
+
+ header_params = {
+ "accept": "application/json",
+ "content-type": "application/json",
+ "opc-request-id": kwargs.get("opc_request_id", missing),
+ "opc-retry-token": kwargs.get("opc_retry_token", missing)
+ }
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
+
+ retry_strategy = self.retry_strategy
+ if kwargs.get('retry_strategy'):
+ retry_strategy = kwargs.get('retry_strategy')
+
+ if retry_strategy:
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
+ self.base_client.add_opc_retry_token_if_needed(header_params)
+ return retry_strategy.make_retrying_call(
+ self.base_client.call_api,
+ resource_path=resource_path,
+ method=method,
+ path_params=path_params,
+ header_params=header_params,
+ body=change_network_security_group_compartment_details)
+ else:
+ return self.base_client.call_api(
+ resource_path=resource_path,
+ method=method,
+ path_params=path_params,
+ header_params=header_params,
+ body=change_network_security_group_compartment_details)
+
+ def change_public_ip_compartment(self, public_ip_id, change_public_ip_compartment_details, **kwargs):
+ """
+ ChangePublicIpCompartment
+ Moves a public IP into a different compartment within the same tenancy. For information
+ about moving resources between compartments, see
+ `Moving Resources to a Different Compartment`__.
+
+ This operation applies only to reserved public IPs. Ephemeral public IPs always belong to the
+ same compartment as their VNIC and move accordingly.
+
+ __ https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes
+
+
+ :param str public_ip_id: (required)
+ The OCID of the public IP.
+
+ :param ChangePublicIpCompartmentDetails change_public_ip_compartment_details: (required)
+ Request to change the compartment of a Public IP.
+
+ :param str opc_request_id: (optional)
+ Unique identifier for the request.
+ If you need to contact Oracle about a particular request, please provide the request ID.
+
+ :param str 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
+ may be rejected).
+
+ :param obj retry_strategy: (optional)
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
+
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY`
+ is also available. The specifics of the default retry strategy are described `here `__.
+
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
+
+ :return: A :class:`~oci.response.Response` object with data of type None
+ :rtype: :class:`~oci.response.Response`
+ """
+ resource_path = "/publicIps/{publicIpId}/actions/changeCompartment"
+ method = "POST"
+
+ # Don't accept unknown kwargs
+ expected_kwargs = [
+ "retry_strategy",
+ "opc_request_id",
+ "opc_retry_token"
+ ]
+ extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs]
+ if extra_kwargs:
+ raise ValueError(
+ "change_public_ip_compartment got unknown kwargs: {!r}".format(extra_kwargs))
+
+ path_params = {
+ "publicIpId": public_ip_id
+ }
+
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
+
+ for (k, v) in six.iteritems(path_params):
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
+ raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
+
+ header_params = {
+ "accept": "application/json",
+ "content-type": "application/json",
+ "opc-request-id": kwargs.get("opc_request_id", missing),
+ "opc-retry-token": kwargs.get("opc_retry_token", missing)
+ }
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
+
+ retry_strategy = self.retry_strategy
+ if kwargs.get('retry_strategy'):
+ retry_strategy = kwargs.get('retry_strategy')
+
+ if retry_strategy:
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
+ self.base_client.add_opc_retry_token_if_needed(header_params)
+ return retry_strategy.make_retrying_call(
+ self.base_client.call_api,
+ resource_path=resource_path,
+ method=method,
+ path_params=path_params,
+ header_params=header_params,
+ body=change_public_ip_compartment_details)
+ else:
+ return self.base_client.call_api(
+ resource_path=resource_path,
+ method=method,
+ path_params=path_params,
+ header_params=header_params,
+ body=change_public_ip_compartment_details)
+
def change_remote_peering_connection_compartment(self, remote_peering_connection_id, change_remote_peering_connection_compartment_details, **kwargs):
"""
ChangeRemotePeeringConnectionCompartment
diff --git a/src/oci/file_storage/models/create_file_system_details.py b/src/oci/file_storage/models/create_file_system_details.py
index 4025786d4e..dbdc789373 100644
--- a/src/oci/file_storage/models/create_file_system_details.py
+++ b/src/oci/file_storage/models/create_file_system_details.py
@@ -37,13 +37,18 @@ def __init__(self, **kwargs):
The value to assign to the defined_tags property of this CreateFileSystemDetails.
:type defined_tags: dict(str, dict(str, object))
+ :param kms_key_id:
+ The value to assign to the kms_key_id property of this CreateFileSystemDetails.
+ :type kms_key_id: str
+
"""
self.swagger_types = {
'availability_domain': 'str',
'compartment_id': 'str',
'display_name': 'str',
'freeform_tags': 'dict(str, str)',
- 'defined_tags': 'dict(str, dict(str, object))'
+ 'defined_tags': 'dict(str, dict(str, object))',
+ 'kms_key_id': 'str'
}
self.attribute_map = {
@@ -51,7 +56,8 @@ def __init__(self, **kwargs):
'compartment_id': 'compartmentId',
'display_name': 'displayName',
'freeform_tags': 'freeformTags',
- 'defined_tags': 'definedTags'
+ 'defined_tags': 'definedTags',
+ 'kms_key_id': 'kmsKeyId'
}
self._availability_domain = None
@@ -59,6 +65,7 @@ def __init__(self, **kwargs):
self._display_name = None
self._freeform_tags = None
self._defined_tags = None
+ self._kms_key_id = None
@property
def availability_domain(self):
@@ -208,6 +215,30 @@ def defined_tags(self, defined_tags):
"""
self._defined_tags = defined_tags
+ @property
+ def kms_key_id(self):
+ """
+ Gets the kms_key_id of this CreateFileSystemDetails.
+ The OCID of KMS key used to encrypt the encryption keys associated with this file system.
+
+
+ :return: The kms_key_id of this CreateFileSystemDetails.
+ :rtype: str
+ """
+ return self._kms_key_id
+
+ @kms_key_id.setter
+ def kms_key_id(self, kms_key_id):
+ """
+ Sets the kms_key_id of this CreateFileSystemDetails.
+ The OCID of KMS key used to encrypt the encryption keys associated with this file system.
+
+
+ :param kms_key_id: The kms_key_id of this CreateFileSystemDetails.
+ :type: str
+ """
+ self._kms_key_id = kms_key_id
+
def __repr__(self):
return formatted_flat_dict(self)
diff --git a/src/oci/file_storage/models/file_system.py b/src/oci/file_storage/models/file_system.py
index aff65539cd..987a1d6140 100644
--- a/src/oci/file_storage/models/file_system.py
+++ b/src/oci/file_storage/models/file_system.py
@@ -84,6 +84,10 @@ def __init__(self, **kwargs):
The value to assign to the defined_tags property of this FileSystem.
:type defined_tags: dict(str, dict(str, object))
+ :param kms_key_id:
+ The value to assign to the kms_key_id property of this FileSystem.
+ :type kms_key_id: str
+
"""
self.swagger_types = {
'availability_domain': 'str',
@@ -94,7 +98,8 @@ def __init__(self, **kwargs):
'lifecycle_state': 'str',
'time_created': 'datetime',
'freeform_tags': 'dict(str, str)',
- 'defined_tags': 'dict(str, dict(str, object))'
+ 'defined_tags': 'dict(str, dict(str, object))',
+ 'kms_key_id': 'str'
}
self.attribute_map = {
@@ -106,7 +111,8 @@ def __init__(self, **kwargs):
'lifecycle_state': 'lifecycleState',
'time_created': 'timeCreated',
'freeform_tags': 'freeformTags',
- 'defined_tags': 'definedTags'
+ 'defined_tags': 'definedTags',
+ 'kms_key_id': 'kmsKeyId'
}
self._availability_domain = None
@@ -118,6 +124,7 @@ def __init__(self, **kwargs):
self._time_created = None
self._freeform_tags = None
self._defined_tags = None
+ self._kms_key_id = None
@property
def availability_domain(self):
@@ -387,6 +394,30 @@ def defined_tags(self, defined_tags):
"""
self._defined_tags = defined_tags
+ @property
+ def kms_key_id(self):
+ """
+ Gets the kms_key_id of this FileSystem.
+ The OCID of KMS key used to encrypt the encryption keys associated with this file system.
+
+
+ :return: The kms_key_id of this FileSystem.
+ :rtype: str
+ """
+ return self._kms_key_id
+
+ @kms_key_id.setter
+ def kms_key_id(self, kms_key_id):
+ """
+ Sets the kms_key_id of this FileSystem.
+ The OCID of KMS key used to encrypt the encryption keys associated with this file system.
+
+
+ :param kms_key_id: The kms_key_id of this FileSystem.
+ :type: str
+ """
+ self._kms_key_id = kms_key_id
+
def __repr__(self):
return formatted_flat_dict(self)
diff --git a/src/oci/file_storage/models/file_system_summary.py b/src/oci/file_storage/models/file_system_summary.py
index d0fc35ffe2..14134e414d 100644
--- a/src/oci/file_storage/models/file_system_summary.py
+++ b/src/oci/file_storage/models/file_system_summary.py
@@ -71,6 +71,10 @@ def __init__(self, **kwargs):
The value to assign to the defined_tags property of this FileSystemSummary.
:type defined_tags: dict(str, dict(str, object))
+ :param kms_key_id:
+ The value to assign to the kms_key_id property of this FileSystemSummary.
+ :type kms_key_id: str
+
"""
self.swagger_types = {
'availability_domain': 'str',
@@ -81,7 +85,8 @@ def __init__(self, **kwargs):
'lifecycle_state': 'str',
'time_created': 'datetime',
'freeform_tags': 'dict(str, str)',
- 'defined_tags': 'dict(str, dict(str, object))'
+ 'defined_tags': 'dict(str, dict(str, object))',
+ 'kms_key_id': 'str'
}
self.attribute_map = {
@@ -93,7 +98,8 @@ def __init__(self, **kwargs):
'lifecycle_state': 'lifecycleState',
'time_created': 'timeCreated',
'freeform_tags': 'freeformTags',
- 'defined_tags': 'definedTags'
+ 'defined_tags': 'definedTags',
+ 'kms_key_id': 'kmsKeyId'
}
self._availability_domain = None
@@ -105,6 +111,7 @@ def __init__(self, **kwargs):
self._time_created = None
self._freeform_tags = None
self._defined_tags = None
+ self._kms_key_id = None
@property
def availability_domain(self):
@@ -374,6 +381,30 @@ def defined_tags(self, defined_tags):
"""
self._defined_tags = defined_tags
+ @property
+ def kms_key_id(self):
+ """
+ Gets the kms_key_id of this FileSystemSummary.
+ The OCID of KMS key used to encrypt the encryption keys associated with this file system.
+
+
+ :return: The kms_key_id of this FileSystemSummary.
+ :rtype: str
+ """
+ return self._kms_key_id
+
+ @kms_key_id.setter
+ def kms_key_id(self, kms_key_id):
+ """
+ Sets the kms_key_id of this FileSystemSummary.
+ The OCID of KMS key used to encrypt the encryption keys associated with this file system.
+
+
+ :param kms_key_id: The kms_key_id of this FileSystemSummary.
+ :type: str
+ """
+ self._kms_key_id = kms_key_id
+
def __repr__(self):
return formatted_flat_dict(self)
diff --git a/src/oci/file_storage/models/update_file_system_details.py b/src/oci/file_storage/models/update_file_system_details.py
index b643374af7..15f74f4b41 100644
--- a/src/oci/file_storage/models/update_file_system_details.py
+++ b/src/oci/file_storage/models/update_file_system_details.py
@@ -29,22 +29,29 @@ def __init__(self, **kwargs):
The value to assign to the defined_tags property of this UpdateFileSystemDetails.
:type defined_tags: dict(str, dict(str, object))
+ :param kms_key_id:
+ The value to assign to the kms_key_id property of this UpdateFileSystemDetails.
+ :type kms_key_id: str
+
"""
self.swagger_types = {
'display_name': 'str',
'freeform_tags': 'dict(str, str)',
- 'defined_tags': 'dict(str, dict(str, object))'
+ 'defined_tags': 'dict(str, dict(str, object))',
+ 'kms_key_id': 'str'
}
self.attribute_map = {
'display_name': 'displayName',
'freeform_tags': 'freeformTags',
- 'defined_tags': 'definedTags'
+ 'defined_tags': 'definedTags',
+ 'kms_key_id': 'kmsKeyId'
}
self._display_name = None
self._freeform_tags = None
self._defined_tags = None
+ self._kms_key_id = None
@property
def display_name(self):
@@ -142,6 +149,36 @@ def defined_tags(self, defined_tags):
"""
self._defined_tags = defined_tags
+ @property
+ def kms_key_id(self):
+ """
+ Gets the kms_key_id of this UpdateFileSystemDetails.
+ A KMS key OCID that will be associated with the given file system. If it is empty the Update operation will
+ actually remove the KMS key, if there is one, from the given file system. Note that the old KMS key should
+ still be enabled in KMS otherwise all the files in the file system encrypted with the old KMS key will no
+ longer be accessible.
+
+
+ :return: The kms_key_id of this UpdateFileSystemDetails.
+ :rtype: str
+ """
+ return self._kms_key_id
+
+ @kms_key_id.setter
+ def kms_key_id(self, kms_key_id):
+ """
+ Sets the kms_key_id of this UpdateFileSystemDetails.
+ A KMS key OCID that will be associated with the given file system. If it is empty the Update operation will
+ actually remove the KMS key, if there is one, from the given file system. Note that the old KMS key should
+ still be enabled in KMS otherwise all the files in the file system encrypted with the old KMS key will no
+ longer be accessible.
+
+
+ :param kms_key_id: The kms_key_id of this UpdateFileSystemDetails.
+ :type: str
+ """
+ self._kms_key_id = kms_key_id
+
def __repr__(self):
return formatted_flat_dict(self)
diff --git a/src/oci/limits/__init__.py b/src/oci/limits/__init__.py
index c464d2d5cc..0e43368cba 100644
--- a/src/oci/limits/__init__.py
+++ b/src/oci/limits/__init__.py
@@ -4,8 +4,10 @@
from __future__ import absolute_import
+from .limits_client import LimitsClient
+from .limits_client_composite_operations import LimitsClientCompositeOperations
from .quotas_client import QuotasClient
from .quotas_client_composite_operations import QuotasClientCompositeOperations
from . import models
-__all__ = ["QuotasClient", "QuotasClientCompositeOperations", "models"]
+__all__ = ["LimitsClient", "LimitsClientCompositeOperations", "QuotasClient", "QuotasClientCompositeOperations", "models"]
diff --git a/src/oci/limits/limits_client.py b/src/oci/limits/limits_client.py
new file mode 100644
index 0000000000..bdd16cc91a
--- /dev/null
+++ b/src/oci/limits/limits_client.py
@@ -0,0 +1,541 @@
+# coding: utf-8
+# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
+
+from __future__ import absolute_import
+
+from oci._vendor import requests # noqa: F401
+from oci._vendor import six
+
+from oci import retry # noqa: F401
+from oci.base_client import BaseClient
+from oci.config import get_config_value_or_default, validate_config
+from oci.signer import Signer
+from oci.util import Sentinel
+from .models import limits_type_mapping
+missing = Sentinel("Missing")
+
+
+class LimitsClient(object):
+ """
+ APIs that interact with the resource limits of a specific resource type
+ """
+
+ def __init__(self, config, **kwargs):
+ """
+ Creates a new service client
+
+ :param dict config:
+ Configuration keys and values as per `SDK and Tool Configuration `__.
+ The :py:meth:`~oci.config.from_file` method can be used to load configuration from a file. Alternatively, a ``dict`` can be passed. You can validate_config
+ the dict using :py:meth:`~oci.config.validate_config`
+
+ :param str service_endpoint: (optional)
+ The endpoint of the service to call using this client. For example ``https://iaas.us-ashburn-1.oraclecloud.com``. If this keyword argument is
+ not provided then it will be derived using the region in the config parameter. You should only provide this keyword argument if you have an explicit
+ need to specify a service endpoint.
+
+ :param timeout: (optional)
+ The connection and read timeouts for the client. The default is that the client never times out. This keyword argument can be provided
+ as a single float, in which case the value provided is used for both the read and connection timeouts, or as a tuple of two floats. If
+ a tuple is provided then the first value is used as the connection timeout and the second value as the read timeout.
+ :type timeout: float or tuple(float, float)
+
+ :param signer: (optional)
+ The signer to use when signing requests made by the service client. The default is to use a :py:class:`~oci.signer.Signer` based on the values
+ provided in the config parameter.
+
+ One use case for this parameter is for `Instance Principals authentication `__
+ by passing an instance of :py:class:`~oci.auth.signers.InstancePrincipalsSecurityTokenSigner` as the value for this keyword argument
+ :type signer: :py:class:`~oci.signer.AbstractBaseSigner`
+
+ :param obj retry_strategy: (optional)
+ A retry strategy to apply to all calls made by this service client (i.e. at the client level). There is no retry strategy applied by default.
+ Retry strategies can also be applied at the operation level by passing a ``retry_strategy`` keyword argument as part of calling the operation.
+ Any value provided at the operation level will override whatever is specified at the client level.
+
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY`
+ is also available. The specifics of the default retry strategy are described `here `__.
+ """
+ validate_config(config, signer=kwargs.get('signer'))
+ if 'signer' in kwargs:
+ signer = kwargs['signer']
+ else:
+ signer = Signer(
+ tenancy=config["tenancy"],
+ user=config["user"],
+ fingerprint=config["fingerprint"],
+ private_key_file_location=config.get("key_file"),
+ pass_phrase=get_config_value_or_default(config, "pass_phrase"),
+ private_key_content=config.get("key_content")
+ )
+
+ base_client_init_kwargs = {
+ 'regional_client': True,
+ 'service_endpoint': kwargs.get('service_endpoint'),
+ 'timeout': kwargs.get('timeout'),
+ 'base_path': '/',
+ 'service_endpoint_template': 'https://limits.{region}.oci.{secondLevelDomain}',
+ 'skip_deserialization': kwargs.get('skip_deserialization', False)
+ }
+ self.base_client = BaseClient("limits", config, signer, limits_type_mapping, **base_client_init_kwargs)
+ self.retry_strategy = kwargs.get('retry_strategy')
+
+ def get_resource_availability(self, service_name, limit_name, compartment_id, **kwargs):
+ """
+ Get the availability and usage within a compartment for a given resource limit.\n
+ For a given compartmentId, resource limit name, and scope, returns the following:
+ - the number of available resources associated with the given limit
+ - the usage in the selected compartment for the given limit
+ Note: not all resource limits support this API. If the value is not available, the API will return 404.
+
+
+ :param str service_name: (required)
+ The service name of the target quota.
+
+ :param str limit_name: (required)
+ The limit name for which to fetch the data.
+
+ :param str compartment_id: (required)
+ The OCID of the compartment for which data is being fetched.
+
+ :param str availability_domain: (optional)
+ This field is mandatory if the scopeType of the target resource limit is AD.
+ Otherwise, this field should be omitted.
+ If the above requirements are not met, the API will return a 400 - InvalidParameter response.
+
+ :param str opc_request_id: (optional)
+ Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
+ particular request, please provide the request ID.
+
+ :param obj retry_strategy: (optional)
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
+
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY`
+ is also available. The specifics of the default retry strategy are described `here `__.
+
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
+
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.limits.models.ResourceAvailability`
+ :rtype: :class:`~oci.response.Response`
+ """
+ resource_path = "/20190729/services/{serviceName}/limits/{limitName}/resourceAvailability"
+ method = "GET"
+
+ # Don't accept unknown kwargs
+ expected_kwargs = [
+ "retry_strategy",
+ "availability_domain",
+ "opc_request_id"
+ ]
+ extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs]
+ if extra_kwargs:
+ raise ValueError(
+ "get_resource_availability got unknown kwargs: {!r}".format(extra_kwargs))
+
+ path_params = {
+ "serviceName": service_name,
+ "limitName": limit_name
+ }
+
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
+
+ for (k, v) in six.iteritems(path_params):
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
+ raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
+
+ query_params = {
+ "compartmentId": compartment_id,
+ "availabilityDomain": kwargs.get("availability_domain", missing)
+ }
+ query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
+
+ header_params = {
+ "accept": "application/json",
+ "content-type": "application/json",
+ "opc-request-id": kwargs.get("opc_request_id", missing)
+ }
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
+
+ retry_strategy = self.retry_strategy
+ if kwargs.get('retry_strategy'):
+ retry_strategy = kwargs.get('retry_strategy')
+
+ if retry_strategy:
+ return retry_strategy.make_retrying_call(
+ self.base_client.call_api,
+ resource_path=resource_path,
+ method=method,
+ path_params=path_params,
+ query_params=query_params,
+ header_params=header_params,
+ response_type="ResourceAvailability")
+ 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="ResourceAvailability")
+
+ def list_limit_definitions(self, compartment_id, **kwargs):
+ """
+ Get the list of resource limits for a service.
+ Includes a list of resource limits that are currently supported.
+ If the 'areQuotasSupported' property is true, you can create quota policies on top of this limit at the
+ compartment level.
+
+
+ :param str compartment_id: (required)
+ The OCID of the parent compartment (remember that the tenancy is simply the root compartment).
+
+ :param str service_name: (optional)
+ The target service name.
+
+ :param str name: (optional)
+ Optional field, filter for a specific resource limit.
+
+ :param str sort_by: (optional)
+ The field to sort by.
+
+ Allowed values are: "name", "description"
+
+ :param str sort_order: (optional)
+ The sort order to use, either 'asc' or 'desc'. By default it will be ascending.
+
+ Allowed values are: "ASC", "DESC"
+
+ :param int limit: (optional)
+ The maximum number of items to return in a paginated \"List\" call.
+
+ :param str page: (optional)
+ The value of the `opc-next-page` response header from the previous \"List\" call.
+
+ :param str opc_request_id: (optional)
+ Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
+ particular request, please provide the request ID.
+
+ :param obj retry_strategy: (optional)
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
+
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY`
+ is also available. The specifics of the default retry strategy are described `here `__.
+
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
+
+ :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.limits.models.LimitDefinitionSummary`
+ :rtype: :class:`~oci.response.Response`
+ """
+ resource_path = "/20190729/limitDefinitions"
+ method = "GET"
+
+ # Don't accept unknown kwargs
+ expected_kwargs = [
+ "retry_strategy",
+ "service_name",
+ "name",
+ "sort_by",
+ "sort_order",
+ "limit",
+ "page",
+ "opc_request_id"
+ ]
+ extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs]
+ if extra_kwargs:
+ raise ValueError(
+ "list_limit_definitions got unknown kwargs: {!r}".format(extra_kwargs))
+
+ if 'sort_by' in kwargs:
+ sort_by_allowed_values = ["name", "description"]
+ if kwargs['sort_by'] not in sort_by_allowed_values:
+ raise ValueError(
+ "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values)
+ )
+
+ if 'sort_order' in kwargs:
+ sort_order_allowed_values = ["ASC", "DESC"]
+ if kwargs['sort_order'] not in sort_order_allowed_values:
+ raise ValueError(
+ "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values)
+ )
+
+ query_params = {
+ "compartmentId": compartment_id,
+ "serviceName": kwargs.get("service_name", missing),
+ "name": kwargs.get("name", 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}
+
+ header_params = {
+ "accept": "application/json",
+ "content-type": "application/json",
+ "opc-request-id": kwargs.get("opc_request_id", missing)
+ }
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
+
+ retry_strategy = self.retry_strategy
+ if kwargs.get('retry_strategy'):
+ retry_strategy = kwargs.get('retry_strategy')
+
+ if retry_strategy:
+ return retry_strategy.make_retrying_call(
+ self.base_client.call_api,
+ resource_path=resource_path,
+ method=method,
+ query_params=query_params,
+ header_params=header_params,
+ response_type="list[LimitDefinitionSummary]")
+ else:
+ return self.base_client.call_api(
+ resource_path=resource_path,
+ method=method,
+ query_params=query_params,
+ header_params=header_params,
+ response_type="list[LimitDefinitionSummary]")
+
+ def list_limit_values(self, compartment_id, service_name, **kwargs):
+ """
+ Get the full list of resource limit values for the given service.
+ Includes a full list of resource limits belonging to a given service.
+
+
+ :param str compartment_id: (required)
+ The OCID of the parent compartment (remember that the tenancy is simply the root compartment).
+
+ :param str service_name: (required)
+ The target service name
+
+ :param str scope_type: (optional)
+ Filter entries by scope type.
+
+ Allowed values are: "GLOBAL", "REGION", "AD"
+
+ :param str availability_domain: (optional)
+ Filter entries by availability domain. This implies that only AD-specific values will be returned.
+
+ :param str name: (optional)
+ Optional field, can be used to see a specific resource limit value.
+
+ :param str sort_by: (optional)
+ The field to sort by. We will be implicitly sorting by availabilityDomain, as a second level field, if available.
+
+ Allowed values are: "name"
+
+ :param str sort_order: (optional)
+ The sort order to use, either 'asc' or 'desc'. By default it will be ascending.
+
+ Allowed values are: "ASC", "DESC"
+
+ :param int limit: (optional)
+ The maximum number of items to return in a paginated \"List\" call.
+
+ :param str page: (optional)
+ The value of the `opc-next-page` response header from the previous \"List\" call.
+
+ :param str opc_request_id: (optional)
+ Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
+ particular request, please provide the request ID.
+
+ :param obj retry_strategy: (optional)
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
+
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY`
+ is also available. The specifics of the default retry strategy are described `here `__.
+
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
+
+ :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.limits.models.LimitValueSummary`
+ :rtype: :class:`~oci.response.Response`
+ """
+ resource_path = "/20190729/limitValues"
+ method = "GET"
+
+ # Don't accept unknown kwargs
+ expected_kwargs = [
+ "retry_strategy",
+ "scope_type",
+ "availability_domain",
+ "name",
+ "sort_by",
+ "sort_order",
+ "limit",
+ "page",
+ "opc_request_id"
+ ]
+ extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs]
+ if extra_kwargs:
+ raise ValueError(
+ "list_limit_values got unknown kwargs: {!r}".format(extra_kwargs))
+
+ if 'scope_type' in kwargs:
+ scope_type_allowed_values = ["GLOBAL", "REGION", "AD"]
+ if kwargs['scope_type'] not in scope_type_allowed_values:
+ raise ValueError(
+ "Invalid value for `scope_type`, must be one of {0}".format(scope_type_allowed_values)
+ )
+
+ if 'sort_by' in kwargs:
+ sort_by_allowed_values = ["name"]
+ if kwargs['sort_by'] not in sort_by_allowed_values:
+ raise ValueError(
+ "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values)
+ )
+
+ if 'sort_order' in kwargs:
+ sort_order_allowed_values = ["ASC", "DESC"]
+ if kwargs['sort_order'] not in sort_order_allowed_values:
+ raise ValueError(
+ "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values)
+ )
+
+ query_params = {
+ "compartmentId": compartment_id,
+ "serviceName": service_name,
+ "scopeType": kwargs.get("scope_type", missing),
+ "availabilityDomain": kwargs.get("availability_domain", missing),
+ "name": kwargs.get("name", 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}
+
+ header_params = {
+ "accept": "application/json",
+ "content-type": "application/json",
+ "opc-request-id": kwargs.get("opc_request_id", missing)
+ }
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
+
+ retry_strategy = self.retry_strategy
+ if kwargs.get('retry_strategy'):
+ retry_strategy = kwargs.get('retry_strategy')
+
+ if retry_strategy:
+ return retry_strategy.make_retrying_call(
+ self.base_client.call_api,
+ resource_path=resource_path,
+ method=method,
+ query_params=query_params,
+ header_params=header_params,
+ response_type="list[LimitValueSummary]")
+ else:
+ return self.base_client.call_api(
+ resource_path=resource_path,
+ method=method,
+ query_params=query_params,
+ header_params=header_params,
+ response_type="list[LimitValueSummary]")
+
+ def list_services(self, compartment_id, **kwargs):
+ """
+ Returns the list of supported services that have resource limits exposed.
+ Returns the list of supported services.
+ This will include the programmatic service name, along with the friendly service name.
+
+
+ :param str compartment_id: (required)
+ The OCID of the parent compartment (remember that the tenancy is simply the root compartment).
+
+ :param str sort_by: (optional)
+ The field to sort by.
+
+ Allowed values are: "name", "description"
+
+ :param str sort_order: (optional)
+ The sort order to use, either 'asc' or 'desc'. By default it will be ascending.
+
+ Allowed values are: "ASC", "DESC"
+
+ :param int limit: (optional)
+ The maximum number of items to return in a paginated \"List\" call.
+
+ :param str page: (optional)
+ The value of the `opc-next-page` response header from the previous \"List\" call.
+
+ :param str opc_request_id: (optional)
+ Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
+ particular request, please provide the request ID.
+
+ :param obj retry_strategy: (optional)
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
+
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY`
+ is also available. The specifics of the default retry strategy are described `here `__.
+
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
+
+ :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.limits.models.ServiceSummary`
+ :rtype: :class:`~oci.response.Response`
+ """
+ resource_path = "/20190729/services"
+ method = "GET"
+
+ # Don't accept unknown kwargs
+ expected_kwargs = [
+ "retry_strategy",
+ "sort_by",
+ "sort_order",
+ "limit",
+ "page",
+ "opc_request_id"
+ ]
+ extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs]
+ if extra_kwargs:
+ raise ValueError(
+ "list_services got unknown kwargs: {!r}".format(extra_kwargs))
+
+ if 'sort_by' in kwargs:
+ sort_by_allowed_values = ["name", "description"]
+ if kwargs['sort_by'] not in sort_by_allowed_values:
+ raise ValueError(
+ "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values)
+ )
+
+ if 'sort_order' in kwargs:
+ sort_order_allowed_values = ["ASC", "DESC"]
+ if kwargs['sort_order'] not in sort_order_allowed_values:
+ raise ValueError(
+ "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values)
+ )
+
+ query_params = {
+ "compartmentId": compartment_id,
+ "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}
+
+ header_params = {
+ "accept": "application/json",
+ "content-type": "application/json",
+ "opc-request-id": kwargs.get("opc_request_id", missing)
+ }
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
+
+ retry_strategy = self.retry_strategy
+ if kwargs.get('retry_strategy'):
+ retry_strategy = kwargs.get('retry_strategy')
+
+ if retry_strategy:
+ return retry_strategy.make_retrying_call(
+ self.base_client.call_api,
+ resource_path=resource_path,
+ method=method,
+ query_params=query_params,
+ header_params=header_params,
+ response_type="list[ServiceSummary]")
+ else:
+ return self.base_client.call_api(
+ resource_path=resource_path,
+ method=method,
+ query_params=query_params,
+ header_params=header_params,
+ response_type="list[ServiceSummary]")
diff --git a/src/oci/limits/limits_client_composite_operations.py b/src/oci/limits/limits_client_composite_operations.py
new file mode 100644
index 0000000000..736628bfa9
--- /dev/null
+++ b/src/oci/limits/limits_client_composite_operations.py
@@ -0,0 +1,23 @@
+# coding: utf-8
+# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
+
+import oci # noqa: F401
+from oci.util import WAIT_RESOURCE_NOT_FOUND # noqa: F401
+
+
+class LimitsClientCompositeOperations(object):
+ """
+ This class provides a wrapper around :py:class:`~oci.limits.LimitsClient` and offers convenience methods
+ for operations that would otherwise need to be chained together. For example, instead of performing an action
+ on a resource (e.g. launching an instance, creating a load balancer) and then using a waiter to wait for the resource
+ to enter a given state, you can call a single method in this class to accomplish the same functionality
+ """
+
+ def __init__(self, client, **kwargs):
+ """
+ Creates a new LimitsClientCompositeOperations object
+
+ :param LimitsClient client:
+ The service client which will be wrapped by this object
+ """
+ self.client = client
diff --git a/src/oci/limits/models/__init__.py b/src/oci/limits/models/__init__.py
index 019081c043..4ab8f92845 100644
--- a/src/oci/limits/models/__init__.py
+++ b/src/oci/limits/models/__init__.py
@@ -4,14 +4,22 @@
from __future__ import absolute_import
from .create_quota_details import CreateQuotaDetails
+from .limit_definition_summary import LimitDefinitionSummary
+from .limit_value_summary import LimitValueSummary
from .quota import Quota
from .quota_summary import QuotaSummary
+from .resource_availability import ResourceAvailability
+from .service_summary import ServiceSummary
from .update_quota_details import UpdateQuotaDetails
# Maps type names to classes for limits services.
limits_type_mapping = {
"CreateQuotaDetails": CreateQuotaDetails,
+ "LimitDefinitionSummary": LimitDefinitionSummary,
+ "LimitValueSummary": LimitValueSummary,
"Quota": Quota,
"QuotaSummary": QuotaSummary,
+ "ResourceAvailability": ResourceAvailability,
+ "ServiceSummary": ServiceSummary,
"UpdateQuotaDetails": UpdateQuotaDetails
}
diff --git a/src/oci/limits/models/create_quota_details.py b/src/oci/limits/models/create_quota_details.py
index 4a3f167e0b..9a632b5eec 100644
--- a/src/oci/limits/models/create_quota_details.py
+++ b/src/oci/limits/models/create_quota_details.py
@@ -145,7 +145,7 @@ def name(self, name):
def statements(self):
"""
**[Required]** Gets the statements of this CreateQuotaDetails.
- An array of quota statements written in the declarative language.
+ An array of quota statements written in the declarative quota statement language.
:return: The statements of this CreateQuotaDetails.
@@ -157,7 +157,7 @@ def statements(self):
def statements(self, statements):
"""
Sets the statements of this CreateQuotaDetails.
- An array of quota statements written in the declarative language.
+ An array of quota statements written in the declarative quota statement language.
:param statements: The statements of this CreateQuotaDetails.
diff --git a/src/oci/limits/models/limit_definition_summary.py b/src/oci/limits/models/limit_definition_summary.py
new file mode 100644
index 0000000000..6aadea1319
--- /dev/null
+++ b/src/oci/limits/models/limit_definition_summary.py
@@ -0,0 +1,246 @@
+# coding: utf-8
+# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
+
+
+from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401
+from oci.decorators import init_model_state_from_kwargs
+
+
+@init_model_state_from_kwargs
+class LimitDefinitionSummary(object):
+ """
+ The metadata specific to a resource limit definition.
+ """
+
+ #: A constant which can be used with the scope_type property of a LimitDefinitionSummary.
+ #: This constant has a value of "GLOBAL"
+ SCOPE_TYPE_GLOBAL = "GLOBAL"
+
+ #: A constant which can be used with the scope_type property of a LimitDefinitionSummary.
+ #: This constant has a value of "REGION"
+ SCOPE_TYPE_REGION = "REGION"
+
+ #: A constant which can be used with the scope_type property of a LimitDefinitionSummary.
+ #: This constant has a value of "AD"
+ SCOPE_TYPE_AD = "AD"
+
+ def __init__(self, **kwargs):
+ """
+ Initializes a new LimitDefinitionSummary object with values from keyword arguments.
+ The following keyword arguments are supported (corresponding to the getters/setters of this class):
+
+ :param name:
+ The value to assign to the name property of this LimitDefinitionSummary.
+ :type name: str
+
+ :param service_name:
+ The value to assign to the service_name property of this LimitDefinitionSummary.
+ :type service_name: str
+
+ :param description:
+ The value to assign to the description property of this LimitDefinitionSummary.
+ :type description: str
+
+ :param scope_type:
+ The value to assign to the scope_type property of this LimitDefinitionSummary.
+ Allowed values for this property are: "GLOBAL", "REGION", "AD", 'UNKNOWN_ENUM_VALUE'.
+ Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
+ :type scope_type: str
+
+ :param are_quotas_supported:
+ The value to assign to the are_quotas_supported property of this LimitDefinitionSummary.
+ :type are_quotas_supported: bool
+
+ :param is_resource_availability_supported:
+ The value to assign to the is_resource_availability_supported property of this LimitDefinitionSummary.
+ :type is_resource_availability_supported: bool
+
+ """
+ self.swagger_types = {
+ 'name': 'str',
+ 'service_name': 'str',
+ 'description': 'str',
+ 'scope_type': 'str',
+ 'are_quotas_supported': 'bool',
+ 'is_resource_availability_supported': 'bool'
+ }
+
+ self.attribute_map = {
+ 'name': 'name',
+ 'service_name': 'serviceName',
+ 'description': 'description',
+ 'scope_type': 'scopeType',
+ 'are_quotas_supported': 'areQuotasSupported',
+ 'is_resource_availability_supported': 'isResourceAvailabilitySupported'
+ }
+
+ self._name = None
+ self._service_name = None
+ self._description = None
+ self._scope_type = None
+ self._are_quotas_supported = None
+ self._is_resource_availability_supported = None
+
+ @property
+ def name(self):
+ """
+ Gets the name of this LimitDefinitionSummary.
+ The resource limit name. To be used for writing policies (in case of quotas) or other programmatic calls.
+
+
+ :return: The name of this LimitDefinitionSummary.
+ :rtype: str
+ """
+ return self._name
+
+ @name.setter
+ def name(self, name):
+ """
+ Sets the name of this LimitDefinitionSummary.
+ The resource limit name. To be used for writing policies (in case of quotas) or other programmatic calls.
+
+
+ :param name: The name of this LimitDefinitionSummary.
+ :type: str
+ """
+ self._name = name
+
+ @property
+ def service_name(self):
+ """
+ Gets the service_name of this LimitDefinitionSummary.
+ The service name of the limit.
+
+
+ :return: The service_name of this LimitDefinitionSummary.
+ :rtype: str
+ """
+ return self._service_name
+
+ @service_name.setter
+ def service_name(self, service_name):
+ """
+ Sets the service_name of this LimitDefinitionSummary.
+ The service name of the limit.
+
+
+ :param service_name: The service_name of this LimitDefinitionSummary.
+ :type: str
+ """
+ self._service_name = service_name
+
+ @property
+ def description(self):
+ """
+ Gets the description of this LimitDefinitionSummary.
+ The limit description.
+
+
+ :return: The description of this LimitDefinitionSummary.
+ :rtype: str
+ """
+ return self._description
+
+ @description.setter
+ def description(self, description):
+ """
+ Sets the description of this LimitDefinitionSummary.
+ The limit description.
+
+
+ :param description: The description of this LimitDefinitionSummary.
+ :type: str
+ """
+ self._description = description
+
+ @property
+ def scope_type(self):
+ """
+ Gets the scope_type of this LimitDefinitionSummary.
+ Reflects the scope of the resource limit: which can be Global (across all regions), regional or ad specific.
+
+ Allowed values for this property are: "GLOBAL", "REGION", "AD", 'UNKNOWN_ENUM_VALUE'.
+ Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
+
+
+ :return: The scope_type of this LimitDefinitionSummary.
+ :rtype: str
+ """
+ return self._scope_type
+
+ @scope_type.setter
+ def scope_type(self, scope_type):
+ """
+ Sets the scope_type of this LimitDefinitionSummary.
+ Reflects the scope of the resource limit: which can be Global (across all regions), regional or ad specific.
+
+
+ :param scope_type: The scope_type of this LimitDefinitionSummary.
+ :type: str
+ """
+ allowed_values = ["GLOBAL", "REGION", "AD"]
+ if not value_allowed_none_or_none_sentinel(scope_type, allowed_values):
+ scope_type = 'UNKNOWN_ENUM_VALUE'
+ self._scope_type = scope_type
+
+ @property
+ def are_quotas_supported(self):
+ """
+ Gets the are_quotas_supported of this LimitDefinitionSummary.
+ If true, quota policies can be created on top of this resource limit.
+
+
+ :return: The are_quotas_supported of this LimitDefinitionSummary.
+ :rtype: bool
+ """
+ return self._are_quotas_supported
+
+ @are_quotas_supported.setter
+ def are_quotas_supported(self, are_quotas_supported):
+ """
+ Sets the are_quotas_supported of this LimitDefinitionSummary.
+ If true, quota policies can be created on top of this resource limit.
+
+
+ :param are_quotas_supported: The are_quotas_supported of this LimitDefinitionSummary.
+ :type: bool
+ """
+ self._are_quotas_supported = are_quotas_supported
+
+ @property
+ def is_resource_availability_supported(self):
+ """
+ Gets the is_resource_availability_supported of this LimitDefinitionSummary.
+ Reflects if the GetResourceAvailability API is supported for this limit or not.
+ If not, the API will return an empty JSON response.
+
+
+ :return: The is_resource_availability_supported of this LimitDefinitionSummary.
+ :rtype: bool
+ """
+ return self._is_resource_availability_supported
+
+ @is_resource_availability_supported.setter
+ def is_resource_availability_supported(self, is_resource_availability_supported):
+ """
+ Sets the is_resource_availability_supported of this LimitDefinitionSummary.
+ Reflects if the GetResourceAvailability API is supported for this limit or not.
+ If not, the API will return an empty JSON response.
+
+
+ :param is_resource_availability_supported: The is_resource_availability_supported of this LimitDefinitionSummary.
+ :type: bool
+ """
+ self._is_resource_availability_supported = is_resource_availability_supported
+
+ 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/limits/models/limit_value_summary.py b/src/oci/limits/models/limit_value_summary.py
new file mode 100644
index 0000000000..31f49ee8d5
--- /dev/null
+++ b/src/oci/limits/models/limit_value_summary.py
@@ -0,0 +1,182 @@
+# coding: utf-8
+# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
+
+
+from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401
+from oci.decorators import init_model_state_from_kwargs
+
+
+@init_model_state_from_kwargs
+class LimitValueSummary(object):
+ """
+ The value of a specific resource limit.
+ """
+
+ #: A constant which can be used with the scope_type property of a LimitValueSummary.
+ #: This constant has a value of "GLOBAL"
+ SCOPE_TYPE_GLOBAL = "GLOBAL"
+
+ #: A constant which can be used with the scope_type property of a LimitValueSummary.
+ #: This constant has a value of "REGION"
+ SCOPE_TYPE_REGION = "REGION"
+
+ #: A constant which can be used with the scope_type property of a LimitValueSummary.
+ #: This constant has a value of "AD"
+ SCOPE_TYPE_AD = "AD"
+
+ def __init__(self, **kwargs):
+ """
+ Initializes a new LimitValueSummary object with values from keyword arguments.
+ The following keyword arguments are supported (corresponding to the getters/setters of this class):
+
+ :param name:
+ The value to assign to the name property of this LimitValueSummary.
+ :type name: str
+
+ :param scope_type:
+ The value to assign to the scope_type property of this LimitValueSummary.
+ Allowed values for this property are: "GLOBAL", "REGION", "AD", 'UNKNOWN_ENUM_VALUE'.
+ Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
+ :type scope_type: str
+
+ :param availability_domain:
+ The value to assign to the availability_domain property of this LimitValueSummary.
+ :type availability_domain: str
+
+ :param value:
+ The value to assign to the value property of this LimitValueSummary.
+ :type value: int
+
+ """
+ self.swagger_types = {
+ 'name': 'str',
+ 'scope_type': 'str',
+ 'availability_domain': 'str',
+ 'value': 'int'
+ }
+
+ self.attribute_map = {
+ 'name': 'name',
+ 'scope_type': 'scopeType',
+ 'availability_domain': 'availabilityDomain',
+ 'value': 'value'
+ }
+
+ self._name = None
+ self._scope_type = None
+ self._availability_domain = None
+ self._value = None
+
+ @property
+ def name(self):
+ """
+ Gets the name of this LimitValueSummary.
+ The resource limit name. To be used for writing policies (in case of quotas) or other programmatic calls.
+
+
+ :return: The name of this LimitValueSummary.
+ :rtype: str
+ """
+ return self._name
+
+ @name.setter
+ def name(self, name):
+ """
+ Sets the name of this LimitValueSummary.
+ The resource limit name. To be used for writing policies (in case of quotas) or other programmatic calls.
+
+
+ :param name: The name of this LimitValueSummary.
+ :type: str
+ """
+ self._name = name
+
+ @property
+ def scope_type(self):
+ """
+ Gets the scope_type of this LimitValueSummary.
+ The scope type of the limit.
+
+ Allowed values for this property are: "GLOBAL", "REGION", "AD", 'UNKNOWN_ENUM_VALUE'.
+ Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
+
+
+ :return: The scope_type of this LimitValueSummary.
+ :rtype: str
+ """
+ return self._scope_type
+
+ @scope_type.setter
+ def scope_type(self, scope_type):
+ """
+ Sets the scope_type of this LimitValueSummary.
+ The scope type of the limit.
+
+
+ :param scope_type: The scope_type of this LimitValueSummary.
+ :type: str
+ """
+ allowed_values = ["GLOBAL", "REGION", "AD"]
+ if not value_allowed_none_or_none_sentinel(scope_type, allowed_values):
+ scope_type = 'UNKNOWN_ENUM_VALUE'
+ self._scope_type = scope_type
+
+ @property
+ def availability_domain(self):
+ """
+ Gets the availability_domain of this LimitValueSummary.
+ If present, the returned value is only specific to this availability domain.
+
+
+ :return: The availability_domain of this LimitValueSummary.
+ :rtype: str
+ """
+ return self._availability_domain
+
+ @availability_domain.setter
+ def availability_domain(self, availability_domain):
+ """
+ Sets the availability_domain of this LimitValueSummary.
+ If present, the returned value is only specific to this availability domain.
+
+
+ :param availability_domain: The availability_domain of this LimitValueSummary.
+ :type: str
+ """
+ self._availability_domain = availability_domain
+
+ @property
+ def value(self):
+ """
+ Gets the value of this LimitValueSummary.
+ The resource limit value.
+
+
+ :return: The value of this LimitValueSummary.
+ :rtype: int
+ """
+ return self._value
+
+ @value.setter
+ def value(self, value):
+ """
+ Sets the value of this LimitValueSummary.
+ The resource limit value.
+
+
+ :param value: The value of this LimitValueSummary.
+ :type: int
+ """
+ self._value = value
+
+ def __repr__(self):
+ return formatted_flat_dict(self)
+
+ def __eq__(self, other):
+ if other is None:
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ return not self == other
diff --git a/src/oci/limits/models/quota.py b/src/oci/limits/models/quota.py
index 6729fdc99c..f93c3aea7e 100644
--- a/src/oci/limits/models/quota.py
+++ b/src/oci/limits/models/quota.py
@@ -177,7 +177,7 @@ def name(self, name):
def statements(self):
"""
**[Required]** Gets the statements of this Quota.
- An array of one or more quota statements written in the declarative language.
+ An array of one or more quota statements written in the declarative quota statement language.
:return: The statements of this Quota.
@@ -189,7 +189,7 @@ def statements(self):
def statements(self, statements):
"""
Sets the statements of this Quota.
- An array of one or more quota statements written in the declarative language.
+ An array of one or more quota statements written in the declarative quota statement language.
:param statements: The statements of this Quota.
diff --git a/src/oci/limits/models/resource_availability.py b/src/oci/limits/models/resource_availability.py
new file mode 100644
index 0000000000..2b6764e029
--- /dev/null
+++ b/src/oci/limits/models/resource_availability.py
@@ -0,0 +1,101 @@
+# coding: utf-8
+# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
+
+
+from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401
+from oci.decorators import init_model_state_from_kwargs
+
+
+@init_model_state_from_kwargs
+class ResourceAvailability(object):
+ """
+ The availability of a given resource limit, based on the usage, tenant service limits and quotas set for the tenancy.
+ Note: We cannot guarantee this data for all the limits. In those cases, these fields will be empty.
+ """
+
+ def __init__(self, **kwargs):
+ """
+ Initializes a new ResourceAvailability object with values from keyword arguments.
+ The following keyword arguments are supported (corresponding to the getters/setters of this class):
+
+ :param used:
+ The value to assign to the used property of this ResourceAvailability.
+ :type used: int
+
+ :param available:
+ The value to assign to the available property of this ResourceAvailability.
+ :type available: int
+
+ """
+ self.swagger_types = {
+ 'used': 'int',
+ 'available': 'int'
+ }
+
+ self.attribute_map = {
+ 'used': 'used',
+ 'available': 'available'
+ }
+
+ self._used = None
+ self._available = None
+
+ @property
+ def used(self):
+ """
+ Gets the used of this ResourceAvailability.
+ The current usage in the given compartment.
+
+
+ :return: The used of this ResourceAvailability.
+ :rtype: int
+ """
+ return self._used
+
+ @used.setter
+ def used(self, used):
+ """
+ Sets the used of this ResourceAvailability.
+ The current usage in the given compartment.
+
+
+ :param used: The used of this ResourceAvailability.
+ :type: int
+ """
+ self._used = used
+
+ @property
+ def available(self):
+ """
+ Gets the available of this ResourceAvailability.
+ The count of available resources.
+
+
+ :return: The available of this ResourceAvailability.
+ :rtype: int
+ """
+ return self._available
+
+ @available.setter
+ def available(self, available):
+ """
+ Sets the available of this ResourceAvailability.
+ The count of available resources.
+
+
+ :param available: The available of this ResourceAvailability.
+ :type: int
+ """
+ self._available = available
+
+ 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/limits/models/service_summary.py b/src/oci/limits/models/service_summary.py
new file mode 100644
index 0000000000..0bddb20180
--- /dev/null
+++ b/src/oci/limits/models/service_summary.py
@@ -0,0 +1,100 @@
+# coding: utf-8
+# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
+
+
+from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401
+from oci.decorators import init_model_state_from_kwargs
+
+
+@init_model_state_from_kwargs
+class ServiceSummary(object):
+ """
+ A specific OCI service supported by resource limits.
+ """
+
+ def __init__(self, **kwargs):
+ """
+ Initializes a new ServiceSummary object with values from keyword arguments.
+ The following keyword arguments are supported (corresponding to the getters/setters of this class):
+
+ :param name:
+ The value to assign to the name property of this ServiceSummary.
+ :type name: str
+
+ :param description:
+ The value to assign to the description property of this ServiceSummary.
+ :type description: str
+
+ """
+ self.swagger_types = {
+ 'name': 'str',
+ 'description': 'str'
+ }
+
+ self.attribute_map = {
+ 'name': 'name',
+ 'description': 'description'
+ }
+
+ self._name = None
+ self._description = None
+
+ @property
+ def name(self):
+ """
+ Gets the name of this ServiceSummary.
+ The service name. Use this when calling the other APIs.
+
+
+ :return: The name of this ServiceSummary.
+ :rtype: str
+ """
+ return self._name
+
+ @name.setter
+ def name(self, name):
+ """
+ Sets the name of this ServiceSummary.
+ The service name. Use this when calling the other APIs.
+
+
+ :param name: The name of this ServiceSummary.
+ :type: str
+ """
+ self._name = name
+
+ @property
+ def description(self):
+ """
+ Gets the description of this ServiceSummary.
+ The friendly service name.
+
+
+ :return: The description of this ServiceSummary.
+ :rtype: str
+ """
+ return self._description
+
+ @description.setter
+ def description(self, description):
+ """
+ Sets the description of this ServiceSummary.
+ The friendly service name.
+
+
+ :param description: The description of this ServiceSummary.
+ :type: str
+ """
+ self._description = description
+
+ 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/limits/models/update_quota_details.py b/src/oci/limits/models/update_quota_details.py
index c75fdcad70..7089ec11c0 100644
--- a/src/oci/limits/models/update_quota_details.py
+++ b/src/oci/limits/models/update_quota_details.py
@@ -81,7 +81,7 @@ def description(self, description):
def statements(self):
"""
Gets the statements of this UpdateQuotaDetails.
- An array of quota statements written in the declarative language.
+ An array of quota statements written in the declarative quota statement language.
:return: The statements of this UpdateQuotaDetails.
@@ -93,7 +93,7 @@ def statements(self):
def statements(self, statements):
"""
Sets the statements of this UpdateQuotaDetails.
- An array of quota statements written in the declarative language.
+ An array of quota statements written in the declarative quota statement language.
:param statements: The statements of this UpdateQuotaDetails.
diff --git a/src/oci/limits/quotas_client.py b/src/oci/limits/quotas_client.py
index 41639aa48f..e787766a0f 100644
--- a/src/oci/limits/quotas_client.py
+++ b/src/oci/limits/quotas_client.py
@@ -17,7 +17,7 @@
class QuotasClient(object):
"""
- APIs for managing Compartment Resource Quotas.
+ APIs that interact with the resource limits of a specific resource type
"""
def __init__(self, config, **kwargs):
@@ -73,7 +73,7 @@ def __init__(self, config, **kwargs):
'regional_client': True,
'service_endpoint': kwargs.get('service_endpoint'),
'timeout': kwargs.get('timeout'),
- 'base_path': '/20181025',
+ 'base_path': '/',
'service_endpoint_template': 'https://limits.{region}.oci.{secondLevelDomain}',
'skip_deserialization': kwargs.get('skip_deserialization', False)
}
@@ -111,7 +111,7 @@ def create_quota(self, create_quota_details, **kwargs):
:return: A :class:`~oci.response.Response` object with data of type :class:`~oci.limits.models.Quota`
:rtype: :class:`~oci.response.Response`
"""
- resource_path = "/quotas/"
+ resource_path = "/20181025/quotas/"
method = "POST"
# Don't accept unknown kwargs
@@ -184,7 +184,7 @@ def delete_quota(self, quota_id, **kwargs):
:return: A :class:`~oci.response.Response` object with data of type None
:rtype: :class:`~oci.response.Response`
"""
- resource_path = "/quotas/{quotaId}"
+ resource_path = "/20181025/quotas/{quotaId}"
method = "DELETE"
# Don't accept unknown kwargs
@@ -258,7 +258,7 @@ def get_quota(self, quota_id, **kwargs):
:return: A :class:`~oci.response.Response` object with data of type :class:`~oci.limits.models.Quota`
:rtype: :class:`~oci.response.Response`
"""
- resource_path = "/quotas/{quotaId}"
+ resource_path = "/20181025/quotas/{quotaId}"
method = "GET"
# Don't accept unknown kwargs
@@ -332,7 +332,7 @@ def list_quotas(self, compartment_id, **kwargs):
Allowed values are: "ACTIVE"
:param str sort_order: (optional)
- The sort order to use, either 'asc' or 'desc'.
+ The sort order to use, either 'asc' or 'desc'. By default it will be ascending.
Allowed values are: "ASC", "DESC"
@@ -356,7 +356,7 @@ def list_quotas(self, compartment_id, **kwargs):
:return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.limits.models.QuotaSummary`
:rtype: :class:`~oci.response.Response`
"""
- resource_path = "/quotas/"
+ resource_path = "/20181025/quotas/"
method = "GET"
# Don't accept unknown kwargs
@@ -466,7 +466,7 @@ def update_quota(self, quota_id, update_quota_details, **kwargs):
:return: A :class:`~oci.response.Response` object with data of type :class:`~oci.limits.models.Quota`
:rtype: :class:`~oci.response.Response`
"""
- resource_path = "/quotas/{quotaId}"
+ resource_path = "/20181025/quotas/{quotaId}"
method = "PUT"
# Don't accept unknown kwargs
diff --git a/src/oci/retry/retry.py b/src/oci/retry/retry.py
index dd86034b2b..108e915e94 100644
--- a/src/oci/retry/retry.py
+++ b/src/oci/retry/retry.py
@@ -220,7 +220,7 @@ def make_retrying_call(self, func_ref, *func_args, **func_kwargs):
:return: the result of calling func_ref
"""
- func_ref(*func_args, **func_kwargs)
+ return func_ref(*func_args, **func_kwargs)
class ExponentialBackoffRetryStrategyBase(object):
diff --git a/src/oci/streaming/models/__init__.py b/src/oci/streaming/models/__init__.py
index 66dd64319f..159128f9ca 100644
--- a/src/oci/streaming/models/__init__.py
+++ b/src/oci/streaming/models/__init__.py
@@ -3,7 +3,10 @@
from __future__ import absolute_import
+from .archiver import Archiver
+from .archiver_error import ArchiverError
from .change_stream_compartment_details import ChangeStreamCompartmentDetails
+from .create_archiver_details import CreateArchiverDetails
from .create_cursor_details import CreateCursorDetails
from .create_group_cursor_details import CreateGroupCursorDetails
from .create_stream_details import CreateStreamDetails
@@ -17,12 +20,16 @@
from .put_messages_result_entry import PutMessagesResultEntry
from .stream import Stream
from .stream_summary import StreamSummary
+from .update_archiver_details import UpdateArchiverDetails
from .update_group_details import UpdateGroupDetails
from .update_stream_details import UpdateStreamDetails
# Maps type names to classes for streaming services.
streaming_type_mapping = {
+ "Archiver": Archiver,
+ "ArchiverError": ArchiverError,
"ChangeStreamCompartmentDetails": ChangeStreamCompartmentDetails,
+ "CreateArchiverDetails": CreateArchiverDetails,
"CreateCursorDetails": CreateCursorDetails,
"CreateGroupCursorDetails": CreateGroupCursorDetails,
"CreateStreamDetails": CreateStreamDetails,
@@ -36,6 +43,7 @@
"PutMessagesResultEntry": PutMessagesResultEntry,
"Stream": Stream,
"StreamSummary": StreamSummary,
+ "UpdateArchiverDetails": UpdateArchiverDetails,
"UpdateGroupDetails": UpdateGroupDetails,
"UpdateStreamDetails": UpdateStreamDetails
}
diff --git a/src/oci/streaming/models/archiver.py b/src/oci/streaming/models/archiver.py
new file mode 100644
index 0000000000..3773769d4b
--- /dev/null
+++ b/src/oci/streaming/models/archiver.py
@@ -0,0 +1,334 @@
+# coding: utf-8
+# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
+
+
+from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401
+from oci.decorators import init_model_state_from_kwargs
+
+
+@init_model_state_from_kwargs
+class Archiver(object):
+ """
+ Represents the current state of the stream archiver.
+ """
+
+ #: A constant which can be used with the lifecycle_state property of a Archiver.
+ #: This constant has a value of "CREATING"
+ LIFECYCLE_STATE_CREATING = "CREATING"
+
+ #: A constant which can be used with the lifecycle_state property of a Archiver.
+ #: This constant has a value of "STOPPED"
+ LIFECYCLE_STATE_STOPPED = "STOPPED"
+
+ #: A constant which can be used with the lifecycle_state property of a Archiver.
+ #: This constant has a value of "STARTING"
+ LIFECYCLE_STATE_STARTING = "STARTING"
+
+ #: A constant which can be used with the lifecycle_state property of a Archiver.
+ #: This constant has a value of "RUNNING"
+ LIFECYCLE_STATE_RUNNING = "RUNNING"
+
+ #: A constant which can be used with the lifecycle_state property of a Archiver.
+ #: This constant has a value of "STOPPING"
+ LIFECYCLE_STATE_STOPPING = "STOPPING"
+
+ #: A constant which can be used with the lifecycle_state property of a Archiver.
+ #: This constant has a value of "UPDATING"
+ LIFECYCLE_STATE_UPDATING = "UPDATING"
+
+ #: A constant which can be used with the start_position property of a Archiver.
+ #: This constant has a value of "LATEST"
+ START_POSITION_LATEST = "LATEST"
+
+ #: A constant which can be used with the start_position property of a Archiver.
+ #: This constant has a value of "TRIM_HORIZON"
+ START_POSITION_TRIM_HORIZON = "TRIM_HORIZON"
+
+ def __init__(self, **kwargs):
+ """
+ Initializes a new Archiver object with values from keyword arguments.
+ The following keyword arguments are supported (corresponding to the getters/setters of this class):
+
+ :param time_created:
+ The value to assign to the time_created property of this Archiver.
+ :type time_created: datetime
+
+ :param lifecycle_state:
+ The value to assign to the lifecycle_state property of this Archiver.
+ Allowed values for this property are: "CREATING", "STOPPED", "STARTING", "RUNNING", "STOPPING", "UPDATING", 'UNKNOWN_ENUM_VALUE'.
+ Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
+ :type lifecycle_state: str
+
+ :param bucket_name:
+ The value to assign to the bucket_name property of this Archiver.
+ :type bucket_name: str
+
+ :param use_existing_bucket:
+ The value to assign to the use_existing_bucket property of this Archiver.
+ :type use_existing_bucket: bool
+
+ :param start_position:
+ The value to assign to the start_position property of this Archiver.
+ Allowed values for this property are: "LATEST", "TRIM_HORIZON", 'UNKNOWN_ENUM_VALUE'.
+ Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
+ :type start_position: str
+
+ :param batch_rollover_size_in_mbs:
+ The value to assign to the batch_rollover_size_in_mbs property of this Archiver.
+ :type batch_rollover_size_in_mbs: int
+
+ :param batch_rollover_time_in_seconds:
+ The value to assign to the batch_rollover_time_in_seconds property of this Archiver.
+ :type batch_rollover_time_in_seconds: int
+
+ :param error:
+ The value to assign to the error property of this Archiver.
+ :type error: ArchiverError
+
+ """
+ self.swagger_types = {
+ 'time_created': 'datetime',
+ 'lifecycle_state': 'str',
+ 'bucket_name': 'str',
+ 'use_existing_bucket': 'bool',
+ 'start_position': 'str',
+ 'batch_rollover_size_in_mbs': 'int',
+ 'batch_rollover_time_in_seconds': 'int',
+ 'error': 'ArchiverError'
+ }
+
+ self.attribute_map = {
+ 'time_created': 'timeCreated',
+ 'lifecycle_state': 'lifecycleState',
+ 'bucket_name': 'bucketName',
+ 'use_existing_bucket': 'useExistingBucket',
+ 'start_position': 'startPosition',
+ 'batch_rollover_size_in_mbs': 'batchRolloverSizeInMBs',
+ 'batch_rollover_time_in_seconds': 'batchRolloverTimeInSeconds',
+ 'error': 'error'
+ }
+
+ self._time_created = None
+ self._lifecycle_state = None
+ self._bucket_name = None
+ self._use_existing_bucket = None
+ self._start_position = None
+ self._batch_rollover_size_in_mbs = None
+ self._batch_rollover_time_in_seconds = None
+ self._error = None
+
+ @property
+ def time_created(self):
+ """
+ Gets the time_created of this Archiver.
+ Time when the resource was created.
+
+
+ :return: The time_created of this Archiver.
+ :rtype: datetime
+ """
+ return self._time_created
+
+ @time_created.setter
+ def time_created(self, time_created):
+ """
+ Sets the time_created of this Archiver.
+ Time when the resource was created.
+
+
+ :param time_created: The time_created of this Archiver.
+ :type: datetime
+ """
+ self._time_created = time_created
+
+ @property
+ def lifecycle_state(self):
+ """
+ Gets the lifecycle_state of this Archiver.
+ The state of the stream archiver.
+
+ Allowed values for this property are: "CREATING", "STOPPED", "STARTING", "RUNNING", "STOPPING", "UPDATING", 'UNKNOWN_ENUM_VALUE'.
+ Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
+
+
+ :return: The lifecycle_state of this Archiver.
+ :rtype: str
+ """
+ return self._lifecycle_state
+
+ @lifecycle_state.setter
+ def lifecycle_state(self, lifecycle_state):
+ """
+ Sets the lifecycle_state of this Archiver.
+ The state of the stream archiver.
+
+
+ :param lifecycle_state: The lifecycle_state of this Archiver.
+ :type: str
+ """
+ allowed_values = ["CREATING", "STOPPED", "STARTING", "RUNNING", "STOPPING", "UPDATING"]
+ if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values):
+ lifecycle_state = 'UNKNOWN_ENUM_VALUE'
+ self._lifecycle_state = lifecycle_state
+
+ @property
+ def bucket_name(self):
+ """
+ Gets the bucket_name of this Archiver.
+ The name of the bucket.
+
+
+ :return: The bucket_name of this Archiver.
+ :rtype: str
+ """
+ return self._bucket_name
+
+ @bucket_name.setter
+ def bucket_name(self, bucket_name):
+ """
+ Sets the bucket_name of this Archiver.
+ The name of the bucket.
+
+
+ :param bucket_name: The bucket_name of this Archiver.
+ :type: str
+ """
+ self._bucket_name = bucket_name
+
+ @property
+ def use_existing_bucket(self):
+ """
+ Gets the use_existing_bucket of this Archiver.
+ The flag to create a new bucket or use existing one.
+
+
+ :return: The use_existing_bucket of this Archiver.
+ :rtype: bool
+ """
+ return self._use_existing_bucket
+
+ @use_existing_bucket.setter
+ def use_existing_bucket(self, use_existing_bucket):
+ """
+ Sets the use_existing_bucket of this Archiver.
+ The flag to create a new bucket or use existing one.
+
+
+ :param use_existing_bucket: The use_existing_bucket of this Archiver.
+ :type: bool
+ """
+ self._use_existing_bucket = use_existing_bucket
+
+ @property
+ def start_position(self):
+ """
+ Gets the start_position of this Archiver.
+ The start message.
+
+ Allowed values for this property are: "LATEST", "TRIM_HORIZON", 'UNKNOWN_ENUM_VALUE'.
+ Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
+
+
+ :return: The start_position of this Archiver.
+ :rtype: str
+ """
+ return self._start_position
+
+ @start_position.setter
+ def start_position(self, start_position):
+ """
+ Sets the start_position of this Archiver.
+ The start message.
+
+
+ :param start_position: The start_position of this Archiver.
+ :type: str
+ """
+ allowed_values = ["LATEST", "TRIM_HORIZON"]
+ if not value_allowed_none_or_none_sentinel(start_position, allowed_values):
+ start_position = 'UNKNOWN_ENUM_VALUE'
+ self._start_position = start_position
+
+ @property
+ def batch_rollover_size_in_mbs(self):
+ """
+ Gets the batch_rollover_size_in_mbs of this Archiver.
+ The batch rollover size in megabytes.
+
+
+ :return: The batch_rollover_size_in_mbs of this Archiver.
+ :rtype: int
+ """
+ return self._batch_rollover_size_in_mbs
+
+ @batch_rollover_size_in_mbs.setter
+ def batch_rollover_size_in_mbs(self, batch_rollover_size_in_mbs):
+ """
+ Sets the batch_rollover_size_in_mbs of this Archiver.
+ The batch rollover size in megabytes.
+
+
+ :param batch_rollover_size_in_mbs: The batch_rollover_size_in_mbs of this Archiver.
+ :type: int
+ """
+ self._batch_rollover_size_in_mbs = batch_rollover_size_in_mbs
+
+ @property
+ def batch_rollover_time_in_seconds(self):
+ """
+ Gets the batch_rollover_time_in_seconds of this Archiver.
+ The rollover time in seconds.
+
+
+ :return: The batch_rollover_time_in_seconds of this Archiver.
+ :rtype: int
+ """
+ return self._batch_rollover_time_in_seconds
+
+ @batch_rollover_time_in_seconds.setter
+ def batch_rollover_time_in_seconds(self, batch_rollover_time_in_seconds):
+ """
+ Sets the batch_rollover_time_in_seconds of this Archiver.
+ The rollover time in seconds.
+
+
+ :param batch_rollover_time_in_seconds: The batch_rollover_time_in_seconds of this Archiver.
+ :type: int
+ """
+ self._batch_rollover_time_in_seconds = batch_rollover_time_in_seconds
+
+ @property
+ def error(self):
+ """
+ Gets the error of this Archiver.
+ If an operation failed this property contained the last error occurred.
+
+
+ :return: The error of this Archiver.
+ :rtype: ArchiverError
+ """
+ return self._error
+
+ @error.setter
+ def error(self, error):
+ """
+ Sets the error of this Archiver.
+ If an operation failed this property contained the last error occurred.
+
+
+ :param error: The error of this Archiver.
+ :type: ArchiverError
+ """
+ self._error = error
+
+ 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/streaming/models/archiver_error.py b/src/oci/streaming/models/archiver_error.py
new file mode 100644
index 0000000000..3c16224c44
--- /dev/null
+++ b/src/oci/streaming/models/archiver_error.py
@@ -0,0 +1,100 @@
+# coding: utf-8
+# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
+
+
+from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401
+from oci.decorators import init_model_state_from_kwargs
+
+
+@init_model_state_from_kwargs
+class ArchiverError(object):
+ """
+ An error related to a stream archiver.
+ """
+
+ def __init__(self, **kwargs):
+ """
+ Initializes a new ArchiverError object with values from keyword arguments.
+ The following keyword arguments are supported (corresponding to the getters/setters of this class):
+
+ :param code:
+ The value to assign to the code property of this ArchiverError.
+ :type code: str
+
+ :param message:
+ The value to assign to the message property of this ArchiverError.
+ :type message: str
+
+ """
+ self.swagger_types = {
+ 'code': 'str',
+ 'message': 'str'
+ }
+
+ self.attribute_map = {
+ 'code': 'code',
+ 'message': 'message'
+ }
+
+ self._code = None
+ self._message = None
+
+ @property
+ def code(self):
+ """
+ Gets the code of this ArchiverError.
+ A short error code that defines the error, meant for programmatic parsing.
+
+
+ :return: The code of this ArchiverError.
+ :rtype: str
+ """
+ return self._code
+
+ @code.setter
+ def code(self, code):
+ """
+ Sets the code of this ArchiverError.
+ A short error code that defines the error, meant for programmatic parsing.
+
+
+ :param code: The code of this ArchiverError.
+ :type: str
+ """
+ self._code = code
+
+ @property
+ def message(self):
+ """
+ Gets the message of this ArchiverError.
+ A human-readable error string.
+
+
+ :return: The message of this ArchiverError.
+ :rtype: str
+ """
+ return self._message
+
+ @message.setter
+ def message(self, message):
+ """
+ Sets the message of this ArchiverError.
+ A human-readable error string.
+
+
+ :param message: The message of this ArchiverError.
+ :type: str
+ """
+ self._message = message
+
+ def __repr__(self):
+ return formatted_flat_dict(self)
+
+ def __eq__(self, other):
+ if other is None:
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ return not self == other
diff --git a/src/oci/streaming/models/create_archiver_details.py b/src/oci/streaming/models/create_archiver_details.py
new file mode 100644
index 0000000000..b2d4aad1fe
--- /dev/null
+++ b/src/oci/streaming/models/create_archiver_details.py
@@ -0,0 +1,210 @@
+# coding: utf-8
+# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
+
+
+from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401
+from oci.decorators import init_model_state_from_kwargs
+
+
+@init_model_state_from_kwargs
+class CreateArchiverDetails(object):
+ """
+ Represents the parameters of the stream archiver.
+ """
+
+ #: A constant which can be used with the start_position property of a CreateArchiverDetails.
+ #: This constant has a value of "LATEST"
+ START_POSITION_LATEST = "LATEST"
+
+ #: A constant which can be used with the start_position property of a CreateArchiverDetails.
+ #: This constant has a value of "TRIM_HORIZON"
+ START_POSITION_TRIM_HORIZON = "TRIM_HORIZON"
+
+ def __init__(self, **kwargs):
+ """
+ Initializes a new CreateArchiverDetails object with values from keyword arguments.
+ The following keyword arguments are supported (corresponding to the getters/setters of this class):
+
+ :param bucket_name:
+ The value to assign to the bucket_name property of this CreateArchiverDetails.
+ :type bucket_name: str
+
+ :param use_existing_bucket:
+ The value to assign to the use_existing_bucket property of this CreateArchiverDetails.
+ :type use_existing_bucket: bool
+
+ :param start_position:
+ The value to assign to the start_position property of this CreateArchiverDetails.
+ Allowed values for this property are: "LATEST", "TRIM_HORIZON"
+ :type start_position: str
+
+ :param batch_rollover_size_in_mbs:
+ The value to assign to the batch_rollover_size_in_mbs property of this CreateArchiverDetails.
+ :type batch_rollover_size_in_mbs: int
+
+ :param batch_rollover_time_in_seconds:
+ The value to assign to the batch_rollover_time_in_seconds property of this CreateArchiverDetails.
+ :type batch_rollover_time_in_seconds: int
+
+ """
+ self.swagger_types = {
+ 'bucket_name': 'str',
+ 'use_existing_bucket': 'bool',
+ 'start_position': 'str',
+ 'batch_rollover_size_in_mbs': 'int',
+ 'batch_rollover_time_in_seconds': 'int'
+ }
+
+ self.attribute_map = {
+ 'bucket_name': 'bucketName',
+ 'use_existing_bucket': 'useExistingBucket',
+ 'start_position': 'startPosition',
+ 'batch_rollover_size_in_mbs': 'batchRolloverSizeInMBs',
+ 'batch_rollover_time_in_seconds': 'batchRolloverTimeInSeconds'
+ }
+
+ self._bucket_name = None
+ self._use_existing_bucket = None
+ self._start_position = None
+ self._batch_rollover_size_in_mbs = None
+ self._batch_rollover_time_in_seconds = None
+
+ @property
+ def bucket_name(self):
+ """
+ **[Required]** Gets the bucket_name of this CreateArchiverDetails.
+ The name of the bucket.
+
+
+ :return: The bucket_name of this CreateArchiverDetails.
+ :rtype: str
+ """
+ return self._bucket_name
+
+ @bucket_name.setter
+ def bucket_name(self, bucket_name):
+ """
+ Sets the bucket_name of this CreateArchiverDetails.
+ The name of the bucket.
+
+
+ :param bucket_name: The bucket_name of this CreateArchiverDetails.
+ :type: str
+ """
+ self._bucket_name = bucket_name
+
+ @property
+ def use_existing_bucket(self):
+ """
+ **[Required]** Gets the use_existing_bucket of this CreateArchiverDetails.
+ The flag to create a new bucket or use existing one.
+
+
+ :return: The use_existing_bucket of this CreateArchiverDetails.
+ :rtype: bool
+ """
+ return self._use_existing_bucket
+
+ @use_existing_bucket.setter
+ def use_existing_bucket(self, use_existing_bucket):
+ """
+ Sets the use_existing_bucket of this CreateArchiverDetails.
+ The flag to create a new bucket or use existing one.
+
+
+ :param use_existing_bucket: The use_existing_bucket of this CreateArchiverDetails.
+ :type: bool
+ """
+ self._use_existing_bucket = use_existing_bucket
+
+ @property
+ def start_position(self):
+ """
+ **[Required]** Gets the start_position of this CreateArchiverDetails.
+ The start message.
+
+ Allowed values for this property are: "LATEST", "TRIM_HORIZON"
+
+
+ :return: The start_position of this CreateArchiverDetails.
+ :rtype: str
+ """
+ return self._start_position
+
+ @start_position.setter
+ def start_position(self, start_position):
+ """
+ Sets the start_position of this CreateArchiverDetails.
+ The start message.
+
+
+ :param start_position: The start_position of this CreateArchiverDetails.
+ :type: str
+ """
+ allowed_values = ["LATEST", "TRIM_HORIZON"]
+ if not value_allowed_none_or_none_sentinel(start_position, allowed_values):
+ raise ValueError(
+ "Invalid value for `start_position`, must be None or one of {0}"
+ .format(allowed_values)
+ )
+ self._start_position = start_position
+
+ @property
+ def batch_rollover_size_in_mbs(self):
+ """
+ **[Required]** Gets the batch_rollover_size_in_mbs of this CreateArchiverDetails.
+ The batch rollover size in megabytes.
+
+
+ :return: The batch_rollover_size_in_mbs of this CreateArchiverDetails.
+ :rtype: int
+ """
+ return self._batch_rollover_size_in_mbs
+
+ @batch_rollover_size_in_mbs.setter
+ def batch_rollover_size_in_mbs(self, batch_rollover_size_in_mbs):
+ """
+ Sets the batch_rollover_size_in_mbs of this CreateArchiverDetails.
+ The batch rollover size in megabytes.
+
+
+ :param batch_rollover_size_in_mbs: The batch_rollover_size_in_mbs of this CreateArchiverDetails.
+ :type: int
+ """
+ self._batch_rollover_size_in_mbs = batch_rollover_size_in_mbs
+
+ @property
+ def batch_rollover_time_in_seconds(self):
+ """
+ **[Required]** Gets the batch_rollover_time_in_seconds of this CreateArchiverDetails.
+ The rollover time in seconds.
+
+
+ :return: The batch_rollover_time_in_seconds of this CreateArchiverDetails.
+ :rtype: int
+ """
+ return self._batch_rollover_time_in_seconds
+
+ @batch_rollover_time_in_seconds.setter
+ def batch_rollover_time_in_seconds(self, batch_rollover_time_in_seconds):
+ """
+ Sets the batch_rollover_time_in_seconds of this CreateArchiverDetails.
+ The rollover time in seconds.
+
+
+ :param batch_rollover_time_in_seconds: The batch_rollover_time_in_seconds of this CreateArchiverDetails.
+ :type: int
+ """
+ self._batch_rollover_time_in_seconds = batch_rollover_time_in_seconds
+
+ 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/streaming/models/update_archiver_details.py b/src/oci/streaming/models/update_archiver_details.py
new file mode 100644
index 0000000000..dcffd213d7
--- /dev/null
+++ b/src/oci/streaming/models/update_archiver_details.py
@@ -0,0 +1,210 @@
+# coding: utf-8
+# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
+
+
+from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401
+from oci.decorators import init_model_state_from_kwargs
+
+
+@init_model_state_from_kwargs
+class UpdateArchiverDetails(object):
+ """
+ The update stream archiver parameters.
+ """
+
+ #: A constant which can be used with the start_position property of a UpdateArchiverDetails.
+ #: This constant has a value of "LATEST"
+ START_POSITION_LATEST = "LATEST"
+
+ #: A constant which can be used with the start_position property of a UpdateArchiverDetails.
+ #: This constant has a value of "TRIM_HORIZON"
+ START_POSITION_TRIM_HORIZON = "TRIM_HORIZON"
+
+ def __init__(self, **kwargs):
+ """
+ Initializes a new UpdateArchiverDetails object with values from keyword arguments.
+ The following keyword arguments are supported (corresponding to the getters/setters of this class):
+
+ :param bucket_name:
+ The value to assign to the bucket_name property of this UpdateArchiverDetails.
+ :type bucket_name: str
+
+ :param use_existing_bucket:
+ The value to assign to the use_existing_bucket property of this UpdateArchiverDetails.
+ :type use_existing_bucket: bool
+
+ :param start_position:
+ The value to assign to the start_position property of this UpdateArchiverDetails.
+ Allowed values for this property are: "LATEST", "TRIM_HORIZON"
+ :type start_position: str
+
+ :param batch_rollover_size_in_mbs:
+ The value to assign to the batch_rollover_size_in_mbs property of this UpdateArchiverDetails.
+ :type batch_rollover_size_in_mbs: int
+
+ :param batch_rollover_time_in_seconds:
+ The value to assign to the batch_rollover_time_in_seconds property of this UpdateArchiverDetails.
+ :type batch_rollover_time_in_seconds: int
+
+ """
+ self.swagger_types = {
+ 'bucket_name': 'str',
+ 'use_existing_bucket': 'bool',
+ 'start_position': 'str',
+ 'batch_rollover_size_in_mbs': 'int',
+ 'batch_rollover_time_in_seconds': 'int'
+ }
+
+ self.attribute_map = {
+ 'bucket_name': 'bucketName',
+ 'use_existing_bucket': 'useExistingBucket',
+ 'start_position': 'startPosition',
+ 'batch_rollover_size_in_mbs': 'batchRolloverSizeInMBs',
+ 'batch_rollover_time_in_seconds': 'batchRolloverTimeInSeconds'
+ }
+
+ self._bucket_name = None
+ self._use_existing_bucket = None
+ self._start_position = None
+ self._batch_rollover_size_in_mbs = None
+ self._batch_rollover_time_in_seconds = None
+
+ @property
+ def bucket_name(self):
+ """
+ Gets the bucket_name of this UpdateArchiverDetails.
+ The name of the bucket.
+
+
+ :return: The bucket_name of this UpdateArchiverDetails.
+ :rtype: str
+ """
+ return self._bucket_name
+
+ @bucket_name.setter
+ def bucket_name(self, bucket_name):
+ """
+ Sets the bucket_name of this UpdateArchiverDetails.
+ The name of the bucket.
+
+
+ :param bucket_name: The bucket_name of this UpdateArchiverDetails.
+ :type: str
+ """
+ self._bucket_name = bucket_name
+
+ @property
+ def use_existing_bucket(self):
+ """
+ Gets the use_existing_bucket of this UpdateArchiverDetails.
+ The flag to create a new bucket or use existing one.
+
+
+ :return: The use_existing_bucket of this UpdateArchiverDetails.
+ :rtype: bool
+ """
+ return self._use_existing_bucket
+
+ @use_existing_bucket.setter
+ def use_existing_bucket(self, use_existing_bucket):
+ """
+ Sets the use_existing_bucket of this UpdateArchiverDetails.
+ The flag to create a new bucket or use existing one.
+
+
+ :param use_existing_bucket: The use_existing_bucket of this UpdateArchiverDetails.
+ :type: bool
+ """
+ self._use_existing_bucket = use_existing_bucket
+
+ @property
+ def start_position(self):
+ """
+ Gets the start_position of this UpdateArchiverDetails.
+ The start message.
+
+ Allowed values for this property are: "LATEST", "TRIM_HORIZON"
+
+
+ :return: The start_position of this UpdateArchiverDetails.
+ :rtype: str
+ """
+ return self._start_position
+
+ @start_position.setter
+ def start_position(self, start_position):
+ """
+ Sets the start_position of this UpdateArchiverDetails.
+ The start message.
+
+
+ :param start_position: The start_position of this UpdateArchiverDetails.
+ :type: str
+ """
+ allowed_values = ["LATEST", "TRIM_HORIZON"]
+ if not value_allowed_none_or_none_sentinel(start_position, allowed_values):
+ raise ValueError(
+ "Invalid value for `start_position`, must be None or one of {0}"
+ .format(allowed_values)
+ )
+ self._start_position = start_position
+
+ @property
+ def batch_rollover_size_in_mbs(self):
+ """
+ Gets the batch_rollover_size_in_mbs of this UpdateArchiverDetails.
+ The batch rollover size in megabytes.
+
+
+ :return: The batch_rollover_size_in_mbs of this UpdateArchiverDetails.
+ :rtype: int
+ """
+ return self._batch_rollover_size_in_mbs
+
+ @batch_rollover_size_in_mbs.setter
+ def batch_rollover_size_in_mbs(self, batch_rollover_size_in_mbs):
+ """
+ Sets the batch_rollover_size_in_mbs of this UpdateArchiverDetails.
+ The batch rollover size in megabytes.
+
+
+ :param batch_rollover_size_in_mbs: The batch_rollover_size_in_mbs of this UpdateArchiverDetails.
+ :type: int
+ """
+ self._batch_rollover_size_in_mbs = batch_rollover_size_in_mbs
+
+ @property
+ def batch_rollover_time_in_seconds(self):
+ """
+ Gets the batch_rollover_time_in_seconds of this UpdateArchiverDetails.
+ The rollover time in seconds.
+
+
+ :return: The batch_rollover_time_in_seconds of this UpdateArchiverDetails.
+ :rtype: int
+ """
+ return self._batch_rollover_time_in_seconds
+
+ @batch_rollover_time_in_seconds.setter
+ def batch_rollover_time_in_seconds(self, batch_rollover_time_in_seconds):
+ """
+ Sets the batch_rollover_time_in_seconds of this UpdateArchiverDetails.
+ The rollover time in seconds.
+
+
+ :param batch_rollover_time_in_seconds: The batch_rollover_time_in_seconds of this UpdateArchiverDetails.
+ :type: int
+ """
+ self._batch_rollover_time_in_seconds = batch_rollover_time_in_seconds
+
+ 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/streaming/stream_admin_client.py b/src/oci/streaming/stream_admin_client.py
index 6e25902393..31b2c1f71a 100644
--- a/src/oci/streaming/stream_admin_client.py
+++ b/src/oci/streaming/stream_admin_client.py
@@ -162,6 +162,94 @@ def change_stream_compartment(self, stream_id, change_stream_compartment_details
header_params=header_params,
body=change_stream_compartment_details)
+ def create_archiver(self, stream_id, create_archiver_details, **kwargs):
+ """
+ Create a new stream archiver for the specified stream.
+ Starts the provisioning of a new stream archiver.
+ To track the progress of the provisioning, you can periodically call :func:`get_archiver`.
+ In the response, the `lifecycleState` parameter of the :class:`Archiver` object tells you its current state.
+
+
+ :param str stream_id: (required)
+ The OCID of the stream.
+
+ :param CreateArchiverDetails create_archiver_details: (required)
+ A stream archiver parameters to create.
+
+ :param str opc_request_id: (optional)
+ The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
+ particular request, please provide the request ID.
+
+ :param str opc_retry_token: (optional)
+ A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (for example, if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).
+
+ :param obj retry_strategy: (optional)
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
+
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY`
+ is also available. The specifics of the default retry strategy are described `here `__.
+
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
+
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.streaming.models.Archiver`
+ :rtype: :class:`~oci.response.Response`
+ """
+ resource_path = "/streams/{streamId}/archiver"
+ method = "POST"
+
+ # Don't accept unknown kwargs
+ expected_kwargs = [
+ "retry_strategy",
+ "opc_request_id",
+ "opc_retry_token"
+ ]
+ extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs]
+ if extra_kwargs:
+ raise ValueError(
+ "create_archiver got unknown kwargs: {!r}".format(extra_kwargs))
+
+ path_params = {
+ "streamId": stream_id
+ }
+
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
+
+ for (k, v) in six.iteritems(path_params):
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
+ raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
+
+ header_params = {
+ "accept": "application/json",
+ "content-type": "application/json",
+ "opc-request-id": kwargs.get("opc_request_id", missing),
+ "opc-retry-token": kwargs.get("opc_retry_token", missing)
+ }
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
+
+ retry_strategy = self.retry_strategy
+ if kwargs.get('retry_strategy'):
+ retry_strategy = kwargs.get('retry_strategy')
+
+ if retry_strategy:
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
+ self.base_client.add_opc_retry_token_if_needed(header_params)
+ return retry_strategy.make_retrying_call(
+ self.base_client.call_api,
+ resource_path=resource_path,
+ method=method,
+ path_params=path_params,
+ header_params=header_params,
+ body=create_archiver_details,
+ response_type="Archiver")
+ else:
+ return self.base_client.call_api(
+ resource_path=resource_path,
+ method=method,
+ path_params=path_params,
+ header_params=header_params,
+ body=create_archiver_details,
+ response_type="Archiver")
+
def create_stream(self, create_stream_details, **kwargs):
"""
Creates a stream.
@@ -245,6 +333,9 @@ def delete_stream(self, stream_id, **kwargs):
The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
particular request, please provide the request ID.
+ :param str if_match: (optional)
+ For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.
+
:param obj retry_strategy: (optional)
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
@@ -262,7 +353,8 @@ def delete_stream(self, stream_id, **kwargs):
# Don't accept unknown kwargs
expected_kwargs = [
"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:
@@ -282,7 +374,8 @@ def delete_stream(self, stream_id, **kwargs):
header_params = {
"accept": "application/json",
"content-type": "application/json",
- "opc-request-id": kwargs.get("opc_request_id", missing)
+ "opc-request-id": kwargs.get("opc_request_id", missing),
+ "if-match": kwargs.get("if_match", missing)
}
header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
@@ -304,6 +397,80 @@ def delete_stream(self, stream_id, **kwargs):
path_params=path_params,
header_params=header_params)
+ def get_archiver(self, stream_id, **kwargs):
+ """
+ Returns the current state of the stream archiver.
+ Returns the current state of the stream archiver.
+
+
+ :param str stream_id: (required)
+ The OCID of the stream.
+
+ :param str opc_request_id: (optional)
+ The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
+ particular request, please provide the request ID.
+
+ :param obj retry_strategy: (optional)
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
+
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY`
+ is also available. The specifics of the default retry strategy are described `here `__.
+
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
+
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.streaming.models.Archiver`
+ :rtype: :class:`~oci.response.Response`
+ """
+ resource_path = "/streams/{streamId}/archiver"
+ method = "GET"
+
+ # Don't accept unknown kwargs
+ expected_kwargs = [
+ "retry_strategy",
+ "opc_request_id"
+ ]
+ extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs]
+ if extra_kwargs:
+ raise ValueError(
+ "get_archiver got unknown kwargs: {!r}".format(extra_kwargs))
+
+ path_params = {
+ "streamId": stream_id
+ }
+
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
+
+ for (k, v) in six.iteritems(path_params):
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
+ raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
+
+ header_params = {
+ "accept": "application/json",
+ "content-type": "application/json",
+ "opc-request-id": kwargs.get("opc_request_id", missing)
+ }
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
+
+ retry_strategy = self.retry_strategy
+ if kwargs.get('retry_strategy'):
+ retry_strategy = kwargs.get('retry_strategy')
+
+ if retry_strategy:
+ return retry_strategy.make_retrying_call(
+ self.base_client.call_api,
+ resource_path=resource_path,
+ method=method,
+ path_params=path_params,
+ header_params=header_params,
+ response_type="Archiver")
+ else:
+ return self.base_client.call_api(
+ resource_path=resource_path,
+ method=method,
+ path_params=path_params,
+ header_params=header_params,
+ response_type="Archiver")
+
def get_stream(self, stream_id, **kwargs):
"""
Gets a stream
@@ -509,6 +676,247 @@ def list_streams(self, compartment_id, **kwargs):
header_params=header_params,
response_type="list[StreamSummary]")
+ def start_archiver(self, stream_id, **kwargs):
+ """
+ Start the archiver for the specified stream.
+ Start the archiver for the specified stream.
+
+
+ :param str stream_id: (required)
+ The OCID of the stream.
+
+ :param str opc_request_id: (optional)
+ The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
+ particular request, please provide the request ID.
+
+ :param str if_match: (optional)
+ For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.
+
+ :param obj retry_strategy: (optional)
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
+
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY`
+ is also available. The specifics of the default retry strategy are described `here `__.
+
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
+
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.streaming.models.Archiver`
+ :rtype: :class:`~oci.response.Response`
+ """
+ resource_path = "/streams/{streamId}/archiver/actions/start"
+ method = "POST"
+
+ # Don't accept unknown kwargs
+ expected_kwargs = [
+ "retry_strategy",
+ "opc_request_id",
+ "if_match"
+ ]
+ extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs]
+ if extra_kwargs:
+ raise ValueError(
+ "start_archiver got unknown kwargs: {!r}".format(extra_kwargs))
+
+ path_params = {
+ "streamId": stream_id
+ }
+
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
+
+ for (k, v) in six.iteritems(path_params):
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
+ raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
+
+ header_params = {
+ "accept": "application/json",
+ "content-type": "application/json",
+ "opc-request-id": kwargs.get("opc_request_id", missing),
+ "if-match": kwargs.get("if_match", missing)
+ }
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
+
+ retry_strategy = self.retry_strategy
+ if kwargs.get('retry_strategy'):
+ retry_strategy = kwargs.get('retry_strategy')
+
+ if retry_strategy:
+ return retry_strategy.make_retrying_call(
+ self.base_client.call_api,
+ resource_path=resource_path,
+ method=method,
+ path_params=path_params,
+ header_params=header_params,
+ response_type="Archiver")
+ else:
+ return self.base_client.call_api(
+ resource_path=resource_path,
+ method=method,
+ path_params=path_params,
+ header_params=header_params,
+ response_type="Archiver")
+
+ def stop_archiver(self, stream_id, **kwargs):
+ """
+ Stop the archiver for the specified stream.
+ Stop the archiver for the specified stream.
+
+
+ :param str stream_id: (required)
+ The OCID of the stream.
+
+ :param str opc_request_id: (optional)
+ The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
+ particular request, please provide the request ID.
+
+ :param str if_match: (optional)
+ For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.
+
+ :param obj retry_strategy: (optional)
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
+
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY`
+ is also available. The specifics of the default retry strategy are described `here `__.
+
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
+
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.streaming.models.Archiver`
+ :rtype: :class:`~oci.response.Response`
+ """
+ resource_path = "/streams/{streamId}/archiver/actions/stop"
+ method = "POST"
+
+ # Don't accept unknown kwargs
+ expected_kwargs = [
+ "retry_strategy",
+ "opc_request_id",
+ "if_match"
+ ]
+ extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs]
+ if extra_kwargs:
+ raise ValueError(
+ "stop_archiver got unknown kwargs: {!r}".format(extra_kwargs))
+
+ path_params = {
+ "streamId": stream_id
+ }
+
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
+
+ for (k, v) in six.iteritems(path_params):
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
+ raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
+
+ header_params = {
+ "accept": "application/json",
+ "content-type": "application/json",
+ "opc-request-id": kwargs.get("opc_request_id", missing),
+ "if-match": kwargs.get("if_match", missing)
+ }
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
+
+ retry_strategy = self.retry_strategy
+ if kwargs.get('retry_strategy'):
+ retry_strategy = kwargs.get('retry_strategy')
+
+ if retry_strategy:
+ return retry_strategy.make_retrying_call(
+ self.base_client.call_api,
+ resource_path=resource_path,
+ method=method,
+ path_params=path_params,
+ header_params=header_params,
+ response_type="Archiver")
+ else:
+ return self.base_client.call_api(
+ resource_path=resource_path,
+ method=method,
+ path_params=path_params,
+ header_params=header_params,
+ response_type="Archiver")
+
+ def update_archiver(self, stream_id, update_archiver_details, **kwargs):
+ """
+ Update the stream archiver parameters.
+
+
+ :param str stream_id: (required)
+ The OCID of the stream.
+
+ :param UpdateArchiverDetails update_archiver_details: (required)
+ The new parameters of the stream archiver.
+
+ :param str opc_request_id: (optional)
+ The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
+ particular request, please provide the request ID.
+
+ :param str if_match: (optional)
+ For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.
+
+ :param obj retry_strategy: (optional)
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
+
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY`
+ is also available. The specifics of the default retry strategy are described `here `__.
+
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
+
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.streaming.models.Archiver`
+ :rtype: :class:`~oci.response.Response`
+ """
+ resource_path = "/streams/{streamId}/archiver"
+ method = "PUT"
+
+ # Don't accept unknown kwargs
+ expected_kwargs = [
+ "retry_strategy",
+ "opc_request_id",
+ "if_match"
+ ]
+ extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs]
+ if extra_kwargs:
+ raise ValueError(
+ "update_archiver got unknown kwargs: {!r}".format(extra_kwargs))
+
+ path_params = {
+ "streamId": stream_id
+ }
+
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
+
+ for (k, v) in six.iteritems(path_params):
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
+ raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
+
+ header_params = {
+ "accept": "application/json",
+ "content-type": "application/json",
+ "opc-request-id": kwargs.get("opc_request_id", missing),
+ "if-match": kwargs.get("if_match", missing)
+ }
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
+
+ retry_strategy = self.retry_strategy
+ if kwargs.get('retry_strategy'):
+ retry_strategy = kwargs.get('retry_strategy')
+
+ if retry_strategy:
+ return retry_strategy.make_retrying_call(
+ self.base_client.call_api,
+ resource_path=resource_path,
+ method=method,
+ path_params=path_params,
+ header_params=header_params,
+ body=update_archiver_details,
+ response_type="Archiver")
+ else:
+ return self.base_client.call_api(
+ resource_path=resource_path,
+ method=method,
+ path_params=path_params,
+ header_params=header_params,
+ body=update_archiver_details,
+ response_type="Archiver")
+
def update_stream(self, stream_id, update_stream_details, **kwargs):
"""
Updates a stream.
@@ -525,6 +933,9 @@ def update_stream(self, stream_id, update_stream_details, **kwargs):
The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
particular request, please provide the request ID.
+ :param str if_match: (optional)
+ For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.
+
:param obj retry_strategy: (optional)
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
@@ -542,7 +953,8 @@ def update_stream(self, stream_id, update_stream_details, **kwargs):
# Don't accept unknown kwargs
expected_kwargs = [
"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:
@@ -562,7 +974,8 @@ def update_stream(self, stream_id, update_stream_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}
diff --git a/src/oci/streaming/stream_admin_client_composite_operations.py b/src/oci/streaming/stream_admin_client_composite_operations.py
index 3cb52dba1c..16a846a29a 100644
--- a/src/oci/streaming/stream_admin_client_composite_operations.py
+++ b/src/oci/streaming/stream_admin_client_composite_operations.py
@@ -22,6 +22,47 @@ def __init__(self, client, **kwargs):
"""
self.client = client
+ def create_archiver_and_wait_for_state(self, stream_id, create_archiver_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
+ """
+ Calls :py:func:`~oci.streaming.StreamAdminClient.create_archiver` and waits for the :py:class:`~oci.streaming.models.Archiver` acted upon
+ to enter the given state(s).
+
+ :param str stream_id: (required)
+ The OCID of the stream.
+
+ :param CreateArchiverDetails create_archiver_details: (required)
+ A stream archiver parameters to create.
+
+ :param list[str] wait_for_states:
+ An array of states to wait on. These should be valid values for :py:attr:`~oci.streaming.models.Archiver.lifecycle_state`
+
+ :param dict operation_kwargs:
+ A dictionary of keyword arguments to pass to :py:func:`~oci.streaming.StreamAdminClient.create_archiver`
+
+ :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_archiver(stream_id, create_archiver_details, **operation_kwargs)
+ if not wait_for_states:
+ return operation_result
+
+ lowered_wait_for_states = [w.lower() for w in wait_for_states]
+ wait_for_resource_id = operation_result.data.id
+
+ try:
+ waiter_result = oci.wait_until(
+ self.client,
+ self.client.get_archiver(wait_for_resource_id),
+ evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
+ **waiter_kwargs
+ )
+ result_to_return = waiter_result
+
+ return result_to_return
+ except Exception as e:
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
+
def create_stream_and_wait_for_state(self, create_stream_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
"""
Calls :py:func:`~oci.streaming.StreamAdminClient.create_stream` and waits for the :py:class:`~oci.streaming.models.Stream` acted upon
@@ -107,6 +148,123 @@ def delete_stream_and_wait_for_state(self, stream_id, wait_for_states=[], operat
except Exception as e:
raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
+ def start_archiver_and_wait_for_state(self, stream_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
+ """
+ Calls :py:func:`~oci.streaming.StreamAdminClient.start_archiver` and waits for the :py:class:`~oci.streaming.models.Archiver` acted upon
+ to enter the given state(s).
+
+ :param str stream_id: (required)
+ The OCID of the stream.
+
+ :param list[str] wait_for_states:
+ An array of states to wait on. These should be valid values for :py:attr:`~oci.streaming.models.Archiver.lifecycle_state`
+
+ :param dict operation_kwargs:
+ A dictionary of keyword arguments to pass to :py:func:`~oci.streaming.StreamAdminClient.start_archiver`
+
+ :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.start_archiver(stream_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.data.id
+
+ try:
+ waiter_result = oci.wait_until(
+ self.client,
+ self.client.get_archiver(wait_for_resource_id),
+ evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
+ **waiter_kwargs
+ )
+ result_to_return = waiter_result
+
+ return result_to_return
+ except Exception as e:
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
+
+ def stop_archiver_and_wait_for_state(self, stream_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
+ """
+ Calls :py:func:`~oci.streaming.StreamAdminClient.stop_archiver` and waits for the :py:class:`~oci.streaming.models.Archiver` acted upon
+ to enter the given state(s).
+
+ :param str stream_id: (required)
+ The OCID of the stream.
+
+ :param list[str] wait_for_states:
+ An array of states to wait on. These should be valid values for :py:attr:`~oci.streaming.models.Archiver.lifecycle_state`
+
+ :param dict operation_kwargs:
+ A dictionary of keyword arguments to pass to :py:func:`~oci.streaming.StreamAdminClient.stop_archiver`
+
+ :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.stop_archiver(stream_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.data.id
+
+ try:
+ waiter_result = oci.wait_until(
+ self.client,
+ self.client.get_archiver(wait_for_resource_id),
+ evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
+ **waiter_kwargs
+ )
+ result_to_return = waiter_result
+
+ return result_to_return
+ except Exception as e:
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
+
+ def update_archiver_and_wait_for_state(self, stream_id, update_archiver_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
+ """
+ Calls :py:func:`~oci.streaming.StreamAdminClient.update_archiver` and waits for the :py:class:`~oci.streaming.models.Archiver` acted upon
+ to enter the given state(s).
+
+ :param str stream_id: (required)
+ The OCID of the stream.
+
+ :param UpdateArchiverDetails update_archiver_details: (required)
+ The new parameters of the stream archiver.
+
+ :param list[str] wait_for_states:
+ An array of states to wait on. These should be valid values for :py:attr:`~oci.streaming.models.Archiver.lifecycle_state`
+
+ :param dict operation_kwargs:
+ A dictionary of keyword arguments to pass to :py:func:`~oci.streaming.StreamAdminClient.update_archiver`
+
+ :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_archiver(stream_id, update_archiver_details, **operation_kwargs)
+ if not wait_for_states:
+ return operation_result
+
+ lowered_wait_for_states = [w.lower() for w in wait_for_states]
+ wait_for_resource_id = operation_result.data.id
+
+ try:
+ waiter_result = oci.wait_until(
+ self.client,
+ self.client.get_archiver(wait_for_resource_id),
+ evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
+ **waiter_kwargs
+ )
+ result_to_return = waiter_result
+
+ return result_to_return
+ except Exception as e:
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
+
def update_stream_and_wait_for_state(self, stream_id, update_stream_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
"""
Calls :py:func:`~oci.streaming.StreamAdminClient.update_stream` and waits for the :py:class:`~oci.streaming.models.Stream` acted upon
diff --git a/src/oci/version.py b/src/oci/version.py
index e8b24ac90f..b2acfec1c1 100644
--- a/src/oci/version.py
+++ b/src/oci/version.py
@@ -1,4 +1,4 @@
# coding: utf-8
# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
-__version__ = "2.3.0"
+__version__ = "2.3.1"
diff --git a/src/oci/waas/models/__init__.py b/src/oci/waas/models/__init__.py
index d77f0f1ef6..37e1f6f656 100644
--- a/src/oci/waas/models/__init__.py
+++ b/src/oci/waas/models/__init__.py
@@ -5,8 +5,13 @@
from .access_rule import AccessRule
from .access_rule_criteria import AccessRuleCriteria
+from .address_list import AddressList
+from .address_list_summary import AddressListSummary
from .address_rate_limiting import AddressRateLimiting
from .block_challenge_settings import BlockChallengeSettings
+from .caching_rule import CachingRule
+from .caching_rule_criteria import CachingRuleCriteria
+from .caching_rule_summary import CachingRuleSummary
from .captcha import Captcha
from .certificate import Certificate
from .certificate_extensions import CertificateExtensions
@@ -14,10 +19,17 @@
from .certificate_public_key_info import CertificatePublicKeyInfo
from .certificate_subject_name import CertificateSubjectName
from .certificate_summary import CertificateSummary
+from .change_address_list_compartment_details import ChangeAddressListCompartmentDetails
from .change_certificate_compartment_details import ChangeCertificateCompartmentDetails
+from .change_custom_protection_rule_compartment_details import ChangeCustomProtectionRuleCompartmentDetails
from .change_waas_policy_compartment_details import ChangeWaasPolicyCompartmentDetails
+from .create_address_list_details import CreateAddressListDetails
from .create_certificate_details import CreateCertificateDetails
+from .create_custom_protection_rule_details import CreateCustomProtectionRuleDetails
from .create_waas_policy_details import CreateWaasPolicyDetails
+from .custom_protection_rule import CustomProtectionRule
+from .custom_protection_rule_setting import CustomProtectionRuleSetting
+from .custom_protection_rule_summary import CustomProtectionRuleSummary
from .device_fingerprint_challenge import DeviceFingerprintChallenge
from .edge_subnet import EdgeSubnet
from .good_bot import GoodBot
@@ -25,17 +37,23 @@
from .human_interaction_challenge import HumanInteractionChallenge
from .js_challenge import JsChallenge
from .origin import Origin
+from .origin_group import OriginGroup
+from .origin_group_origins import OriginGroupOrigins
from .policy_config import PolicyConfig
from .protection_rule import ProtectionRule
from .protection_rule_action import ProtectionRuleAction
from .protection_rule_exclusion import ProtectionRuleExclusion
from .protection_settings import ProtectionSettings
+from .purge_cache import PurgeCache
from .recommendation import Recommendation
from .threat_feed import ThreatFeed
from .threat_feed_action import ThreatFeedAction
+from .update_address_list_details import UpdateAddressListDetails
from .update_certificate_details import UpdateCertificateDetails
+from .update_custom_protection_rule_details import UpdateCustomProtectionRuleDetails
from .update_waas_policy_details import UpdateWaasPolicyDetails
from .waas_policy import WaasPolicy
+from .waas_policy_custom_protection_rule_summary import WaasPolicyCustomProtectionRuleSummary
from .waas_policy_summary import WaasPolicySummary
from .waf_blocked_request import WafBlockedRequest
from .waf_config import WafConfig
@@ -55,8 +73,13 @@
waas_type_mapping = {
"AccessRule": AccessRule,
"AccessRuleCriteria": AccessRuleCriteria,
+ "AddressList": AddressList,
+ "AddressListSummary": AddressListSummary,
"AddressRateLimiting": AddressRateLimiting,
"BlockChallengeSettings": BlockChallengeSettings,
+ "CachingRule": CachingRule,
+ "CachingRuleCriteria": CachingRuleCriteria,
+ "CachingRuleSummary": CachingRuleSummary,
"Captcha": Captcha,
"Certificate": Certificate,
"CertificateExtensions": CertificateExtensions,
@@ -64,10 +87,17 @@
"CertificatePublicKeyInfo": CertificatePublicKeyInfo,
"CertificateSubjectName": CertificateSubjectName,
"CertificateSummary": CertificateSummary,
+ "ChangeAddressListCompartmentDetails": ChangeAddressListCompartmentDetails,
"ChangeCertificateCompartmentDetails": ChangeCertificateCompartmentDetails,
+ "ChangeCustomProtectionRuleCompartmentDetails": ChangeCustomProtectionRuleCompartmentDetails,
"ChangeWaasPolicyCompartmentDetails": ChangeWaasPolicyCompartmentDetails,
+ "CreateAddressListDetails": CreateAddressListDetails,
"CreateCertificateDetails": CreateCertificateDetails,
+ "CreateCustomProtectionRuleDetails": CreateCustomProtectionRuleDetails,
"CreateWaasPolicyDetails": CreateWaasPolicyDetails,
+ "CustomProtectionRule": CustomProtectionRule,
+ "CustomProtectionRuleSetting": CustomProtectionRuleSetting,
+ "CustomProtectionRuleSummary": CustomProtectionRuleSummary,
"DeviceFingerprintChallenge": DeviceFingerprintChallenge,
"EdgeSubnet": EdgeSubnet,
"GoodBot": GoodBot,
@@ -75,17 +105,23 @@
"HumanInteractionChallenge": HumanInteractionChallenge,
"JsChallenge": JsChallenge,
"Origin": Origin,
+ "OriginGroup": OriginGroup,
+ "OriginGroupOrigins": OriginGroupOrigins,
"PolicyConfig": PolicyConfig,
"ProtectionRule": ProtectionRule,
"ProtectionRuleAction": ProtectionRuleAction,
"ProtectionRuleExclusion": ProtectionRuleExclusion,
"ProtectionSettings": ProtectionSettings,
+ "PurgeCache": PurgeCache,
"Recommendation": Recommendation,
"ThreatFeed": ThreatFeed,
"ThreatFeedAction": ThreatFeedAction,
+ "UpdateAddressListDetails": UpdateAddressListDetails,
"UpdateCertificateDetails": UpdateCertificateDetails,
+ "UpdateCustomProtectionRuleDetails": UpdateCustomProtectionRuleDetails,
"UpdateWaasPolicyDetails": UpdateWaasPolicyDetails,
"WaasPolicy": WaasPolicy,
+ "WaasPolicyCustomProtectionRuleSummary": WaasPolicyCustomProtectionRuleSummary,
"WaasPolicySummary": WaasPolicySummary,
"WafBlockedRequest": WafBlockedRequest,
"WafConfig": WafConfig,
diff --git a/src/oci/waas/models/access_rule.py b/src/oci/waas/models/access_rule.py
index d746791ff3..3f9162e5f8 100644
--- a/src/oci/waas/models/access_rule.py
+++ b/src/oci/waas/models/access_rule.py
@@ -24,6 +24,14 @@ class AccessRule(object):
#: This constant has a value of "BLOCK"
ACTION_BLOCK = "BLOCK"
+ #: A constant which can be used with the action property of a AccessRule.
+ #: This constant has a value of "BYPASS"
+ ACTION_BYPASS = "BYPASS"
+
+ #: A constant which can be used with the action property of a AccessRule.
+ #: This constant has a value of "REDIRECT"
+ ACTION_REDIRECT = "REDIRECT"
+
#: A constant which can be used with the block_action property of a AccessRule.
#: This constant has a value of "SET_RESPONSE_CODE"
BLOCK_ACTION_SET_RESPONSE_CODE = "SET_RESPONSE_CODE"
@@ -32,6 +40,30 @@ class AccessRule(object):
#: This constant has a value of "SHOW_ERROR_PAGE"
BLOCK_ACTION_SHOW_ERROR_PAGE = "SHOW_ERROR_PAGE"
+ #: A constant which can be used with the bypass_challenges property of a AccessRule.
+ #: This constant has a value of "JS_CHALLENGE"
+ BYPASS_CHALLENGES_JS_CHALLENGE = "JS_CHALLENGE"
+
+ #: A constant which can be used with the bypass_challenges property of a AccessRule.
+ #: This constant has a value of "DEVICE_FINGERPRINT_CHALLENGE"
+ BYPASS_CHALLENGES_DEVICE_FINGERPRINT_CHALLENGE = "DEVICE_FINGERPRINT_CHALLENGE"
+
+ #: A constant which can be used with the bypass_challenges property of a AccessRule.
+ #: This constant has a value of "HUMAN_INTERACTION_CHALLENGE"
+ BYPASS_CHALLENGES_HUMAN_INTERACTION_CHALLENGE = "HUMAN_INTERACTION_CHALLENGE"
+
+ #: A constant which can be used with the bypass_challenges property of a AccessRule.
+ #: This constant has a value of "CAPTCHA"
+ BYPASS_CHALLENGES_CAPTCHA = "CAPTCHA"
+
+ #: A constant which can be used with the redirect_response_code property of a AccessRule.
+ #: This constant has a value of "MOVED_PERMANENTLY"
+ REDIRECT_RESPONSE_CODE_MOVED_PERMANENTLY = "MOVED_PERMANENTLY"
+
+ #: A constant which can be used with the redirect_response_code property of a AccessRule.
+ #: This constant has a value of "FOUND"
+ REDIRECT_RESPONSE_CODE_FOUND = "FOUND"
+
def __init__(self, **kwargs):
"""
Initializes a new AccessRule object with values from keyword arguments.
@@ -47,7 +79,7 @@ def __init__(self, **kwargs):
:param action:
The value to assign to the action property of this AccessRule.
- Allowed values for this property are: "ALLOW", "DETECT", "BLOCK", 'UNKNOWN_ENUM_VALUE'.
+ Allowed values for this property are: "ALLOW", "DETECT", "BLOCK", "BYPASS", "REDIRECT", 'UNKNOWN_ENUM_VALUE'.
Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
:type action: str
@@ -73,6 +105,22 @@ def __init__(self, **kwargs):
The value to assign to the block_error_page_description property of this AccessRule.
:type block_error_page_description: str
+ :param bypass_challenges:
+ The value to assign to the bypass_challenges property of this AccessRule.
+ Allowed values for items in this list are: "JS_CHALLENGE", "DEVICE_FINGERPRINT_CHALLENGE", "HUMAN_INTERACTION_CHALLENGE", "CAPTCHA", 'UNKNOWN_ENUM_VALUE'.
+ Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
+ :type bypass_challenges: list[str]
+
+ :param redirect_url:
+ The value to assign to the redirect_url property of this AccessRule.
+ :type redirect_url: str
+
+ :param redirect_response_code:
+ The value to assign to the redirect_response_code property of this AccessRule.
+ Allowed values for this property are: "MOVED_PERMANENTLY", "FOUND", 'UNKNOWN_ENUM_VALUE'.
+ Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
+ :type redirect_response_code: str
+
"""
self.swagger_types = {
'name': 'str',
@@ -82,7 +130,10 @@ def __init__(self, **kwargs):
'block_response_code': 'int',
'block_error_page_message': 'str',
'block_error_page_code': 'str',
- 'block_error_page_description': 'str'
+ 'block_error_page_description': 'str',
+ 'bypass_challenges': 'list[str]',
+ 'redirect_url': 'str',
+ 'redirect_response_code': 'str'
}
self.attribute_map = {
@@ -93,7 +144,10 @@ def __init__(self, **kwargs):
'block_response_code': 'blockResponseCode',
'block_error_page_message': 'blockErrorPageMessage',
'block_error_page_code': 'blockErrorPageCode',
- 'block_error_page_description': 'blockErrorPageDescription'
+ 'block_error_page_description': 'blockErrorPageDescription',
+ 'bypass_challenges': 'bypassChallenges',
+ 'redirect_url': 'redirectUrl',
+ 'redirect_response_code': 'redirectResponseCode'
}
self._name = None
@@ -104,6 +158,9 @@ def __init__(self, **kwargs):
self._block_error_page_message = None
self._block_error_page_code = None
self._block_error_page_description = None
+ self._bypass_challenges = None
+ self._redirect_url = None
+ self._redirect_response_code = None
@property
def name(self):
@@ -165,7 +222,13 @@ def action(self):
- **BLOCK:** Blocks the request by returning specified response code or showing error page.
- Allowed values for this property are: "ALLOW", "DETECT", "BLOCK", 'UNKNOWN_ENUM_VALUE'.
+ - **BYPASS:** Bypasses some or all challenges.
+
+ - **REDIRECT:** Redirects the request to the specified URL.
+
+ Regardless of action, no further rules are processed once the rule is matched.
+
+ Allowed values for this property are: "ALLOW", "DETECT", "BLOCK", "BYPASS", "REDIRECT", 'UNKNOWN_ENUM_VALUE'.
Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
@@ -186,11 +249,17 @@ def action(self, action):
- **BLOCK:** Blocks the request by returning specified response code or showing error page.
+ - **BYPASS:** Bypasses some or all challenges.
+
+ - **REDIRECT:** Redirects the request to the specified URL.
+
+ Regardless of action, no further rules are processed once the rule is matched.
+
:param action: The action of this AccessRule.
:type: str
"""
- allowed_values = ["ALLOW", "DETECT", "BLOCK"]
+ allowed_values = ["ALLOW", "DETECT", "BLOCK", "BYPASS", "REDIRECT"]
if not value_allowed_none_or_none_sentinel(action, allowed_values):
action = 'UNKNOWN_ENUM_VALUE'
self._action = action
@@ -321,6 +390,114 @@ def block_error_page_description(self, block_error_page_description):
"""
self._block_error_page_description = block_error_page_description
+ @property
+ def bypass_challenges(self):
+ """
+ Gets the bypass_challenges of this AccessRule.
+ The list of challenges to bypass when `action` is set to `BYPASS`. If unspecified or empty, all challenges are bypassed.
+
+ - **JS_CHALLENGE:** Bypasses JavaScript Challenge.
+
+ - **DEVICE_FINGERPRINT_CHALLENGE:** Bypasses Device Fingerprint Challenge.
+
+ - **HUMAN_INTERACTION_CHALLENGE:** Bypasses Human Interaction Challenge.
+
+ - **CAPTCHA:** Bypasses CAPTCHA Challenge.
+
+ Allowed values for items in this list are: "JS_CHALLENGE", "DEVICE_FINGERPRINT_CHALLENGE", "HUMAN_INTERACTION_CHALLENGE", "CAPTCHA", 'UNKNOWN_ENUM_VALUE'.
+ Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
+
+
+ :return: The bypass_challenges of this AccessRule.
+ :rtype: list[str]
+ """
+ return self._bypass_challenges
+
+ @bypass_challenges.setter
+ def bypass_challenges(self, bypass_challenges):
+ """
+ Sets the bypass_challenges of this AccessRule.
+ The list of challenges to bypass when `action` is set to `BYPASS`. If unspecified or empty, all challenges are bypassed.
+
+ - **JS_CHALLENGE:** Bypasses JavaScript Challenge.
+
+ - **DEVICE_FINGERPRINT_CHALLENGE:** Bypasses Device Fingerprint Challenge.
+
+ - **HUMAN_INTERACTION_CHALLENGE:** Bypasses Human Interaction Challenge.
+
+ - **CAPTCHA:** Bypasses CAPTCHA Challenge.
+
+
+ :param bypass_challenges: The bypass_challenges of this AccessRule.
+ :type: list[str]
+ """
+ allowed_values = ["JS_CHALLENGE", "DEVICE_FINGERPRINT_CHALLENGE", "HUMAN_INTERACTION_CHALLENGE", "CAPTCHA"]
+ if bypass_challenges:
+ bypass_challenges[:] = ['UNKNOWN_ENUM_VALUE' if not value_allowed_none_or_none_sentinel(x, allowed_values) else x for x in bypass_challenges]
+ self._bypass_challenges = bypass_challenges
+
+ @property
+ def redirect_url(self):
+ """
+ Gets the redirect_url of this AccessRule.
+ The target to which the request should be redirected, represented as a URI reference.
+
+
+ :return: The redirect_url of this AccessRule.
+ :rtype: str
+ """
+ return self._redirect_url
+
+ @redirect_url.setter
+ def redirect_url(self, redirect_url):
+ """
+ Sets the redirect_url of this AccessRule.
+ The target to which the request should be redirected, represented as a URI reference.
+
+
+ :param redirect_url: The redirect_url of this AccessRule.
+ :type: str
+ """
+ self._redirect_url = redirect_url
+
+ @property
+ def redirect_response_code(self):
+ """
+ Gets the redirect_response_code of this AccessRule.
+ The response status code to return when `action` is set to `REDIRECT`.
+
+ - **MOVED_PERMANENTLY:** Used for designating the permanent movement of a page (numerical code - 301).
+
+ - **FOUND:** Used for designating the temporary movement of a page (numerical code - 302).
+
+ Allowed values for this property are: "MOVED_PERMANENTLY", "FOUND", 'UNKNOWN_ENUM_VALUE'.
+ Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
+
+
+ :return: The redirect_response_code of this AccessRule.
+ :rtype: str
+ """
+ return self._redirect_response_code
+
+ @redirect_response_code.setter
+ def redirect_response_code(self, redirect_response_code):
+ """
+ Sets the redirect_response_code of this AccessRule.
+ The response status code to return when `action` is set to `REDIRECT`.
+
+ - **MOVED_PERMANENTLY:** Used for designating the permanent movement of a page (numerical code - 301).
+
+ - **FOUND:** Used for designating the temporary movement of a page (numerical code - 302).
+
+
+ :param redirect_response_code: The redirect_response_code of this AccessRule.
+ :type: str
+ """
+ allowed_values = ["MOVED_PERMANENTLY", "FOUND"]
+ if not value_allowed_none_or_none_sentinel(redirect_response_code, allowed_values):
+ redirect_response_code = 'UNKNOWN_ENUM_VALUE'
+ self._redirect_response_code = redirect_response_code
+
def __repr__(self):
return formatted_flat_dict(self)
diff --git a/src/oci/waas/models/access_rule_criteria.py b/src/oci/waas/models/access_rule_criteria.py
index 0629757fcd..58e9b76354 100644
--- a/src/oci/waas/models/access_rule_criteria.py
+++ b/src/oci/waas/models/access_rule_criteria.py
@@ -48,6 +48,22 @@ class AccessRuleCriteria(object):
#: This constant has a value of "HTTP_HEADER_CONTAINS"
CONDITION_HTTP_HEADER_CONTAINS = "HTTP_HEADER_CONTAINS"
+ #: A constant which can be used with the condition property of a AccessRuleCriteria.
+ #: This constant has a value of "IP_IN_LIST"
+ CONDITION_IP_IN_LIST = "IP_IN_LIST"
+
+ #: A constant which can be used with the condition property of a AccessRuleCriteria.
+ #: This constant has a value of "IP_NOT_IN_LIST"
+ CONDITION_IP_NOT_IN_LIST = "IP_NOT_IN_LIST"
+
+ #: A constant which can be used with the condition property of a AccessRuleCriteria.
+ #: This constant has a value of "HTTP_METHOD_IS"
+ CONDITION_HTTP_METHOD_IS = "HTTP_METHOD_IS"
+
+ #: A constant which can be used with the condition property of a AccessRuleCriteria.
+ #: This constant has a value of "HTTP_METHOD_IS_NOT"
+ CONDITION_HTTP_METHOD_IS_NOT = "HTTP_METHOD_IS_NOT"
+
#: A constant which can be used with the condition property of a AccessRuleCriteria.
#: This constant has a value of "COUNTRY_IS"
CONDITION_COUNTRY_IS = "COUNTRY_IS"
@@ -71,7 +87,7 @@ def __init__(self, **kwargs):
:param condition:
The value to assign to the condition property of this AccessRuleCriteria.
- Allowed values for this property are: "URL_IS", "URL_IS_NOT", "URL_STARTS_WITH", "URL_PART_ENDS_WITH", "URL_PART_CONTAINS", "URL_REGEX", "IP_IS", "IP_IS_NOT", "HTTP_HEADER_CONTAINS", "COUNTRY_IS", "COUNTRY_IS_NOT", "USER_AGENT_IS", "USER_AGENT_IS_NOT", 'UNKNOWN_ENUM_VALUE'.
+ Allowed values for this property are: "URL_IS", "URL_IS_NOT", "URL_STARTS_WITH", "URL_PART_ENDS_WITH", "URL_PART_CONTAINS", "URL_REGEX", "IP_IS", "IP_IS_NOT", "HTTP_HEADER_CONTAINS", "IP_IN_LIST", "IP_NOT_IN_LIST", "HTTP_METHOD_IS", "HTTP_METHOD_IS_NOT", "COUNTRY_IS", "COUNTRY_IS_NOT", "USER_AGENT_IS", "USER_AGENT_IS_NOT", 'UNKNOWN_ENUM_VALUE'.
Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
:type condition: str
@@ -117,7 +133,13 @@ def condition(self):
- **HTTP_HEADER_CONTAINS:** The HTTP_HEADER_CONTAINS criteria is defined using a compound value separated by a colon: a header field name and a header field value. `host:test.example.com` is an example of a criteria value where `host` is the header field name and `test.example.com` is the header field value. A request matches when the header field name is a case insensitive match and the header field value is a case insensitive, substring match.
*Example:* With a criteria value of `host:test.example.com`, where `host` is the name of the field and `test.example.com` is the value of the host field, a request with the header values, `Host: www.test.example.com` will match, where as a request with header values of `host: www.example.com` or `host: test.sub.example.com` will not match.
+ - **IP_IN_LIST:** Matches if the request originates from one of IP addresses contained in the referenced address list. The `value` in this case is OCID of the address list.
+
+ - **IP_NOT_IN_LIST:** Matches if the request does not originate from any IP address contained in the referenced address list. The `value` field in this case is OCID of the address list.
+ - **HTTP_METHOD_IS:** Matches if the request method corresponds to the `value` field. The list of available methods: `GET`, `HEAD`, `POST`, `PUT`, `DELETE`, `CONNECT`, `OPTIONS`, `TRACE`, `PATCH`
+
+ - **HTTP_METHOD_IS_NOT:** Matches if the request method does not correspond to the `value` field. The list of available methods: `GET`, `HEAD`, `POST`, `PUT`, `DELETE`, `CONNECT`, `OPTIONS`, `TRACE`, `PATCH`
- **COUNTRY_IS:** Matches if the request originates from a country in the `value` field. Country codes are in ISO 3166-1 alpha-2 format. For a list of codes, see `ISO's website`__.
@@ -130,7 +152,7 @@ def condition(self):
__ https://www.iso.org/obp/ui/#search/code/
__ https://www.iso.org/obp/ui/#search/code/
- Allowed values for this property are: "URL_IS", "URL_IS_NOT", "URL_STARTS_WITH", "URL_PART_ENDS_WITH", "URL_PART_CONTAINS", "URL_REGEX", "IP_IS", "IP_IS_NOT", "HTTP_HEADER_CONTAINS", "COUNTRY_IS", "COUNTRY_IS_NOT", "USER_AGENT_IS", "USER_AGENT_IS_NOT", 'UNKNOWN_ENUM_VALUE'.
+ Allowed values for this property are: "URL_IS", "URL_IS_NOT", "URL_STARTS_WITH", "URL_PART_ENDS_WITH", "URL_PART_CONTAINS", "URL_REGEX", "IP_IS", "IP_IS_NOT", "HTTP_HEADER_CONTAINS", "IP_IN_LIST", "IP_NOT_IN_LIST", "HTTP_METHOD_IS", "HTTP_METHOD_IS_NOT", "COUNTRY_IS", "COUNTRY_IS_NOT", "USER_AGENT_IS", "USER_AGENT_IS_NOT", 'UNKNOWN_ENUM_VALUE'.
Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
@@ -163,7 +185,13 @@ def condition(self, condition):
- **HTTP_HEADER_CONTAINS:** The HTTP_HEADER_CONTAINS criteria is defined using a compound value separated by a colon: a header field name and a header field value. `host:test.example.com` is an example of a criteria value where `host` is the header field name and `test.example.com` is the header field value. A request matches when the header field name is a case insensitive match and the header field value is a case insensitive, substring match.
*Example:* With a criteria value of `host:test.example.com`, where `host` is the name of the field and `test.example.com` is the value of the host field, a request with the header values, `Host: www.test.example.com` will match, where as a request with header values of `host: www.example.com` or `host: test.sub.example.com` will not match.
+ - **IP_IN_LIST:** Matches if the request originates from one of IP addresses contained in the referenced address list. The `value` in this case is OCID of the address list.
+
+ - **IP_NOT_IN_LIST:** Matches if the request does not originate from any IP address contained in the referenced address list. The `value` field in this case is OCID of the address list.
+
+ - **HTTP_METHOD_IS:** Matches if the request method corresponds to the `value` field. The list of available methods: `GET`, `HEAD`, `POST`, `PUT`, `DELETE`, `CONNECT`, `OPTIONS`, `TRACE`, `PATCH`
+ - **HTTP_METHOD_IS_NOT:** Matches if the request method does not correspond to the `value` field. The list of available methods: `GET`, `HEAD`, `POST`, `PUT`, `DELETE`, `CONNECT`, `OPTIONS`, `TRACE`, `PATCH`
- **COUNTRY_IS:** Matches if the request originates from a country in the `value` field. Country codes are in ISO 3166-1 alpha-2 format. For a list of codes, see `ISO's website`__.
@@ -180,7 +208,7 @@ def condition(self, condition):
:param condition: The condition of this AccessRuleCriteria.
:type: str
"""
- allowed_values = ["URL_IS", "URL_IS_NOT", "URL_STARTS_WITH", "URL_PART_ENDS_WITH", "URL_PART_CONTAINS", "URL_REGEX", "IP_IS", "IP_IS_NOT", "HTTP_HEADER_CONTAINS", "COUNTRY_IS", "COUNTRY_IS_NOT", "USER_AGENT_IS", "USER_AGENT_IS_NOT"]
+ allowed_values = ["URL_IS", "URL_IS_NOT", "URL_STARTS_WITH", "URL_PART_ENDS_WITH", "URL_PART_CONTAINS", "URL_REGEX", "IP_IS", "IP_IS_NOT", "HTTP_HEADER_CONTAINS", "IP_IN_LIST", "IP_NOT_IN_LIST", "HTTP_METHOD_IS", "HTTP_METHOD_IS_NOT", "COUNTRY_IS", "COUNTRY_IS_NOT", "USER_AGENT_IS", "USER_AGENT_IS_NOT"]
if not value_allowed_none_or_none_sentinel(condition, allowed_values):
condition = 'UNKNOWN_ENUM_VALUE'
self._condition = condition
diff --git a/src/oci/waas/models/address_list.py b/src/oci/waas/models/address_list.py
new file mode 100644
index 0000000000..0c58367024
--- /dev/null
+++ b/src/oci/waas/models/address_list.py
@@ -0,0 +1,377 @@
+# coding: utf-8
+# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
+
+
+from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401
+from oci.decorators import init_model_state_from_kwargs
+
+
+@init_model_state_from_kwargs
+class AddressList(object):
+ """
+ The details of the address list.
+ """
+
+ #: A constant which can be used with the lifecycle_state property of a AddressList.
+ #: This constant has a value of "CREATING"
+ LIFECYCLE_STATE_CREATING = "CREATING"
+
+ #: A constant which can be used with the lifecycle_state property of a AddressList.
+ #: This constant has a value of "ACTIVE"
+ LIFECYCLE_STATE_ACTIVE = "ACTIVE"
+
+ #: A constant which can be used with the lifecycle_state property of a AddressList.
+ #: This constant has a value of "FAILED"
+ LIFECYCLE_STATE_FAILED = "FAILED"
+
+ #: A constant which can be used with the lifecycle_state property of a AddressList.
+ #: This constant has a value of "UPDATING"
+ LIFECYCLE_STATE_UPDATING = "UPDATING"
+
+ #: A constant which can be used with the lifecycle_state property of a AddressList.
+ #: This constant has a value of "DELETING"
+ LIFECYCLE_STATE_DELETING = "DELETING"
+
+ #: A constant which can be used with the lifecycle_state property of a AddressList.
+ #: This constant has a value of "DELETED"
+ LIFECYCLE_STATE_DELETED = "DELETED"
+
+ def __init__(self, **kwargs):
+ """
+ Initializes a new AddressList 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 AddressList.
+ :type id: str
+
+ :param compartment_id:
+ The value to assign to the compartment_id property of this AddressList.
+ :type compartment_id: str
+
+ :param display_name:
+ The value to assign to the display_name property of this AddressList.
+ :type display_name: str
+
+ :param address_count:
+ The value to assign to the address_count property of this AddressList.
+ :type address_count: float
+
+ :param addresses:
+ The value to assign to the addresses property of this AddressList.
+ :type addresses: list[str]
+
+ :param freeform_tags:
+ The value to assign to the freeform_tags property of this AddressList.
+ :type freeform_tags: dict(str, str)
+
+ :param defined_tags:
+ The value to assign to the defined_tags property of this AddressList.
+ :type defined_tags: dict(str, dict(str, object))
+
+ :param lifecycle_state:
+ The value to assign to the lifecycle_state property of this AddressList.
+ Allowed values for this property are: "CREATING", "ACTIVE", "FAILED", "UPDATING", "DELETING", "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 AddressList.
+ :type time_created: datetime
+
+ """
+ self.swagger_types = {
+ 'id': 'str',
+ 'compartment_id': 'str',
+ 'display_name': 'str',
+ 'address_count': 'float',
+ 'addresses': 'list[str]',
+ 'freeform_tags': 'dict(str, str)',
+ 'defined_tags': 'dict(str, dict(str, object))',
+ 'lifecycle_state': 'str',
+ 'time_created': 'datetime'
+ }
+
+ self.attribute_map = {
+ 'id': 'id',
+ 'compartment_id': 'compartmentId',
+ 'display_name': 'displayName',
+ 'address_count': 'addressCount',
+ 'addresses': 'addresses',
+ 'freeform_tags': 'freeformTags',
+ 'defined_tags': 'definedTags',
+ 'lifecycle_state': 'lifecycleState',
+ 'time_created': 'timeCreated'
+ }
+
+ self._id = None
+ self._compartment_id = None
+ self._display_name = None
+ self._address_count = None
+ self._addresses = None
+ self._freeform_tags = None
+ self._defined_tags = None
+ self._lifecycle_state = None
+ self._time_created = None
+
+ @property
+ def id(self):
+ """
+ Gets the id of this AddressList.
+ The `OCID`__ of the address list.
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
+
+
+ :return: The id of this AddressList.
+ :rtype: str
+ """
+ return self._id
+
+ @id.setter
+ def id(self, id):
+ """
+ Sets the id of this AddressList.
+ The `OCID`__ of the address list.
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
+
+
+ :param id: The id of this AddressList.
+ :type: str
+ """
+ self._id = id
+
+ @property
+ def compartment_id(self):
+ """
+ Gets the compartment_id of this AddressList.
+ The `OCID`__ of the address list's compartment.
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
+
+
+ :return: The compartment_id of this AddressList.
+ :rtype: str
+ """
+ return self._compartment_id
+
+ @compartment_id.setter
+ def compartment_id(self, compartment_id):
+ """
+ Sets the compartment_id of this AddressList.
+ The `OCID`__ of the address list's compartment.
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
+
+
+ :param compartment_id: The compartment_id of this AddressList.
+ :type: str
+ """
+ self._compartment_id = compartment_id
+
+ @property
+ def display_name(self):
+ """
+ Gets the display_name of this AddressList.
+ The user-friendly name of the address list.
+
+
+ :return: The display_name of this AddressList.
+ :rtype: str
+ """
+ return self._display_name
+
+ @display_name.setter
+ def display_name(self, display_name):
+ """
+ Sets the display_name of this AddressList.
+ The user-friendly name of the address list.
+
+
+ :param display_name: The display_name of this AddressList.
+ :type: str
+ """
+ self._display_name = display_name
+
+ @property
+ def address_count(self):
+ """
+ Gets the address_count of this AddressList.
+ The total number of unique IP addresses in the address list.
+
+
+ :return: The address_count of this AddressList.
+ :rtype: float
+ """
+ return self._address_count
+
+ @address_count.setter
+ def address_count(self, address_count):
+ """
+ Sets the address_count of this AddressList.
+ The total number of unique IP addresses in the address list.
+
+
+ :param address_count: The address_count of this AddressList.
+ :type: float
+ """
+ self._address_count = address_count
+
+ @property
+ def addresses(self):
+ """
+ Gets the addresses of this AddressList.
+ The list of IP addresses or CIDR notations.
+
+
+ :return: The addresses of this AddressList.
+ :rtype: list[str]
+ """
+ return self._addresses
+
+ @addresses.setter
+ def addresses(self, addresses):
+ """
+ Sets the addresses of this AddressList.
+ The list of IP addresses or CIDR notations.
+
+
+ :param addresses: The addresses of this AddressList.
+ :type: list[str]
+ """
+ self._addresses = addresses
+
+ @property
+ def freeform_tags(self):
+ """
+ Gets the freeform_tags of this AddressList.
+ Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace.
+ For more information, see `Resource Tags`__.
+
+ Example: `{\"Department\": \"Finance\"}`
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm
+
+
+ :return: The freeform_tags of this AddressList.
+ :rtype: dict(str, str)
+ """
+ return self._freeform_tags
+
+ @freeform_tags.setter
+ def freeform_tags(self, freeform_tags):
+ """
+ Sets the freeform_tags of this AddressList.
+ Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace.
+ For more information, see `Resource Tags`__.
+
+ Example: `{\"Department\": \"Finance\"}`
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm
+
+
+ :param freeform_tags: The freeform_tags of this AddressList.
+ :type: dict(str, str)
+ """
+ self._freeform_tags = freeform_tags
+
+ @property
+ def defined_tags(self):
+ """
+ Gets the defined_tags of this AddressList.
+ Defined tags for this resource. Each key is predefined and scoped to a namespace.
+ For more information, see `Resource Tags`__.
+
+ Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm
+
+
+ :return: The defined_tags of this AddressList.
+ :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 AddressList.
+ Defined tags for this resource. Each key is predefined and scoped to a namespace.
+ For more information, see `Resource Tags`__.
+
+ Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm
+
+
+ :param defined_tags: The defined_tags of this AddressList.
+ :type: dict(str, dict(str, object))
+ """
+ self._defined_tags = defined_tags
+
+ @property
+ def lifecycle_state(self):
+ """
+ Gets the lifecycle_state of this AddressList.
+ The current lifecycle state of the address list.
+
+ Allowed values for this property are: "CREATING", "ACTIVE", "FAILED", "UPDATING", "DELETING", "DELETED", 'UNKNOWN_ENUM_VALUE'.
+ Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
+
+
+ :return: The lifecycle_state of this AddressList.
+ :rtype: str
+ """
+ return self._lifecycle_state
+
+ @lifecycle_state.setter
+ def lifecycle_state(self, lifecycle_state):
+ """
+ Sets the lifecycle_state of this AddressList.
+ The current lifecycle state of the address list.
+
+
+ :param lifecycle_state: The lifecycle_state of this AddressList.
+ :type: str
+ """
+ allowed_values = ["CREATING", "ACTIVE", "FAILED", "UPDATING", "DELETING", "DELETED"]
+ if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values):
+ lifecycle_state = 'UNKNOWN_ENUM_VALUE'
+ self._lifecycle_state = lifecycle_state
+
+ @property
+ def time_created(self):
+ """
+ Gets the time_created of this AddressList.
+ The date and time the address list was created, expressed in RFC 3339 timestamp format.
+
+
+ :return: The time_created of this AddressList.
+ :rtype: datetime
+ """
+ return self._time_created
+
+ @time_created.setter
+ def time_created(self, time_created):
+ """
+ Sets the time_created of this AddressList.
+ The date and time the address list was created, expressed in RFC 3339 timestamp format.
+
+
+ :param time_created: The time_created of this AddressList.
+ :type: datetime
+ """
+ self._time_created = time_created
+
+ def __repr__(self):
+ return formatted_flat_dict(self)
+
+ def __eq__(self, other):
+ if other is None:
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ return not self == other
diff --git a/src/oci/waas/models/address_list_summary.py b/src/oci/waas/models/address_list_summary.py
new file mode 100644
index 0000000000..fef06c90a1
--- /dev/null
+++ b/src/oci/waas/models/address_list_summary.py
@@ -0,0 +1,346 @@
+# coding: utf-8
+# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
+
+
+from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401
+from oci.decorators import init_model_state_from_kwargs
+
+
+@init_model_state_from_kwargs
+class AddressListSummary(object):
+ """
+ A summary of the address list's information.
+ """
+
+ #: A constant which can be used with the lifecycle_state property of a AddressListSummary.
+ #: This constant has a value of "CREATING"
+ LIFECYCLE_STATE_CREATING = "CREATING"
+
+ #: A constant which can be used with the lifecycle_state property of a AddressListSummary.
+ #: This constant has a value of "ACTIVE"
+ LIFECYCLE_STATE_ACTIVE = "ACTIVE"
+
+ #: A constant which can be used with the lifecycle_state property of a AddressListSummary.
+ #: This constant has a value of "FAILED"
+ LIFECYCLE_STATE_FAILED = "FAILED"
+
+ #: A constant which can be used with the lifecycle_state property of a AddressListSummary.
+ #: This constant has a value of "UPDATING"
+ LIFECYCLE_STATE_UPDATING = "UPDATING"
+
+ #: A constant which can be used with the lifecycle_state property of a AddressListSummary.
+ #: This constant has a value of "DELETING"
+ LIFECYCLE_STATE_DELETING = "DELETING"
+
+ #: A constant which can be used with the lifecycle_state property of a AddressListSummary.
+ #: This constant has a value of "DELETED"
+ LIFECYCLE_STATE_DELETED = "DELETED"
+
+ def __init__(self, **kwargs):
+ """
+ Initializes a new AddressListSummary 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 AddressListSummary.
+ :type id: str
+
+ :param compartment_id:
+ The value to assign to the compartment_id property of this AddressListSummary.
+ :type compartment_id: str
+
+ :param display_name:
+ The value to assign to the display_name property of this AddressListSummary.
+ :type display_name: str
+
+ :param address_count:
+ The value to assign to the address_count property of this AddressListSummary.
+ :type address_count: float
+
+ :param freeform_tags:
+ The value to assign to the freeform_tags property of this AddressListSummary.
+ :type freeform_tags: dict(str, str)
+
+ :param defined_tags:
+ The value to assign to the defined_tags property of this AddressListSummary.
+ :type defined_tags: dict(str, dict(str, object))
+
+ :param lifecycle_state:
+ The value to assign to the lifecycle_state property of this AddressListSummary.
+ Allowed values for this property are: "CREATING", "ACTIVE", "FAILED", "UPDATING", "DELETING", "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 AddressListSummary.
+ :type time_created: datetime
+
+ """
+ self.swagger_types = {
+ 'id': 'str',
+ 'compartment_id': 'str',
+ 'display_name': 'str',
+ 'address_count': 'float',
+ 'freeform_tags': 'dict(str, str)',
+ 'defined_tags': 'dict(str, dict(str, object))',
+ 'lifecycle_state': 'str',
+ 'time_created': 'datetime'
+ }
+
+ self.attribute_map = {
+ 'id': 'id',
+ 'compartment_id': 'compartmentId',
+ 'display_name': 'displayName',
+ 'address_count': 'addressCount',
+ 'freeform_tags': 'freeformTags',
+ 'defined_tags': 'definedTags',
+ 'lifecycle_state': 'lifecycleState',
+ 'time_created': 'timeCreated'
+ }
+
+ self._id = None
+ self._compartment_id = None
+ self._display_name = None
+ self._address_count = None
+ self._freeform_tags = None
+ self._defined_tags = None
+ self._lifecycle_state = None
+ self._time_created = None
+
+ @property
+ def id(self):
+ """
+ Gets the id of this AddressListSummary.
+ The `OCID`__ of the address list.
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
+
+
+ :return: The id of this AddressListSummary.
+ :rtype: str
+ """
+ return self._id
+
+ @id.setter
+ def id(self, id):
+ """
+ Sets the id of this AddressListSummary.
+ The `OCID`__ of the address list.
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
+
+
+ :param id: The id of this AddressListSummary.
+ :type: str
+ """
+ self._id = id
+
+ @property
+ def compartment_id(self):
+ """
+ Gets the compartment_id of this AddressListSummary.
+ The `OCID`__ of the address list's compartment.
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
+
+
+ :return: The compartment_id of this AddressListSummary.
+ :rtype: str
+ """
+ return self._compartment_id
+
+ @compartment_id.setter
+ def compartment_id(self, compartment_id):
+ """
+ Sets the compartment_id of this AddressListSummary.
+ The `OCID`__ of the address list's compartment.
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
+
+
+ :param compartment_id: The compartment_id of this AddressListSummary.
+ :type: str
+ """
+ self._compartment_id = compartment_id
+
+ @property
+ def display_name(self):
+ """
+ Gets the display_name of this AddressListSummary.
+ The user-friendly name of the address list.
+
+
+ :return: The display_name of this AddressListSummary.
+ :rtype: str
+ """
+ return self._display_name
+
+ @display_name.setter
+ def display_name(self, display_name):
+ """
+ Sets the display_name of this AddressListSummary.
+ The user-friendly name of the address list.
+
+
+ :param display_name: The display_name of this AddressListSummary.
+ :type: str
+ """
+ self._display_name = display_name
+
+ @property
+ def address_count(self):
+ """
+ Gets the address_count of this AddressListSummary.
+ The total number of unique IP addresses in the address list.
+
+
+ :return: The address_count of this AddressListSummary.
+ :rtype: float
+ """
+ return self._address_count
+
+ @address_count.setter
+ def address_count(self, address_count):
+ """
+ Sets the address_count of this AddressListSummary.
+ The total number of unique IP addresses in the address list.
+
+
+ :param address_count: The address_count of this AddressListSummary.
+ :type: float
+ """
+ self._address_count = address_count
+
+ @property
+ def freeform_tags(self):
+ """
+ Gets the freeform_tags of this AddressListSummary.
+ Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace.
+ For more information, see `Resource Tags`__.
+
+ Example: `{\"Department\": \"Finance\"}`
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm
+
+
+ :return: The freeform_tags of this AddressListSummary.
+ :rtype: dict(str, str)
+ """
+ return self._freeform_tags
+
+ @freeform_tags.setter
+ def freeform_tags(self, freeform_tags):
+ """
+ Sets the freeform_tags of this AddressListSummary.
+ Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace.
+ For more information, see `Resource Tags`__.
+
+ Example: `{\"Department\": \"Finance\"}`
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm
+
+
+ :param freeform_tags: The freeform_tags of this AddressListSummary.
+ :type: dict(str, str)
+ """
+ self._freeform_tags = freeform_tags
+
+ @property
+ def defined_tags(self):
+ """
+ Gets the defined_tags of this AddressListSummary.
+ Defined tags for this resource. Each key is predefined and scoped to a namespace.
+ For more information, see `Resource Tags`__.
+
+ Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm
+
+
+ :return: The defined_tags of this AddressListSummary.
+ :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 AddressListSummary.
+ Defined tags for this resource. Each key is predefined and scoped to a namespace.
+ For more information, see `Resource Tags`__.
+
+ Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm
+
+
+ :param defined_tags: The defined_tags of this AddressListSummary.
+ :type: dict(str, dict(str, object))
+ """
+ self._defined_tags = defined_tags
+
+ @property
+ def lifecycle_state(self):
+ """
+ Gets the lifecycle_state of this AddressListSummary.
+ The current lifecycle state of the address list.
+
+ Allowed values for this property are: "CREATING", "ACTIVE", "FAILED", "UPDATING", "DELETING", "DELETED", 'UNKNOWN_ENUM_VALUE'.
+ Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
+
+
+ :return: The lifecycle_state of this AddressListSummary.
+ :rtype: str
+ """
+ return self._lifecycle_state
+
+ @lifecycle_state.setter
+ def lifecycle_state(self, lifecycle_state):
+ """
+ Sets the lifecycle_state of this AddressListSummary.
+ The current lifecycle state of the address list.
+
+
+ :param lifecycle_state: The lifecycle_state of this AddressListSummary.
+ :type: str
+ """
+ allowed_values = ["CREATING", "ACTIVE", "FAILED", "UPDATING", "DELETING", "DELETED"]
+ if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values):
+ lifecycle_state = 'UNKNOWN_ENUM_VALUE'
+ self._lifecycle_state = lifecycle_state
+
+ @property
+ def time_created(self):
+ """
+ Gets the time_created of this AddressListSummary.
+ The date and time the address list was created, in the format defined by RFC3339.
+
+
+ :return: The time_created of this AddressListSummary.
+ :rtype: datetime
+ """
+ return self._time_created
+
+ @time_created.setter
+ def time_created(self, time_created):
+ """
+ Sets the time_created of this AddressListSummary.
+ The date and time the address list was created, in the format defined by RFC3339.
+
+
+ :param time_created: The time_created of this AddressListSummary.
+ :type: datetime
+ """
+ self._time_created = time_created
+
+ def __repr__(self):
+ return formatted_flat_dict(self)
+
+ def __eq__(self, other):
+ if other is None:
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ return not self == other
diff --git a/src/oci/waas/models/caching_rule.py b/src/oci/waas/models/caching_rule.py
new file mode 100644
index 0000000000..2f5e1552f3
--- /dev/null
+++ b/src/oci/waas/models/caching_rule.py
@@ -0,0 +1,281 @@
+# coding: utf-8
+# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
+
+
+from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401
+from oci.decorators import init_model_state_from_kwargs
+
+
+@init_model_state_from_kwargs
+class CachingRule(object):
+ """
+ CachingRule model.
+ """
+
+ #: A constant which can be used with the action property of a CachingRule.
+ #: This constant has a value of "CACHE"
+ ACTION_CACHE = "CACHE"
+
+ #: A constant which can be used with the action property of a CachingRule.
+ #: This constant has a value of "BYPASS_CACHE"
+ ACTION_BYPASS_CACHE = "BYPASS_CACHE"
+
+ def __init__(self, **kwargs):
+ """
+ Initializes a new CachingRule 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 CachingRule.
+ :type key: str
+
+ :param name:
+ The value to assign to the name property of this CachingRule.
+ :type name: str
+
+ :param action:
+ The value to assign to the action property of this CachingRule.
+ Allowed values for this property are: "CACHE", "BYPASS_CACHE", 'UNKNOWN_ENUM_VALUE'.
+ Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
+ :type action: str
+
+ :param caching_duration:
+ The value to assign to the caching_duration property of this CachingRule.
+ :type caching_duration: str
+
+ :param is_client_caching_enabled:
+ The value to assign to the is_client_caching_enabled property of this CachingRule.
+ :type is_client_caching_enabled: bool
+
+ :param client_caching_duration:
+ The value to assign to the client_caching_duration property of this CachingRule.
+ :type client_caching_duration: str
+
+ :param criteria:
+ The value to assign to the criteria property of this CachingRule.
+ :type criteria: list[CachingRuleCriteria]
+
+ """
+ self.swagger_types = {
+ 'key': 'str',
+ 'name': 'str',
+ 'action': 'str',
+ 'caching_duration': 'str',
+ 'is_client_caching_enabled': 'bool',
+ 'client_caching_duration': 'str',
+ 'criteria': 'list[CachingRuleCriteria]'
+ }
+
+ self.attribute_map = {
+ 'key': 'key',
+ 'name': 'name',
+ 'action': 'action',
+ 'caching_duration': 'cachingDuration',
+ 'is_client_caching_enabled': 'isClientCachingEnabled',
+ 'client_caching_duration': 'clientCachingDuration',
+ 'criteria': 'criteria'
+ }
+
+ self._key = None
+ self._name = None
+ self._action = None
+ self._caching_duration = None
+ self._is_client_caching_enabled = None
+ self._client_caching_duration = None
+ self._criteria = None
+
+ @property
+ def key(self):
+ """
+ Gets the key of this CachingRule.
+ The unique key for the caching rule.
+
+
+ :return: The key of this CachingRule.
+ :rtype: str
+ """
+ return self._key
+
+ @key.setter
+ def key(self, key):
+ """
+ Sets the key of this CachingRule.
+ The unique key for the caching rule.
+
+
+ :param key: The key of this CachingRule.
+ :type: str
+ """
+ self._key = key
+
+ @property
+ def name(self):
+ """
+ **[Required]** Gets the name of this CachingRule.
+ The name of the caching rule.
+
+
+ :return: The name of this CachingRule.
+ :rtype: str
+ """
+ return self._name
+
+ @name.setter
+ def name(self, name):
+ """
+ Sets the name of this CachingRule.
+ The name of the caching rule.
+
+
+ :param name: The name of this CachingRule.
+ :type: str
+ """
+ self._name = name
+
+ @property
+ def action(self):
+ """
+ **[Required]** Gets the action of this CachingRule.
+ The action to take on matched caching rules.
+ - **CACHE:** Allow to set caching rule, which would be cached.
+
+ - **BYPASS_CACHE:** Allow to set caching rule, which would never be cached. e.g. all requests would be passed directly to origin for those file types.
+
+ Allowed values for this property are: "CACHE", "BYPASS_CACHE", 'UNKNOWN_ENUM_VALUE'.
+ Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
+
+
+ :return: The action of this CachingRule.
+ :rtype: str
+ """
+ return self._action
+
+ @action.setter
+ def action(self, action):
+ """
+ Sets the action of this CachingRule.
+ The action to take on matched caching rules.
+ - **CACHE:** Allow to set caching rule, which would be cached.
+
+ - **BYPASS_CACHE:** Allow to set caching rule, which would never be cached. e.g. all requests would be passed directly to origin for those file types.
+
+
+ :param action: The action of this CachingRule.
+ :type: str
+ """
+ allowed_values = ["CACHE", "BYPASS_CACHE"]
+ if not value_allowed_none_or_none_sentinel(action, allowed_values):
+ action = 'UNKNOWN_ENUM_VALUE'
+ self._action = action
+
+ @property
+ def caching_duration(self):
+ """
+ Gets the caching_duration of this CachingRule.
+ The caching duration (applies only to `CACHE` action) specified in ISO 8601 extended format. Supported units: seconds, minutes, hours, days, weeks, months. Max value - 99. Mixing of multiple units is not supported.
+
+
+ :return: The caching_duration of this CachingRule.
+ :rtype: str
+ """
+ return self._caching_duration
+
+ @caching_duration.setter
+ def caching_duration(self, caching_duration):
+ """
+ Sets the caching_duration of this CachingRule.
+ The caching duration (applies only to `CACHE` action) specified in ISO 8601 extended format. Supported units: seconds, minutes, hours, days, weeks, months. Max value - 99. Mixing of multiple units is not supported.
+
+
+ :param caching_duration: The caching_duration of this CachingRule.
+ :type: str
+ """
+ self._caching_duration = caching_duration
+
+ @property
+ def is_client_caching_enabled(self):
+ """
+ Gets the is_client_caching_enabled of this CachingRule.
+ Enables or disables the client caching.
+ Browsers use the Cache-Control header value for caching content locally, in the browser.
+ This setting will control the addition of a Cache-Control header to responses. It overrides existing Cache-Control headers.
+
+
+ :return: The is_client_caching_enabled of this CachingRule.
+ :rtype: bool
+ """
+ return self._is_client_caching_enabled
+
+ @is_client_caching_enabled.setter
+ def is_client_caching_enabled(self, is_client_caching_enabled):
+ """
+ Sets the is_client_caching_enabled of this CachingRule.
+ Enables or disables the client caching.
+ Browsers use the Cache-Control header value for caching content locally, in the browser.
+ This setting will control the addition of a Cache-Control header to responses. It overrides existing Cache-Control headers.
+
+
+ :param is_client_caching_enabled: The is_client_caching_enabled of this CachingRule.
+ :type: bool
+ """
+ self._is_client_caching_enabled = is_client_caching_enabled
+
+ @property
+ def client_caching_duration(self):
+ """
+ Gets the client_caching_duration of this CachingRule.
+ The client caching duration (applies only to `CACHE` action) specified in ISO 8601 extended format, in case client caching enabled. It sets Cache-Control header max-age time, i.e. the local browser cache expire time. Supported units: seconds, minutes, hours, days, weeks, months. Max value - 99. Mixing of multiple units is not supported.
+
+
+ :return: The client_caching_duration of this CachingRule.
+ :rtype: str
+ """
+ return self._client_caching_duration
+
+ @client_caching_duration.setter
+ def client_caching_duration(self, client_caching_duration):
+ """
+ Sets the client_caching_duration of this CachingRule.
+ The client caching duration (applies only to `CACHE` action) specified in ISO 8601 extended format, in case client caching enabled. It sets Cache-Control header max-age time, i.e. the local browser cache expire time. Supported units: seconds, minutes, hours, days, weeks, months. Max value - 99. Mixing of multiple units is not supported.
+
+
+ :param client_caching_duration: The client_caching_duration of this CachingRule.
+ :type: str
+ """
+ self._client_caching_duration = client_caching_duration
+
+ @property
+ def criteria(self):
+ """
+ **[Required]** Gets the criteria of this CachingRule.
+ The array of the rule criteria with condition and value.
+
+
+ :return: The criteria of this CachingRule.
+ :rtype: list[CachingRuleCriteria]
+ """
+ return self._criteria
+
+ @criteria.setter
+ def criteria(self, criteria):
+ """
+ Sets the criteria of this CachingRule.
+ The array of the rule criteria with condition and value.
+
+
+ :param criteria: The criteria of this CachingRule.
+ :type: list[CachingRuleCriteria]
+ """
+ self._criteria = criteria
+
+ 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/waas/models/caching_rule_criteria.py b/src/oci/waas/models/caching_rule_criteria.py
new file mode 100644
index 0000000000..c54aee74ab
--- /dev/null
+++ b/src/oci/waas/models/caching_rule_criteria.py
@@ -0,0 +1,150 @@
+# coding: utf-8
+# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
+
+
+from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401
+from oci.decorators import init_model_state_from_kwargs
+
+
+@init_model_state_from_kwargs
+class CachingRuleCriteria(object):
+ """
+ A caching rule criteria condition and value.
+ """
+
+ #: A constant which can be used with the condition property of a CachingRuleCriteria.
+ #: This constant has a value of "URL_IS"
+ CONDITION_URL_IS = "URL_IS"
+
+ #: A constant which can be used with the condition property of a CachingRuleCriteria.
+ #: This constant has a value of "URL_STARTS_WITH"
+ CONDITION_URL_STARTS_WITH = "URL_STARTS_WITH"
+
+ #: A constant which can be used with the condition property of a CachingRuleCriteria.
+ #: This constant has a value of "URL_PART_ENDS_WITH"
+ CONDITION_URL_PART_ENDS_WITH = "URL_PART_ENDS_WITH"
+
+ #: A constant which can be used with the condition property of a CachingRuleCriteria.
+ #: This constant has a value of "URL_PART_CONTAINS"
+ CONDITION_URL_PART_CONTAINS = "URL_PART_CONTAINS"
+
+ def __init__(self, **kwargs):
+ """
+ Initializes a new CachingRuleCriteria object with values from keyword arguments.
+ The following keyword arguments are supported (corresponding to the getters/setters of this class):
+
+ :param condition:
+ The value to assign to the condition property of this CachingRuleCriteria.
+ Allowed values for this property are: "URL_IS", "URL_STARTS_WITH", "URL_PART_ENDS_WITH", "URL_PART_CONTAINS", 'UNKNOWN_ENUM_VALUE'.
+ Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
+ :type condition: str
+
+ :param value:
+ The value to assign to the value property of this CachingRuleCriteria.
+ :type value: str
+
+ """
+ self.swagger_types = {
+ 'condition': 'str',
+ 'value': 'str'
+ }
+
+ self.attribute_map = {
+ 'condition': 'condition',
+ 'value': 'value'
+ }
+
+ self._condition = None
+ self._value = None
+
+ @property
+ def condition(self):
+ """
+ **[Required]** Gets the condition of this CachingRuleCriteria.
+ The condition of the caching rule criteria.
+ - **URL_IS:** Matches if the concatenation of request URL path and query is identical to the contents of the `value` field.
+
+ - **URL_STARTS_WITH:** Matches if the concatenation of request URL path and query starts with the contents of the `value` field.
+
+ - **URL_PART_ENDS_WITH:** Matches if the concatenation of request URL path and query ends with the contents of the `value` field.
+
+ - **URL_PART_CONTAINS:** Matches if the concatenation of request URL path and query contains the contents of the `value` field.
+
+ URL must start with /
+
+ URL can't contain restricted double slashes //
+
+ URL can't contain restricted ' & ? symbols
+
+ Allowed values for this property are: "URL_IS", "URL_STARTS_WITH", "URL_PART_ENDS_WITH", "URL_PART_CONTAINS", 'UNKNOWN_ENUM_VALUE'.
+ Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
+
+
+ :return: The condition of this CachingRuleCriteria.
+ :rtype: str
+ """
+ return self._condition
+
+ @condition.setter
+ def condition(self, condition):
+ """
+ Sets the condition of this CachingRuleCriteria.
+ The condition of the caching rule criteria.
+ - **URL_IS:** Matches if the concatenation of request URL path and query is identical to the contents of the `value` field.
+
+ - **URL_STARTS_WITH:** Matches if the concatenation of request URL path and query starts with the contents of the `value` field.
+
+ - **URL_PART_ENDS_WITH:** Matches if the concatenation of request URL path and query ends with the contents of the `value` field.
+
+ - **URL_PART_CONTAINS:** Matches if the concatenation of request URL path and query contains the contents of the `value` field.
+
+ URL must start with /
+
+ URL can't contain restricted double slashes //
+
+ URL can't contain restricted ' & ? symbols
+
+
+ :param condition: The condition of this CachingRuleCriteria.
+ :type: str
+ """
+ allowed_values = ["URL_IS", "URL_STARTS_WITH", "URL_PART_ENDS_WITH", "URL_PART_CONTAINS"]
+ if not value_allowed_none_or_none_sentinel(condition, allowed_values):
+ condition = 'UNKNOWN_ENUM_VALUE'
+ self._condition = condition
+
+ @property
+ def value(self):
+ """
+ **[Required]** Gets the value of this CachingRuleCriteria.
+ The value of the caching rule criteria.
+
+
+ :return: The value of this CachingRuleCriteria.
+ :rtype: str
+ """
+ return self._value
+
+ @value.setter
+ def value(self, value):
+ """
+ Sets the value of this CachingRuleCriteria.
+ The value of the caching rule criteria.
+
+
+ :param value: The value of this CachingRuleCriteria.
+ :type: str
+ """
+ self._value = value
+
+ def __repr__(self):
+ return formatted_flat_dict(self)
+
+ def __eq__(self, other):
+ if other is None:
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ return not self == other
diff --git a/src/oci/waas/models/caching_rule_summary.py b/src/oci/waas/models/caching_rule_summary.py
new file mode 100644
index 0000000000..34b789a677
--- /dev/null
+++ b/src/oci/waas/models/caching_rule_summary.py
@@ -0,0 +1,281 @@
+# coding: utf-8
+# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
+
+
+from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401
+from oci.decorators import init_model_state_from_kwargs
+
+
+@init_model_state_from_kwargs
+class CachingRuleSummary(object):
+ """
+ The caching rule settings.
+ """
+
+ #: A constant which can be used with the action property of a CachingRuleSummary.
+ #: This constant has a value of "CACHE"
+ ACTION_CACHE = "CACHE"
+
+ #: A constant which can be used with the action property of a CachingRuleSummary.
+ #: This constant has a value of "BYPASS_CACHE"
+ ACTION_BYPASS_CACHE = "BYPASS_CACHE"
+
+ def __init__(self, **kwargs):
+ """
+ Initializes a new CachingRuleSummary 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 CachingRuleSummary.
+ :type key: str
+
+ :param name:
+ The value to assign to the name property of this CachingRuleSummary.
+ :type name: str
+
+ :param action:
+ The value to assign to the action property of this CachingRuleSummary.
+ Allowed values for this property are: "CACHE", "BYPASS_CACHE", 'UNKNOWN_ENUM_VALUE'.
+ Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
+ :type action: str
+
+ :param caching_duration:
+ The value to assign to the caching_duration property of this CachingRuleSummary.
+ :type caching_duration: str
+
+ :param is_client_caching_enabled:
+ The value to assign to the is_client_caching_enabled property of this CachingRuleSummary.
+ :type is_client_caching_enabled: bool
+
+ :param client_caching_duration:
+ The value to assign to the client_caching_duration property of this CachingRuleSummary.
+ :type client_caching_duration: str
+
+ :param criteria:
+ The value to assign to the criteria property of this CachingRuleSummary.
+ :type criteria: list[CachingRuleCriteria]
+
+ """
+ self.swagger_types = {
+ 'key': 'str',
+ 'name': 'str',
+ 'action': 'str',
+ 'caching_duration': 'str',
+ 'is_client_caching_enabled': 'bool',
+ 'client_caching_duration': 'str',
+ 'criteria': 'list[CachingRuleCriteria]'
+ }
+
+ self.attribute_map = {
+ 'key': 'key',
+ 'name': 'name',
+ 'action': 'action',
+ 'caching_duration': 'cachingDuration',
+ 'is_client_caching_enabled': 'isClientCachingEnabled',
+ 'client_caching_duration': 'clientCachingDuration',
+ 'criteria': 'criteria'
+ }
+
+ self._key = None
+ self._name = None
+ self._action = None
+ self._caching_duration = None
+ self._is_client_caching_enabled = None
+ self._client_caching_duration = None
+ self._criteria = None
+
+ @property
+ def key(self):
+ """
+ Gets the key of this CachingRuleSummary.
+ The unique key for the caching rule.
+
+
+ :return: The key of this CachingRuleSummary.
+ :rtype: str
+ """
+ return self._key
+
+ @key.setter
+ def key(self, key):
+ """
+ Sets the key of this CachingRuleSummary.
+ The unique key for the caching rule.
+
+
+ :param key: The key of this CachingRuleSummary.
+ :type: str
+ """
+ self._key = key
+
+ @property
+ def name(self):
+ """
+ **[Required]** Gets the name of this CachingRuleSummary.
+ The name of the caching rule.
+
+
+ :return: The name of this CachingRuleSummary.
+ :rtype: str
+ """
+ return self._name
+
+ @name.setter
+ def name(self, name):
+ """
+ Sets the name of this CachingRuleSummary.
+ The name of the caching rule.
+
+
+ :param name: The name of this CachingRuleSummary.
+ :type: str
+ """
+ self._name = name
+
+ @property
+ def action(self):
+ """
+ **[Required]** Gets the action of this CachingRuleSummary.
+ The action to take on matched caching rules.
+ - **CACHE:** Allow to set caching rule, which would be cached.
+
+ - **BYPASS_CACHE:** Allow to set caching rule, which would never be cached. e.g. all requests would be passed directly to origin for those file types.
+
+ Allowed values for this property are: "CACHE", "BYPASS_CACHE", 'UNKNOWN_ENUM_VALUE'.
+ Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
+
+
+ :return: The action of this CachingRuleSummary.
+ :rtype: str
+ """
+ return self._action
+
+ @action.setter
+ def action(self, action):
+ """
+ Sets the action of this CachingRuleSummary.
+ The action to take on matched caching rules.
+ - **CACHE:** Allow to set caching rule, which would be cached.
+
+ - **BYPASS_CACHE:** Allow to set caching rule, which would never be cached. e.g. all requests would be passed directly to origin for those file types.
+
+
+ :param action: The action of this CachingRuleSummary.
+ :type: str
+ """
+ allowed_values = ["CACHE", "BYPASS_CACHE"]
+ if not value_allowed_none_or_none_sentinel(action, allowed_values):
+ action = 'UNKNOWN_ENUM_VALUE'
+ self._action = action
+
+ @property
+ def caching_duration(self):
+ """
+ Gets the caching_duration of this CachingRuleSummary.
+ The caching duration (applies only to `CACHE` action) specified in ISO 8601 extended format. Supported units: seconds, minutes, hours, days, weeks, months. Max value - 99. Mixing of multiple units is not supported.
+
+
+ :return: The caching_duration of this CachingRuleSummary.
+ :rtype: str
+ """
+ return self._caching_duration
+
+ @caching_duration.setter
+ def caching_duration(self, caching_duration):
+ """
+ Sets the caching_duration of this CachingRuleSummary.
+ The caching duration (applies only to `CACHE` action) specified in ISO 8601 extended format. Supported units: seconds, minutes, hours, days, weeks, months. Max value - 99. Mixing of multiple units is not supported.
+
+
+ :param caching_duration: The caching_duration of this CachingRuleSummary.
+ :type: str
+ """
+ self._caching_duration = caching_duration
+
+ @property
+ def is_client_caching_enabled(self):
+ """
+ Gets the is_client_caching_enabled of this CachingRuleSummary.
+ Enables or disables the client caching.
+ Browsers use the Cache-Control header value for caching content locally, in the browser.
+ This setting will control the addition of a Cache-Control header to responses. It overrides existing Cache-Control headers.
+
+
+ :return: The is_client_caching_enabled of this CachingRuleSummary.
+ :rtype: bool
+ """
+ return self._is_client_caching_enabled
+
+ @is_client_caching_enabled.setter
+ def is_client_caching_enabled(self, is_client_caching_enabled):
+ """
+ Sets the is_client_caching_enabled of this CachingRuleSummary.
+ Enables or disables the client caching.
+ Browsers use the Cache-Control header value for caching content locally, in the browser.
+ This setting will control the addition of a Cache-Control header to responses. It overrides existing Cache-Control headers.
+
+
+ :param is_client_caching_enabled: The is_client_caching_enabled of this CachingRuleSummary.
+ :type: bool
+ """
+ self._is_client_caching_enabled = is_client_caching_enabled
+
+ @property
+ def client_caching_duration(self):
+ """
+ Gets the client_caching_duration of this CachingRuleSummary.
+ The client caching duration (applies only to `CACHE` action) specified in ISO 8601 extended format, in case client caching enabled. It sets Cache-Control header max-age time, i.e. the local browser cache expire time. Supported units: seconds, minutes, hours, days, weeks, months. Max value - 99. Mixing of multiple units is not supported.
+
+
+ :return: The client_caching_duration of this CachingRuleSummary.
+ :rtype: str
+ """
+ return self._client_caching_duration
+
+ @client_caching_duration.setter
+ def client_caching_duration(self, client_caching_duration):
+ """
+ Sets the client_caching_duration of this CachingRuleSummary.
+ The client caching duration (applies only to `CACHE` action) specified in ISO 8601 extended format, in case client caching enabled. It sets Cache-Control header max-age time, i.e. the local browser cache expire time. Supported units: seconds, minutes, hours, days, weeks, months. Max value - 99. Mixing of multiple units is not supported.
+
+
+ :param client_caching_duration: The client_caching_duration of this CachingRuleSummary.
+ :type: str
+ """
+ self._client_caching_duration = client_caching_duration
+
+ @property
+ def criteria(self):
+ """
+ **[Required]** Gets the criteria of this CachingRuleSummary.
+ The array of the rule criteria with condition and value.
+
+
+ :return: The criteria of this CachingRuleSummary.
+ :rtype: list[CachingRuleCriteria]
+ """
+ return self._criteria
+
+ @criteria.setter
+ def criteria(self, criteria):
+ """
+ Sets the criteria of this CachingRuleSummary.
+ The array of the rule criteria with condition and value.
+
+
+ :param criteria: The criteria of this CachingRuleSummary.
+ :type: list[CachingRuleCriteria]
+ """
+ self._criteria = criteria
+
+ 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/waas/models/change_address_list_compartment_details.py b/src/oci/waas/models/change_address_list_compartment_details.py
new file mode 100644
index 0000000000..7943e315e8
--- /dev/null
+++ b/src/oci/waas/models/change_address_list_compartment_details.py
@@ -0,0 +1,73 @@
+# coding: utf-8
+# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
+
+
+from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401
+from oci.decorators import init_model_state_from_kwargs
+
+
+@init_model_state_from_kwargs
+class ChangeAddressListCompartmentDetails(object):
+ """
+ ChangeAddressListCompartmentDetails model.
+ """
+
+ def __init__(self, **kwargs):
+ """
+ Initializes a new ChangeAddressListCompartmentDetails 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 ChangeAddressListCompartmentDetails.
+ :type compartment_id: str
+
+ """
+ self.swagger_types = {
+ 'compartment_id': 'str'
+ }
+
+ self.attribute_map = {
+ 'compartment_id': 'compartmentId'
+ }
+
+ self._compartment_id = None
+
+ @property
+ def compartment_id(self):
+ """
+ **[Required]** Gets the compartment_id of this ChangeAddressListCompartmentDetails.
+ The `OCID`__ of the compartment into which the resource should be moved.
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
+
+
+ :return: The compartment_id of this ChangeAddressListCompartmentDetails.
+ :rtype: str
+ """
+ return self._compartment_id
+
+ @compartment_id.setter
+ def compartment_id(self, compartment_id):
+ """
+ Sets the compartment_id of this ChangeAddressListCompartmentDetails.
+ The `OCID`__ of the compartment into which the resource should be moved.
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
+
+
+ :param compartment_id: The compartment_id of this ChangeAddressListCompartmentDetails.
+ :type: str
+ """
+ self._compartment_id = compartment_id
+
+ def __repr__(self):
+ return formatted_flat_dict(self)
+
+ def __eq__(self, other):
+ if other is None:
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ return not self == other
diff --git a/src/oci/waas/models/change_custom_protection_rule_compartment_details.py b/src/oci/waas/models/change_custom_protection_rule_compartment_details.py
new file mode 100644
index 0000000000..796fc07242
--- /dev/null
+++ b/src/oci/waas/models/change_custom_protection_rule_compartment_details.py
@@ -0,0 +1,73 @@
+# coding: utf-8
+# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
+
+
+from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401
+from oci.decorators import init_model_state_from_kwargs
+
+
+@init_model_state_from_kwargs
+class ChangeCustomProtectionRuleCompartmentDetails(object):
+ """
+ ChangeCustomProtectionRuleCompartmentDetails model.
+ """
+
+ def __init__(self, **kwargs):
+ """
+ Initializes a new ChangeCustomProtectionRuleCompartmentDetails 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 ChangeCustomProtectionRuleCompartmentDetails.
+ :type compartment_id: str
+
+ """
+ self.swagger_types = {
+ 'compartment_id': 'str'
+ }
+
+ self.attribute_map = {
+ 'compartment_id': 'compartmentId'
+ }
+
+ self._compartment_id = None
+
+ @property
+ def compartment_id(self):
+ """
+ **[Required]** Gets the compartment_id of this ChangeCustomProtectionRuleCompartmentDetails.
+ The `OCID`__ of the compartment into which the resource should be moved.
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
+
+
+ :return: The compartment_id of this ChangeCustomProtectionRuleCompartmentDetails.
+ :rtype: str
+ """
+ return self._compartment_id
+
+ @compartment_id.setter
+ def compartment_id(self, compartment_id):
+ """
+ Sets the compartment_id of this ChangeCustomProtectionRuleCompartmentDetails.
+ The `OCID`__ of the compartment into which the resource should be moved.
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
+
+
+ :param compartment_id: The compartment_id of this ChangeCustomProtectionRuleCompartmentDetails.
+ :type: str
+ """
+ self._compartment_id = compartment_id
+
+ def __repr__(self):
+ return formatted_flat_dict(self)
+
+ def __eq__(self, other):
+ if other is None:
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ return not self == other
diff --git a/src/oci/waas/models/create_address_list_details.py b/src/oci/waas/models/create_address_list_details.py
new file mode 100644
index 0000000000..118b2958b0
--- /dev/null
+++ b/src/oci/waas/models/create_address_list_details.py
@@ -0,0 +1,217 @@
+# coding: utf-8
+# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
+
+
+from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401
+from oci.decorators import init_model_state_from_kwargs
+
+
+@init_model_state_from_kwargs
+class CreateAddressListDetails(object):
+ """
+ The data used to create a new address list.
+ """
+
+ def __init__(self, **kwargs):
+ """
+ Initializes a new CreateAddressListDetails 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 CreateAddressListDetails.
+ :type compartment_id: str
+
+ :param display_name:
+ The value to assign to the display_name property of this CreateAddressListDetails.
+ :type display_name: str
+
+ :param addresses:
+ The value to assign to the addresses property of this CreateAddressListDetails.
+ :type addresses: list[str]
+
+ :param freeform_tags:
+ The value to assign to the freeform_tags property of this CreateAddressListDetails.
+ :type freeform_tags: dict(str, str)
+
+ :param defined_tags:
+ The value to assign to the defined_tags property of this CreateAddressListDetails.
+ :type defined_tags: dict(str, dict(str, object))
+
+ """
+ self.swagger_types = {
+ 'compartment_id': 'str',
+ 'display_name': 'str',
+ 'addresses': 'list[str]',
+ 'freeform_tags': 'dict(str, str)',
+ 'defined_tags': 'dict(str, dict(str, object))'
+ }
+
+ self.attribute_map = {
+ 'compartment_id': 'compartmentId',
+ 'display_name': 'displayName',
+ 'addresses': 'addresses',
+ 'freeform_tags': 'freeformTags',
+ 'defined_tags': 'definedTags'
+ }
+
+ self._compartment_id = None
+ self._display_name = None
+ self._addresses = None
+ self._freeform_tags = None
+ self._defined_tags = None
+
+ @property
+ def compartment_id(self):
+ """
+ **[Required]** Gets the compartment_id of this CreateAddressListDetails.
+ The `OCID`__ of the compartment in which to create the address list.
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
+
+
+ :return: The compartment_id of this CreateAddressListDetails.
+ :rtype: str
+ """
+ return self._compartment_id
+
+ @compartment_id.setter
+ def compartment_id(self, compartment_id):
+ """
+ Sets the compartment_id of this CreateAddressListDetails.
+ The `OCID`__ of the compartment in which to create the address list.
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
+
+
+ :param compartment_id: The compartment_id of this CreateAddressListDetails.
+ :type: str
+ """
+ self._compartment_id = compartment_id
+
+ @property
+ def display_name(self):
+ """
+ **[Required]** Gets the display_name of this CreateAddressListDetails.
+ A unique user-friendly name for the address list.
+
+
+ :return: The display_name of this CreateAddressListDetails.
+ :rtype: str
+ """
+ return self._display_name
+
+ @display_name.setter
+ def display_name(self, display_name):
+ """
+ Sets the display_name of this CreateAddressListDetails.
+ A unique user-friendly name for the address list.
+
+
+ :param display_name: The display_name of this CreateAddressListDetails.
+ :type: str
+ """
+ self._display_name = display_name
+
+ @property
+ def addresses(self):
+ """
+ **[Required]** Gets the addresses of this CreateAddressListDetails.
+ A list of IP addresses or CIDR notations.
+
+
+ :return: The addresses of this CreateAddressListDetails.
+ :rtype: list[str]
+ """
+ return self._addresses
+
+ @addresses.setter
+ def addresses(self, addresses):
+ """
+ Sets the addresses of this CreateAddressListDetails.
+ A list of IP addresses or CIDR notations.
+
+
+ :param addresses: The addresses of this CreateAddressListDetails.
+ :type: list[str]
+ """
+ self._addresses = addresses
+
+ @property
+ def freeform_tags(self):
+ """
+ Gets the freeform_tags of this CreateAddressListDetails.
+ Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace.
+ For more information, see `Resource Tags`__.
+
+ Example: `{\"Department\": \"Finance\"}`
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm
+
+
+ :return: The freeform_tags of this CreateAddressListDetails.
+ :rtype: dict(str, str)
+ """
+ return self._freeform_tags
+
+ @freeform_tags.setter
+ def freeform_tags(self, freeform_tags):
+ """
+ Sets the freeform_tags of this CreateAddressListDetails.
+ Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace.
+ For more information, see `Resource Tags`__.
+
+ Example: `{\"Department\": \"Finance\"}`
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm
+
+
+ :param freeform_tags: The freeform_tags of this CreateAddressListDetails.
+ :type: dict(str, str)
+ """
+ self._freeform_tags = freeform_tags
+
+ @property
+ def defined_tags(self):
+ """
+ Gets the defined_tags of this CreateAddressListDetails.
+ Defined tags for this resource. Each key is predefined and scoped to a namespace.
+ For more information, see `Resource Tags`__.
+
+ Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm
+
+
+ :return: The defined_tags of this CreateAddressListDetails.
+ :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 CreateAddressListDetails.
+ Defined tags for this resource. Each key is predefined and scoped to a namespace.
+ For more information, see `Resource Tags`__.
+
+ Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm
+
+
+ :param defined_tags: The defined_tags of this CreateAddressListDetails.
+ :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/waas/models/create_custom_protection_rule_details.py b/src/oci/waas/models/create_custom_protection_rule_details.py
new file mode 100644
index 0000000000..a1099761a4
--- /dev/null
+++ b/src/oci/waas/models/create_custom_protection_rule_details.py
@@ -0,0 +1,307 @@
+# coding: utf-8
+# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
+
+
+from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401
+from oci.decorators import init_model_state_from_kwargs
+
+
+@init_model_state_from_kwargs
+class CreateCustomProtectionRuleDetails(object):
+ """
+ The required data to create a Custom Protection rule.
+ **Warning:** Oracle recommends that you avoid using any confidential information when you supply string values using the API.
+ """
+
+ def __init__(self, **kwargs):
+ """
+ Initializes a new CreateCustomProtectionRuleDetails 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 CreateCustomProtectionRuleDetails.
+ :type compartment_id: str
+
+ :param display_name:
+ The value to assign to the display_name property of this CreateCustomProtectionRuleDetails.
+ :type display_name: str
+
+ :param description:
+ The value to assign to the description property of this CreateCustomProtectionRuleDetails.
+ :type description: str
+
+ :param template:
+ The value to assign to the template property of this CreateCustomProtectionRuleDetails.
+ :type template: str
+
+ :param freeform_tags:
+ The value to assign to the freeform_tags property of this CreateCustomProtectionRuleDetails.
+ :type freeform_tags: dict(str, str)
+
+ :param defined_tags:
+ The value to assign to the defined_tags property of this CreateCustomProtectionRuleDetails.
+ :type defined_tags: dict(str, dict(str, object))
+
+ """
+ self.swagger_types = {
+ 'compartment_id': 'str',
+ 'display_name': 'str',
+ 'description': 'str',
+ 'template': 'str',
+ 'freeform_tags': 'dict(str, str)',
+ 'defined_tags': 'dict(str, dict(str, object))'
+ }
+
+ self.attribute_map = {
+ 'compartment_id': 'compartmentId',
+ 'display_name': 'displayName',
+ 'description': 'description',
+ 'template': 'template',
+ 'freeform_tags': 'freeformTags',
+ 'defined_tags': 'definedTags'
+ }
+
+ self._compartment_id = None
+ self._display_name = None
+ self._description = None
+ self._template = None
+ self._freeform_tags = None
+ self._defined_tags = None
+
+ @property
+ def compartment_id(self):
+ """
+ **[Required]** Gets the compartment_id of this CreateCustomProtectionRuleDetails.
+ The `OCID`__ of the compartment in which to create the Custom Protection rule.
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
+
+
+ :return: The compartment_id of this CreateCustomProtectionRuleDetails.
+ :rtype: str
+ """
+ return self._compartment_id
+
+ @compartment_id.setter
+ def compartment_id(self, compartment_id):
+ """
+ Sets the compartment_id of this CreateCustomProtectionRuleDetails.
+ The `OCID`__ of the compartment in which to create the Custom Protection rule.
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
+
+
+ :param compartment_id: The compartment_id of this CreateCustomProtectionRuleDetails.
+ :type: str
+ """
+ self._compartment_id = compartment_id
+
+ @property
+ def display_name(self):
+ """
+ **[Required]** Gets the display_name of this CreateCustomProtectionRuleDetails.
+ A user-friendly name for the Custom Protection rule.
+
+
+ :return: The display_name of this CreateCustomProtectionRuleDetails.
+ :rtype: str
+ """
+ return self._display_name
+
+ @display_name.setter
+ def display_name(self, display_name):
+ """
+ Sets the display_name of this CreateCustomProtectionRuleDetails.
+ A user-friendly name for the Custom Protection rule.
+
+
+ :param display_name: The display_name of this CreateCustomProtectionRuleDetails.
+ :type: str
+ """
+ self._display_name = display_name
+
+ @property
+ def description(self):
+ """
+ Gets the description of this CreateCustomProtectionRuleDetails.
+ A description for the Custom Protection rule.
+
+
+ :return: The description of this CreateCustomProtectionRuleDetails.
+ :rtype: str
+ """
+ return self._description
+
+ @description.setter
+ def description(self, description):
+ """
+ Sets the description of this CreateCustomProtectionRuleDetails.
+ A description for the Custom Protection rule.
+
+
+ :param description: The description of this CreateCustomProtectionRuleDetails.
+ :type: str
+ """
+ self._description = description
+
+ @property
+ def template(self):
+ """
+ **[Required]** Gets the template of this CreateCustomProtectionRuleDetails.
+ The template text of the Custom Protection rule. The syntax is based on ModSecurity Rule Language. Additionaly it needs to include two variables / placeholders which will be replaced during publishing.
+
+ - **{{mode}}** - rule action, defined by user in UI, like `OFF`, `DETECT` or `BLOCK`.
+
+ - **{{id_1}}** - unique rule ID which identifies a `SecRule`, generated by the system. Multiple IDs can be used by increasing the number of the variable for every `SecRule` defined in the template.
+
+ *Example usage:*
+ ```
+ SecRule REQUEST_COOKIES \"regex matching SQL injection - part 1/2\" \\
+ \"phase:2, \\
+ msg:'Detects chained SQL injection attempts 1/2.', \\
+ id: {{id_1}}, \\
+ ctl:ruleEngine={{mode}}, \\
+ deny\"
+ SecRule REQUEST_COOKIES \"regex matching SQL injection - part 2/2\" \\
+ \"phase:2, \\
+ msg:'Detects chained SQL injection attempts 2/2.', \\
+ id: {{id_2}}, \\
+ ctl:ruleEngine={{mode}}, \\
+ deny\"
+ ```
+ The example contains two `SecRules` each having distinct regex expression to match
+ `Cookie` header value during second input analysis phase.
+ The disruptive `deny` action takes effect only when `{{mode}}` is set to `BLOCK`.
+ The message is logged either when `{{mode}}` is set to `DETECT` or `BLOCK`.
+
+
+ For more information about ModSecurity's open source WAF rules, see `Mod Security's documentation`__.
+
+ __ https://www.modsecurity.org/CRS/Documentation/making.html
+
+
+ :return: The template of this CreateCustomProtectionRuleDetails.
+ :rtype: str
+ """
+ return self._template
+
+ @template.setter
+ def template(self, template):
+ """
+ Sets the template of this CreateCustomProtectionRuleDetails.
+ The template text of the Custom Protection rule. The syntax is based on ModSecurity Rule Language. Additionaly it needs to include two variables / placeholders which will be replaced during publishing.
+
+ - **{{mode}}** - rule action, defined by user in UI, like `OFF`, `DETECT` or `BLOCK`.
+
+ - **{{id_1}}** - unique rule ID which identifies a `SecRule`, generated by the system. Multiple IDs can be used by increasing the number of the variable for every `SecRule` defined in the template.
+
+ *Example usage:*
+ ```
+ SecRule REQUEST_COOKIES \"regex matching SQL injection - part 1/2\" \\
+ \"phase:2, \\
+ msg:'Detects chained SQL injection attempts 1/2.', \\
+ id: {{id_1}}, \\
+ ctl:ruleEngine={{mode}}, \\
+ deny\"
+ SecRule REQUEST_COOKIES \"regex matching SQL injection - part 2/2\" \\
+ \"phase:2, \\
+ msg:'Detects chained SQL injection attempts 2/2.', \\
+ id: {{id_2}}, \\
+ ctl:ruleEngine={{mode}}, \\
+ deny\"
+ ```
+ The example contains two `SecRules` each having distinct regex expression to match
+ `Cookie` header value during second input analysis phase.
+ The disruptive `deny` action takes effect only when `{{mode}}` is set to `BLOCK`.
+ The message is logged either when `{{mode}}` is set to `DETECT` or `BLOCK`.
+
+
+ For more information about ModSecurity's open source WAF rules, see `Mod Security's documentation`__.
+
+ __ https://www.modsecurity.org/CRS/Documentation/making.html
+
+
+ :param template: The template of this CreateCustomProtectionRuleDetails.
+ :type: str
+ """
+ self._template = template
+
+ @property
+ def freeform_tags(self):
+ """
+ Gets the freeform_tags of this CreateCustomProtectionRuleDetails.
+ Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace.
+ For more information, see `Resource Tags`__.
+
+ Example: `{\"Department\": \"Finance\"}`
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm
+
+
+ :return: The freeform_tags of this CreateCustomProtectionRuleDetails.
+ :rtype: dict(str, str)
+ """
+ return self._freeform_tags
+
+ @freeform_tags.setter
+ def freeform_tags(self, freeform_tags):
+ """
+ Sets the freeform_tags of this CreateCustomProtectionRuleDetails.
+ Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace.
+ For more information, see `Resource Tags`__.
+
+ Example: `{\"Department\": \"Finance\"}`
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm
+
+
+ :param freeform_tags: The freeform_tags of this CreateCustomProtectionRuleDetails.
+ :type: dict(str, str)
+ """
+ self._freeform_tags = freeform_tags
+
+ @property
+ def defined_tags(self):
+ """
+ Gets the defined_tags of this CreateCustomProtectionRuleDetails.
+ Defined tags for this resource. Each key is predefined and scoped to a namespace.
+ For more information, see `Resource Tags`__.
+
+ Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm
+
+
+ :return: The defined_tags of this CreateCustomProtectionRuleDetails.
+ :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 CreateCustomProtectionRuleDetails.
+ Defined tags for this resource. Each key is predefined and scoped to a namespace.
+ For more information, see `Resource Tags`__.
+
+ Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm
+
+
+ :param defined_tags: The defined_tags of this CreateCustomProtectionRuleDetails.
+ :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/waas/models/create_waas_policy_details.py b/src/oci/waas/models/create_waas_policy_details.py
index 52a8e0cc29..4adfcb9868 100644
--- a/src/oci/waas/models/create_waas_policy_details.py
+++ b/src/oci/waas/models/create_waas_policy_details.py
@@ -39,6 +39,10 @@ def __init__(self, **kwargs):
The value to assign to the origins property of this CreateWaasPolicyDetails.
:type origins: dict(str, Origin)
+ :param origin_groups:
+ The value to assign to the origin_groups property of this CreateWaasPolicyDetails.
+ :type origin_groups: dict(str, OriginGroup)
+
:param policy_config:
The value to assign to the policy_config property of this CreateWaasPolicyDetails.
:type policy_config: PolicyConfig
@@ -62,6 +66,7 @@ def __init__(self, **kwargs):
'domain': 'str',
'additional_domains': 'list[str]',
'origins': 'dict(str, Origin)',
+ 'origin_groups': 'dict(str, OriginGroup)',
'policy_config': 'PolicyConfig',
'waf_config': 'WafConfigDetails',
'freeform_tags': 'dict(str, str)',
@@ -74,6 +79,7 @@ def __init__(self, **kwargs):
'domain': 'domain',
'additional_domains': 'additionalDomains',
'origins': 'origins',
+ 'origin_groups': 'originGroups',
'policy_config': 'policyConfig',
'waf_config': 'wafConfig',
'freeform_tags': 'freeformTags',
@@ -85,6 +91,7 @@ def __init__(self, **kwargs):
self._domain = None
self._additional_domains = None
self._origins = None
+ self._origin_groups = None
self._policy_config = None
self._waf_config = None
self._freeform_tags = None
@@ -214,6 +221,30 @@ def origins(self, origins):
"""
self._origins = origins
+ @property
+ def origin_groups(self):
+ """
+ Gets the origin_groups of this CreateWaasPolicyDetails.
+ The map of origin groups and their keys used to associate origins to the wafConfig.
+
+
+ :return: The origin_groups of this CreateWaasPolicyDetails.
+ :rtype: dict(str, OriginGroup)
+ """
+ return self._origin_groups
+
+ @origin_groups.setter
+ def origin_groups(self, origin_groups):
+ """
+ Sets the origin_groups of this CreateWaasPolicyDetails.
+ The map of origin groups and their keys used to associate origins to the wafConfig.
+
+
+ :param origin_groups: The origin_groups of this CreateWaasPolicyDetails.
+ :type: dict(str, OriginGroup)
+ """
+ self._origin_groups = origin_groups
+
@property
def policy_config(self):
"""
diff --git a/src/oci/waas/models/custom_protection_rule.py b/src/oci/waas/models/custom_protection_rule.py
new file mode 100644
index 0000000000..e84a82e546
--- /dev/null
+++ b/src/oci/waas/models/custom_protection_rule.py
@@ -0,0 +1,470 @@
+# coding: utf-8
+# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
+
+
+from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401
+from oci.decorators import init_model_state_from_kwargs
+
+
+@init_model_state_from_kwargs
+class CustomProtectionRule(object):
+ """
+ The details of a Custom Protection rule.
+ """
+
+ #: A constant which can be used with the lifecycle_state property of a CustomProtectionRule.
+ #: This constant has a value of "CREATING"
+ LIFECYCLE_STATE_CREATING = "CREATING"
+
+ #: A constant which can be used with the lifecycle_state property of a CustomProtectionRule.
+ #: This constant has a value of "ACTIVE"
+ LIFECYCLE_STATE_ACTIVE = "ACTIVE"
+
+ #: A constant which can be used with the lifecycle_state property of a CustomProtectionRule.
+ #: This constant has a value of "FAILED"
+ LIFECYCLE_STATE_FAILED = "FAILED"
+
+ #: A constant which can be used with the lifecycle_state property of a CustomProtectionRule.
+ #: This constant has a value of "UPDATING"
+ LIFECYCLE_STATE_UPDATING = "UPDATING"
+
+ #: A constant which can be used with the lifecycle_state property of a CustomProtectionRule.
+ #: This constant has a value of "DELETING"
+ LIFECYCLE_STATE_DELETING = "DELETING"
+
+ #: A constant which can be used with the lifecycle_state property of a CustomProtectionRule.
+ #: This constant has a value of "DELETED"
+ LIFECYCLE_STATE_DELETED = "DELETED"
+
+ def __init__(self, **kwargs):
+ """
+ Initializes a new CustomProtectionRule 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 CustomProtectionRule.
+ :type id: str
+
+ :param compartment_id:
+ The value to assign to the compartment_id property of this CustomProtectionRule.
+ :type compartment_id: str
+
+ :param display_name:
+ The value to assign to the display_name property of this CustomProtectionRule.
+ :type display_name: str
+
+ :param description:
+ The value to assign to the description property of this CustomProtectionRule.
+ :type description: str
+
+ :param mod_security_rule_ids:
+ The value to assign to the mod_security_rule_ids property of this CustomProtectionRule.
+ :type mod_security_rule_ids: list[str]
+
+ :param template:
+ The value to assign to the template property of this CustomProtectionRule.
+ :type template: str
+
+ :param lifecycle_state:
+ The value to assign to the lifecycle_state property of this CustomProtectionRule.
+ Allowed values for this property are: "CREATING", "ACTIVE", "FAILED", "UPDATING", "DELETING", "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 CustomProtectionRule.
+ :type time_created: datetime
+
+ :param freeform_tags:
+ The value to assign to the freeform_tags property of this CustomProtectionRule.
+ :type freeform_tags: dict(str, str)
+
+ :param defined_tags:
+ The value to assign to the defined_tags property of this CustomProtectionRule.
+ :type defined_tags: dict(str, dict(str, object))
+
+ """
+ self.swagger_types = {
+ 'id': 'str',
+ 'compartment_id': 'str',
+ 'display_name': 'str',
+ 'description': 'str',
+ 'mod_security_rule_ids': 'list[str]',
+ 'template': 'str',
+ 'lifecycle_state': 'str',
+ 'time_created': 'datetime',
+ 'freeform_tags': 'dict(str, str)',
+ 'defined_tags': 'dict(str, dict(str, object))'
+ }
+
+ self.attribute_map = {
+ 'id': 'id',
+ 'compartment_id': 'compartmentId',
+ 'display_name': 'displayName',
+ 'description': 'description',
+ 'mod_security_rule_ids': 'modSecurityRuleIds',
+ 'template': 'template',
+ 'lifecycle_state': 'lifecycleState',
+ 'time_created': 'timeCreated',
+ 'freeform_tags': 'freeformTags',
+ 'defined_tags': 'definedTags'
+ }
+
+ self._id = None
+ self._compartment_id = None
+ self._display_name = None
+ self._description = None
+ self._mod_security_rule_ids = None
+ self._template = None
+ self._lifecycle_state = None
+ self._time_created = None
+ self._freeform_tags = None
+ self._defined_tags = None
+
+ @property
+ def id(self):
+ """
+ Gets the id of this CustomProtectionRule.
+ The `OCID`__ of the Custom Protecion rule.
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
+
+
+ :return: The id of this CustomProtectionRule.
+ :rtype: str
+ """
+ return self._id
+
+ @id.setter
+ def id(self, id):
+ """
+ Sets the id of this CustomProtectionRule.
+ The `OCID`__ of the Custom Protecion rule.
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
+
+
+ :param id: The id of this CustomProtectionRule.
+ :type: str
+ """
+ self._id = id
+
+ @property
+ def compartment_id(self):
+ """
+ Gets the compartment_id of this CustomProtectionRule.
+ The `OCID`__ of the Custom Protecion rule's compartment.
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
+
+
+ :return: The compartment_id of this CustomProtectionRule.
+ :rtype: str
+ """
+ return self._compartment_id
+
+ @compartment_id.setter
+ def compartment_id(self, compartment_id):
+ """
+ Sets the compartment_id of this CustomProtectionRule.
+ The `OCID`__ of the Custom Protecion rule's compartment.
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
+
+
+ :param compartment_id: The compartment_id of this CustomProtectionRule.
+ :type: str
+ """
+ self._compartment_id = compartment_id
+
+ @property
+ def display_name(self):
+ """
+ Gets the display_name of this CustomProtectionRule.
+ The user-friendly name of the Custom Protecion rule.
+
+
+ :return: The display_name of this CustomProtectionRule.
+ :rtype: str
+ """
+ return self._display_name
+
+ @display_name.setter
+ def display_name(self, display_name):
+ """
+ Sets the display_name of this CustomProtectionRule.
+ The user-friendly name of the Custom Protecion rule.
+
+
+ :param display_name: The display_name of this CustomProtectionRule.
+ :type: str
+ """
+ self._display_name = display_name
+
+ @property
+ def description(self):
+ """
+ Gets the description of this CustomProtectionRule.
+ The description of the Custom Protection rule.
+
+
+ :return: The description of this CustomProtectionRule.
+ :rtype: str
+ """
+ return self._description
+
+ @description.setter
+ def description(self, description):
+ """
+ Sets the description of this CustomProtectionRule.
+ The description of the Custom Protection rule.
+
+
+ :param description: The description of this CustomProtectionRule.
+ :type: str
+ """
+ self._description = description
+
+ @property
+ def mod_security_rule_ids(self):
+ """
+ Gets the mod_security_rule_ids of this CustomProtectionRule.
+ The list of the ModSecurity rule IDs that apply to this protection rule. For more information about ModSecurity's open source WAF rules, see `Mod Security's documentation`__.
+
+ __ https://www.modsecurity.org/CRS/Documentation/index.html
+
+
+ :return: The mod_security_rule_ids of this CustomProtectionRule.
+ :rtype: list[str]
+ """
+ return self._mod_security_rule_ids
+
+ @mod_security_rule_ids.setter
+ def mod_security_rule_ids(self, mod_security_rule_ids):
+ """
+ Sets the mod_security_rule_ids of this CustomProtectionRule.
+ The list of the ModSecurity rule IDs that apply to this protection rule. For more information about ModSecurity's open source WAF rules, see `Mod Security's documentation`__.
+
+ __ https://www.modsecurity.org/CRS/Documentation/index.html
+
+
+ :param mod_security_rule_ids: The mod_security_rule_ids of this CustomProtectionRule.
+ :type: list[str]
+ """
+ self._mod_security_rule_ids = mod_security_rule_ids
+
+ @property
+ def template(self):
+ """
+ Gets the template of this CustomProtectionRule.
+ The template text of the Custom Protection rule. The syntax is based on ModSecurity Rule Language. Additionaly it needs to include two variables / placeholders which will be replaced during publishing.
+
+ - **{{mode}}** - rule action, defined by user in UI, like `OFF`, `DETECT` or `BLOCK`.
+
+ - **{{id_1}}** - unique rule ID which identifies a `SecRule`, generated by the system. Multiple IDs can be used by increasing the number of the variable for every `SecRule` defined in the template.
+
+ *Example usage:*
+ ```
+ SecRule REQUEST_COOKIES \"regex matching SQL injection - part 1/2\" \\
+ \"phase:2, \\
+ msg:'Detects chained SQL injection attempts 1/2.', \\
+ id: {{id_1}}, \\
+ ctl:ruleEngine={{mode}}, \\
+ deny\"
+ SecRule REQUEST_COOKIES \"regex matching SQL injection - part 2/2\" \\
+ \"phase:2, \\
+ msg:'Detects chained SQL injection attempts 2/2.', \\
+ id: {{id_2}}, \\
+ ctl:ruleEngine={{mode}}, \\
+ deny\"
+ ```
+ The example contains two `SecRules` each having distinct regex expression to match
+ `Cookie` header value during second input analysis phase.
+ The disruptive `deny` action takes effect only when `{{mode}}` is set to `BLOCK`.
+ The message is logged either when `{{mode}}` is set to `DETECT` or `BLOCK`.
+
+
+ For more information about ModSecurity's open source WAF rules, see `Mod Security's documentation`__.
+
+ __ https://www.modsecurity.org/CRS/Documentation/making.html
+
+
+ :return: The template of this CustomProtectionRule.
+ :rtype: str
+ """
+ return self._template
+
+ @template.setter
+ def template(self, template):
+ """
+ Sets the template of this CustomProtectionRule.
+ The template text of the Custom Protection rule. The syntax is based on ModSecurity Rule Language. Additionaly it needs to include two variables / placeholders which will be replaced during publishing.
+
+ - **{{mode}}** - rule action, defined by user in UI, like `OFF`, `DETECT` or `BLOCK`.
+
+ - **{{id_1}}** - unique rule ID which identifies a `SecRule`, generated by the system. Multiple IDs can be used by increasing the number of the variable for every `SecRule` defined in the template.
+
+ *Example usage:*
+ ```
+ SecRule REQUEST_COOKIES \"regex matching SQL injection - part 1/2\" \\
+ \"phase:2, \\
+ msg:'Detects chained SQL injection attempts 1/2.', \\
+ id: {{id_1}}, \\
+ ctl:ruleEngine={{mode}}, \\
+ deny\"
+ SecRule REQUEST_COOKIES \"regex matching SQL injection - part 2/2\" \\
+ \"phase:2, \\
+ msg:'Detects chained SQL injection attempts 2/2.', \\
+ id: {{id_2}}, \\
+ ctl:ruleEngine={{mode}}, \\
+ deny\"
+ ```
+ The example contains two `SecRules` each having distinct regex expression to match
+ `Cookie` header value during second input analysis phase.
+ The disruptive `deny` action takes effect only when `{{mode}}` is set to `BLOCK`.
+ The message is logged either when `{{mode}}` is set to `DETECT` or `BLOCK`.
+
+
+ For more information about ModSecurity's open source WAF rules, see `Mod Security's documentation`__.
+
+ __ https://www.modsecurity.org/CRS/Documentation/making.html
+
+
+ :param template: The template of this CustomProtectionRule.
+ :type: str
+ """
+ self._template = template
+
+ @property
+ def lifecycle_state(self):
+ """
+ Gets the lifecycle_state of this CustomProtectionRule.
+ The current lifecycle state of the Custom Protection rule.
+
+ Allowed values for this property are: "CREATING", "ACTIVE", "FAILED", "UPDATING", "DELETING", "DELETED", 'UNKNOWN_ENUM_VALUE'.
+ Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
+
+
+ :return: The lifecycle_state of this CustomProtectionRule.
+ :rtype: str
+ """
+ return self._lifecycle_state
+
+ @lifecycle_state.setter
+ def lifecycle_state(self, lifecycle_state):
+ """
+ Sets the lifecycle_state of this CustomProtectionRule.
+ The current lifecycle state of the Custom Protection rule.
+
+
+ :param lifecycle_state: The lifecycle_state of this CustomProtectionRule.
+ :type: str
+ """
+ allowed_values = ["CREATING", "ACTIVE", "FAILED", "UPDATING", "DELETING", "DELETED"]
+ if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values):
+ lifecycle_state = 'UNKNOWN_ENUM_VALUE'
+ self._lifecycle_state = lifecycle_state
+
+ @property
+ def time_created(self):
+ """
+ Gets the time_created of this CustomProtectionRule.
+ The date and time the protection rule was created, expressed in RFC 3339 timestamp format.
+
+
+ :return: The time_created of this CustomProtectionRule.
+ :rtype: datetime
+ """
+ return self._time_created
+
+ @time_created.setter
+ def time_created(self, time_created):
+ """
+ Sets the time_created of this CustomProtectionRule.
+ The date and time the protection rule was created, expressed in RFC 3339 timestamp format.
+
+
+ :param time_created: The time_created of this CustomProtectionRule.
+ :type: datetime
+ """
+ self._time_created = time_created
+
+ @property
+ def freeform_tags(self):
+ """
+ Gets the freeform_tags of this CustomProtectionRule.
+ Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace.
+ For more information, see `Resource Tags`__.
+
+ Example: `{\"Department\": \"Finance\"}`
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm
+
+
+ :return: The freeform_tags of this CustomProtectionRule.
+ :rtype: dict(str, str)
+ """
+ return self._freeform_tags
+
+ @freeform_tags.setter
+ def freeform_tags(self, freeform_tags):
+ """
+ Sets the freeform_tags of this CustomProtectionRule.
+ Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace.
+ For more information, see `Resource Tags`__.
+
+ Example: `{\"Department\": \"Finance\"}`
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm
+
+
+ :param freeform_tags: The freeform_tags of this CustomProtectionRule.
+ :type: dict(str, str)
+ """
+ self._freeform_tags = freeform_tags
+
+ @property
+ def defined_tags(self):
+ """
+ Gets the defined_tags of this CustomProtectionRule.
+ Defined tags for this resource. Each key is predefined and scoped to a namespace.
+ For more information, see `Resource Tags`__.
+
+ Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm
+
+
+ :return: The defined_tags of this CustomProtectionRule.
+ :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 CustomProtectionRule.
+ Defined tags for this resource. Each key is predefined and scoped to a namespace.
+ For more information, see `Resource Tags`__.
+
+ Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm
+
+
+ :param defined_tags: The defined_tags of this CustomProtectionRule.
+ :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/waas/models/custom_protection_rule_setting.py b/src/oci/waas/models/custom_protection_rule_setting.py
new file mode 100644
index 0000000000..5c3360a279
--- /dev/null
+++ b/src/oci/waas/models/custom_protection_rule_setting.py
@@ -0,0 +1,120 @@
+# coding: utf-8
+# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
+
+
+from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401
+from oci.decorators import init_model_state_from_kwargs
+
+
+@init_model_state_from_kwargs
+class CustomProtectionRuleSetting(object):
+ """
+ The OCID and action of a Custom Protection rule.
+ """
+
+ #: A constant which can be used with the action property of a CustomProtectionRuleSetting.
+ #: This constant has a value of "DETECT"
+ ACTION_DETECT = "DETECT"
+
+ #: A constant which can be used with the action property of a CustomProtectionRuleSetting.
+ #: This constant has a value of "BLOCK"
+ ACTION_BLOCK = "BLOCK"
+
+ def __init__(self, **kwargs):
+ """
+ Initializes a new CustomProtectionRuleSetting 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 CustomProtectionRuleSetting.
+ :type id: str
+
+ :param action:
+ The value to assign to the action property of this CustomProtectionRuleSetting.
+ Allowed values for this property are: "DETECT", "BLOCK", 'UNKNOWN_ENUM_VALUE'.
+ Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
+ :type action: str
+
+ """
+ self.swagger_types = {
+ 'id': 'str',
+ 'action': 'str'
+ }
+
+ self.attribute_map = {
+ 'id': 'id',
+ 'action': 'action'
+ }
+
+ self._id = None
+ self._action = None
+
+ @property
+ def id(self):
+ """
+ Gets the id of this CustomProtectionRuleSetting.
+ The `OCID`__ of the Custom Protecion rule.
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
+
+
+ :return: The id of this CustomProtectionRuleSetting.
+ :rtype: str
+ """
+ return self._id
+
+ @id.setter
+ def id(self, id):
+ """
+ Sets the id of this CustomProtectionRuleSetting.
+ The `OCID`__ of the Custom Protecion rule.
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
+
+
+ :param id: The id of this CustomProtectionRuleSetting.
+ :type: str
+ """
+ self._id = id
+
+ @property
+ def action(self):
+ """
+ Gets the action of this CustomProtectionRuleSetting.
+ The action to take when the Custom Protection rule is triggered.
+
+ Allowed values for this property are: "DETECT", "BLOCK", 'UNKNOWN_ENUM_VALUE'.
+ Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
+
+
+ :return: The action of this CustomProtectionRuleSetting.
+ :rtype: str
+ """
+ return self._action
+
+ @action.setter
+ def action(self, action):
+ """
+ Sets the action of this CustomProtectionRuleSetting.
+ The action to take when the Custom Protection rule is triggered.
+
+
+ :param action: The action of this CustomProtectionRuleSetting.
+ :type: str
+ """
+ allowed_values = ["DETECT", "BLOCK"]
+ if not value_allowed_none_or_none_sentinel(action, allowed_values):
+ action = 'UNKNOWN_ENUM_VALUE'
+ self._action = action
+
+ 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/waas/models/custom_protection_rule_summary.py b/src/oci/waas/models/custom_protection_rule_summary.py
new file mode 100644
index 0000000000..808758be49
--- /dev/null
+++ b/src/oci/waas/models/custom_protection_rule_summary.py
@@ -0,0 +1,350 @@
+# coding: utf-8
+# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
+
+
+from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401
+from oci.decorators import init_model_state_from_kwargs
+
+
+@init_model_state_from_kwargs
+class CustomProtectionRuleSummary(object):
+ """
+ Summary information about a Custom Protection rule.
+ """
+
+ #: A constant which can be used with the lifecycle_state property of a CustomProtectionRuleSummary.
+ #: This constant has a value of "CREATING"
+ LIFECYCLE_STATE_CREATING = "CREATING"
+
+ #: A constant which can be used with the lifecycle_state property of a CustomProtectionRuleSummary.
+ #: This constant has a value of "ACTIVE"
+ LIFECYCLE_STATE_ACTIVE = "ACTIVE"
+
+ #: A constant which can be used with the lifecycle_state property of a CustomProtectionRuleSummary.
+ #: This constant has a value of "FAILED"
+ LIFECYCLE_STATE_FAILED = "FAILED"
+
+ #: A constant which can be used with the lifecycle_state property of a CustomProtectionRuleSummary.
+ #: This constant has a value of "UPDATING"
+ LIFECYCLE_STATE_UPDATING = "UPDATING"
+
+ #: A constant which can be used with the lifecycle_state property of a CustomProtectionRuleSummary.
+ #: This constant has a value of "DELETING"
+ LIFECYCLE_STATE_DELETING = "DELETING"
+
+ #: A constant which can be used with the lifecycle_state property of a CustomProtectionRuleSummary.
+ #: This constant has a value of "DELETED"
+ LIFECYCLE_STATE_DELETED = "DELETED"
+
+ def __init__(self, **kwargs):
+ """
+ Initializes a new CustomProtectionRuleSummary 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 CustomProtectionRuleSummary.
+ :type id: str
+
+ :param compartment_id:
+ The value to assign to the compartment_id property of this CustomProtectionRuleSummary.
+ :type compartment_id: str
+
+ :param display_name:
+ The value to assign to the display_name property of this CustomProtectionRuleSummary.
+ :type display_name: str
+
+ :param mod_security_rule_ids:
+ The value to assign to the mod_security_rule_ids property of this CustomProtectionRuleSummary.
+ :type mod_security_rule_ids: list[str]
+
+ :param lifecycle_state:
+ The value to assign to the lifecycle_state property of this CustomProtectionRuleSummary.
+ Allowed values for this property are: "CREATING", "ACTIVE", "FAILED", "UPDATING", "DELETING", "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 CustomProtectionRuleSummary.
+ :type time_created: datetime
+
+ :param freeform_tags:
+ The value to assign to the freeform_tags property of this CustomProtectionRuleSummary.
+ :type freeform_tags: dict(str, str)
+
+ :param defined_tags:
+ The value to assign to the defined_tags property of this CustomProtectionRuleSummary.
+ :type defined_tags: dict(str, dict(str, object))
+
+ """
+ self.swagger_types = {
+ 'id': 'str',
+ 'compartment_id': 'str',
+ 'display_name': 'str',
+ 'mod_security_rule_ids': 'list[str]',
+ 'lifecycle_state': 'str',
+ 'time_created': 'datetime',
+ 'freeform_tags': 'dict(str, str)',
+ 'defined_tags': 'dict(str, dict(str, object))'
+ }
+
+ self.attribute_map = {
+ 'id': 'id',
+ 'compartment_id': 'compartmentId',
+ 'display_name': 'displayName',
+ 'mod_security_rule_ids': 'modSecurityRuleIds',
+ 'lifecycle_state': 'lifecycleState',
+ 'time_created': 'timeCreated',
+ 'freeform_tags': 'freeformTags',
+ 'defined_tags': 'definedTags'
+ }
+
+ self._id = None
+ self._compartment_id = None
+ self._display_name = None
+ self._mod_security_rule_ids = None
+ self._lifecycle_state = None
+ self._time_created = None
+ self._freeform_tags = None
+ self._defined_tags = None
+
+ @property
+ def id(self):
+ """
+ Gets the id of this CustomProtectionRuleSummary.
+ The `OCID`__ of the Custom Protection rule.
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
+
+
+ :return: The id of this CustomProtectionRuleSummary.
+ :rtype: str
+ """
+ return self._id
+
+ @id.setter
+ def id(self, id):
+ """
+ Sets the id of this CustomProtectionRuleSummary.
+ The `OCID`__ of the Custom Protection rule.
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
+
+
+ :param id: The id of this CustomProtectionRuleSummary.
+ :type: str
+ """
+ self._id = id
+
+ @property
+ def compartment_id(self):
+ """
+ Gets the compartment_id of this CustomProtectionRuleSummary.
+ The `OCID`__ of the Custom Protection rule's compartment.
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
+
+
+ :return: The compartment_id of this CustomProtectionRuleSummary.
+ :rtype: str
+ """
+ return self._compartment_id
+
+ @compartment_id.setter
+ def compartment_id(self, compartment_id):
+ """
+ Sets the compartment_id of this CustomProtectionRuleSummary.
+ The `OCID`__ of the Custom Protection rule's compartment.
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
+
+
+ :param compartment_id: The compartment_id of this CustomProtectionRuleSummary.
+ :type: str
+ """
+ self._compartment_id = compartment_id
+
+ @property
+ def display_name(self):
+ """
+ Gets the display_name of this CustomProtectionRuleSummary.
+ The user-friendly name of the Custom Protection rule.
+
+
+ :return: The display_name of this CustomProtectionRuleSummary.
+ :rtype: str
+ """
+ return self._display_name
+
+ @display_name.setter
+ def display_name(self, display_name):
+ """
+ Sets the display_name of this CustomProtectionRuleSummary.
+ The user-friendly name of the Custom Protection rule.
+
+
+ :param display_name: The display_name of this CustomProtectionRuleSummary.
+ :type: str
+ """
+ self._display_name = display_name
+
+ @property
+ def mod_security_rule_ids(self):
+ """
+ Gets the mod_security_rule_ids of this CustomProtectionRuleSummary.
+ The list of the ModSecurity rule IDs that apply to this protection rule. For more information about ModSecurity's open source WAF rules, see `Mod Security's documentation`__.
+
+ __ https://www.modsecurity.org/CRS/Documentation/index.html
+
+
+ :return: The mod_security_rule_ids of this CustomProtectionRuleSummary.
+ :rtype: list[str]
+ """
+ return self._mod_security_rule_ids
+
+ @mod_security_rule_ids.setter
+ def mod_security_rule_ids(self, mod_security_rule_ids):
+ """
+ Sets the mod_security_rule_ids of this CustomProtectionRuleSummary.
+ The list of the ModSecurity rule IDs that apply to this protection rule. For more information about ModSecurity's open source WAF rules, see `Mod Security's documentation`__.
+
+ __ https://www.modsecurity.org/CRS/Documentation/index.html
+
+
+ :param mod_security_rule_ids: The mod_security_rule_ids of this CustomProtectionRuleSummary.
+ :type: list[str]
+ """
+ self._mod_security_rule_ids = mod_security_rule_ids
+
+ @property
+ def lifecycle_state(self):
+ """
+ Gets the lifecycle_state of this CustomProtectionRuleSummary.
+ The current lifecycle state of the Custom Protection rule.
+
+ Allowed values for this property are: "CREATING", "ACTIVE", "FAILED", "UPDATING", "DELETING", "DELETED", 'UNKNOWN_ENUM_VALUE'.
+ Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
+
+
+ :return: The lifecycle_state of this CustomProtectionRuleSummary.
+ :rtype: str
+ """
+ return self._lifecycle_state
+
+ @lifecycle_state.setter
+ def lifecycle_state(self, lifecycle_state):
+ """
+ Sets the lifecycle_state of this CustomProtectionRuleSummary.
+ The current lifecycle state of the Custom Protection rule.
+
+
+ :param lifecycle_state: The lifecycle_state of this CustomProtectionRuleSummary.
+ :type: str
+ """
+ allowed_values = ["CREATING", "ACTIVE", "FAILED", "UPDATING", "DELETING", "DELETED"]
+ if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values):
+ lifecycle_state = 'UNKNOWN_ENUM_VALUE'
+ self._lifecycle_state = lifecycle_state
+
+ @property
+ def time_created(self):
+ """
+ Gets the time_created of this CustomProtectionRuleSummary.
+ The date and time the protection rule was created, expressed in RFC 3339 timestamp format.
+
+
+ :return: The time_created of this CustomProtectionRuleSummary.
+ :rtype: datetime
+ """
+ return self._time_created
+
+ @time_created.setter
+ def time_created(self, time_created):
+ """
+ Sets the time_created of this CustomProtectionRuleSummary.
+ The date and time the protection rule was created, expressed in RFC 3339 timestamp format.
+
+
+ :param time_created: The time_created of this CustomProtectionRuleSummary.
+ :type: datetime
+ """
+ self._time_created = time_created
+
+ @property
+ def freeform_tags(self):
+ """
+ Gets the freeform_tags of this CustomProtectionRuleSummary.
+ Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace.
+ For more information, see `Resource Tags`__.
+
+ Example: `{\"Department\": \"Finance\"}`
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm
+
+
+ :return: The freeform_tags of this CustomProtectionRuleSummary.
+ :rtype: dict(str, str)
+ """
+ return self._freeform_tags
+
+ @freeform_tags.setter
+ def freeform_tags(self, freeform_tags):
+ """
+ Sets the freeform_tags of this CustomProtectionRuleSummary.
+ Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace.
+ For more information, see `Resource Tags`__.
+
+ Example: `{\"Department\": \"Finance\"}`
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm
+
+
+ :param freeform_tags: The freeform_tags of this CustomProtectionRuleSummary.
+ :type: dict(str, str)
+ """
+ self._freeform_tags = freeform_tags
+
+ @property
+ def defined_tags(self):
+ """
+ Gets the defined_tags of this CustomProtectionRuleSummary.
+ Defined tags for this resource. Each key is predefined and scoped to a namespace.
+ For more information, see `Resource Tags`__.
+
+ Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm
+
+
+ :return: The defined_tags of this CustomProtectionRuleSummary.
+ :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 CustomProtectionRuleSummary.
+ Defined tags for this resource. Each key is predefined and scoped to a namespace.
+ For more information, see `Resource Tags`__.
+
+ Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm
+
+
+ :param defined_tags: The defined_tags of this CustomProtectionRuleSummary.
+ :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/waas/models/origin_group.py b/src/oci/waas/models/origin_group.py
new file mode 100644
index 0000000000..3d9c15a018
--- /dev/null
+++ b/src/oci/waas/models/origin_group.py
@@ -0,0 +1,69 @@
+# coding: utf-8
+# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
+
+
+from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401
+from oci.decorators import init_model_state_from_kwargs
+
+
+@init_model_state_from_kwargs
+class OriginGroup(object):
+ """
+ OriginGroup model.
+ """
+
+ def __init__(self, **kwargs):
+ """
+ Initializes a new OriginGroup object with values from keyword arguments.
+ The following keyword arguments are supported (corresponding to the getters/setters of this class):
+
+ :param origins:
+ The value to assign to the origins property of this OriginGroup.
+ :type origins: list[OriginGroupOrigins]
+
+ """
+ self.swagger_types = {
+ 'origins': 'list[OriginGroupOrigins]'
+ }
+
+ self.attribute_map = {
+ 'origins': 'origins'
+ }
+
+ self._origins = None
+
+ @property
+ def origins(self):
+ """
+ Gets the origins of this OriginGroup.
+ The list of objects containing origin references and additional properties.
+
+
+ :return: The origins of this OriginGroup.
+ :rtype: list[OriginGroupOrigins]
+ """
+ return self._origins
+
+ @origins.setter
+ def origins(self, origins):
+ """
+ Sets the origins of this OriginGroup.
+ The list of objects containing origin references and additional properties.
+
+
+ :param origins: The origins of this OriginGroup.
+ :type: list[OriginGroupOrigins]
+ """
+ self._origins = origins
+
+ 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/waas/models/origin_group_origins.py b/src/oci/waas/models/origin_group_origins.py
new file mode 100644
index 0000000000..33209ff735
--- /dev/null
+++ b/src/oci/waas/models/origin_group_origins.py
@@ -0,0 +1,100 @@
+# coding: utf-8
+# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
+
+
+from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401
+from oci.decorators import init_model_state_from_kwargs
+
+
+@init_model_state_from_kwargs
+class OriginGroupOrigins(object):
+ """
+ OriginGroupOrigins model.
+ """
+
+ def __init__(self, **kwargs):
+ """
+ Initializes a new OriginGroupOrigins object with values from keyword arguments.
+ The following keyword arguments are supported (corresponding to the getters/setters of this class):
+
+ :param origin:
+ The value to assign to the origin property of this OriginGroupOrigins.
+ :type origin: str
+
+ :param weight:
+ The value to assign to the weight property of this OriginGroupOrigins.
+ :type weight: int
+
+ """
+ self.swagger_types = {
+ 'origin': 'str',
+ 'weight': 'int'
+ }
+
+ self.attribute_map = {
+ 'origin': 'origin',
+ 'weight': 'weight'
+ }
+
+ self._origin = None
+ self._weight = None
+
+ @property
+ def origin(self):
+ """
+ Gets the origin of this OriginGroupOrigins.
+ The reference string to the origin server.
+
+
+ :return: The origin of this OriginGroupOrigins.
+ :rtype: str
+ """
+ return self._origin
+
+ @origin.setter
+ def origin(self, origin):
+ """
+ Sets the origin of this OriginGroupOrigins.
+ The reference string to the origin server.
+
+
+ :param origin: The origin of this OriginGroupOrigins.
+ :type: str
+ """
+ self._origin = origin
+
+ @property
+ def weight(self):
+ """
+ Gets the weight of this OriginGroupOrigins.
+ The weight of the origin used in load balancing. The higher the weight, the larger the proportion of client requests the server receives.
+
+
+ :return: The weight of this OriginGroupOrigins.
+ :rtype: int
+ """
+ return self._weight
+
+ @weight.setter
+ def weight(self, weight):
+ """
+ Sets the weight of this OriginGroupOrigins.
+ The weight of the origin used in load balancing. The higher the weight, the larger the proportion of client requests the server receives.
+
+
+ :param weight: The weight of this OriginGroupOrigins.
+ :type: int
+ """
+ self._weight = weight
+
+ 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/waas/models/policy_config.py b/src/oci/waas/models/policy_config.py
index 46e24a80a5..2a9a119587 100644
--- a/src/oci/waas/models/policy_config.py
+++ b/src/oci/waas/models/policy_config.py
@@ -12,6 +12,46 @@ class PolicyConfig(object):
The configuration details for the WAAS policy.
"""
+ #: A constant which can be used with the tls_protocols property of a PolicyConfig.
+ #: This constant has a value of "TLS_V1"
+ TLS_PROTOCOLS_TLS_V1 = "TLS_V1"
+
+ #: A constant which can be used with the tls_protocols property of a PolicyConfig.
+ #: This constant has a value of "TLS_V1_1"
+ TLS_PROTOCOLS_TLS_V1_1 = "TLS_V1_1"
+
+ #: A constant which can be used with the tls_protocols property of a PolicyConfig.
+ #: This constant has a value of "TLS_V1_2"
+ TLS_PROTOCOLS_TLS_V1_2 = "TLS_V1_2"
+
+ #: A constant which can be used with the tls_protocols property of a PolicyConfig.
+ #: This constant has a value of "TLS_V1_3"
+ TLS_PROTOCOLS_TLS_V1_3 = "TLS_V1_3"
+
+ #: A constant which can be used with the client_address_header property of a PolicyConfig.
+ #: This constant has a value of "X_FORWARDED_FOR"
+ CLIENT_ADDRESS_HEADER_X_FORWARDED_FOR = "X_FORWARDED_FOR"
+
+ #: A constant which can be used with the client_address_header property of a PolicyConfig.
+ #: This constant has a value of "X_CLIENT_IP"
+ CLIENT_ADDRESS_HEADER_X_CLIENT_IP = "X_CLIENT_IP"
+
+ #: A constant which can be used with the client_address_header property of a PolicyConfig.
+ #: This constant has a value of "X_REAL_IP"
+ CLIENT_ADDRESS_HEADER_X_REAL_IP = "X_REAL_IP"
+
+ #: A constant which can be used with the client_address_header property of a PolicyConfig.
+ #: This constant has a value of "CLIENT_IP"
+ CLIENT_ADDRESS_HEADER_CLIENT_IP = "CLIENT_IP"
+
+ #: A constant which can be used with the client_address_header property of a PolicyConfig.
+ #: This constant has a value of "TRUE_CLIENT_IP"
+ CLIENT_ADDRESS_HEADER_TRUE_CLIENT_IP = "TRUE_CLIENT_IP"
+
+ #: A constant which can be used with the cipher_group property of a PolicyConfig.
+ #: This constant has a value of "DEFAULT"
+ CIPHER_GROUP_DEFAULT = "DEFAULT"
+
def __init__(self, **kwargs):
"""
Initializes a new PolicyConfig object with values from keyword arguments.
@@ -29,22 +69,77 @@ def __init__(self, **kwargs):
The value to assign to the is_https_forced property of this PolicyConfig.
:type is_https_forced: bool
+ :param tls_protocols:
+ The value to assign to the tls_protocols property of this PolicyConfig.
+ Allowed values for items in this list are: "TLS_V1", "TLS_V1_1", "TLS_V1_2", "TLS_V1_3", 'UNKNOWN_ENUM_VALUE'.
+ Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
+ :type tls_protocols: list[str]
+
+ :param is_origin_compression_enabled:
+ The value to assign to the is_origin_compression_enabled property of this PolicyConfig.
+ :type is_origin_compression_enabled: bool
+
+ :param is_behind_cdn:
+ The value to assign to the is_behind_cdn property of this PolicyConfig.
+ :type is_behind_cdn: bool
+
+ :param client_address_header:
+ The value to assign to the client_address_header property of this PolicyConfig.
+ Allowed values for this property are: "X_FORWARDED_FOR", "X_CLIENT_IP", "X_REAL_IP", "CLIENT_IP", "TRUE_CLIENT_IP", 'UNKNOWN_ENUM_VALUE'.
+ Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
+ :type client_address_header: str
+
+ :param is_cache_control_respected:
+ The value to assign to the is_cache_control_respected property of this PolicyConfig.
+ :type is_cache_control_respected: bool
+
+ :param is_response_buffering_enabled:
+ The value to assign to the is_response_buffering_enabled property of this PolicyConfig.
+ :type is_response_buffering_enabled: bool
+
+ :param cipher_group:
+ The value to assign to the cipher_group property of this PolicyConfig.
+ Allowed values for this property are: "DEFAULT", 'UNKNOWN_ENUM_VALUE'.
+ Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
+ :type cipher_group: str
+
"""
self.swagger_types = {
'certificate_id': 'str',
'is_https_enabled': 'bool',
- 'is_https_forced': 'bool'
+ 'is_https_forced': 'bool',
+ 'tls_protocols': 'list[str]',
+ 'is_origin_compression_enabled': 'bool',
+ 'is_behind_cdn': 'bool',
+ 'client_address_header': 'str',
+ 'is_cache_control_respected': 'bool',
+ 'is_response_buffering_enabled': 'bool',
+ 'cipher_group': 'str'
}
self.attribute_map = {
'certificate_id': 'certificateId',
'is_https_enabled': 'isHttpsEnabled',
- 'is_https_forced': 'isHttpsForced'
+ 'is_https_forced': 'isHttpsForced',
+ 'tls_protocols': 'tlsProtocols',
+ 'is_origin_compression_enabled': 'isOriginCompressionEnabled',
+ 'is_behind_cdn': 'isBehindCdn',
+ 'client_address_header': 'clientAddressHeader',
+ 'is_cache_control_respected': 'isCacheControlRespected',
+ 'is_response_buffering_enabled': 'isResponseBufferingEnabled',
+ 'cipher_group': 'cipherGroup'
}
self._certificate_id = None
self._is_https_enabled = None
self._is_https_forced = None
+ self._tls_protocols = None
+ self._is_origin_compression_enabled = None
+ self._is_behind_cdn = None
+ self._client_address_header = None
+ self._is_cache_control_respected = None
+ self._is_response_buffering_enabled = None
+ self._cipher_group = None
@property
def certificate_id(self):
@@ -118,6 +213,232 @@ def is_https_forced(self, is_https_forced):
"""
self._is_https_forced = is_https_forced
+ @property
+ def tls_protocols(self):
+ """
+ Gets the tls_protocols of this PolicyConfig.
+ A list of allowed TLS protocols. Only applicable when HTTPS support is enabled. It affects client's connection to the edge nodes. The most secure TLS version will be chosen.
+ - **TLS_V1:** corresponds to TLS 1.0 specification.
+
+ - **TLS_V1_1:** corresponds to TLS 1.1 specification.
+
+ - **TLS_V1_2:** corresponds to TLS 1.2 specification.
+
+ - **TLS_V1_3:** corresponds to TLS 1.3 specification.
+
+ Enabled TLS protocols must go in a row. For example if TLS_v1_1 and TLS_V1_3 are enabled, TLS_V1_2 must be enabled too.
+
+ Allowed values for items in this list are: "TLS_V1", "TLS_V1_1", "TLS_V1_2", "TLS_V1_3", 'UNKNOWN_ENUM_VALUE'.
+ Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
+
+
+ :return: The tls_protocols of this PolicyConfig.
+ :rtype: list[str]
+ """
+ return self._tls_protocols
+
+ @tls_protocols.setter
+ def tls_protocols(self, tls_protocols):
+ """
+ Sets the tls_protocols of this PolicyConfig.
+ A list of allowed TLS protocols. Only applicable when HTTPS support is enabled. It affects client's connection to the edge nodes. The most secure TLS version will be chosen.
+ - **TLS_V1:** corresponds to TLS 1.0 specification.
+
+ - **TLS_V1_1:** corresponds to TLS 1.1 specification.
+
+ - **TLS_V1_2:** corresponds to TLS 1.2 specification.
+
+ - **TLS_V1_3:** corresponds to TLS 1.3 specification.
+
+ Enabled TLS protocols must go in a row. For example if TLS_v1_1 and TLS_V1_3 are enabled, TLS_V1_2 must be enabled too.
+
+
+ :param tls_protocols: The tls_protocols of this PolicyConfig.
+ :type: list[str]
+ """
+ allowed_values = ["TLS_V1", "TLS_V1_1", "TLS_V1_2", "TLS_V1_3"]
+ if tls_protocols:
+ tls_protocols[:] = ['UNKNOWN_ENUM_VALUE' if not value_allowed_none_or_none_sentinel(x, allowed_values) else x for x in tls_protocols]
+ self._tls_protocols = tls_protocols
+
+ @property
+ def is_origin_compression_enabled(self):
+ """
+ Gets the is_origin_compression_enabled of this PolicyConfig.
+ Enable or disable GZIP compression of origin responses. If enabled, the header `Accept-Encoding: gzip` is sent to origin, otherwise - empty `Accept-Encoding:` header is used.
+
+
+ :return: The is_origin_compression_enabled of this PolicyConfig.
+ :rtype: bool
+ """
+ return self._is_origin_compression_enabled
+
+ @is_origin_compression_enabled.setter
+ def is_origin_compression_enabled(self, is_origin_compression_enabled):
+ """
+ Sets the is_origin_compression_enabled of this PolicyConfig.
+ Enable or disable GZIP compression of origin responses. If enabled, the header `Accept-Encoding: gzip` is sent to origin, otherwise - empty `Accept-Encoding:` header is used.
+
+
+ :param is_origin_compression_enabled: The is_origin_compression_enabled of this PolicyConfig.
+ :type: bool
+ """
+ self._is_origin_compression_enabled = is_origin_compression_enabled
+
+ @property
+ def is_behind_cdn(self):
+ """
+ Gets the is_behind_cdn of this PolicyConfig.
+ Enable or disable the use of CDN. It allows to specify true client IP address if clients do not connect directly to us.
+
+
+ :return: The is_behind_cdn of this PolicyConfig.
+ :rtype: bool
+ """
+ return self._is_behind_cdn
+
+ @is_behind_cdn.setter
+ def is_behind_cdn(self, is_behind_cdn):
+ """
+ Sets the is_behind_cdn of this PolicyConfig.
+ Enable or disable the use of CDN. It allows to specify true client IP address if clients do not connect directly to us.
+
+
+ :param is_behind_cdn: The is_behind_cdn of this PolicyConfig.
+ :type: bool
+ """
+ self._is_behind_cdn = is_behind_cdn
+
+ @property
+ def client_address_header(self):
+ """
+ Gets the client_address_header of this PolicyConfig.
+ The HTTP header used to pass the client IP address from the CDN if `isBehindCdn` is enabled. This feature consumes the header and its value as the true client IP address. It does not create the header. Using trusted chains (for example `X-Client-Ip: 11.1.1.1, 13.3.3.3`), the last IP address in the list will be used as true client IP address. In case of multiple headers with the same name, the first one will be used. If the header is not present it will use the connecting IP address as the true client IP address. It's assumed that CDN sets the correct client IP address and prevents spoofing.
+
+ - **X_FORWARDED_FOR:** Corresponds to `X-Forwarded-For` header name.
+
+ - **X_CLIENT_IP:** Corresponds to `X-Client-Ip` header name.
+
+ - **X_REAL_IP:** Corresponds to `X-Real-Ip` header name.
+
+ - **CLIENT_IP:** Corresponds to `Client-Ip` header name.
+
+ - **TRUE_CLIENT_IP:** Corresponds to `True-Client-Ip` header name.
+
+ Allowed values for this property are: "X_FORWARDED_FOR", "X_CLIENT_IP", "X_REAL_IP", "CLIENT_IP", "TRUE_CLIENT_IP", 'UNKNOWN_ENUM_VALUE'.
+ Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
+
+
+ :return: The client_address_header of this PolicyConfig.
+ :rtype: str
+ """
+ return self._client_address_header
+
+ @client_address_header.setter
+ def client_address_header(self, client_address_header):
+ """
+ Sets the client_address_header of this PolicyConfig.
+ The HTTP header used to pass the client IP address from the CDN if `isBehindCdn` is enabled. This feature consumes the header and its value as the true client IP address. It does not create the header. Using trusted chains (for example `X-Client-Ip: 11.1.1.1, 13.3.3.3`), the last IP address in the list will be used as true client IP address. In case of multiple headers with the same name, the first one will be used. If the header is not present it will use the connecting IP address as the true client IP address. It's assumed that CDN sets the correct client IP address and prevents spoofing.
+
+ - **X_FORWARDED_FOR:** Corresponds to `X-Forwarded-For` header name.
+
+ - **X_CLIENT_IP:** Corresponds to `X-Client-Ip` header name.
+
+ - **X_REAL_IP:** Corresponds to `X-Real-Ip` header name.
+
+ - **CLIENT_IP:** Corresponds to `Client-Ip` header name.
+
+ - **TRUE_CLIENT_IP:** Corresponds to `True-Client-Ip` header name.
+
+
+ :param client_address_header: The client_address_header of this PolicyConfig.
+ :type: str
+ """
+ allowed_values = ["X_FORWARDED_FOR", "X_CLIENT_IP", "X_REAL_IP", "CLIENT_IP", "TRUE_CLIENT_IP"]
+ if not value_allowed_none_or_none_sentinel(client_address_header, allowed_values):
+ client_address_header = 'UNKNOWN_ENUM_VALUE'
+ self._client_address_header = client_address_header
+
+ @property
+ def is_cache_control_respected(self):
+ """
+ Gets the is_cache_control_respected of this PolicyConfig.
+ Enable or disable automatic content caching based on the response `cache-control` header. This feature enables the origin to act as a proxy cache. Caching policies are usually defined using `cache-control` header. For example `cache-control: max-age=120` means that the returned resource is valid for 120 seconds. Caching rules will overwrite this setting.
+
+
+ :return: The is_cache_control_respected of this PolicyConfig.
+ :rtype: bool
+ """
+ return self._is_cache_control_respected
+
+ @is_cache_control_respected.setter
+ def is_cache_control_respected(self, is_cache_control_respected):
+ """
+ Sets the is_cache_control_respected of this PolicyConfig.
+ Enable or disable automatic content caching based on the response `cache-control` header. This feature enables the origin to act as a proxy cache. Caching policies are usually defined using `cache-control` header. For example `cache-control: max-age=120` means that the returned resource is valid for 120 seconds. Caching rules will overwrite this setting.
+
+
+ :param is_cache_control_respected: The is_cache_control_respected of this PolicyConfig.
+ :type: bool
+ """
+ self._is_cache_control_respected = is_cache_control_respected
+
+ @property
+ def is_response_buffering_enabled(self):
+ """
+ Gets the is_response_buffering_enabled of this PolicyConfig.
+ Enable or disable buffering of responses from the origin. Buffering improves overall stability in case of network issues, but slightly increases Time To First Byte.
+
+
+ :return: The is_response_buffering_enabled of this PolicyConfig.
+ :rtype: bool
+ """
+ return self._is_response_buffering_enabled
+
+ @is_response_buffering_enabled.setter
+ def is_response_buffering_enabled(self, is_response_buffering_enabled):
+ """
+ Sets the is_response_buffering_enabled of this PolicyConfig.
+ Enable or disable buffering of responses from the origin. Buffering improves overall stability in case of network issues, but slightly increases Time To First Byte.
+
+
+ :param is_response_buffering_enabled: The is_response_buffering_enabled of this PolicyConfig.
+ :type: bool
+ """
+ self._is_response_buffering_enabled = is_response_buffering_enabled
+
+ @property
+ def cipher_group(self):
+ """
+ Gets the cipher_group of this PolicyConfig.
+ The cipher group
+ - **DEFAULT:** Cipher group supports TLS 1.0, TLS 1.1, TLS 1.2, TLS 1.3 protocols. It has the following ciphers enabled: `ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:!DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA`
+
+ Allowed values for this property are: "DEFAULT", 'UNKNOWN_ENUM_VALUE'.
+ Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
+
+
+ :return: The cipher_group of this PolicyConfig.
+ :rtype: str
+ """
+ return self._cipher_group
+
+ @cipher_group.setter
+ def cipher_group(self, cipher_group):
+ """
+ Sets the cipher_group of this PolicyConfig.
+ The cipher group
+ - **DEFAULT:** Cipher group supports TLS 1.0, TLS 1.1, TLS 1.2, TLS 1.3 protocols. It has the following ciphers enabled: `ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:!DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA`
+
+
+ :param cipher_group: The cipher_group of this PolicyConfig.
+ :type: str
+ """
+ allowed_values = ["DEFAULT"]
+ if not value_allowed_none_or_none_sentinel(cipher_group, allowed_values):
+ cipher_group = 'UNKNOWN_ENUM_VALUE'
+ self._cipher_group = cipher_group
+
def __repr__(self):
return formatted_flat_dict(self)
diff --git a/src/oci/waas/models/purge_cache.py b/src/oci/waas/models/purge_cache.py
new file mode 100644
index 0000000000..1beadc372f
--- /dev/null
+++ b/src/oci/waas/models/purge_cache.py
@@ -0,0 +1,69 @@
+# coding: utf-8
+# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
+
+
+from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401
+from oci.decorators import init_model_state_from_kwargs
+
+
+@init_model_state_from_kwargs
+class PurgeCache(object):
+ """
+ The list of resources for cache purge. If a resources property is not provided, the purge targets all resources in a policy.
+ """
+
+ def __init__(self, **kwargs):
+ """
+ Initializes a new PurgeCache object with values from keyword arguments.
+ The following keyword arguments are supported (corresponding to the getters/setters of this class):
+
+ :param resources:
+ The value to assign to the resources property of this PurgeCache.
+ :type resources: list[str]
+
+ """
+ self.swagger_types = {
+ 'resources': 'list[str]'
+ }
+
+ self.attribute_map = {
+ 'resources': 'resources'
+ }
+
+ self._resources = None
+
+ @property
+ def resources(self):
+ """
+ Gets the resources of this PurgeCache.
+ A resource to purge, identified by either a hostless absolute path starting with a single slash (e.g., \"/path/to/resource\") or by a relative path in which the first component will be interpreted as a domain protected by this policy (e.g., \"example.com/path/to/resource\").
+
+
+ :return: The resources of this PurgeCache.
+ :rtype: list[str]
+ """
+ return self._resources
+
+ @resources.setter
+ def resources(self, resources):
+ """
+ Sets the resources of this PurgeCache.
+ A resource to purge, identified by either a hostless absolute path starting with a single slash (e.g., \"/path/to/resource\") or by a relative path in which the first component will be interpreted as a domain protected by this policy (e.g., \"example.com/path/to/resource\").
+
+
+ :param resources: The resources of this PurgeCache.
+ :type: list[str]
+ """
+ self._resources = resources
+
+ 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/waas/models/update_address_list_details.py b/src/oci/waas/models/update_address_list_details.py
new file mode 100644
index 0000000000..ec0018eb17
--- /dev/null
+++ b/src/oci/waas/models/update_address_list_details.py
@@ -0,0 +1,182 @@
+# coding: utf-8
+# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
+
+
+from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401
+from oci.decorators import init_model_state_from_kwargs
+
+
+@init_model_state_from_kwargs
+class UpdateAddressListDetails(object):
+ """
+ The data used to update the address list.
+ """
+
+ def __init__(self, **kwargs):
+ """
+ Initializes a new UpdateAddressListDetails 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 UpdateAddressListDetails.
+ :type display_name: str
+
+ :param addresses:
+ The value to assign to the addresses property of this UpdateAddressListDetails.
+ :type addresses: list[str]
+
+ :param freeform_tags:
+ The value to assign to the freeform_tags property of this UpdateAddressListDetails.
+ :type freeform_tags: dict(str, str)
+
+ :param defined_tags:
+ The value to assign to the defined_tags property of this UpdateAddressListDetails.
+ :type defined_tags: dict(str, dict(str, object))
+
+ """
+ self.swagger_types = {
+ 'display_name': 'str',
+ 'addresses': 'list[str]',
+ 'freeform_tags': 'dict(str, str)',
+ 'defined_tags': 'dict(str, dict(str, object))'
+ }
+
+ self.attribute_map = {
+ 'display_name': 'displayName',
+ 'addresses': 'addresses',
+ 'freeform_tags': 'freeformTags',
+ 'defined_tags': 'definedTags'
+ }
+
+ self._display_name = None
+ self._addresses = None
+ self._freeform_tags = None
+ self._defined_tags = None
+
+ @property
+ def display_name(self):
+ """
+ Gets the display_name of this UpdateAddressListDetails.
+ A unique user-friendly name for the address list.
+
+
+ :return: The display_name of this UpdateAddressListDetails.
+ :rtype: str
+ """
+ return self._display_name
+
+ @display_name.setter
+ def display_name(self, display_name):
+ """
+ Sets the display_name of this UpdateAddressListDetails.
+ A unique user-friendly name for the address list.
+
+
+ :param display_name: The display_name of this UpdateAddressListDetails.
+ :type: str
+ """
+ self._display_name = display_name
+
+ @property
+ def addresses(self):
+ """
+ Gets the addresses of this UpdateAddressListDetails.
+ A list of IP addresses or CIDR notations.
+
+
+ :return: The addresses of this UpdateAddressListDetails.
+ :rtype: list[str]
+ """
+ return self._addresses
+
+ @addresses.setter
+ def addresses(self, addresses):
+ """
+ Sets the addresses of this UpdateAddressListDetails.
+ A list of IP addresses or CIDR notations.
+
+
+ :param addresses: The addresses of this UpdateAddressListDetails.
+ :type: list[str]
+ """
+ self._addresses = addresses
+
+ @property
+ def freeform_tags(self):
+ """
+ Gets the freeform_tags of this UpdateAddressListDetails.
+ Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace.
+ For more information, see `Resource Tags`__.
+
+ Example: `{\"Department\": \"Finance\"}`
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm
+
+
+ :return: The freeform_tags of this UpdateAddressListDetails.
+ :rtype: dict(str, str)
+ """
+ return self._freeform_tags
+
+ @freeform_tags.setter
+ def freeform_tags(self, freeform_tags):
+ """
+ Sets the freeform_tags of this UpdateAddressListDetails.
+ Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace.
+ For more information, see `Resource Tags`__.
+
+ Example: `{\"Department\": \"Finance\"}`
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm
+
+
+ :param freeform_tags: The freeform_tags of this UpdateAddressListDetails.
+ :type: dict(str, str)
+ """
+ self._freeform_tags = freeform_tags
+
+ @property
+ def defined_tags(self):
+ """
+ Gets the defined_tags of this UpdateAddressListDetails.
+ Defined tags for this resource. Each key is predefined and scoped to a namespace.
+ For more information, see `Resource Tags`__.
+
+ Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm
+
+
+ :return: The defined_tags of this UpdateAddressListDetails.
+ :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 UpdateAddressListDetails.
+ Defined tags for this resource. Each key is predefined and scoped to a namespace.
+ For more information, see `Resource Tags`__.
+
+ Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm
+
+
+ :param defined_tags: The defined_tags of this UpdateAddressListDetails.
+ :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/waas/models/update_custom_protection_rule_details.py b/src/oci/waas/models/update_custom_protection_rule_details.py
new file mode 100644
index 0000000000..cbecc6ed96
--- /dev/null
+++ b/src/oci/waas/models/update_custom_protection_rule_details.py
@@ -0,0 +1,272 @@
+# coding: utf-8
+# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
+
+
+from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401
+from oci.decorators import init_model_state_from_kwargs
+
+
+@init_model_state_from_kwargs
+class UpdateCustomProtectionRuleDetails(object):
+ """
+ Updates the configuration details of a Custom Protection rule. The update is possible only if the rule hasn't been selected as active in any WAAS policy (remains in `Off` state).
+ **Warning:** Oracle recommends that you avoid using any confidential information when you supply string values using the API.
+ """
+
+ def __init__(self, **kwargs):
+ """
+ Initializes a new UpdateCustomProtectionRuleDetails 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 UpdateCustomProtectionRuleDetails.
+ :type display_name: str
+
+ :param description:
+ The value to assign to the description property of this UpdateCustomProtectionRuleDetails.
+ :type description: str
+
+ :param template:
+ The value to assign to the template property of this UpdateCustomProtectionRuleDetails.
+ :type template: str
+
+ :param freeform_tags:
+ The value to assign to the freeform_tags property of this UpdateCustomProtectionRuleDetails.
+ :type freeform_tags: dict(str, str)
+
+ :param defined_tags:
+ The value to assign to the defined_tags property of this UpdateCustomProtectionRuleDetails.
+ :type defined_tags: dict(str, dict(str, object))
+
+ """
+ self.swagger_types = {
+ 'display_name': 'str',
+ 'description': 'str',
+ 'template': 'str',
+ 'freeform_tags': 'dict(str, str)',
+ 'defined_tags': 'dict(str, dict(str, object))'
+ }
+
+ self.attribute_map = {
+ 'display_name': 'displayName',
+ 'description': 'description',
+ 'template': 'template',
+ 'freeform_tags': 'freeformTags',
+ 'defined_tags': 'definedTags'
+ }
+
+ self._display_name = None
+ self._description = None
+ self._template = None
+ self._freeform_tags = None
+ self._defined_tags = None
+
+ @property
+ def display_name(self):
+ """
+ Gets the display_name of this UpdateCustomProtectionRuleDetails.
+ A user-friendly name for the Custom Protection rule.
+
+
+ :return: The display_name of this UpdateCustomProtectionRuleDetails.
+ :rtype: str
+ """
+ return self._display_name
+
+ @display_name.setter
+ def display_name(self, display_name):
+ """
+ Sets the display_name of this UpdateCustomProtectionRuleDetails.
+ A user-friendly name for the Custom Protection rule.
+
+
+ :param display_name: The display_name of this UpdateCustomProtectionRuleDetails.
+ :type: str
+ """
+ self._display_name = display_name
+
+ @property
+ def description(self):
+ """
+ Gets the description of this UpdateCustomProtectionRuleDetails.
+ A description for the Custom Protection rule.
+
+
+ :return: The description of this UpdateCustomProtectionRuleDetails.
+ :rtype: str
+ """
+ return self._description
+
+ @description.setter
+ def description(self, description):
+ """
+ Sets the description of this UpdateCustomProtectionRuleDetails.
+ A description for the Custom Protection rule.
+
+
+ :param description: The description of this UpdateCustomProtectionRuleDetails.
+ :type: str
+ """
+ self._description = description
+
+ @property
+ def template(self):
+ """
+ Gets the template of this UpdateCustomProtectionRuleDetails.
+ The template text of the Custom Protection rule. The syntax is based on ModSecurity Rule Language. Additionaly it needs to include two variables / placeholders which will be replaced during publishing.
+
+ - **{{mode}}** - rule action, defined by user in UI, like `OFF`, `DETECT` or `BLOCK`.
+
+ - **{{id_1}}** - unique rule ID which identifies a `SecRule`, generated by the system. Multiple IDs can be used by increasing the number of the variable for every `SecRule` defined in the template.
+
+ *Example usage:*
+ ```
+ SecRule REQUEST_COOKIES \"regex matching SQL injection - part 1/2\" \\
+ \"phase:2, \\
+ msg:'Detects chained SQL injection attempts 1/2.', \\
+ id: {{id_1}}, \\
+ ctl:ruleEngine={{mode}}, \\
+ deny\"
+ SecRule REQUEST_COOKIES \"regex matching SQL injection - part 2/2\" \\
+ \"phase:2, \\
+ msg:'Detects chained SQL injection attempts 2/2.', \\
+ id: {{id_2}}, \\
+ ctl:ruleEngine={{mode}}, \\
+ deny\"
+ ```
+ The example contains two `SecRules` each having distinct regex expression to match
+ `Cookie` header value during second input analysis phase.
+ The disruptive `deny` action takes effect only when `{{mode}}` is set to `BLOCK`.
+ The message is logged either when `{{mode}}` is set to `DETECT` or `BLOCK`.
+
+
+ For more information about ModSecurity's open source WAF rules, see `Mod Security's documentation`__.
+
+ __ https://www.modsecurity.org/CRS/Documentation/making.html
+
+
+ :return: The template of this UpdateCustomProtectionRuleDetails.
+ :rtype: str
+ """
+ return self._template
+
+ @template.setter
+ def template(self, template):
+ """
+ Sets the template of this UpdateCustomProtectionRuleDetails.
+ The template text of the Custom Protection rule. The syntax is based on ModSecurity Rule Language. Additionaly it needs to include two variables / placeholders which will be replaced during publishing.
+
+ - **{{mode}}** - rule action, defined by user in UI, like `OFF`, `DETECT` or `BLOCK`.
+
+ - **{{id_1}}** - unique rule ID which identifies a `SecRule`, generated by the system. Multiple IDs can be used by increasing the number of the variable for every `SecRule` defined in the template.
+
+ *Example usage:*
+ ```
+ SecRule REQUEST_COOKIES \"regex matching SQL injection - part 1/2\" \\
+ \"phase:2, \\
+ msg:'Detects chained SQL injection attempts 1/2.', \\
+ id: {{id_1}}, \\
+ ctl:ruleEngine={{mode}}, \\
+ deny\"
+ SecRule REQUEST_COOKIES \"regex matching SQL injection - part 2/2\" \\
+ \"phase:2, \\
+ msg:'Detects chained SQL injection attempts 2/2.', \\
+ id: {{id_2}}, \\
+ ctl:ruleEngine={{mode}}, \\
+ deny\"
+ ```
+ The example contains two `SecRules` each having distinct regex expression to match
+ `Cookie` header value during second input analysis phase.
+ The disruptive `deny` action takes effect only when `{{mode}}` is set to `BLOCK`.
+ The message is logged either when `{{mode}}` is set to `DETECT` or `BLOCK`.
+
+
+ For more information about ModSecurity's open source WAF rules, see `Mod Security's documentation`__.
+
+ __ https://www.modsecurity.org/CRS/Documentation/making.html
+
+
+ :param template: The template of this UpdateCustomProtectionRuleDetails.
+ :type: str
+ """
+ self._template = template
+
+ @property
+ def freeform_tags(self):
+ """
+ Gets the freeform_tags of this UpdateCustomProtectionRuleDetails.
+ Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace.
+ For more information, see `Resource Tags`__.
+
+ Example: `{\"Department\": \"Finance\"}`
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm
+
+
+ :return: The freeform_tags of this UpdateCustomProtectionRuleDetails.
+ :rtype: dict(str, str)
+ """
+ return self._freeform_tags
+
+ @freeform_tags.setter
+ def freeform_tags(self, freeform_tags):
+ """
+ Sets the freeform_tags of this UpdateCustomProtectionRuleDetails.
+ Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace.
+ For more information, see `Resource Tags`__.
+
+ Example: `{\"Department\": \"Finance\"}`
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm
+
+
+ :param freeform_tags: The freeform_tags of this UpdateCustomProtectionRuleDetails.
+ :type: dict(str, str)
+ """
+ self._freeform_tags = freeform_tags
+
+ @property
+ def defined_tags(self):
+ """
+ Gets the defined_tags of this UpdateCustomProtectionRuleDetails.
+ Defined tags for this resource. Each key is predefined and scoped to a namespace.
+ For more information, see `Resource Tags`__.
+
+ Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm
+
+
+ :return: The defined_tags of this UpdateCustomProtectionRuleDetails.
+ :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 UpdateCustomProtectionRuleDetails.
+ Defined tags for this resource. Each key is predefined and scoped to a namespace.
+ For more information, see `Resource Tags`__.
+
+ Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm
+
+
+ :param defined_tags: The defined_tags of this UpdateCustomProtectionRuleDetails.
+ :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/waas/models/update_waas_policy_details.py b/src/oci/waas/models/update_waas_policy_details.py
index d88c86cdf7..c32a2bcb6a 100644
--- a/src/oci/waas/models/update_waas_policy_details.py
+++ b/src/oci/waas/models/update_waas_policy_details.py
@@ -31,6 +31,10 @@ def __init__(self, **kwargs):
The value to assign to the origins property of this UpdateWaasPolicyDetails.
:type origins: dict(str, Origin)
+ :param origin_groups:
+ The value to assign to the origin_groups property of this UpdateWaasPolicyDetails.
+ :type origin_groups: dict(str, OriginGroup)
+
:param policy_config:
The value to assign to the policy_config property of this UpdateWaasPolicyDetails.
:type policy_config: PolicyConfig
@@ -52,6 +56,7 @@ def __init__(self, **kwargs):
'display_name': 'str',
'additional_domains': 'list[str]',
'origins': 'dict(str, Origin)',
+ 'origin_groups': 'dict(str, OriginGroup)',
'policy_config': 'PolicyConfig',
'waf_config': 'WafConfig',
'freeform_tags': 'dict(str, str)',
@@ -62,6 +67,7 @@ def __init__(self, **kwargs):
'display_name': 'displayName',
'additional_domains': 'additionalDomains',
'origins': 'origins',
+ 'origin_groups': 'originGroups',
'policy_config': 'policyConfig',
'waf_config': 'wafConfig',
'freeform_tags': 'freeformTags',
@@ -71,6 +77,7 @@ def __init__(self, **kwargs):
self._display_name = None
self._additional_domains = None
self._origins = None
+ self._origin_groups = None
self._policy_config = None
self._waf_config = None
self._freeform_tags = None
@@ -148,6 +155,30 @@ def origins(self, origins):
"""
self._origins = origins
+ @property
+ def origin_groups(self):
+ """
+ Gets the origin_groups of this UpdateWaasPolicyDetails.
+ The map of origin groups and their keys used to associate origins to the wafConfig.
+
+
+ :return: The origin_groups of this UpdateWaasPolicyDetails.
+ :rtype: dict(str, OriginGroup)
+ """
+ return self._origin_groups
+
+ @origin_groups.setter
+ def origin_groups(self, origin_groups):
+ """
+ Sets the origin_groups of this UpdateWaasPolicyDetails.
+ The map of origin groups and their keys used to associate origins to the wafConfig.
+
+
+ :param origin_groups: The origin_groups of this UpdateWaasPolicyDetails.
+ :type: dict(str, OriginGroup)
+ """
+ self._origin_groups = origin_groups
+
@property
def policy_config(self):
"""
diff --git a/src/oci/waas/models/waas_policy.py b/src/oci/waas/models/waas_policy.py
index d2aae87268..a43fa72f04 100644
--- a/src/oci/waas/models/waas_policy.py
+++ b/src/oci/waas/models/waas_policy.py
@@ -81,6 +81,10 @@ def __init__(self, **kwargs):
The value to assign to the origins property of this WaasPolicy.
:type origins: dict(str, Origin)
+ :param origin_groups:
+ The value to assign to the origin_groups property of this WaasPolicy.
+ :type origin_groups: dict(str, OriginGroup)
+
:param policy_config:
The value to assign to the policy_config property of this WaasPolicy.
:type policy_config: PolicyConfig
@@ -108,6 +112,7 @@ def __init__(self, **kwargs):
'lifecycle_state': 'str',
'time_created': 'datetime',
'origins': 'dict(str, Origin)',
+ 'origin_groups': 'dict(str, OriginGroup)',
'policy_config': 'PolicyConfig',
'waf_config': 'WafConfig',
'freeform_tags': 'dict(str, str)',
@@ -124,6 +129,7 @@ def __init__(self, **kwargs):
'lifecycle_state': 'lifecycleState',
'time_created': 'timeCreated',
'origins': 'origins',
+ 'origin_groups': 'originGroups',
'policy_config': 'policyConfig',
'waf_config': 'wafConfig',
'freeform_tags': 'freeformTags',
@@ -139,6 +145,7 @@ def __init__(self, **kwargs):
self._lifecycle_state = None
self._time_created = None
self._origins = None
+ self._origin_groups = None
self._policy_config = None
self._waf_config = None
self._freeform_tags = None
@@ -374,6 +381,30 @@ def origins(self, origins):
"""
self._origins = origins
+ @property
+ def origin_groups(self):
+ """
+ Gets the origin_groups of this WaasPolicy.
+ The map of origin groups and their keys used to associate origins to the wafConfig.
+
+
+ :return: The origin_groups of this WaasPolicy.
+ :rtype: dict(str, OriginGroup)
+ """
+ return self._origin_groups
+
+ @origin_groups.setter
+ def origin_groups(self, origin_groups):
+ """
+ Sets the origin_groups of this WaasPolicy.
+ The map of origin groups and their keys used to associate origins to the wafConfig.
+
+
+ :param origin_groups: The origin_groups of this WaasPolicy.
+ :type: dict(str, OriginGroup)
+ """
+ self._origin_groups = origin_groups
+
@property
def policy_config(self):
"""
diff --git a/src/oci/waas/models/waas_policy_custom_protection_rule_summary.py b/src/oci/waas/models/waas_policy_custom_protection_rule_summary.py
new file mode 100644
index 0000000000..bbf87b8649
--- /dev/null
+++ b/src/oci/waas/models/waas_policy_custom_protection_rule_summary.py
@@ -0,0 +1,186 @@
+# coding: utf-8
+# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
+
+
+from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401
+from oci.decorators import init_model_state_from_kwargs
+
+
+@init_model_state_from_kwargs
+class WaasPolicyCustomProtectionRuleSummary(object):
+ """
+ Summary information about a Custom Protection rule.
+ """
+
+ #: A constant which can be used with the action property of a WaasPolicyCustomProtectionRuleSummary.
+ #: This constant has a value of "DETECT"
+ ACTION_DETECT = "DETECT"
+
+ #: A constant which can be used with the action property of a WaasPolicyCustomProtectionRuleSummary.
+ #: This constant has a value of "BLOCK"
+ ACTION_BLOCK = "BLOCK"
+
+ def __init__(self, **kwargs):
+ """
+ Initializes a new WaasPolicyCustomProtectionRuleSummary 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 WaasPolicyCustomProtectionRuleSummary.
+ :type id: str
+
+ :param display_name:
+ The value to assign to the display_name property of this WaasPolicyCustomProtectionRuleSummary.
+ :type display_name: str
+
+ :param action:
+ The value to assign to the action property of this WaasPolicyCustomProtectionRuleSummary.
+ Allowed values for this property are: "DETECT", "BLOCK", 'UNKNOWN_ENUM_VALUE'.
+ Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
+ :type action: str
+
+ :param mod_security_rule_ids:
+ The value to assign to the mod_security_rule_ids property of this WaasPolicyCustomProtectionRuleSummary.
+ :type mod_security_rule_ids: list[str]
+
+ """
+ self.swagger_types = {
+ 'id': 'str',
+ 'display_name': 'str',
+ 'action': 'str',
+ 'mod_security_rule_ids': 'list[str]'
+ }
+
+ self.attribute_map = {
+ 'id': 'id',
+ 'display_name': 'displayName',
+ 'action': 'action',
+ 'mod_security_rule_ids': 'modSecurityRuleIds'
+ }
+
+ self._id = None
+ self._display_name = None
+ self._action = None
+ self._mod_security_rule_ids = None
+
+ @property
+ def id(self):
+ """
+ Gets the id of this WaasPolicyCustomProtectionRuleSummary.
+ The `OCID`__ of the Custom Protection rule.
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
+
+
+ :return: The id of this WaasPolicyCustomProtectionRuleSummary.
+ :rtype: str
+ """
+ return self._id
+
+ @id.setter
+ def id(self, id):
+ """
+ Sets the id of this WaasPolicyCustomProtectionRuleSummary.
+ The `OCID`__ of the Custom Protection rule.
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
+
+
+ :param id: The id of this WaasPolicyCustomProtectionRuleSummary.
+ :type: str
+ """
+ self._id = id
+
+ @property
+ def display_name(self):
+ """
+ Gets the display_name of this WaasPolicyCustomProtectionRuleSummary.
+ The user-friendly name of the Custom Protection rule.
+
+
+ :return: The display_name of this WaasPolicyCustomProtectionRuleSummary.
+ :rtype: str
+ """
+ return self._display_name
+
+ @display_name.setter
+ def display_name(self, display_name):
+ """
+ Sets the display_name of this WaasPolicyCustomProtectionRuleSummary.
+ The user-friendly name of the Custom Protection rule.
+
+
+ :param display_name: The display_name of this WaasPolicyCustomProtectionRuleSummary.
+ :type: str
+ """
+ self._display_name = display_name
+
+ @property
+ def action(self):
+ """
+ Gets the action of this WaasPolicyCustomProtectionRuleSummary.
+ The action to take when the Custom Protection rule is triggered.
+
+ Allowed values for this property are: "DETECT", "BLOCK", 'UNKNOWN_ENUM_VALUE'.
+ Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
+
+
+ :return: The action of this WaasPolicyCustomProtectionRuleSummary.
+ :rtype: str
+ """
+ return self._action
+
+ @action.setter
+ def action(self, action):
+ """
+ Sets the action of this WaasPolicyCustomProtectionRuleSummary.
+ The action to take when the Custom Protection rule is triggered.
+
+
+ :param action: The action of this WaasPolicyCustomProtectionRuleSummary.
+ :type: str
+ """
+ allowed_values = ["DETECT", "BLOCK"]
+ if not value_allowed_none_or_none_sentinel(action, allowed_values):
+ action = 'UNKNOWN_ENUM_VALUE'
+ self._action = action
+
+ @property
+ def mod_security_rule_ids(self):
+ """
+ Gets the mod_security_rule_ids of this WaasPolicyCustomProtectionRuleSummary.
+ The list of the ModSecurity rule IDs that apply to this protection rule. For more information about ModSecurity's open source WAF rules, see `Mod Security's documentation`__.
+
+ __ https://www.modsecurity.org/CRS/Documentation/index.html
+
+
+ :return: The mod_security_rule_ids of this WaasPolicyCustomProtectionRuleSummary.
+ :rtype: list[str]
+ """
+ return self._mod_security_rule_ids
+
+ @mod_security_rule_ids.setter
+ def mod_security_rule_ids(self, mod_security_rule_ids):
+ """
+ Sets the mod_security_rule_ids of this WaasPolicyCustomProtectionRuleSummary.
+ The list of the ModSecurity rule IDs that apply to this protection rule. For more information about ModSecurity's open source WAF rules, see `Mod Security's documentation`__.
+
+ __ https://www.modsecurity.org/CRS/Documentation/index.html
+
+
+ :param mod_security_rule_ids: The mod_security_rule_ids of this WaasPolicyCustomProtectionRuleSummary.
+ :type: list[str]
+ """
+ self._mod_security_rule_ids = mod_security_rule_ids
+
+ 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/waas/models/waf_config.py b/src/oci/waas/models/waf_config.py
index 0b04aa091d..e0ce7998e4 100644
--- a/src/oci/waas/models/waf_config.py
+++ b/src/oci/waas/models/waf_config.py
@@ -49,6 +49,18 @@ def __init__(self, **kwargs):
The value to assign to the origin property of this WafConfig.
:type origin: str
+ :param caching_rules:
+ The value to assign to the caching_rules property of this WafConfig.
+ :type caching_rules: list[CachingRule]
+
+ :param custom_protection_rules:
+ The value to assign to the custom_protection_rules property of this WafConfig.
+ :type custom_protection_rules: list[CustomProtectionRuleSetting]
+
+ :param origin_groups:
+ The value to assign to the origin_groups property of this WafConfig.
+ :type origin_groups: list[str]
+
:param protection_rules:
The value to assign to the protection_rules property of this WafConfig.
:type protection_rules: list[ProtectionRule]
@@ -75,6 +87,9 @@ def __init__(self, **kwargs):
'human_interaction_challenge': 'HumanInteractionChallenge',
'js_challenge': 'JsChallenge',
'origin': 'str',
+ 'caching_rules': 'list[CachingRule]',
+ 'custom_protection_rules': 'list[CustomProtectionRuleSetting]',
+ 'origin_groups': 'list[str]',
'protection_rules': 'list[ProtectionRule]',
'protection_settings': 'ProtectionSettings',
'threat_feeds': 'list[ThreatFeed]',
@@ -90,6 +105,9 @@ def __init__(self, **kwargs):
'human_interaction_challenge': 'humanInteractionChallenge',
'js_challenge': 'jsChallenge',
'origin': 'origin',
+ 'caching_rules': 'cachingRules',
+ 'custom_protection_rules': 'customProtectionRules',
+ 'origin_groups': 'originGroups',
'protection_rules': 'protectionRules',
'protection_settings': 'protectionSettings',
'threat_feeds': 'threatFeeds',
@@ -104,6 +122,9 @@ def __init__(self, **kwargs):
self._human_interaction_challenge = None
self._js_challenge = None
self._origin = None
+ self._caching_rules = None
+ self._custom_protection_rules = None
+ self._origin_groups = None
self._protection_rules = None
self._protection_settings = None
self._threat_feeds = None
@@ -301,6 +322,78 @@ def origin(self, origin):
"""
self._origin = origin
+ @property
+ def caching_rules(self):
+ """
+ Gets the caching_rules of this WafConfig.
+ A list of caching rules applied to the web application.
+
+
+ :return: The caching_rules of this WafConfig.
+ :rtype: list[CachingRule]
+ """
+ return self._caching_rules
+
+ @caching_rules.setter
+ def caching_rules(self, caching_rules):
+ """
+ Sets the caching_rules of this WafConfig.
+ A list of caching rules applied to the web application.
+
+
+ :param caching_rules: The caching_rules of this WafConfig.
+ :type: list[CachingRule]
+ """
+ self._caching_rules = caching_rules
+
+ @property
+ def custom_protection_rules(self):
+ """
+ Gets the custom_protection_rules of this WafConfig.
+ A list of the custom protection rule OCIDs and their actions.
+
+
+ :return: The custom_protection_rules of this WafConfig.
+ :rtype: list[CustomProtectionRuleSetting]
+ """
+ return self._custom_protection_rules
+
+ @custom_protection_rules.setter
+ def custom_protection_rules(self, custom_protection_rules):
+ """
+ Sets the custom_protection_rules of this WafConfig.
+ A list of the custom protection rule OCIDs and their actions.
+
+
+ :param custom_protection_rules: The custom_protection_rules of this WafConfig.
+ :type: list[CustomProtectionRuleSetting]
+ """
+ self._custom_protection_rules = custom_protection_rules
+
+ @property
+ def origin_groups(self):
+ """
+ Gets the origin_groups of this WafConfig.
+ The list of origin group references that provide support for additional origin servers. A list of combined unique origin servers from `origin` and `originGroups` will be used.
+
+
+ :return: The origin_groups of this WafConfig.
+ :rtype: list[str]
+ """
+ return self._origin_groups
+
+ @origin_groups.setter
+ def origin_groups(self, origin_groups):
+ """
+ Sets the origin_groups of this WafConfig.
+ The list of origin group references that provide support for additional origin servers. A list of combined unique origin servers from `origin` and `originGroups` will be used.
+
+
+ :param origin_groups: The origin_groups of this WafConfig.
+ :type: list[str]
+ """
+ self._origin_groups = origin_groups
+
@property
def protection_rules(self):
"""
diff --git a/src/oci/waas/models/waf_config_details.py b/src/oci/waas/models/waf_config_details.py
index 69333f796c..cf4700eb85 100644
--- a/src/oci/waas/models/waf_config_details.py
+++ b/src/oci/waas/models/waf_config_details.py
@@ -45,6 +45,18 @@ def __init__(self, **kwargs):
The value to assign to the origin property of this WafConfigDetails.
:type origin: str
+ :param caching_rules:
+ The value to assign to the caching_rules property of this WafConfigDetails.
+ :type caching_rules: list[CachingRule]
+
+ :param custom_protection_rules:
+ The value to assign to the custom_protection_rules property of this WafConfigDetails.
+ :type custom_protection_rules: list[CustomProtectionRuleSetting]
+
+ :param origin_groups:
+ The value to assign to the origin_groups property of this WafConfigDetails.
+ :type origin_groups: list[str]
+
:param protection_settings:
The value to assign to the protection_settings property of this WafConfigDetails.
:type protection_settings: ProtectionSettings
@@ -62,6 +74,9 @@ def __init__(self, **kwargs):
'human_interaction_challenge': 'HumanInteractionChallenge',
'js_challenge': 'JsChallenge',
'origin': 'str',
+ 'caching_rules': 'list[CachingRule]',
+ 'custom_protection_rules': 'list[CustomProtectionRuleSetting]',
+ 'origin_groups': 'list[str]',
'protection_settings': 'ProtectionSettings',
'whitelists': 'list[Whitelist]'
}
@@ -74,6 +89,9 @@ def __init__(self, **kwargs):
'human_interaction_challenge': 'humanInteractionChallenge',
'js_challenge': 'jsChallenge',
'origin': 'origin',
+ 'caching_rules': 'cachingRules',
+ 'custom_protection_rules': 'customProtectionRules',
+ 'origin_groups': 'originGroups',
'protection_settings': 'protectionSettings',
'whitelists': 'whitelists'
}
@@ -85,6 +103,9 @@ def __init__(self, **kwargs):
self._human_interaction_challenge = None
self._js_challenge = None
self._origin = None
+ self._caching_rules = None
+ self._custom_protection_rules = None
+ self._origin_groups = None
self._protection_settings = None
self._whitelists = None
@@ -256,6 +277,78 @@ def origin(self, origin):
"""
self._origin = origin
+ @property
+ def caching_rules(self):
+ """
+ Gets the caching_rules of this WafConfigDetails.
+ A list of caching rules applied to the web application.
+
+
+ :return: The caching_rules of this WafConfigDetails.
+ :rtype: list[CachingRule]
+ """
+ return self._caching_rules
+
+ @caching_rules.setter
+ def caching_rules(self, caching_rules):
+ """
+ Sets the caching_rules of this WafConfigDetails.
+ A list of caching rules applied to the web application.
+
+
+ :param caching_rules: The caching_rules of this WafConfigDetails.
+ :type: list[CachingRule]
+ """
+ self._caching_rules = caching_rules
+
+ @property
+ def custom_protection_rules(self):
+ """
+ Gets the custom_protection_rules of this WafConfigDetails.
+ A list of the custom protection rule OCIDs and their actions.
+
+
+ :return: The custom_protection_rules of this WafConfigDetails.
+ :rtype: list[CustomProtectionRuleSetting]
+ """
+ return self._custom_protection_rules
+
+ @custom_protection_rules.setter
+ def custom_protection_rules(self, custom_protection_rules):
+ """
+ Sets the custom_protection_rules of this WafConfigDetails.
+ A list of the custom protection rule OCIDs and their actions.
+
+
+ :param custom_protection_rules: The custom_protection_rules of this WafConfigDetails.
+ :type: list[CustomProtectionRuleSetting]
+ """
+ self._custom_protection_rules = custom_protection_rules
+
+ @property
+ def origin_groups(self):
+ """
+ Gets the origin_groups of this WafConfigDetails.
+ The list of origin group references that provide support for additional origin servers. A list of combined unique origin servers from `origin` and `originGroups` will be used.
+
+
+ :return: The origin_groups of this WafConfigDetails.
+ :rtype: list[str]
+ """
+ return self._origin_groups
+
+ @origin_groups.setter
+ def origin_groups(self, origin_groups):
+ """
+ Sets the origin_groups of this WafConfigDetails.
+ The list of origin group references that provide support for additional origin servers. A list of combined unique origin servers from `origin` and `originGroups` will be used.
+
+
+ :param origin_groups: The origin_groups of this WafConfigDetails.
+ :type: list[str]
+ """
+ self._origin_groups = origin_groups
+
@property
def protection_settings(self):
"""
diff --git a/src/oci/waas/models/work_request.py b/src/oci/waas/models/work_request.py
index 8bb4ca72ce..46e80a0ee1 100644
--- a/src/oci/waas/models/work_request.py
+++ b/src/oci/waas/models/work_request.py
@@ -26,6 +26,22 @@ class WorkRequest(object):
#: This constant has a value of "DELETE_WAAS_POLICY"
OPERATION_TYPE_DELETE_WAAS_POLICY = "DELETE_WAAS_POLICY"
+ #: A constant which can be used with the operation_type property of a WorkRequest.
+ #: This constant has a value of "PURGE_WAAS_POLICY_CACHE"
+ OPERATION_TYPE_PURGE_WAAS_POLICY_CACHE = "PURGE_WAAS_POLICY_CACHE"
+
+ #: A constant which can be used with the operation_type property of a WorkRequest.
+ #: This constant has a value of "CREATE_CUSTOM_PROTECTION_RULE"
+ OPERATION_TYPE_CREATE_CUSTOM_PROTECTION_RULE = "CREATE_CUSTOM_PROTECTION_RULE"
+
+ #: A constant which can be used with the operation_type property of a WorkRequest.
+ #: This constant has a value of "UPDATE_CUSTOM_PROTECTION_RULE"
+ OPERATION_TYPE_UPDATE_CUSTOM_PROTECTION_RULE = "UPDATE_CUSTOM_PROTECTION_RULE"
+
+ #: A constant which can be used with the operation_type property of a WorkRequest.
+ #: This constant has a value of "DELETE_CUSTOM_PROTECTION_RULE"
+ OPERATION_TYPE_DELETE_CUSTOM_PROTECTION_RULE = "DELETE_CUSTOM_PROTECTION_RULE"
+
#: A constant which can be used with the status property of a WorkRequest.
#: This constant has a value of "ACCEPTED"
STATUS_ACCEPTED = "ACCEPTED"
@@ -61,7 +77,7 @@ def __init__(self, **kwargs):
:param operation_type:
The value to assign to the operation_type property of this WorkRequest.
- Allowed values for this property are: "CREATE_WAAS_POLICY", "UPDATE_WAAS_POLICY", "DELETE_WAAS_POLICY", 'UNKNOWN_ENUM_VALUE'.
+ Allowed values for this property are: "CREATE_WAAS_POLICY", "UPDATE_WAAS_POLICY", "DELETE_WAAS_POLICY", "PURGE_WAAS_POLICY_CACHE", "CREATE_CUSTOM_PROTECTION_RULE", "UPDATE_CUSTOM_PROTECTION_RULE", "DELETE_CUSTOM_PROTECTION_RULE", 'UNKNOWN_ENUM_VALUE'.
Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
:type operation_type: str
@@ -178,7 +194,7 @@ def operation_type(self):
**[Required]** Gets the operation_type of this WorkRequest.
A description of the operation requested by the work request.
- Allowed values for this property are: "CREATE_WAAS_POLICY", "UPDATE_WAAS_POLICY", "DELETE_WAAS_POLICY", 'UNKNOWN_ENUM_VALUE'.
+ Allowed values for this property are: "CREATE_WAAS_POLICY", "UPDATE_WAAS_POLICY", "DELETE_WAAS_POLICY", "PURGE_WAAS_POLICY_CACHE", "CREATE_CUSTOM_PROTECTION_RULE", "UPDATE_CUSTOM_PROTECTION_RULE", "DELETE_CUSTOM_PROTECTION_RULE", 'UNKNOWN_ENUM_VALUE'.
Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
@@ -197,7 +213,7 @@ def operation_type(self, operation_type):
:param operation_type: The operation_type of this WorkRequest.
:type: str
"""
- allowed_values = ["CREATE_WAAS_POLICY", "UPDATE_WAAS_POLICY", "DELETE_WAAS_POLICY"]
+ allowed_values = ["CREATE_WAAS_POLICY", "UPDATE_WAAS_POLICY", "DELETE_WAAS_POLICY", "PURGE_WAAS_POLICY_CACHE", "CREATE_CUSTOM_PROTECTION_RULE", "UPDATE_CUSTOM_PROTECTION_RULE", "DELETE_CUSTOM_PROTECTION_RULE"]
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/waas/models/work_request_summary.py b/src/oci/waas/models/work_request_summary.py
index 88ecc9b7a7..7d1a9e3072 100644
--- a/src/oci/waas/models/work_request_summary.py
+++ b/src/oci/waas/models/work_request_summary.py
@@ -24,6 +24,22 @@ class WorkRequestSummary(object):
#: This constant has a value of "DELETE_WAAS_POLICY"
OPERATION_TYPE_DELETE_WAAS_POLICY = "DELETE_WAAS_POLICY"
+ #: A constant which can be used with the operation_type property of a WorkRequestSummary.
+ #: This constant has a value of "PURGE_WAAS_POLICY_CACHE"
+ OPERATION_TYPE_PURGE_WAAS_POLICY_CACHE = "PURGE_WAAS_POLICY_CACHE"
+
+ #: A constant which can be used with the operation_type property of a WorkRequestSummary.
+ #: This constant has a value of "CREATE_CUSTOM_PROTECTION_RULE"
+ OPERATION_TYPE_CREATE_CUSTOM_PROTECTION_RULE = "CREATE_CUSTOM_PROTECTION_RULE"
+
+ #: A constant which can be used with the operation_type property of a WorkRequestSummary.
+ #: This constant has a value of "UPDATE_CUSTOM_PROTECTION_RULE"
+ OPERATION_TYPE_UPDATE_CUSTOM_PROTECTION_RULE = "UPDATE_CUSTOM_PROTECTION_RULE"
+
+ #: A constant which can be used with the operation_type property of a WorkRequestSummary.
+ #: This constant has a value of "DELETE_CUSTOM_PROTECTION_RULE"
+ OPERATION_TYPE_DELETE_CUSTOM_PROTECTION_RULE = "DELETE_CUSTOM_PROTECTION_RULE"
+
#: A constant which can be used with the status property of a WorkRequestSummary.
#: This constant has a value of "ACCEPTED"
STATUS_ACCEPTED = "ACCEPTED"
@@ -59,7 +75,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: "CREATE_WAAS_POLICY", "UPDATE_WAAS_POLICY", "DELETE_WAAS_POLICY", 'UNKNOWN_ENUM_VALUE'.
+ Allowed values for this property are: "CREATE_WAAS_POLICY", "UPDATE_WAAS_POLICY", "DELETE_WAAS_POLICY", "PURGE_WAAS_POLICY_CACHE", "CREATE_CUSTOM_PROTECTION_RULE", "UPDATE_CUSTOM_PROTECTION_RULE", "DELETE_CUSTOM_PROTECTION_RULE", 'UNKNOWN_ENUM_VALUE'.
Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
:type operation_type: str
@@ -162,7 +178,7 @@ def operation_type(self):
**[Required]** Gets the operation_type of this WorkRequestSummary.
A description of the operation requested by the work request.
- Allowed values for this property are: "CREATE_WAAS_POLICY", "UPDATE_WAAS_POLICY", "DELETE_WAAS_POLICY", 'UNKNOWN_ENUM_VALUE'.
+ Allowed values for this property are: "CREATE_WAAS_POLICY", "UPDATE_WAAS_POLICY", "DELETE_WAAS_POLICY", "PURGE_WAAS_POLICY_CACHE", "CREATE_CUSTOM_PROTECTION_RULE", "UPDATE_CUSTOM_PROTECTION_RULE", "DELETE_CUSTOM_PROTECTION_RULE", 'UNKNOWN_ENUM_VALUE'.
Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
@@ -181,7 +197,7 @@ def operation_type(self, operation_type):
:param operation_type: The operation_type of this WorkRequestSummary.
:type: str
"""
- allowed_values = ["CREATE_WAAS_POLICY", "UPDATE_WAAS_POLICY", "DELETE_WAAS_POLICY"]
+ allowed_values = ["CREATE_WAAS_POLICY", "UPDATE_WAAS_POLICY", "DELETE_WAAS_POLICY", "PURGE_WAAS_POLICY_CACHE", "CREATE_CUSTOM_PROTECTION_RULE", "UPDATE_CUSTOM_PROTECTION_RULE", "DELETE_CUSTOM_PROTECTION_RULE"]
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/waas/waas_client.py b/src/oci/waas/waas_client.py
index 499412b449..6fd49d090b 100644
--- a/src/oci/waas/waas_client.py
+++ b/src/oci/waas/waas_client.py
@@ -252,18 +252,18 @@ def cancel_work_request(self, work_request_id, **kwargs):
path_params=path_params,
header_params=header_params)
- def change_certificate_compartment(self, certificate_id, change_certificate_compartment_details, **kwargs):
+ def change_address_list_compartment(self, address_list_id, change_address_list_compartment_details, **kwargs):
"""
- Moves certificate into a different compartment.
- Moves certificate into a different compartment. When provided, If-Match is checked against ETag values of the certificate.
+ Moves address list into a different compartment.
+ Moves address list into a different compartment. When provided, If-Match is checked against ETag values of the address list.
- :param str certificate_id: (required)
- The `OCID`__ of the SSL certificate used in the WAAS policy. This number is generated when the certificate is added to the policy.
+ :param str address_list_id: (required)
+ The `OCID`__ of the address list. This number is generated when the address list is added to the compartment.
__ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
- :param ChangeCertificateCompartmentDetails change_certificate_compartment_details: (required)
+ :param ChangeAddressListCompartmentDetails change_address_list_compartment_details: (required)
: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 provided matches the resource's current etag value.
@@ -286,7 +286,7 @@ def change_certificate_compartment(self, certificate_id, change_certificate_comp
:return: A :class:`~oci.response.Response` object with data of type None
:rtype: :class:`~oci.response.Response`
"""
- resource_path = "/certificates/{certificateId}/actions/changeCompartment"
+ resource_path = "/addressLists/{addressListId}/actions/changeCompartment"
method = "POST"
# Don't accept unknown kwargs
@@ -299,10 +299,10 @@ def change_certificate_compartment(self, certificate_id, change_certificate_comp
extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- "change_certificate_compartment got unknown kwargs: {!r}".format(extra_kwargs))
+ "change_address_list_compartment got unknown kwargs: {!r}".format(extra_kwargs))
path_params = {
- "certificateId": certificate_id
+ "addressListId": address_list_id
}
path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
@@ -333,27 +333,27 @@ def change_certificate_compartment(self, certificate_id, change_certificate_comp
method=method,
path_params=path_params,
header_params=header_params,
- body=change_certificate_compartment_details)
+ body=change_address_list_compartment_details)
else:
return self.base_client.call_api(
resource_path=resource_path,
method=method,
path_params=path_params,
header_params=header_params,
- body=change_certificate_compartment_details)
+ body=change_address_list_compartment_details)
- def change_waas_policy_compartment(self, waas_policy_id, change_waas_policy_compartment_details, **kwargs):
+ def change_certificate_compartment(self, certificate_id, change_certificate_compartment_details, **kwargs):
"""
- Moves WAAS policy into a different compartment.
- Moves WAAS policy into a different compartment. When provided, If-Match is checked against ETag values of the WAAS policy.
+ Moves certificate into a different compartment.
+ Moves certificate into a different compartment. When provided, If-Match is checked against ETag values of the certificate.
- :param str waas_policy_id: (required)
- The `OCID`__ of the WAAS policy.
+ :param str certificate_id: (required)
+ The `OCID`__ of the SSL certificate used in the WAAS policy. This number is generated when the certificate is added to the policy.
__ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
- :param ChangeWaasPolicyCompartmentDetails change_waas_policy_compartment_details: (required)
+ :param ChangeCertificateCompartmentDetails change_certificate_compartment_details: (required)
: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 provided matches the resource's current etag value.
@@ -376,7 +376,7 @@ def change_waas_policy_compartment(self, waas_policy_id, change_waas_policy_comp
:return: A :class:`~oci.response.Response` object with data of type None
:rtype: :class:`~oci.response.Response`
"""
- resource_path = "/waasPolicies/{waasPolicyId}/actions/changeCompartment"
+ resource_path = "/certificates/{certificateId}/actions/changeCompartment"
method = "POST"
# Don't accept unknown kwargs
@@ -389,10 +389,10 @@ def change_waas_policy_compartment(self, waas_policy_id, change_waas_policy_comp
extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- "change_waas_policy_compartment got unknown kwargs: {!r}".format(extra_kwargs))
+ "change_certificate_compartment got unknown kwargs: {!r}".format(extra_kwargs))
path_params = {
- "waasPolicyId": waas_policy_id
+ "certificateId": certificate_id
}
path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
@@ -423,27 +423,30 @@ def change_waas_policy_compartment(self, waas_policy_id, change_waas_policy_comp
method=method,
path_params=path_params,
header_params=header_params,
- body=change_waas_policy_compartment_details)
+ body=change_certificate_compartment_details)
else:
return self.base_client.call_api(
resource_path=resource_path,
method=method,
path_params=path_params,
header_params=header_params,
- body=change_waas_policy_compartment_details)
+ body=change_certificate_compartment_details)
- def create_certificate(self, create_certificate_details, **kwargs):
+ def change_custom_protection_rule_compartment(self, custom_protection_rule_id, change_custom_protection_rule_compartment_details, **kwargs):
"""
- Creates a certificate resource for the uploaded X.509 certificate.
- Allows an SSL certificate to be added to a WAAS policy. The Web Application Firewall terminates SSL connections to inspect requests in runtime, and then re-encrypts requests before sending them to the origin for fulfillment.
+ Moves Custom Protection rule into a different compartment.
+ Moves Custom Protection rule into a different compartment. When provided, If-Match is checked against ETag values of the Custom Protection rule.
- For more information, see `WAF Settings`__.
- __ https://docs.cloud.oracle.com/iaas/Content/WAF/Tasks/wafsettings.htm
+ :param str custom_protection_rule_id: (required)
+ The `OCID`__ of the Custom Protection rule. This number is generated when the Custom Protection rule is added to the compartment.
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
- :param CreateCertificateDetails create_certificate_details: (required)
- The details of the SSL certificate resource to create.
+ :param ChangeCustomProtectionRuleCompartmentDetails change_custom_protection_rule_compartment_details: (required)
+
+ :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 provided matches the resource's current etag value.
:param str opc_request_id: (optional)
The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
@@ -460,26 +463,38 @@ def create_certificate(self, create_certificate_details, **kwargs):
To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.waas.models.Certificate`
+ :return: A :class:`~oci.response.Response` object with data of type None
:rtype: :class:`~oci.response.Response`
"""
- resource_path = "/certificates"
+ resource_path = "/customProtectionRules/{customProtectionRuleId}/actions/changeCompartment"
method = "POST"
# Don't accept unknown kwargs
expected_kwargs = [
"retry_strategy",
+ "if_match",
"opc_request_id",
"opc_retry_token"
]
extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- "create_certificate got unknown kwargs: {!r}".format(extra_kwargs))
+ "change_custom_protection_rule_compartment got unknown kwargs: {!r}".format(extra_kwargs))
+
+ path_params = {
+ "customProtectionRuleId": custom_protection_rule_id
+ }
+
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
+
+ for (k, v) in six.iteritems(path_params):
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
+ raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
header_params = {
"accept": "application/json",
"content-type": "application/json",
+ "if-match": kwargs.get("if_match", missing),
"opc-request-id": kwargs.get("opc_request_id", missing),
"opc-retry-token": kwargs.get("opc_retry_token", missing)
}
@@ -496,40 +511,32 @@ def create_certificate(self, create_certificate_details, **kwargs):
self.base_client.call_api,
resource_path=resource_path,
method=method,
+ path_params=path_params,
header_params=header_params,
- body=create_certificate_details,
- response_type="Certificate")
+ body=change_custom_protection_rule_compartment_details)
else:
return self.base_client.call_api(
resource_path=resource_path,
method=method,
+ path_params=path_params,
header_params=header_params,
- body=create_certificate_details,
- response_type="Certificate")
+ body=change_custom_protection_rule_compartment_details)
- def create_waas_policy(self, create_waas_policy_details, **kwargs):
+ def change_waas_policy_compartment(self, waas_policy_id, change_waas_policy_compartment_details, **kwargs):
"""
- Creates a new policy in the specified compartment.
- Creates a new Web Application Acceleration and Security (WAAS) policy in the specified compartment. A WAAS policy must be established before creating Web Application Firewall (WAF) rules. To use WAF rules, your web application's origin servers must defined in the `WaasPolicy` schema.
-
- A domain name must be specified when creating a WAAS policy. The domain name should be different from the origins specified in your `WaasPolicy`. Once domain name is entered and stored, it is unchangeable.
-
- Use the record data returned in the `cname` field of the `WaasPolicy` object to create a CNAME record in your DNS configuration that will direct your domain's traffic through the WAF.
-
- For the purposes of access control, you must provide the OCID of the compartment where you want the service to reside. For information about access control and compartments, see `Overview of the IAM Service`__.
-
- You must specify a display name and domain for the WAAS policy. The display name does not have to be unique and can be changed. The domain name should be different from every origin specified in `WaasPolicy`.
+ Moves WAAS policy into a different compartment.
+ Moves WAAS policy into a different compartment. When provided, If-Match is checked against ETag values of the WAAS policy.
- All Oracle Cloud Infrastructure resources, including WAAS policies, receive a unique, Oracle-assigned ID called an Oracle Cloud Identifier (OCID). When a resource is created, you can find its OCID in the response. You can also retrieve a resource's OCID by using a list API operation for that resource type, or by viewing the resource in the Console. Fore more information, see `Resource Identifiers`__.
- **Note:** After sending the POST request, the new object's state will temporarily be `CREATING`. Ensure that the resource's state has changed to `ACTIVE` before use.
+ :param str waas_policy_id: (required)
+ The `OCID`__ of the WAAS policy.
- __ https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm
- __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
+ :param ChangeWaasPolicyCompartmentDetails change_waas_policy_compartment_details: (required)
- :param CreateWaasPolicyDetails create_waas_policy_details: (required)
- The details of the WAAS policy.
+ :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 provided matches the resource's current etag value.
:param str opc_request_id: (optional)
The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
@@ -549,23 +556,35 @@ def create_waas_policy(self, create_waas_policy_details, **kwargs):
:return: A :class:`~oci.response.Response` object with data of type None
:rtype: :class:`~oci.response.Response`
"""
- resource_path = "/waasPolicies"
+ resource_path = "/waasPolicies/{waasPolicyId}/actions/changeCompartment"
method = "POST"
# Don't accept unknown kwargs
expected_kwargs = [
"retry_strategy",
+ "if_match",
"opc_request_id",
"opc_retry_token"
]
extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- "create_waas_policy got unknown kwargs: {!r}".format(extra_kwargs))
+ "change_waas_policy_compartment got unknown kwargs: {!r}".format(extra_kwargs))
+
+ path_params = {
+ "waasPolicyId": waas_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('Parameter {} cannot be None, whitespace or empty string'.format(k))
header_params = {
"accept": "application/json",
"content-type": "application/json",
+ "if-match": kwargs.get("if_match", missing),
"opc-request-id": kwargs.get("opc_request_id", missing),
"opc-retry-token": kwargs.get("opc_retry_token", missing)
}
@@ -582,25 +601,28 @@ def create_waas_policy(self, create_waas_policy_details, **kwargs):
self.base_client.call_api,
resource_path=resource_path,
method=method,
+ path_params=path_params,
header_params=header_params,
- body=create_waas_policy_details)
+ body=change_waas_policy_compartment_details)
else:
return self.base_client.call_api(
resource_path=resource_path,
method=method,
+ path_params=path_params,
header_params=header_params,
- body=create_waas_policy_details)
+ body=change_waas_policy_compartment_details)
- def delete_certificate(self, certificate_id, **kwargs):
+ def create_address_list(self, create_address_list_details, **kwargs):
"""
- Deletes a certificate.
- Deletes an SSL certificate from the WAAS service.
+ Creates an address list.
+ Creates an address list in set compartment and allows it to be used in a WAAS policy.
+ For more information, see `WAF Settings`__.
+ __ https://docs.cloud.oracle.com/iaas/Content/WAF/Tasks/wafsettings.htm
- :param str certificate_id: (required)
- The `OCID`__ of the SSL certificate used in the WAAS policy. This number is generated when the certificate is added to the policy.
- __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
+ :param CreateAddressListDetails create_address_list_details: (required)
+ The details of the address list resource to create.
:param str opc_request_id: (optional)
The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
@@ -609,9 +631,6 @@ def delete_certificate(self, certificate_id, **kwargs):
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
*Example:* If a resource has been deleted and purged from the system, then a retry of the original delete request may be rejected.
- :param str if_match: (optional)
- For optimistic concurrency control. In the `PUT` or `DELETE` call for a resource, set the `if-match` parameter to the value of the etag from a previous `GET` or `POST` response for that resource. The resource will be updated or deleted only if the etag provided 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.
@@ -620,40 +639,28 @@ def delete_certificate(self, certificate_id, **kwargs):
To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
- :return: A :class:`~oci.response.Response` object with data of type None
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.waas.models.AddressList`
:rtype: :class:`~oci.response.Response`
"""
- resource_path = "/certificates/{certificateId}"
- method = "DELETE"
+ resource_path = "/addressLists"
+ method = "POST"
# Don't accept unknown kwargs
expected_kwargs = [
"retry_strategy",
"opc_request_id",
- "opc_retry_token",
- "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(
- "delete_certificate got unknown kwargs: {!r}".format(extra_kwargs))
-
- path_params = {
- "certificateId": certificate_id
- }
-
- path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
-
- for (k, v) in six.iteritems(path_params):
- if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
- raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
+ "create_address_list got unknown kwargs: {!r}".format(extra_kwargs))
header_params = {
"accept": "application/json",
"content-type": "application/json",
"opc-request-id": kwargs.get("opc_request_id", missing),
- "opc-retry-token": kwargs.get("opc_retry_token", missing),
- "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}
@@ -668,25 +675,29 @@ def delete_certificate(self, certificate_id, **kwargs):
self.base_client.call_api,
resource_path=resource_path,
method=method,
- path_params=path_params,
- header_params=header_params)
+ header_params=header_params,
+ body=create_address_list_details,
+ response_type="AddressList")
else:
return self.base_client.call_api(
resource_path=resource_path,
method=method,
- path_params=path_params,
- header_params=header_params)
+ header_params=header_params,
+ body=create_address_list_details,
+ response_type="AddressList")
- def delete_waas_policy(self, waas_policy_id, **kwargs):
+ def create_certificate(self, create_certificate_details, **kwargs):
"""
- Deletes a policy.
- Deletes a policy.
+ Creates a certificate resource for the uploaded X.509 certificate.
+ Allows an SSL certificate to be added to a WAAS policy. The Web Application Firewall terminates SSL connections to inspect requests in runtime, and then re-encrypts requests before sending them to the origin for fulfillment.
+ For more information, see `WAF Settings`__.
- :param str waas_policy_id: (required)
- The `OCID`__ of the WAAS policy.
+ __ https://docs.cloud.oracle.com/iaas/Content/WAF/Tasks/wafsettings.htm
- __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
+
+ :param CreateCertificateDetails create_certificate_details: (required)
+ The details of the SSL certificate resource to create.
:param str opc_request_id: (optional)
The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
@@ -695,9 +706,6 @@ def delete_waas_policy(self, waas_policy_id, **kwargs):
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
*Example:* If a resource has been deleted and purged from the system, then a retry of the original delete request may be rejected.
- :param str if_match: (optional)
- For optimistic concurrency control. In the `PUT` or `DELETE` call for a resource, set the `if-match` parameter to the value of the etag from a previous `GET` or `POST` response for that resource. The resource will be updated or deleted only if the etag provided 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.
@@ -706,40 +714,28 @@ def delete_waas_policy(self, waas_policy_id, **kwargs):
To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
- :return: A :class:`~oci.response.Response` object with data of type None
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.waas.models.Certificate`
:rtype: :class:`~oci.response.Response`
"""
- resource_path = "/waasPolicies/{waasPolicyId}"
- method = "DELETE"
+ resource_path = "/certificates"
+ method = "POST"
# Don't accept unknown kwargs
expected_kwargs = [
"retry_strategy",
"opc_request_id",
- "opc_retry_token",
- "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(
- "delete_waas_policy got unknown kwargs: {!r}".format(extra_kwargs))
-
- path_params = {
- "waasPolicyId": waas_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('Parameter {} cannot be None, whitespace or empty string'.format(k))
+ "create_certificate got unknown kwargs: {!r}".format(extra_kwargs))
header_params = {
"accept": "application/json",
"content-type": "application/json",
"opc-request-id": kwargs.get("opc_request_id", missing),
- "opc-retry-token": kwargs.get("opc_retry_token", missing),
- "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}
@@ -754,29 +750,33 @@ def delete_waas_policy(self, waas_policy_id, **kwargs):
self.base_client.call_api,
resource_path=resource_path,
method=method,
- path_params=path_params,
- header_params=header_params)
+ header_params=header_params,
+ body=create_certificate_details,
+ response_type="Certificate")
else:
return self.base_client.call_api(
resource_path=resource_path,
method=method,
- path_params=path_params,
- header_params=header_params)
+ header_params=header_params,
+ body=create_certificate_details,
+ response_type="Certificate")
- def get_certificate(self, certificate_id, **kwargs):
+ def create_custom_protection_rule(self, create_custom_protection_rule_details, **kwargs):
"""
- Returns the details of a certificate.
- Gets the details of an SSL certificate.
-
+ Creates a new Custom Protection rule in the specified compartment.
+ Creates a new Custom Protection rule in the specified compartment.
- :param str certificate_id: (required)
- The `OCID`__ of the SSL certificate used in the WAAS policy. This number is generated when the certificate is added to the policy.
- __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
+ :param CreateCustomProtectionRuleDetails create_custom_protection_rule_details: (required)
+ The details of the Custom Protection rule.
:param str opc_request_id: (optional)
The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
+ :param str opc_retry_token: (optional)
+ A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations
+ *Example:* If a resource has been deleted and purged from the system, then a retry of the original delete request may be rejected.
+
:param obj retry_strategy: (optional)
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
@@ -785,36 +785,28 @@ def get_certificate(self, certificate_id, **kwargs):
To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.waas.models.Certificate`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.waas.models.CustomProtectionRule`
:rtype: :class:`~oci.response.Response`
"""
- resource_path = "/certificates/{certificateId}"
- method = "GET"
+ resource_path = "/customProtectionRules"
+ method = "POST"
# Don't accept unknown kwargs
expected_kwargs = [
"retry_strategy",
- "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(
- "get_certificate got unknown kwargs: {!r}".format(extra_kwargs))
-
- path_params = {
- "certificateId": certificate_id
- }
-
- path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
-
- for (k, v) in six.iteritems(path_params):
- if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
- raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
+ "create_custom_protection_rule got unknown kwargs: {!r}".format(extra_kwargs))
header_params = {
"accept": "application/json",
"content-type": "application/json",
- "opc-request-id": kwargs.get("opc_request_id", missing)
+ "opc-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}
@@ -823,36 +815,55 @@ def get_certificate(self, certificate_id, **kwargs):
retry_strategy = kwargs.get('retry_strategy')
if retry_strategy:
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
+ self.base_client.add_opc_retry_token_if_needed(header_params)
return retry_strategy.make_retrying_call(
self.base_client.call_api,
resource_path=resource_path,
method=method,
- path_params=path_params,
header_params=header_params,
- response_type="Certificate")
+ body=create_custom_protection_rule_details,
+ response_type="CustomProtectionRule")
else:
return self.base_client.call_api(
resource_path=resource_path,
method=method,
- path_params=path_params,
header_params=header_params,
- response_type="Certificate")
+ body=create_custom_protection_rule_details,
+ response_type="CustomProtectionRule")
- def get_device_fingerprint_challenge(self, waas_policy_id, **kwargs):
+ def create_waas_policy(self, create_waas_policy_details, **kwargs):
"""
- Returns the device fingerprint challenge settings for the Web Application Firewall.
- Gets the device fingerprint challenge settings in the Web Application Firewall configuration for a WAAS policy.
+ Creates a new policy in the specified compartment.
+ Creates a new Web Application Acceleration and Security (WAAS) policy in the specified compartment. A WAAS policy must be established before creating Web Application Firewall (WAF) rules. To use WAF rules, your web application's origin servers must defined in the `WaasPolicy` schema.
+ A domain name must be specified when creating a WAAS policy. The domain name should be different from the origins specified in your `WaasPolicy`. Once domain name is entered and stored, it is unchangeable.
- :param str waas_policy_id: (required)
- The `OCID`__ of the WAAS policy.
+ Use the record data returned in the `cname` field of the `WaasPolicy` object to create a CNAME record in your DNS configuration that will direct your domain's traffic through the WAF.
- __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
+ For the purposes of access control, you must provide the OCID of the compartment where you want the service to reside. For information about access control and compartments, see `Overview of the IAM Service`__.
- :param str opc_request_id: (optional)
- The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
+ You must specify a display name and domain for the WAAS policy. The display name does not have to be unique and can be changed. The domain name should be different from every origin specified in `WaasPolicy`.
- :param obj retry_strategy: (optional)
+ All Oracle Cloud Infrastructure resources, including WAAS policies, receive a unique, Oracle-assigned ID called an Oracle Cloud Identifier (OCID). When a resource is created, you can find its OCID in the response. You can also retrieve a resource's OCID by using a list API operation for that resource type, or by viewing the resource in the Console. Fore more information, see `Resource Identifiers`__.
+
+ **Note:** After sending the POST request, the new object's state will temporarily be `CREATING`. Ensure that the resource's state has changed to `ACTIVE` before use.
+
+ __ https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm
+ __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
+
+
+ :param CreateWaasPolicyDetails create_waas_policy_details: (required)
+ The details of the WAAS policy.
+
+ :param str opc_request_id: (optional)
+ The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
+
+ :param str opc_retry_token: (optional)
+ A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations
+ *Example:* If a resource has been deleted and purged from the system, then a retry of the original delete request may be rejected.
+
+ :param obj retry_strategy: (optional)
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
This should be one of the strategies available in the :py:mod:`~oci.retry` module. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY`
@@ -860,36 +871,28 @@ def get_device_fingerprint_challenge(self, waas_policy_id, **kwargs):
To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.waas.models.DeviceFingerprintChallenge`
+ :return: A :class:`~oci.response.Response` object with data of type None
:rtype: :class:`~oci.response.Response`
"""
- resource_path = "/waasPolicies/{waasPolicyId}/wafConfig/deviceFingerprintChallenge"
- method = "GET"
+ resource_path = "/waasPolicies"
+ method = "POST"
# Don't accept unknown kwargs
expected_kwargs = [
"retry_strategy",
- "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(
- "get_device_fingerprint_challenge got unknown kwargs: {!r}".format(extra_kwargs))
-
- path_params = {
- "waasPolicyId": waas_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('Parameter {} cannot be None, whitespace or empty string'.format(k))
+ "create_waas_policy got unknown kwargs: {!r}".format(extra_kwargs))
header_params = {
"accept": "application/json",
"content-type": "application/json",
- "opc-request-id": kwargs.get("opc_request_id", missing)
+ "opc-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}
@@ -898,35 +901,42 @@ def get_device_fingerprint_challenge(self, waas_policy_id, **kwargs):
retry_strategy = kwargs.get('retry_strategy')
if retry_strategy:
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
+ self.base_client.add_opc_retry_token_if_needed(header_params)
return retry_strategy.make_retrying_call(
self.base_client.call_api,
resource_path=resource_path,
method=method,
- path_params=path_params,
header_params=header_params,
- response_type="DeviceFingerprintChallenge")
+ body=create_waas_policy_details)
else:
return self.base_client.call_api(
resource_path=resource_path,
method=method,
- path_params=path_params,
header_params=header_params,
- response_type="DeviceFingerprintChallenge")
+ body=create_waas_policy_details)
- def get_human_interaction_challenge(self, waas_policy_id, **kwargs):
+ def delete_address_list(self, address_list_id, **kwargs):
"""
- Returns the human interaction challenge settings for the Web Application Firewall.
- Gets the human interaction challenge settings in the Web Application Firewall configuration for a WAAS policy.
+ Deletes an address list.
+ Deletes the address list from the compartment if it is not used.
- :param str waas_policy_id: (required)
- The `OCID`__ of the WAAS policy.
+ :param str address_list_id: (required)
+ The `OCID`__ of the address list. This number is generated when the address list is added to the compartment.
__ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
:param str opc_request_id: (optional)
The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
+ :param str opc_retry_token: (optional)
+ A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations
+ *Example:* If a resource has been deleted and purged from the system, then a retry of the original delete request may be rejected.
+
+ :param str if_match: (optional)
+ For optimistic concurrency control. In the `PUT` or `DELETE` call for a resource, set the `if-match` parameter to the value of the etag from a previous `GET` or `POST` response for that resource. The resource will be updated or deleted only if the etag provided 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.
@@ -935,24 +945,26 @@ def get_human_interaction_challenge(self, waas_policy_id, **kwargs):
To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.waas.models.HumanInteractionChallenge`
+ :return: A :class:`~oci.response.Response` object with data of type None
:rtype: :class:`~oci.response.Response`
"""
- resource_path = "/waasPolicies/{waasPolicyId}/wafConfig/humanInteractionChallenge"
- method = "GET"
+ resource_path = "/addressLists/{addressListId}"
+ method = "DELETE"
# Don't accept unknown kwargs
expected_kwargs = [
"retry_strategy",
- "opc_request_id"
+ "opc_request_id",
+ "opc_retry_token",
+ "if_match"
]
extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- "get_human_interaction_challenge got unknown kwargs: {!r}".format(extra_kwargs))
+ "delete_address_list got unknown kwargs: {!r}".format(extra_kwargs))
path_params = {
- "waasPolicyId": waas_policy_id
+ "addressListId": address_list_id
}
path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
@@ -964,7 +976,9 @@ def get_human_interaction_challenge(self, waas_policy_id, **kwargs):
header_params = {
"accept": "application/json",
"content-type": "application/json",
- "opc-request-id": kwargs.get("opc_request_id", missing)
+ "opc-request-id": kwargs.get("opc_request_id", missing),
+ "opc-retry-token": kwargs.get("opc_retry_token", missing),
+ "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}
@@ -973,35 +987,42 @@ def get_human_interaction_challenge(self, waas_policy_id, **kwargs):
retry_strategy = kwargs.get('retry_strategy')
if retry_strategy:
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
+ self.base_client.add_opc_retry_token_if_needed(header_params)
return retry_strategy.make_retrying_call(
self.base_client.call_api,
resource_path=resource_path,
method=method,
path_params=path_params,
- header_params=header_params,
- response_type="HumanInteractionChallenge")
+ header_params=header_params)
else:
return self.base_client.call_api(
resource_path=resource_path,
method=method,
path_params=path_params,
- header_params=header_params,
- response_type="HumanInteractionChallenge")
+ header_params=header_params)
- def get_js_challenge(self, waas_policy_id, **kwargs):
+ def delete_certificate(self, certificate_id, **kwargs):
"""
- Returns the JavaScript challenge settings for the Web Application Firewall.
- Gets the JavaScript challenge settings in the Web Application Firewall configuration for a WAAS policy.
+ Deletes a certificate.
+ Deletes an SSL certificate from the WAAS service.
- :param str waas_policy_id: (required)
- The `OCID`__ of the WAAS policy.
+ :param str certificate_id: (required)
+ The `OCID`__ of the SSL certificate used in the WAAS policy. This number is generated when the certificate is added to the policy.
__ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
:param str opc_request_id: (optional)
The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
+ :param str opc_retry_token: (optional)
+ A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations
+ *Example:* If a resource has been deleted and purged from the system, then a retry of the original delete request may be rejected.
+
+ :param str if_match: (optional)
+ For optimistic concurrency control. In the `PUT` or `DELETE` call for a resource, set the `if-match` parameter to the value of the etag from a previous `GET` or `POST` response for that resource. The resource will be updated or deleted only if the etag provided 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.
@@ -1010,24 +1031,26 @@ def get_js_challenge(self, waas_policy_id, **kwargs):
To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.waas.models.JsChallenge`
+ :return: A :class:`~oci.response.Response` object with data of type None
:rtype: :class:`~oci.response.Response`
"""
- resource_path = "/waasPolicies/{waasPolicyId}/wafConfig/jsChallenge"
- method = "GET"
+ resource_path = "/certificates/{certificateId}"
+ method = "DELETE"
# Don't accept unknown kwargs
expected_kwargs = [
"retry_strategy",
- "opc_request_id"
+ "opc_request_id",
+ "opc_retry_token",
+ "if_match"
]
extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- "get_js_challenge got unknown kwargs: {!r}".format(extra_kwargs))
+ "delete_certificate got unknown kwargs: {!r}".format(extra_kwargs))
path_params = {
- "waasPolicyId": waas_policy_id
+ "certificateId": certificate_id
}
path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
@@ -1039,7 +1062,9 @@ def get_js_challenge(self, waas_policy_id, **kwargs):
header_params = {
"accept": "application/json",
"content-type": "application/json",
- "opc-request-id": kwargs.get("opc_request_id", missing)
+ "opc-request-id": kwargs.get("opc_request_id", missing),
+ "opc-retry-token": kwargs.get("opc_retry_token", missing),
+ "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}
@@ -1048,35 +1073,42 @@ def get_js_challenge(self, waas_policy_id, **kwargs):
retry_strategy = kwargs.get('retry_strategy')
if retry_strategy:
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
+ self.base_client.add_opc_retry_token_if_needed(header_params)
return retry_strategy.make_retrying_call(
self.base_client.call_api,
resource_path=resource_path,
method=method,
path_params=path_params,
- header_params=header_params,
- response_type="JsChallenge")
+ header_params=header_params)
else:
return self.base_client.call_api(
resource_path=resource_path,
method=method,
path_params=path_params,
- header_params=header_params,
- response_type="JsChallenge")
+ header_params=header_params)
- def get_policy_config(self, waas_policy_id, **kwargs):
+ def delete_custom_protection_rule(self, custom_protection_rule_id, **kwargs):
"""
- Returns the general configuration for the policy.
- Gets the configuration of a WAAS policy.
+ Deletes a Custom Protection rule.
+ Deletes a Custom Protection rule.
- :param str waas_policy_id: (required)
- The `OCID`__ of the WAAS policy.
+ :param str custom_protection_rule_id: (required)
+ The `OCID`__ of the Custom Protection rule. This number is generated when the Custom Protection rule is added to the compartment.
__ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
:param str opc_request_id: (optional)
The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
+ :param str opc_retry_token: (optional)
+ A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations
+ *Example:* If a resource has been deleted and purged from the system, then a retry of the original delete request may be rejected.
+
+ :param str if_match: (optional)
+ For optimistic concurrency control. In the `PUT` or `DELETE` call for a resource, set the `if-match` parameter to the value of the etag from a previous `GET` or `POST` response for that resource. The resource will be updated or deleted only if the etag provided 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.
@@ -1085,24 +1117,26 @@ def get_policy_config(self, waas_policy_id, **kwargs):
To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.waas.models.PolicyConfig`
+ :return: A :class:`~oci.response.Response` object with data of type None
:rtype: :class:`~oci.response.Response`
"""
- resource_path = "/waasPolicies/{waasPolicyId}/policyConfig"
- method = "GET"
+ resource_path = "/customProtectionRules/{customProtectionRuleId}"
+ method = "DELETE"
# Don't accept unknown kwargs
expected_kwargs = [
"retry_strategy",
- "opc_request_id"
+ "opc_request_id",
+ "opc_retry_token",
+ "if_match"
]
extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- "get_policy_config got unknown kwargs: {!r}".format(extra_kwargs))
+ "delete_custom_protection_rule got unknown kwargs: {!r}".format(extra_kwargs))
path_params = {
- "waasPolicyId": waas_policy_id
+ "customProtectionRuleId": custom_protection_rule_id
}
path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
@@ -1114,7 +1148,9 @@ def get_policy_config(self, waas_policy_id, **kwargs):
header_params = {
"accept": "application/json",
"content-type": "application/json",
- "opc-request-id": kwargs.get("opc_request_id", missing)
+ "opc-request-id": kwargs.get("opc_request_id", missing),
+ "opc-retry-token": kwargs.get("opc_retry_token", missing),
+ "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}
@@ -1123,25 +1159,25 @@ def get_policy_config(self, waas_policy_id, **kwargs):
retry_strategy = kwargs.get('retry_strategy')
if retry_strategy:
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
+ self.base_client.add_opc_retry_token_if_needed(header_params)
return retry_strategy.make_retrying_call(
self.base_client.call_api,
resource_path=resource_path,
method=method,
path_params=path_params,
- header_params=header_params,
- response_type="PolicyConfig")
+ header_params=header_params)
else:
return self.base_client.call_api(
resource_path=resource_path,
method=method,
path_params=path_params,
- header_params=header_params,
- response_type="PolicyConfig")
+ header_params=header_params)
- def get_protection_rule(self, waas_policy_id, protection_rule_key, **kwargs):
+ def delete_waas_policy(self, waas_policy_id, **kwargs):
"""
- Returns the details of a single protection rule.
- Gets the details of a protection rule in the Web Application Firewall configuration for a WAAS policy.
+ Deletes a policy.
+ Deletes a policy.
:param str waas_policy_id: (required)
@@ -1149,12 +1185,16 @@ def get_protection_rule(self, waas_policy_id, protection_rule_key, **kwargs):
__ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
- :param str protection_rule_key: (required)
- The protection rule key.
-
:param str opc_request_id: (optional)
The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
+ :param str opc_retry_token: (optional)
+ A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations
+ *Example:* If a resource has been deleted and purged from the system, then a retry of the original delete request may be rejected.
+
+ :param str if_match: (optional)
+ For optimistic concurrency control. In the `PUT` or `DELETE` call for a resource, set the `if-match` parameter to the value of the etag from a previous `GET` or `POST` response for that resource. The resource will be updated or deleted only if the etag provided 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.
@@ -1163,25 +1203,26 @@ def get_protection_rule(self, waas_policy_id, protection_rule_key, **kwargs):
To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.waas.models.ProtectionRule`
+ :return: A :class:`~oci.response.Response` object with data of type None
:rtype: :class:`~oci.response.Response`
"""
- resource_path = "/waasPolicies/{waasPolicyId}/wafConfig/protectionRules/{protectionRuleKey}"
- method = "GET"
+ resource_path = "/waasPolicies/{waasPolicyId}"
+ method = "DELETE"
# Don't accept unknown kwargs
expected_kwargs = [
"retry_strategy",
- "opc_request_id"
+ "opc_request_id",
+ "opc_retry_token",
+ "if_match"
]
extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- "get_protection_rule got unknown kwargs: {!r}".format(extra_kwargs))
+ "delete_waas_policy got unknown kwargs: {!r}".format(extra_kwargs))
path_params = {
- "waasPolicyId": waas_policy_id,
- "protectionRuleKey": protection_rule_key
+ "waasPolicyId": waas_policy_id
}
path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
@@ -1193,7 +1234,9 @@ def get_protection_rule(self, waas_policy_id, protection_rule_key, **kwargs):
header_params = {
"accept": "application/json",
"content-type": "application/json",
- "opc-request-id": kwargs.get("opc_request_id", missing)
+ "opc-request-id": kwargs.get("opc_request_id", missing),
+ "opc-retry-token": kwargs.get("opc_retry_token", missing),
+ "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}
@@ -1202,29 +1245,29 @@ def get_protection_rule(self, waas_policy_id, protection_rule_key, **kwargs):
retry_strategy = kwargs.get('retry_strategy')
if retry_strategy:
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
+ self.base_client.add_opc_retry_token_if_needed(header_params)
return retry_strategy.make_retrying_call(
self.base_client.call_api,
resource_path=resource_path,
method=method,
path_params=path_params,
- header_params=header_params,
- response_type="ProtectionRule")
+ header_params=header_params)
else:
return self.base_client.call_api(
resource_path=resource_path,
method=method,
path_params=path_params,
- header_params=header_params,
- response_type="ProtectionRule")
+ header_params=header_params)
- def get_protection_settings(self, waas_policy_id, **kwargs):
+ def get_address_list(self, address_list_id, **kwargs):
"""
- Returns the protection settings for the Web Application Firewall.
- Gets the protection settings in the Web Application Firewall configuration for a WAAS policy.
+ Returns the details of an address list.
+ Gets the details of an address list.
- :param str waas_policy_id: (required)
- The `OCID`__ of the WAAS policy.
+ :param str address_list_id: (required)
+ The `OCID`__ of the address list. This number is generated when the address list is added to the compartment.
__ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
@@ -1239,10 +1282,10 @@ def get_protection_settings(self, waas_policy_id, **kwargs):
To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.waas.models.ProtectionSettings`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.waas.models.AddressList`
:rtype: :class:`~oci.response.Response`
"""
- resource_path = "/waasPolicies/{waasPolicyId}/wafConfig/protectionSettings"
+ resource_path = "/addressLists/{addressListId}"
method = "GET"
# Don't accept unknown kwargs
@@ -1253,10 +1296,10 @@ def get_protection_settings(self, waas_policy_id, **kwargs):
extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- "get_protection_settings got unknown kwargs: {!r}".format(extra_kwargs))
+ "get_address_list got unknown kwargs: {!r}".format(extra_kwargs))
path_params = {
- "waasPolicyId": waas_policy_id
+ "addressListId": address_list_id
}
path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
@@ -1283,23 +1326,23 @@ def get_protection_settings(self, waas_policy_id, **kwargs):
method=method,
path_params=path_params,
header_params=header_params,
- response_type="ProtectionSettings")
+ response_type="AddressList")
else:
return self.base_client.call_api(
resource_path=resource_path,
method=method,
path_params=path_params,
header_params=header_params,
- response_type="ProtectionSettings")
+ response_type="AddressList")
- def get_waas_policy(self, waas_policy_id, **kwargs):
+ def get_certificate(self, certificate_id, **kwargs):
"""
- Returns the details of a policy.
- Gets the details of a WAAS policy.
+ Returns the details of a certificate.
+ Gets the details of an SSL certificate.
- :param str waas_policy_id: (required)
- The `OCID`__ of the WAAS policy.
+ :param str certificate_id: (required)
+ The `OCID`__ of the SSL certificate used in the WAAS policy. This number is generated when the certificate is added to the policy.
__ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
@@ -1314,10 +1357,10 @@ def get_waas_policy(self, waas_policy_id, **kwargs):
To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.waas.models.WaasPolicy`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.waas.models.Certificate`
:rtype: :class:`~oci.response.Response`
"""
- resource_path = "/waasPolicies/{waasPolicyId}"
+ resource_path = "/certificates/{certificateId}"
method = "GET"
# Don't accept unknown kwargs
@@ -1328,10 +1371,10 @@ def get_waas_policy(self, waas_policy_id, **kwargs):
extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- "get_waas_policy got unknown kwargs: {!r}".format(extra_kwargs))
+ "get_certificate got unknown kwargs: {!r}".format(extra_kwargs))
path_params = {
- "waasPolicyId": waas_policy_id
+ "certificateId": certificate_id
}
path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
@@ -1358,23 +1401,23 @@ def get_waas_policy(self, waas_policy_id, **kwargs):
method=method,
path_params=path_params,
header_params=header_params,
- response_type="WaasPolicy")
+ response_type="Certificate")
else:
return self.base_client.call_api(
resource_path=resource_path,
method=method,
path_params=path_params,
header_params=header_params,
- response_type="WaasPolicy")
+ response_type="Certificate")
- def get_waf_address_rate_limiting(self, waas_policy_id, **kwargs):
+ def get_custom_protection_rule(self, custom_protection_rule_id, **kwargs):
"""
- Returns the rate limiting settings for the Web Application Firewall.
- Gets the address rate limiting settings of the Web Application Firewall configuration for a WAAS policy.
+ Returns the details of a Custom Protection rule.
+ Gets the details of a Custom Protection rule.
- :param str waas_policy_id: (required)
- The `OCID`__ of the WAAS policy.
+ :param str custom_protection_rule_id: (required)
+ The `OCID`__ of the Custom Protection rule. This number is generated when the Custom Protection rule is added to the compartment.
__ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
@@ -1389,10 +1432,10 @@ def get_waf_address_rate_limiting(self, waas_policy_id, **kwargs):
To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.waas.models.AddressRateLimiting`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.waas.models.CustomProtectionRule`
:rtype: :class:`~oci.response.Response`
"""
- resource_path = "/waasPolicies/{waasPolicyId}/wafConfig/addressRateLimiting"
+ resource_path = "/customProtectionRules/{customProtectionRuleId}"
method = "GET"
# Don't accept unknown kwargs
@@ -1403,10 +1446,10 @@ def get_waf_address_rate_limiting(self, waas_policy_id, **kwargs):
extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- "get_waf_address_rate_limiting got unknown kwargs: {!r}".format(extra_kwargs))
+ "get_custom_protection_rule got unknown kwargs: {!r}".format(extra_kwargs))
path_params = {
- "waasPolicyId": waas_policy_id
+ "customProtectionRuleId": custom_protection_rule_id
}
path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
@@ -1433,20 +1476,20 @@ def get_waf_address_rate_limiting(self, waas_policy_id, **kwargs):
method=method,
path_params=path_params,
header_params=header_params,
- response_type="AddressRateLimiting")
+ response_type="CustomProtectionRule")
else:
return self.base_client.call_api(
resource_path=resource_path,
method=method,
path_params=path_params,
header_params=header_params,
- response_type="AddressRateLimiting")
+ response_type="CustomProtectionRule")
- def get_waf_config(self, waas_policy_id, **kwargs):
+ def get_device_fingerprint_challenge(self, waas_policy_id, **kwargs):
"""
- Returns the Web Application Firewall configuration.
- Gets the Web Application Firewall configuration details for a WAAS policy.
-
+ Returns the device fingerprint challenge settings for the Web Application Firewall.
+ Gets the device fingerprint challenge settings in the Web Application Firewall configuration for a WAAS policy.
+
:param str waas_policy_id: (required)
The `OCID`__ of the WAAS policy.
@@ -1464,10 +1507,10 @@ def get_waf_config(self, waas_policy_id, **kwargs):
To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.waas.models.WafConfig`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.waas.models.DeviceFingerprintChallenge`
:rtype: :class:`~oci.response.Response`
"""
- resource_path = "/waasPolicies/{waasPolicyId}/wafConfig"
+ resource_path = "/waasPolicies/{waasPolicyId}/wafConfig/deviceFingerprintChallenge"
method = "GET"
# Don't accept unknown kwargs
@@ -1478,7 +1521,7 @@ def get_waf_config(self, waas_policy_id, **kwargs):
extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- "get_waf_config got unknown kwargs: {!r}".format(extra_kwargs))
+ "get_device_fingerprint_challenge got unknown kwargs: {!r}".format(extra_kwargs))
path_params = {
"waasPolicyId": waas_policy_id
@@ -1508,23 +1551,23 @@ def get_waf_config(self, waas_policy_id, **kwargs):
method=method,
path_params=path_params,
header_params=header_params,
- response_type="WafConfig")
+ response_type="DeviceFingerprintChallenge")
else:
return self.base_client.call_api(
resource_path=resource_path,
method=method,
path_params=path_params,
header_params=header_params,
- response_type="WafConfig")
+ response_type="DeviceFingerprintChallenge")
- def get_work_request(self, work_request_id, **kwargs):
+ def get_human_interaction_challenge(self, waas_policy_id, **kwargs):
"""
- Returns the details of a work request.
- Gets the details of a specified work request.
+ Returns the human interaction challenge settings for the Web Application Firewall.
+ Gets the human interaction challenge settings in the Web Application Firewall configuration for a WAAS policy.
- :param str work_request_id: (required)
- The `OCID`__ of the work request. This number is generated when work request is created.
+ :param str waas_policy_id: (required)
+ The `OCID`__ of the WAAS policy.
__ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
@@ -1539,10 +1582,10 @@ def get_work_request(self, work_request_id, **kwargs):
To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
- :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.waas.models.WorkRequest`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.waas.models.HumanInteractionChallenge`
:rtype: :class:`~oci.response.Response`
"""
- resource_path = "/workRequests/{workRequestId}"
+ resource_path = "/waasPolicies/{waasPolicyId}/wafConfig/humanInteractionChallenge"
method = "GET"
# Don't accept unknown kwargs
@@ -1553,10 +1596,10 @@ def get_work_request(self, work_request_id, **kwargs):
extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- "get_work_request got unknown kwargs: {!r}".format(extra_kwargs))
+ "get_human_interaction_challenge got unknown kwargs: {!r}".format(extra_kwargs))
path_params = {
- "workRequestId": work_request_id
+ "waasPolicyId": waas_policy_id
}
path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
@@ -1583,20 +1626,19 @@ def get_work_request(self, work_request_id, **kwargs):
method=method,
path_params=path_params,
header_params=header_params,
- response_type="WorkRequest")
+ response_type="HumanInteractionChallenge")
else:
return self.base_client.call_api(
resource_path=resource_path,
method=method,
path_params=path_params,
header_params=header_params,
- response_type="WorkRequest")
+ response_type="HumanInteractionChallenge")
- def list_access_rules(self, waas_policy_id, **kwargs):
+ def get_js_challenge(self, waas_policy_id, **kwargs):
"""
- Returns a list of access rules for the Web Application Firewall.
- Gets the currently configured access rules for the Web Application Firewall configuration of a specified WAAS policy.
- The order of the access rules is important. The rules will be checked in the order they are specified and the first matching rule will be used.
+ Returns the JavaScript challenge settings for the Web Application Firewall.
+ Gets the JavaScript challenge settings in the Web Application Firewall configuration for a WAAS policy.
:param str waas_policy_id: (required)
@@ -1607,12 +1649,6 @@ def list_access_rules(self, waas_policy_id, **kwargs):
:param str opc_request_id: (optional)
The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
- :param int limit: (optional)
- The maximum number of items to return in a paginated call. In unspecified, defaults to `10`.
-
- :param str page: (optional)
- The value of the `opc-next-page` response header from the previous paginated call.
-
:param obj retry_strategy: (optional)
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
@@ -1621,23 +1657,21 @@ def list_access_rules(self, waas_policy_id, **kwargs):
To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
- :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.waas.models.AccessRule`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.waas.models.JsChallenge`
:rtype: :class:`~oci.response.Response`
"""
- resource_path = "/waasPolicies/{waasPolicyId}/wafConfig/accessRules"
+ resource_path = "/waasPolicies/{waasPolicyId}/wafConfig/jsChallenge"
method = "GET"
# Don't accept unknown kwargs
expected_kwargs = [
"retry_strategy",
- "opc_request_id",
- "limit",
- "page"
+ "opc_request_id"
]
extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- "list_access_rules got unknown kwargs: {!r}".format(extra_kwargs))
+ "get_js_challenge got unknown kwargs: {!r}".format(extra_kwargs))
path_params = {
"waasPolicyId": waas_policy_id
@@ -1649,12 +1683,6 @@ def list_access_rules(self, waas_policy_id, **kwargs):
if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
- 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",
@@ -1672,26 +1700,20 @@ def list_access_rules(self, waas_policy_id, **kwargs):
resource_path=resource_path,
method=method,
path_params=path_params,
- query_params=query_params,
header_params=header_params,
- response_type="list[AccessRule]")
+ response_type="JsChallenge")
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[AccessRule]")
+ response_type="JsChallenge")
- def list_captchas(self, waas_policy_id, **kwargs):
+ def get_policy_config(self, waas_policy_id, **kwargs):
"""
- Returns a list of CAPTCHA configurations for the Web Application Firewall.
- Gets the list of currently configured CAPTCHA challenges in the Web
- Application Firewall configuration of a WAAS policy.
-
- The order of the CAPTCHA challenges is important. The URL for each
- CAPTCHA will be checked in the order they are created.
+ Returns the general configuration for the policy.
+ Gets the configuration of a WAAS policy.
:param str waas_policy_id: (required)
@@ -1702,12 +1724,6 @@ def list_captchas(self, waas_policy_id, **kwargs):
:param str opc_request_id: (optional)
The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
- :param int limit: (optional)
- The maximum number of items to return in a paginated call. In unspecified, defaults to `10`.
-
- :param str page: (optional)
- The value of the `opc-next-page` response header from the previous paginated call.
-
:param obj retry_strategy: (optional)
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
@@ -1716,23 +1732,21 @@ def list_captchas(self, waas_policy_id, **kwargs):
To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
- :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.waas.models.Captcha`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.waas.models.PolicyConfig`
:rtype: :class:`~oci.response.Response`
"""
- resource_path = "/waasPolicies/{waasPolicyId}/wafConfig/captchas"
+ resource_path = "/waasPolicies/{waasPolicyId}/policyConfig"
method = "GET"
# Don't accept unknown kwargs
expected_kwargs = [
"retry_strategy",
- "opc_request_id",
- "limit",
- "page"
+ "opc_request_id"
]
extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- "list_captchas got unknown kwargs: {!r}".format(extra_kwargs))
+ "get_policy_config got unknown kwargs: {!r}".format(extra_kwargs))
path_params = {
"waasPolicyId": waas_policy_id
@@ -1744,12 +1758,6 @@ def list_captchas(self, waas_policy_id, **kwargs):
if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
- 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",
@@ -1767,65 +1775,33 @@ def list_captchas(self, waas_policy_id, **kwargs):
resource_path=resource_path,
method=method,
path_params=path_params,
- query_params=query_params,
header_params=header_params,
- response_type="list[Captcha]")
+ response_type="PolicyConfig")
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[Captcha]")
+ response_type="PolicyConfig")
- def list_certificates(self, compartment_id, **kwargs):
+ def get_protection_rule(self, waas_policy_id, protection_rule_key, **kwargs):
"""
- Returns a list of certificates.
- Gets a list of SSL certificates that can be used in a WAAS policy.
+ Returns the details of a single protection rule.
+ Gets the details of a protection rule in the Web Application Firewall configuration for a WAAS policy.
- :param str compartment_id: (required)
- The `OCID`__ of the compartment. This number is generated when the compartment is created.
+ :param str waas_policy_id: (required)
+ The `OCID`__ of the WAAS policy.
- __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
+
+ :param str protection_rule_key: (required)
+ The protection rule key.
:param str opc_request_id: (optional)
The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
- :param int limit: (optional)
- The maximum number of items to return in a paginated call. In unspecified, defaults to `10`.
-
- :param str page: (optional)
- The value of the `opc-next-page` response header from the previous paginated call.
-
- :param str sort_by: (optional)
- The value by which certificate summaries are sorted in a paginated 'List' call. If unspecified, defaults to `timeCreated`.
-
- Allowed values are: "id", "compartmentId", "displayName", "notValidAfter", "timeCreated"
-
- :param str sort_order: (optional)
- The value of the sorting direction of resources in a paginated 'List' call. If unspecified, defaults to `DESC`.
-
- Allowed values are: "ASC", "DESC"
-
- :param list[str] id: (optional)
- Filter certificates using a list of certificates OCIDs.
-
- :param list[str] display_name: (optional)
- Filter certificates using a list of display names.
-
- :param list[str] lifecycle_state: (optional)
- Filter certificates using a list of lifecycle states.
-
- Allowed values are: "CREATING", "ACTIVE", "FAILED", "UPDATING", "DELETING", "DELETED"
-
- :param datetime time_created_greater_than_or_equal_to: (optional)
- A filter that matches certificates created on or after the specified date-time.
-
- :param datetime time_created_less_than: (optional)
- A filter that matches certificates created before the specified date-time.
-
:param obj retry_strategy: (optional)
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
@@ -1834,66 +1810,32 @@ def list_certificates(self, compartment_id, **kwargs):
To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
- :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.waas.models.CertificateSummary`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.waas.models.ProtectionRule`
:rtype: :class:`~oci.response.Response`
"""
- resource_path = "/certificates"
+ resource_path = "/waasPolicies/{waasPolicyId}/wafConfig/protectionRules/{protectionRuleKey}"
method = "GET"
# Don't accept unknown kwargs
expected_kwargs = [
"retry_strategy",
- "opc_request_id",
- "limit",
- "page",
- "sort_by",
- "sort_order",
- "id",
- "display_name",
- "lifecycle_state",
- "time_created_greater_than_or_equal_to",
- "time_created_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(
- "list_certificates got unknown kwargs: {!r}".format(extra_kwargs))
-
- if 'sort_by' in kwargs:
- sort_by_allowed_values = ["id", "compartmentId", "displayName", "notValidAfter", "timeCreated"]
- if kwargs['sort_by'] not in sort_by_allowed_values:
- raise ValueError(
- "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values)
- )
+ "get_protection_rule got unknown kwargs: {!r}".format(extra_kwargs))
- if 'sort_order' in kwargs:
- sort_order_allowed_values = ["ASC", "DESC"]
- if kwargs['sort_order'] not in sort_order_allowed_values:
- raise ValueError(
- "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values)
- )
+ path_params = {
+ "waasPolicyId": waas_policy_id,
+ "protectionRuleKey": protection_rule_key
+ }
- if 'lifecycle_state' in kwargs:
- lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "FAILED", "UPDATING", "DELETING", "DELETED"]
- for lifecycle_state_item in kwargs['lifecycle_state']:
- if lifecycle_state_item not in lifecycle_state_allowed_values:
- raise ValueError(
- "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values)
- )
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
- query_params = {
- "limit": kwargs.get("limit", missing),
- "page": kwargs.get("page", missing),
- "sortBy": kwargs.get("sort_by", missing),
- "sortOrder": kwargs.get("sort_order", missing),
- "compartmentId": compartment_id,
- "id": self.base_client.generate_collection_format_param(kwargs.get("id", missing), 'multi'),
- "displayName": self.base_client.generate_collection_format_param(kwargs.get("display_name", missing), 'multi'),
- "lifecycleState": self.base_client.generate_collection_format_param(kwargs.get("lifecycle_state", missing), 'multi'),
- "timeCreatedGreaterThanOrEqualTo": kwargs.get("time_created_greater_than_or_equal_to", missing),
- "timeCreatedLessThan": kwargs.get("time_created_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}
+ for (k, v) in six.iteritems(path_params):
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
+ raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
header_params = {
"accept": "application/json",
@@ -1911,41 +1853,30 @@ def list_certificates(self, compartment_id, **kwargs):
self.base_client.call_api,
resource_path=resource_path,
method=method,
- query_params=query_params,
+ path_params=path_params,
header_params=header_params,
- response_type="list[CertificateSummary]")
+ response_type="ProtectionRule")
else:
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[CertificateSummary]")
+ response_type="ProtectionRule")
- def list_edge_subnets(self, **kwargs):
+ def get_protection_settings(self, waas_policy_id, **kwargs):
"""
- Returns a list of subnets corresponding the Web Application Firewall.
- Return the list of the tenant's edge node subnets. Use these CIDR blocks to restrict incoming traffic to your origin. These subnets are owned by OCI and forward traffic to customer origins. They are not associated with specific regions or compartments.
-
-
- :param str opc_request_id: (optional)
- The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
-
- :param int limit: (optional)
- The maximum number of items to return in a paginated call. In unspecified, defaults to `10`.
-
- :param str page: (optional)
- The value of the `opc-next-page` response header from the previous paginated call.
+ Returns the protection settings for the Web Application Firewall.
+ Gets the protection settings in the Web Application Firewall configuration for a WAAS policy.
- :param str sort_by: (optional)
- The value by which edge node subnets are sorted in a paginated 'List' call. If unspecified, defaults to `timeModified`.
- Allowed values are: "cidr", "region", "timeModified"
+ :param str waas_policy_id: (required)
+ The `OCID`__ of the WAAS policy.
- :param str sort_order: (optional)
- The value of the sorting direction of resources in a paginated 'List' call. If unspecified, defaults to `DESC`.
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
- Allowed values are: "ASC", "DESC"
+ :param str opc_request_id: (optional)
+ The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
:param obj retry_strategy: (optional)
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
@@ -1955,47 +1886,31 @@ def list_edge_subnets(self, **kwargs):
To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
- :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.waas.models.EdgeSubnet`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.waas.models.ProtectionSettings`
:rtype: :class:`~oci.response.Response`
"""
- resource_path = "/edgeSubnets"
+ resource_path = "/waasPolicies/{waasPolicyId}/wafConfig/protectionSettings"
method = "GET"
# Don't accept unknown kwargs
expected_kwargs = [
"retry_strategy",
- "opc_request_id",
- "limit",
- "page",
- "sort_by",
- "sort_order"
+ "opc_request_id"
]
extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- "list_edge_subnets got unknown kwargs: {!r}".format(extra_kwargs))
+ "get_protection_settings got unknown kwargs: {!r}".format(extra_kwargs))
- if 'sort_by' in kwargs:
- sort_by_allowed_values = ["cidr", "region", "timeModified"]
- if kwargs['sort_by'] not in sort_by_allowed_values:
- raise ValueError(
- "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values)
- )
+ path_params = {
+ "waasPolicyId": waas_policy_id
+ }
- if 'sort_order' in kwargs:
- sort_order_allowed_values = ["ASC", "DESC"]
- if kwargs['sort_order'] not in sort_order_allowed_values:
- raise ValueError(
- "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values)
- )
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
- query_params = {
- "limit": kwargs.get("limit", missing),
- "page": kwargs.get("page", missing),
- "sortBy": kwargs.get("sort_by", missing),
- "sortOrder": kwargs.get("sort_order", missing)
- }
- query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
+ for (k, v) in six.iteritems(path_params):
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
+ raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
header_params = {
"accept": "application/json",
@@ -2013,23 +1928,21 @@ def list_edge_subnets(self, **kwargs):
self.base_client.call_api,
resource_path=resource_path,
method=method,
- query_params=query_params,
+ path_params=path_params,
header_params=header_params,
- response_type="list[EdgeSubnet]")
+ response_type="ProtectionSettings")
else:
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[EdgeSubnet]")
+ response_type="ProtectionSettings")
- def list_good_bots(self, waas_policy_id, **kwargs):
+ def get_waas_policy(self, waas_policy_id, **kwargs):
"""
- Returns the list of good bot configurations for the Web Application Firewall.
- Gets the list of good bots defined in the Web Application Firewall configuration for a WAAS policy.
-
- The list is sorted by `key`, in ascending order.
+ Returns the details of a policy.
+ Gets the details of a WAAS policy.
:param str waas_policy_id: (required)
@@ -2040,12 +1953,6 @@ def list_good_bots(self, waas_policy_id, **kwargs):
:param str opc_request_id: (optional)
The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
- :param int limit: (optional)
- The maximum number of items to return in a paginated call. In unspecified, defaults to `10`.
-
- :param str page: (optional)
- The value of the `opc-next-page` response header from the previous paginated call.
-
:param obj retry_strategy: (optional)
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
@@ -2054,23 +1961,21 @@ def list_good_bots(self, waas_policy_id, **kwargs):
To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
- :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.waas.models.GoodBot`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.waas.models.WaasPolicy`
:rtype: :class:`~oci.response.Response`
"""
- resource_path = "/waasPolicies/{waasPolicyId}/wafConfig/goodBots"
+ resource_path = "/waasPolicies/{waasPolicyId}"
method = "GET"
# Don't accept unknown kwargs
expected_kwargs = [
"retry_strategy",
- "opc_request_id",
- "limit",
- "page"
+ "opc_request_id"
]
extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- "list_good_bots got unknown kwargs: {!r}".format(extra_kwargs))
+ "get_waas_policy got unknown kwargs: {!r}".format(extra_kwargs))
path_params = {
"waasPolicyId": waas_policy_id
@@ -2082,12 +1987,6 @@ def list_good_bots(self, waas_policy_id, **kwargs):
if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
- 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",
@@ -2105,23 +2004,20 @@ def list_good_bots(self, waas_policy_id, **kwargs):
resource_path=resource_path,
method=method,
path_params=path_params,
- query_params=query_params,
header_params=header_params,
- response_type="list[GoodBot]")
+ response_type="WaasPolicy")
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[GoodBot]")
+ response_type="WaasPolicy")
- def list_protection_rules(self, waas_policy_id, **kwargs):
+ def get_waf_address_rate_limiting(self, waas_policy_id, **kwargs):
"""
- Returns the list of protection rules for the Web Application Firewall.
- Gets the list of available protection rules for a WAAS policy. Use the `GetWafConfig` operation to view a list of currently configured protection rules for the Web Application Firewall, or use the `ListRecommendations` operation to get a list of recommended protection rules for the Web Application Firewall.
- The list is sorted by `key`, in ascending order.
+ Returns the rate limiting settings for the Web Application Firewall.
+ Gets the address rate limiting settings of the Web Application Firewall configuration for a WAAS policy.
:param str waas_policy_id: (required)
@@ -2132,20 +2028,6 @@ def list_protection_rules(self, waas_policy_id, **kwargs):
:param str opc_request_id: (optional)
The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
- :param int limit: (optional)
- The maximum number of items to return in a paginated call. In unspecified, defaults to `10`.
-
- :param str page: (optional)
- The value of the `opc-next-page` response header from the previous paginated call.
-
- :param list[str] mod_security_rule_id: (optional)
- Filter rules using a list of ModSecurity rule IDs.
-
- :param list[str] action: (optional)
- Filter rules using a list of actions.
-
- Allowed values are: "OFF", "DETECT", "BLOCK"
-
:param obj retry_strategy: (optional)
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
@@ -2154,25 +2036,21 @@ def list_protection_rules(self, waas_policy_id, **kwargs):
To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
- :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.waas.models.ProtectionRule`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.waas.models.AddressRateLimiting`
:rtype: :class:`~oci.response.Response`
"""
- resource_path = "/waasPolicies/{waasPolicyId}/wafConfig/protectionRules"
+ resource_path = "/waasPolicies/{waasPolicyId}/wafConfig/addressRateLimiting"
method = "GET"
# Don't accept unknown kwargs
expected_kwargs = [
"retry_strategy",
- "opc_request_id",
- "limit",
- "page",
- "mod_security_rule_id",
- "action"
+ "opc_request_id"
]
extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- "list_protection_rules got unknown kwargs: {!r}".format(extra_kwargs))
+ "get_waf_address_rate_limiting got unknown kwargs: {!r}".format(extra_kwargs))
path_params = {
"waasPolicyId": waas_policy_id
@@ -2184,22 +2062,6 @@ def list_protection_rules(self, waas_policy_id, **kwargs):
if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
- if 'action' in kwargs:
- action_allowed_values = ["OFF", "DETECT", "BLOCK"]
- for action_item in kwargs['action']:
- if action_item not in action_allowed_values:
- raise ValueError(
- "Invalid value for `action`, must be one of {0}".format(action_allowed_values)
- )
-
- query_params = {
- "limit": kwargs.get("limit", missing),
- "page": kwargs.get("page", missing),
- "modSecurityRuleId": self.base_client.generate_collection_format_param(kwargs.get("mod_security_rule_id", missing), 'multi'),
- "action": self.base_client.generate_collection_format_param(kwargs.get("action", 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",
@@ -2217,27 +2079,20 @@ def list_protection_rules(self, waas_policy_id, **kwargs):
resource_path=resource_path,
method=method,
path_params=path_params,
- query_params=query_params,
header_params=header_params,
- response_type="list[ProtectionRule]")
+ response_type="AddressRateLimiting")
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[ProtectionRule]")
+ response_type="AddressRateLimiting")
- def list_recommendations(self, waas_policy_id, **kwargs):
+ def get_waf_config(self, waas_policy_id, **kwargs):
"""
- Returns the list of recommended Web Application Firewall protection rules.
- Gets the list of recommended Web Application Firewall protection rules.
-
- Use the `POST /waasPolicies/{waasPolicyId}/actions/acceptWafConfigRecommendations` method to accept recommended Web Application Firewall protection rules. For more information, see `WAF Protection Rules`__.
- The list is sorted by `key`, in ascending order.
-
- __ https://docs.cloud.oracle.com/iaas/Content/WAF/Tasks/wafprotectionrules.htm
+ Returns the Web Application Firewall configuration.
+ Gets the Web Application Firewall configuration details for a WAAS policy.
:param str waas_policy_id: (required)
@@ -2248,17 +2103,6 @@ def list_recommendations(self, waas_policy_id, **kwargs):
:param str opc_request_id: (optional)
The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
- :param str recommended_action: (optional)
- A filter that matches recommended protection rules based on the selected action. If unspecified, rules with any action type are returned.
-
- Allowed values are: "DETECT", "BLOCK"
-
- :param int limit: (optional)
- The maximum number of items to return in a paginated call. In unspecified, defaults to `10`.
-
- :param str page: (optional)
- The value of the `opc-next-page` response header from the previous paginated call.
-
:param obj retry_strategy: (optional)
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
@@ -2267,24 +2111,21 @@ def list_recommendations(self, waas_policy_id, **kwargs):
To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
- :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.waas.models.Recommendation`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.waas.models.WafConfig`
:rtype: :class:`~oci.response.Response`
"""
- resource_path = "/waasPolicies/{waasPolicyId}/wafConfig/recommendations"
+ resource_path = "/waasPolicies/{waasPolicyId}/wafConfig"
method = "GET"
# Don't accept unknown kwargs
expected_kwargs = [
"retry_strategy",
- "opc_request_id",
- "recommended_action",
- "limit",
- "page"
+ "opc_request_id"
]
extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- "list_recommendations got unknown kwargs: {!r}".format(extra_kwargs))
+ "get_waf_config got unknown kwargs: {!r}".format(extra_kwargs))
path_params = {
"waasPolicyId": waas_policy_id
@@ -2296,20 +2137,6 @@ def list_recommendations(self, waas_policy_id, **kwargs):
if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
- if 'recommended_action' in kwargs:
- recommended_action_allowed_values = ["DETECT", "BLOCK"]
- if kwargs['recommended_action'] not in recommended_action_allowed_values:
- raise ValueError(
- "Invalid value for `recommended_action`, must be one of {0}".format(recommended_action_allowed_values)
- )
-
- query_params = {
- "recommendedAction": kwargs.get("recommended_action", missing),
- "limit": kwargs.get("limit", missing),
- "page": kwargs.get("page", missing)
- }
- query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
-
header_params = {
"accept": "application/json",
"content-type": "application/json",
@@ -2327,40 +2154,30 @@ def list_recommendations(self, waas_policy_id, **kwargs):
resource_path=resource_path,
method=method,
path_params=path_params,
- query_params=query_params,
header_params=header_params,
- response_type="list[Recommendation]")
+ response_type="WafConfig")
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[Recommendation]")
+ response_type="WafConfig")
- def list_threat_feeds(self, waas_policy_id, **kwargs):
+ def get_work_request(self, work_request_id, **kwargs):
"""
- Returns a list of threat intelligence feeds.
- Gets the list of available web application threat intelligence feeds
- and the actions set for each feed. The list is sorted by `key`,
- in ascending order.
+ Returns the details of a work request.
+ Gets the details of a specified work request.
- :param str waas_policy_id: (required)
- The `OCID`__ of the WAAS policy.
+ :param str work_request_id: (required)
+ The `OCID`__ of the work request. This number is generated when work request is created.
__ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
:param str opc_request_id: (optional)
The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
- :param int limit: (optional)
- The maximum number of items to return in a paginated call. In unspecified, defaults to `10`.
-
- :param str page: (optional)
- The value of the `opc-next-page` response header from the previous paginated call.
-
:param obj retry_strategy: (optional)
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
@@ -2369,26 +2186,24 @@ def list_threat_feeds(self, waas_policy_id, **kwargs):
To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
- :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.waas.models.ThreatFeed`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.waas.models.WorkRequest`
:rtype: :class:`~oci.response.Response`
"""
- resource_path = "/waasPolicies/{waasPolicyId}/wafConfig/threatFeeds"
+ resource_path = "/workRequests/{workRequestId}"
method = "GET"
# Don't accept unknown kwargs
expected_kwargs = [
"retry_strategy",
- "opc_request_id",
- "limit",
- "page"
+ "opc_request_id"
]
extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- "list_threat_feeds got unknown kwargs: {!r}".format(extra_kwargs))
+ "get_work_request got unknown kwargs: {!r}".format(extra_kwargs))
path_params = {
- "waasPolicyId": waas_policy_id
+ "workRequestId": work_request_id
}
path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
@@ -2397,12 +2212,6 @@ def list_threat_feeds(self, waas_policy_id, **kwargs):
if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
- 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",
@@ -2420,28 +2229,27 @@ def list_threat_feeds(self, waas_policy_id, **kwargs):
resource_path=resource_path,
method=method,
path_params=path_params,
- query_params=query_params,
header_params=header_params,
- response_type="list[ThreatFeed]")
+ response_type="WorkRequest")
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[ThreatFeed]")
+ response_type="WorkRequest")
- def list_waas_policies(self, compartment_id, **kwargs):
+ def list_access_rules(self, waas_policy_id, **kwargs):
"""
- Returns the list of policies for the given compartment.
- Gets a list of WAAS policies.
+ Returns a list of access rules for the Web Application Firewall.
+ Gets the currently configured access rules for the Web Application Firewall configuration of a specified WAAS policy.
+ The order of the access rules is important. The rules will be checked in the order they are specified and the first matching rule will be used.
- :param str compartment_id: (required)
- The `OCID`__ of the compartment. This number is generated when the compartment is created.
+ :param str waas_policy_id: (required)
+ The `OCID`__ of the WAAS policy.
- __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
:param str opc_request_id: (optional)
The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
@@ -2452,32 +2260,123 @@ def list_waas_policies(self, compartment_id, **kwargs):
:param str page: (optional)
The value of the `opc-next-page` response header from the previous paginated call.
- :param str sort_by: (optional)
- The value by which policies are sorted in a paginated 'List' call. If unspecified, defaults to `timeCreated`.
+ :param obj retry_strategy: (optional)
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
- Allowed values are: "id", "displayName", "timeCreated"
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY`
+ is also available. The specifics of the default retry strategy are described `here `__.
- :param str sort_order: (optional)
- The value of the sorting direction of resources in a paginated 'List' call. If unspecified, defaults to `DESC`.
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
- Allowed values are: "ASC", "DESC"
+ :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.waas.models.AccessRule`
+ :rtype: :class:`~oci.response.Response`
+ """
+ resource_path = "/waasPolicies/{waasPolicyId}/wafConfig/accessRules"
+ method = "GET"
- :param list[str] id: (optional)
- Filter policies using a list of policy OCIDs.
+ # Don't accept unknown kwargs
+ expected_kwargs = [
+ "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(
+ "list_access_rules got unknown kwargs: {!r}".format(extra_kwargs))
- :param list[str] display_name: (optional)
- Filter policies using a list of display names.
+ path_params = {
+ "waasPolicyId": waas_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('Parameter {} cannot be None, whitespace or empty string'.format(k))
+
+ 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.retry_strategy
+ if kwargs.get('retry_strategy'):
+ retry_strategy = kwargs.get('retry_strategy')
+
+ if retry_strategy:
+ return retry_strategy.make_retrying_call(
+ self.base_client.call_api,
+ resource_path=resource_path,
+ method=method,
+ path_params=path_params,
+ query_params=query_params,
+ header_params=header_params,
+ response_type="list[AccessRule]")
+ 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[AccessRule]")
+
+ def list_address_lists(self, compartment_id, **kwargs):
+ """
+ Returns a list of address lists.
+ Gets a list of address lists that can be used in a WAAS policy.
+
+
+ :param str compartment_id: (required)
+ The `OCID`__ of the compartment. This number is generated when the compartment is created.
+
+ __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
+
+ :param str opc_request_id: (optional)
+ The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
+
+ :param int limit: (optional)
+ The maximum number of items to return in a paginated call. In unspecified, defaults to `10`.
+
+ :param str page: (optional)
+ The value of the `opc-next-page` response header from the previous paginated call.
+
+ :param str sort_by: (optional)
+ The value by which address lists are sorted in a paginated 'List' call. If unspecified, defaults to `timeCreated`.
+
+ Allowed values are: "id", "name", "timeCreated"
+
+ :param str sort_order: (optional)
+ The value of the sorting direction of resources in a paginated 'List' call. If unspecified, defaults to `DESC`.
+
+ Allowed values are: "ASC", "DESC"
+
+ :param list[str] id: (optional)
+ Filter address lists using a list of address lists OCIDs.
+
+ :param list[str] name: (optional)
+ Filter address lists using a list of names.
:param list[str] lifecycle_state: (optional)
- Filter policies using a list of lifecycle states.
+ Filter address lists using a list of lifecycle states.
Allowed values are: "CREATING", "ACTIVE", "FAILED", "UPDATING", "DELETING", "DELETED"
:param datetime time_created_greater_than_or_equal_to: (optional)
- A filter that matches policies created on or after the specified date and time.
+ A filter that matches address lists created on or after the specified date-time.
:param datetime time_created_less_than: (optional)
- A filter that matches policies created before the specified date-time.
+ A filter that matches address lists created before the specified date-time.
:param obj retry_strategy: (optional)
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
@@ -2487,10 +2386,10 @@ def list_waas_policies(self, compartment_id, **kwargs):
To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
- :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.waas.models.WaasPolicySummary`
+ :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.waas.models.AddressListSummary`
:rtype: :class:`~oci.response.Response`
"""
- resource_path = "/waasPolicies"
+ resource_path = "/addressLists"
method = "GET"
# Don't accept unknown kwargs
@@ -2502,7 +2401,7 @@ def list_waas_policies(self, compartment_id, **kwargs):
"sort_by",
"sort_order",
"id",
- "display_name",
+ "name",
"lifecycle_state",
"time_created_greater_than_or_equal_to",
"time_created_less_than"
@@ -2510,10 +2409,10 @@ def list_waas_policies(self, compartment_id, **kwargs):
extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- "list_waas_policies got unknown kwargs: {!r}".format(extra_kwargs))
+ "list_address_lists got unknown kwargs: {!r}".format(extra_kwargs))
if 'sort_by' in kwargs:
- sort_by_allowed_values = ["id", "displayName", "timeCreated"]
+ sort_by_allowed_values = ["id", "name", "timeCreated"]
if kwargs['sort_by'] not in sort_by_allowed_values:
raise ValueError(
"Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values)
@@ -2535,13 +2434,13 @@ def list_waas_policies(self, compartment_id, **kwargs):
)
query_params = {
- "compartmentId": compartment_id,
"limit": kwargs.get("limit", missing),
"page": kwargs.get("page", missing),
"sortBy": kwargs.get("sort_by", missing),
"sortOrder": kwargs.get("sort_order", missing),
+ "compartmentId": compartment_id,
"id": self.base_client.generate_collection_format_param(kwargs.get("id", missing), 'multi'),
- "displayName": self.base_client.generate_collection_format_param(kwargs.get("display_name", missing), 'multi'),
+ "name": self.base_client.generate_collection_format_param(kwargs.get("name", missing), 'multi'),
"lifecycleState": self.base_client.generate_collection_format_param(kwargs.get("lifecycle_state", missing), 'multi'),
"timeCreatedGreaterThanOrEqualTo": kwargs.get("time_created_greater_than_or_equal_to", missing),
"timeCreatedLessThan": kwargs.get("time_created_less_than", missing)
@@ -2566,19 +2465,20 @@ def list_waas_policies(self, compartment_id, **kwargs):
method=method,
query_params=query_params,
header_params=header_params,
- response_type="list[WaasPolicySummary]")
+ response_type="list[AddressListSummary]")
else:
return self.base_client.call_api(
resource_path=resource_path,
method=method,
query_params=query_params,
header_params=header_params,
- response_type="list[WaasPolicySummary]")
+ response_type="list[AddressListSummary]")
- def list_waf_blocked_requests(self, waas_policy_id, **kwargs):
+ def list_caching_rules(self, waas_policy_id, **kwargs):
"""
- Returns a list of requests blocked by the Web Application Firewall.
- Gets the number of blocked requests by a Web Application Firewall feature in five minute blocks, sorted by `timeObserved` in ascending order (starting from oldest data).
+ Returns the list of caching rules for the Web Application Firewall.
+ Gets the currently configured caching rules for the Web Application Firewall configuration of a specified WAAS policy.
+ The order of the caching rules is important. The rules will be checked in the order they are specified and the first matching rule will be used.
:param str waas_policy_id: (required)
@@ -2589,23 +2489,12 @@ def list_waf_blocked_requests(self, waas_policy_id, **kwargs):
:param str opc_request_id: (optional)
The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
- :param datetime time_observed_greater_than_or_equal_to: (optional)
- A filter that limits returned events to those occurring on or after a date and time, specified in RFC 3339 format. If unspecified, defaults to 30 minutes before receipt of the request.
-
- :param datetime time_observed_less_than: (optional)
- A filter that limits returned events to those occurring before a date and time, specified in RFC 3339 format.
-
:param int limit: (optional)
The maximum number of items to return in a paginated call. In unspecified, defaults to `10`.
:param str page: (optional)
The value of the `opc-next-page` response header from the previous paginated call.
- :param list[str] waf_feature: (optional)
- Filter stats by the Web Application Firewall feature that triggered the block action. If unspecified, data for all WAF features will be returned.
-
- Allowed values are: "PROTECTION_RULES", "JS_CHALLENGE", "ACCESS_RULES", "THREAT_FEEDS", "HUMAN_INTERACTION_CHALLENGE", "DEVICE_FINGERPRINT_CHALLENGE", "CAPTCHA", "ADDRESS_RATE_LIMITING"
-
:param obj retry_strategy: (optional)
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
@@ -2614,26 +2503,23 @@ def list_waf_blocked_requests(self, waas_policy_id, **kwargs):
To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
- :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.waas.models.WafBlockedRequest`
+ :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.waas.models.CachingRuleSummary`
:rtype: :class:`~oci.response.Response`
"""
- resource_path = "/waasPolicies/{waasPolicyId}/reports/waf/blocked"
+ resource_path = "/waasPolicies/{waasPolicyId}/wafConfig/cachingRules"
method = "GET"
# Don't accept unknown kwargs
expected_kwargs = [
"retry_strategy",
"opc_request_id",
- "time_observed_greater_than_or_equal_to",
- "time_observed_less_than",
"limit",
- "page",
- "waf_feature"
+ "page"
]
extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- "list_waf_blocked_requests got unknown kwargs: {!r}".format(extra_kwargs))
+ "list_caching_rules got unknown kwargs: {!r}".format(extra_kwargs))
path_params = {
"waasPolicyId": waas_policy_id
@@ -2645,20 +2531,9 @@ def list_waf_blocked_requests(self, waas_policy_id, **kwargs):
if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
- if 'waf_feature' in kwargs:
- waf_feature_allowed_values = ["PROTECTION_RULES", "JS_CHALLENGE", "ACCESS_RULES", "THREAT_FEEDS", "HUMAN_INTERACTION_CHALLENGE", "DEVICE_FINGERPRINT_CHALLENGE", "CAPTCHA", "ADDRESS_RATE_LIMITING"]
- for waf_feature_item in kwargs['waf_feature']:
- if waf_feature_item not in waf_feature_allowed_values:
- raise ValueError(
- "Invalid value for `waf_feature`, must be one of {0}".format(waf_feature_allowed_values)
- )
-
query_params = {
- "timeObservedGreaterThanOrEqualTo": kwargs.get("time_observed_greater_than_or_equal_to", missing),
- "timeObservedLessThan": kwargs.get("time_observed_less_than", missing),
"limit": kwargs.get("limit", missing),
- "page": kwargs.get("page", missing),
- "wafFeature": self.base_client.generate_collection_format_param(kwargs.get("waf_feature", missing), 'multi')
+ "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}
@@ -2681,7 +2556,7 @@ def list_waf_blocked_requests(self, waas_policy_id, **kwargs):
path_params=path_params,
query_params=query_params,
header_params=header_params,
- response_type="list[WafBlockedRequest]")
+ response_type="list[CachingRuleSummary]")
else:
return self.base_client.call_api(
resource_path=resource_path,
@@ -2689,14 +2564,16 @@ def list_waf_blocked_requests(self, waas_policy_id, **kwargs):
path_params=path_params,
query_params=query_params,
header_params=header_params,
- response_type="list[WafBlockedRequest]")
+ response_type="list[CachingRuleSummary]")
- def list_waf_logs(self, waas_policy_id, **kwargs):
+ def list_captchas(self, waas_policy_id, **kwargs):
"""
- Returns a list of logs for the Web Application Firewall.
- Gets structured Web Application Firewall event logs for a WAAS
- policy. Sorted by the `timeObserved` in ascending order (starting from the
- oldest recorded event).
+ Returns a list of CAPTCHA configurations for the Web Application Firewall.
+ Gets the list of currently configured CAPTCHA challenges in the Web
+ Application Firewall configuration of a WAAS policy.
+
+ The order of the CAPTCHA challenges is important. The URL for each
+ CAPTCHA will be checked in the order they are created.
:param str waas_policy_id: (required)
@@ -2708,75 +2585,1692 @@ def list_waf_logs(self, waas_policy_id, **kwargs):
The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
:param int limit: (optional)
- The maximum number of items to return in a paginated call. In unspecified, defaults to `20`.
+ The maximum number of items to return in a paginated call. In unspecified, defaults to `10`.
:param str page: (optional)
The value of the `opc-next-page` response header from the previous paginated call.
- :param datetime time_observed_greater_than_or_equal_to: (optional)
- A filter that matches log entries where the observed event occurred on or after a date and time specified in RFC 3339 format. If unspecified, defaults to two hours before receipt of 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.
- :param datetime time_observed_less_than: (optional)
- A filter that matches log entries where the observed event occurred before a date and time, specified in RFC 3339 format.
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY`
+ is also available. The specifics of the default retry strategy are described `here `__.
- :param str text_contains: (optional)
- A full text search for logs.
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
- :param list[str] access_rule_key: (optional)
- Filters logs by access rule key.
+ :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.waas.models.Captcha`
+ :rtype: :class:`~oci.response.Response`
+ """
+ resource_path = "/waasPolicies/{waasPolicyId}/wafConfig/captchas"
+ method = "GET"
- :param list[str] action: (optional)
- Filters logs by Web Application Firewall action.
+ # Don't accept unknown kwargs
+ expected_kwargs = [
+ "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(
+ "list_captchas got unknown kwargs: {!r}".format(extra_kwargs))
- Allowed values are: "BLOCK", "DETECT", "BYPASS", "LOG", "REDIRECTED"
+ path_params = {
+ "waasPolicyId": waas_policy_id
+ }
- :param list[str] client_address: (optional)
- Filters logs by client IP address.
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
- :param list[str] country_code: (optional)
- Filters logs by country code. Country codes are in ISO 3166-1 alpha-2 format. For a list of codes, see `ISO's website`__.
+ for (k, v) in six.iteritems(path_params):
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
+ raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
- __ https://www.iso.org/obp/ui/#search/code/
+ 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}
- :param list[str] country_name: (optional)
- Filter logs by country name.
+ 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 list[str] fingerprint: (optional)
- Filter logs by device fingerprint.
+ retry_strategy = self.retry_strategy
+ if kwargs.get('retry_strategy'):
+ retry_strategy = kwargs.get('retry_strategy')
- :param list[str] http_method: (optional)
- Filter logs by HTTP method.
+ if retry_strategy:
+ return retry_strategy.make_retrying_call(
+ self.base_client.call_api,
+ resource_path=resource_path,
+ method=method,
+ path_params=path_params,
+ query_params=query_params,
+ header_params=header_params,
+ response_type="list[Captcha]")
+ 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[Captcha]")
- Allowed values are: "OPTIONS", "GET", "HEAD", "POST", "PUT", "DELETE", "TRACE", "CONNECT"
+ def list_certificates(self, compartment_id, **kwargs):
+ """
+ Returns a list of certificates.
+ Gets a list of SSL certificates that can be used in a WAAS policy.
- :param list[str] incident_key: (optional)
- Filter logs by incident key.
- :param list[str] log_type: (optional)
- Filter by log type.
+ :param str compartment_id: (required)
+ The `OCID`__ of the compartment. This number is generated when the compartment is created.
- Allowed values are: "ACCESS", "PROTECTION_RULES", "JS_CHALLENGE", "CAPTCHA", "ACCESS_RULES", "THREAT_FEEDS", "HUMAN_INTERACTION_CHALLENGE", "DEVICE_FINGERPRINT_CHALLENGE", "ADDRESS_RATE_LIMITING"
+ __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
- :param list[str] origin_address: (optional)
- Filter by origin IP address.
+ :param str opc_request_id: (optional)
+ The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
- :param list[str] referrer: (optional)
- Filter by referrer.
+ :param int limit: (optional)
+ The maximum number of items to return in a paginated call. In unspecified, defaults to `10`.
- :param list[str] request_url: (optional)
- Filter by request URL.
+ :param str page: (optional)
+ The value of the `opc-next-page` response header from the previous paginated call.
- :param list[int] response_code: (optional)
+ :param str sort_by: (optional)
+ The value by which certificate summaries are sorted in a paginated 'List' call. If unspecified, defaults to `timeCreated`.
+
+ Allowed values are: "id", "compartmentId", "displayName", "notValidAfter", "timeCreated"
+
+ :param str sort_order: (optional)
+ The value of the sorting direction of resources in a paginated 'List' call. If unspecified, defaults to `DESC`.
+
+ Allowed values are: "ASC", "DESC"
+
+ :param list[str] id: (optional)
+ Filter certificates using a list of certificates OCIDs.
+
+ :param list[str] display_name: (optional)
+ Filter certificates using a list of display names.
+
+ :param list[str] lifecycle_state: (optional)
+ Filter certificates using a list of lifecycle states.
+
+ Allowed values are: "CREATING", "ACTIVE", "FAILED", "UPDATING", "DELETING", "DELETED"
+
+ :param datetime time_created_greater_than_or_equal_to: (optional)
+ A filter that matches certificates created on or after the specified date-time.
+
+ :param datetime time_created_less_than: (optional)
+ A filter that matches certificates created before the specified date-time.
+
+ :param obj retry_strategy: (optional)
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
+
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY`
+ is also available. The specifics of the default retry strategy are described `here `__.
+
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
+
+ :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.waas.models.CertificateSummary`
+ :rtype: :class:`~oci.response.Response`
+ """
+ resource_path = "/certificates"
+ method = "GET"
+
+ # Don't accept unknown kwargs
+ expected_kwargs = [
+ "retry_strategy",
+ "opc_request_id",
+ "limit",
+ "page",
+ "sort_by",
+ "sort_order",
+ "id",
+ "display_name",
+ "lifecycle_state",
+ "time_created_greater_than_or_equal_to",
+ "time_created_less_than"
+ ]
+ extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs]
+ if extra_kwargs:
+ raise ValueError(
+ "list_certificates got unknown kwargs: {!r}".format(extra_kwargs))
+
+ if 'sort_by' in kwargs:
+ sort_by_allowed_values = ["id", "compartmentId", "displayName", "notValidAfter", "timeCreated"]
+ if kwargs['sort_by'] not in sort_by_allowed_values:
+ raise ValueError(
+ "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values)
+ )
+
+ if 'sort_order' in kwargs:
+ sort_order_allowed_values = ["ASC", "DESC"]
+ if kwargs['sort_order'] not in sort_order_allowed_values:
+ raise ValueError(
+ "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values)
+ )
+
+ if 'lifecycle_state' in kwargs:
+ lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "FAILED", "UPDATING", "DELETING", "DELETED"]
+ for lifecycle_state_item in kwargs['lifecycle_state']:
+ if lifecycle_state_item not in lifecycle_state_allowed_values:
+ raise ValueError(
+ "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values)
+ )
+
+ query_params = {
+ "limit": kwargs.get("limit", missing),
+ "page": kwargs.get("page", missing),
+ "sortBy": kwargs.get("sort_by", missing),
+ "sortOrder": kwargs.get("sort_order", missing),
+ "compartmentId": compartment_id,
+ "id": self.base_client.generate_collection_format_param(kwargs.get("id", missing), 'multi'),
+ "displayName": self.base_client.generate_collection_format_param(kwargs.get("display_name", missing), 'multi'),
+ "lifecycleState": self.base_client.generate_collection_format_param(kwargs.get("lifecycle_state", missing), 'multi'),
+ "timeCreatedGreaterThanOrEqualTo": kwargs.get("time_created_greater_than_or_equal_to", missing),
+ "timeCreatedLessThan": kwargs.get("time_created_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",
+ "opc-request-id": kwargs.get("opc_request_id", missing)
+ }
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
+
+ retry_strategy = self.retry_strategy
+ if kwargs.get('retry_strategy'):
+ retry_strategy = kwargs.get('retry_strategy')
+
+ if retry_strategy:
+ return retry_strategy.make_retrying_call(
+ self.base_client.call_api,
+ resource_path=resource_path,
+ method=method,
+ query_params=query_params,
+ header_params=header_params,
+ response_type="list[CertificateSummary]")
+ else:
+ return self.base_client.call_api(
+ resource_path=resource_path,
+ method=method,
+ query_params=query_params,
+ header_params=header_params,
+ response_type="list[CertificateSummary]")
+
+ def list_custom_protection_rules(self, compartment_id, **kwargs):
+ """
+ Returns the list of Custom Protection rules for the given compartment.
+ Gets a list of Custom Protection rules.
+
+
+ :param str compartment_id: (required)
+ The `OCID`__ of the compartment. This number is generated when the compartment is created.
+
+ __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
+
+ :param str opc_request_id: (optional)
+ The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
+
+ :param int limit: (optional)
+ The maximum number of items to return in a paginated call. In unspecified, defaults to `10`.
+
+ :param str page: (optional)
+ The value of the `opc-next-page` response header from the previous paginated call.
+
+ :param str sort_by: (optional)
+ The value by which Custom Protection rules are sorted in a paginated 'List' call. If unspecified, defaults to `timeCreated`.
+
+ Allowed values are: "id", "compartmentId", "displayName", "modSecurityRuleId", "timeCreated"
+
+ :param str sort_order: (optional)
+ The value of the sorting direction of resources in a paginated 'List' call. If unspecified, defaults to `DESC`.
+
+ Allowed values are: "ASC", "DESC"
+
+ :param list[str] id: (optional)
+ Filter Custom Protection rules using a list of Custom Protection rules OCIDs.
+
+ :param list[str] display_name: (optional)
+ Filter Custom Protection rules using a list of display names.
+
+ :param list[str] lifecycle_state: (optional)
+ Filter Custom Protection rules using a list of lifecycle states.
+
+ Allowed values are: "CREATING", "ACTIVE", "FAILED", "UPDATING", "DELETING", "DELETED"
+
+ :param datetime time_created_greater_than_or_equal_to: (optional)
+ A filter that matches Custom Protection rules created on or after the specified date-time.
+
+ :param datetime time_created_less_than: (optional)
+ A filter that matches Custom Protection rules created before the specified date-time.
+
+ :param obj retry_strategy: (optional)
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
+
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY`
+ is also available. The specifics of the default retry strategy are described `here `__.
+
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
+
+ :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.waas.models.CustomProtectionRuleSummary`
+ :rtype: :class:`~oci.response.Response`
+ """
+ resource_path = "/customProtectionRules"
+ method = "GET"
+
+ # Don't accept unknown kwargs
+ expected_kwargs = [
+ "retry_strategy",
+ "opc_request_id",
+ "limit",
+ "page",
+ "sort_by",
+ "sort_order",
+ "id",
+ "display_name",
+ "lifecycle_state",
+ "time_created_greater_than_or_equal_to",
+ "time_created_less_than"
+ ]
+ extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs]
+ if extra_kwargs:
+ raise ValueError(
+ "list_custom_protection_rules got unknown kwargs: {!r}".format(extra_kwargs))
+
+ if 'sort_by' in kwargs:
+ sort_by_allowed_values = ["id", "compartmentId", "displayName", "modSecurityRuleId", "timeCreated"]
+ if kwargs['sort_by'] not in sort_by_allowed_values:
+ raise ValueError(
+ "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values)
+ )
+
+ if 'sort_order' in kwargs:
+ sort_order_allowed_values = ["ASC", "DESC"]
+ if kwargs['sort_order'] not in sort_order_allowed_values:
+ raise ValueError(
+ "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values)
+ )
+
+ if 'lifecycle_state' in kwargs:
+ lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "FAILED", "UPDATING", "DELETING", "DELETED"]
+ for lifecycle_state_item in kwargs['lifecycle_state']:
+ if lifecycle_state_item not in lifecycle_state_allowed_values:
+ raise ValueError(
+ "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values)
+ )
+
+ query_params = {
+ "compartmentId": compartment_id,
+ "limit": kwargs.get("limit", missing),
+ "page": kwargs.get("page", missing),
+ "sortBy": kwargs.get("sort_by", missing),
+ "sortOrder": kwargs.get("sort_order", missing),
+ "id": self.base_client.generate_collection_format_param(kwargs.get("id", missing), 'multi'),
+ "displayName": self.base_client.generate_collection_format_param(kwargs.get("display_name", missing), 'multi'),
+ "lifecycleState": self.base_client.generate_collection_format_param(kwargs.get("lifecycle_state", missing), 'multi'),
+ "timeCreatedGreaterThanOrEqualTo": kwargs.get("time_created_greater_than_or_equal_to", missing),
+ "timeCreatedLessThan": kwargs.get("time_created_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",
+ "opc-request-id": kwargs.get("opc_request_id", missing)
+ }
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
+
+ retry_strategy = self.retry_strategy
+ if kwargs.get('retry_strategy'):
+ retry_strategy = kwargs.get('retry_strategy')
+
+ if retry_strategy:
+ return retry_strategy.make_retrying_call(
+ self.base_client.call_api,
+ resource_path=resource_path,
+ method=method,
+ query_params=query_params,
+ header_params=header_params,
+ response_type="list[CustomProtectionRuleSummary]")
+ else:
+ return self.base_client.call_api(
+ resource_path=resource_path,
+ method=method,
+ query_params=query_params,
+ header_params=header_params,
+ response_type="list[CustomProtectionRuleSummary]")
+
+ def list_edge_subnets(self, **kwargs):
+ """
+ Returns a list of subnets corresponding the Web Application Firewall.
+ Return the list of the tenant's edge node subnets. Use these CIDR blocks to restrict incoming traffic to your origin. These subnets are owned by OCI and forward traffic to customer origins. They are not associated with specific regions or compartments.
+
+
+ :param str opc_request_id: (optional)
+ The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
+
+ :param int limit: (optional)
+ The maximum number of items to return in a paginated call. In unspecified, defaults to `10`.
+
+ :param str page: (optional)
+ The value of the `opc-next-page` response header from the previous paginated call.
+
+ :param str sort_by: (optional)
+ The value by which edge node subnets are sorted in a paginated 'List' call. If unspecified, defaults to `timeModified`.
+
+ Allowed values are: "cidr", "region", "timeModified"
+
+ :param str sort_order: (optional)
+ The value of the sorting direction of resources in a paginated 'List' call. If unspecified, defaults to `DESC`.
+
+ Allowed values are: "ASC", "DESC"
+
+ :param obj retry_strategy: (optional)
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
+
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY`
+ is also available. The specifics of the default retry strategy are described `here `__.
+
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
+
+ :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.waas.models.EdgeSubnet`
+ :rtype: :class:`~oci.response.Response`
+ """
+ resource_path = "/edgeSubnets"
+ method = "GET"
+
+ # Don't accept unknown kwargs
+ expected_kwargs = [
+ "retry_strategy",
+ "opc_request_id",
+ "limit",
+ "page",
+ "sort_by",
+ "sort_order"
+ ]
+ extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs]
+ if extra_kwargs:
+ raise ValueError(
+ "list_edge_subnets got unknown kwargs: {!r}".format(extra_kwargs))
+
+ if 'sort_by' in kwargs:
+ sort_by_allowed_values = ["cidr", "region", "timeModified"]
+ if kwargs['sort_by'] not in sort_by_allowed_values:
+ raise ValueError(
+ "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values)
+ )
+
+ if 'sort_order' in kwargs:
+ sort_order_allowed_values = ["ASC", "DESC"]
+ if kwargs['sort_order'] not in sort_order_allowed_values:
+ raise ValueError(
+ "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values)
+ )
+
+ query_params = {
+ "limit": kwargs.get("limit", missing),
+ "page": kwargs.get("page", missing),
+ "sortBy": kwargs.get("sort_by", missing),
+ "sortOrder": kwargs.get("sort_order", missing)
+ }
+ query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
+
+ header_params = {
+ "accept": "application/json",
+ "content-type": "application/json",
+ "opc-request-id": kwargs.get("opc_request_id", missing)
+ }
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
+
+ retry_strategy = self.retry_strategy
+ if kwargs.get('retry_strategy'):
+ retry_strategy = kwargs.get('retry_strategy')
+
+ if retry_strategy:
+ return retry_strategy.make_retrying_call(
+ self.base_client.call_api,
+ resource_path=resource_path,
+ method=method,
+ query_params=query_params,
+ header_params=header_params,
+ response_type="list[EdgeSubnet]")
+ else:
+ return self.base_client.call_api(
+ resource_path=resource_path,
+ method=method,
+ query_params=query_params,
+ header_params=header_params,
+ response_type="list[EdgeSubnet]")
+
+ def list_good_bots(self, waas_policy_id, **kwargs):
+ """
+ Returns the list of good bot configurations for the Web Application Firewall.
+ Gets the list of good bots defined in the Web Application Firewall configuration for a WAAS policy.
+
+ The list is sorted by `key`, in ascending order.
+
+
+ :param str waas_policy_id: (required)
+ The `OCID`__ of the WAAS policy.
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
+
+ :param str opc_request_id: (optional)
+ The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
+
+ :param int limit: (optional)
+ The maximum number of items to return in a paginated call. In unspecified, defaults to `10`.
+
+ :param str page: (optional)
+ The value of the `opc-next-page` response header from the previous paginated call.
+
+ :param obj retry_strategy: (optional)
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
+
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY`
+ is also available. The specifics of the default retry strategy are described `here `__.
+
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
+
+ :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.waas.models.GoodBot`
+ :rtype: :class:`~oci.response.Response`
+ """
+ resource_path = "/waasPolicies/{waasPolicyId}/wafConfig/goodBots"
+ method = "GET"
+
+ # Don't accept unknown kwargs
+ expected_kwargs = [
+ "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(
+ "list_good_bots got unknown kwargs: {!r}".format(extra_kwargs))
+
+ path_params = {
+ "waasPolicyId": waas_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('Parameter {} cannot be None, whitespace or empty string'.format(k))
+
+ 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.retry_strategy
+ if kwargs.get('retry_strategy'):
+ retry_strategy = kwargs.get('retry_strategy')
+
+ if retry_strategy:
+ return retry_strategy.make_retrying_call(
+ self.base_client.call_api,
+ resource_path=resource_path,
+ method=method,
+ path_params=path_params,
+ query_params=query_params,
+ header_params=header_params,
+ response_type="list[GoodBot]")
+ 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[GoodBot]")
+
+ def list_protection_rules(self, waas_policy_id, **kwargs):
+ """
+ Returns the list of protection rules for the Web Application Firewall.
+ Gets the list of available protection rules for a WAAS policy. Use the `GetWafConfig` operation to view a list of currently configured protection rules for the Web Application Firewall, or use the `ListRecommendations` operation to get a list of recommended protection rules for the Web Application Firewall.
+ The list is sorted by `key`, in ascending order.
+
+
+ :param str waas_policy_id: (required)
+ The `OCID`__ of the WAAS policy.
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
+
+ :param str opc_request_id: (optional)
+ The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
+
+ :param int limit: (optional)
+ The maximum number of items to return in a paginated call. In unspecified, defaults to `10`.
+
+ :param str page: (optional)
+ The value of the `opc-next-page` response header from the previous paginated call.
+
+ :param list[str] mod_security_rule_id: (optional)
+ Filter rules using a list of ModSecurity rule IDs.
+
+ :param list[str] action: (optional)
+ Filter rules using a list of actions.
+
+ Allowed values are: "OFF", "DETECT", "BLOCK"
+
+ :param obj retry_strategy: (optional)
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
+
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY`
+ is also available. The specifics of the default retry strategy are described `here `__.
+
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
+
+ :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.waas.models.ProtectionRule`
+ :rtype: :class:`~oci.response.Response`
+ """
+ resource_path = "/waasPolicies/{waasPolicyId}/wafConfig/protectionRules"
+ method = "GET"
+
+ # Don't accept unknown kwargs
+ expected_kwargs = [
+ "retry_strategy",
+ "opc_request_id",
+ "limit",
+ "page",
+ "mod_security_rule_id",
+ "action"
+ ]
+ extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs]
+ if extra_kwargs:
+ raise ValueError(
+ "list_protection_rules got unknown kwargs: {!r}".format(extra_kwargs))
+
+ path_params = {
+ "waasPolicyId": waas_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('Parameter {} cannot be None, whitespace or empty string'.format(k))
+
+ if 'action' in kwargs:
+ action_allowed_values = ["OFF", "DETECT", "BLOCK"]
+ for action_item in kwargs['action']:
+ if action_item not in action_allowed_values:
+ raise ValueError(
+ "Invalid value for `action`, must be one of {0}".format(action_allowed_values)
+ )
+
+ query_params = {
+ "limit": kwargs.get("limit", missing),
+ "page": kwargs.get("page", missing),
+ "modSecurityRuleId": self.base_client.generate_collection_format_param(kwargs.get("mod_security_rule_id", missing), 'multi'),
+ "action": self.base_client.generate_collection_format_param(kwargs.get("action", 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.retry_strategy
+ if kwargs.get('retry_strategy'):
+ retry_strategy = kwargs.get('retry_strategy')
+
+ if retry_strategy:
+ return retry_strategy.make_retrying_call(
+ self.base_client.call_api,
+ resource_path=resource_path,
+ method=method,
+ path_params=path_params,
+ query_params=query_params,
+ header_params=header_params,
+ response_type="list[ProtectionRule]")
+ 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[ProtectionRule]")
+
+ def list_recommendations(self, waas_policy_id, **kwargs):
+ """
+ Returns the list of recommended Web Application Firewall protection rules.
+ Gets the list of recommended Web Application Firewall protection rules.
+
+ Use the `POST /waasPolicies/{waasPolicyId}/actions/acceptWafConfigRecommendations` method to accept recommended Web Application Firewall protection rules. For more information, see `WAF Protection Rules`__.
+ The list is sorted by `key`, in ascending order.
+
+ __ https://docs.cloud.oracle.com/iaas/Content/WAF/Tasks/wafprotectionrules.htm
+
+
+ :param str waas_policy_id: (required)
+ The `OCID`__ of the WAAS policy.
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
+
+ :param str opc_request_id: (optional)
+ The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
+
+ :param str recommended_action: (optional)
+ A filter that matches recommended protection rules based on the selected action. If unspecified, rules with any action type are returned.
+
+ Allowed values are: "DETECT", "BLOCK"
+
+ :param int limit: (optional)
+ The maximum number of items to return in a paginated call. In unspecified, defaults to `10`.
+
+ :param str page: (optional)
+ The value of the `opc-next-page` response header from the previous paginated call.
+
+ :param obj retry_strategy: (optional)
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
+
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY`
+ is also available. The specifics of the default retry strategy are described `here `__.
+
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
+
+ :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.waas.models.Recommendation`
+ :rtype: :class:`~oci.response.Response`
+ """
+ resource_path = "/waasPolicies/{waasPolicyId}/wafConfig/recommendations"
+ method = "GET"
+
+ # Don't accept unknown kwargs
+ expected_kwargs = [
+ "retry_strategy",
+ "opc_request_id",
+ "recommended_action",
+ "limit",
+ "page"
+ ]
+ extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs]
+ if extra_kwargs:
+ raise ValueError(
+ "list_recommendations got unknown kwargs: {!r}".format(extra_kwargs))
+
+ path_params = {
+ "waasPolicyId": waas_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('Parameter {} cannot be None, whitespace or empty string'.format(k))
+
+ if 'recommended_action' in kwargs:
+ recommended_action_allowed_values = ["DETECT", "BLOCK"]
+ if kwargs['recommended_action'] not in recommended_action_allowed_values:
+ raise ValueError(
+ "Invalid value for `recommended_action`, must be one of {0}".format(recommended_action_allowed_values)
+ )
+
+ query_params = {
+ "recommendedAction": kwargs.get("recommended_action", missing),
+ "limit": kwargs.get("limit", missing),
+ "page": kwargs.get("page", missing)
+ }
+ query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
+
+ header_params = {
+ "accept": "application/json",
+ "content-type": "application/json",
+ "opc-request-id": kwargs.get("opc_request_id", missing)
+ }
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
+
+ retry_strategy = self.retry_strategy
+ if kwargs.get('retry_strategy'):
+ retry_strategy = kwargs.get('retry_strategy')
+
+ if retry_strategy:
+ return retry_strategy.make_retrying_call(
+ self.base_client.call_api,
+ resource_path=resource_path,
+ method=method,
+ path_params=path_params,
+ query_params=query_params,
+ header_params=header_params,
+ response_type="list[Recommendation]")
+ 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[Recommendation]")
+
+ def list_threat_feeds(self, waas_policy_id, **kwargs):
+ """
+ Returns a list of threat intelligence feeds.
+ Gets the list of available web application threat intelligence feeds
+ and the actions set for each feed. The list is sorted by `key`,
+ in ascending order.
+
+
+ :param str waas_policy_id: (required)
+ The `OCID`__ of the WAAS policy.
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
+
+ :param str opc_request_id: (optional)
+ The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
+
+ :param int limit: (optional)
+ The maximum number of items to return in a paginated call. In unspecified, defaults to `10`.
+
+ :param str page: (optional)
+ The value of the `opc-next-page` response header from the previous paginated call.
+
+ :param obj retry_strategy: (optional)
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
+
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY`
+ is also available. The specifics of the default retry strategy are described `here `__.
+
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
+
+ :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.waas.models.ThreatFeed`
+ :rtype: :class:`~oci.response.Response`
+ """
+ resource_path = "/waasPolicies/{waasPolicyId}/wafConfig/threatFeeds"
+ method = "GET"
+
+ # Don't accept unknown kwargs
+ expected_kwargs = [
+ "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(
+ "list_threat_feeds got unknown kwargs: {!r}".format(extra_kwargs))
+
+ path_params = {
+ "waasPolicyId": waas_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('Parameter {} cannot be None, whitespace or empty string'.format(k))
+
+ 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.retry_strategy
+ if kwargs.get('retry_strategy'):
+ retry_strategy = kwargs.get('retry_strategy')
+
+ if retry_strategy:
+ return retry_strategy.make_retrying_call(
+ self.base_client.call_api,
+ resource_path=resource_path,
+ method=method,
+ path_params=path_params,
+ query_params=query_params,
+ header_params=header_params,
+ response_type="list[ThreatFeed]")
+ 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[ThreatFeed]")
+
+ def list_waas_policies(self, compartment_id, **kwargs):
+ """
+ Returns the list of policies for the given compartment.
+ Gets a list of WAAS policies.
+
+
+ :param str compartment_id: (required)
+ The `OCID`__ of the compartment. This number is generated when the compartment is created.
+
+ __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
+
+ :param str opc_request_id: (optional)
+ The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
+
+ :param int limit: (optional)
+ The maximum number of items to return in a paginated call. In unspecified, defaults to `10`.
+
+ :param str page: (optional)
+ The value of the `opc-next-page` response header from the previous paginated call.
+
+ :param str sort_by: (optional)
+ The value by which policies are sorted in a paginated 'List' call. If unspecified, defaults to `timeCreated`.
+
+ Allowed values are: "id", "displayName", "timeCreated"
+
+ :param str sort_order: (optional)
+ The value of the sorting direction of resources in a paginated 'List' call. If unspecified, defaults to `DESC`.
+
+ Allowed values are: "ASC", "DESC"
+
+ :param list[str] id: (optional)
+ Filter policies using a list of policy OCIDs.
+
+ :param list[str] display_name: (optional)
+ Filter policies using a list of display names.
+
+ :param list[str] lifecycle_state: (optional)
+ Filter policies using a list of lifecycle states.
+
+ Allowed values are: "CREATING", "ACTIVE", "FAILED", "UPDATING", "DELETING", "DELETED"
+
+ :param datetime time_created_greater_than_or_equal_to: (optional)
+ A filter that matches policies created on or after the specified date and time.
+
+ :param datetime time_created_less_than: (optional)
+ A filter that matches policies created before the specified date-time.
+
+ :param obj retry_strategy: (optional)
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
+
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY`
+ is also available. The specifics of the default retry strategy are described `here `__.
+
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
+
+ :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.waas.models.WaasPolicySummary`
+ :rtype: :class:`~oci.response.Response`
+ """
+ resource_path = "/waasPolicies"
+ method = "GET"
+
+ # Don't accept unknown kwargs
+ expected_kwargs = [
+ "retry_strategy",
+ "opc_request_id",
+ "limit",
+ "page",
+ "sort_by",
+ "sort_order",
+ "id",
+ "display_name",
+ "lifecycle_state",
+ "time_created_greater_than_or_equal_to",
+ "time_created_less_than"
+ ]
+ extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs]
+ if extra_kwargs:
+ raise ValueError(
+ "list_waas_policies got unknown kwargs: {!r}".format(extra_kwargs))
+
+ if 'sort_by' in kwargs:
+ sort_by_allowed_values = ["id", "displayName", "timeCreated"]
+ if kwargs['sort_by'] not in sort_by_allowed_values:
+ raise ValueError(
+ "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values)
+ )
+
+ if 'sort_order' in kwargs:
+ sort_order_allowed_values = ["ASC", "DESC"]
+ if kwargs['sort_order'] not in sort_order_allowed_values:
+ raise ValueError(
+ "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values)
+ )
+
+ if 'lifecycle_state' in kwargs:
+ lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "FAILED", "UPDATING", "DELETING", "DELETED"]
+ for lifecycle_state_item in kwargs['lifecycle_state']:
+ if lifecycle_state_item not in lifecycle_state_allowed_values:
+ raise ValueError(
+ "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values)
+ )
+
+ query_params = {
+ "compartmentId": compartment_id,
+ "limit": kwargs.get("limit", missing),
+ "page": kwargs.get("page", missing),
+ "sortBy": kwargs.get("sort_by", missing),
+ "sortOrder": kwargs.get("sort_order", missing),
+ "id": self.base_client.generate_collection_format_param(kwargs.get("id", missing), 'multi'),
+ "displayName": self.base_client.generate_collection_format_param(kwargs.get("display_name", missing), 'multi'),
+ "lifecycleState": self.base_client.generate_collection_format_param(kwargs.get("lifecycle_state", missing), 'multi'),
+ "timeCreatedGreaterThanOrEqualTo": kwargs.get("time_created_greater_than_or_equal_to", missing),
+ "timeCreatedLessThan": kwargs.get("time_created_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",
+ "opc-request-id": kwargs.get("opc_request_id", missing)
+ }
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
+
+ retry_strategy = self.retry_strategy
+ if kwargs.get('retry_strategy'):
+ retry_strategy = kwargs.get('retry_strategy')
+
+ if retry_strategy:
+ return retry_strategy.make_retrying_call(
+ self.base_client.call_api,
+ resource_path=resource_path,
+ method=method,
+ query_params=query_params,
+ header_params=header_params,
+ response_type="list[WaasPolicySummary]")
+ else:
+ return self.base_client.call_api(
+ resource_path=resource_path,
+ method=method,
+ query_params=query_params,
+ header_params=header_params,
+ response_type="list[WaasPolicySummary]")
+
+ def list_waas_policy_custom_protection_rules(self, waas_policy_id, **kwargs):
+ """
+ Returns the list of custom protection rules for the Web Application Firewall.
+ Gets the list of currently configured custom protection rules for a WAAS policy.
+
+
+ :param str waas_policy_id: (required)
+ The `OCID`__ of the WAAS policy.
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
+
+ :param str opc_request_id: (optional)
+ The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
+
+ :param int limit: (optional)
+ The maximum number of items to return in a paginated call. In unspecified, defaults to `10`.
+
+ :param str page: (optional)
+ The value of the `opc-next-page` response header from the previous paginated call.
+
+ :param list[str] mod_security_rule_id: (optional)
+ Filter rules using a list of ModSecurity rule IDs.
+
+ :param list[str] action: (optional)
+ Filter rules using a list of actions.
+
+ Allowed values are: "DETECT", "BLOCK"
+
+ :param obj retry_strategy: (optional)
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
+
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY`
+ is also available. The specifics of the default retry strategy are described `here `__.
+
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
+
+ :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.waas.models.WaasPolicyCustomProtectionRuleSummary`
+ :rtype: :class:`~oci.response.Response`
+ """
+ resource_path = "/waasPolicies/{waasPolicyId}/wafConfig/customProtectionRules"
+ method = "GET"
+
+ # Don't accept unknown kwargs
+ expected_kwargs = [
+ "retry_strategy",
+ "opc_request_id",
+ "limit",
+ "page",
+ "mod_security_rule_id",
+ "action"
+ ]
+ extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs]
+ if extra_kwargs:
+ raise ValueError(
+ "list_waas_policy_custom_protection_rules got unknown kwargs: {!r}".format(extra_kwargs))
+
+ path_params = {
+ "waasPolicyId": waas_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('Parameter {} cannot be None, whitespace or empty string'.format(k))
+
+ if 'action' in kwargs:
+ action_allowed_values = ["DETECT", "BLOCK"]
+ for action_item in kwargs['action']:
+ if action_item not in action_allowed_values:
+ raise ValueError(
+ "Invalid value for `action`, must be one of {0}".format(action_allowed_values)
+ )
+
+ query_params = {
+ "limit": kwargs.get("limit", missing),
+ "page": kwargs.get("page", missing),
+ "modSecurityRuleId": self.base_client.generate_collection_format_param(kwargs.get("mod_security_rule_id", missing), 'multi'),
+ "action": self.base_client.generate_collection_format_param(kwargs.get("action", 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.retry_strategy
+ if kwargs.get('retry_strategy'):
+ retry_strategy = kwargs.get('retry_strategy')
+
+ if retry_strategy:
+ return retry_strategy.make_retrying_call(
+ self.base_client.call_api,
+ resource_path=resource_path,
+ method=method,
+ path_params=path_params,
+ query_params=query_params,
+ header_params=header_params,
+ response_type="list[WaasPolicyCustomProtectionRuleSummary]")
+ 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[WaasPolicyCustomProtectionRuleSummary]")
+
+ def list_waf_blocked_requests(self, waas_policy_id, **kwargs):
+ """
+ Returns a list of requests blocked by the Web Application Firewall.
+ Gets the number of blocked requests by a Web Application Firewall feature in five minute blocks, sorted by `timeObserved` in ascending order (starting from oldest data).
+
+
+ :param str waas_policy_id: (required)
+ The `OCID`__ of the WAAS policy.
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
+
+ :param str opc_request_id: (optional)
+ The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
+
+ :param datetime time_observed_greater_than_or_equal_to: (optional)
+ A filter that limits returned events to those occurring on or after a date and time, specified in RFC 3339 format. If unspecified, defaults to 30 minutes before receipt of the request.
+
+ :param datetime time_observed_less_than: (optional)
+ A filter that limits returned events to those occurring before a date and time, specified in RFC 3339 format.
+
+ :param int limit: (optional)
+ The maximum number of items to return in a paginated call. In unspecified, defaults to `10`.
+
+ :param str page: (optional)
+ The value of the `opc-next-page` response header from the previous paginated call.
+
+ :param list[str] waf_feature: (optional)
+ Filter stats by the Web Application Firewall feature that triggered the block action. If unspecified, data for all WAF features will be returned.
+
+ Allowed values are: "PROTECTION_RULES", "JS_CHALLENGE", "ACCESS_RULES", "THREAT_FEEDS", "HUMAN_INTERACTION_CHALLENGE", "DEVICE_FINGERPRINT_CHALLENGE", "CAPTCHA", "ADDRESS_RATE_LIMITING"
+
+ :param obj retry_strategy: (optional)
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
+
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY`
+ is also available. The specifics of the default retry strategy are described `here `__.
+
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
+
+ :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.waas.models.WafBlockedRequest`
+ :rtype: :class:`~oci.response.Response`
+ """
+ resource_path = "/waasPolicies/{waasPolicyId}/reports/waf/blocked"
+ method = "GET"
+
+ # Don't accept unknown kwargs
+ expected_kwargs = [
+ "retry_strategy",
+ "opc_request_id",
+ "time_observed_greater_than_or_equal_to",
+ "time_observed_less_than",
+ "limit",
+ "page",
+ "waf_feature"
+ ]
+ extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs]
+ if extra_kwargs:
+ raise ValueError(
+ "list_waf_blocked_requests got unknown kwargs: {!r}".format(extra_kwargs))
+
+ path_params = {
+ "waasPolicyId": waas_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('Parameter {} cannot be None, whitespace or empty string'.format(k))
+
+ if 'waf_feature' in kwargs:
+ waf_feature_allowed_values = ["PROTECTION_RULES", "JS_CHALLENGE", "ACCESS_RULES", "THREAT_FEEDS", "HUMAN_INTERACTION_CHALLENGE", "DEVICE_FINGERPRINT_CHALLENGE", "CAPTCHA", "ADDRESS_RATE_LIMITING"]
+ for waf_feature_item in kwargs['waf_feature']:
+ if waf_feature_item not in waf_feature_allowed_values:
+ raise ValueError(
+ "Invalid value for `waf_feature`, must be one of {0}".format(waf_feature_allowed_values)
+ )
+
+ query_params = {
+ "timeObservedGreaterThanOrEqualTo": kwargs.get("time_observed_greater_than_or_equal_to", missing),
+ "timeObservedLessThan": kwargs.get("time_observed_less_than", missing),
+ "limit": kwargs.get("limit", missing),
+ "page": kwargs.get("page", missing),
+ "wafFeature": self.base_client.generate_collection_format_param(kwargs.get("waf_feature", 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.retry_strategy
+ if kwargs.get('retry_strategy'):
+ retry_strategy = kwargs.get('retry_strategy')
+
+ if retry_strategy:
+ return retry_strategy.make_retrying_call(
+ self.base_client.call_api,
+ resource_path=resource_path,
+ method=method,
+ path_params=path_params,
+ query_params=query_params,
+ header_params=header_params,
+ response_type="list[WafBlockedRequest]")
+ 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[WafBlockedRequest]")
+
+ def list_waf_logs(self, waas_policy_id, **kwargs):
+ """
+ Returns a list of logs for the Web Application Firewall.
+ Gets structured Web Application Firewall event logs for a WAAS
+ policy. Sorted by the `timeObserved` in ascending order (starting from the
+ oldest recorded event).
+
+
+ :param str waas_policy_id: (required)
+ The `OCID`__ of the WAAS policy.
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
+
+ :param str opc_request_id: (optional)
+ The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
+
+ :param int limit: (optional)
+ The maximum number of items to return in a paginated call. In unspecified, defaults to `20`.
+
+ :param str page: (optional)
+ The value of the `opc-next-page` response header from the previous paginated call.
+
+ :param datetime time_observed_greater_than_or_equal_to: (optional)
+ A filter that matches log entries where the observed event occurred on or after a date and time specified in RFC 3339 format. If unspecified, defaults to two hours before receipt of the request.
+
+ :param datetime time_observed_less_than: (optional)
+ A filter that matches log entries where the observed event occurred before a date and time, specified in RFC 3339 format.
+
+ :param str text_contains: (optional)
+ A full text search for logs.
+
+ :param list[str] access_rule_key: (optional)
+ Filters logs by access rule key.
+
+ :param list[str] action: (optional)
+ Filters logs by Web Application Firewall action.
+
+ Allowed values are: "BLOCK", "DETECT", "BYPASS", "LOG", "REDIRECTED"
+
+ :param list[str] client_address: (optional)
+ Filters logs by client IP address.
+
+ :param list[str] country_code: (optional)
+ Filters logs by country code. Country codes are in ISO 3166-1 alpha-2 format. For a list of codes, see `ISO's website`__.
+
+ __ https://www.iso.org/obp/ui/#search/code/
+
+ :param list[str] country_name: (optional)
+ Filter logs by country name.
+
+ :param list[str] fingerprint: (optional)
+ Filter logs by device fingerprint.
+
+ :param list[str] http_method: (optional)
+ Filter logs by HTTP method.
+
+ Allowed values are: "OPTIONS", "GET", "HEAD", "POST", "PUT", "DELETE", "TRACE", "CONNECT"
+
+ :param list[str] incident_key: (optional)
+ Filter logs by incident key.
+
+ :param list[str] log_type: (optional)
+ Filter by log type.
+
+ Allowed values are: "ACCESS", "PROTECTION_RULES", "JS_CHALLENGE", "CAPTCHA", "ACCESS_RULES", "THREAT_FEEDS", "HUMAN_INTERACTION_CHALLENGE", "DEVICE_FINGERPRINT_CHALLENGE", "ADDRESS_RATE_LIMITING"
+
+ :param list[str] origin_address: (optional)
+ Filter by origin IP address.
+
+ :param list[str] referrer: (optional)
+ Filter by referrer.
+
+ :param list[str] request_url: (optional)
+ Filter by request URL.
+
+ :param list[int] response_code: (optional)
Filter by response code.
- :param list[str] threat_feed_key: (optional)
- Filter by threat feed key.
+ :param list[str] threat_feed_key: (optional)
+ Filter by threat feed key.
+
+ :param list[str] user_agent: (optional)
+ Filter by user agent.
+
+ :param list[str] protection_rule_key: (optional)
+ Filter by protection rule key.
+
+ :param obj retry_strategy: (optional)
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
+
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY`
+ is also available. The specifics of the default retry strategy are described `here `__.
+
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
+
+ :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.waas.models.WafLog`
+ :rtype: :class:`~oci.response.Response`
+ """
+ resource_path = "/waasPolicies/{waasPolicyId}/wafLogs"
+ method = "GET"
+
+ # Don't accept unknown kwargs
+ expected_kwargs = [
+ "retry_strategy",
+ "opc_request_id",
+ "limit",
+ "page",
+ "time_observed_greater_than_or_equal_to",
+ "time_observed_less_than",
+ "text_contains",
+ "access_rule_key",
+ "action",
+ "client_address",
+ "country_code",
+ "country_name",
+ "fingerprint",
+ "http_method",
+ "incident_key",
+ "log_type",
+ "origin_address",
+ "referrer",
+ "request_url",
+ "response_code",
+ "threat_feed_key",
+ "user_agent",
+ "protection_rule_key"
+ ]
+ extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs]
+ if extra_kwargs:
+ raise ValueError(
+ "list_waf_logs got unknown kwargs: {!r}".format(extra_kwargs))
+
+ path_params = {
+ "waasPolicyId": waas_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('Parameter {} cannot be None, whitespace or empty string'.format(k))
+
+ if 'action' in kwargs:
+ action_allowed_values = ["BLOCK", "DETECT", "BYPASS", "LOG", "REDIRECTED"]
+ for action_item in kwargs['action']:
+ if action_item not in action_allowed_values:
+ raise ValueError(
+ "Invalid value for `action`, must be one of {0}".format(action_allowed_values)
+ )
+
+ if 'http_method' in kwargs:
+ http_method_allowed_values = ["OPTIONS", "GET", "HEAD", "POST", "PUT", "DELETE", "TRACE", "CONNECT"]
+ for http_method_item in kwargs['http_method']:
+ if http_method_item not in http_method_allowed_values:
+ raise ValueError(
+ "Invalid value for `http_method`, must be one of {0}".format(http_method_allowed_values)
+ )
+
+ if 'log_type' in kwargs:
+ log_type_allowed_values = ["ACCESS", "PROTECTION_RULES", "JS_CHALLENGE", "CAPTCHA", "ACCESS_RULES", "THREAT_FEEDS", "HUMAN_INTERACTION_CHALLENGE", "DEVICE_FINGERPRINT_CHALLENGE", "ADDRESS_RATE_LIMITING"]
+ for log_type_item in kwargs['log_type']:
+ if log_type_item not in log_type_allowed_values:
+ raise ValueError(
+ "Invalid value for `log_type`, must be one of {0}".format(log_type_allowed_values)
+ )
+
+ query_params = {
+ "limit": kwargs.get("limit", missing),
+ "page": kwargs.get("page", missing),
+ "timeObservedGreaterThanOrEqualTo": kwargs.get("time_observed_greater_than_or_equal_to", missing),
+ "timeObservedLessThan": kwargs.get("time_observed_less_than", missing),
+ "textContains": kwargs.get("text_contains", missing),
+ "accessRuleKey": self.base_client.generate_collection_format_param(kwargs.get("access_rule_key", missing), 'multi'),
+ "action": self.base_client.generate_collection_format_param(kwargs.get("action", missing), 'multi'),
+ "clientAddress": self.base_client.generate_collection_format_param(kwargs.get("client_address", missing), 'multi'),
+ "countryCode": self.base_client.generate_collection_format_param(kwargs.get("country_code", missing), 'multi'),
+ "countryName": self.base_client.generate_collection_format_param(kwargs.get("country_name", missing), 'multi'),
+ "fingerprint": self.base_client.generate_collection_format_param(kwargs.get("fingerprint", missing), 'multi'),
+ "httpMethod": self.base_client.generate_collection_format_param(kwargs.get("http_method", missing), 'multi'),
+ "incidentKey": self.base_client.generate_collection_format_param(kwargs.get("incident_key", missing), 'multi'),
+ "logType": self.base_client.generate_collection_format_param(kwargs.get("log_type", missing), 'multi'),
+ "originAddress": self.base_client.generate_collection_format_param(kwargs.get("origin_address", missing), 'multi'),
+ "referrer": self.base_client.generate_collection_format_param(kwargs.get("referrer", missing), 'multi'),
+ "requestUrl": self.base_client.generate_collection_format_param(kwargs.get("request_url", missing), 'multi'),
+ "responseCode": self.base_client.generate_collection_format_param(kwargs.get("response_code", missing), 'multi'),
+ "threatFeedKey": self.base_client.generate_collection_format_param(kwargs.get("threat_feed_key", missing), 'multi'),
+ "userAgent": self.base_client.generate_collection_format_param(kwargs.get("user_agent", missing), 'multi'),
+ "protectionRuleKey": self.base_client.generate_collection_format_param(kwargs.get("protection_rule_key", 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.retry_strategy
+ if kwargs.get('retry_strategy'):
+ retry_strategy = kwargs.get('retry_strategy')
+
+ if retry_strategy:
+ return retry_strategy.make_retrying_call(
+ self.base_client.call_api,
+ resource_path=resource_path,
+ method=method,
+ path_params=path_params,
+ query_params=query_params,
+ header_params=header_params,
+ response_type="list[WafLog]")
+ 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[WafLog]")
+
+ def list_waf_requests(self, waas_policy_id, **kwargs):
+ """
+ Returns a list of requests handled by the Web Application Firewall.
+ Gets the number of requests managed by a Web Application Firewall
+ over a specified period of time, including blocked requests. Sorted
+ by `timeObserved` in ascending order (starting from oldest requests).
+
+
+ :param str waas_policy_id: (required)
+ The `OCID`__ of the WAAS policy.
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
+
+ :param str opc_request_id: (optional)
+ The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
+
+ :param datetime time_observed_greater_than_or_equal_to: (optional)
+ A filter that limits returned events to those occurring on or after a date and time, specified in RFC 3339 format. If unspecified, defaults to 30 minutes before receipt of the request.
+
+ :param datetime time_observed_less_than: (optional)
+ A filter that limits returned events to those occurring before a date and time, specified in RFC 3339 format.
+
+ :param int limit: (optional)
+ The maximum number of items to return in a paginated call. In unspecified, defaults to `10`.
+
+ :param str page: (optional)
+ The value of the `opc-next-page` response header from the previous paginated call.
+
+ :param obj retry_strategy: (optional)
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
+
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY`
+ is also available. The specifics of the default retry strategy are described `here `__.
+
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
+
+ :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.waas.models.WafRequest`
+ :rtype: :class:`~oci.response.Response`
+ """
+ resource_path = "/waasPolicies/{waasPolicyId}/reports/waf/requests"
+ method = "GET"
+
+ # Don't accept unknown kwargs
+ expected_kwargs = [
+ "retry_strategy",
+ "opc_request_id",
+ "time_observed_greater_than_or_equal_to",
+ "time_observed_less_than",
+ "limit",
+ "page"
+ ]
+ extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs]
+ if extra_kwargs:
+ raise ValueError(
+ "list_waf_requests got unknown kwargs: {!r}".format(extra_kwargs))
+
+ path_params = {
+ "waasPolicyId": waas_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('Parameter {} cannot be None, whitespace or empty string'.format(k))
+
+ query_params = {
+ "timeObservedGreaterThanOrEqualTo": kwargs.get("time_observed_greater_than_or_equal_to", missing),
+ "timeObservedLessThan": kwargs.get("time_observed_less_than", missing),
+ "limit": kwargs.get("limit", missing),
+ "page": kwargs.get("page", missing)
+ }
+ query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
+
+ header_params = {
+ "accept": "application/json",
+ "content-type": "application/json",
+ "opc-request-id": kwargs.get("opc_request_id", missing)
+ }
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
+
+ retry_strategy = self.retry_strategy
+ if kwargs.get('retry_strategy'):
+ retry_strategy = kwargs.get('retry_strategy')
+
+ if retry_strategy:
+ return retry_strategy.make_retrying_call(
+ self.base_client.call_api,
+ resource_path=resource_path,
+ method=method,
+ path_params=path_params,
+ query_params=query_params,
+ header_params=header_params,
+ response_type="list[WafRequest]")
+ 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[WafRequest]")
+
+ def list_waf_traffic(self, waas_policy_id, **kwargs):
+ """
+ Returns a list of traffic data for the Web Application Firewall.
+ Gets the Web Application Firewall traffic data for a WAAS policy.
+ Sorted by `timeObserved` in ascending order (starting from oldest data).
+
+
+ :param str waas_policy_id: (required)
+ The `OCID`__ of the WAAS policy.
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
+
+ :param str opc_request_id: (optional)
+ The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
+
+ :param datetime time_observed_greater_than_or_equal_to: (optional)
+ A filter that limits returned events to those occurring on or after a date and time, specified in RFC 3339 format. If unspecified, defaults to 30 minutes before receipt of the request.
+
+ :param datetime time_observed_less_than: (optional)
+ A filter that limits returned events to those occurring before a date and time, specified in RFC 3339 format.
+
+ :param int limit: (optional)
+ The maximum number of items to return in a paginated call. In unspecified, defaults to `10`.
+
+ :param str page: (optional)
+ The value of the `opc-next-page` response header from the previous paginated call.
+
+ :param obj retry_strategy: (optional)
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
+
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY`
+ is also available. The specifics of the default retry strategy are described `here `__.
+
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
+
+ :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.waas.models.WafTrafficDatum`
+ :rtype: :class:`~oci.response.Response`
+ """
+ resource_path = "/waasPolicies/{waasPolicyId}/reports/waf/traffic"
+ method = "GET"
+
+ # Don't accept unknown kwargs
+ expected_kwargs = [
+ "retry_strategy",
+ "opc_request_id",
+ "time_observed_greater_than_or_equal_to",
+ "time_observed_less_than",
+ "limit",
+ "page"
+ ]
+ extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs]
+ if extra_kwargs:
+ raise ValueError(
+ "list_waf_traffic got unknown kwargs: {!r}".format(extra_kwargs))
+
+ path_params = {
+ "waasPolicyId": waas_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('Parameter {} cannot be None, whitespace or empty string'.format(k))
+
+ query_params = {
+ "timeObservedGreaterThanOrEqualTo": kwargs.get("time_observed_greater_than_or_equal_to", missing),
+ "timeObservedLessThan": kwargs.get("time_observed_less_than", missing),
+ "limit": kwargs.get("limit", missing),
+ "page": kwargs.get("page", missing)
+ }
+ query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
+
+ header_params = {
+ "accept": "application/json",
+ "content-type": "application/json",
+ "opc-request-id": kwargs.get("opc_request_id", missing)
+ }
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
+
+ retry_strategy = self.retry_strategy
+ if kwargs.get('retry_strategy'):
+ retry_strategy = kwargs.get('retry_strategy')
+
+ if retry_strategy:
+ return retry_strategy.make_retrying_call(
+ self.base_client.call_api,
+ resource_path=resource_path,
+ method=method,
+ path_params=path_params,
+ query_params=query_params,
+ header_params=header_params,
+ response_type="list[WafTrafficDatum]")
+ 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[WafTrafficDatum]")
+
+ def list_whitelists(self, waas_policy_id, **kwargs):
+ """
+ Returns a list of whitelists for the Web Application Firewall.
+ Gets the list of whitelists defined in the Web Application Firewall configuration for a WAAS policy.
+
+
+ :param str waas_policy_id: (required)
+ The `OCID`__ of the WAAS policy.
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
+
+ :param str opc_request_id: (optional)
+ The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
- :param list[str] user_agent: (optional)
- Filter by user agent.
+ :param int limit: (optional)
+ The maximum number of items to return in a paginated call. In unspecified, defaults to `10`.
- :param list[str] protection_rule_key: (optional)
- Filter by protection rule key.
+ :param str page: (optional)
+ The value of the `opc-next-page` response header from the previous paginated call.
:param obj retry_strategy: (optional)
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
@@ -2786,10 +4280,10 @@ def list_waf_logs(self, waas_policy_id, **kwargs):
To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
- :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.waas.models.WafLog`
+ :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.waas.models.Whitelist`
:rtype: :class:`~oci.response.Response`
"""
- resource_path = "/waasPolicies/{waasPolicyId}/wafLogs"
+ resource_path = "/waasPolicies/{waasPolicyId}/wafConfig/whitelists"
method = "GET"
# Don't accept unknown kwargs
@@ -2797,31 +4291,12 @@ def list_waf_logs(self, waas_policy_id, **kwargs):
"retry_strategy",
"opc_request_id",
"limit",
- "page",
- "time_observed_greater_than_or_equal_to",
- "time_observed_less_than",
- "text_contains",
- "access_rule_key",
- "action",
- "client_address",
- "country_code",
- "country_name",
- "fingerprint",
- "http_method",
- "incident_key",
- "log_type",
- "origin_address",
- "referrer",
- "request_url",
- "response_code",
- "threat_feed_key",
- "user_agent",
- "protection_rule_key"
+ "page"
]
extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- "list_waf_logs got unknown kwargs: {!r}".format(extra_kwargs))
+ "list_whitelists got unknown kwargs: {!r}".format(extra_kwargs))
path_params = {
"waasPolicyId": waas_policy_id
@@ -2833,52 +4308,9 @@ def list_waf_logs(self, waas_policy_id, **kwargs):
if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
- if 'action' in kwargs:
- action_allowed_values = ["BLOCK", "DETECT", "BYPASS", "LOG", "REDIRECTED"]
- for action_item in kwargs['action']:
- if action_item not in action_allowed_values:
- raise ValueError(
- "Invalid value for `action`, must be one of {0}".format(action_allowed_values)
- )
-
- if 'http_method' in kwargs:
- http_method_allowed_values = ["OPTIONS", "GET", "HEAD", "POST", "PUT", "DELETE", "TRACE", "CONNECT"]
- for http_method_item in kwargs['http_method']:
- if http_method_item not in http_method_allowed_values:
- raise ValueError(
- "Invalid value for `http_method`, must be one of {0}".format(http_method_allowed_values)
- )
-
- if 'log_type' in kwargs:
- log_type_allowed_values = ["ACCESS", "PROTECTION_RULES", "JS_CHALLENGE", "CAPTCHA", "ACCESS_RULES", "THREAT_FEEDS", "HUMAN_INTERACTION_CHALLENGE", "DEVICE_FINGERPRINT_CHALLENGE", "ADDRESS_RATE_LIMITING"]
- for log_type_item in kwargs['log_type']:
- if log_type_item not in log_type_allowed_values:
- raise ValueError(
- "Invalid value for `log_type`, must be one of {0}".format(log_type_allowed_values)
- )
-
query_params = {
"limit": kwargs.get("limit", missing),
- "page": kwargs.get("page", missing),
- "timeObservedGreaterThanOrEqualTo": kwargs.get("time_observed_greater_than_or_equal_to", missing),
- "timeObservedLessThan": kwargs.get("time_observed_less_than", missing),
- "textContains": kwargs.get("text_contains", missing),
- "accessRuleKey": self.base_client.generate_collection_format_param(kwargs.get("access_rule_key", missing), 'multi'),
- "action": self.base_client.generate_collection_format_param(kwargs.get("action", missing), 'multi'),
- "clientAddress": self.base_client.generate_collection_format_param(kwargs.get("client_address", missing), 'multi'),
- "countryCode": self.base_client.generate_collection_format_param(kwargs.get("country_code", missing), 'multi'),
- "countryName": self.base_client.generate_collection_format_param(kwargs.get("country_name", missing), 'multi'),
- "fingerprint": self.base_client.generate_collection_format_param(kwargs.get("fingerprint", missing), 'multi'),
- "httpMethod": self.base_client.generate_collection_format_param(kwargs.get("http_method", missing), 'multi'),
- "incidentKey": self.base_client.generate_collection_format_param(kwargs.get("incident_key", missing), 'multi'),
- "logType": self.base_client.generate_collection_format_param(kwargs.get("log_type", missing), 'multi'),
- "originAddress": self.base_client.generate_collection_format_param(kwargs.get("origin_address", missing), 'multi'),
- "referrer": self.base_client.generate_collection_format_param(kwargs.get("referrer", missing), 'multi'),
- "requestUrl": self.base_client.generate_collection_format_param(kwargs.get("request_url", missing), 'multi'),
- "responseCode": self.base_client.generate_collection_format_param(kwargs.get("response_code", missing), 'multi'),
- "threatFeedKey": self.base_client.generate_collection_format_param(kwargs.get("threat_feed_key", missing), 'multi'),
- "userAgent": self.base_client.generate_collection_format_param(kwargs.get("user_agent", missing), 'multi'),
- "protectionRuleKey": self.base_client.generate_collection_format_param(kwargs.get("protection_rule_key", missing), 'multi')
+ "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}
@@ -2901,7 +4333,7 @@ def list_waf_logs(self, waas_policy_id, **kwargs):
path_params=path_params,
query_params=query_params,
header_params=header_params,
- response_type="list[WafLog]")
+ response_type="list[Whitelist]")
else:
return self.base_client.call_api(
resource_path=resource_path,
@@ -2909,29 +4341,26 @@ def list_waf_logs(self, waas_policy_id, **kwargs):
path_params=path_params,
query_params=query_params,
header_params=header_params,
- response_type="list[WafLog]")
+ response_type="list[Whitelist]")
- def list_waf_requests(self, waas_policy_id, **kwargs):
+ def list_work_requests(self, waas_policy_id, compartment_id, **kwargs):
"""
- Returns a list of requests handled by the Web Application Firewall.
- Gets the number of requests managed by a Web Application Firewall
- over a specified period of time, including blocked requests. Sorted
- by `timeObserved` in ascending order (starting from oldest requests).
+ Returns a list of work requests.
+ Gets a list of subnets (CIDR notation) from which the WAAS EDGE may make requests. The subnets are owned by OCI and forward traffic to your origins. Allow traffic from these subnets to your origins. They are not associated with specific regions or compartments.
:param str waas_policy_id: (required)
- The `OCID`__ of the WAAS policy.
+ The `OCID`__ of the policy.
__ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
- :param str opc_request_id: (optional)
- The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
+ :param str compartment_id: (required)
+ The `OCID`__ of the compartment. This number is generated when the compartment is created.
- :param datetime time_observed_greater_than_or_equal_to: (optional)
- A filter that limits returned events to those occurring on or after a date and time, specified in RFC 3339 format. If unspecified, defaults to 30 minutes before receipt of the request.
+ __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
- :param datetime time_observed_less_than: (optional)
- A filter that limits returned events to those occurring before a date and time, specified in RFC 3339 format.
+ :param str opc_request_id: (optional)
+ The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
:param int limit: (optional)
The maximum number of items to return in a paginated call. In unspecified, defaults to `10`.
@@ -2939,6 +4368,16 @@ def list_waf_requests(self, waas_policy_id, **kwargs):
:param str page: (optional)
The value of the `opc-next-page` response header from the previous paginated call.
+ :param str sort_by: (optional)
+ The value by which work requests are sorted in a paginated 'List' call. If unspecified, defaults to `timeAccepted`.
+
+ Allowed values are: "id", "status", "timeAccepted", "timeStarted", "timeFinished", "operationType"
+
+ :param str sort_order: (optional)
+ The value of the sorting direction of resources in a paginated 'List' call. If unspecified, defaults to `DESC`.
+
+ Allowed values are: "ASC", "DESC"
+
:param obj retry_strategy: (optional)
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
@@ -2947,41 +4386,47 @@ def list_waf_requests(self, waas_policy_id, **kwargs):
To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
- :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.waas.models.WafRequest`
+ :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.waas.models.WorkRequestSummary`
:rtype: :class:`~oci.response.Response`
"""
- resource_path = "/waasPolicies/{waasPolicyId}/reports/waf/requests"
+ resource_path = "/workRequests"
method = "GET"
# Don't accept unknown kwargs
expected_kwargs = [
"retry_strategy",
"opc_request_id",
- "time_observed_greater_than_or_equal_to",
- "time_observed_less_than",
"limit",
- "page"
+ "page",
+ "sort_by",
+ "sort_order"
]
extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- "list_waf_requests got unknown kwargs: {!r}".format(extra_kwargs))
-
- path_params = {
- "waasPolicyId": waas_policy_id
- }
+ "list_work_requests got unknown kwargs: {!r}".format(extra_kwargs))
- 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 = ["id", "status", "timeAccepted", "timeStarted", "timeFinished", "operationType"]
+ if kwargs['sort_by'] not in sort_by_allowed_values:
+ raise ValueError(
+ "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values)
+ )
- for (k, v) in six.iteritems(path_params):
- if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
- raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
+ if 'sort_order' in kwargs:
+ sort_order_allowed_values = ["ASC", "DESC"]
+ if kwargs['sort_order'] not in sort_order_allowed_values:
+ raise ValueError(
+ "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values)
+ )
query_params = {
- "timeObservedGreaterThanOrEqualTo": kwargs.get("time_observed_greater_than_or_equal_to", missing),
- "timeObservedLessThan": kwargs.get("time_observed_less_than", missing),
+ "waasPolicyId": waas_policy_id,
+ "compartmentId": compartment_id,
"limit": kwargs.get("limit", missing),
- "page": kwargs.get("page", missing)
+ "page": kwargs.get("page", missing),
+ "sortBy": kwargs.get("sort_by", missing),
+ "sortOrder": kwargs.get("sort_order", missing)
}
query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
@@ -3001,24 +4446,21 @@ def list_waf_requests(self, waas_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="list[WafRequest]")
+ response_type="list[WorkRequestSummary]")
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[WafRequest]")
+ response_type="list[WorkRequestSummary]")
- def list_waf_traffic(self, waas_policy_id, **kwargs):
+ def purge_cache(self, waas_policy_id, **kwargs):
"""
- Returns a list of traffic data for the Web Application Firewall.
- Gets the Web Application Firewall traffic data for a WAAS policy.
- Sorted by `timeObserved` in ascending order (starting from oldest data).
+ Accepts a list of resources to be purged.
+ Accepts a list of resources that will get it's cache purged. If resources property is not passed, then the entire cache for Web Application will be purged.
:param str waas_policy_id: (required)
@@ -3029,17 +4471,10 @@ def list_waf_traffic(self, waas_policy_id, **kwargs):
:param str opc_request_id: (optional)
The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
- :param datetime time_observed_greater_than_or_equal_to: (optional)
- A filter that limits returned events to those occurring on or after a date and time, specified in RFC 3339 format. If unspecified, defaults to 30 minutes before receipt of the request.
-
- :param datetime time_observed_less_than: (optional)
- A filter that limits returned events to those occurring before a date and time, specified in RFC 3339 format.
-
- :param int limit: (optional)
- The maximum number of items to return in a paginated call. In unspecified, defaults to `10`.
+ :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 provided matches the resource's current etag value.
- :param str page: (optional)
- The value of the `opc-next-page` response header from the previous paginated call.
+ :param PurgeCache purge_cache: (optional)
:param obj retry_strategy: (optional)
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
@@ -3049,25 +4484,23 @@ def list_waf_traffic(self, waas_policy_id, **kwargs):
To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
- :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.waas.models.WafTrafficDatum`
+ :return: A :class:`~oci.response.Response` object with data of type None
:rtype: :class:`~oci.response.Response`
"""
- resource_path = "/waasPolicies/{waasPolicyId}/reports/waf/traffic"
- method = "GET"
+ resource_path = "/waasPolicies/{waasPolicyId}/actions/purgeCache"
+ method = "POST"
# Don't accept unknown kwargs
expected_kwargs = [
"retry_strategy",
"opc_request_id",
- "time_observed_greater_than_or_equal_to",
- "time_observed_less_than",
- "limit",
- "page"
+ "if_match",
+ "purge_cache"
]
extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- "list_waf_traffic got unknown kwargs: {!r}".format(extra_kwargs))
+ "purge_cache got unknown kwargs: {!r}".format(extra_kwargs))
path_params = {
"waasPolicyId": waas_policy_id
@@ -3079,18 +4512,11 @@ def list_waf_traffic(self, waas_policy_id, **kwargs):
if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
- query_params = {
- "timeObservedGreaterThanOrEqualTo": kwargs.get("time_observed_greater_than_or_equal_to", missing),
- "timeObservedLessThan": kwargs.get("time_observed_less_than", missing),
- "limit": kwargs.get("limit", missing),
- "page": kwargs.get("page", missing)
- }
- query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
-
header_params = {
"accept": "application/json",
"content-type": "application/json",
- "opc-request-id": kwargs.get("opc_request_id", missing)
+ "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}
@@ -3104,22 +4530,28 @@ def list_waf_traffic(self, waas_policy_id, **kwargs):
resource_path=resource_path,
method=method,
path_params=path_params,
- query_params=query_params,
header_params=header_params,
- response_type="list[WafTrafficDatum]")
+ body=kwargs.get('purge_cache'))
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[WafTrafficDatum]")
+ body=kwargs.get('purge_cache'))
- def list_whitelists(self, waas_policy_id, **kwargs):
+ def update_access_rules(self, waas_policy_id, access_rules, **kwargs):
"""
- Returns a list of whitelists for the Web Application Firewall.
- Gets the list of whitelists defined in the Web Application Firewall configuration for a WAAS policy.
+ Updates the list of access rules for the Web Application Firewall.
+ Updates the list of access rules in the Web Application Firewall configuration for a specified WAAS policy. Access rules allow explicit actions to be defined and executed for requests that meet various conditions. A rule action can be set to allow, detect, or block requests. The detect setting allows the request to pass through the Web Application Firewall and is tagged with a `DETECT` flag in the Web Application Firewall's log.
+
+ This operation can create, delete, update, and/or reorder access rules depending on the structure of the request body.
+
+ Access rules can be updated by changing the properties of the access rule object with the rule's key specified in the key field. Access rules can be reordered by changing the order of the access rules in the list when updating.
+
+ Access rules can be created by adding a new access rule object to the list without a `key` property specified. A `key` will be generated for the new access rule upon update.
+
+ Any existing access rules that are not specified with a `key` in the list of access rules will be deleted upon update.
:param str waas_policy_id: (required)
@@ -3127,14 +4559,17 @@ def list_whitelists(self, waas_policy_id, **kwargs):
__ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
+ :param list[AccessRule] access_rules: (required)
+
:param str opc_request_id: (optional)
The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
- :param int limit: (optional)
- The maximum number of items to return in a paginated call. In unspecified, defaults to `10`.
+ :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
+ *Example:* If a resource has been deleted and purged from the system, then a retry of the original delete request may be rejected.
- :param str page: (optional)
- The value of the `opc-next-page` response header from the previous paginated call.
+ :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 provided 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.
@@ -3144,23 +4579,23 @@ def list_whitelists(self, waas_policy_id, **kwargs):
To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
- :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.waas.models.Whitelist`
+ :return: A :class:`~oci.response.Response` object with data of type None
:rtype: :class:`~oci.response.Response`
"""
- resource_path = "/waasPolicies/{waasPolicyId}/wafConfig/whitelists"
- method = "GET"
+ resource_path = "/waasPolicies/{waasPolicyId}/wafConfig/accessRules"
+ method = "PUT"
# Don't accept unknown kwargs
expected_kwargs = [
"retry_strategy",
"opc_request_id",
- "limit",
- "page"
+ "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(
- "list_whitelists got unknown kwargs: {!r}".format(extra_kwargs))
+ "update_access_rules got unknown kwargs: {!r}".format(extra_kwargs))
path_params = {
"waasPolicyId": waas_policy_id
@@ -3172,16 +4607,12 @@ def list_whitelists(self, waas_policy_id, **kwargs):
if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
- 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)
+ "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}
@@ -3190,57 +4621,42 @@ def list_whitelists(self, waas_policy_id, **kwargs):
retry_strategy = kwargs.get('retry_strategy')
if retry_strategy:
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
+ self.base_client.add_opc_retry_token_if_needed(header_params)
return retry_strategy.make_retrying_call(
self.base_client.call_api,
resource_path=resource_path,
method=method,
path_params=path_params,
- query_params=query_params,
header_params=header_params,
- response_type="list[Whitelist]")
+ body=access_rules)
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[Whitelist]")
+ body=access_rules)
- def list_work_requests(self, waas_policy_id, compartment_id, **kwargs):
+ def update_address_list(self, address_list_id, **kwargs):
"""
- Returns a list of work requests.
- Gets a list of subnets (CIDR notation) from which the WAAS EDGE may make requests. The subnets are owned by OCI and forward traffic to your origins. Allow traffic from these subnets to your origins. They are not associated with specific regions or compartments.
+ Updates the name and IP values of an address list.
+ Updates the details of an address list. Only the fields specified in the request body will be updated; all other properties will remain unchanged.
- :param str waas_policy_id: (required)
- The `OCID`__ of the policy.
+ :param str address_list_id: (required)
+ The `OCID`__ of the address list. This number is generated when the address list is added to the compartment.
__ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
- :param str compartment_id: (required)
- The `OCID`__ of the compartment. This number is generated when the compartment is created.
-
- __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
-
:param str opc_request_id: (optional)
The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
- :param int limit: (optional)
- The maximum number of items to return in a paginated call. In unspecified, defaults to `10`.
-
- :param str page: (optional)
- The value of the `opc-next-page` response header from the previous paginated call.
-
- :param str sort_by: (optional)
- The value by which work requests are sorted in a paginated 'List' call. If unspecified, defaults to `timeAccepted`.
-
- Allowed values are: "id", "status", "timeAccepted", "timeStarted", "timeFinished", "operationType"
-
- :param str sort_order: (optional)
- The value of the sorting direction of resources in a paginated 'List' call. If unspecified, defaults to `DESC`.
+ :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 provided matches the resource's current etag value.
- Allowed values are: "ASC", "DESC"
+ :param UpdateAddressListDetails update_address_list_details: (optional)
+ The details of the address list to update.
:param obj retry_strategy: (optional)
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
@@ -3250,54 +4666,39 @@ def list_work_requests(self, waas_policy_id, compartment_id, **kwargs):
To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
- :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.waas.models.WorkRequestSummary`
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.waas.models.AddressList`
:rtype: :class:`~oci.response.Response`
"""
- resource_path = "/workRequests"
- method = "GET"
+ resource_path = "/addressLists/{addressListId}"
+ method = "PUT"
# Don't accept unknown kwargs
expected_kwargs = [
"retry_strategy",
"opc_request_id",
- "limit",
- "page",
- "sort_by",
- "sort_order"
+ "if_match",
+ "update_address_list_details"
]
extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- "list_work_requests got unknown kwargs: {!r}".format(extra_kwargs))
+ "update_address_list got unknown kwargs: {!r}".format(extra_kwargs))
- if 'sort_by' in kwargs:
- sort_by_allowed_values = ["id", "status", "timeAccepted", "timeStarted", "timeFinished", "operationType"]
- if kwargs['sort_by'] not in sort_by_allowed_values:
- raise ValueError(
- "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values)
- )
+ path_params = {
+ "addressListId": address_list_id
+ }
- if 'sort_order' in kwargs:
- sort_order_allowed_values = ["ASC", "DESC"]
- if kwargs['sort_order'] not in sort_order_allowed_values:
- raise ValueError(
- "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values)
- )
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
- query_params = {
- "waasPolicyId": waas_policy_id,
- "compartmentId": compartment_id,
- "limit": kwargs.get("limit", missing),
- "page": kwargs.get("page", missing),
- "sortBy": kwargs.get("sort_by", missing),
- "sortOrder": kwargs.get("sort_order", missing)
- }
- query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
+ for (k, v) in six.iteritems(path_params):
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
+ raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
header_params = {
"accept": "application/json",
"content-type": "application/json",
- "opc-request-id": kwargs.get("opc_request_id", missing)
+ "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}
@@ -3310,29 +4711,26 @@ def list_work_requests(self, waas_policy_id, 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=kwargs.get('update_address_list_details'),
+ response_type="AddressList")
else:
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=kwargs.get('update_address_list_details'),
+ response_type="AddressList")
- def update_access_rules(self, waas_policy_id, access_rules, **kwargs):
+ def update_caching_rules(self, waas_policy_id, caching_rules_details, **kwargs):
"""
- Updates the list of access rules for the Web Application Firewall.
- Updates the list of access rules in the Web Application Firewall configuration for a specified WAAS policy. Access rules allow explicit actions to be defined and executed for requests that meet various conditions. A rule action can be set to allow, detect, or block requests. The detect setting allows the request to pass through the Web Application Firewall and is tagged with a `DETECT` flag in the Web Application Firewall's log.
-
- This operation can create, delete, update, and/or reorder access rules depending on the structure of the request body.
-
- Access rules can be updated by changing the properties of the access rule object with the rule's key specified in the key field. Access rules can be reordered by changing the order of the access rules in the list when updating.
-
- Access rules can be created by adding a new access rule object to the list without a `key` property specified. A `key` will be generated for the new access rule upon update.
-
- Any existing access rules that are not specified with a `key` in the list of access rules will be deleted upon update.
+ Updates the list of caching rules for the Web Application Firewall.
+ Updates the configuration for each specified caching rule.
+ This operation can update or delete caching rules depending on the structure of the request body.
+ Caching rules can be updated by changing the properties of the caching rule object with the rule's key specified in the key field.
+ Any existing caching rules that are not specified with a key in the list of access rules will be deleted upon update.
:param str waas_policy_id: (required)
@@ -3340,7 +4738,7 @@ def update_access_rules(self, waas_policy_id, access_rules, **kwargs):
__ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
- :param list[AccessRule] access_rules: (required)
+ :param list[CachingRule] caching_rules_details: (required)
:param str opc_request_id: (optional)
The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
@@ -3363,7 +4761,7 @@ def update_access_rules(self, waas_policy_id, access_rules, **kwargs):
:return: A :class:`~oci.response.Response` object with data of type None
:rtype: :class:`~oci.response.Response`
"""
- resource_path = "/waasPolicies/{waasPolicyId}/wafConfig/accessRules"
+ resource_path = "/waasPolicies/{waasPolicyId}/wafConfig/cachingRules"
method = "PUT"
# Don't accept unknown kwargs
@@ -3376,7 +4774,7 @@ def update_access_rules(self, waas_policy_id, access_rules, **kwargs):
extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs]
if extra_kwargs:
raise ValueError(
- "update_access_rules got unknown kwargs: {!r}".format(extra_kwargs))
+ "update_caching_rules got unknown kwargs: {!r}".format(extra_kwargs))
path_params = {
"waasPolicyId": waas_policy_id
@@ -3410,14 +4808,14 @@ def update_access_rules(self, waas_policy_id, access_rules, **kwargs):
method=method,
path_params=path_params,
header_params=header_params,
- body=access_rules)
+ body=caching_rules_details)
else:
return self.base_client.call_api(
resource_path=resource_path,
method=method,
path_params=path_params,
header_params=header_params,
- body=access_rules)
+ body=caching_rules_details)
def update_captchas(self, waas_policy_id, captchas, **kwargs):
"""
@@ -3602,6 +5000,99 @@ def update_certificate(self, certificate_id, **kwargs):
body=kwargs.get('update_certificate_details'),
response_type="Certificate")
+ def update_custom_protection_rule(self, custom_protection_rule_id, update_custom_protection_rule_details, **kwargs):
+ """
+ Updates the details of a Custom Protection rule.
+ Updates the details of a Custom Protection rule. Only the fields specified in the request body will be updated; all other properties will remain unchanged.
+
+
+ :param str custom_protection_rule_id: (required)
+ The `OCID`__ of the Custom Protection rule. This number is generated when the Custom Protection rule is added to the compartment.
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
+
+ :param UpdateCustomProtectionRuleDetails update_custom_protection_rule_details: (required)
+ The details of the Custom Protection rule to update.
+
+ :param str opc_request_id: (optional)
+ The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
+
+ :param str opc_retry_token: (optional)
+ A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations
+ *Example:* If a resource has been deleted and purged from the system, then a retry of the original delete request may be rejected.
+
+ :param str if_match: (optional)
+ For optimistic concurrency control. In the `PUT` or `DELETE` call for a resource, set the `if-match` parameter to the value of the etag from a previous `GET` or `POST` response for that resource. The resource will be updated or deleted only if the etag provided matches the resource's current etag value.
+
+ :param obj retry_strategy: (optional)
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
+
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY`
+ is also available. The specifics of the default retry strategy are described `here `__.
+
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
+
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.waas.models.CustomProtectionRule`
+ :rtype: :class:`~oci.response.Response`
+ """
+ resource_path = "/customProtectionRules/{customProtectionRuleId}"
+ method = "PUT"
+
+ # Don't accept unknown kwargs
+ expected_kwargs = [
+ "retry_strategy",
+ "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(
+ "update_custom_protection_rule got unknown kwargs: {!r}".format(extra_kwargs))
+
+ path_params = {
+ "customProtectionRuleId": custom_protection_rule_id
+ }
+
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
+
+ for (k, v) in six.iteritems(path_params):
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
+ raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
+
+ header_params = {
+ "accept": "application/json",
+ "content-type": "application/json",
+ "opc-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}
+
+ retry_strategy = self.retry_strategy
+ if kwargs.get('retry_strategy'):
+ retry_strategy = kwargs.get('retry_strategy')
+
+ if retry_strategy:
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
+ self.base_client.add_opc_retry_token_if_needed(header_params)
+ return retry_strategy.make_retrying_call(
+ self.base_client.call_api,
+ resource_path=resource_path,
+ method=method,
+ path_params=path_params,
+ header_params=header_params,
+ body=update_custom_protection_rule_details,
+ response_type="CustomProtectionRule")
+ else:
+ return self.base_client.call_api(
+ resource_path=resource_path,
+ method=method,
+ path_params=path_params,
+ header_params=header_params,
+ body=update_custom_protection_rule_details,
+ response_type="CustomProtectionRule")
+
def update_device_fingerprint_challenge(self, waas_policy_id, update_device_fingerprint_challenge_details, **kwargs):
"""
Updates the device fingerprint challenge settings for the Web Application Firewall.
@@ -4419,6 +5910,98 @@ def update_waas_policy(self, waas_policy_id, update_waas_policy_details, **kwarg
header_params=header_params,
body=update_waas_policy_details)
+ def update_waas_policy_custom_protection_rules(self, waas_policy_id, update_custom_protection_rules_details, **kwargs):
+ """
+ Updates the list of custom protection rules for the Web Application Firewall.
+ Updates the action for each specified custom protection rule. Only the `DETECT` and `BLOCK` actions can be set. Disabled rules should not be included in the list. For more information on protection rules, see `WAF Protection Rules`__.
+
+ __ https://docs.cloud.oracle.com/iaas/Content/WAF/Tasks/wafprotectionrules.htm
+
+
+ :param str waas_policy_id: (required)
+ The `OCID`__ of the WAAS policy.
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
+
+ :param list[CustomProtectionRuleSetting] update_custom_protection_rules_details: (required)
+
+ :param str opc_request_id: (optional)
+ The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
+
+ :param str opc_retry_token: (optional)
+ A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations
+ *Example:* If a resource has been deleted and purged from the system, then a retry of the original delete request may be rejected.
+
+ :param str if_match: (optional)
+ For optimistic concurrency control. In the `PUT` or `DELETE` call for a resource, set the `if-match` parameter to the value of the etag from a previous `GET` or `POST` response for that resource. The resource will be updated or deleted only if the etag provided matches the resource's current etag value.
+
+ :param obj retry_strategy: (optional)
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
+
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY`
+ is also available. The specifics of the default retry strategy are described `here `__.
+
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
+
+ :return: A :class:`~oci.response.Response` object with data of type None
+ :rtype: :class:`~oci.response.Response`
+ """
+ resource_path = "/waasPolicies/{waasPolicyId}/wafConfig/customProtectionRules"
+ method = "PUT"
+
+ # Don't accept unknown kwargs
+ expected_kwargs = [
+ "retry_strategy",
+ "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(
+ "update_waas_policy_custom_protection_rules got unknown kwargs: {!r}".format(extra_kwargs))
+
+ path_params = {
+ "waasPolicyId": waas_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('Parameter {} cannot be None, whitespace or empty string'.format(k))
+
+ header_params = {
+ "accept": "application/json",
+ "content-type": "application/json",
+ "opc-request-id": kwargs.get("opc_request_id", missing),
+ "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}
+
+ retry_strategy = self.retry_strategy
+ if kwargs.get('retry_strategy'):
+ retry_strategy = kwargs.get('retry_strategy')
+
+ if retry_strategy:
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
+ self.base_client.add_opc_retry_token_if_needed(header_params)
+ return retry_strategy.make_retrying_call(
+ self.base_client.call_api,
+ resource_path=resource_path,
+ method=method,
+ path_params=path_params,
+ header_params=header_params,
+ body=update_custom_protection_rules_details)
+ else:
+ return self.base_client.call_api(
+ resource_path=resource_path,
+ method=method,
+ path_params=path_params,
+ header_params=header_params,
+ body=update_custom_protection_rules_details)
+
def update_waf_address_rate_limiting(self, waas_policy_id, update_waf_address_rate_limiting_details, **kwargs):
"""
Updates the rate limiting settings for the Web Application Firewall.
diff --git a/src/oci/waas/waas_client_composite_operations.py b/src/oci/waas/waas_client_composite_operations.py
index b50e7982aa..291a8cb3ac 100644
--- a/src/oci/waas/waas_client_composite_operations.py
+++ b/src/oci/waas/waas_client_composite_operations.py
@@ -64,6 +64,44 @@ def accept_recommendations_and_wait_for_state(self, waas_policy_id, protection_r
except Exception as e:
raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
+ def create_address_list_and_wait_for_state(self, create_address_list_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
+ """
+ Calls :py:func:`~oci.waas.WaasClient.create_address_list` and waits for the :py:class:`~oci.waas.models.AddressList` acted upon
+ to enter the given state(s).
+
+ :param CreateAddressListDetails create_address_list_details: (required)
+ The details of the address list resource to create.
+
+ :param list[str] wait_for_states:
+ An array of states to wait on. These should be valid values for :py:attr:`~oci.waas.models.AddressList.lifecycle_state`
+
+ :param dict operation_kwargs:
+ A dictionary of keyword arguments to pass to :py:func:`~oci.waas.WaasClient.create_address_list`
+
+ :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_address_list(create_address_list_details, **operation_kwargs)
+ if not wait_for_states:
+ return operation_result
+
+ lowered_wait_for_states = [w.lower() for w in wait_for_states]
+ wait_for_resource_id = operation_result.data.id
+
+ try:
+ waiter_result = oci.wait_until(
+ self.client,
+ self.client.get_address_list(wait_for_resource_id),
+ evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
+ **waiter_kwargs
+ )
+ result_to_return = waiter_result
+
+ return result_to_return
+ except Exception as e:
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
+
def create_certificate_and_wait_for_state(self, create_certificate_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
"""
Calls :py:func:`~oci.waas.WaasClient.create_certificate` and waits for the :py:class:`~oci.waas.models.Certificate` acted upon
@@ -102,6 +140,44 @@ def create_certificate_and_wait_for_state(self, create_certificate_details, wait
except Exception as e:
raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
+ def create_custom_protection_rule_and_wait_for_state(self, create_custom_protection_rule_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
+ """
+ Calls :py:func:`~oci.waas.WaasClient.create_custom_protection_rule` and waits for the :py:class:`~oci.waas.models.CustomProtectionRule` acted upon
+ to enter the given state(s).
+
+ :param CreateCustomProtectionRuleDetails create_custom_protection_rule_details: (required)
+ The details of the Custom Protection rule.
+
+ :param list[str] wait_for_states:
+ An array of states to wait on. These should be valid values for :py:attr:`~oci.waas.models.CustomProtectionRule.lifecycle_state`
+
+ :param dict operation_kwargs:
+ A dictionary of keyword arguments to pass to :py:func:`~oci.waas.WaasClient.create_custom_protection_rule`
+
+ :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_custom_protection_rule(create_custom_protection_rule_details, **operation_kwargs)
+ if not wait_for_states:
+ return operation_result
+
+ lowered_wait_for_states = [w.lower() for w in wait_for_states]
+ wait_for_resource_id = operation_result.data.id
+
+ try:
+ waiter_result = oci.wait_until(
+ self.client,
+ self.client.get_custom_protection_rule(wait_for_resource_id),
+ evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
+ **waiter_kwargs
+ )
+ result_to_return = waiter_result
+
+ return result_to_return
+ except Exception as e:
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
+
def create_waas_policy_and_wait_for_state(self, create_waas_policy_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
"""
Calls :py:func:`~oci.waas.WaasClient.create_waas_policy` and waits for the :py:class:`~oci.waas.models.WorkRequest`
@@ -140,6 +216,55 @@ def create_waas_policy_and_wait_for_state(self, create_waas_policy_details, wait
except Exception as e:
raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
+ def delete_address_list_and_wait_for_state(self, address_list_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
+ """
+ Calls :py:func:`~oci.waas.WaasClient.delete_address_list` and waits for the :py:class:`~oci.waas.models.AddressList` acted upon
+ to enter the given state(s).
+
+ :param str address_list_id: (required)
+ The `OCID`__ of the address list. This number is generated when the address list is added to the compartment.
+
+ __ https://docs.cloud.oracle.com/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.waas.models.AddressList.lifecycle_state`
+
+ :param dict operation_kwargs:
+ A dictionary of keyword arguments to pass to :py:func:`~oci.waas.WaasClient.delete_address_list`
+
+ :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_address_list(address_list_id)
+ operation_result = None
+ try:
+ operation_result = self.client.delete_address_list(address_list_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:
+ waiter_result = oci.wait_until(
+ self.client,
+ initial_get_result,
+ evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
+ succeed_on_not_found=True,
+ **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_certificate_and_wait_for_state(self, certificate_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
"""
Calls :py:func:`~oci.waas.WaasClient.delete_certificate` and waits for the :py:class:`~oci.waas.models.Certificate` acted upon
@@ -189,6 +314,55 @@ def delete_certificate_and_wait_for_state(self, certificate_id, wait_for_states=
except Exception as e:
raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
+ def delete_custom_protection_rule_and_wait_for_state(self, custom_protection_rule_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
+ """
+ Calls :py:func:`~oci.waas.WaasClient.delete_custom_protection_rule` and waits for the :py:class:`~oci.waas.models.CustomProtectionRule` acted upon
+ to enter the given state(s).
+
+ :param str custom_protection_rule_id: (required)
+ The `OCID`__ of the Custom Protection rule. This number is generated when the Custom Protection rule is added to the compartment.
+
+ __ https://docs.cloud.oracle.com/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.waas.models.CustomProtectionRule.lifecycle_state`
+
+ :param dict operation_kwargs:
+ A dictionary of keyword arguments to pass to :py:func:`~oci.waas.WaasClient.delete_custom_protection_rule`
+
+ :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_custom_protection_rule(custom_protection_rule_id)
+ operation_result = None
+ try:
+ operation_result = self.client.delete_custom_protection_rule(custom_protection_rule_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:
+ waiter_result = oci.wait_until(
+ self.client,
+ initial_get_result,
+ evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
+ succeed_on_not_found=True,
+ **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_waas_policy_and_wait_for_state(self, waas_policy_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
"""
Calls :py:func:`~oci.waas.WaasClient.delete_waas_policy` and waits for the :py:class:`~oci.waas.models.WorkRequest`
@@ -237,6 +411,46 @@ def delete_waas_policy_and_wait_for_state(self, waas_policy_id, wait_for_states=
except Exception as e:
raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
+ def purge_cache_and_wait_for_state(self, waas_policy_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
+ """
+ Calls :py:func:`~oci.waas.WaasClient.purge_cache` and waits for the :py:class:`~oci.waas.models.WorkRequest`
+ to enter the given state(s).
+
+ :param str waas_policy_id: (required)
+ The `OCID`__ of the WAAS policy.
+
+ __ https://docs.cloud.oracle.com/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.waas.models.WorkRequest.status`
+
+ :param dict operation_kwargs:
+ A dictionary of keyword arguments to pass to :py:func:`~oci.waas.WaasClient.purge_cache`
+
+ :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.purge_cache(waas_policy_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 update_access_rules_and_wait_for_state(self, waas_policy_id, access_rules, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
"""
Calls :py:func:`~oci.waas.WaasClient.update_access_rules` and waits for the :py:class:`~oci.waas.models.WorkRequest`
@@ -279,6 +493,88 @@ def update_access_rules_and_wait_for_state(self, waas_policy_id, access_rules, w
except Exception as e:
raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
+ def update_address_list_and_wait_for_state(self, address_list_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
+ """
+ Calls :py:func:`~oci.waas.WaasClient.update_address_list` and waits for the :py:class:`~oci.waas.models.AddressList` acted upon
+ to enter the given state(s).
+
+ :param str address_list_id: (required)
+ The `OCID`__ of the address list. This number is generated when the address list is added to the compartment.
+
+ __ https://docs.cloud.oracle.com/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.waas.models.AddressList.lifecycle_state`
+
+ :param dict operation_kwargs:
+ A dictionary of keyword arguments to pass to :py:func:`~oci.waas.WaasClient.update_address_list`
+
+ :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_address_list(address_list_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.data.id
+
+ try:
+ waiter_result = oci.wait_until(
+ self.client,
+ self.client.get_address_list(wait_for_resource_id),
+ evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
+ **waiter_kwargs
+ )
+ result_to_return = waiter_result
+
+ return result_to_return
+ except Exception as e:
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
+
+ def update_caching_rules_and_wait_for_state(self, waas_policy_id, caching_rules_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
+ """
+ Calls :py:func:`~oci.waas.WaasClient.update_caching_rules` and waits for the :py:class:`~oci.waas.models.WorkRequest`
+ to enter the given state(s).
+
+ :param str waas_policy_id: (required)
+ The `OCID`__ of the WAAS policy.
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
+
+ :param list[CachingRule] caching_rules_details: (required)
+
+ :param list[str] wait_for_states:
+ An array of states to wait on. These should be valid values for :py:attr:`~oci.waas.models.WorkRequest.status`
+
+ :param dict operation_kwargs:
+ A dictionary of keyword arguments to pass to :py:func:`~oci.waas.WaasClient.update_caching_rules`
+
+ :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_caching_rules(waas_policy_id, caching_rules_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_captchas_and_wait_for_state(self, waas_policy_id, captchas, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
"""
Calls :py:func:`~oci.waas.WaasClient.update_captchas` and waits for the :py:class:`~oci.waas.models.WorkRequest`
@@ -362,6 +658,49 @@ def update_certificate_and_wait_for_state(self, certificate_id, wait_for_states=
except Exception as e:
raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
+ def update_custom_protection_rule_and_wait_for_state(self, custom_protection_rule_id, update_custom_protection_rule_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
+ """
+ Calls :py:func:`~oci.waas.WaasClient.update_custom_protection_rule` and waits for the :py:class:`~oci.waas.models.CustomProtectionRule` acted upon
+ to enter the given state(s).
+
+ :param str custom_protection_rule_id: (required)
+ The `OCID`__ of the Custom Protection rule. This number is generated when the Custom Protection rule is added to the compartment.
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
+
+ :param UpdateCustomProtectionRuleDetails update_custom_protection_rule_details: (required)
+ The details of the Custom Protection rule to update.
+
+ :param list[str] wait_for_states:
+ An array of states to wait on. These should be valid values for :py:attr:`~oci.waas.models.CustomProtectionRule.lifecycle_state`
+
+ :param dict operation_kwargs:
+ A dictionary of keyword arguments to pass to :py:func:`~oci.waas.WaasClient.update_custom_protection_rule`
+
+ :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_custom_protection_rule(custom_protection_rule_id, update_custom_protection_rule_details, **operation_kwargs)
+ if not wait_for_states:
+ return operation_result
+
+ lowered_wait_for_states = [w.lower() for w in wait_for_states]
+ wait_for_resource_id = operation_result.data.id
+
+ try:
+ waiter_result = oci.wait_until(
+ self.client,
+ self.client.get_custom_protection_rule(wait_for_resource_id),
+ evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
+ **waiter_kwargs
+ )
+ result_to_return = waiter_result
+
+ return result_to_return
+ except Exception as e:
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
+
def update_device_fingerprint_challenge_and_wait_for_state(self, waas_policy_id, update_device_fingerprint_challenge_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
"""
Calls :py:func:`~oci.waas.WaasClient.update_device_fingerprint_challenge` and waits for the :py:class:`~oci.waas.models.WorkRequest`
@@ -747,6 +1086,48 @@ def update_waas_policy_and_wait_for_state(self, waas_policy_id, update_waas_poli
except Exception as e:
raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
+ def update_waas_policy_custom_protection_rules_and_wait_for_state(self, waas_policy_id, update_custom_protection_rules_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
+ """
+ Calls :py:func:`~oci.waas.WaasClient.update_waas_policy_custom_protection_rules` and waits for the :py:class:`~oci.waas.models.WorkRequest`
+ to enter the given state(s).
+
+ :param str waas_policy_id: (required)
+ The `OCID`__ of the WAAS policy.
+
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
+
+ :param list[CustomProtectionRuleSetting] update_custom_protection_rules_details: (required)
+
+ :param list[str] wait_for_states:
+ An array of states to wait on. These should be valid values for :py:attr:`~oci.waas.models.WorkRequest.status`
+
+ :param dict operation_kwargs:
+ A dictionary of keyword arguments to pass to :py:func:`~oci.waas.WaasClient.update_waas_policy_custom_protection_rules`
+
+ :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_waas_policy_custom_protection_rules(waas_policy_id, update_custom_protection_rules_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_waf_address_rate_limiting_and_wait_for_state(self, waas_policy_id, update_waf_address_rate_limiting_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
"""
Calls :py:func:`~oci.waas.WaasClient.update_waf_address_rate_limiting` and waits for the :py:class:`~oci.waas.models.WorkRequest`