From 006daa099e86fdb0225f647585ae83a3c9ff9e8b Mon Sep 17 00:00:00 2001 From: OCI DEX Release Bot Automation Date: Tue, 5 Nov 2024 06:12:12 +0000 Subject: [PATCH] Releasing version 2.138.0 Co-authored-by: Harsh Kumar --- CHANGELOG.rst | 26 + docs/api/cims.rst | 3 + .../models/oci.cims.models.SubCategories.rst | 11 + .../models/oci.cims.models.SubComponents.rst | 11 + .../oci.cims.models.SubscriptionInfo.rst | 11 + docs/api/identity_domains.rst | 10 + ...ionOciconsolesignonpolicyconsentPolicy.rst | 11 + ...s.models.OciConsoleSignOnPolicyConsent.rst | 11 + ...soleSignOnPolicyConsentConsentSignedBy.rst | 11 + ...oleSignOnPolicyConsentModifiedResource.rst | 11 + ...nsoleSignOnPolicyConsentPolicyResource.rst | 11 + ...onsoleSignOnPolicyConsentSearchRequest.rst | 11 + ....models.OciConsoleSignOnPolicyConsents.rst | 11 + ...ionOciconsolesignonpolicyconsentPolicy.rst | 11 + ...domains.models.RestoreOciConsolePolicy.rst | 11 + ...ionOciconsolesignonpolicyconsentPolicy.rst | 11 + src/oci/auth/auth_utils.py | 15 +- src/oci/auth/federation_client.py | 64 +- src/oci/auth/rpt_path_providers.py | 6 +- src/oci/base_client.py | 17 +- src/oci/cims/incident_client.py | 302 +---- src/oci/cims/models/__init__.py | 6 + src/oci/cims/models/activity_item.py | 43 +- .../models/create_account_item_details.py | 3 + src/oci/cims/models/create_incident.py | 24 +- .../cims/models/create_limit_item_details.py | 13 +- .../create_tech_support_item_details.py | 3 + src/oci/cims/models/create_user_details.py | 24 +- src/oci/cims/models/incident.py | 24 +- src/oci/cims/models/incident_resource_type.py | 61 +- src/oci/cims/models/incident_summary.py | 24 +- src/oci/cims/models/item.py | 2 +- src/oci/cims/models/limit_item.py | 45 +- src/oci/cims/models/service_categories.py | 68 +- src/oci/cims/models/service_category.py | 31 + src/oci/cims/models/sub_categories.py | 165 +++ src/oci/cims/models/sub_components.py | 103 ++ src/oci/cims/models/subscription_info.py | 103 ++ src/oci/cims/models/ticket.py | 8 +- src/oci/cims/models/update_incident.py | 24 +- src/oci/cims/models/user.py | 24 +- src/oci/circuit_breaker/__init__.py | 26 +- src/oci/circuit_breaker/circuit_breaker.py | 12 +- src/oci/data_flow/data_flow_client.py | 230 +++- .../data_flow_client_composite_operations.py | 78 ++ src/oci/data_flow/models/sql_endpoint.py | 10 +- .../data_flow/models/sql_endpoint_summary.py | 10 +- .../models/update_sql_endpoint_details.py | 347 +++++- .../identity_domains_client.py | 593 +++++++++- src/oci/identity_domains/models/__init__.py | 20 + src/oci/identity_domains/models/condition.py | 33 +- ...on_ociconsolesignonpolicyconsent_policy.py | 194 +++ .../oci_console_sign_on_policy_consent.py | 1041 +++++++++++++++++ ...ign_on_policy_consent_consent_signed_by.py | 260 ++++ ...ign_on_policy_consent_modified_resource.py | 223 ++++ ..._sign_on_policy_consent_policy_resource.py | 148 +++ ...e_sign_on_policy_consent_search_request.py | 364 ++++++ .../oci_console_sign_on_policy_consents.py | 196 ++++ src/oci/identity_domains/models/policy.py | 33 +- ...on_ociconsolesignonpolicyconsent_policy.py | 194 +++ .../models/policy_policy_type.py | 4 +- .../models/restore_oci_console_policy.py | 722 ++++++++++++ src/oci/identity_domains/models/rule.py | 33 +- .../models/rule_condition_group.py | 4 +- ...on_ociconsolesignonpolicyconsent_policy.py | 194 +++ src/oci/regions_definitions.py | 19 +- src/oci/retry/__init__.py | 20 + src/oci/version.py | 2 +- 68 files changed, 5994 insertions(+), 400 deletions(-) create mode 100644 docs/api/cims/models/oci.cims.models.SubCategories.rst create mode 100644 docs/api/cims/models/oci.cims.models.SubComponents.rst create mode 100644 docs/api/cims/models/oci.cims.models.SubscriptionInfo.rst create mode 100644 docs/api/identity_domains/models/oci.identity_domains.models.ConditionExtensionOciconsolesignonpolicyconsentPolicy.rst create mode 100644 docs/api/identity_domains/models/oci.identity_domains.models.OciConsoleSignOnPolicyConsent.rst create mode 100644 docs/api/identity_domains/models/oci.identity_domains.models.OciConsoleSignOnPolicyConsentConsentSignedBy.rst create mode 100644 docs/api/identity_domains/models/oci.identity_domains.models.OciConsoleSignOnPolicyConsentModifiedResource.rst create mode 100644 docs/api/identity_domains/models/oci.identity_domains.models.OciConsoleSignOnPolicyConsentPolicyResource.rst create mode 100644 docs/api/identity_domains/models/oci.identity_domains.models.OciConsoleSignOnPolicyConsentSearchRequest.rst create mode 100644 docs/api/identity_domains/models/oci.identity_domains.models.OciConsoleSignOnPolicyConsents.rst create mode 100644 docs/api/identity_domains/models/oci.identity_domains.models.PolicyExtensionOciconsolesignonpolicyconsentPolicy.rst create mode 100644 docs/api/identity_domains/models/oci.identity_domains.models.RestoreOciConsolePolicy.rst create mode 100644 docs/api/identity_domains/models/oci.identity_domains.models.RuleExtensionOciconsolesignonpolicyconsentPolicy.rst create mode 100644 src/oci/cims/models/sub_categories.py create mode 100644 src/oci/cims/models/sub_components.py create mode 100644 src/oci/cims/models/subscription_info.py create mode 100644 src/oci/identity_domains/models/condition_extension_ociconsolesignonpolicyconsent_policy.py create mode 100644 src/oci/identity_domains/models/oci_console_sign_on_policy_consent.py create mode 100644 src/oci/identity_domains/models/oci_console_sign_on_policy_consent_consent_signed_by.py create mode 100644 src/oci/identity_domains/models/oci_console_sign_on_policy_consent_modified_resource.py create mode 100644 src/oci/identity_domains/models/oci_console_sign_on_policy_consent_policy_resource.py create mode 100644 src/oci/identity_domains/models/oci_console_sign_on_policy_consent_search_request.py create mode 100644 src/oci/identity_domains/models/oci_console_sign_on_policy_consents.py create mode 100644 src/oci/identity_domains/models/policy_extension_ociconsolesignonpolicyconsent_policy.py create mode 100644 src/oci/identity_domains/models/restore_oci_console_policy.py create mode 100644 src/oci/identity_domains/models/rule_extension_ociconsolesignonpolicyconsent_policy.py diff --git a/CHANGELOG.rst b/CHANGELOG.rst index d7106d804..5d033cca8 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -3,6 +3,32 @@ Change Log All notable changes to this project will be documented in this file. The format is based on `Keep a Changelog `_. +==================== +2.138.0 - 2024-11-05 +==================== + +Added +----- +* Support for calling Oracle Cloud Infrastructure services in the ap-seoul-2 region +* Support for calling Oracle Cloud Infrastructure services in the ap-suwon-1 region +* Support for calling Oracle Cloud Infrastructure services in the ap-chuncheon-2 region +* Support for MFA Enablement v2 in the Identity Domains service +* Support for starting, stopping and updating min/max executor count for SQL Endpoints in the Data Flow service +* Support for customer message in the Customer Incident Management Service +* Support for REJECTED limitStatus in the Customer Incident Management Service + +Fixed +----- +* Issue with using `OkeWorkloaIdentityResourcePrincipalSigner` after the PyJWT upgrade to 2.4.0 introduced int OCI Python SDK `2.137.1` +* UserWarning being emitted from Cryptography 43.x + +Breaking +-------- +* The operations `get_status` and `get_csi_number` were removed from the IncidentClient in the Customer Incident Management Service +* The property `service_categories` was removed from the model `IncidentResourceType` in the Customer Incident Management Service +* The properties `service_category` and `issue_type` were removed from the model `ServiceCategories` in the Customer Incident Management Service +* The retry strategy for getting the X509 token from Identity service was modified and is now protected via circuit breaker + ==================== 2.137.1 - 2024-10-29 ==================== diff --git a/docs/api/cims.rst b/docs/api/cims.rst index 91e68274f..896e0fbef 100644 --- a/docs/api/cims.rst +++ b/docs/api/cims.rst @@ -47,7 +47,10 @@ Cims oci.cims.models.ServiceCategories oci.cims.models.ServiceCategory oci.cims.models.Status + oci.cims.models.SubCategories oci.cims.models.SubCategory + oci.cims.models.SubComponents + oci.cims.models.SubscriptionInfo oci.cims.models.TechSupportItem oci.cims.models.TenancyInformation oci.cims.models.Ticket diff --git a/docs/api/cims/models/oci.cims.models.SubCategories.rst b/docs/api/cims/models/oci.cims.models.SubCategories.rst new file mode 100644 index 000000000..929c846b6 --- /dev/null +++ b/docs/api/cims/models/oci.cims.models.SubCategories.rst @@ -0,0 +1,11 @@ +SubCategories +============= + +.. currentmodule:: oci.cims.models + +.. autoclass:: SubCategories + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/cims/models/oci.cims.models.SubComponents.rst b/docs/api/cims/models/oci.cims.models.SubComponents.rst new file mode 100644 index 000000000..14cf618e4 --- /dev/null +++ b/docs/api/cims/models/oci.cims.models.SubComponents.rst @@ -0,0 +1,11 @@ +SubComponents +============= + +.. currentmodule:: oci.cims.models + +.. autoclass:: SubComponents + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/cims/models/oci.cims.models.SubscriptionInfo.rst b/docs/api/cims/models/oci.cims.models.SubscriptionInfo.rst new file mode 100644 index 000000000..1e529f260 --- /dev/null +++ b/docs/api/cims/models/oci.cims.models.SubscriptionInfo.rst @@ -0,0 +1,11 @@ +SubscriptionInfo +================ + +.. currentmodule:: oci.cims.models + +.. autoclass:: SubscriptionInfo + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/identity_domains.rst b/docs/api/identity_domains.rst index 3dec9e618..7103d37a1 100644 --- a/docs/api/identity_domains.rst +++ b/docs/api/identity_domains.rst @@ -156,6 +156,7 @@ Identity Domains oci.identity_domains.models.CloudGateServers oci.identity_domains.models.CloudGates oci.identity_domains.models.Condition + oci.identity_domains.models.ConditionExtensionOciconsolesignonpolicyconsentPolicy oci.identity_domains.models.ConditionSearchRequest oci.identity_domains.models.Conditions oci.identity_domains.models.CustomerSecretKey @@ -343,6 +344,12 @@ Identity Domains oci.identity_domains.models.OAuthPartnerCertificate oci.identity_domains.models.OAuthPartnerCertificateSearchRequest oci.identity_domains.models.OAuthPartnerCertificates + oci.identity_domains.models.OciConsoleSignOnPolicyConsent + oci.identity_domains.models.OciConsoleSignOnPolicyConsentConsentSignedBy + oci.identity_domains.models.OciConsoleSignOnPolicyConsentModifiedResource + oci.identity_domains.models.OciConsoleSignOnPolicyConsentPolicyResource + oci.identity_domains.models.OciConsoleSignOnPolicyConsentSearchRequest + oci.identity_domains.models.OciConsoleSignOnPolicyConsents oci.identity_domains.models.Operations oci.identity_domains.models.PasswordPolicies oci.identity_domains.models.PasswordPolicy @@ -352,14 +359,17 @@ Identity Domains oci.identity_domains.models.PatchOp oci.identity_domains.models.Policies oci.identity_domains.models.Policy + oci.identity_domains.models.PolicyExtensionOciconsolesignonpolicyconsentPolicy oci.identity_domains.models.PolicyPolicyType oci.identity_domains.models.PolicyRules oci.identity_domains.models.PolicySearchRequest oci.identity_domains.models.ResourceTypeSchemaAttribute oci.identity_domains.models.ResourceTypeSchemaAttributeSearchRequest oci.identity_domains.models.ResourceTypeSchemaAttributes + oci.identity_domains.models.RestoreOciConsolePolicy oci.identity_domains.models.Rule oci.identity_domains.models.RuleConditionGroup + oci.identity_domains.models.RuleExtensionOciconsolesignonpolicyconsentPolicy oci.identity_domains.models.RulePolicyType oci.identity_domains.models.RuleReturn oci.identity_domains.models.RuleSearchRequest diff --git a/docs/api/identity_domains/models/oci.identity_domains.models.ConditionExtensionOciconsolesignonpolicyconsentPolicy.rst b/docs/api/identity_domains/models/oci.identity_domains.models.ConditionExtensionOciconsolesignonpolicyconsentPolicy.rst new file mode 100644 index 000000000..537b2d317 --- /dev/null +++ b/docs/api/identity_domains/models/oci.identity_domains.models.ConditionExtensionOciconsolesignonpolicyconsentPolicy.rst @@ -0,0 +1,11 @@ +ConditionExtensionOciconsolesignonpolicyconsentPolicy +===================================================== + +.. currentmodule:: oci.identity_domains.models + +.. autoclass:: ConditionExtensionOciconsolesignonpolicyconsentPolicy + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/identity_domains/models/oci.identity_domains.models.OciConsoleSignOnPolicyConsent.rst b/docs/api/identity_domains/models/oci.identity_domains.models.OciConsoleSignOnPolicyConsent.rst new file mode 100644 index 000000000..3502e9d3e --- /dev/null +++ b/docs/api/identity_domains/models/oci.identity_domains.models.OciConsoleSignOnPolicyConsent.rst @@ -0,0 +1,11 @@ +OciConsoleSignOnPolicyConsent +============================= + +.. currentmodule:: oci.identity_domains.models + +.. autoclass:: OciConsoleSignOnPolicyConsent + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/identity_domains/models/oci.identity_domains.models.OciConsoleSignOnPolicyConsentConsentSignedBy.rst b/docs/api/identity_domains/models/oci.identity_domains.models.OciConsoleSignOnPolicyConsentConsentSignedBy.rst new file mode 100644 index 000000000..f29c05075 --- /dev/null +++ b/docs/api/identity_domains/models/oci.identity_domains.models.OciConsoleSignOnPolicyConsentConsentSignedBy.rst @@ -0,0 +1,11 @@ +OciConsoleSignOnPolicyConsentConsentSignedBy +============================================ + +.. currentmodule:: oci.identity_domains.models + +.. autoclass:: OciConsoleSignOnPolicyConsentConsentSignedBy + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/identity_domains/models/oci.identity_domains.models.OciConsoleSignOnPolicyConsentModifiedResource.rst b/docs/api/identity_domains/models/oci.identity_domains.models.OciConsoleSignOnPolicyConsentModifiedResource.rst new file mode 100644 index 000000000..ffd0732a6 --- /dev/null +++ b/docs/api/identity_domains/models/oci.identity_domains.models.OciConsoleSignOnPolicyConsentModifiedResource.rst @@ -0,0 +1,11 @@ +OciConsoleSignOnPolicyConsentModifiedResource +============================================= + +.. currentmodule:: oci.identity_domains.models + +.. autoclass:: OciConsoleSignOnPolicyConsentModifiedResource + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/identity_domains/models/oci.identity_domains.models.OciConsoleSignOnPolicyConsentPolicyResource.rst b/docs/api/identity_domains/models/oci.identity_domains.models.OciConsoleSignOnPolicyConsentPolicyResource.rst new file mode 100644 index 000000000..360fa00ae --- /dev/null +++ b/docs/api/identity_domains/models/oci.identity_domains.models.OciConsoleSignOnPolicyConsentPolicyResource.rst @@ -0,0 +1,11 @@ +OciConsoleSignOnPolicyConsentPolicyResource +=========================================== + +.. currentmodule:: oci.identity_domains.models + +.. autoclass:: OciConsoleSignOnPolicyConsentPolicyResource + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/identity_domains/models/oci.identity_domains.models.OciConsoleSignOnPolicyConsentSearchRequest.rst b/docs/api/identity_domains/models/oci.identity_domains.models.OciConsoleSignOnPolicyConsentSearchRequest.rst new file mode 100644 index 000000000..cc570d6a7 --- /dev/null +++ b/docs/api/identity_domains/models/oci.identity_domains.models.OciConsoleSignOnPolicyConsentSearchRequest.rst @@ -0,0 +1,11 @@ +OciConsoleSignOnPolicyConsentSearchRequest +========================================== + +.. currentmodule:: oci.identity_domains.models + +.. autoclass:: OciConsoleSignOnPolicyConsentSearchRequest + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/identity_domains/models/oci.identity_domains.models.OciConsoleSignOnPolicyConsents.rst b/docs/api/identity_domains/models/oci.identity_domains.models.OciConsoleSignOnPolicyConsents.rst new file mode 100644 index 000000000..6b2b02703 --- /dev/null +++ b/docs/api/identity_domains/models/oci.identity_domains.models.OciConsoleSignOnPolicyConsents.rst @@ -0,0 +1,11 @@ +OciConsoleSignOnPolicyConsents +============================== + +.. currentmodule:: oci.identity_domains.models + +.. autoclass:: OciConsoleSignOnPolicyConsents + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/identity_domains/models/oci.identity_domains.models.PolicyExtensionOciconsolesignonpolicyconsentPolicy.rst b/docs/api/identity_domains/models/oci.identity_domains.models.PolicyExtensionOciconsolesignonpolicyconsentPolicy.rst new file mode 100644 index 000000000..184c7f918 --- /dev/null +++ b/docs/api/identity_domains/models/oci.identity_domains.models.PolicyExtensionOciconsolesignonpolicyconsentPolicy.rst @@ -0,0 +1,11 @@ +PolicyExtensionOciconsolesignonpolicyconsentPolicy +================================================== + +.. currentmodule:: oci.identity_domains.models + +.. autoclass:: PolicyExtensionOciconsolesignonpolicyconsentPolicy + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/identity_domains/models/oci.identity_domains.models.RestoreOciConsolePolicy.rst b/docs/api/identity_domains/models/oci.identity_domains.models.RestoreOciConsolePolicy.rst new file mode 100644 index 000000000..12e265b72 --- /dev/null +++ b/docs/api/identity_domains/models/oci.identity_domains.models.RestoreOciConsolePolicy.rst @@ -0,0 +1,11 @@ +RestoreOciConsolePolicy +======================= + +.. currentmodule:: oci.identity_domains.models + +.. autoclass:: RestoreOciConsolePolicy + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/identity_domains/models/oci.identity_domains.models.RuleExtensionOciconsolesignonpolicyconsentPolicy.rst b/docs/api/identity_domains/models/oci.identity_domains.models.RuleExtensionOciconsolesignonpolicyconsentPolicy.rst new file mode 100644 index 000000000..598e9df97 --- /dev/null +++ b/docs/api/identity_domains/models/oci.identity_domains.models.RuleExtensionOciconsolesignonpolicyconsentPolicy.rst @@ -0,0 +1,11 @@ +RuleExtensionOciconsolesignonpolicyconsentPolicy +================================================ + +.. currentmodule:: oci.identity_domains.models + +.. autoclass:: RuleExtensionOciconsolesignonpolicyconsentPolicy + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/src/oci/auth/auth_utils.py b/src/oci/auth/auth_utils.py index fca105fdc..bfe88fb6f 100644 --- a/src/oci/auth/auth_utils.py +++ b/src/oci/auth/auth_utils.py @@ -3,6 +3,7 @@ # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. import random +import warnings from oci._vendor import six @@ -10,12 +11,14 @@ def get_tenancy_id_from_certificate(cert): if not cert: raise RuntimeError('A certificate must be provided') - for name_attribute in cert.subject: - val = name_attribute.value - if val.startswith('opc-tenant:'): - return val[len('opc-tenant:'):] - if val.startswith('opc-identity:'): - return val[len('opc-identity:'):] + with warnings.catch_warnings(): + warnings.simplefilter('ignore', UserWarning) + for name_attribute in cert.subject: + val = name_attribute.value + if val.startswith('opc-tenant:'): + return val[len('opc-tenant:'):] + if val.startswith('opc-identity:'): + return val[len('opc-identity:'):] raise RuntimeError('The certificate does not contain a tenancy OCID') diff --git a/src/oci/auth/federation_client.py b/src/oci/auth/federation_client.py index 8f7b75c0e..f940c53b3 100644 --- a/src/oci/auth/federation_client.py +++ b/src/oci/auth/federation_client.py @@ -15,6 +15,10 @@ import logging import pprint +from oci.circuit_breaker import CircuitBreakerStrategy, NoCircuitBreakerStrategy +from circuitbreaker import CircuitBreakerMonitor +import random + class X509FederationClient(object): REQUIRED_INIT_KWARGS = [ @@ -62,12 +66,19 @@ def __init__(self, **kwargs): :param obj retry_strategy: (optional) A retry strategy to apply to calls made by this client. 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 and - will be used if no explicit retry strategy is specified. + the :py:mod:`~oci.retry` module. A convenience :py:data:`~oci.retry.DEFAULT_FEDERATION_CLIENT_RETRY_STRATEGY` + is also available and will be used if no explicit retry strategy is specified. + + The specifics of the retry strategy are described `here `__. + + To have this client explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. - The specifics of the default retry strategy are described `here `__. + :param obj circuit_breaker_strategy: (optional) + The circuit_breaker_strategy to apply to calls made by this client. This should be one of the strategies + available in the :py:mod:`~oci.circuit_breaker` module. A convenience :py:data:`~oci.circuit_breaker.DEFAULT_FEDERATION_CLIENT_CIRCUIT_BREAKER_STRATEGY` + is also available and will be used if no explicit retry strategy is specified. - To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + To have this client explicitly not have any circuit breaker, pass an instance of :py:class:`~oci.circuit_breaker.NoCircuitBreakerStrategy`. :param bool log_requests: (optional) log_request if set to True, will log the request url and response data when retrieving @@ -116,10 +127,39 @@ def __init__(self, **kwargs): if retry_strategy: self.retry_strategy = retry_strategy else: - self.retry_strategy = oci.retry.DEFAULT_RETRY_STRATEGY + self.logger.debug('Setting DEFAULT_FEDERATION_CLIENT_RETRY_STRATEGY for federation client') + self.retry_strategy = oci.retry.DEFAULT_FEDERATION_CLIENT_RETRY_STRATEGY + + # Setup Circuit breaker strategy + self._set_circuit_breaker_strategy(circuit_breaker_strategy=kwargs.get('circuit_breaker_strategy')) self.requests_session = requests.Session() + def _set_circuit_breaker_strategy(self, circuit_breaker_strategy): + self.circuit_breaker_strategy = circuit_breaker_strategy + # If not set by client use the GLOBAL_FEDERATION_CLIENT_CIRCUIT_BREAKER_STRATEGY + if circuit_breaker_strategy is None: + self.circuit_breaker_strategy = oci.circuit_breaker.GLOBAL_FEDERATION_CLIENT_CIRCUIT_BREAKER_STRATEGY + + # Skip enabling circuit breaker if NoCircuitBreakerStrategy is set + if isinstance(circuit_breaker_strategy, NoCircuitBreakerStrategy): + self.logger.debug('No circuit breaker strategy enabled!') + else: + # Enable Circuit breaker if a valid circuit breaker strategy is available + if not isinstance(self.circuit_breaker_strategy, CircuitBreakerStrategy): + raise TypeError('Invalid Circuit Breaker Strategy!') + self.logger.debug('Enabling circuit breaker strategy for federation client') + # Set the recovery timeout a random value between 30 seconds to 49 seconds + if self.circuit_breaker_strategy == oci.circuit_breaker.DEFAULT_FEDERATION_CLIENT_CIRCUIT_BREAKER_STRATEGY: + self.logger.debug('Using DEFAULT_FEDERATION_CLIENT_CIRCUIT_BREAKER_STRATEGY for federation client') + self.circuit_breaker_strategy.recovery_timeout = random.randint(30, 49) + # Re-use Circuit breaker if sharing a Circuit Breaker Strategy. + circuit_breaker = CircuitBreakerMonitor.get(self.circuit_breaker_strategy.name) + if circuit_breaker is None: + circuit_breaker = self.circuit_breaker_strategy.get_circuit_breaker() + # Equivalent to decorating the request function with Circuit Breaker + self._get_security_token_from_auth_service = circuit_breaker(self._get_security_token_from_auth_service) + def refresh_security_token(self): return self._refresh_security_token_inner() @@ -188,6 +228,13 @@ def _get_security_token_from_auth_service(self): if response.ok: raise RuntimeError(error_text) else: + if isinstance(self.circuit_breaker_strategy, CircuitBreakerStrategy) and self.circuit_breaker_strategy.is_transient_error(response.status_code, response.reason): + raise oci.exceptions.TransientServiceError( + response.status_code, + response.reason, + response.headers, + error_text + ) raise oci.exceptions.ServiceError( response.status_code, response.reason, @@ -196,6 +243,13 @@ def _get_security_token_from_auth_service(self): ) if not response.ok: + if isinstance(self.circuit_breaker_strategy, CircuitBreakerStrategy) and self.circuit_breaker_strategy.is_transient_error(response.status_code, response.reason): + raise oci.exceptions.TransientServiceError( + response.status_code, + parsed_response.get('code'), + response.headers, + parsed_response.get('message') + ) raise oci.exceptions.ServiceError( response.status_code, parsed_response.get('code'), diff --git a/src/oci/auth/rpt_path_providers.py b/src/oci/auth/rpt_path_providers.py index cdf835a30..952ef98d7 100644 --- a/src/oci/auth/rpt_path_providers.py +++ b/src/oci/auth/rpt_path_providers.py @@ -9,9 +9,8 @@ import time from oci._vendor import requests -import oci._vendor.jwt as jwt - from .signers.instance_principals_security_token_signer import InstancePrincipalsSecurityTokenSigner +from .security_token_container import SecurityTokenContainer OCI_RESOURCE_PRINCIPAL_RPT_PATH = "OCI_RESOURCE_PRINCIPAL_RPT_PATH" OCI_RESOURCE_PRINCIPAL_RPT_ID = "OCI_RESOURCE_PRINCIPAL_RPT_ID" @@ -182,7 +181,8 @@ def get_instance_id_from_imds(): def is_valid_sa_token(token): - decoded_jwt = jwt.decode(jwt=token, verify=False) + security_token_container = SecurityTokenContainer(session_key_supplier=None, security_token=token) + decoded_jwt = security_token_container.get_jwt() time_now = int(time.time()) if decoded_jwt.get('exp') is None: raise RuntimeError("Service account token does not have an 'exp' field.") diff --git a/src/oci/base_client.py b/src/oci/base_client.py index 5aaa0c6bf..d6ab4870e 100644 --- a/src/oci/base_client.py +++ b/src/oci/base_client.py @@ -23,7 +23,6 @@ from ._vendor import requests, six, urllib3, sseclient from dateutil.parser import parse from dateutil import tz - import functools from six.moves.http_client import HTTPResponse @@ -33,7 +32,7 @@ from .request import Request from .response import Response from .circuit_breaker import CircuitBreakerStrategy, NoCircuitBreakerStrategy -from circuitbreaker import CircuitBreaker, CircuitBreakerMonitor +from circuitbreaker import CircuitBreakerMonitor from .version import __version__ from .util import NONE_SENTINEL, Sentinel, extract_service_endpoint missing = Sentinel("Missing") @@ -342,16 +341,10 @@ def __init__(self, service, config, signer, type_mapping, **kwargs): # Enable Circuit breaker if a valid circuit breaker strategy is available if not isinstance(self.circuit_breaker_strategy, CircuitBreakerStrategy): raise TypeError('Invalid Circuit Breaker Strategy!') - self.circuit_breaker_name = str(uuid.uuid4()) if self.circuit_breaker_strategy.name is None else self.circuit_breaker_strategy.name # Re-use Circuit breaker if sharing a Circuit Breaker Strategy. - circuit_breaker = CircuitBreakerMonitor.get(self.circuit_breaker_name) + circuit_breaker = CircuitBreakerMonitor.get(self.circuit_breaker_strategy.name) if circuit_breaker is None: - circuit_breaker = CircuitBreaker( - failure_threshold=self.circuit_breaker_strategy.failure_threshold, - recovery_timeout=self.circuit_breaker_strategy.recovery_timeout, - expected_exception=self.circuit_breaker_strategy.expected_exception, - name=self.circuit_breaker_name - ) + circuit_breaker = self.circuit_breaker_strategy.get_circuit_breaker() # Equivalent to decorating the request function with Circuit Breaker self.request = circuit_breaker(self.request) self.logger.debug('Endpoint: {}'.format(self._endpoint)) @@ -656,7 +649,7 @@ def request(self, request, allow_control_chars=None, operation_name=None, api_re initial_circuit_breaker_state = None if self.circuit_breaker_name: - initial_circuit_breaker_state = CircuitBreakerMonitor.get(self.circuit_breaker_name).state + initial_circuit_breaker_state = CircuitBreakerMonitor.get(self.circuit_breaker_strategy.name).state if initial_circuit_breaker_state != circuitbreaker.STATE_CLOSED: self.logger.debug("Circuit Breaker State is {}!".format(initial_circuit_breaker_state)) @@ -718,7 +711,7 @@ def request(self, request, allow_control_chars=None, operation_name=None, api_re self.session.close() self.session = new_session if isinstance(self.circuit_breaker_strategy, CircuitBreakerStrategy) and self.circuit_breaker_strategy.is_transient_error(response.status_code, service_code): - new_circuit_breaker_state = CircuitBreakerMonitor.get(self.circuit_breaker_name).state + new_circuit_breaker_state = CircuitBreakerMonitor.get(self.circuit_breaker_strategy.name).state if initial_circuit_breaker_state != new_circuit_breaker_state: self.logger.warning("Circuit Breaker state changed from {} to {}".format(initial_circuit_breaker_state, new_circuit_breaker_state)) self.raise_transient_service_error(request, response, service_code, message, operation_name, api_reference_link, target_service, request_endpoint, client_version, timestamp, deserialized_data) diff --git a/src/oci/cims/incident_client.py b/src/oci/cims/incident_client.py index e90643756..13103a5dd 100644 --- a/src/oci/cims/incident_client.py +++ b/src/oci/cims/incident_client.py @@ -123,7 +123,10 @@ def __init__(self, config, **kwargs): def create_incident(self, create_incident_details, **kwargs): """ - Operation to create a support ticket. + Creates a support ticket in the specified tenancy. + For more information, see `Creating Support Requests`__. + + __ https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident.htm :param oci.cims.models.CreateIncident create_incident_details: (required) @@ -134,6 +137,7 @@ def create_incident(self, create_incident_details, **kwargs): :param str ocid: (optional) User OCID for Oracle Identity Cloud Service (IDCS) users who also have a federated Oracle Cloud Infrastructure account. + User OCID is mandatory for OCI Users and optional for Multicloud users. :param str homeregion: (optional) The region of the tenancy. @@ -149,6 +153,7 @@ def create_incident(self, create_incident_details, **kwargs): :param str domainid: (optional) The OCID of identity domain. + DomainID is mandatory if the user is part of Non Default Identity domain. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. @@ -237,154 +242,34 @@ def create_incident(self, create_incident_details, **kwargs): api_reference_link=api_reference_link, required_arguments=required_arguments) - def get_csi_number(self, tenant_id, region, **kwargs): + def get_incident(self, incident_key, compartment_id, **kwargs): """ - Fetches csi number of the user. - - - :param str tenant_id: (required) - Tenancy Ocid in oracle cloud Infrastructure - - :param str region: (required) - Home region of the customer which is part of oracle cloud infrastructure regions - - :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 str ocid: (optional) - User OCID for Oracle Identity Cloud Service (IDCS) users who also have a federated Oracle Cloud Infrastructure account. - - :param str homeregion: (optional) - The region of the tenancy. + Gets the specified support ticket. + For more information, see `Getting Details for a Support Request`__. - :param str bearertokentype: (optional) - Token type that determine which cloud provider the request come from. - - :param str bearertoken: (optional) - Token that provided by multi cloud provider, which help to validate the email. - - :param str idtoken: (optional) - IdToken that provided by multi cloud provider, which help to validate the email. - - :param str domainid: (optional) - The OCID of identity domain. - - :param obj retry_strategy: (optional) - A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. - - This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. - The specifics of the default retry strategy are described `here `__. - - To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. - - :param bool allow_control_chars: (optional) - allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. - By default, the response will not allow control characters in strings - - :return: A :class:`~oci.response.Response` object with data of type str - :rtype: :class:`~oci.response.Response` - - :example: - Click `here `__ to see an example of how to use get_csi_number API. - """ - # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['tenantId', 'region'] - resource_path = "/v2/incidents/getCsiNumber" - method = "GET" - operation_name = "get_csi_number" - api_reference_link = "" - - # Don't accept unknown kwargs - expected_kwargs = [ - "allow_control_chars", - "retry_strategy", - "opc_request_id", - "ocid", - "homeregion", - "bearertokentype", - "bearertoken", - "idtoken", - "domainid" - ] - extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] - if extra_kwargs: - raise ValueError( - f"get_csi_number got unknown kwargs: {extra_kwargs!r}") - - query_params = { - "tenantId": tenant_id, - "region": region - } - 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), - "ocid": kwargs.get("ocid", missing), - "homeregion": kwargs.get("homeregion", missing), - "bearertokentype": kwargs.get("bearertokentype", missing), - "bearertoken": kwargs.get("bearertoken", missing), - "idtoken": kwargs.get("idtoken", missing), - "domainid": kwargs.get("domainid", missing) - } - header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} - - retry_strategy = self.base_client.get_preferred_retry_strategy( - operation_retry_strategy=kwargs.get('retry_strategy'), - client_retry_strategy=self.retry_strategy - ) - - if retry_strategy: - if not isinstance(retry_strategy, retry.NoneRetryStrategy): - self.base_client.add_opc_client_retries_header(header_params) - retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) - return retry_strategy.make_retrying_call( - self.base_client.call_api, - resource_path=resource_path, - method=method, - query_params=query_params, - header_params=header_params, - response_type="str", - allow_control_chars=kwargs.get('allow_control_chars'), - operation_name=operation_name, - api_reference_link=api_reference_link, - required_arguments=required_arguments) - else: - return self.base_client.call_api( - resource_path=resource_path, - method=method, - query_params=query_params, - header_params=header_params, - response_type="str", - allow_control_chars=kwargs.get('allow_control_chars'), - operation_name=operation_name, - api_reference_link=api_reference_link, - required_arguments=required_arguments) - - def get_incident(self, incident_key, **kwargs): - """ - Gets details about the specified support ticket. + __ https://docs.cloud.oracle.com/iaas/Content/GSG/support/get-incident.htm :param str incident_key: (required) Unique identifier for the support ticket. + :param str compartment_id: (required) + The OCID of the tenancy. + :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 str csi: (optional) - The Customer Support Identifier (CSI) associated with the support account. + The Customer Support Identifier (CSI) number associated with the support account. + The CSI is required for technical support tickets and optional for limits and billing tickets. :param str ocid: (optional) User OCID for Oracle Identity Cloud Service (IDCS) users who also have a federated Oracle Cloud Infrastructure account. + User OCID is mandatory for OCI Users and optional for Multicloud users. :param str homeregion: (optional) The region of the tenancy. - :param str compartment_id: (optional) - The OCID of the tenancy. - :param str problemtype: (optional) The kind of support request. @@ -399,6 +284,7 @@ def get_incident(self, incident_key, **kwargs): :param str domainid: (optional) The OCID of identity domain. + DomainID is mandatory if the user is part of Non Default Identity domain. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. @@ -419,7 +305,7 @@ def get_incident(self, incident_key, **kwargs): Click `here `__ to see an example of how to use get_incident API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['incidentKey'] + required_arguments = ['incidentKey', 'compartmentId'] resource_path = "/v2/incidents/{incidentKey}" method = "GET" operation_name = "get_incident" @@ -433,7 +319,6 @@ def get_incident(self, incident_key, **kwargs): "csi", "ocid", "homeregion", - "compartment_id", "problemtype", "bearertokentype", "bearertoken", @@ -456,7 +341,7 @@ def get_incident(self, incident_key, **kwargs): raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') query_params = { - "compartmentId": kwargs.get("compartment_id", missing) + "compartmentId": compartment_id } query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} @@ -509,100 +394,19 @@ def get_incident(self, incident_key, **kwargs): api_reference_link=api_reference_link, required_arguments=required_arguments) - def get_status(self, **kwargs): - """ - Gets the status of the service. - - - :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 str ocid: (optional) - User OCID for Oracle Identity Cloud Service (IDCS) users who also have a federated Oracle Cloud Infrastructure account. - - :param str homeregion: (optional) - The region of the tenancy. - - :param obj retry_strategy: (optional) - A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. - - This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. - The specifics of the default retry strategy are described `here `__. - - To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. - - :param bool allow_control_chars: (optional) - allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. - By default, the response will not allow control characters in strings - - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.cims.models.Status` - :rtype: :class:`~oci.response.Response` - - :example: - Click `here `__ to see an example of how to use get_status API. - """ - # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = [] - resource_path = "/v2/incidents/status" - method = "GET" - operation_name = "get_status" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/incidentmanagement/20181231/Status/GetStatus" - - # Don't accept unknown kwargs - expected_kwargs = [ - "allow_control_chars", - "retry_strategy", - "opc_request_id", - "ocid", - "homeregion" - ] - extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] - if extra_kwargs: - raise ValueError( - f"get_status got unknown kwargs: {extra_kwargs!r}") - - header_params = { - "accept": "application/json", - "content-type": "application/json", - "opc-request-id": kwargs.get("opc_request_id", missing), - "ocid": kwargs.get("ocid", missing), - "homeregion": kwargs.get("homeregion", missing) - } - header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} - - retry_strategy = self.base_client.get_preferred_retry_strategy( - operation_retry_strategy=kwargs.get('retry_strategy'), - client_retry_strategy=self.retry_strategy - ) - - if retry_strategy: - if not isinstance(retry_strategy, retry.NoneRetryStrategy): - self.base_client.add_opc_client_retries_header(header_params) - retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) - return retry_strategy.make_retrying_call( - self.base_client.call_api, - resource_path=resource_path, - method=method, - header_params=header_params, - response_type="Status", - allow_control_chars=kwargs.get('allow_control_chars'), - operation_name=operation_name, - api_reference_link=api_reference_link, - required_arguments=required_arguments) - else: - return self.base_client.call_api( - resource_path=resource_path, - method=method, - header_params=header_params, - response_type="Status", - allow_control_chars=kwargs.get('allow_control_chars'), - operation_name=operation_name, - api_reference_link=api_reference_link, - required_arguments=required_arguments) - def list_incident_resource_types(self, problem_type, compartment_id, **kwargs): """ - During support ticket creation, returns the list of all possible products that Oracle Cloud Infrastructure supports. + Depending on the selected `productType`, either + lists available products (service groups, services, service categories, and subcategories) for technical support tickets or + lists limits and current usage for limit increase tickets. + This operation is called during creation of technical support and limit increase tickets. + For more information about listing products, see + `Listing Products for Support Requests`__. + For more information about listing limits, see + `Listing Limits for Service Limit Increase Requests`__. + + __ https://docs.cloud.oracle.com/iaas/Content/GSG/support/list-incident-resource-types-taxonomy.htm + __ https://docs.cloud.oracle.com/iaas/Content/GSG/support/list-incident-resource-types-limit.htm :param str problem_type: (required) @@ -638,16 +442,19 @@ def list_incident_resource_types(self, problem_type, compartment_id, **kwargs): The user-friendly name of the support ticket type. :param str csi: (optional) - The Customer Support Identifier (CSI) associated with the support account. + The Customer Support Identifier (CSI) number associated with the support account. + The CSI is required for technical support tickets and optional for limits and billing tickets. :param str ocid: (optional) User OCID for Oracle Identity Cloud Service (IDCS) users who also have a federated Oracle Cloud Infrastructure account. + User OCID is mandatory for OCI Users and optional for Multicloud users. :param str homeregion: (optional) The region of the tenancy. :param str domainid: (optional) The OCID of identity domain. + DomainID is mandatory if the user is part of Non Default Identity domain. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. @@ -764,14 +571,18 @@ def list_incident_resource_types(self, problem_type, compartment_id, **kwargs): def list_incidents(self, compartment_id, **kwargs): """ - Returns the list of support tickets raised by the tenancy. + Lists support tickets for the specified tenancy. + For more information, see `Listing Support Requests`__. + + __ https://docs.cloud.oracle.com/iaas/Content/GSG/support/list-incidents.htm :param str compartment_id: (required) The OCID of the tenancy. :param str csi: (optional) - The Customer Support Identifier (CSI) associated with the support account. + The Customer Support Identifier (CSI) number associated with the support account. + The CSI is required for technical support tickets and optional for limits and billing tickets. :param int limit: (optional) For list pagination. The maximum number of results per page, or items to return in a paginated \"List\" call. For important details about how pagination works, see `List Pagination`__. @@ -803,6 +614,7 @@ def list_incidents(self, compartment_id, **kwargs): :param str ocid: (optional) User OCID for Oracle Identity Cloud Service (IDCS) users who also have a federated Oracle Cloud Infrastructure account. + User OCID is mandatory for OCI Users and optional for Multicloud users. :param str homeregion: (optional) The region of the tenancy. @@ -821,6 +633,7 @@ def list_incidents(self, compartment_id, **kwargs): :param str domainid: (optional) The OCID of identity domain. + DomainID is mandatory if the user is part of Non Default Identity domain. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. @@ -949,9 +762,12 @@ def list_incidents(self, compartment_id, **kwargs): api_reference_link=api_reference_link, required_arguments=required_arguments) - def update_incident(self, incident_key, update_incident_details, **kwargs): + def update_incident(self, incident_key, update_incident_details, compartment_id, **kwargs): """ - Updates the specified support ticket's information. + Updates the specified support ticket. + For more information, see `Updating Support Requests`__. + + __ https://docs.cloud.oracle.com/iaas/Content/GSG/support/update-incident.htm :param str incident_key: (required) @@ -960,20 +776,22 @@ def update_incident(self, incident_key, update_incident_details, **kwargs): :param oci.cims.models.UpdateIncident update_incident_details: (required) Details about the support ticket being updated. + :param str compartment_id: (required) + The OCID of the tenancy. + :param str csi: (optional) - The Customer Support Identifier (CSI) associated with the support account. + The Customer Support Identifier (CSI) number associated with the support account. + The CSI is required for technical support tickets and optional for limits and billing tickets. :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 str compartment_id: (optional) - The OCID of the tenancy. - :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. :param str ocid: (optional) User OCID for Oracle Identity Cloud Service (IDCS) users who also have a federated Oracle Cloud Infrastructure account. + User OCID is mandatory for OCI Users and optional for Multicloud users. :param str homeregion: (optional) The region of the tenancy. @@ -989,6 +807,7 @@ def update_incident(self, incident_key, update_incident_details, **kwargs): :param str domainid: (optional) The OCID of identity domain. + DomainID is mandatory if the user is part of Non Default Identity domain. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. @@ -1009,7 +828,7 @@ def update_incident(self, incident_key, update_incident_details, **kwargs): Click `here `__ to see an example of how to use update_incident API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['incidentKey'] + required_arguments = ['incidentKey', 'compartmentId'] resource_path = "/v2/incidents/{incidentKey}" method = "PUT" operation_name = "update_incident" @@ -1021,7 +840,6 @@ def update_incident(self, incident_key, update_incident_details, **kwargs): "retry_strategy", "csi", "opc_request_id", - "compartment_id", "if_match", "ocid", "homeregion", @@ -1046,7 +864,7 @@ def update_incident(self, incident_key, update_incident_details, **kwargs): raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') query_params = { - "compartmentId": kwargs.get("compartment_id", missing) + "compartmentId": compartment_id } query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} @@ -1104,10 +922,14 @@ def update_incident(self, incident_key, update_incident_details, **kwargs): def validate_user(self, **kwargs): """ Checks whether the requested user is valid. + For more information, see `Validating a User`__. + + __ https://docs.cloud.oracle.com/iaas/Content/GSG/support/validate-user.htm :param str csi: (optional) - The Customer Support Identifier (CSI) associated with the support account. + The Customer Support Identifier (CSI) number associated with the support account. + The CSI is required for technical support tickets and optional for limits and billing tickets. :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. @@ -1119,6 +941,7 @@ def validate_user(self, **kwargs): :param str ocid: (optional) User OCID for Oracle Identity Cloud Service (IDCS) users who also have a federated Oracle Cloud Infrastructure account. + User OCID is mandatory for OCI Users and optional for Multicloud users. :param str homeregion: (optional) The region of the tenancy. @@ -1134,6 +957,7 @@ def validate_user(self, **kwargs): :param str domainid: (optional) The OCID of identity domain. + DomainID is mandatory if the user is part of Non Default Identity domain. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. diff --git a/src/oci/cims/models/__init__.py b/src/oci/cims/models/__init__.py index 8dc4cb21d..cfb9e0f38 100644 --- a/src/oci/cims/models/__init__.py +++ b/src/oci/cims/models/__init__.py @@ -35,7 +35,10 @@ from .service_categories import ServiceCategories from .service_category import ServiceCategory from .status import Status +from .sub_categories import SubCategories from .sub_category import SubCategory +from .sub_components import SubComponents +from .subscription_info import SubscriptionInfo from .tech_support_item import TechSupportItem from .tenancy_information import TenancyInformation from .ticket import Ticket @@ -78,7 +81,10 @@ "ServiceCategories": ServiceCategories, "ServiceCategory": ServiceCategory, "Status": Status, + "SubCategories": SubCategories, "SubCategory": SubCategory, + "SubComponents": SubComponents, + "SubscriptionInfo": SubscriptionInfo, "TechSupportItem": TechSupportItem, "TenancyInformation": TenancyInformation, "Ticket": Ticket, diff --git a/src/oci/cims/models/activity_item.py b/src/oci/cims/models/activity_item.py index afa7d5497..deecde73d 100644 --- a/src/oci/cims/models/activity_item.py +++ b/src/oci/cims/models/activity_item.py @@ -133,6 +133,10 @@ def __init__(self, **kwargs): Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type item_status: str + :param attachment_id: + The value to assign to the attachment_id property of this ActivityItem. + :type attachment_id: str + """ self.swagger_types = { 'item_key': 'str', @@ -147,7 +151,8 @@ def __init__(self, **kwargs): 'activity_type': 'str', 'activity_author': 'str', 'item_type': 'str', - 'item_status': 'str' + 'item_status': 'str', + 'attachment_id': 'str' } self.attribute_map = { @@ -163,7 +168,8 @@ def __init__(self, **kwargs): 'activity_type': 'activityType', 'activity_author': 'activityAuthor', 'item_type': 'itemType', - 'item_status': 'itemStatus' + 'item_status': 'itemStatus', + 'attachment_id': 'attachmentID' } self._item_key = None @@ -179,6 +185,7 @@ def __init__(self, **kwargs): self._activity_author = None self._item_type = None self._item_status = None + self._attachment_id = None self._type = 'activity' @property @@ -209,7 +216,7 @@ def comments(self, comments): def time_created(self): """ **[Required]** Gets the time_created of this ActivityItem. - The time when the activity was created, in milliseconds since epoch time. + The time when the activity was created, in seconds since epoch time. :return: The time_created of this ActivityItem. @@ -221,7 +228,7 @@ def time_created(self): def time_created(self, time_created): """ Sets the time_created of this ActivityItem. - The time when the activity was created, in milliseconds since epoch time. + The time when the activity was created, in seconds since epoch time. :param time_created: The time_created of this ActivityItem. @@ -233,7 +240,7 @@ def time_created(self, time_created): def time_updated(self): """ **[Required]** Gets the time_updated of this ActivityItem. - The time when the activity was updated, in milliseconds since epoch time. + The time when the activity was updated, in seconds since epoch time. :return: The time_updated of this ActivityItem. @@ -245,7 +252,7 @@ def time_updated(self): def time_updated(self, time_updated): """ Sets the time_updated of this ActivityItem. - The time when the activity was updated, in milliseconds since epoch time. + The time when the activity was updated, in seconds since epoch time. :param time_updated: The time_updated of this ActivityItem. @@ -365,6 +372,30 @@ def item_status(self, item_status): item_status = 'UNKNOWN_ENUM_VALUE' self._item_status = item_status + @property + def attachment_id(self): + """ + Gets the attachment_id of this ActivityItem. + attachmentID for the ItemType Attachments only for Alloy realm. + + + :return: The attachment_id of this ActivityItem. + :rtype: str + """ + return self._attachment_id + + @attachment_id.setter + def attachment_id(self, attachment_id): + """ + Sets the attachment_id of this ActivityItem. + attachmentID for the ItemType Attachments only for Alloy realm. + + + :param attachment_id: The attachment_id of this ActivityItem. + :type: str + """ + self._attachment_id = attachment_id + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/cims/models/create_account_item_details.py b/src/oci/cims/models/create_account_item_details.py index 2d265ef8a..35bf8b0be 100644 --- a/src/oci/cims/models/create_account_item_details.py +++ b/src/oci/cims/models/create_account_item_details.py @@ -13,6 +13,9 @@ class CreateAccountItemDetails(CreateItemDetails): """ Details about the issue that the account support ticket relates to. Avoid entering confidential information. + For information about `ACCOUNT` support tickets, see `Creating a Billing Support Request`__. + + __ https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-billing.htm """ def __init__(self, **kwargs): diff --git a/src/oci/cims/models/create_incident.py b/src/oci/cims/models/create_incident.py index 6cbe126ba..560a0cf34 100644 --- a/src/oci/cims/models/create_incident.py +++ b/src/oci/cims/models/create_incident.py @@ -165,7 +165,17 @@ def csi(self, csi): def problem_type(self): """ **[Required]** Gets the problem_type of this CreateIncident. - The kind of support ticket, such as a technical support request or a limit increase request. + The kind of support ticket (type of support request). + For information about `ACCOUNT` support tickets, see + `Creating a Billing Support Request`__. + For information about `LIMIT` support tickets, see + `Creating a Service Limit Increase Request`__. + For information about `TECH` support tickets, see + `Creating a Technical Support Request`__. + + __ https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-billing.htm + __ https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-limit.htm + __ https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-technical.htm Allowed values for this property are: "LIMIT", "LEGACY_LIMIT", "TECH", "ACCOUNT", "TAXONOMY" @@ -179,7 +189,17 @@ def problem_type(self): def problem_type(self, problem_type): """ Sets the problem_type of this CreateIncident. - The kind of support ticket, such as a technical support request or a limit increase request. + The kind of support ticket (type of support request). + For information about `ACCOUNT` support tickets, see + `Creating a Billing Support Request`__. + For information about `LIMIT` support tickets, see + `Creating a Service Limit Increase Request`__. + For information about `TECH` support tickets, see + `Creating a Technical Support Request`__. + + __ https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-billing.htm + __ https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-limit.htm + __ https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-technical.htm :param problem_type: The problem_type of this CreateIncident. diff --git a/src/oci/cims/models/create_limit_item_details.py b/src/oci/cims/models/create_limit_item_details.py index 09a3f1eeb..5c21cbe82 100644 --- a/src/oci/cims/models/create_limit_item_details.py +++ b/src/oci/cims/models/create_limit_item_details.py @@ -13,6 +13,9 @@ class CreateLimitItemDetails(CreateItemDetails): """ Details about the service limit increase request. Avoid entering confidential information. + For information about `LIMIT` support tickets, see `Creating a Service Limit Increase Request`__. + + __ https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-limit.htm """ #: A constant which can be used with the limit_status property of a CreateLimitItemDetails. @@ -27,6 +30,10 @@ class CreateLimitItemDetails(CreateItemDetails): #: This constant has a value of "NOT_APPROVED" LIMIT_STATUS_NOT_APPROVED = "NOT_APPROVED" + #: A constant which can be used with the limit_status property of a CreateLimitItemDetails. + #: This constant has a value of "REJECTED" + LIMIT_STATUS_REJECTED = "REJECTED" + def __init__(self, **kwargs): """ Initializes a new CreateLimitItemDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.cims.models.CreateLimitItemDetails.type` attribute @@ -67,7 +74,7 @@ def __init__(self, **kwargs): :param limit_status: The value to assign to the limit_status property of this CreateLimitItemDetails. - Allowed values for this property are: "APPROVED", "PARTIALLY_APPROVED", "NOT_APPROVED" + Allowed values for this property are: "APPROVED", "PARTIALLY_APPROVED", "NOT_APPROVED", "REJECTED" :type limit_status: str """ @@ -184,7 +191,7 @@ def limit_status(self): Gets the limit_status of this CreateLimitItemDetails. The current status of the request. - Allowed values for this property are: "APPROVED", "PARTIALLY_APPROVED", "NOT_APPROVED" + Allowed values for this property are: "APPROVED", "PARTIALLY_APPROVED", "NOT_APPROVED", "REJECTED" :return: The limit_status of this CreateLimitItemDetails. @@ -202,7 +209,7 @@ def limit_status(self, limit_status): :param limit_status: The limit_status of this CreateLimitItemDetails. :type: str """ - allowed_values = ["APPROVED", "PARTIALLY_APPROVED", "NOT_APPROVED"] + allowed_values = ["APPROVED", "PARTIALLY_APPROVED", "NOT_APPROVED", "REJECTED"] if not value_allowed_none_or_none_sentinel(limit_status, allowed_values): raise ValueError( f"Invalid value for `limit_status`, must be None or one of {allowed_values}" diff --git a/src/oci/cims/models/create_tech_support_item_details.py b/src/oci/cims/models/create_tech_support_item_details.py index 202449ed0..106cc8f53 100644 --- a/src/oci/cims/models/create_tech_support_item_details.py +++ b/src/oci/cims/models/create_tech_support_item_details.py @@ -13,6 +13,9 @@ class CreateTechSupportItemDetails(CreateItemDetails): """ Details about the issue that the technical support ticket relates to. Avoid entering confidential information. + For information about `TECH` support tickets, see `Creating a Technical Support Request`__. + + __ https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-technical.htm """ def __init__(self, **kwargs): diff --git a/src/oci/cims/models/create_user_details.py b/src/oci/cims/models/create_user_details.py index 5bf6173b7..d6f164f59 100644 --- a/src/oci/cims/models/create_user_details.py +++ b/src/oci/cims/models/create_user_details.py @@ -277,7 +277,17 @@ def organization_name(self, organization_name): def problem_type(self): """ **[Required]** Gets the problem_type of this CreateUserDetails. - The kind of support ticket, such as a technical support request or a limit increase request. + The kind of support ticket (type of support request). + For information about `ACCOUNT` support tickets, see + `Creating a Billing Support Request`__. + For information about `LIMIT` support tickets, see + `Creating a Service Limit Increase Request`__. + For information about `TECH` support tickets, see + `Creating a Technical Support Request`__. + + __ https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-billing.htm + __ https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-limit.htm + __ https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-technical.htm Allowed values for this property are: "LIMIT", "LEGACY_LIMIT", "TECH", "ACCOUNT", "TAXONOMY" @@ -291,7 +301,17 @@ def problem_type(self): def problem_type(self, problem_type): """ Sets the problem_type of this CreateUserDetails. - The kind of support ticket, such as a technical support request or a limit increase request. + The kind of support ticket (type of support request). + For information about `ACCOUNT` support tickets, see + `Creating a Billing Support Request`__. + For information about `LIMIT` support tickets, see + `Creating a Service Limit Increase Request`__. + For information about `TECH` support tickets, see + `Creating a Technical Support Request`__. + + __ https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-billing.htm + __ https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-limit.htm + __ https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-technical.htm :param problem_type: The problem_type of this CreateUserDetails. diff --git a/src/oci/cims/models/incident.py b/src/oci/cims/models/incident.py index 4b5c15d3a..63d246ca6 100644 --- a/src/oci/cims/models/incident.py +++ b/src/oci/cims/models/incident.py @@ -238,7 +238,17 @@ def incident_type(self, incident_type): def problem_type(self): """ Gets the problem_type of this Incident. - The kind of support ticket, such as a technical support request or a limit increase request. + The kind of support ticket (type of support request). + For information about `ACCOUNT` support tickets, see + `Creating a Billing Support Request`__. + For information about `LIMIT` support tickets, see + `Creating a Service Limit Increase Request`__. + For information about `TECH` support tickets, see + `Creating a Technical Support Request`__. + + __ https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-billing.htm + __ https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-limit.htm + __ https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-technical.htm Allowed values for this property are: "LIMIT", "LEGACY_LIMIT", "TECH", "ACCOUNT", "TAXONOMY", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -253,7 +263,17 @@ def problem_type(self): def problem_type(self, problem_type): """ Sets the problem_type of this Incident. - The kind of support ticket, such as a technical support request or a limit increase request. + The kind of support ticket (type of support request). + For information about `ACCOUNT` support tickets, see + `Creating a Billing Support Request`__. + For information about `LIMIT` support tickets, see + `Creating a Service Limit Increase Request`__. + For information about `TECH` support tickets, see + `Creating a Technical Support Request`__. + + __ https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-billing.htm + __ https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-limit.htm + __ https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-technical.htm :param problem_type: The problem_type of this Incident. diff --git a/src/oci/cims/models/incident_resource_type.py b/src/oci/cims/models/incident_resource_type.py index 81305e4e4..2c7a4b010 100644 --- a/src/oci/cims/models/incident_resource_type.py +++ b/src/oci/cims/models/incident_resource_type.py @@ -36,6 +36,10 @@ def __init__(self, **kwargs): The value to assign to the description property of this IncidentResourceType. :type description: str + :param is_subscriptions_supported: + The value to assign to the is_subscriptions_supported property of this IncidentResourceType. + :type is_subscriptions_supported: bool + :param service_category_list: The value to assign to the service_category_list property of this IncidentResourceType. :type service_category_list: list[oci.cims.models.ServiceCategory] @@ -44,9 +48,9 @@ def __init__(self, **kwargs): The value to assign to the service property of this IncidentResourceType. :type service: dict(str, str) - :param service_categories: - The value to assign to the service_categories property of this IncidentResourceType. - :type service_categories: list[oci.cims.models.ServiceCategories] + :param services: + The value to assign to the services property of this IncidentResourceType. + :type services: list[oci.cims.models.ServiceCategories] """ self.swagger_types = { @@ -54,9 +58,10 @@ def __init__(self, **kwargs): 'name': 'str', 'label': 'str', 'description': 'str', + 'is_subscriptions_supported': 'bool', 'service_category_list': 'list[ServiceCategory]', 'service': 'dict(str, str)', - 'service_categories': 'list[ServiceCategories]' + 'services': 'list[ServiceCategories]' } self.attribute_map = { @@ -64,18 +69,20 @@ def __init__(self, **kwargs): 'name': 'name', 'label': 'label', 'description': 'description', + 'is_subscriptions_supported': 'isSubscriptionsSupported', 'service_category_list': 'serviceCategoryList', 'service': 'service', - 'service_categories': 'serviceCategories' + 'services': 'services' } self._resource_type_key = None self._name = None self._label = None self._description = None + self._is_subscriptions_supported = None self._service_category_list = None self._service = None - self._service_categories = None + self._services = None @property def resource_type_key(self): @@ -173,6 +180,30 @@ def description(self, description): """ self._description = description + @property + def is_subscriptions_supported(self): + """ + Gets the is_subscriptions_supported of this IncidentResourceType. + Indicates whether multi-subscription is supported + + + :return: The is_subscriptions_supported of this IncidentResourceType. + :rtype: bool + """ + return self._is_subscriptions_supported + + @is_subscriptions_supported.setter + def is_subscriptions_supported(self, is_subscriptions_supported): + """ + Sets the is_subscriptions_supported of this IncidentResourceType. + Indicates whether multi-subscription is supported + + + :param is_subscriptions_supported: The is_subscriptions_supported of this IncidentResourceType. + :type: bool + """ + self._is_subscriptions_supported = is_subscriptions_supported + @property def service_category_list(self): """ @@ -222,28 +253,28 @@ def service(self, service): self._service = service @property - def service_categories(self): + def services(self): """ - Gets the service_categories of this IncidentResourceType. + Gets the services of this IncidentResourceType. The service categories list for MOS Taxonomy. - :return: The service_categories of this IncidentResourceType. + :return: The services of this IncidentResourceType. :rtype: list[oci.cims.models.ServiceCategories] """ - return self._service_categories + return self._services - @service_categories.setter - def service_categories(self, service_categories): + @services.setter + def services(self, services): """ - Sets the service_categories of this IncidentResourceType. + Sets the services of this IncidentResourceType. The service categories list for MOS Taxonomy. - :param service_categories: The service_categories of this IncidentResourceType. + :param services: The services of this IncidentResourceType. :type: list[oci.cims.models.ServiceCategories] """ - self._service_categories = service_categories + self._services = services def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/cims/models/incident_summary.py b/src/oci/cims/models/incident_summary.py index 4e838be08..cc72bd1cb 100644 --- a/src/oci/cims/models/incident_summary.py +++ b/src/oci/cims/models/incident_summary.py @@ -231,7 +231,17 @@ def incident_type(self, incident_type): def problem_type(self): """ **[Required]** Gets the problem_type of this IncidentSummary. - The kind of support ticket, such as a technical support request or a limit increase request. + The kind of support ticket (type of support request). + For information about `ACCOUNT` support tickets, see + `Creating a Billing Support Request`__. + For information about `LIMIT` support tickets, see + `Creating a Service Limit Increase Request`__. + For information about `TECH` support tickets, see + `Creating a Technical Support Request`__. + + __ https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-billing.htm + __ https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-limit.htm + __ https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-technical.htm Allowed values for this property are: "LIMIT", "LEGACY_LIMIT", "TECH", "ACCOUNT", "TAXONOMY", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -246,7 +256,17 @@ def problem_type(self): def problem_type(self, problem_type): """ Sets the problem_type of this IncidentSummary. - The kind of support ticket, such as a technical support request or a limit increase request. + The kind of support ticket (type of support request). + For information about `ACCOUNT` support tickets, see + `Creating a Billing Support Request`__. + For information about `LIMIT` support tickets, see + `Creating a Service Limit Increase Request`__. + For information about `TECH` support tickets, see + `Creating a Technical Support Request`__. + + __ https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-billing.htm + __ https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-limit.htm + __ https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-technical.htm :param problem_type: The problem_type of this IncidentSummary. diff --git a/src/oci/cims/models/item.py b/src/oci/cims/models/item.py index ec3c54e97..1289c49f4 100644 --- a/src/oci/cims/models/item.py +++ b/src/oci/cims/models/item.py @@ -102,7 +102,7 @@ def get_subtype(object_dictionary): @property def item_key(self): """ - **[Required]** Gets the item_key of this Item. + Gets the item_key of this Item. Unique identifier for the item. diff --git a/src/oci/cims/models/limit_item.py b/src/oci/cims/models/limit_item.py index b98c852c5..5c5227c12 100644 --- a/src/oci/cims/models/limit_item.py +++ b/src/oci/cims/models/limit_item.py @@ -27,6 +27,10 @@ class LimitItem(Item): #: This constant has a value of "NOT_APPROVED" LIMIT_STATUS_NOT_APPROVED = "NOT_APPROVED" + #: A constant which can be used with the limit_status property of a LimitItem. + #: This constant has a value of "REJECTED" + LIMIT_STATUS_REJECTED = "REJECTED" + def __init__(self, **kwargs): """ Initializes a new LimitItem object with values from keyword arguments. The default value of the :py:attr:`~oci.cims.models.LimitItem.type` attribute @@ -71,10 +75,14 @@ def __init__(self, **kwargs): :param limit_status: The value to assign to the limit_status property of this LimitItem. - Allowed values for this property are: "APPROVED", "PARTIALLY_APPROVED", "NOT_APPROVED", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "APPROVED", "PARTIALLY_APPROVED", "NOT_APPROVED", "REJECTED", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type limit_status: str + :param customer_message: + The value to assign to the customer_message property of this LimitItem. + :type customer_message: str + """ self.swagger_types = { 'item_key': 'str', @@ -86,7 +94,8 @@ def __init__(self, **kwargs): 'current_limit': 'int', 'current_usage': 'int', 'requested_limit': 'int', - 'limit_status': 'str' + 'limit_status': 'str', + 'customer_message': 'str' } self.attribute_map = { @@ -99,7 +108,8 @@ def __init__(self, **kwargs): 'current_limit': 'currentLimit', 'current_usage': 'currentUsage', 'requested_limit': 'requestedLimit', - 'limit_status': 'limitStatus' + 'limit_status': 'limitStatus', + 'customer_message': 'customerMessage' } self._item_key = None @@ -112,6 +122,7 @@ def __init__(self, **kwargs): self._current_usage = None self._requested_limit = None self._limit_status = None + self._customer_message = None self._type = 'limit' @property @@ -192,7 +203,7 @@ def limit_status(self): Gets the limit_status of this LimitItem. The status of the request. - Allowed values for this property are: "APPROVED", "PARTIALLY_APPROVED", "NOT_APPROVED", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "APPROVED", "PARTIALLY_APPROVED", "NOT_APPROVED", "REJECTED", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -211,11 +222,35 @@ def limit_status(self, limit_status): :param limit_status: The limit_status of this LimitItem. :type: str """ - allowed_values = ["APPROVED", "PARTIALLY_APPROVED", "NOT_APPROVED"] + allowed_values = ["APPROVED", "PARTIALLY_APPROVED", "NOT_APPROVED", "REJECTED"] if not value_allowed_none_or_none_sentinel(limit_status, allowed_values): limit_status = 'UNKNOWN_ENUM_VALUE' self._limit_status = limit_status + @property + def customer_message(self): + """ + Gets the customer_message of this LimitItem. + Message to customer for partial approval and rejected limit requests + + + :return: The customer_message of this LimitItem. + :rtype: str + """ + return self._customer_message + + @customer_message.setter + def customer_message(self, customer_message): + """ + Sets the customer_message of this LimitItem. + Message to customer for partial approval and rejected limit requests + + + :param customer_message: The customer_message of this LimitItem. + :type: str + """ + self._customer_message = customer_message + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/cims/models/service_categories.py b/src/oci/cims/models/service_categories.py index ab38b8648..7f44d83c7 100644 --- a/src/oci/cims/models/service_categories.py +++ b/src/oci/cims/models/service_categories.py @@ -20,58 +20,58 @@ def __init__(self, **kwargs): Initializes a new ServiceCategories object with values from keyword arguments. The following keyword arguments are supported (corresponding to the getters/setters of this class): - :param service_category: - The value to assign to the service_category property of this ServiceCategories. - :type service_category: dict(str, str) + :param service: + The value to assign to the service property of this ServiceCategories. + :type service: dict(str, str) :param schema: The value to assign to the schema property of this ServiceCategories. :type schema: str - :param issue_type: - The value to assign to the issue_type property of this ServiceCategories. - :type issue_type: dict(str, str) + :param sub_categories: + The value to assign to the sub_categories property of this ServiceCategories. + :type sub_categories: list[oci.cims.models.SubCategories] """ self.swagger_types = { - 'service_category': 'dict(str, str)', + 'service': 'dict(str, str)', 'schema': 'str', - 'issue_type': 'dict(str, str)' + 'sub_categories': 'list[SubCategories]' } self.attribute_map = { - 'service_category': 'serviceCategory', + 'service': 'service', 'schema': 'schema', - 'issue_type': 'issueType' + 'sub_categories': 'subCategories' } - self._service_category = None + self._service = None self._schema = None - self._issue_type = None + self._sub_categories = None @property - def service_category(self): + def service(self): """ - Gets the service_category of this ServiceCategories. + Gets the service of this ServiceCategories. Service Category list. - :return: The service_category of this ServiceCategories. + :return: The service of this ServiceCategories. :rtype: dict(str, str) """ - return self._service_category + return self._service - @service_category.setter - def service_category(self, service_category): + @service.setter + def service(self, service): """ - Sets the service_category of this ServiceCategories. + Sets the service of this ServiceCategories. Service Category list. - :param service_category: The service_category of this ServiceCategories. + :param service: The service of this ServiceCategories. :type: dict(str, str) """ - self._service_category = service_category + self._service = service @property def schema(self): @@ -98,28 +98,28 @@ def schema(self, schema): self._schema = schema @property - def issue_type(self): + def sub_categories(self): """ - Gets the issue_type of this ServiceCategories. - Issue type list. + Gets the sub_categories of this ServiceCategories. + The service categories list for MOS Taxonomy. - :return: The issue_type of this ServiceCategories. - :rtype: dict(str, str) + :return: The sub_categories of this ServiceCategories. + :rtype: list[oci.cims.models.SubCategories] """ - return self._issue_type + return self._sub_categories - @issue_type.setter - def issue_type(self, issue_type): + @sub_categories.setter + def sub_categories(self, sub_categories): """ - Sets the issue_type of this ServiceCategories. - Issue type list. + Sets the sub_categories of this ServiceCategories. + The service categories list for MOS Taxonomy. - :param issue_type: The issue_type of this ServiceCategories. - :type: dict(str, str) + :param sub_categories: The sub_categories of this ServiceCategories. + :type: list[oci.cims.models.SubCategories] """ - self._issue_type = issue_type + self._sub_categories = sub_categories def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/cims/models/service_category.py b/src/oci/cims/models/service_category.py index 4436de7d8..50f2e1f42 100644 --- a/src/oci/cims/models/service_category.py +++ b/src/oci/cims/models/service_category.py @@ -68,6 +68,10 @@ def __init__(self, **kwargs): The value to assign to the issue_type_list property of this ServiceCategory. :type issue_type_list: list[oci.cims.models.IssueType] + :param supported_subscriptions: + The value to assign to the supported_subscriptions property of this ServiceCategory. + :type supported_subscriptions: list[str] + :param scope: The value to assign to the scope property of this ServiceCategory. Allowed values for this property are: "AD", "REGION", "TENANCY", "NONE", 'UNKNOWN_ENUM_VALUE'. @@ -91,6 +95,7 @@ def __init__(self, **kwargs): 'label': 'str', 'description': 'str', 'issue_type_list': 'list[IssueType]', + 'supported_subscriptions': 'list[str]', 'scope': 'str', 'unit': 'str', 'limit_id': 'str' @@ -102,6 +107,7 @@ def __init__(self, **kwargs): 'label': 'label', 'description': 'description', 'issue_type_list': 'issueTypeList', + 'supported_subscriptions': 'supportedSubscriptions', 'scope': 'scope', 'unit': 'unit', 'limit_id': 'limitId' @@ -112,6 +118,7 @@ def __init__(self, **kwargs): self._label = None self._description = None self._issue_type_list = None + self._supported_subscriptions = None self._scope = None self._unit = None self._limit_id = None @@ -236,6 +243,30 @@ def issue_type_list(self, issue_type_list): """ self._issue_type_list = issue_type_list + @property + def supported_subscriptions(self): + """ + Gets the supported_subscriptions of this ServiceCategory. + List of supported subscriptions + + + :return: The supported_subscriptions of this ServiceCategory. + :rtype: list[str] + """ + return self._supported_subscriptions + + @supported_subscriptions.setter + def supported_subscriptions(self, supported_subscriptions): + """ + Sets the supported_subscriptions of this ServiceCategory. + List of supported subscriptions + + + :param supported_subscriptions: The supported_subscriptions of this ServiceCategory. + :type: list[str] + """ + self._supported_subscriptions = supported_subscriptions + @property def scope(self): """ diff --git a/src/oci/cims/models/sub_categories.py b/src/oci/cims/models/sub_categories.py new file mode 100644 index 000000000..874fa4318 --- /dev/null +++ b/src/oci/cims/models/sub_categories.py @@ -0,0 +1,165 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20181231 + + +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 SubCategories(object): + """ + List of subcategories under a service. + """ + + def __init__(self, **kwargs): + """ + Initializes a new SubCategories object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param service_category: + The value to assign to the service_category property of this SubCategories. + :type service_category: dict(str, str) + + :param schema: + The value to assign to the schema property of this SubCategories. + :type schema: str + + :param has_sub_category: + The value to assign to the has_sub_category property of this SubCategories. + :type has_sub_category: str + + :param sub_components: + The value to assign to the sub_components property of this SubCategories. + :type sub_components: list[oci.cims.models.SubComponents] + + """ + self.swagger_types = { + 'service_category': 'dict(str, str)', + 'schema': 'str', + 'has_sub_category': 'str', + 'sub_components': 'list[SubComponents]' + } + + self.attribute_map = { + 'service_category': 'serviceCategory', + 'schema': 'schema', + 'has_sub_category': 'hasSubCategory', + 'sub_components': 'subComponents' + } + + self._service_category = None + self._schema = None + self._has_sub_category = None + self._sub_components = None + + @property + def service_category(self): + """ + Gets the service_category of this SubCategories. + Subcategory list. + + + :return: The service_category of this SubCategories. + :rtype: dict(str, str) + """ + return self._service_category + + @service_category.setter + def service_category(self, service_category): + """ + Sets the service_category of this SubCategories. + Subcategory list. + + + :param service_category: The service_category of this SubCategories. + :type: dict(str, str) + """ + self._service_category = service_category + + @property + def schema(self): + """ + Gets the schema of this SubCategories. + Schema of a subcategory. + + + :return: The schema of this SubCategories. + :rtype: str + """ + return self._schema + + @schema.setter + def schema(self, schema): + """ + Sets the schema of this SubCategories. + Schema of a subcategory. + + + :param schema: The schema of this SubCategories. + :type: str + """ + self._schema = schema + + @property + def has_sub_category(self): + """ + Gets the has_sub_category of this SubCategories. + Flag to identify if subComponent is present + + + :return: The has_sub_category of this SubCategories. + :rtype: str + """ + return self._has_sub_category + + @has_sub_category.setter + def has_sub_category(self, has_sub_category): + """ + Sets the has_sub_category of this SubCategories. + Flag to identify if subComponent is present + + + :param has_sub_category: The has_sub_category of this SubCategories. + :type: str + """ + self._has_sub_category = has_sub_category + + @property + def sub_components(self): + """ + Gets the sub_components of this SubCategories. + The sub component list for MOS Taxonomy. + + + :return: The sub_components of this SubCategories. + :rtype: list[oci.cims.models.SubComponents] + """ + return self._sub_components + + @sub_components.setter + def sub_components(self, sub_components): + """ + Sets the sub_components of this SubCategories. + The sub component list for MOS Taxonomy. + + + :param sub_components: The sub_components of this SubCategories. + :type: list[oci.cims.models.SubComponents] + """ + self._sub_components = sub_components + + 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/cims/models/sub_components.py b/src/oci/cims/models/sub_components.py new file mode 100644 index 000000000..dd60123e6 --- /dev/null +++ b/src/oci/cims/models/sub_components.py @@ -0,0 +1,103 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20181231 + + +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 SubComponents(object): + """ + List of subcomponents under a subcategory. + """ + + def __init__(self, **kwargs): + """ + Initializes a new SubComponents object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param sub_category: + The value to assign to the sub_category property of this SubComponents. + :type sub_category: dict(str, str) + + :param schema: + The value to assign to the schema property of this SubComponents. + :type schema: str + + """ + self.swagger_types = { + 'sub_category': 'dict(str, str)', + 'schema': 'str' + } + + self.attribute_map = { + 'sub_category': 'subCategory', + 'schema': 'schema' + } + + self._sub_category = None + self._schema = None + + @property + def sub_category(self): + """ + Gets the sub_category of this SubComponents. + Subcategory list. + + + :return: The sub_category of this SubComponents. + :rtype: dict(str, str) + """ + return self._sub_category + + @sub_category.setter + def sub_category(self, sub_category): + """ + Sets the sub_category of this SubComponents. + Subcategory list. + + + :param sub_category: The sub_category of this SubComponents. + :type: dict(str, str) + """ + self._sub_category = sub_category + + @property + def schema(self): + """ + Gets the schema of this SubComponents. + Schema of a subcategory. + + + :return: The schema of this SubComponents. + :rtype: str + """ + return self._schema + + @schema.setter + def schema(self, schema): + """ + Sets the schema of this SubComponents. + Schema of a subcategory. + + + :param schema: The schema of this SubComponents. + :type: str + """ + self._schema = schema + + 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/cims/models/subscription_info.py b/src/oci/cims/models/subscription_info.py new file mode 100644 index 000000000..bf56a28c8 --- /dev/null +++ b/src/oci/cims/models/subscription_info.py @@ -0,0 +1,103 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20181231 + + +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 SubscriptionInfo(object): + """ + SubscriptionInfo model. + """ + + def __init__(self, **kwargs): + """ + Initializes a new SubscriptionInfo object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param csi: + The value to assign to the csi property of this SubscriptionInfo. + :type csi: str + + :param subscription_type: + The value to assign to the subscription_type property of this SubscriptionInfo. + :type subscription_type: str + + """ + self.swagger_types = { + 'csi': 'str', + 'subscription_type': 'str' + } + + self.attribute_map = { + 'csi': 'csi', + 'subscription_type': 'subscriptionType' + } + + self._csi = None + self._subscription_type = None + + @property + def csi(self): + """ + Gets the csi of this SubscriptionInfo. + customer support identifier issued for a subscription + + + :return: The csi of this SubscriptionInfo. + :rtype: str + """ + return self._csi + + @csi.setter + def csi(self, csi): + """ + Sets the csi of this SubscriptionInfo. + customer support identifier issued for a subscription + + + :param csi: The csi of this SubscriptionInfo. + :type: str + """ + self._csi = csi + + @property + def subscription_type(self): + """ + Gets the subscription_type of this SubscriptionInfo. + subscription type of customer which determines payment profile + + + :return: The subscription_type of this SubscriptionInfo. + :rtype: str + """ + return self._subscription_type + + @subscription_type.setter + def subscription_type(self, subscription_type): + """ + Sets the subscription_type of this SubscriptionInfo. + subscription type of customer which determines payment profile + + + :param subscription_type: The subscription_type of this SubscriptionInfo. + :type: str + """ + self._subscription_type = subscription_type + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/cims/models/ticket.py b/src/oci/cims/models/ticket.py index 8a07c3e72..3d08cfe4a 100644 --- a/src/oci/cims/models/ticket.py +++ b/src/oci/cims/models/ticket.py @@ -267,7 +267,7 @@ def description(self, description): def time_created(self): """ Gets the time_created of this Ticket. - The time when the ticket was created, in milliseconds since epoch time. + The time when the ticket was created, in seconds since epoch time. :return: The time_created of this Ticket. @@ -279,7 +279,7 @@ def time_created(self): def time_created(self, time_created): """ Sets the time_created of this Ticket. - The time when the ticket was created, in milliseconds since epoch time. + The time when the ticket was created, in seconds since epoch time. :param time_created: The time_created of this Ticket. @@ -291,7 +291,7 @@ def time_created(self, time_created): def time_updated(self): """ Gets the time_updated of this Ticket. - The time when the ticket was updated, in milliseconds since epoch time. + The time when the ticket was updated, in seconds since epoch time. :return: The time_updated of this Ticket. @@ -303,7 +303,7 @@ def time_updated(self): def time_updated(self, time_updated): """ Sets the time_updated of this Ticket. - The time when the ticket was updated, in milliseconds since epoch time. + The time when the ticket was updated, in seconds since epoch time. :param time_updated: The time_updated of this Ticket. diff --git a/src/oci/cims/models/update_incident.py b/src/oci/cims/models/update_incident.py index a58b2b725..c7cf31dbe 100644 --- a/src/oci/cims/models/update_incident.py +++ b/src/oci/cims/models/update_incident.py @@ -87,7 +87,17 @@ def ticket(self, ticket): def problem_type(self): """ Gets the problem_type of this UpdateIncident. - The kind of support ticket, such as a technical support request or a limit increase request. + The kind of support ticket (type of support request). + For information about `ACCOUNT` support tickets, see + `Creating a Billing Support Request`__. + For information about `LIMIT` support tickets, see + `Creating a Service Limit Increase Request`__. + For information about `TECH` support tickets, see + `Creating a Technical Support Request`__. + + __ https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-billing.htm + __ https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-limit.htm + __ https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-technical.htm Allowed values for this property are: "LIMIT", "LEGACY_LIMIT", "TECH", "ACCOUNT", "TAXONOMY" @@ -101,7 +111,17 @@ def problem_type(self): def problem_type(self, problem_type): """ Sets the problem_type of this UpdateIncident. - The kind of support ticket, such as a technical support request or a limit increase request. + The kind of support ticket (type of support request). + For information about `ACCOUNT` support tickets, see + `Creating a Billing Support Request`__. + For information about `LIMIT` support tickets, see + `Creating a Service Limit Increase Request`__. + For information about `TECH` support tickets, see + `Creating a Technical Support Request`__. + + __ https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-billing.htm + __ https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-limit.htm + __ https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-technical.htm :param problem_type: The problem_type of this UpdateIncident. diff --git a/src/oci/cims/models/user.py b/src/oci/cims/models/user.py index cd5e117c6..698d864da 100644 --- a/src/oci/cims/models/user.py +++ b/src/oci/cims/models/user.py @@ -370,7 +370,17 @@ def contact_email(self, contact_email): def problem_type(self): """ Gets the problem_type of this User. - The kind of support ticket, such as a technical support request or a limit increase request. + The kind of support ticket (type of support request). + For information about `ACCOUNT` support tickets, see + `Creating a Billing Support Request`__. + For information about `LIMIT` support tickets, see + `Creating a Service Limit Increase Request`__. + For information about `TECH` support tickets, see + `Creating a Technical Support Request`__. + + __ https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-billing.htm + __ https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-limit.htm + __ https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-technical.htm Allowed values for this property are: "LIMIT", "LEGACY_LIMIT", "TECH", "ACCOUNT", "TAXONOMY" @@ -384,7 +394,17 @@ def problem_type(self): def problem_type(self, problem_type): """ Sets the problem_type of this User. - The kind of support ticket, such as a technical support request or a limit increase request. + The kind of support ticket (type of support request). + For information about `ACCOUNT` support tickets, see + `Creating a Billing Support Request`__. + For information about `LIMIT` support tickets, see + `Creating a Service Limit Increase Request`__. + For information about `TECH` support tickets, see + `Creating a Technical Support Request`__. + + __ https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-billing.htm + __ https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-limit.htm + __ https://docs.cloud.oracle.com/iaas/Content/GSG/support/create-incident-technical.htm :param problem_type: The problem_type of this User. diff --git a/src/oci/circuit_breaker/__init__.py b/src/oci/circuit_breaker/__init__.py index 828ca591b..7878babeb 100644 --- a/src/oci/circuit_breaker/__init__.py +++ b/src/oci/circuit_breaker/__init__.py @@ -6,6 +6,30 @@ import os import logging +logger = logging.getLogger(name=__name__) + +# Default Circuit Breaker for the X509 calls which has the following values configured by default. +# Detailed information on Circuit Breakers and their configuration can be found at the +# link (https://oracle-cloud-infrastructure-python-sdk.readthedocs.io/en/latest/sdk_behaviors/circuit_breakers.html) +# +# * failure_threshold - 3 +# * failure_statuses_and_codes +# - HTTP 409/IncorrectState +# - HTTP 429 +# - HTTP 500 +# - HTTP 502 +# - HTTP 503 +# - HTTP 504 +# +DEFAULT_FEDERATION_CLIENT_CIRCUIT_BREAKER_STRATEGY = CircuitBreakerStrategy(failure_threshold=3) +GLOBAL_FEDERATION_CLIENT_CIRCUIT_BREAKER_STRATEGY = None +if os.environ.get('OCI_SDK_AUTH_CLIENT_CIRCUIT_BREAKER_ENABLED', 'true').lower() == 'true': + logger.info('Default Auth client Circuit breaker strategy enabled') + GLOBAL_FEDERATION_CLIENT_CIRCUIT_BREAKER_STRATEGY = DEFAULT_FEDERATION_CLIENT_CIRCUIT_BREAKER_STRATEGY +else: + logger.info('Default Auth client Circuit breaker strategy disabled') + GLOBAL_FEDERATION_CLIENT_CIRCUIT_BREAKER_STRATEGY = NoCircuitBreakerStrategy() + #: Default Circuit Breaker Strategy provided for convenience which has the following values configured by default. #: Detailed information on Circuit Breakers and their configuration can be found at the #: link (https://oracle-cloud-infrastructure-python-sdk.readthedocs.io/en/latest/sdk_behaviors/circuit_breakers.html) @@ -23,8 +47,6 @@ #: DEFAULT_CIRCUIT_BREAKER_STRATEGY = CircuitBreakerStrategy() -logger = logging.getLogger(name=__name__) - #: A Circuit Breaker strategy which can be set by the user to modify the SDK retry behavior globally. Initially set to ``None``, users #: can pass to it a Circuit Breaker Strategy which can be:- #: diff --git a/src/oci/circuit_breaker/circuit_breaker.py b/src/oci/circuit_breaker/circuit_breaker.py index 1bf9ad506..fe02ccccd 100644 --- a/src/oci/circuit_breaker/circuit_breaker.py +++ b/src/oci/circuit_breaker/circuit_breaker.py @@ -3,7 +3,9 @@ # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. # Contains classes for defining and building circuit breaker strategies. +from circuitbreaker import CircuitBreaker import logging +import uuid from oci.exceptions import TransientServiceError logger = logging.getLogger(__name__) @@ -67,7 +69,7 @@ def __init__(self, **kwargs): self.expected_exception = TransientServiceError self.failure_statuses_and_codes = kwargs.get('failure_statuses_and_codes', DEFAULT_CIRCUIT_BREAKER_FAILURE_STATUSES_AND_CODES) - self.name = kwargs.get('name', None) + self.name = kwargs.get('name', str(uuid.uuid4())) def is_transient_error(self, status_code, service_code): logger.debug('Is transient error status code:{} error code:{}'.format(status_code, service_code)) @@ -80,6 +82,14 @@ def is_transient_error(self, status_code, service_code): 'status code:{} not in failure_statuses_and_codes:{}'.format(status_code, self.failure_statuses_and_codes)) return False + def get_circuit_breaker(self): + return CircuitBreaker( + failure_threshold=self.failure_threshold, + recovery_timeout=self.recovery_timeout, + expected_exception=self.expected_exception, + name=self.name + ) + class NoCircuitBreakerStrategy(object): """ diff --git a/src/oci/data_flow/data_flow_client.py b/src/oci/data_flow/data_flow_client.py index 730a18780..e0327c907 100644 --- a/src/oci/data_flow/data_flow_client.py +++ b/src/oci/data_flow/data_flow_client.py @@ -3491,7 +3491,7 @@ def list_sql_endpoints(self, **kwargs): :param str lifecycle_state: (optional) A filter to return only those resources whose sqlEndpointLifecycleState matches the given sqlEndpointLifecycleState. - Allowed values are: "CREATING", "ACTIVE", "DELETING", "DELETED", "FAILED", "UPDATING", "NEEDS_ATTENTION" + Allowed values are: "CREATING", "ACTIVE", "DELETING", "DELETED", "FAILED", "UPDATING", "NEEDS_ATTENTION", "INACTIVE" :param str display_name: (optional) The query parameter for the Spark application name. @@ -3561,7 +3561,7 @@ def list_sql_endpoints(self, **kwargs): f"list_sql_endpoints got unknown kwargs: {extra_kwargs!r}") if 'lifecycle_state' in kwargs: - lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "DELETING", "DELETED", "FAILED", "UPDATING", "NEEDS_ATTENTION"] + lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "DELETING", "DELETED", "FAILED", "UPDATING", "NEEDS_ATTENTION", "INACTIVE"] if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: raise ValueError( f"Invalid value for `lifecycle_state`, must be one of { lifecycle_state_allowed_values }" @@ -4242,6 +4242,119 @@ def start_pool(self, pool_id, **kwargs): api_reference_link=api_reference_link, required_arguments=required_arguments) + def start_sql_endpoint(self, sql_endpoint_id, **kwargs): + """ + Starts the SqlEndpoint for a given `SqlEndpointId`. When provided, If-Match is checked against ETag values of the resource. + + + :param str sql_endpoint_id: (required) + The unique id of the SQL Endpoint. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call for a resource, + set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + + :param str opc_request_id: (optional) + Unique identifier for the request. If provided, the returned request ID will include this value. + Otherwise, a random request ID will be generated by the service. + + :param str opc_retry_token: (optional) + A token that uniquely identifies a request so it can be retried in case of a timeout or server error + without risk of executing that same action again. Retry tokens expire after 24 hours, + but can be invalidated before then due to conflicting operations. + 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. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type None + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use start_sql_endpoint API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['sqlEndpointId'] + resource_path = "/sqlEndpoints/{sqlEndpointId}/actions/start" + method = "POST" + operation_name = "start_sql_endpoint" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-flow/20200129/SqlEndpoint/StartSqlEndpoint" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "if_match", + "opc_request_id", + "opc_retry_token" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + f"start_sql_endpoint got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "sqlEndpointId": sql_endpoint_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "opc-request-id": kwargs.get("opc_request_id", missing), + "opc-retry-token": kwargs.get("opc_retry_token", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + if retry_strategy is None: + retry_strategy = retry.DEFAULT_RETRY_STRATEGY + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + def stop_pool(self, pool_id, **kwargs): """ Stops the dataflow pool for a given `poolId`. When provided, If-Match is checked against ETag values of the resource. @@ -4355,6 +4468,119 @@ def stop_pool(self, pool_id, **kwargs): api_reference_link=api_reference_link, required_arguments=required_arguments) + def stop_sql_endpoint(self, sql_endpoint_id, **kwargs): + """ + Stops the SqlEndpoint for a given `SqlEndpointId`. When provided, If-Match is checked against ETag values of the resource. + + + :param str sql_endpoint_id: (required) + The unique id of the SQL Endpoint. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call for a resource, + set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + + :param str opc_request_id: (optional) + Unique identifier for the request. If provided, the returned request ID will include this value. + Otherwise, a random request ID will be generated by the service. + + :param str opc_retry_token: (optional) + A token that uniquely identifies a request so it can be retried in case of a timeout or server error + without risk of executing that same action again. Retry tokens expire after 24 hours, + but can be invalidated before then due to conflicting operations. + 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. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type None + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use stop_sql_endpoint API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['sqlEndpointId'] + resource_path = "/sqlEndpoints/{sqlEndpointId}/actions/stop" + method = "POST" + operation_name = "stop_sql_endpoint" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-flow/20200129/SqlEndpoint/StopSqlEndpoint" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "if_match", + "opc_request_id", + "opc_retry_token" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + f"stop_sql_endpoint got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "sqlEndpointId": sql_endpoint_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "opc-request-id": kwargs.get("opc_request_id", missing), + "opc-retry-token": kwargs.get("opc_retry_token", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + if retry_strategy is None: + retry_strategy = retry.DEFAULT_RETRY_STRATEGY + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + def update_application(self, update_application_details, application_id, **kwargs): """ Updates an application using an `applicationId`. diff --git a/src/oci/data_flow/data_flow_client_composite_operations.py b/src/oci/data_flow/data_flow_client_composite_operations.py index a0eaf1b1f..1e1cb47cf 100644 --- a/src/oci/data_flow/data_flow_client_composite_operations.py +++ b/src/oci/data_flow/data_flow_client_composite_operations.py @@ -665,6 +665,45 @@ def start_pool_and_wait_for_state(self, pool_id, wait_for_states=[], operation_k except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def start_sql_endpoint_and_wait_for_state(self, sql_endpoint_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_flow.DataFlowClient.start_sql_endpoint` and waits for the :py:class:`~oci.data_flow.models.WorkRequest` + to enter the given state(s). + + :param str sql_endpoint_id: (required) + The unique id of the SQL Endpoint. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_flow.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_flow.DataFlowClient.start_sql_endpoint` + + :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_sql_endpoint(sql_endpoint_id, **operation_kwargs) + if not wait_for_states: + return operation_result + lowered_wait_for_states = [w.lower() for w in wait_for_states] + if 'opc-work-request-id' not in operation_result.headers: + return operation_result + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def stop_pool_and_wait_for_state(self, pool_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ Calls :py:func:`~oci.data_flow.DataFlowClient.stop_pool` and waits for the :py:class:`~oci.data_flow.models.WorkRequest` @@ -704,6 +743,45 @@ def stop_pool_and_wait_for_state(self, pool_id, wait_for_states=[], operation_kw except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def stop_sql_endpoint_and_wait_for_state(self, sql_endpoint_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_flow.DataFlowClient.stop_sql_endpoint` and waits for the :py:class:`~oci.data_flow.models.WorkRequest` + to enter the given state(s). + + :param str sql_endpoint_id: (required) + The unique id of the SQL Endpoint. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_flow.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_flow.DataFlowClient.stop_sql_endpoint` + + :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_sql_endpoint(sql_endpoint_id, **operation_kwargs) + if not wait_for_states: + return operation_result + lowered_wait_for_states = [w.lower() for w in wait_for_states] + if 'opc-work-request-id' not in operation_result.headers: + return operation_result + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def update_application_and_wait_for_state(self, update_application_details, application_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ Calls :py:func:`~oci.data_flow.DataFlowClient.update_application` and waits for the :py:class:`~oci.data_flow.models.Application` acted upon diff --git a/src/oci/data_flow/models/sql_endpoint.py b/src/oci/data_flow/models/sql_endpoint.py index ee194d8fd..1d481f17d 100644 --- a/src/oci/data_flow/models/sql_endpoint.py +++ b/src/oci/data_flow/models/sql_endpoint.py @@ -43,6 +43,10 @@ class SqlEndpoint(object): #: This constant has a value of "NEEDS_ATTENTION" LIFECYCLE_STATE_NEEDS_ATTENTION = "NEEDS_ATTENTION" + #: A constant which can be used with the lifecycle_state property of a SqlEndpoint. + #: This constant has a value of "INACTIVE" + LIFECYCLE_STATE_INACTIVE = "INACTIVE" + def __init__(self, **kwargs): """ Initializes a new SqlEndpoint object with values from keyword arguments. @@ -74,7 +78,7 @@ def __init__(self, **kwargs): :param lifecycle_state: The value to assign to the lifecycle_state property of this SqlEndpoint. - Allowed values for this property are: "CREATING", "ACTIVE", "DELETING", "DELETED", "FAILED", "UPDATING", "NEEDS_ATTENTION", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "CREATING", "ACTIVE", "DELETING", "DELETED", "FAILED", "UPDATING", "NEEDS_ATTENTION", "INACTIVE", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type lifecycle_state: str @@ -390,7 +394,7 @@ def lifecycle_state(self): Gets the lifecycle_state of this SqlEndpoint. The current state of the Sql Endpoint. - Allowed values for this property are: "CREATING", "ACTIVE", "DELETING", "DELETED", "FAILED", "UPDATING", "NEEDS_ATTENTION", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "CREATING", "ACTIVE", "DELETING", "DELETED", "FAILED", "UPDATING", "NEEDS_ATTENTION", "INACTIVE", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -409,7 +413,7 @@ def lifecycle_state(self, lifecycle_state): :param lifecycle_state: The lifecycle_state of this SqlEndpoint. :type: str """ - allowed_values = ["CREATING", "ACTIVE", "DELETING", "DELETED", "FAILED", "UPDATING", "NEEDS_ATTENTION"] + allowed_values = ["CREATING", "ACTIVE", "DELETING", "DELETED", "FAILED", "UPDATING", "NEEDS_ATTENTION", "INACTIVE"] if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): lifecycle_state = 'UNKNOWN_ENUM_VALUE' self._lifecycle_state = lifecycle_state diff --git a/src/oci/data_flow/models/sql_endpoint_summary.py b/src/oci/data_flow/models/sql_endpoint_summary.py index a03ebf196..468196044 100644 --- a/src/oci/data_flow/models/sql_endpoint_summary.py +++ b/src/oci/data_flow/models/sql_endpoint_summary.py @@ -43,6 +43,10 @@ class SqlEndpointSummary(object): #: This constant has a value of "NEEDS_ATTENTION" LIFECYCLE_STATE_NEEDS_ATTENTION = "NEEDS_ATTENTION" + #: A constant which can be used with the lifecycle_state property of a SqlEndpointSummary. + #: This constant has a value of "INACTIVE" + LIFECYCLE_STATE_INACTIVE = "INACTIVE" + def __init__(self, **kwargs): """ Initializes a new SqlEndpointSummary object with values from keyword arguments. @@ -74,7 +78,7 @@ def __init__(self, **kwargs): :param lifecycle_state: The value to assign to the lifecycle_state property of this SqlEndpointSummary. - Allowed values for this property are: "CREATING", "ACTIVE", "DELETING", "DELETED", "FAILED", "UPDATING", "NEEDS_ATTENTION", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "CREATING", "ACTIVE", "DELETING", "DELETED", "FAILED", "UPDATING", "NEEDS_ATTENTION", "INACTIVE", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type lifecycle_state: str @@ -390,7 +394,7 @@ def lifecycle_state(self): Gets the lifecycle_state of this SqlEndpointSummary. The current state of the Sql Endpoint. - Allowed values for this property are: "CREATING", "ACTIVE", "DELETING", "DELETED", "FAILED", "UPDATING", "NEEDS_ATTENTION", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "CREATING", "ACTIVE", "DELETING", "DELETED", "FAILED", "UPDATING", "NEEDS_ATTENTION", "INACTIVE", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -409,7 +413,7 @@ def lifecycle_state(self, lifecycle_state): :param lifecycle_state: The lifecycle_state of this SqlEndpointSummary. :type: str """ - allowed_values = ["CREATING", "ACTIVE", "DELETING", "DELETED", "FAILED", "UPDATING", "NEEDS_ATTENTION"] + allowed_values = ["CREATING", "ACTIVE", "DELETING", "DELETED", "FAILED", "UPDATING", "NEEDS_ATTENTION", "INACTIVE"] if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): lifecycle_state = 'UNKNOWN_ENUM_VALUE' self._lifecycle_state = lifecycle_state diff --git a/src/oci/data_flow/models/update_sql_endpoint_details.py b/src/oci/data_flow/models/update_sql_endpoint_details.py index ba5b071b8..5bcbb2570 100644 --- a/src/oci/data_flow/models/update_sql_endpoint_details.py +++ b/src/oci/data_flow/models/update_sql_endpoint_details.py @@ -12,7 +12,7 @@ @init_model_state_from_kwargs class UpdateSqlEndpointDetails(object): """ - Currently only the tags of a SQL Endpoint can be updated. + The information about all updatable parameters of a SQL Endpoint. """ def __init__(self, **kwargs): @@ -28,19 +28,96 @@ def __init__(self, **kwargs): The value to assign to the freeform_tags property of this UpdateSqlEndpointDetails. :type freeform_tags: dict(str, str) + :param display_name: + The value to assign to the display_name property of this UpdateSqlEndpointDetails. + :type display_name: str + + :param description: + The value to assign to the description property of this UpdateSqlEndpointDetails. + :type description: str + + :param driver_shape: + The value to assign to the driver_shape property of this UpdateSqlEndpointDetails. + :type driver_shape: str + + :param driver_shape_config: + The value to assign to the driver_shape_config property of this UpdateSqlEndpointDetails. + :type driver_shape_config: oci.data_flow.models.ShapeConfig + + :param executor_shape: + The value to assign to the executor_shape property of this UpdateSqlEndpointDetails. + :type executor_shape: str + + :param executor_shape_config: + The value to assign to the executor_shape_config property of this UpdateSqlEndpointDetails. + :type executor_shape_config: oci.data_flow.models.ShapeConfig + + :param min_executor_count: + The value to assign to the min_executor_count property of this UpdateSqlEndpointDetails. + :type min_executor_count: int + + :param max_executor_count: + The value to assign to the max_executor_count property of this UpdateSqlEndpointDetails. + :type max_executor_count: int + + :param metastore_id: + The value to assign to the metastore_id property of this UpdateSqlEndpointDetails. + :type metastore_id: str + + :param lake_id: + The value to assign to the lake_id property of this UpdateSqlEndpointDetails. + :type lake_id: str + + :param spark_advanced_configurations: + The value to assign to the spark_advanced_configurations property of this UpdateSqlEndpointDetails. + :type spark_advanced_configurations: dict(str, str) + """ self.swagger_types = { 'defined_tags': 'dict(str, dict(str, object))', - 'freeform_tags': 'dict(str, str)' + 'freeform_tags': 'dict(str, str)', + 'display_name': 'str', + 'description': 'str', + 'driver_shape': 'str', + 'driver_shape_config': 'ShapeConfig', + 'executor_shape': 'str', + 'executor_shape_config': 'ShapeConfig', + 'min_executor_count': 'int', + 'max_executor_count': 'int', + 'metastore_id': 'str', + 'lake_id': 'str', + 'spark_advanced_configurations': 'dict(str, str)' } self.attribute_map = { 'defined_tags': 'definedTags', - 'freeform_tags': 'freeformTags' + 'freeform_tags': 'freeformTags', + 'display_name': 'displayName', + 'description': 'description', + 'driver_shape': 'driverShape', + 'driver_shape_config': 'driverShapeConfig', + 'executor_shape': 'executorShape', + 'executor_shape_config': 'executorShapeConfig', + 'min_executor_count': 'minExecutorCount', + 'max_executor_count': 'maxExecutorCount', + 'metastore_id': 'metastoreId', + 'lake_id': 'lakeId', + 'spark_advanced_configurations': 'sparkAdvancedConfigurations' } self._defined_tags = None self._freeform_tags = None + self._display_name = None + self._description = None + self._driver_shape = None + self._driver_shape_config = None + self._executor_shape = None + self._executor_shape_config = None + self._min_executor_count = None + self._max_executor_count = None + self._metastore_id = None + self._lake_id = None + self._spark_advanced_configurations = None @property def defined_tags(self): @@ -104,6 +181,270 @@ def freeform_tags(self, freeform_tags): """ self._freeform_tags = freeform_tags + @property + def display_name(self): + """ + Gets the display_name of this UpdateSqlEndpointDetails. + The SQL Endpoint name, which can be changed. + + + :return: The display_name of this UpdateSqlEndpointDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this UpdateSqlEndpointDetails. + The SQL Endpoint name, which can be changed. + + + :param display_name: The display_name of this UpdateSqlEndpointDetails. + :type: str + """ + self._display_name = display_name + + @property + def description(self): + """ + Gets the description of this UpdateSqlEndpointDetails. + The description of CreateSQLEndpointDetails. + + + :return: The description of this UpdateSqlEndpointDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this UpdateSqlEndpointDetails. + The description of CreateSQLEndpointDetails. + + + :param description: The description of this UpdateSqlEndpointDetails. + :type: str + """ + self._description = description + + @property + def driver_shape(self): + """ + Gets the driver_shape of this UpdateSqlEndpointDetails. + The shape of the SQL Endpoint driver instance. + + + :return: The driver_shape of this UpdateSqlEndpointDetails. + :rtype: str + """ + return self._driver_shape + + @driver_shape.setter + def driver_shape(self, driver_shape): + """ + Sets the driver_shape of this UpdateSqlEndpointDetails. + The shape of the SQL Endpoint driver instance. + + + :param driver_shape: The driver_shape of this UpdateSqlEndpointDetails. + :type: str + """ + self._driver_shape = driver_shape + + @property + def driver_shape_config(self): + """ + Gets the driver_shape_config of this UpdateSqlEndpointDetails. + + :return: The driver_shape_config of this UpdateSqlEndpointDetails. + :rtype: oci.data_flow.models.ShapeConfig + """ + return self._driver_shape_config + + @driver_shape_config.setter + def driver_shape_config(self, driver_shape_config): + """ + Sets the driver_shape_config of this UpdateSqlEndpointDetails. + + :param driver_shape_config: The driver_shape_config of this UpdateSqlEndpointDetails. + :type: oci.data_flow.models.ShapeConfig + """ + self._driver_shape_config = driver_shape_config + + @property + def executor_shape(self): + """ + Gets the executor_shape of this UpdateSqlEndpointDetails. + The shape of the SQL Endpoint worker instance. + + + :return: The executor_shape of this UpdateSqlEndpointDetails. + :rtype: str + """ + return self._executor_shape + + @executor_shape.setter + def executor_shape(self, executor_shape): + """ + Sets the executor_shape of this UpdateSqlEndpointDetails. + The shape of the SQL Endpoint worker instance. + + + :param executor_shape: The executor_shape of this UpdateSqlEndpointDetails. + :type: str + """ + self._executor_shape = executor_shape + + @property + def executor_shape_config(self): + """ + Gets the executor_shape_config of this UpdateSqlEndpointDetails. + + :return: The executor_shape_config of this UpdateSqlEndpointDetails. + :rtype: oci.data_flow.models.ShapeConfig + """ + return self._executor_shape_config + + @executor_shape_config.setter + def executor_shape_config(self, executor_shape_config): + """ + Sets the executor_shape_config of this UpdateSqlEndpointDetails. + + :param executor_shape_config: The executor_shape_config of this UpdateSqlEndpointDetails. + :type: oci.data_flow.models.ShapeConfig + """ + self._executor_shape_config = executor_shape_config + + @property + def min_executor_count(self): + """ + Gets the min_executor_count of this UpdateSqlEndpointDetails. + The minimum number of executors. + + + :return: The min_executor_count of this UpdateSqlEndpointDetails. + :rtype: int + """ + return self._min_executor_count + + @min_executor_count.setter + def min_executor_count(self, min_executor_count): + """ + Sets the min_executor_count of this UpdateSqlEndpointDetails. + The minimum number of executors. + + + :param min_executor_count: The min_executor_count of this UpdateSqlEndpointDetails. + :type: int + """ + self._min_executor_count = min_executor_count + + @property + def max_executor_count(self): + """ + Gets the max_executor_count of this UpdateSqlEndpointDetails. + The maximum number of executors. + + + :return: The max_executor_count of this UpdateSqlEndpointDetails. + :rtype: int + """ + return self._max_executor_count + + @max_executor_count.setter + def max_executor_count(self, max_executor_count): + """ + Sets the max_executor_count of this UpdateSqlEndpointDetails. + The maximum number of executors. + + + :param max_executor_count: The max_executor_count of this UpdateSqlEndpointDetails. + :type: int + """ + self._max_executor_count = max_executor_count + + @property + def metastore_id(self): + """ + Gets the metastore_id of this UpdateSqlEndpointDetails. + Metastore OCID + + + :return: The metastore_id of this UpdateSqlEndpointDetails. + :rtype: str + """ + return self._metastore_id + + @metastore_id.setter + def metastore_id(self, metastore_id): + """ + Sets the metastore_id of this UpdateSqlEndpointDetails. + Metastore OCID + + + :param metastore_id: The metastore_id of this UpdateSqlEndpointDetails. + :type: str + """ + self._metastore_id = metastore_id + + @property + def lake_id(self): + """ + Gets the lake_id of this UpdateSqlEndpointDetails. + OCI lake OCID + + + :return: The lake_id of this UpdateSqlEndpointDetails. + :rtype: str + """ + return self._lake_id + + @lake_id.setter + def lake_id(self, lake_id): + """ + Sets the lake_id of this UpdateSqlEndpointDetails. + OCI lake OCID + + + :param lake_id: The lake_id of this UpdateSqlEndpointDetails. + :type: str + """ + self._lake_id = lake_id + + @property + def spark_advanced_configurations(self): + """ + Gets the spark_advanced_configurations of this UpdateSqlEndpointDetails. + The Spark configuration passed to the running process. + See https://spark.apache.org/docs/latest/configuration.html#available-properties. + Example: { \"spark.app.name\" : \"My App Name\", \"spark.shuffle.io.maxRetries\" : \"4\" } + Note: Not all Spark properties are permitted to be set. Attempting to set a property that is + not allowed to be overwritten will cause a 400 status to be returned. + + + :return: The spark_advanced_configurations of this UpdateSqlEndpointDetails. + :rtype: dict(str, str) + """ + return self._spark_advanced_configurations + + @spark_advanced_configurations.setter + def spark_advanced_configurations(self, spark_advanced_configurations): + """ + Sets the spark_advanced_configurations of this UpdateSqlEndpointDetails. + The Spark configuration passed to the running process. + See https://spark.apache.org/docs/latest/configuration.html#available-properties. + Example: { \"spark.app.name\" : \"My App Name\", \"spark.shuffle.io.maxRetries\" : \"4\" } + Note: Not all Spark properties are permitted to be set. Attempting to set a property that is + not allowed to be overwritten will cause a 400 status to be returned. + + + :param spark_advanced_configurations: The spark_advanced_configurations of this UpdateSqlEndpointDetails. + :type: dict(str, str) + """ + self._spark_advanced_configurations = spark_advanced_configurations + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/identity_domains/identity_domains_client.py b/src/oci/identity_domains/identity_domains_client.py index 132630a84..0a70844aa 100644 --- a/src/oci/identity_domains/identity_domains_client.py +++ b/src/oci/identity_domains/identity_domains_client.py @@ -1588,7 +1588,7 @@ def create_cloud_gate_server(self, **kwargs): def create_condition(self, **kwargs): """ - Create a Condition + Create a condition :param str authorization: (optional) @@ -1609,12 +1609,14 @@ def create_condition(self, **kwargs): Condition schema. Before you specify an attribute-value in a request to create a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. @@ -4542,7 +4544,7 @@ def create_password_policy(self, **kwargs): def create_policy(self, **kwargs): """ - Create a Policy + Create a Policy. :param str authorization: (optional) @@ -4563,12 +4565,14 @@ def create_policy(self, **kwargs): Policy schema. Before you specify an attribute-value in a request to create a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. @@ -4676,9 +4680,121 @@ def create_policy(self, **kwargs): api_reference_link=api_reference_link, required_arguments=required_arguments) + def create_restore_oci_console_policy(self, **kwargs): + """ + Create a RestoreOciConsolePolicy entry to restore Policy to factory default. + + + :param str authorization: (optional) + The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + + :param str resource_type_schema_version: (optional) + An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + + :param oci.identity_domains.models.RestoreOciConsolePolicy restore_oci_console_policy: (optional) + RestoreOciConsolePolicy schema. + + Before you specify an attribute-value in a request to create a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + + - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + + Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + + - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + + :param str opc_retry_token: (optional) + A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.RestoreOciConsolePolicy` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use create_restore_oci_console_policy API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = [] + resource_path = "/admin/v1/RestoreOciConsolePolicy" + method = "POST" + operation_name = "create_restore_oci_console_policy" + api_reference_link = "" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "authorization", + "resource_type_schema_version", + "restore_oci_console_policy", + "opc_retry_token" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + f"create_restore_oci_console_policy got unknown kwargs: {extra_kwargs!r}") + + header_params = { + "accept": "application/json, application/scim+json", + "content-type": "application/json", + "authorization": kwargs.get("authorization", missing), + "resource_type_schema_version": kwargs.get("resource_type_schema_version", missing), + "opc-retry-token": kwargs.get("opc_retry_token", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + header_params=header_params, + body=kwargs.get('restore_oci_console_policy'), + response_type="RestoreOciConsolePolicy", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + header_params=header_params, + body=kwargs.get('restore_oci_console_policy'), + response_type="RestoreOciConsolePolicy", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + def create_rule(self, **kwargs): """ - Create a Rule + Create a Rule. :param str authorization: (optional) @@ -4699,12 +4815,14 @@ def create_rule(self, **kwargs): Rule schema. Before you specify an attribute-value in a request to create a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. @@ -6816,7 +6934,7 @@ def delete_cloud_gate_server(self, cloud_gate_server_id, **kwargs): def delete_condition(self, condition_id, **kwargs): """ - Delete a Condition + Delete a condition. :param str condition_id: (required) @@ -9357,7 +9475,7 @@ def delete_password_policy(self, password_policy_id, **kwargs): def delete_policy(self, policy_id, **kwargs): """ - Delete a Policy + Delete a Policy. :param str policy_id: (required) @@ -9478,7 +9596,7 @@ def delete_policy(self, policy_id, **kwargs): def delete_rule(self, rule_id, **kwargs): """ - Delete a Rule + Delete a Rule. :param str rule_id: (required) @@ -12187,7 +12305,7 @@ def get_cloud_gate_server(self, cloud_gate_server_id, **kwargs): def get_condition(self, condition_id, **kwargs): """ - Get a Condition + Get a condition. :param str condition_id: (required) @@ -15475,6 +15593,139 @@ def get_o_auth_partner_certificate(self, o_auth_partner_certificate_id, **kwargs api_reference_link=api_reference_link, required_arguments=required_arguments) + def get_oci_console_sign_on_policy_consent(self, oci_console_sign_on_policy_consent_id, **kwargs): + """ + Get a OciConsoleSignOnPolicyConsent Entry. + + + :param str oci_console_sign_on_policy_consent_id: (required) + ID of the resource + + :param str authorization: (optional) + The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + + :param str resource_type_schema_version: (optional) + An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + + :param str attributes: (optional) + A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. + + :param list[str] attribute_sets: (optional) + A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. + + Allowed values are: "all", "always", "never", "request", "default" + + :param str opc_retry_token: (optional) + A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.OciConsoleSignOnPolicyConsent` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_oci_console_sign_on_policy_consent API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['ociConsoleSignOnPolicyConsentId'] + resource_path = "/admin/v1/OciConsoleSignOnPolicyConsents/{ociConsoleSignOnPolicyConsentId}" + method = "GET" + operation_name = "get_oci_console_sign_on_policy_consent" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/OciConsoleSignOnPolicyConsent/GetOciConsoleSignOnPolicyConsent" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "authorization", + "resource_type_schema_version", + "attributes", + "attribute_sets", + "opc_retry_token" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + f"get_oci_console_sign_on_policy_consent got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "ociConsoleSignOnPolicyConsentId": oci_console_sign_on_policy_consent_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + + if 'attribute_sets' in kwargs: + attribute_sets_allowed_values = ["all", "always", "never", "request", "default"] + for attribute_sets_item in kwargs['attribute_sets']: + if attribute_sets_item not in attribute_sets_allowed_values: + raise ValueError( + f"Invalid value for `attribute_sets`, must be one of { attribute_sets_allowed_values }" + ) + + query_params = { + "attributes": kwargs.get("attributes", missing), + "attributeSets": self.base_client.generate_collection_format_param(kwargs.get("attribute_sets", 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, application/scim+json", + "content-type": "application/json", + "authorization": kwargs.get("authorization", missing), + "resource_type_schema_version": kwargs.get("resource_type_schema_version", missing), + "opc-retry-token": kwargs.get("opc_retry_token", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="OciConsoleSignOnPolicyConsent", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="OciConsoleSignOnPolicyConsent", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + def get_password_policy(self, password_policy_id, **kwargs): """ Get a password policy. @@ -15610,7 +15861,7 @@ def get_password_policy(self, password_policy_id, **kwargs): def get_policy(self, policy_id, **kwargs): """ - Get a Policy + Get a Policy. :param str policy_id: (required) @@ -15743,7 +15994,7 @@ def get_policy(self, policy_id, **kwargs): def get_rule(self, rule_id, **kwargs): """ - Get a Rule + Get a Rule. :param str rule_id: (required) @@ -19342,7 +19593,7 @@ def list_cloud_gates(self, **kwargs): def list_conditions(self, **kwargs): """ - Search Conditions + Search conditions. :param str filter: (optional) @@ -19410,7 +19661,7 @@ def list_conditions(self, **kwargs): resource_path = "/admin/v1/Conditions" method = "GET" operation_name = "list_conditions" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Conditions/ListConditions" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Condition/ListConditions" # Don't accept unknown kwargs expected_kwargs = [ @@ -23728,6 +23979,170 @@ def list_o_auth_partner_certificates(self, **kwargs): api_reference_link=api_reference_link, required_arguments=required_arguments) + def list_oci_console_sign_on_policy_consents(self, **kwargs): + """ + Search OciConsoleSignOnPolicyConsent entries + + + :param str filter: (optional) + OPTIONAL. The filter string that is used to request a subset of resources. The filter string MUST be a valid filter expression. See the Filtering section of the SCIM specification for more information (Section 3.4.2.2). The string should contain at least one condition that each item must match in order to be returned in the search results. Each condition specifies an attribute, an operator, and a value. Conditions within a filter can be connected by logical operators (such as AND and OR). Sets of conditions can be grouped together using parentheses. + + :param str sort_by: (optional) + OPTIONAL. A string that indicates the attribute whose value SHALL be used to order the returned responses. The sortBy attribute MUST be in standard attribute notation form. See the Attribute Notation section of the SCIM specification for more information (Section 3.10). Also, see the Sorting section of the SCIM specification for more information (Section 3.4.2.3). + + :param str sort_order: (optional) + A string that indicates the order in which the sortBy parameter is applied. Allowed values are 'ascending' and 'descending'. See (`Sorting Section`__). OPTIONAL. + + __ https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.3 + + Allowed values are: "ASCENDING", "DESCENDING" + + :param int start_index: (optional) + OPTIONAL. An integer that indicates the 1-based index of the first query result. See the Pagination section of the SCIM specification for more information. (Section 3.4.2.4). The number of results pages to return. The first page is 1. Specify 2 to access the second page of results, and so on. + + :param int count: (optional) + OPTIONAL. An integer that indicates the desired maximum number of query results per page. 1000 is the largest value that you can use. See the Pagination section of the System for Cross-Domain Identity Management Protocol specification for more information. (Section 3.4.2.4). + + :param str attributes: (optional) + A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. + + :param list[str] attribute_sets: (optional) + A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. + + Allowed values are: "all", "always", "never", "request", "default" + + :param str authorization: (optional) + The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + + :param str resource_type_schema_version: (optional) + An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + + :param str opc_retry_token: (optional) + A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + + :param str page: (optional) + The value of the `opc-next-page` response header from the previous 'List' call. + + :param int limit: (optional) + The maximum number of items to return in a paginated 'List' 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. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.OciConsoleSignOnPolicyConsents` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_oci_console_sign_on_policy_consents API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = [] + resource_path = "/admin/v1/OciConsoleSignOnPolicyConsents" + method = "GET" + operation_name = "list_oci_console_sign_on_policy_consents" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/OciConsoleSignOnPolicyConsent/ListOciConsoleSignOnPolicyConsents" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "filter", + "sort_by", + "sort_order", + "start_index", + "count", + "attributes", + "attribute_sets", + "authorization", + "resource_type_schema_version", + "opc_retry_token", + "page", + "limit" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + f"list_oci_console_sign_on_policy_consents got unknown kwargs: {extra_kwargs!r}") + + if 'sort_order' in kwargs: + sort_order_allowed_values = ["ASCENDING", "DESCENDING"] + if kwargs['sort_order'] not in sort_order_allowed_values: + raise ValueError( + f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }" + ) + + if 'attribute_sets' in kwargs: + attribute_sets_allowed_values = ["all", "always", "never", "request", "default"] + for attribute_sets_item in kwargs['attribute_sets']: + if attribute_sets_item not in attribute_sets_allowed_values: + raise ValueError( + f"Invalid value for `attribute_sets`, must be one of { attribute_sets_allowed_values }" + ) + + query_params = { + "filter": kwargs.get("filter", missing), + "sortBy": kwargs.get("sort_by", missing), + "sortOrder": kwargs.get("sort_order", missing), + "startIndex": kwargs.get("start_index", missing), + "count": kwargs.get("count", missing), + "attributes": kwargs.get("attributes", missing), + "attributeSets": self.base_client.generate_collection_format_param(kwargs.get("attribute_sets", missing), 'multi'), + "page": kwargs.get("page", missing), + "limit": kwargs.get("limit", missing) + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + header_params = { + "accept": "application/json, application/scim+json", + "content-type": "application/json", + "authorization": kwargs.get("authorization", missing), + "resource_type_schema_version": kwargs.get("resource_type_schema_version", missing), + "opc-retry-token": kwargs.get("opc_retry_token", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="OciConsoleSignOnPolicyConsents", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="OciConsoleSignOnPolicyConsents", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + def list_password_policies(self, **kwargs): """ Search for password policies. @@ -23894,7 +24309,7 @@ def list_password_policies(self, **kwargs): def list_policies(self, **kwargs): """ - Search Policies + Search Policies. :param str filter: (optional) @@ -23962,7 +24377,7 @@ def list_policies(self, **kwargs): resource_path = "/admin/v1/Policies" method = "GET" operation_name = "list_policies" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Policies/ListPolicies" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Policy/ListPolicies" # Don't accept unknown kwargs expected_kwargs = [ @@ -24222,7 +24637,7 @@ def list_resource_type_schema_attributes(self, **kwargs): def list_rules(self, **kwargs): """ - Search Rules + Search Rules. :param str filter: (optional) @@ -24290,7 +24705,7 @@ def list_rules(self, **kwargs): resource_path = "/admin/v1/Rules" method = "GET" operation_name = "list_rules" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Rules/ListRules" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Rule/ListRules" # Don't accept unknown kwargs expected_kwargs = [ @@ -27433,7 +27848,7 @@ def patch_cloud_gate_server(self, cloud_gate_server_id, **kwargs): def patch_condition(self, condition_id, **kwargs): """ - Update a Condition + Update a condition. :param str condition_id: (required) @@ -27457,12 +27872,14 @@ def patch_condition(self, condition_id, **kwargs): Update the Condition with SCIM Patch schema. Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. @@ -30540,7 +30957,7 @@ def patch_password_policy(self, password_policy_id, **kwargs): def patch_policy(self, policy_id, **kwargs): """ - Update a Policy + Update a Policy. :param str policy_id: (required) @@ -30564,12 +30981,14 @@ def patch_policy(self, policy_id, **kwargs): Update the Policy with SCIM Patch schema. Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. @@ -30696,7 +31115,7 @@ def patch_policy(self, policy_id, **kwargs): def patch_rule(self, rule_id, **kwargs): """ - Update a Rule + Update a Rule. :param str rule_id: (required) @@ -30720,12 +31139,14 @@ def patch_rule(self, rule_id, **kwargs): Update the Rule with SCIM Patch schema. Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. @@ -33454,7 +33875,7 @@ def put_cloud_gate_server(self, cloud_gate_server_id, **kwargs): def put_condition(self, condition_id, **kwargs): """ - Replace a Condition + Replace a condition. :param str condition_id: (required) @@ -33478,12 +33899,14 @@ def put_condition(self, condition_id, **kwargs): Replace the current instance of Condition with provided payload. Before you specify an attribute-value in a request to replace a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. @@ -35272,7 +35695,7 @@ def put_password_policy(self, password_policy_id, **kwargs): def put_policy(self, policy_id, **kwargs): """ - Replace a Policy + Replace a Policy. :param str policy_id: (required) @@ -35296,12 +35719,14 @@ def put_policy(self, policy_id, **kwargs): Replace the current instance of Policy with provided payload. Before you specify an attribute-value in a request to replace a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. @@ -35428,7 +35853,7 @@ def put_policy(self, policy_id, **kwargs): def put_rule(self, rule_id, **kwargs): """ - Replace a Rule + Replace a Rule. :param str rule_id: (required) @@ -35452,12 +35877,14 @@ def put_rule(self, rule_id, **kwargs): Replace the current instance of Rule with provided payload. Before you specify an attribute-value in a request to replace a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. @@ -38042,7 +38469,7 @@ def search_cloud_gates(self, **kwargs): def search_conditions(self, **kwargs): """ - Search Conditions Using POST + Search Conditions Using POST. :param str authorization: (optional) @@ -38086,7 +38513,7 @@ def search_conditions(self, **kwargs): resource_path = "/admin/v1/Conditions/.search" method = "POST" operation_name = "search_conditions" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Conditions/SearchConditions" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Condition/SearchConditions" # Don't accept unknown kwargs expected_kwargs = [ @@ -39978,6 +40405,120 @@ def search_o_auth_partner_certificates(self, **kwargs): api_reference_link=api_reference_link, required_arguments=required_arguments) + def search_oci_console_sign_on_policy_consents(self, **kwargs): + """ + Search OciConsoleSignOnPolicyConsents Using POST + + + :param str authorization: (optional) + The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + + :param str resource_type_schema_version: (optional) + An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + + :param oci.identity_domains.models.OciConsoleSignOnPolicyConsentSearchRequest oci_console_sign_on_policy_consent_search_request: (optional) + Parameters for searching OciConsoleSignOnPolicyConsents + + :param str opc_retry_token: (optional) + A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + + :param str page: (optional) + The value of the `opc-next-page` response header from the previous 'List' call. + + :param int limit: (optional) + The maximum number of items to return in a paginated 'List' 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. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.OciConsoleSignOnPolicyConsents` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use search_oci_console_sign_on_policy_consents API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = [] + resource_path = "/admin/v1/OciConsoleSignOnPolicyConsents/.search" + method = "POST" + operation_name = "search_oci_console_sign_on_policy_consents" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/OciConsoleSignOnPolicyConsent/SearchOciConsoleSignOnPolicyConsents" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "authorization", + "resource_type_schema_version", + "oci_console_sign_on_policy_consent_search_request", + "opc_retry_token", + "page", + "limit" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + f"search_oci_console_sign_on_policy_consents got unknown kwargs: {extra_kwargs!r}") + + query_params = { + "page": kwargs.get("page", missing), + "limit": kwargs.get("limit", missing) + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + header_params = { + "accept": "application/json, application/scim+json", + "content-type": "application/json", + "authorization": kwargs.get("authorization", missing), + "resource_type_schema_version": kwargs.get("resource_type_schema_version", missing), + "opc-retry-token": kwargs.get("opc_retry_token", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + body=kwargs.get('oci_console_sign_on_policy_consent_search_request'), + response_type="OciConsoleSignOnPolicyConsents", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + body=kwargs.get('oci_console_sign_on_policy_consent_search_request'), + response_type="OciConsoleSignOnPolicyConsents", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + def search_password_policies(self, **kwargs): """ Search for password policies using POST. @@ -40138,7 +40679,7 @@ def search_policies(self, **kwargs): resource_path = "/admin/v1/Policies/.search" method = "POST" operation_name = "search_policies" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Policies/SearchPolicies" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Policy/SearchPolicies" # Don't accept unknown kwargs expected_kwargs = [ @@ -40322,7 +40863,7 @@ def search_resource_type_schema_attributes(self, **kwargs): def search_rules(self, **kwargs): """ - Search Rules Using POST + Search Rules Using POST. :param str authorization: (optional) @@ -40366,7 +40907,7 @@ def search_rules(self, **kwargs): resource_path = "/admin/v1/Rules/.search" method = "POST" operation_name = "search_rules" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Rules/SearchRules" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Rule/SearchRules" # Don't accept unknown kwargs expected_kwargs = [ diff --git a/src/oci/identity_domains/models/__init__.py b/src/oci/identity_domains/models/__init__.py index 2df929d23..a737dc17c 100644 --- a/src/oci/identity_domains/models/__init__.py +++ b/src/oci/identity_domains/models/__init__.py @@ -144,6 +144,7 @@ from .cloud_gate_servers import CloudGateServers from .cloud_gates import CloudGates from .condition import Condition +from .condition_extension_ociconsolesignonpolicyconsent_policy import ConditionExtensionOciconsolesignonpolicyconsentPolicy from .condition_search_request import ConditionSearchRequest from .conditions import Conditions from .customer_secret_key import CustomerSecretKey @@ -331,6 +332,12 @@ from .o_auth_partner_certificate import OAuthPartnerCertificate from .o_auth_partner_certificate_search_request import OAuthPartnerCertificateSearchRequest from .o_auth_partner_certificates import OAuthPartnerCertificates +from .oci_console_sign_on_policy_consent import OciConsoleSignOnPolicyConsent +from .oci_console_sign_on_policy_consent_consent_signed_by import OciConsoleSignOnPolicyConsentConsentSignedBy +from .oci_console_sign_on_policy_consent_modified_resource import OciConsoleSignOnPolicyConsentModifiedResource +from .oci_console_sign_on_policy_consent_policy_resource import OciConsoleSignOnPolicyConsentPolicyResource +from .oci_console_sign_on_policy_consent_search_request import OciConsoleSignOnPolicyConsentSearchRequest +from .oci_console_sign_on_policy_consents import OciConsoleSignOnPolicyConsents from .operations import Operations from .password_policies import PasswordPolicies from .password_policy import PasswordPolicy @@ -340,14 +347,17 @@ from .patch_op import PatchOp from .policies import Policies from .policy import Policy +from .policy_extension_ociconsolesignonpolicyconsent_policy import PolicyExtensionOciconsolesignonpolicyconsentPolicy from .policy_policy_type import PolicyPolicyType from .policy_rules import PolicyRules from .policy_search_request import PolicySearchRequest from .resource_type_schema_attribute import ResourceTypeSchemaAttribute from .resource_type_schema_attribute_search_request import ResourceTypeSchemaAttributeSearchRequest from .resource_type_schema_attributes import ResourceTypeSchemaAttributes +from .restore_oci_console_policy import RestoreOciConsolePolicy from .rule import Rule from .rule_condition_group import RuleConditionGroup +from .rule_extension_ociconsolesignonpolicyconsent_policy import RuleExtensionOciconsolesignonpolicyconsentPolicy from .rule_policy_type import RulePolicyType from .rule_return import RuleReturn from .rule_search_request import RuleSearchRequest @@ -601,6 +611,7 @@ "CloudGateServers": CloudGateServers, "CloudGates": CloudGates, "Condition": Condition, + "ConditionExtensionOciconsolesignonpolicyconsentPolicy": ConditionExtensionOciconsolesignonpolicyconsentPolicy, "ConditionSearchRequest": ConditionSearchRequest, "Conditions": Conditions, "CustomerSecretKey": CustomerSecretKey, @@ -788,6 +799,12 @@ "OAuthPartnerCertificate": OAuthPartnerCertificate, "OAuthPartnerCertificateSearchRequest": OAuthPartnerCertificateSearchRequest, "OAuthPartnerCertificates": OAuthPartnerCertificates, + "OciConsoleSignOnPolicyConsent": OciConsoleSignOnPolicyConsent, + "OciConsoleSignOnPolicyConsentConsentSignedBy": OciConsoleSignOnPolicyConsentConsentSignedBy, + "OciConsoleSignOnPolicyConsentModifiedResource": OciConsoleSignOnPolicyConsentModifiedResource, + "OciConsoleSignOnPolicyConsentPolicyResource": OciConsoleSignOnPolicyConsentPolicyResource, + "OciConsoleSignOnPolicyConsentSearchRequest": OciConsoleSignOnPolicyConsentSearchRequest, + "OciConsoleSignOnPolicyConsents": OciConsoleSignOnPolicyConsents, "Operations": Operations, "PasswordPolicies": PasswordPolicies, "PasswordPolicy": PasswordPolicy, @@ -797,14 +814,17 @@ "PatchOp": PatchOp, "Policies": Policies, "Policy": Policy, + "PolicyExtensionOciconsolesignonpolicyconsentPolicy": PolicyExtensionOciconsolesignonpolicyconsentPolicy, "PolicyPolicyType": PolicyPolicyType, "PolicyRules": PolicyRules, "PolicySearchRequest": PolicySearchRequest, "ResourceTypeSchemaAttribute": ResourceTypeSchemaAttribute, "ResourceTypeSchemaAttributeSearchRequest": ResourceTypeSchemaAttributeSearchRequest, "ResourceTypeSchemaAttributes": ResourceTypeSchemaAttributes, + "RestoreOciConsolePolicy": RestoreOciConsolePolicy, "Rule": Rule, "RuleConditionGroup": RuleConditionGroup, + "RuleExtensionOciconsolesignonpolicyconsentPolicy": RuleExtensionOciconsolesignonpolicyconsentPolicy, "RulePolicyType": RulePolicyType, "RuleReturn": RuleReturn, "RuleSearchRequest": RuleSearchRequest, diff --git a/src/oci/identity_domains/models/condition.py b/src/oci/identity_domains/models/condition.py index eb53432e4..65ff24fa8 100644 --- a/src/oci/identity_domains/models/condition.py +++ b/src/oci/identity_domains/models/condition.py @@ -164,6 +164,10 @@ def __init__(self, **kwargs): The value to assign to the evaluate_condition_if property of this Condition. :type evaluate_condition_if: str + :param urn_ietf_params_scim_schemas_oracle_idcs_extension_ociconsolesignonpolicyconsent_policy: + The value to assign to the urn_ietf_params_scim_schemas_oracle_idcs_extension_ociconsolesignonpolicyconsent_policy property of this Condition. + :type urn_ietf_params_scim_schemas_oracle_idcs_extension_ociconsolesignonpolicyconsent_policy: oci.identity_domains.models.ConditionExtensionOciconsolesignonpolicyconsentPolicy + """ self.swagger_types = { 'id': 'str', @@ -185,7 +189,8 @@ def __init__(self, **kwargs): 'attribute_name': 'str', 'operator': 'str', 'attribute_value': 'str', - 'evaluate_condition_if': 'str' + 'evaluate_condition_if': 'str', + 'urn_ietf_params_scim_schemas_oracle_idcs_extension_ociconsolesignonpolicyconsent_policy': 'ConditionExtensionOciconsolesignonpolicyconsentPolicy' } self.attribute_map = { @@ -208,7 +213,8 @@ def __init__(self, **kwargs): 'attribute_name': 'attributeName', 'operator': 'operator', 'attribute_value': 'attributeValue', - 'evaluate_condition_if': 'evaluateConditionIf' + 'evaluate_condition_if': 'evaluateConditionIf', + 'urn_ietf_params_scim_schemas_oracle_idcs_extension_ociconsolesignonpolicyconsent_policy': 'urn:ietf:params:scim:schemas:oracle:idcs:extension:ociconsolesignonpolicyconsent:Policy' } self._id = None @@ -231,6 +237,7 @@ def __init__(self, **kwargs): self._operator = None self._attribute_value = None self._evaluate_condition_if = None + self._urn_ietf_params_scim_schemas_oracle_idcs_extension_ociconsolesignonpolicyconsent_policy = None @property def id(self): @@ -480,6 +487,7 @@ def tags(self): **SCIM++ Properties:** - idcsCompositeKey: [key, value] + - idcsCsvAttributeNameMappings: [[columnHeaderName:Tag Key, mapsTo:tags.key], [columnHeaderName:Tag Value, mapsTo:tags.value]] - idcsSearchable: true - multiValued: true - mutability: readWrite @@ -502,6 +510,7 @@ def tags(self, tags): **SCIM++ Properties:** - idcsCompositeKey: [key, value] + - idcsCsvAttributeNameMappings: [[columnHeaderName:Tag Key, mapsTo:tags.key], [columnHeaderName:Tag Value, mapsTo:tags.value]] - idcsSearchable: true - multiValued: true - mutability: readWrite @@ -1050,6 +1059,26 @@ def evaluate_condition_if(self, evaluate_condition_if): """ self._evaluate_condition_if = evaluate_condition_if + @property + def urn_ietf_params_scim_schemas_oracle_idcs_extension_ociconsolesignonpolicyconsent_policy(self): + """ + Gets the urn_ietf_params_scim_schemas_oracle_idcs_extension_ociconsolesignonpolicyconsent_policy of this Condition. + + :return: The urn_ietf_params_scim_schemas_oracle_idcs_extension_ociconsolesignonpolicyconsent_policy of this Condition. + :rtype: oci.identity_domains.models.ConditionExtensionOciconsolesignonpolicyconsentPolicy + """ + return self._urn_ietf_params_scim_schemas_oracle_idcs_extension_ociconsolesignonpolicyconsent_policy + + @urn_ietf_params_scim_schemas_oracle_idcs_extension_ociconsolesignonpolicyconsent_policy.setter + def urn_ietf_params_scim_schemas_oracle_idcs_extension_ociconsolesignonpolicyconsent_policy(self, urn_ietf_params_scim_schemas_oracle_idcs_extension_ociconsolesignonpolicyconsent_policy): + """ + Sets the urn_ietf_params_scim_schemas_oracle_idcs_extension_ociconsolesignonpolicyconsent_policy of this Condition. + + :param urn_ietf_params_scim_schemas_oracle_idcs_extension_ociconsolesignonpolicyconsent_policy: The urn_ietf_params_scim_schemas_oracle_idcs_extension_ociconsolesignonpolicyconsent_policy of this Condition. + :type: oci.identity_domains.models.ConditionExtensionOciconsolesignonpolicyconsentPolicy + """ + self._urn_ietf_params_scim_schemas_oracle_idcs_extension_ociconsolesignonpolicyconsent_policy = urn_ietf_params_scim_schemas_oracle_idcs_extension_ociconsolesignonpolicyconsent_policy + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/identity_domains/models/condition_extension_ociconsolesignonpolicyconsent_policy.py b/src/oci/identity_domains/models/condition_extension_ociconsolesignonpolicyconsent_policy.py new file mode 100644 index 000000000..250975399 --- /dev/null +++ b/src/oci/identity_domains/models/condition_extension_ociconsolesignonpolicyconsent_policy.py @@ -0,0 +1,194 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: v1 + + +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 ConditionExtensionOciconsolesignonpolicyconsentPolicy(object): + """ + This extension defines attributes used to record consent for modification of the \"Security Policy for OCI Console\" sign-on policy, Rule, Condition or ConditionGroup. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ConditionExtensionOciconsolesignonpolicyconsentPolicy object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param consent: + The value to assign to the consent property of this ConditionExtensionOciconsolesignonpolicyconsentPolicy. + :type consent: bool + + :param justification: + The value to assign to the justification property of this ConditionExtensionOciconsolesignonpolicyconsentPolicy. + :type justification: str + + :param reason: + The value to assign to the reason property of this ConditionExtensionOciconsolesignonpolicyconsentPolicy. + :type reason: str + + """ + self.swagger_types = { + 'consent': 'bool', + 'justification': 'str', + 'reason': 'str' + } + + self.attribute_map = { + 'consent': 'consent', + 'justification': 'justification', + 'reason': 'reason' + } + + self._consent = None + self._justification = None + self._reason = None + + @property + def consent(self): + """ + Gets the consent of this ConditionExtensionOciconsolesignonpolicyconsentPolicy. + Set to true when an identity domain administrator opts to change the Oracle security defaults for the \"Security Policy for OCI Console\" sign-on policy shipped by Oracle. Defaults to false. + + **Added In:** 2405220110 + + **SCIM++ Properties:** + - idcsSearchable: false + - multiValued: false + - mutability: writeOnly + - required: false + - returned: never + - type: boolean + + + :return: The consent of this ConditionExtensionOciconsolesignonpolicyconsentPolicy. + :rtype: bool + """ + return self._consent + + @consent.setter + def consent(self, consent): + """ + Sets the consent of this ConditionExtensionOciconsolesignonpolicyconsentPolicy. + Set to true when an identity domain administrator opts to change the Oracle security defaults for the \"Security Policy for OCI Console\" sign-on policy shipped by Oracle. Defaults to false. + + **Added In:** 2405220110 + + **SCIM++ Properties:** + - idcsSearchable: false + - multiValued: false + - mutability: writeOnly + - required: false + - returned: never + - type: boolean + + + :param consent: The consent of this ConditionExtensionOciconsolesignonpolicyconsentPolicy. + :type: bool + """ + self._consent = consent + + @property + def justification(self): + """ + Gets the justification of this ConditionExtensionOciconsolesignonpolicyconsentPolicy. + The justification for the change when an identity domain administrator opts to modify the Oracle security defaults for the \"Security Policy for OCI Console\" sign-on policy shipped by Oracle. + + **Added In:** 2405220110 + + **SCIM++ Properties:** + - idcsSearchable: false + - multiValued: false + - mutability: writeOnly + - required: false + - returned: never + - type: string + + + :return: The justification of this ConditionExtensionOciconsolesignonpolicyconsentPolicy. + :rtype: str + """ + return self._justification + + @justification.setter + def justification(self, justification): + """ + Sets the justification of this ConditionExtensionOciconsolesignonpolicyconsentPolicy. + The justification for the change when an identity domain administrator opts to modify the Oracle security defaults for the \"Security Policy for OCI Console\" sign-on policy shipped by Oracle. + + **Added In:** 2405220110 + + **SCIM++ Properties:** + - idcsSearchable: false + - multiValued: false + - mutability: writeOnly + - required: false + - returned: never + - type: string + + + :param justification: The justification of this ConditionExtensionOciconsolesignonpolicyconsentPolicy. + :type: str + """ + self._justification = justification + + @property + def reason(self): + """ + Gets the reason of this ConditionExtensionOciconsolesignonpolicyconsentPolicy. + The detailed reason for the change when an identity domain administrator opts to modify the Oracle security defaults for the \"Security Policy for OCI Console\" sign-on policy shipped by Oracle. + + **Added In:** 2405220110 + + **SCIM++ Properties:** + - idcsSearchable: false + - multiValued: false + - mutability: writeOnly + - required: false + - returned: never + - type: string + + + :return: The reason of this ConditionExtensionOciconsolesignonpolicyconsentPolicy. + :rtype: str + """ + return self._reason + + @reason.setter + def reason(self, reason): + """ + Sets the reason of this ConditionExtensionOciconsolesignonpolicyconsentPolicy. + The detailed reason for the change when an identity domain administrator opts to modify the Oracle security defaults for the \"Security Policy for OCI Console\" sign-on policy shipped by Oracle. + + **Added In:** 2405220110 + + **SCIM++ Properties:** + - idcsSearchable: false + - multiValued: false + - mutability: writeOnly + - required: false + - returned: never + - type: string + + + :param reason: The reason of this ConditionExtensionOciconsolesignonpolicyconsentPolicy. + :type: str + """ + self._reason = reason + + 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/identity_domains/models/oci_console_sign_on_policy_consent.py b/src/oci/identity_domains/models/oci_console_sign_on_policy_consent.py new file mode 100644 index 000000000..ff4181645 --- /dev/null +++ b/src/oci/identity_domains/models/oci_console_sign_on_policy_consent.py @@ -0,0 +1,1041 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: v1 + + +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 OciConsoleSignOnPolicyConsent(object): + """ + The \"Security Policy for OCI Console\" sign-on policy consent resource used to record consents. The schema to record the \"Security Policy for OCI Console\" sign-on policy consent. + """ + + #: A constant which can be used with the idcs_prevented_operations property of a OciConsoleSignOnPolicyConsent. + #: This constant has a value of "replace" + IDCS_PREVENTED_OPERATIONS_REPLACE = "replace" + + #: A constant which can be used with the idcs_prevented_operations property of a OciConsoleSignOnPolicyConsent. + #: This constant has a value of "update" + IDCS_PREVENTED_OPERATIONS_UPDATE = "update" + + #: A constant which can be used with the idcs_prevented_operations property of a OciConsoleSignOnPolicyConsent. + #: This constant has a value of "delete" + IDCS_PREVENTED_OPERATIONS_DELETE = "delete" + + #: A constant which can be used with the change_type property of a OciConsoleSignOnPolicyConsent. + #: This constant has a value of "MODIFIED" + CHANGE_TYPE_MODIFIED = "MODIFIED" + + #: A constant which can be used with the change_type property of a OciConsoleSignOnPolicyConsent. + #: This constant has a value of "RESTORED_TO_FACTORY_DEFAULT" + CHANGE_TYPE_RESTORED_TO_FACTORY_DEFAULT = "RESTORED_TO_FACTORY_DEFAULT" + + def __init__(self, **kwargs): + """ + Initializes a new OciConsoleSignOnPolicyConsent 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 OciConsoleSignOnPolicyConsent. + :type id: str + + :param ocid: + The value to assign to the ocid property of this OciConsoleSignOnPolicyConsent. + :type ocid: str + + :param schemas: + The value to assign to the schemas property of this OciConsoleSignOnPolicyConsent. + :type schemas: list[str] + + :param meta: + The value to assign to the meta property of this OciConsoleSignOnPolicyConsent. + :type meta: oci.identity_domains.models.Meta + + :param idcs_created_by: + The value to assign to the idcs_created_by property of this OciConsoleSignOnPolicyConsent. + :type idcs_created_by: oci.identity_domains.models.IdcsCreatedBy + + :param idcs_last_modified_by: + The value to assign to the idcs_last_modified_by property of this OciConsoleSignOnPolicyConsent. + :type idcs_last_modified_by: oci.identity_domains.models.IdcsLastModifiedBy + + :param idcs_prevented_operations: + The value to assign to the idcs_prevented_operations property of this OciConsoleSignOnPolicyConsent. + Allowed values for items in this list are: "replace", "update", "delete", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type idcs_prevented_operations: list[str] + + :param tags: + The value to assign to the tags property of this OciConsoleSignOnPolicyConsent. + :type tags: list[oci.identity_domains.models.Tags] + + :param delete_in_progress: + The value to assign to the delete_in_progress property of this OciConsoleSignOnPolicyConsent. + :type delete_in_progress: bool + + :param idcs_last_upgraded_in_release: + The value to assign to the idcs_last_upgraded_in_release property of this OciConsoleSignOnPolicyConsent. + :type idcs_last_upgraded_in_release: str + + :param domain_ocid: + The value to assign to the domain_ocid property of this OciConsoleSignOnPolicyConsent. + :type domain_ocid: str + + :param compartment_ocid: + The value to assign to the compartment_ocid property of this OciConsoleSignOnPolicyConsent. + :type compartment_ocid: str + + :param tenancy_ocid: + The value to assign to the tenancy_ocid property of this OciConsoleSignOnPolicyConsent. + :type tenancy_ocid: str + + :param consent_signed_by: + The value to assign to the consent_signed_by property of this OciConsoleSignOnPolicyConsent. + :type consent_signed_by: oci.identity_domains.models.OciConsoleSignOnPolicyConsentConsentSignedBy + + :param modified_resource: + The value to assign to the modified_resource property of this OciConsoleSignOnPolicyConsent. + :type modified_resource: oci.identity_domains.models.OciConsoleSignOnPolicyConsentModifiedResource + + :param policy_resource: + The value to assign to the policy_resource property of this OciConsoleSignOnPolicyConsent. + :type policy_resource: oci.identity_domains.models.OciConsoleSignOnPolicyConsentPolicyResource + + :param change_type: + The value to assign to the change_type property of this OciConsoleSignOnPolicyConsent. + Allowed values for this property are: "MODIFIED", "RESTORED_TO_FACTORY_DEFAULT", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type change_type: str + + :param client_ip: + The value to assign to the client_ip property of this OciConsoleSignOnPolicyConsent. + :type client_ip: str + + :param justification: + The value to assign to the justification property of this OciConsoleSignOnPolicyConsent. + :type justification: str + + :param reason: + The value to assign to the reason property of this OciConsoleSignOnPolicyConsent. + :type reason: str + + :param time_consent_signed: + The value to assign to the time_consent_signed property of this OciConsoleSignOnPolicyConsent. + :type time_consent_signed: str + + :param notification_recipients: + The value to assign to the notification_recipients property of this OciConsoleSignOnPolicyConsent. + :type notification_recipients: list[str] + + """ + self.swagger_types = { + 'id': 'str', + 'ocid': 'str', + 'schemas': 'list[str]', + 'meta': 'Meta', + 'idcs_created_by': 'IdcsCreatedBy', + 'idcs_last_modified_by': 'IdcsLastModifiedBy', + 'idcs_prevented_operations': 'list[str]', + 'tags': 'list[Tags]', + 'delete_in_progress': 'bool', + 'idcs_last_upgraded_in_release': 'str', + 'domain_ocid': 'str', + 'compartment_ocid': 'str', + 'tenancy_ocid': 'str', + 'consent_signed_by': 'OciConsoleSignOnPolicyConsentConsentSignedBy', + 'modified_resource': 'OciConsoleSignOnPolicyConsentModifiedResource', + 'policy_resource': 'OciConsoleSignOnPolicyConsentPolicyResource', + 'change_type': 'str', + 'client_ip': 'str', + 'justification': 'str', + 'reason': 'str', + 'time_consent_signed': 'str', + 'notification_recipients': 'list[str]' + } + + self.attribute_map = { + 'id': 'id', + 'ocid': 'ocid', + 'schemas': 'schemas', + 'meta': 'meta', + 'idcs_created_by': 'idcsCreatedBy', + 'idcs_last_modified_by': 'idcsLastModifiedBy', + 'idcs_prevented_operations': 'idcsPreventedOperations', + 'tags': 'tags', + 'delete_in_progress': 'deleteInProgress', + 'idcs_last_upgraded_in_release': 'idcsLastUpgradedInRelease', + 'domain_ocid': 'domainOcid', + 'compartment_ocid': 'compartmentOcid', + 'tenancy_ocid': 'tenancyOcid', + 'consent_signed_by': 'consentSignedBy', + 'modified_resource': 'modifiedResource', + 'policy_resource': 'policyResource', + 'change_type': 'changeType', + 'client_ip': 'clientIp', + 'justification': 'justification', + 'reason': 'reason', + 'time_consent_signed': 'timeConsentSigned', + 'notification_recipients': 'notificationRecipients' + } + + self._id = None + self._ocid = None + self._schemas = None + self._meta = None + self._idcs_created_by = None + self._idcs_last_modified_by = None + self._idcs_prevented_operations = None + self._tags = None + self._delete_in_progress = None + self._idcs_last_upgraded_in_release = None + self._domain_ocid = None + self._compartment_ocid = None + self._tenancy_ocid = None + self._consent_signed_by = None + self._modified_resource = None + self._policy_resource = None + self._change_type = None + self._client_ip = None + self._justification = None + self._reason = None + self._time_consent_signed = None + self._notification_recipients = None + + @property + def id(self): + """ + Gets the id of this OciConsoleSignOnPolicyConsent. + Unique identifier for the SCIM Resource as defined by the Service Provider. Each representation of the Resource MUST include a non-empty id value. This identifier MUST be unique across the Service Provider's entire set of Resources. It MUST be a stable, non-reassignable identifier that does not change when the same Resource is returned in subsequent requests. The value of the id attribute is always issued by the Service Provider and MUST never be specified by the Service Consumer. bulkId: is a reserved keyword and MUST NOT be used in the unique identifier. + + **SCIM++ Properties:** + - caseExact: false + - idcsSearchable: true + - multiValued: false + - mutability: readOnly + - required: false + - returned: always + - type: string + - uniqueness: global + + + :return: The id of this OciConsoleSignOnPolicyConsent. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this OciConsoleSignOnPolicyConsent. + Unique identifier for the SCIM Resource as defined by the Service Provider. Each representation of the Resource MUST include a non-empty id value. This identifier MUST be unique across the Service Provider's entire set of Resources. It MUST be a stable, non-reassignable identifier that does not change when the same Resource is returned in subsequent requests. The value of the id attribute is always issued by the Service Provider and MUST never be specified by the Service Consumer. bulkId: is a reserved keyword and MUST NOT be used in the unique identifier. + + **SCIM++ Properties:** + - caseExact: false + - idcsSearchable: true + - multiValued: false + - mutability: readOnly + - required: false + - returned: always + - type: string + - uniqueness: global + + + :param id: The id of this OciConsoleSignOnPolicyConsent. + :type: str + """ + self._id = id + + @property + def ocid(self): + """ + Gets the ocid of this OciConsoleSignOnPolicyConsent. + Unique OCI identifier for the SCIM Resource. + + **SCIM++ Properties:** + - caseExact: true + - idcsSearchable: true + - multiValued: false + - mutability: immutable + - required: false + - returned: default + - type: string + - uniqueness: global + + + :return: The ocid of this OciConsoleSignOnPolicyConsent. + :rtype: str + """ + return self._ocid + + @ocid.setter + def ocid(self, ocid): + """ + Sets the ocid of this OciConsoleSignOnPolicyConsent. + Unique OCI identifier for the SCIM Resource. + + **SCIM++ Properties:** + - caseExact: true + - idcsSearchable: true + - multiValued: false + - mutability: immutable + - required: false + - returned: default + - type: string + - uniqueness: global + + + :param ocid: The ocid of this OciConsoleSignOnPolicyConsent. + :type: str + """ + self._ocid = ocid + + @property + def schemas(self): + """ + **[Required]** Gets the schemas of this OciConsoleSignOnPolicyConsent. + REQUIRED. The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. This specification defines URIs for User, Group, and a standard \\\"enterprise\\\" extension. All representations of SCIM schema MUST include a non-zero value array with value(s) of the URIs supported by that representation. Duplicate values MUST NOT be included. Value order is not specified and MUST not impact behavior. + + **SCIM++ Properties:** + - caseExact: false + - idcsSearchable: false + - multiValued: true + - mutability: readWrite + - required: true + - returned: default + - type: string + - uniqueness: none + + + :return: The schemas of this OciConsoleSignOnPolicyConsent. + :rtype: list[str] + """ + return self._schemas + + @schemas.setter + def schemas(self, schemas): + """ + Sets the schemas of this OciConsoleSignOnPolicyConsent. + REQUIRED. The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. This specification defines URIs for User, Group, and a standard \\\"enterprise\\\" extension. All representations of SCIM schema MUST include a non-zero value array with value(s) of the URIs supported by that representation. Duplicate values MUST NOT be included. Value order is not specified and MUST not impact behavior. + + **SCIM++ Properties:** + - caseExact: false + - idcsSearchable: false + - multiValued: true + - mutability: readWrite + - required: true + - returned: default + - type: string + - uniqueness: none + + + :param schemas: The schemas of this OciConsoleSignOnPolicyConsent. + :type: list[str] + """ + self._schemas = schemas + + @property + def meta(self): + """ + Gets the meta of this OciConsoleSignOnPolicyConsent. + + :return: The meta of this OciConsoleSignOnPolicyConsent. + :rtype: oci.identity_domains.models.Meta + """ + return self._meta + + @meta.setter + def meta(self, meta): + """ + Sets the meta of this OciConsoleSignOnPolicyConsent. + + :param meta: The meta of this OciConsoleSignOnPolicyConsent. + :type: oci.identity_domains.models.Meta + """ + self._meta = meta + + @property + def idcs_created_by(self): + """ + Gets the idcs_created_by of this OciConsoleSignOnPolicyConsent. + + :return: The idcs_created_by of this OciConsoleSignOnPolicyConsent. + :rtype: oci.identity_domains.models.IdcsCreatedBy + """ + return self._idcs_created_by + + @idcs_created_by.setter + def idcs_created_by(self, idcs_created_by): + """ + Sets the idcs_created_by of this OciConsoleSignOnPolicyConsent. + + :param idcs_created_by: The idcs_created_by of this OciConsoleSignOnPolicyConsent. + :type: oci.identity_domains.models.IdcsCreatedBy + """ + self._idcs_created_by = idcs_created_by + + @property + def idcs_last_modified_by(self): + """ + Gets the idcs_last_modified_by of this OciConsoleSignOnPolicyConsent. + + :return: The idcs_last_modified_by of this OciConsoleSignOnPolicyConsent. + :rtype: oci.identity_domains.models.IdcsLastModifiedBy + """ + return self._idcs_last_modified_by + + @idcs_last_modified_by.setter + def idcs_last_modified_by(self, idcs_last_modified_by): + """ + Sets the idcs_last_modified_by of this OciConsoleSignOnPolicyConsent. + + :param idcs_last_modified_by: The idcs_last_modified_by of this OciConsoleSignOnPolicyConsent. + :type: oci.identity_domains.models.IdcsLastModifiedBy + """ + self._idcs_last_modified_by = idcs_last_modified_by + + @property + def idcs_prevented_operations(self): + """ + Gets the idcs_prevented_operations of this OciConsoleSignOnPolicyConsent. + Each value of this attribute specifies an operation that only an internal client may perform on this particular resource. + + **SCIM++ Properties:** + - idcsSearchable: false + - multiValued: true + - mutability: readOnly + - required: false + - returned: request + - type: string + - uniqueness: none + + Allowed values for items in this list are: "replace", "update", "delete", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The idcs_prevented_operations of this OciConsoleSignOnPolicyConsent. + :rtype: list[str] + """ + return self._idcs_prevented_operations + + @idcs_prevented_operations.setter + def idcs_prevented_operations(self, idcs_prevented_operations): + """ + Sets the idcs_prevented_operations of this OciConsoleSignOnPolicyConsent. + Each value of this attribute specifies an operation that only an internal client may perform on this particular resource. + + **SCIM++ Properties:** + - idcsSearchable: false + - multiValued: true + - mutability: readOnly + - required: false + - returned: request + - type: string + - uniqueness: none + + + :param idcs_prevented_operations: The idcs_prevented_operations of this OciConsoleSignOnPolicyConsent. + :type: list[str] + """ + allowed_values = ["replace", "update", "delete"] + if idcs_prevented_operations: + idcs_prevented_operations[:] = ['UNKNOWN_ENUM_VALUE' if not value_allowed_none_or_none_sentinel(x, allowed_values) else x for x in idcs_prevented_operations] + self._idcs_prevented_operations = idcs_prevented_operations + + @property + def tags(self): + """ + Gets the tags of this OciConsoleSignOnPolicyConsent. + A list of tags on this resource. + + **SCIM++ Properties:** + - idcsCompositeKey: [key, value] + - idcsCsvAttributeNameMappings: [[columnHeaderName:Tag Key, mapsTo:tags.key], [columnHeaderName:Tag Value, mapsTo:tags.value]] + - idcsSearchable: true + - multiValued: true + - mutability: readWrite + - required: false + - returned: request + - type: complex + - uniqueness: none + + + :return: The tags of this OciConsoleSignOnPolicyConsent. + :rtype: list[oci.identity_domains.models.Tags] + """ + return self._tags + + @tags.setter + def tags(self, tags): + """ + Sets the tags of this OciConsoleSignOnPolicyConsent. + A list of tags on this resource. + + **SCIM++ Properties:** + - idcsCompositeKey: [key, value] + - idcsCsvAttributeNameMappings: [[columnHeaderName:Tag Key, mapsTo:tags.key], [columnHeaderName:Tag Value, mapsTo:tags.value]] + - idcsSearchable: true + - multiValued: true + - mutability: readWrite + - required: false + - returned: request + - type: complex + - uniqueness: none + + + :param tags: The tags of this OciConsoleSignOnPolicyConsent. + :type: list[oci.identity_domains.models.Tags] + """ + self._tags = tags + + @property + def delete_in_progress(self): + """ + Gets the delete_in_progress of this OciConsoleSignOnPolicyConsent. + A boolean flag indicating this resource in the process of being deleted. Usually set to true when synchronous deletion of the resource would take too long. + + **SCIM++ Properties:** + - caseExact: false + - idcsSearchable: true + - multiValued: false + - mutability: readOnly + - required: false + - returned: default + - type: boolean + - uniqueness: none + + + :return: The delete_in_progress of this OciConsoleSignOnPolicyConsent. + :rtype: bool + """ + return self._delete_in_progress + + @delete_in_progress.setter + def delete_in_progress(self, delete_in_progress): + """ + Sets the delete_in_progress of this OciConsoleSignOnPolicyConsent. + A boolean flag indicating this resource in the process of being deleted. Usually set to true when synchronous deletion of the resource would take too long. + + **SCIM++ Properties:** + - caseExact: false + - idcsSearchable: true + - multiValued: false + - mutability: readOnly + - required: false + - returned: default + - type: boolean + - uniqueness: none + + + :param delete_in_progress: The delete_in_progress of this OciConsoleSignOnPolicyConsent. + :type: bool + """ + self._delete_in_progress = delete_in_progress + + @property + def idcs_last_upgraded_in_release(self): + """ + Gets the idcs_last_upgraded_in_release of this OciConsoleSignOnPolicyConsent. + The release number when the resource was upgraded. + + **SCIM++ Properties:** + - caseExact: false + - idcsSearchable: false + - multiValued: false + - mutability: readOnly + - required: false + - returned: request + - type: string + - uniqueness: none + + + :return: The idcs_last_upgraded_in_release of this OciConsoleSignOnPolicyConsent. + :rtype: str + """ + return self._idcs_last_upgraded_in_release + + @idcs_last_upgraded_in_release.setter + def idcs_last_upgraded_in_release(self, idcs_last_upgraded_in_release): + """ + Sets the idcs_last_upgraded_in_release of this OciConsoleSignOnPolicyConsent. + The release number when the resource was upgraded. + + **SCIM++ Properties:** + - caseExact: false + - idcsSearchable: false + - multiValued: false + - mutability: readOnly + - required: false + - returned: request + - type: string + - uniqueness: none + + + :param idcs_last_upgraded_in_release: The idcs_last_upgraded_in_release of this OciConsoleSignOnPolicyConsent. + :type: str + """ + self._idcs_last_upgraded_in_release = idcs_last_upgraded_in_release + + @property + def domain_ocid(self): + """ + Gets the domain_ocid of this OciConsoleSignOnPolicyConsent. + OCI Domain Id (ocid) in which the resource lives. + + **SCIM++ Properties:** + - caseExact: false + - idcsSearchable: false + - multiValued: false + - mutability: readOnly + - required: false + - returned: default + - type: string + - uniqueness: none + + + :return: The domain_ocid of this OciConsoleSignOnPolicyConsent. + :rtype: str + """ + return self._domain_ocid + + @domain_ocid.setter + def domain_ocid(self, domain_ocid): + """ + Sets the domain_ocid of this OciConsoleSignOnPolicyConsent. + OCI Domain Id (ocid) in which the resource lives. + + **SCIM++ Properties:** + - caseExact: false + - idcsSearchable: false + - multiValued: false + - mutability: readOnly + - required: false + - returned: default + - type: string + - uniqueness: none + + + :param domain_ocid: The domain_ocid of this OciConsoleSignOnPolicyConsent. + :type: str + """ + self._domain_ocid = domain_ocid + + @property + def compartment_ocid(self): + """ + Gets the compartment_ocid of this OciConsoleSignOnPolicyConsent. + OCI Compartment Id (ocid) in which the resource lives. + + **SCIM++ Properties:** + - caseExact: false + - idcsSearchable: false + - multiValued: false + - mutability: readOnly + - required: false + - returned: default + - type: string + - uniqueness: none + + + :return: The compartment_ocid of this OciConsoleSignOnPolicyConsent. + :rtype: str + """ + return self._compartment_ocid + + @compartment_ocid.setter + def compartment_ocid(self, compartment_ocid): + """ + Sets the compartment_ocid of this OciConsoleSignOnPolicyConsent. + OCI Compartment Id (ocid) in which the resource lives. + + **SCIM++ Properties:** + - caseExact: false + - idcsSearchable: false + - multiValued: false + - mutability: readOnly + - required: false + - returned: default + - type: string + - uniqueness: none + + + :param compartment_ocid: The compartment_ocid of this OciConsoleSignOnPolicyConsent. + :type: str + """ + self._compartment_ocid = compartment_ocid + + @property + def tenancy_ocid(self): + """ + Gets the tenancy_ocid of this OciConsoleSignOnPolicyConsent. + OCI Tenant Id (ocid) in which the resource lives. + + **SCIM++ Properties:** + - caseExact: false + - idcsSearchable: false + - multiValued: false + - mutability: readOnly + - required: false + - returned: default + - type: string + - uniqueness: none + + + :return: The tenancy_ocid of this OciConsoleSignOnPolicyConsent. + :rtype: str + """ + return self._tenancy_ocid + + @tenancy_ocid.setter + def tenancy_ocid(self, tenancy_ocid): + """ + Sets the tenancy_ocid of this OciConsoleSignOnPolicyConsent. + OCI Tenant Id (ocid) in which the resource lives. + + **SCIM++ Properties:** + - caseExact: false + - idcsSearchable: false + - multiValued: false + - mutability: readOnly + - required: false + - returned: default + - type: string + - uniqueness: none + + + :param tenancy_ocid: The tenancy_ocid of this OciConsoleSignOnPolicyConsent. + :type: str + """ + self._tenancy_ocid = tenancy_ocid + + @property + def consent_signed_by(self): + """ + **[Required]** Gets the consent_signed_by of this OciConsoleSignOnPolicyConsent. + + :return: The consent_signed_by of this OciConsoleSignOnPolicyConsent. + :rtype: oci.identity_domains.models.OciConsoleSignOnPolicyConsentConsentSignedBy + """ + return self._consent_signed_by + + @consent_signed_by.setter + def consent_signed_by(self, consent_signed_by): + """ + Sets the consent_signed_by of this OciConsoleSignOnPolicyConsent. + + :param consent_signed_by: The consent_signed_by of this OciConsoleSignOnPolicyConsent. + :type: oci.identity_domains.models.OciConsoleSignOnPolicyConsentConsentSignedBy + """ + self._consent_signed_by = consent_signed_by + + @property + def modified_resource(self): + """ + **[Required]** Gets the modified_resource of this OciConsoleSignOnPolicyConsent. + + :return: The modified_resource of this OciConsoleSignOnPolicyConsent. + :rtype: oci.identity_domains.models.OciConsoleSignOnPolicyConsentModifiedResource + """ + return self._modified_resource + + @modified_resource.setter + def modified_resource(self, modified_resource): + """ + Sets the modified_resource of this OciConsoleSignOnPolicyConsent. + + :param modified_resource: The modified_resource of this OciConsoleSignOnPolicyConsent. + :type: oci.identity_domains.models.OciConsoleSignOnPolicyConsentModifiedResource + """ + self._modified_resource = modified_resource + + @property + def policy_resource(self): + """ + **[Required]** Gets the policy_resource of this OciConsoleSignOnPolicyConsent. + + :return: The policy_resource of this OciConsoleSignOnPolicyConsent. + :rtype: oci.identity_domains.models.OciConsoleSignOnPolicyConsentPolicyResource + """ + return self._policy_resource + + @policy_resource.setter + def policy_resource(self, policy_resource): + """ + Sets the policy_resource of this OciConsoleSignOnPolicyConsent. + + :param policy_resource: The policy_resource of this OciConsoleSignOnPolicyConsent. + :type: oci.identity_domains.models.OciConsoleSignOnPolicyConsentPolicyResource + """ + self._policy_resource = policy_resource + + @property + def change_type(self): + """ + **[Required]** Gets the change_type of this OciConsoleSignOnPolicyConsent. + Change Type - MODIFIED or RESTORED_TO_FACTORY_DEFAULT + + **SCIM++ Properties:** + - idcsSearchable: true + - multiValued: false + - mutability: immutable + - required: true + - returned: default + - type: string + - uniqueness: none + + Allowed values for this property are: "MODIFIED", "RESTORED_TO_FACTORY_DEFAULT", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The change_type of this OciConsoleSignOnPolicyConsent. + :rtype: str + """ + return self._change_type + + @change_type.setter + def change_type(self, change_type): + """ + Sets the change_type of this OciConsoleSignOnPolicyConsent. + Change Type - MODIFIED or RESTORED_TO_FACTORY_DEFAULT + + **SCIM++ Properties:** + - idcsSearchable: true + - multiValued: false + - mutability: immutable + - required: true + - returned: default + - type: string + - uniqueness: none + + + :param change_type: The change_type of this OciConsoleSignOnPolicyConsent. + :type: str + """ + allowed_values = ["MODIFIED", "RESTORED_TO_FACTORY_DEFAULT"] + if not value_allowed_none_or_none_sentinel(change_type, allowed_values): + change_type = 'UNKNOWN_ENUM_VALUE' + self._change_type = change_type + + @property + def client_ip(self): + """ + **[Required]** Gets the client_ip of this OciConsoleSignOnPolicyConsent. + Client IP of the Consent Signer + + **SCIM++ Properties:** + - idcsSearchable: false + - multiValued: false + - mutability: immutable + - required: true + - returned: default + - type: string + - uniqueness: none + + + :return: The client_ip of this OciConsoleSignOnPolicyConsent. + :rtype: str + """ + return self._client_ip + + @client_ip.setter + def client_ip(self, client_ip): + """ + Sets the client_ip of this OciConsoleSignOnPolicyConsent. + Client IP of the Consent Signer + + **SCIM++ Properties:** + - idcsSearchable: false + - multiValued: false + - mutability: immutable + - required: true + - returned: default + - type: string + - uniqueness: none + + + :param client_ip: The client_ip of this OciConsoleSignOnPolicyConsent. + :type: str + """ + self._client_ip = client_ip + + @property + def justification(self): + """ + **[Required]** Gets the justification of this OciConsoleSignOnPolicyConsent. + The justification for the change when an identity domain administrator opts to modify the Oracle security defaults for the \"Security Policy for OCI Console\" sign-on policy shipped by Oracle. + + **SCIM++ Properties:** + - idcsSearchable: false + - multiValued: false + - mutability: immutable + - required: true + - returned: default + - type: string + - uniqueness: none + + + :return: The justification of this OciConsoleSignOnPolicyConsent. + :rtype: str + """ + return self._justification + + @justification.setter + def justification(self, justification): + """ + Sets the justification of this OciConsoleSignOnPolicyConsent. + The justification for the change when an identity domain administrator opts to modify the Oracle security defaults for the \"Security Policy for OCI Console\" sign-on policy shipped by Oracle. + + **SCIM++ Properties:** + - idcsSearchable: false + - multiValued: false + - mutability: immutable + - required: true + - returned: default + - type: string + - uniqueness: none + + + :param justification: The justification of this OciConsoleSignOnPolicyConsent. + :type: str + """ + self._justification = justification + + @property + def reason(self): + """ + Gets the reason of this OciConsoleSignOnPolicyConsent. + The detailed reason for the change when an identity domain administrator opts to modify the Oracle security defaults for the \"Security Policy for OCI Console\" sign-on policy shipped by Oracle. + + **SCIM++ Properties:** + - idcsSearchable: false + - multiValued: false + - mutability: immutable + - required: false + - returned: default + - type: string + - uniqueness: none + + + :return: The reason of this OciConsoleSignOnPolicyConsent. + :rtype: str + """ + return self._reason + + @reason.setter + def reason(self, reason): + """ + Sets the reason of this OciConsoleSignOnPolicyConsent. + The detailed reason for the change when an identity domain administrator opts to modify the Oracle security defaults for the \"Security Policy for OCI Console\" sign-on policy shipped by Oracle. + + **SCIM++ Properties:** + - idcsSearchable: false + - multiValued: false + - mutability: immutable + - required: false + - returned: default + - type: string + - uniqueness: none + + + :param reason: The reason of this OciConsoleSignOnPolicyConsent. + :type: str + """ + self._reason = reason + + @property + def time_consent_signed(self): + """ + **[Required]** Gets the time_consent_signed of this OciConsoleSignOnPolicyConsent. + Time when Consent was signed. + + **SCIM++ Properties:** + - idcsSearchable: false + - multiValued: false + - mutability: immutable + - required: true + - returned: default + - type: dateTime + - uniqueness: none + + + :return: The time_consent_signed of this OciConsoleSignOnPolicyConsent. + :rtype: str + """ + return self._time_consent_signed + + @time_consent_signed.setter + def time_consent_signed(self, time_consent_signed): + """ + Sets the time_consent_signed of this OciConsoleSignOnPolicyConsent. + Time when Consent was signed. + + **SCIM++ Properties:** + - idcsSearchable: false + - multiValued: false + - mutability: immutable + - required: true + - returned: default + - type: dateTime + - uniqueness: none + + + :param time_consent_signed: The time_consent_signed of this OciConsoleSignOnPolicyConsent. + :type: str + """ + self._time_consent_signed = time_consent_signed + + @property + def notification_recipients(self): + """ + **[Required]** Gets the notification_recipients of this OciConsoleSignOnPolicyConsent. + The recipients of the email notification for the change in consent. + + **SCIM++ Properties:** + - idcsSearchable: false + - multiValued: true + - mutability: immutable + - required: true + - returned: default + - type: string + + + :return: The notification_recipients of this OciConsoleSignOnPolicyConsent. + :rtype: list[str] + """ + return self._notification_recipients + + @notification_recipients.setter + def notification_recipients(self, notification_recipients): + """ + Sets the notification_recipients of this OciConsoleSignOnPolicyConsent. + The recipients of the email notification for the change in consent. + + **SCIM++ Properties:** + - idcsSearchable: false + - multiValued: true + - mutability: immutable + - required: true + - returned: default + - type: string + + + :param notification_recipients: The notification_recipients of this OciConsoleSignOnPolicyConsent. + :type: list[str] + """ + self._notification_recipients = notification_recipients + + 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/identity_domains/models/oci_console_sign_on_policy_consent_consent_signed_by.py b/src/oci/identity_domains/models/oci_console_sign_on_policy_consent_consent_signed_by.py new file mode 100644 index 000000000..6ec062c54 --- /dev/null +++ b/src/oci/identity_domains/models/oci_console_sign_on_policy_consent_consent_signed_by.py @@ -0,0 +1,260 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: v1 + + +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 OciConsoleSignOnPolicyConsentConsentSignedBy(object): + """ + User or App that signs the consent. + + **SCIM++ Properties:** + - idcsSearchable: true + - multiValued: false + - mutability: immutable + - required: true + - returned: default + - type: complex + - uniqueness: none + """ + + #: A constant which can be used with the type property of a OciConsoleSignOnPolicyConsentConsentSignedBy. + #: This constant has a value of "User" + TYPE_USER = "User" + + #: A constant which can be used with the type property of a OciConsoleSignOnPolicyConsentConsentSignedBy. + #: This constant has a value of "App" + TYPE_APP = "App" + + def __init__(self, **kwargs): + """ + Initializes a new OciConsoleSignOnPolicyConsentConsentSignedBy object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param value: + The value to assign to the value property of this OciConsoleSignOnPolicyConsentConsentSignedBy. + :type value: str + + :param ocid: + The value to assign to the ocid property of this OciConsoleSignOnPolicyConsentConsentSignedBy. + :type ocid: str + + :param display_name: + The value to assign to the display_name property of this OciConsoleSignOnPolicyConsentConsentSignedBy. + :type display_name: str + + :param type: + The value to assign to the type property of this OciConsoleSignOnPolicyConsentConsentSignedBy. + Allowed values for this property are: "User", "App", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type type: str + + """ + self.swagger_types = { + 'value': 'str', + 'ocid': 'str', + 'display_name': 'str', + 'type': 'str' + } + + self.attribute_map = { + 'value': 'value', + 'ocid': 'ocid', + 'display_name': 'displayName', + 'type': 'type' + } + + self._value = None + self._ocid = None + self._display_name = None + self._type = None + + @property + def value(self): + """ + **[Required]** Gets the value of this OciConsoleSignOnPolicyConsentConsentSignedBy. + Id of the User or App that signed consent. + + **SCIM++ Properties:** + - caseExact: true + - idcsSearchable: true + - multiValued: false + - mutability: immutable + - required: true + - returned: default + - type: string + + + :return: The value of this OciConsoleSignOnPolicyConsentConsentSignedBy. + :rtype: str + """ + return self._value + + @value.setter + def value(self, value): + """ + Sets the value of this OciConsoleSignOnPolicyConsentConsentSignedBy. + Id of the User or App that signed consent. + + **SCIM++ Properties:** + - caseExact: true + - idcsSearchable: true + - multiValued: false + - mutability: immutable + - required: true + - returned: default + - type: string + + + :param value: The value of this OciConsoleSignOnPolicyConsentConsentSignedBy. + :type: str + """ + self._value = value + + @property + def ocid(self): + """ + **[Required]** Gets the ocid of this OciConsoleSignOnPolicyConsentConsentSignedBy. + OCID of the User or App that signed consent. + + **SCIM++ Properties:** + - caseExact: true + - idcsSearchable: true + - multiValued: false + - mutability: immutable + - required: true + - returned: default + - type: string + + + :return: The ocid of this OciConsoleSignOnPolicyConsentConsentSignedBy. + :rtype: str + """ + return self._ocid + + @ocid.setter + def ocid(self, ocid): + """ + Sets the ocid of this OciConsoleSignOnPolicyConsentConsentSignedBy. + OCID of the User or App that signed consent. + + **SCIM++ Properties:** + - caseExact: true + - idcsSearchable: true + - multiValued: false + - mutability: immutable + - required: true + - returned: default + - type: string + + + :param ocid: The ocid of this OciConsoleSignOnPolicyConsentConsentSignedBy. + :type: str + """ + self._ocid = ocid + + @property + def display_name(self): + """ + **[Required]** Gets the display_name of this OciConsoleSignOnPolicyConsentConsentSignedBy. + Name of the User or App that signed consent. + + **SCIM++ Properties:** + - caseExact: false + - idcsSearchable: false + - multiValued: false + - mutability: immutable + - required: true + - returned: default + - type: string + + + :return: The display_name of this OciConsoleSignOnPolicyConsentConsentSignedBy. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this OciConsoleSignOnPolicyConsentConsentSignedBy. + Name of the User or App that signed consent. + + **SCIM++ Properties:** + - caseExact: false + - idcsSearchable: false + - multiValued: false + - mutability: immutable + - required: true + - returned: default + - type: string + + + :param display_name: The display_name of this OciConsoleSignOnPolicyConsentConsentSignedBy. + :type: str + """ + self._display_name = display_name + + @property + def type(self): + """ + **[Required]** Gets the type of this OciConsoleSignOnPolicyConsentConsentSignedBy. + Type of principal that signed consent: User or App. + + **SCIM++ Properties:** + - idcsSearchable: true + - multiValued: false + - mutability: immutable + - required: true + - returned: default + - type: string + + Allowed values for this property are: "User", "App", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The type of this OciConsoleSignOnPolicyConsentConsentSignedBy. + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """ + Sets the type of this OciConsoleSignOnPolicyConsentConsentSignedBy. + Type of principal that signed consent: User or App. + + **SCIM++ Properties:** + - idcsSearchable: true + - multiValued: false + - mutability: immutable + - required: true + - returned: default + - type: string + + + :param type: The type of this OciConsoleSignOnPolicyConsentConsentSignedBy. + :type: str + """ + allowed_values = ["User", "App"] + if not value_allowed_none_or_none_sentinel(type, allowed_values): + type = 'UNKNOWN_ENUM_VALUE' + self._type = type + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/identity_domains/models/oci_console_sign_on_policy_consent_modified_resource.py b/src/oci/identity_domains/models/oci_console_sign_on_policy_consent_modified_resource.py new file mode 100644 index 000000000..947a89692 --- /dev/null +++ b/src/oci/identity_domains/models/oci_console_sign_on_policy_consent_modified_resource.py @@ -0,0 +1,223 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: v1 + + +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 OciConsoleSignOnPolicyConsentModifiedResource(object): + """ + The modified Policy, Rule, ConditionGroup or Condition during consent signing. + + **SCIM++ Properties:** + - idcsSearchable: false + - multiValued: false + - mutability: immutable + - required: true + - returned: default + - type: complex + - uniqueness: none + """ + + #: A constant which can be used with the type property of a OciConsoleSignOnPolicyConsentModifiedResource. + #: This constant has a value of "Policy" + TYPE_POLICY = "Policy" + + #: A constant which can be used with the type property of a OciConsoleSignOnPolicyConsentModifiedResource. + #: This constant has a value of "Rule" + TYPE_RULE = "Rule" + + #: A constant which can be used with the type property of a OciConsoleSignOnPolicyConsentModifiedResource. + #: This constant has a value of "ConditionGroup" + TYPE_CONDITION_GROUP = "ConditionGroup" + + #: A constant which can be used with the type property of a OciConsoleSignOnPolicyConsentModifiedResource. + #: This constant has a value of "Condition" + TYPE_CONDITION = "Condition" + + def __init__(self, **kwargs): + """ + Initializes a new OciConsoleSignOnPolicyConsentModifiedResource object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param value: + The value to assign to the value property of this OciConsoleSignOnPolicyConsentModifiedResource. + :type value: str + + :param ocid: + The value to assign to the ocid property of this OciConsoleSignOnPolicyConsentModifiedResource. + :type ocid: str + + :param type: + The value to assign to the type property of this OciConsoleSignOnPolicyConsentModifiedResource. + Allowed values for this property are: "Policy", "Rule", "ConditionGroup", "Condition", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type type: str + + """ + self.swagger_types = { + 'value': 'str', + 'ocid': 'str', + 'type': 'str' + } + + self.attribute_map = { + 'value': 'value', + 'ocid': 'ocid', + 'type': 'type' + } + + self._value = None + self._ocid = None + self._type = None + + @property + def value(self): + """ + **[Required]** Gets the value of this OciConsoleSignOnPolicyConsentModifiedResource. + Modified Policy, Rule, ConditionGroup or Condition Id. + + **SCIM++ Properties:** + - caseExact: true + - idcsSearchable: false + - multiValued: false + - mutability: immutable + - required: true + - returned: default + - type: string + + + :return: The value of this OciConsoleSignOnPolicyConsentModifiedResource. + :rtype: str + """ + return self._value + + @value.setter + def value(self, value): + """ + Sets the value of this OciConsoleSignOnPolicyConsentModifiedResource. + Modified Policy, Rule, ConditionGroup or Condition Id. + + **SCIM++ Properties:** + - caseExact: true + - idcsSearchable: false + - multiValued: false + - mutability: immutable + - required: true + - returned: default + - type: string + + + :param value: The value of this OciConsoleSignOnPolicyConsentModifiedResource. + :type: str + """ + self._value = value + + @property + def ocid(self): + """ + **[Required]** Gets the ocid of this OciConsoleSignOnPolicyConsentModifiedResource. + The modified Policy, Rule, ConditionGroup, or Condition OCID. + + **SCIM++ Properties:** + - caseExact: true + - idcsSearchable: false + - multiValued: false + - mutability: immutable + - required: true + - returned: default + - type: string + + + :return: The ocid of this OciConsoleSignOnPolicyConsentModifiedResource. + :rtype: str + """ + return self._ocid + + @ocid.setter + def ocid(self, ocid): + """ + Sets the ocid of this OciConsoleSignOnPolicyConsentModifiedResource. + The modified Policy, Rule, ConditionGroup, or Condition OCID. + + **SCIM++ Properties:** + - caseExact: true + - idcsSearchable: false + - multiValued: false + - mutability: immutable + - required: true + - returned: default + - type: string + + + :param ocid: The ocid of this OciConsoleSignOnPolicyConsentModifiedResource. + :type: str + """ + self._ocid = ocid + + @property + def type(self): + """ + **[Required]** Gets the type of this OciConsoleSignOnPolicyConsentModifiedResource. + The Modified Resource type - Policy, Rule, ConditionGroup, or Condition. A label that indicates the resource type. + + **SCIM++ Properties:** + - idcsSearchable: false + - multiValued: false + - mutability: immutable + - idcsDefaultValue: Policy + - required: true + - returned: default + - type: string + - uniqueness: none + + Allowed values for this property are: "Policy", "Rule", "ConditionGroup", "Condition", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The type of this OciConsoleSignOnPolicyConsentModifiedResource. + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """ + Sets the type of this OciConsoleSignOnPolicyConsentModifiedResource. + The Modified Resource type - Policy, Rule, ConditionGroup, or Condition. A label that indicates the resource type. + + **SCIM++ Properties:** + - idcsSearchable: false + - multiValued: false + - mutability: immutable + - idcsDefaultValue: Policy + - required: true + - returned: default + - type: string + - uniqueness: none + + + :param type: The type of this OciConsoleSignOnPolicyConsentModifiedResource. + :type: str + """ + allowed_values = ["Policy", "Rule", "ConditionGroup", "Condition"] + if not value_allowed_none_or_none_sentinel(type, allowed_values): + type = 'UNKNOWN_ENUM_VALUE' + self._type = type + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/identity_domains/models/oci_console_sign_on_policy_consent_policy_resource.py b/src/oci/identity_domains/models/oci_console_sign_on_policy_consent_policy_resource.py new file mode 100644 index 000000000..1111d1446 --- /dev/null +++ b/src/oci/identity_domains/models/oci_console_sign_on_policy_consent_policy_resource.py @@ -0,0 +1,148 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: v1 + + +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 OciConsoleSignOnPolicyConsentPolicyResource(object): + """ + Policy Resource + + **SCIM++ Properties:** + - idcsSearchable: true + - multiValued: false + - mutability: immutable + - required: true + - returned: default + - type: complex + - uniqueness: none + """ + + def __init__(self, **kwargs): + """ + Initializes a new OciConsoleSignOnPolicyConsentPolicyResource object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param value: + The value to assign to the value property of this OciConsoleSignOnPolicyConsentPolicyResource. + :type value: str + + :param ocid: + The value to assign to the ocid property of this OciConsoleSignOnPolicyConsentPolicyResource. + :type ocid: str + + """ + self.swagger_types = { + 'value': 'str', + 'ocid': 'str' + } + + self.attribute_map = { + 'value': 'value', + 'ocid': 'ocid' + } + + self._value = None + self._ocid = None + + @property + def value(self): + """ + **[Required]** Gets the value of this OciConsoleSignOnPolicyConsentPolicyResource. + Policy Resource Id + + **SCIM++ Properties:** + - caseExact: true + - idcsSearchable: true + - multiValued: false + - mutability: immutable + - required: true + - returned: default + - type: string + + + :return: The value of this OciConsoleSignOnPolicyConsentPolicyResource. + :rtype: str + """ + return self._value + + @value.setter + def value(self, value): + """ + Sets the value of this OciConsoleSignOnPolicyConsentPolicyResource. + Policy Resource Id + + **SCIM++ Properties:** + - caseExact: true + - idcsSearchable: true + - multiValued: false + - mutability: immutable + - required: true + - returned: default + - type: string + + + :param value: The value of this OciConsoleSignOnPolicyConsentPolicyResource. + :type: str + """ + self._value = value + + @property + def ocid(self): + """ + **[Required]** Gets the ocid of this OciConsoleSignOnPolicyConsentPolicyResource. + Policy Resource Ocid + + **SCIM++ Properties:** + - caseExact: true + - idcsSearchable: true + - multiValued: false + - mutability: immutable + - required: true + - returned: default + - type: string + + + :return: The ocid of this OciConsoleSignOnPolicyConsentPolicyResource. + :rtype: str + """ + return self._ocid + + @ocid.setter + def ocid(self, ocid): + """ + Sets the ocid of this OciConsoleSignOnPolicyConsentPolicyResource. + Policy Resource Ocid + + **SCIM++ Properties:** + - caseExact: true + - idcsSearchable: true + - multiValued: false + - mutability: immutable + - required: true + - returned: default + - type: string + + + :param ocid: The ocid of this OciConsoleSignOnPolicyConsentPolicyResource. + :type: str + """ + self._ocid = ocid + + 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/identity_domains/models/oci_console_sign_on_policy_consent_search_request.py b/src/oci/identity_domains/models/oci_console_sign_on_policy_consent_search_request.py new file mode 100644 index 000000000..0a77d2af1 --- /dev/null +++ b/src/oci/identity_domains/models/oci_console_sign_on_policy_consent_search_request.py @@ -0,0 +1,364 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: v1 + + +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 OciConsoleSignOnPolicyConsentSearchRequest(object): + """ + Clients MAY execute queries without passing parameters on the URL by using the HTTP POST verb combined with the **.search** path extension. The inclusion of **.search** on the end of a valid SCIM endpoint SHALL be used to indicate the HTTP POST verb is intended to be a query operation. To create a new query result set, a SCIM client sends an HTTP POST request to the desired SCIM resource endpoint (ending in **.search**). The body of the POST request MAY include any of the parameters. + """ + + #: A constant which can be used with the attribute_sets property of a OciConsoleSignOnPolicyConsentSearchRequest. + #: This constant has a value of "all" + ATTRIBUTE_SETS_ALL = "all" + + #: A constant which can be used with the attribute_sets property of a OciConsoleSignOnPolicyConsentSearchRequest. + #: This constant has a value of "always" + ATTRIBUTE_SETS_ALWAYS = "always" + + #: A constant which can be used with the attribute_sets property of a OciConsoleSignOnPolicyConsentSearchRequest. + #: This constant has a value of "never" + ATTRIBUTE_SETS_NEVER = "never" + + #: A constant which can be used with the attribute_sets property of a OciConsoleSignOnPolicyConsentSearchRequest. + #: This constant has a value of "request" + ATTRIBUTE_SETS_REQUEST = "request" + + #: A constant which can be used with the attribute_sets property of a OciConsoleSignOnPolicyConsentSearchRequest. + #: This constant has a value of "default" + ATTRIBUTE_SETS_DEFAULT = "default" + + #: A constant which can be used with the sort_order property of a OciConsoleSignOnPolicyConsentSearchRequest. + #: This constant has a value of "ASCENDING" + SORT_ORDER_ASCENDING = "ASCENDING" + + #: A constant which can be used with the sort_order property of a OciConsoleSignOnPolicyConsentSearchRequest. + #: This constant has a value of "DESCENDING" + SORT_ORDER_DESCENDING = "DESCENDING" + + def __init__(self, **kwargs): + """ + Initializes a new OciConsoleSignOnPolicyConsentSearchRequest object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param schemas: + The value to assign to the schemas property of this OciConsoleSignOnPolicyConsentSearchRequest. + :type schemas: list[str] + + :param attributes: + The value to assign to the attributes property of this OciConsoleSignOnPolicyConsentSearchRequest. + :type attributes: list[str] + + :param attribute_sets: + The value to assign to the attribute_sets property of this OciConsoleSignOnPolicyConsentSearchRequest. + Allowed values for items in this list are: "all", "always", "never", "request", "default" + :type attribute_sets: list[str] + + :param filter: + The value to assign to the filter property of this OciConsoleSignOnPolicyConsentSearchRequest. + :type filter: str + + :param sort_by: + The value to assign to the sort_by property of this OciConsoleSignOnPolicyConsentSearchRequest. + :type sort_by: str + + :param sort_order: + The value to assign to the sort_order property of this OciConsoleSignOnPolicyConsentSearchRequest. + Allowed values for this property are: "ASCENDING", "DESCENDING" + :type sort_order: str + + :param start_index: + The value to assign to the start_index property of this OciConsoleSignOnPolicyConsentSearchRequest. + :type start_index: int + + :param count: + The value to assign to the count property of this OciConsoleSignOnPolicyConsentSearchRequest. + :type count: int + + """ + self.swagger_types = { + 'schemas': 'list[str]', + 'attributes': 'list[str]', + 'attribute_sets': 'list[str]', + 'filter': 'str', + 'sort_by': 'str', + 'sort_order': 'str', + 'start_index': 'int', + 'count': 'int' + } + + self.attribute_map = { + 'schemas': 'schemas', + 'attributes': 'attributes', + 'attribute_sets': 'attributeSets', + 'filter': 'filter', + 'sort_by': 'sortBy', + 'sort_order': 'sortOrder', + 'start_index': 'startIndex', + 'count': 'count' + } + + self._schemas = None + self._attributes = None + self._attribute_sets = None + self._filter = None + self._sort_by = None + self._sort_order = None + self._start_index = None + self._count = None + + @property + def schemas(self): + """ + **[Required]** Gets the schemas of this OciConsoleSignOnPolicyConsentSearchRequest. + The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. Query requests MUST be identified using the following URI: \"urn:ietf:params:scim:api:messages:2.0:SearchRequest\" REQUIRED. + + + :return: The schemas of this OciConsoleSignOnPolicyConsentSearchRequest. + :rtype: list[str] + """ + return self._schemas + + @schemas.setter + def schemas(self, schemas): + """ + Sets the schemas of this OciConsoleSignOnPolicyConsentSearchRequest. + The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. Query requests MUST be identified using the following URI: \"urn:ietf:params:scim:api:messages:2.0:SearchRequest\" REQUIRED. + + + :param schemas: The schemas of this OciConsoleSignOnPolicyConsentSearchRequest. + :type: list[str] + """ + self._schemas = schemas + + @property + def attributes(self): + """ + Gets the attributes of this OciConsoleSignOnPolicyConsentSearchRequest. + A multi-valued list of strings indicating the names of resource attributes to return in the response overriding the set of attributes that would be returned by default. Attribute names MUST be in standard attribute notation (`Section 3.10`__) form. See (`additional retrieval query parameters`__). OPTIONAL. + + __ https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.10 + __ https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.9 + + + :return: The attributes of this OciConsoleSignOnPolicyConsentSearchRequest. + :rtype: list[str] + """ + return self._attributes + + @attributes.setter + def attributes(self, attributes): + """ + Sets the attributes of this OciConsoleSignOnPolicyConsentSearchRequest. + A multi-valued list of strings indicating the names of resource attributes to return in the response overriding the set of attributes that would be returned by default. Attribute names MUST be in standard attribute notation (`Section 3.10`__) form. See (`additional retrieval query parameters`__). OPTIONAL. + + __ https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.10 + __ https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.9 + + + :param attributes: The attributes of this OciConsoleSignOnPolicyConsentSearchRequest. + :type: list[str] + """ + self._attributes = attributes + + @property + def attribute_sets(self): + """ + Gets the attribute_sets of this OciConsoleSignOnPolicyConsentSearchRequest. + A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If \"attributes\" query parameter is also available, union of the two is fetched. Valid values : all, always, never, request, default. Values are case-insensitive. OPTIONAL. + + Allowed values for items in this list are: "all", "always", "never", "request", "default" + + + :return: The attribute_sets of this OciConsoleSignOnPolicyConsentSearchRequest. + :rtype: list[str] + """ + return self._attribute_sets + + @attribute_sets.setter + def attribute_sets(self, attribute_sets): + """ + Sets the attribute_sets of this OciConsoleSignOnPolicyConsentSearchRequest. + A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If \"attributes\" query parameter is also available, union of the two is fetched. Valid values : all, always, never, request, default. Values are case-insensitive. OPTIONAL. + + + :param attribute_sets: The attribute_sets of this OciConsoleSignOnPolicyConsentSearchRequest. + :type: list[str] + """ + allowed_values = ["all", "always", "never", "request", "default"] + + if attribute_sets and attribute_sets is not NONE_SENTINEL: + for value in attribute_sets: + if not value_allowed_none_or_none_sentinel(value, allowed_values): + raise ValueError( + f"Invalid value for `attribute_sets`, must be None or one of {allowed_values}" + ) + self._attribute_sets = attribute_sets + + @property + def filter(self): + """ + Gets the filter of this OciConsoleSignOnPolicyConsentSearchRequest. + The filter string that is used to request a subset of resources. The filter string MUST be a valid filter expression. See `Section 3.4.2.2`__. OPTIONAL. + + __ https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.2 + + + :return: The filter of this OciConsoleSignOnPolicyConsentSearchRequest. + :rtype: str + """ + return self._filter + + @filter.setter + def filter(self, filter): + """ + Sets the filter of this OciConsoleSignOnPolicyConsentSearchRequest. + The filter string that is used to request a subset of resources. The filter string MUST be a valid filter expression. See `Section 3.4.2.2`__. OPTIONAL. + + __ https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.2 + + + :param filter: The filter of this OciConsoleSignOnPolicyConsentSearchRequest. + :type: str + """ + self._filter = filter + + @property + def sort_by(self): + """ + Gets the sort_by of this OciConsoleSignOnPolicyConsentSearchRequest. + A string that indicates the attribute whose value SHALL be used to order the returned responses. The sortBy attribute MUST be in standard attribute notation (`Section 3.10`__) form. See `Sorting section`__. OPTIONAL. + + __ https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.10 + __ https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.3 + + + :return: The sort_by of this OciConsoleSignOnPolicyConsentSearchRequest. + :rtype: str + """ + return self._sort_by + + @sort_by.setter + def sort_by(self, sort_by): + """ + Sets the sort_by of this OciConsoleSignOnPolicyConsentSearchRequest. + A string that indicates the attribute whose value SHALL be used to order the returned responses. The sortBy attribute MUST be in standard attribute notation (`Section 3.10`__) form. See `Sorting section`__. OPTIONAL. + + __ https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.10 + __ https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.3 + + + :param sort_by: The sort_by of this OciConsoleSignOnPolicyConsentSearchRequest. + :type: str + """ + self._sort_by = sort_by + + @property + def sort_order(self): + """ + Gets the sort_order of this OciConsoleSignOnPolicyConsentSearchRequest. + A string that indicates the order in which the sortBy parameter is applied. Allowed values are \"ascending\" and \"descending\". See (`Sorting Section`__). OPTIONAL. + + __ https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.3 + + Allowed values for this property are: "ASCENDING", "DESCENDING" + + + :return: The sort_order of this OciConsoleSignOnPolicyConsentSearchRequest. + :rtype: str + """ + return self._sort_order + + @sort_order.setter + def sort_order(self, sort_order): + """ + Sets the sort_order of this OciConsoleSignOnPolicyConsentSearchRequest. + A string that indicates the order in which the sortBy parameter is applied. Allowed values are \"ascending\" and \"descending\". See (`Sorting Section`__). OPTIONAL. + + __ https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.3 + + + :param sort_order: The sort_order of this OciConsoleSignOnPolicyConsentSearchRequest. + :type: str + """ + allowed_values = ["ASCENDING", "DESCENDING"] + if not value_allowed_none_or_none_sentinel(sort_order, allowed_values): + raise ValueError( + f"Invalid value for `sort_order`, must be None or one of {allowed_values}" + ) + self._sort_order = sort_order + + @property + def start_index(self): + """ + Gets the start_index of this OciConsoleSignOnPolicyConsentSearchRequest. + An integer that indicates the 1-based index of the first query result. See `Pagination Section`__. OPTIONAL. + + __ https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.4 + + + :return: The start_index of this OciConsoleSignOnPolicyConsentSearchRequest. + :rtype: int + """ + return self._start_index + + @start_index.setter + def start_index(self, start_index): + """ + Sets the start_index of this OciConsoleSignOnPolicyConsentSearchRequest. + An integer that indicates the 1-based index of the first query result. See `Pagination Section`__. OPTIONAL. + + __ https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.4 + + + :param start_index: The start_index of this OciConsoleSignOnPolicyConsentSearchRequest. + :type: int + """ + self._start_index = start_index + + @property + def count(self): + """ + Gets the count of this OciConsoleSignOnPolicyConsentSearchRequest. + An integer that indicates the desired maximum number of query results per page. 1000 is the largest value that you can use. See the Pagination section of the System for Cross-Domain Identity Management Protocol specification for more information. (`Section 3.4.2.4`__). OPTIONAL. + + __ https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.4 + + + :return: The count of this OciConsoleSignOnPolicyConsentSearchRequest. + :rtype: int + """ + return self._count + + @count.setter + def count(self, count): + """ + Sets the count of this OciConsoleSignOnPolicyConsentSearchRequest. + An integer that indicates the desired maximum number of query results per page. 1000 is the largest value that you can use. See the Pagination section of the System for Cross-Domain Identity Management Protocol specification for more information. (`Section 3.4.2.4`__). OPTIONAL. + + __ https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.4 + + + :param count: The count of this OciConsoleSignOnPolicyConsentSearchRequest. + :type: int + """ + self._count = count + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/identity_domains/models/oci_console_sign_on_policy_consents.py b/src/oci/identity_domains/models/oci_console_sign_on_policy_consents.py new file mode 100644 index 000000000..6eee77835 --- /dev/null +++ b/src/oci/identity_domains/models/oci_console_sign_on_policy_consents.py @@ -0,0 +1,196 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: v1 + + +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 OciConsoleSignOnPolicyConsents(object): + """ + The SCIM protocol defines a standard set of query parameters that can be used to filter, sort, and paginate to return zero or more resources in a query response. Queries MAY be made against a single resource or a resource type endpoint (e.g., /Users), or the service provider Base URI. + """ + + def __init__(self, **kwargs): + """ + Initializes a new OciConsoleSignOnPolicyConsents object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param schemas: + The value to assign to the schemas property of this OciConsoleSignOnPolicyConsents. + :type schemas: list[str] + + :param total_results: + The value to assign to the total_results property of this OciConsoleSignOnPolicyConsents. + :type total_results: int + + :param resources: + The value to assign to the resources property of this OciConsoleSignOnPolicyConsents. + :type resources: list[oci.identity_domains.models.OciConsoleSignOnPolicyConsent] + + :param start_index: + The value to assign to the start_index property of this OciConsoleSignOnPolicyConsents. + :type start_index: int + + :param items_per_page: + The value to assign to the items_per_page property of this OciConsoleSignOnPolicyConsents. + :type items_per_page: int + + """ + self.swagger_types = { + 'schemas': 'list[str]', + 'total_results': 'int', + 'resources': 'list[OciConsoleSignOnPolicyConsent]', + 'start_index': 'int', + 'items_per_page': 'int' + } + + self.attribute_map = { + 'schemas': 'schemas', + 'total_results': 'totalResults', + 'resources': 'Resources', + 'start_index': 'startIndex', + 'items_per_page': 'itemsPerPage' + } + + self._schemas = None + self._total_results = None + self._resources = None + self._start_index = None + self._items_per_page = None + + @property + def schemas(self): + """ + **[Required]** Gets the schemas of this OciConsoleSignOnPolicyConsents. + The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. All representations of SCIM schema MUST include a non-zero value array with value(s) of the URIs supported by that representation. Duplicate values MUST NOT be included. Value order is not specified and MUST not impact behavior. REQUIRED. + + + :return: The schemas of this OciConsoleSignOnPolicyConsents. + :rtype: list[str] + """ + return self._schemas + + @schemas.setter + def schemas(self, schemas): + """ + Sets the schemas of this OciConsoleSignOnPolicyConsents. + The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. All representations of SCIM schema MUST include a non-zero value array with value(s) of the URIs supported by that representation. Duplicate values MUST NOT be included. Value order is not specified and MUST not impact behavior. REQUIRED. + + + :param schemas: The schemas of this OciConsoleSignOnPolicyConsents. + :type: list[str] + """ + self._schemas = schemas + + @property + def total_results(self): + """ + **[Required]** Gets the total_results of this OciConsoleSignOnPolicyConsents. + The total number of results returned by the list or query operation. The value may be larger than the number of resources returned such as when returning a single page of results where multiple pages are available. REQUIRED. + + + :return: The total_results of this OciConsoleSignOnPolicyConsents. + :rtype: int + """ + return self._total_results + + @total_results.setter + def total_results(self, total_results): + """ + Sets the total_results of this OciConsoleSignOnPolicyConsents. + The total number of results returned by the list or query operation. The value may be larger than the number of resources returned such as when returning a single page of results where multiple pages are available. REQUIRED. + + + :param total_results: The total_results of this OciConsoleSignOnPolicyConsents. + :type: int + """ + self._total_results = total_results + + @property + def resources(self): + """ + **[Required]** Gets the resources of this OciConsoleSignOnPolicyConsents. + A multi-valued list of complex objects containing the requested resources. This MAY be a subset of the full set of resources if pagination is requested. REQUIRED if \"totalResults\" is non-zero. + + + :return: The resources of this OciConsoleSignOnPolicyConsents. + :rtype: list[oci.identity_domains.models.OciConsoleSignOnPolicyConsent] + """ + return self._resources + + @resources.setter + def resources(self, resources): + """ + Sets the resources of this OciConsoleSignOnPolicyConsents. + A multi-valued list of complex objects containing the requested resources. This MAY be a subset of the full set of resources if pagination is requested. REQUIRED if \"totalResults\" is non-zero. + + + :param resources: The resources of this OciConsoleSignOnPolicyConsents. + :type: list[oci.identity_domains.models.OciConsoleSignOnPolicyConsent] + """ + self._resources = resources + + @property + def start_index(self): + """ + **[Required]** Gets the start_index of this OciConsoleSignOnPolicyConsents. + The 1-based index of the first result in the current set of list results. REQUIRED when partial results returned due to pagination. + + + :return: The start_index of this OciConsoleSignOnPolicyConsents. + :rtype: int + """ + return self._start_index + + @start_index.setter + def start_index(self, start_index): + """ + Sets the start_index of this OciConsoleSignOnPolicyConsents. + The 1-based index of the first result in the current set of list results. REQUIRED when partial results returned due to pagination. + + + :param start_index: The start_index of this OciConsoleSignOnPolicyConsents. + :type: int + """ + self._start_index = start_index + + @property + def items_per_page(self): + """ + **[Required]** Gets the items_per_page of this OciConsoleSignOnPolicyConsents. + The number of resources returned in a list response page. REQUIRED when partial results returned due to pagination. + + + :return: The items_per_page of this OciConsoleSignOnPolicyConsents. + :rtype: int + """ + return self._items_per_page + + @items_per_page.setter + def items_per_page(self, items_per_page): + """ + Sets the items_per_page of this OciConsoleSignOnPolicyConsents. + The number of resources returned in a list response page. REQUIRED when partial results returned due to pagination. + + + :param items_per_page: The items_per_page of this OciConsoleSignOnPolicyConsents. + :type: int + """ + self._items_per_page = items_per_page + + 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/identity_domains/models/policy.py b/src/oci/identity_domains/models/policy.py index 78cca2d7b..dbf119f3d 100644 --- a/src/oci/identity_domains/models/policy.py +++ b/src/oci/identity_domains/models/policy.py @@ -114,6 +114,10 @@ def __init__(self, **kwargs): The value to assign to the policy_type property of this Policy. :type policy_type: oci.identity_domains.models.PolicyPolicyType + :param urn_ietf_params_scim_schemas_oracle_idcs_extension_ociconsolesignonpolicyconsent_policy: + The value to assign to the urn_ietf_params_scim_schemas_oracle_idcs_extension_ociconsolesignonpolicyconsent_policy property of this Policy. + :type urn_ietf_params_scim_schemas_oracle_idcs_extension_ociconsolesignonpolicyconsent_policy: oci.identity_domains.models.PolicyExtensionOciconsolesignonpolicyconsentPolicy + """ self.swagger_types = { 'id': 'str', @@ -135,7 +139,8 @@ def __init__(self, **kwargs): 'active': 'bool', 'policy_groovy': 'str', 'rules': 'list[PolicyRules]', - 'policy_type': 'PolicyPolicyType' + 'policy_type': 'PolicyPolicyType', + 'urn_ietf_params_scim_schemas_oracle_idcs_extension_ociconsolesignonpolicyconsent_policy': 'PolicyExtensionOciconsolesignonpolicyconsentPolicy' } self.attribute_map = { @@ -158,7 +163,8 @@ def __init__(self, **kwargs): 'active': 'active', 'policy_groovy': 'policyGroovy', 'rules': 'rules', - 'policy_type': 'policyType' + 'policy_type': 'policyType', + 'urn_ietf_params_scim_schemas_oracle_idcs_extension_ociconsolesignonpolicyconsent_policy': 'urn:ietf:params:scim:schemas:oracle:idcs:extension:ociconsolesignonpolicyconsent:Policy' } self._id = None @@ -181,6 +187,7 @@ def __init__(self, **kwargs): self._policy_groovy = None self._rules = None self._policy_type = None + self._urn_ietf_params_scim_schemas_oracle_idcs_extension_ociconsolesignonpolicyconsent_policy = None @property def id(self): @@ -430,6 +437,7 @@ def tags(self): **SCIM++ Properties:** - idcsCompositeKey: [key, value] + - idcsCsvAttributeNameMappings: [[columnHeaderName:Tag Key, mapsTo:tags.key], [columnHeaderName:Tag Value, mapsTo:tags.value]] - idcsSearchable: true - multiValued: true - mutability: readWrite @@ -452,6 +460,7 @@ def tags(self, tags): **SCIM++ Properties:** - idcsCompositeKey: [key, value] + - idcsCsvAttributeNameMappings: [[columnHeaderName:Tag Key, mapsTo:tags.key], [columnHeaderName:Tag Value, mapsTo:tags.value]] - idcsSearchable: true - multiValued: true - mutability: readWrite @@ -966,6 +975,26 @@ def policy_type(self, policy_type): """ self._policy_type = policy_type + @property + def urn_ietf_params_scim_schemas_oracle_idcs_extension_ociconsolesignonpolicyconsent_policy(self): + """ + Gets the urn_ietf_params_scim_schemas_oracle_idcs_extension_ociconsolesignonpolicyconsent_policy of this Policy. + + :return: The urn_ietf_params_scim_schemas_oracle_idcs_extension_ociconsolesignonpolicyconsent_policy of this Policy. + :rtype: oci.identity_domains.models.PolicyExtensionOciconsolesignonpolicyconsentPolicy + """ + return self._urn_ietf_params_scim_schemas_oracle_idcs_extension_ociconsolesignonpolicyconsent_policy + + @urn_ietf_params_scim_schemas_oracle_idcs_extension_ociconsolesignonpolicyconsent_policy.setter + def urn_ietf_params_scim_schemas_oracle_idcs_extension_ociconsolesignonpolicyconsent_policy(self, urn_ietf_params_scim_schemas_oracle_idcs_extension_ociconsolesignonpolicyconsent_policy): + """ + Sets the urn_ietf_params_scim_schemas_oracle_idcs_extension_ociconsolesignonpolicyconsent_policy of this Policy. + + :param urn_ietf_params_scim_schemas_oracle_idcs_extension_ociconsolesignonpolicyconsent_policy: The urn_ietf_params_scim_schemas_oracle_idcs_extension_ociconsolesignonpolicyconsent_policy of this Policy. + :type: oci.identity_domains.models.PolicyExtensionOciconsolesignonpolicyconsentPolicy + """ + self._urn_ietf_params_scim_schemas_oracle_idcs_extension_ociconsolesignonpolicyconsent_policy = urn_ietf_params_scim_schemas_oracle_idcs_extension_ociconsolesignonpolicyconsent_policy + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/identity_domains/models/policy_extension_ociconsolesignonpolicyconsent_policy.py b/src/oci/identity_domains/models/policy_extension_ociconsolesignonpolicyconsent_policy.py new file mode 100644 index 000000000..73ba55b02 --- /dev/null +++ b/src/oci/identity_domains/models/policy_extension_ociconsolesignonpolicyconsent_policy.py @@ -0,0 +1,194 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: v1 + + +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 PolicyExtensionOciconsolesignonpolicyconsentPolicy(object): + """ + This extension defines attributes used to record consent for modification of the \"Security Policy for OCI Console\" sign-on policy, Rule, Condition or ConditionGroup. + """ + + def __init__(self, **kwargs): + """ + Initializes a new PolicyExtensionOciconsolesignonpolicyconsentPolicy object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param consent: + The value to assign to the consent property of this PolicyExtensionOciconsolesignonpolicyconsentPolicy. + :type consent: bool + + :param justification: + The value to assign to the justification property of this PolicyExtensionOciconsolesignonpolicyconsentPolicy. + :type justification: str + + :param reason: + The value to assign to the reason property of this PolicyExtensionOciconsolesignonpolicyconsentPolicy. + :type reason: str + + """ + self.swagger_types = { + 'consent': 'bool', + 'justification': 'str', + 'reason': 'str' + } + + self.attribute_map = { + 'consent': 'consent', + 'justification': 'justification', + 'reason': 'reason' + } + + self._consent = None + self._justification = None + self._reason = None + + @property + def consent(self): + """ + Gets the consent of this PolicyExtensionOciconsolesignonpolicyconsentPolicy. + Set to true when an identity domain administrator opts to change the Oracle security defaults for the \"Security Policy for OCI Console\" shipped by Oracle. Defaults to false. + + **Added In:** 2405220110 + + **SCIM++ Properties:** + - idcsSearchable: false + - multiValued: false + - mutability: writeOnly + - required: false + - returned: never + - type: boolean + + + :return: The consent of this PolicyExtensionOciconsolesignonpolicyconsentPolicy. + :rtype: bool + """ + return self._consent + + @consent.setter + def consent(self, consent): + """ + Sets the consent of this PolicyExtensionOciconsolesignonpolicyconsentPolicy. + Set to true when an identity domain administrator opts to change the Oracle security defaults for the \"Security Policy for OCI Console\" shipped by Oracle. Defaults to false. + + **Added In:** 2405220110 + + **SCIM++ Properties:** + - idcsSearchable: false + - multiValued: false + - mutability: writeOnly + - required: false + - returned: never + - type: boolean + + + :param consent: The consent of this PolicyExtensionOciconsolesignonpolicyconsentPolicy. + :type: bool + """ + self._consent = consent + + @property + def justification(self): + """ + Gets the justification of this PolicyExtensionOciconsolesignonpolicyconsentPolicy. + The justification for the change when an identity domain administrator opts to modify the Oracle security defaults for the \"Security Policy for OCI Console\" sign-on policy shipped by Oracle. + + **Added In:** 2405220110 + + **SCIM++ Properties:** + - idcsSearchable: false + - multiValued: false + - mutability: writeOnly + - required: false + - returned: never + - type: string + + + :return: The justification of this PolicyExtensionOciconsolesignonpolicyconsentPolicy. + :rtype: str + """ + return self._justification + + @justification.setter + def justification(self, justification): + """ + Sets the justification of this PolicyExtensionOciconsolesignonpolicyconsentPolicy. + The justification for the change when an identity domain administrator opts to modify the Oracle security defaults for the \"Security Policy for OCI Console\" sign-on policy shipped by Oracle. + + **Added In:** 2405220110 + + **SCIM++ Properties:** + - idcsSearchable: false + - multiValued: false + - mutability: writeOnly + - required: false + - returned: never + - type: string + + + :param justification: The justification of this PolicyExtensionOciconsolesignonpolicyconsentPolicy. + :type: str + """ + self._justification = justification + + @property + def reason(self): + """ + Gets the reason of this PolicyExtensionOciconsolesignonpolicyconsentPolicy. + The detailed reason for the change when an identity domain administrator opts to modify the Oracle security defaults for the \"Security Policy for OCI Console\" sign-on policy shipped by Oracle. + + **Added In:** 2405220110 + + **SCIM++ Properties:** + - idcsSearchable: false + - multiValued: false + - mutability: writeOnly + - required: false + - returned: never + - type: string + + + :return: The reason of this PolicyExtensionOciconsolesignonpolicyconsentPolicy. + :rtype: str + """ + return self._reason + + @reason.setter + def reason(self, reason): + """ + Sets the reason of this PolicyExtensionOciconsolesignonpolicyconsentPolicy. + The detailed reason for the change when an identity domain administrator opts to modify the Oracle security defaults for the \"Security Policy for OCI Console\" sign-on policy shipped by Oracle. + + **Added In:** 2405220110 + + **SCIM++ Properties:** + - idcsSearchable: false + - multiValued: false + - mutability: writeOnly + - required: false + - returned: never + - type: string + + + :param reason: The reason of this PolicyExtensionOciconsolesignonpolicyconsentPolicy. + :type: str + """ + self._reason = reason + + 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/identity_domains/models/policy_policy_type.py b/src/oci/identity_domains/models/policy_policy_type.py index 3c1b64daa..1ce836341 100644 --- a/src/oci/identity_domains/models/policy_policy_type.py +++ b/src/oci/identity_domains/models/policy_policy_type.py @@ -55,7 +55,7 @@ def __init__(self, **kwargs): def value(self): """ **[Required]** Gets the value of this PolicyPolicyType. - PolicyType identifier + PolicyType identifier. **SCIM++ Properties:** - caseExact: true @@ -77,7 +77,7 @@ def value(self): def value(self, value): """ Sets the value of this PolicyPolicyType. - PolicyType identifier + PolicyType identifier. **SCIM++ Properties:** - caseExact: true diff --git a/src/oci/identity_domains/models/restore_oci_console_policy.py b/src/oci/identity_domains/models/restore_oci_console_policy.py new file mode 100644 index 000000000..23a918b69 --- /dev/null +++ b/src/oci/identity_domains/models/restore_oci_console_policy.py @@ -0,0 +1,722 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: v1 + + +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 RestoreOciConsolePolicy(object): + """ + Schema to restoring OCI Console Policy to Factory Defaults. + """ + + #: A constant which can be used with the idcs_prevented_operations property of a RestoreOciConsolePolicy. + #: This constant has a value of "replace" + IDCS_PREVENTED_OPERATIONS_REPLACE = "replace" + + #: A constant which can be used with the idcs_prevented_operations property of a RestoreOciConsolePolicy. + #: This constant has a value of "update" + IDCS_PREVENTED_OPERATIONS_UPDATE = "update" + + #: A constant which can be used with the idcs_prevented_operations property of a RestoreOciConsolePolicy. + #: This constant has a value of "delete" + IDCS_PREVENTED_OPERATIONS_DELETE = "delete" + + def __init__(self, **kwargs): + """ + Initializes a new RestoreOciConsolePolicy 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 RestoreOciConsolePolicy. + :type id: str + + :param ocid: + The value to assign to the ocid property of this RestoreOciConsolePolicy. + :type ocid: str + + :param schemas: + The value to assign to the schemas property of this RestoreOciConsolePolicy. + :type schemas: list[str] + + :param meta: + The value to assign to the meta property of this RestoreOciConsolePolicy. + :type meta: oci.identity_domains.models.Meta + + :param idcs_created_by: + The value to assign to the idcs_created_by property of this RestoreOciConsolePolicy. + :type idcs_created_by: oci.identity_domains.models.IdcsCreatedBy + + :param idcs_last_modified_by: + The value to assign to the idcs_last_modified_by property of this RestoreOciConsolePolicy. + :type idcs_last_modified_by: oci.identity_domains.models.IdcsLastModifiedBy + + :param idcs_prevented_operations: + The value to assign to the idcs_prevented_operations property of this RestoreOciConsolePolicy. + Allowed values for items in this list are: "replace", "update", "delete", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type idcs_prevented_operations: list[str] + + :param tags: + The value to assign to the tags property of this RestoreOciConsolePolicy. + :type tags: list[oci.identity_domains.models.Tags] + + :param delete_in_progress: + The value to assign to the delete_in_progress property of this RestoreOciConsolePolicy. + :type delete_in_progress: bool + + :param idcs_last_upgraded_in_release: + The value to assign to the idcs_last_upgraded_in_release property of this RestoreOciConsolePolicy. + :type idcs_last_upgraded_in_release: str + + :param domain_ocid: + The value to assign to the domain_ocid property of this RestoreOciConsolePolicy. + :type domain_ocid: str + + :param compartment_ocid: + The value to assign to the compartment_ocid property of this RestoreOciConsolePolicy. + :type compartment_ocid: str + + :param tenancy_ocid: + The value to assign to the tenancy_ocid property of this RestoreOciConsolePolicy. + :type tenancy_ocid: str + + :param consent: + The value to assign to the consent property of this RestoreOciConsolePolicy. + :type consent: bool + + :param reason: + The value to assign to the reason property of this RestoreOciConsolePolicy. + :type reason: str + + """ + self.swagger_types = { + 'id': 'str', + 'ocid': 'str', + 'schemas': 'list[str]', + 'meta': 'Meta', + 'idcs_created_by': 'IdcsCreatedBy', + 'idcs_last_modified_by': 'IdcsLastModifiedBy', + 'idcs_prevented_operations': 'list[str]', + 'tags': 'list[Tags]', + 'delete_in_progress': 'bool', + 'idcs_last_upgraded_in_release': 'str', + 'domain_ocid': 'str', + 'compartment_ocid': 'str', + 'tenancy_ocid': 'str', + 'consent': 'bool', + 'reason': 'str' + } + + self.attribute_map = { + 'id': 'id', + 'ocid': 'ocid', + 'schemas': 'schemas', + 'meta': 'meta', + 'idcs_created_by': 'idcsCreatedBy', + 'idcs_last_modified_by': 'idcsLastModifiedBy', + 'idcs_prevented_operations': 'idcsPreventedOperations', + 'tags': 'tags', + 'delete_in_progress': 'deleteInProgress', + 'idcs_last_upgraded_in_release': 'idcsLastUpgradedInRelease', + 'domain_ocid': 'domainOcid', + 'compartment_ocid': 'compartmentOcid', + 'tenancy_ocid': 'tenancyOcid', + 'consent': 'consent', + 'reason': 'reason' + } + + self._id = None + self._ocid = None + self._schemas = None + self._meta = None + self._idcs_created_by = None + self._idcs_last_modified_by = None + self._idcs_prevented_operations = None + self._tags = None + self._delete_in_progress = None + self._idcs_last_upgraded_in_release = None + self._domain_ocid = None + self._compartment_ocid = None + self._tenancy_ocid = None + self._consent = None + self._reason = None + + @property + def id(self): + """ + Gets the id of this RestoreOciConsolePolicy. + **SCIM++ Properties:** + - caseExact: false + - idcsSearchable: true + - multiValued: false + - mutability: readOnly + - required: false + - returned: always + - type: string + - uniqueness: global + Unique identifier for the SCIM Resource as defined by the Service Provider. Each representation of the Resource MUST include a non-empty id value. This identifier MUST be unique across the Service Provider's entire set of Resources. It MUST be a stable, non-reassignable identifier that does not change when the same Resource is returned in subsequent requests. The value of the id attribute is always issued by the Service Provider and MUST never be specified by the Service Consumer. bulkId: is a reserved keyword and MUST NOT be used in the unique identifier. + + + :return: The id of this RestoreOciConsolePolicy. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this RestoreOciConsolePolicy. + **SCIM++ Properties:** + - caseExact: false + - idcsSearchable: true + - multiValued: false + - mutability: readOnly + - required: false + - returned: always + - type: string + - uniqueness: global + Unique identifier for the SCIM Resource as defined by the Service Provider. Each representation of the Resource MUST include a non-empty id value. This identifier MUST be unique across the Service Provider's entire set of Resources. It MUST be a stable, non-reassignable identifier that does not change when the same Resource is returned in subsequent requests. The value of the id attribute is always issued by the Service Provider and MUST never be specified by the Service Consumer. bulkId: is a reserved keyword and MUST NOT be used in the unique identifier. + + + :param id: The id of this RestoreOciConsolePolicy. + :type: str + """ + self._id = id + + @property + def ocid(self): + """ + Gets the ocid of this RestoreOciConsolePolicy. + **SCIM++ Properties:** + - caseExact: true + - idcsSearchable: true + - multiValued: false + - mutability: immutable + - required: false + - returned: default + - type: string + - uniqueness: global + Unique OCI identifier for the SCIM Resource. + + + :return: The ocid of this RestoreOciConsolePolicy. + :rtype: str + """ + return self._ocid + + @ocid.setter + def ocid(self, ocid): + """ + Sets the ocid of this RestoreOciConsolePolicy. + **SCIM++ Properties:** + - caseExact: true + - idcsSearchable: true + - multiValued: false + - mutability: immutable + - required: false + - returned: default + - type: string + - uniqueness: global + Unique OCI identifier for the SCIM Resource. + + + :param ocid: The ocid of this RestoreOciConsolePolicy. + :type: str + """ + self._ocid = ocid + + @property + def schemas(self): + """ + **[Required]** Gets the schemas of this RestoreOciConsolePolicy. + **SCIM++ Properties:** + - caseExact: false + - idcsSearchable: false + - multiValued: true + - mutability: readWrite + - required: true + - returned: default + - type: string + - uniqueness: none + REQUIRED. The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. This specification defines URIs for User, Group, and a standard \\\"enterprise\\\" extension. All representations of SCIM schema MUST include a non-zero value array with value(s) of the URIs supported by that representation. Duplicate values MUST NOT be included. Value order is not specified and MUST not impact behavior. + + + :return: The schemas of this RestoreOciConsolePolicy. + :rtype: list[str] + """ + return self._schemas + + @schemas.setter + def schemas(self, schemas): + """ + Sets the schemas of this RestoreOciConsolePolicy. + **SCIM++ Properties:** + - caseExact: false + - idcsSearchable: false + - multiValued: true + - mutability: readWrite + - required: true + - returned: default + - type: string + - uniqueness: none + REQUIRED. The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. This specification defines URIs for User, Group, and a standard \\\"enterprise\\\" extension. All representations of SCIM schema MUST include a non-zero value array with value(s) of the URIs supported by that representation. Duplicate values MUST NOT be included. Value order is not specified and MUST not impact behavior. + + + :param schemas: The schemas of this RestoreOciConsolePolicy. + :type: list[str] + """ + self._schemas = schemas + + @property + def meta(self): + """ + Gets the meta of this RestoreOciConsolePolicy. + + :return: The meta of this RestoreOciConsolePolicy. + :rtype: oci.identity_domains.models.Meta + """ + return self._meta + + @meta.setter + def meta(self, meta): + """ + Sets the meta of this RestoreOciConsolePolicy. + + :param meta: The meta of this RestoreOciConsolePolicy. + :type: oci.identity_domains.models.Meta + """ + self._meta = meta + + @property + def idcs_created_by(self): + """ + Gets the idcs_created_by of this RestoreOciConsolePolicy. + + :return: The idcs_created_by of this RestoreOciConsolePolicy. + :rtype: oci.identity_domains.models.IdcsCreatedBy + """ + return self._idcs_created_by + + @idcs_created_by.setter + def idcs_created_by(self, idcs_created_by): + """ + Sets the idcs_created_by of this RestoreOciConsolePolicy. + + :param idcs_created_by: The idcs_created_by of this RestoreOciConsolePolicy. + :type: oci.identity_domains.models.IdcsCreatedBy + """ + self._idcs_created_by = idcs_created_by + + @property + def idcs_last_modified_by(self): + """ + Gets the idcs_last_modified_by of this RestoreOciConsolePolicy. + + :return: The idcs_last_modified_by of this RestoreOciConsolePolicy. + :rtype: oci.identity_domains.models.IdcsLastModifiedBy + """ + return self._idcs_last_modified_by + + @idcs_last_modified_by.setter + def idcs_last_modified_by(self, idcs_last_modified_by): + """ + Sets the idcs_last_modified_by of this RestoreOciConsolePolicy. + + :param idcs_last_modified_by: The idcs_last_modified_by of this RestoreOciConsolePolicy. + :type: oci.identity_domains.models.IdcsLastModifiedBy + """ + self._idcs_last_modified_by = idcs_last_modified_by + + @property + def idcs_prevented_operations(self): + """ + Gets the idcs_prevented_operations of this RestoreOciConsolePolicy. + **SCIM++ Properties:** + - idcsSearchable: false + - multiValued: true + - mutability: readOnly + - required: false + - returned: request + - type: string + - uniqueness: none + Each value of this attribute specifies an operation that only an internal client may perform on this particular resource. + + Allowed values for items in this list are: "replace", "update", "delete", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The idcs_prevented_operations of this RestoreOciConsolePolicy. + :rtype: list[str] + """ + return self._idcs_prevented_operations + + @idcs_prevented_operations.setter + def idcs_prevented_operations(self, idcs_prevented_operations): + """ + Sets the idcs_prevented_operations of this RestoreOciConsolePolicy. + **SCIM++ Properties:** + - idcsSearchable: false + - multiValued: true + - mutability: readOnly + - required: false + - returned: request + - type: string + - uniqueness: none + Each value of this attribute specifies an operation that only an internal client may perform on this particular resource. + + + :param idcs_prevented_operations: The idcs_prevented_operations of this RestoreOciConsolePolicy. + :type: list[str] + """ + allowed_values = ["replace", "update", "delete"] + if idcs_prevented_operations: + idcs_prevented_operations[:] = ['UNKNOWN_ENUM_VALUE' if not value_allowed_none_or_none_sentinel(x, allowed_values) else x for x in idcs_prevented_operations] + self._idcs_prevented_operations = idcs_prevented_operations + + @property + def tags(self): + """ + Gets the tags of this RestoreOciConsolePolicy. + **SCIM++ Properties:** + - idcsCompositeKey: [key, value] + - idcsCsvAttributeNameMappings: [[columnHeaderName:Tag Key, mapsTo:tags.key], [columnHeaderName:Tag Value, mapsTo:tags.value]] + - idcsSearchable: true + - multiValued: true + - mutability: readWrite + - required: false + - returned: request + - type: complex + - uniqueness: none + A list of tags on this resource. + + + :return: The tags of this RestoreOciConsolePolicy. + :rtype: list[oci.identity_domains.models.Tags] + """ + return self._tags + + @tags.setter + def tags(self, tags): + """ + Sets the tags of this RestoreOciConsolePolicy. + **SCIM++ Properties:** + - idcsCompositeKey: [key, value] + - idcsCsvAttributeNameMappings: [[columnHeaderName:Tag Key, mapsTo:tags.key], [columnHeaderName:Tag Value, mapsTo:tags.value]] + - idcsSearchable: true + - multiValued: true + - mutability: readWrite + - required: false + - returned: request + - type: complex + - uniqueness: none + A list of tags on this resource. + + + :param tags: The tags of this RestoreOciConsolePolicy. + :type: list[oci.identity_domains.models.Tags] + """ + self._tags = tags + + @property + def delete_in_progress(self): + """ + Gets the delete_in_progress of this RestoreOciConsolePolicy. + **SCIM++ Properties:** + - caseExact: false + - idcsSearchable: true + - multiValued: false + - mutability: readOnly + - required: false + - returned: default + - type: boolean + - uniqueness: none + A boolean flag indicating this resource in the process of being deleted. Usually set to true when synchronous deletion of the resource would take too long. + + + :return: The delete_in_progress of this RestoreOciConsolePolicy. + :rtype: bool + """ + return self._delete_in_progress + + @delete_in_progress.setter + def delete_in_progress(self, delete_in_progress): + """ + Sets the delete_in_progress of this RestoreOciConsolePolicy. + **SCIM++ Properties:** + - caseExact: false + - idcsSearchable: true + - multiValued: false + - mutability: readOnly + - required: false + - returned: default + - type: boolean + - uniqueness: none + A boolean flag indicating this resource in the process of being deleted. Usually set to true when synchronous deletion of the resource would take too long. + + + :param delete_in_progress: The delete_in_progress of this RestoreOciConsolePolicy. + :type: bool + """ + self._delete_in_progress = delete_in_progress + + @property + def idcs_last_upgraded_in_release(self): + """ + Gets the idcs_last_upgraded_in_release of this RestoreOciConsolePolicy. + **SCIM++ Properties:** + - caseExact: false + - idcsSearchable: false + - multiValued: false + - mutability: readOnly + - required: false + - returned: request + - type: string + - uniqueness: none + The release number when the resource was upgraded. + + + :return: The idcs_last_upgraded_in_release of this RestoreOciConsolePolicy. + :rtype: str + """ + return self._idcs_last_upgraded_in_release + + @idcs_last_upgraded_in_release.setter + def idcs_last_upgraded_in_release(self, idcs_last_upgraded_in_release): + """ + Sets the idcs_last_upgraded_in_release of this RestoreOciConsolePolicy. + **SCIM++ Properties:** + - caseExact: false + - idcsSearchable: false + - multiValued: false + - mutability: readOnly + - required: false + - returned: request + - type: string + - uniqueness: none + The release number when the resource was upgraded. + + + :param idcs_last_upgraded_in_release: The idcs_last_upgraded_in_release of this RestoreOciConsolePolicy. + :type: str + """ + self._idcs_last_upgraded_in_release = idcs_last_upgraded_in_release + + @property + def domain_ocid(self): + """ + Gets the domain_ocid of this RestoreOciConsolePolicy. + **SCIM++ Properties:** + - caseExact: false + - idcsSearchable: false + - multiValued: false + - mutability: readOnly + - required: false + - returned: default + - type: string + - uniqueness: none + OCI Domain Id (ocid) in which the resource lives. + + + :return: The domain_ocid of this RestoreOciConsolePolicy. + :rtype: str + """ + return self._domain_ocid + + @domain_ocid.setter + def domain_ocid(self, domain_ocid): + """ + Sets the domain_ocid of this RestoreOciConsolePolicy. + **SCIM++ Properties:** + - caseExact: false + - idcsSearchable: false + - multiValued: false + - mutability: readOnly + - required: false + - returned: default + - type: string + - uniqueness: none + OCI Domain Id (ocid) in which the resource lives. + + + :param domain_ocid: The domain_ocid of this RestoreOciConsolePolicy. + :type: str + """ + self._domain_ocid = domain_ocid + + @property + def compartment_ocid(self): + """ + Gets the compartment_ocid of this RestoreOciConsolePolicy. + **SCIM++ Properties:** + - caseExact: false + - idcsSearchable: false + - multiValued: false + - mutability: readOnly + - required: false + - returned: default + - type: string + - uniqueness: none + OCI Compartment Id (ocid) in which the resource lives. + + + :return: The compartment_ocid of this RestoreOciConsolePolicy. + :rtype: str + """ + return self._compartment_ocid + + @compartment_ocid.setter + def compartment_ocid(self, compartment_ocid): + """ + Sets the compartment_ocid of this RestoreOciConsolePolicy. + **SCIM++ Properties:** + - caseExact: false + - idcsSearchable: false + - multiValued: false + - mutability: readOnly + - required: false + - returned: default + - type: string + - uniqueness: none + OCI Compartment Id (ocid) in which the resource lives. + + + :param compartment_ocid: The compartment_ocid of this RestoreOciConsolePolicy. + :type: str + """ + self._compartment_ocid = compartment_ocid + + @property + def tenancy_ocid(self): + """ + Gets the tenancy_ocid of this RestoreOciConsolePolicy. + **SCIM++ Properties:** + - caseExact: false + - idcsSearchable: false + - multiValued: false + - mutability: readOnly + - required: false + - returned: default + - type: string + - uniqueness: none + OCI Tenant Id (ocid) in which the resource lives. + + + :return: The tenancy_ocid of this RestoreOciConsolePolicy. + :rtype: str + """ + return self._tenancy_ocid + + @tenancy_ocid.setter + def tenancy_ocid(self, tenancy_ocid): + """ + Sets the tenancy_ocid of this RestoreOciConsolePolicy. + **SCIM++ Properties:** + - caseExact: false + - idcsSearchable: false + - multiValued: false + - mutability: readOnly + - required: false + - returned: default + - type: string + - uniqueness: none + OCI Tenant Id (ocid) in which the resource lives. + + + :param tenancy_ocid: The tenancy_ocid of this RestoreOciConsolePolicy. + :type: str + """ + self._tenancy_ocid = tenancy_ocid + + @property + def consent(self): + """ + **[Required]** Gets the consent of this RestoreOciConsolePolicy. + **SCIM++ Properties:** + - idcsSearchable: false + - multiValued: false + - required: true + - mutability: writeOnly + - returned: default + - type: boolean + Consent to be provided for restoring the Oci Console SignOn Policy to Factory Defaults. Defaults to false + + + :return: The consent of this RestoreOciConsolePolicy. + :rtype: bool + """ + return self._consent + + @consent.setter + def consent(self, consent): + """ + Sets the consent of this RestoreOciConsolePolicy. + **SCIM++ Properties:** + - idcsSearchable: false + - multiValued: false + - required: true + - mutability: writeOnly + - returned: default + - type: boolean + Consent to be provided for restoring the Oci Console SignOn Policy to Factory Defaults. Defaults to false + + + :param consent: The consent of this RestoreOciConsolePolicy. + :type: bool + """ + self._consent = consent + + @property + def reason(self): + """ + **[Required]** Gets the reason of this RestoreOciConsolePolicy. + **SCIM++ Properties:** + - idcsSearchable: false + - multiValued: false + - mutability: writeOnly + - required: true + - returned: default + - type: string + Detailed reason when domain admin opts to restore the Oci Console SignOn Policy to Factory Defaults + + + :return: The reason of this RestoreOciConsolePolicy. + :rtype: str + """ + return self._reason + + @reason.setter + def reason(self, reason): + """ + Sets the reason of this RestoreOciConsolePolicy. + **SCIM++ Properties:** + - idcsSearchable: false + - multiValued: false + - mutability: writeOnly + - required: true + - returned: default + - type: string + Detailed reason when domain admin opts to restore the Oci Console SignOn Policy to Factory Defaults + + + :param reason: The reason of this RestoreOciConsolePolicy. + :type: str + """ + self._reason = reason + + 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/identity_domains/models/rule.py b/src/oci/identity_domains/models/rule.py index 1c64a9595..c51e85ac1 100644 --- a/src/oci/identity_domains/models/rule.py +++ b/src/oci/identity_domains/models/rule.py @@ -126,6 +126,10 @@ def __init__(self, **kwargs): The value to assign to the _return property of this Rule. :type _return: list[oci.identity_domains.models.RuleReturn] + :param urn_ietf_params_scim_schemas_oracle_idcs_extension_ociconsolesignonpolicyconsent_policy: + The value to assign to the urn_ietf_params_scim_schemas_oracle_idcs_extension_ociconsolesignonpolicyconsent_policy property of this Rule. + :type urn_ietf_params_scim_schemas_oracle_idcs_extension_ociconsolesignonpolicyconsent_policy: oci.identity_domains.models.RuleExtensionOciconsolesignonpolicyconsentPolicy + """ self.swagger_types = { 'id': 'str', @@ -150,7 +154,8 @@ def __init__(self, **kwargs): 'condition': 'str', 'condition_group': 'RuleConditionGroup', 'policy_type': 'RulePolicyType', - '_return': 'list[RuleReturn]' + '_return': 'list[RuleReturn]', + 'urn_ietf_params_scim_schemas_oracle_idcs_extension_ociconsolesignonpolicyconsent_policy': 'RuleExtensionOciconsolesignonpolicyconsentPolicy' } self.attribute_map = { @@ -176,7 +181,8 @@ def __init__(self, **kwargs): 'condition': 'condition', 'condition_group': 'conditionGroup', 'policy_type': 'policyType', - '_return': 'return' + '_return': 'return', + 'urn_ietf_params_scim_schemas_oracle_idcs_extension_ociconsolesignonpolicyconsent_policy': 'urn:ietf:params:scim:schemas:oracle:idcs:extension:ociconsolesignonpolicyconsent:Policy' } self._id = None @@ -202,6 +208,7 @@ def __init__(self, **kwargs): self._condition_group = None self._policy_type = None self.__return = None + self._urn_ietf_params_scim_schemas_oracle_idcs_extension_ociconsolesignonpolicyconsent_policy = None @property def id(self): @@ -451,6 +458,7 @@ def tags(self): **SCIM++ Properties:** - idcsCompositeKey: [key, value] + - idcsCsvAttributeNameMappings: [[columnHeaderName:Tag Key, mapsTo:tags.key], [columnHeaderName:Tag Value, mapsTo:tags.value]] - idcsSearchable: true - multiValued: true - mutability: readWrite @@ -473,6 +481,7 @@ def tags(self, tags): **SCIM++ Properties:** - idcsCompositeKey: [key, value] + - idcsCsvAttributeNameMappings: [[columnHeaderName:Tag Key, mapsTo:tags.key], [columnHeaderName:Tag Value, mapsTo:tags.value]] - idcsSearchable: true - multiValued: true - mutability: readWrite @@ -1097,6 +1106,26 @@ def _return(self, _return): """ self.__return = _return + @property + def urn_ietf_params_scim_schemas_oracle_idcs_extension_ociconsolesignonpolicyconsent_policy(self): + """ + Gets the urn_ietf_params_scim_schemas_oracle_idcs_extension_ociconsolesignonpolicyconsent_policy of this Rule. + + :return: The urn_ietf_params_scim_schemas_oracle_idcs_extension_ociconsolesignonpolicyconsent_policy of this Rule. + :rtype: oci.identity_domains.models.RuleExtensionOciconsolesignonpolicyconsentPolicy + """ + return self._urn_ietf_params_scim_schemas_oracle_idcs_extension_ociconsolesignonpolicyconsent_policy + + @urn_ietf_params_scim_schemas_oracle_idcs_extension_ociconsolesignonpolicyconsent_policy.setter + def urn_ietf_params_scim_schemas_oracle_idcs_extension_ociconsolesignonpolicyconsent_policy(self, urn_ietf_params_scim_schemas_oracle_idcs_extension_ociconsolesignonpolicyconsent_policy): + """ + Sets the urn_ietf_params_scim_schemas_oracle_idcs_extension_ociconsolesignonpolicyconsent_policy of this Rule. + + :param urn_ietf_params_scim_schemas_oracle_idcs_extension_ociconsolesignonpolicyconsent_policy: The urn_ietf_params_scim_schemas_oracle_idcs_extension_ociconsolesignonpolicyconsent_policy of this Rule. + :type: oci.identity_domains.models.RuleExtensionOciconsolesignonpolicyconsentPolicy + """ + self._urn_ietf_params_scim_schemas_oracle_idcs_extension_ociconsolesignonpolicyconsent_policy = urn_ietf_params_scim_schemas_oracle_idcs_extension_ociconsolesignonpolicyconsent_policy + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/identity_domains/models/rule_condition_group.py b/src/oci/identity_domains/models/rule_condition_group.py index 4360d3f2f..2b71a4e0b 100644 --- a/src/oci/identity_domains/models/rule_condition_group.py +++ b/src/oci/identity_domains/models/rule_condition_group.py @@ -79,7 +79,7 @@ def __init__(self, **kwargs): def value(self): """ Gets the value of this RuleConditionGroup. - Condition or ConditionGroup identifier + Condition or ConditionGroup identifier. **SCIM++ Properties:** - caseExact: true @@ -101,7 +101,7 @@ def value(self): def value(self, value): """ Sets the value of this RuleConditionGroup. - Condition or ConditionGroup identifier + Condition or ConditionGroup identifier. **SCIM++ Properties:** - caseExact: true diff --git a/src/oci/identity_domains/models/rule_extension_ociconsolesignonpolicyconsent_policy.py b/src/oci/identity_domains/models/rule_extension_ociconsolesignonpolicyconsent_policy.py new file mode 100644 index 000000000..4c7266f2e --- /dev/null +++ b/src/oci/identity_domains/models/rule_extension_ociconsolesignonpolicyconsent_policy.py @@ -0,0 +1,194 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: v1 + + +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 RuleExtensionOciconsolesignonpolicyconsentPolicy(object): + """ + This extension defines attributes used to record consent for modification of the \"Security Policy for OCI Console\" sign-on policy, Rule, Condition or ConditionGroup. + """ + + def __init__(self, **kwargs): + """ + Initializes a new RuleExtensionOciconsolesignonpolicyconsentPolicy object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param consent: + The value to assign to the consent property of this RuleExtensionOciconsolesignonpolicyconsentPolicy. + :type consent: bool + + :param justification: + The value to assign to the justification property of this RuleExtensionOciconsolesignonpolicyconsentPolicy. + :type justification: str + + :param reason: + The value to assign to the reason property of this RuleExtensionOciconsolesignonpolicyconsentPolicy. + :type reason: str + + """ + self.swagger_types = { + 'consent': 'bool', + 'justification': 'str', + 'reason': 'str' + } + + self.attribute_map = { + 'consent': 'consent', + 'justification': 'justification', + 'reason': 'reason' + } + + self._consent = None + self._justification = None + self._reason = None + + @property + def consent(self): + """ + Gets the consent of this RuleExtensionOciconsolesignonpolicyconsentPolicy. + Set to true when an identity domain administrator opts to change the Oracle security defaults for the \"Security Policy for OCI Console\" shipped by Oracle. Defaults to false. + + **Added In:** 2405220110 + + **SCIM++ Properties:** + - idcsSearchable: false + - multiValued: false + - mutability: writeOnly + - required: false + - returned: never + - type: boolean + + + :return: The consent of this RuleExtensionOciconsolesignonpolicyconsentPolicy. + :rtype: bool + """ + return self._consent + + @consent.setter + def consent(self, consent): + """ + Sets the consent of this RuleExtensionOciconsolesignonpolicyconsentPolicy. + Set to true when an identity domain administrator opts to change the Oracle security defaults for the \"Security Policy for OCI Console\" shipped by Oracle. Defaults to false. + + **Added In:** 2405220110 + + **SCIM++ Properties:** + - idcsSearchable: false + - multiValued: false + - mutability: writeOnly + - required: false + - returned: never + - type: boolean + + + :param consent: The consent of this RuleExtensionOciconsolesignonpolicyconsentPolicy. + :type: bool + """ + self._consent = consent + + @property + def justification(self): + """ + Gets the justification of this RuleExtensionOciconsolesignonpolicyconsentPolicy. + The justification for the change when an identity domain administrator opts to modify the Oracle security defaults for the \"Security Policy for OCI Console\" sign-on policy shipped by Oracle. + + **Added In:** 2405220110 + + **SCIM++ Properties:** + - idcsSearchable: false + - multiValued: false + - mutability: writeOnly + - required: false + - returned: never + - type: string + + + :return: The justification of this RuleExtensionOciconsolesignonpolicyconsentPolicy. + :rtype: str + """ + return self._justification + + @justification.setter + def justification(self, justification): + """ + Sets the justification of this RuleExtensionOciconsolesignonpolicyconsentPolicy. + The justification for the change when an identity domain administrator opts to modify the Oracle security defaults for the \"Security Policy for OCI Console\" sign-on policy shipped by Oracle. + + **Added In:** 2405220110 + + **SCIM++ Properties:** + - idcsSearchable: false + - multiValued: false + - mutability: writeOnly + - required: false + - returned: never + - type: string + + + :param justification: The justification of this RuleExtensionOciconsolesignonpolicyconsentPolicy. + :type: str + """ + self._justification = justification + + @property + def reason(self): + """ + Gets the reason of this RuleExtensionOciconsolesignonpolicyconsentPolicy. + The detailed reason for the change when an identity domain administrator opts to modify the Oracle security defaults for the \"Security Policy for OCI Console\" sign-on policy shipped by Oracle. + + **Added In:** 2405220110 + + **SCIM++ Properties:** + - idcsSearchable: false + - multiValued: false + - mutability: writeOnly + - required: false + - returned: never + - type: string + + + :return: The reason of this RuleExtensionOciconsolesignonpolicyconsentPolicy. + :rtype: str + """ + return self._reason + + @reason.setter + def reason(self, reason): + """ + Sets the reason of this RuleExtensionOciconsolesignonpolicyconsentPolicy. + The detailed reason for the change when an identity domain administrator opts to modify the Oracle security defaults for the \"Security Policy for OCI Console\" sign-on policy shipped by Oracle. + + **Added In:** 2405220110 + + **SCIM++ Properties:** + - idcsSearchable: false + - multiValued: false + - mutability: writeOnly + - required: false + - returned: never + - type: string + + + :param reason: The reason of this RuleExtensionOciconsolesignonpolicyconsentPolicy. + :type: str + """ + self._reason = reason + + 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/regions_definitions.py b/src/oci/regions_definitions.py index b86b55b73..fb08cc3a7 100644 --- a/src/oci/regions_definitions.py +++ b/src/oci/regions_definitions.py @@ -71,7 +71,10 @@ 'avf': 'eu-crissier-1', 'ahu': 'me-abudhabi-3', 'rkt': 'me-abudhabi-2', - 'shj': 'me-abudhabi-4' + 'shj': 'me-abudhabi-4', + 'dtz': 'ap-seoul-2', + 'dln': 'ap-suwon-1', + 'bno': 'ap-chuncheon-2' } REGION_REALMS = { 'ap-chuncheon-1': 'oc1', @@ -157,7 +160,11 @@ 'me-abudhabi-3': 'oc26', 'me-abudhabi-2': 'oc29', - 'me-abudhabi-4': 'oc29' + 'me-abudhabi-4': 'oc29', + + 'ap-seoul-2': 'oc35', + 'ap-suwon-1': 'oc35', + 'ap-chuncheon-2': 'oc35' } REALMS = { 'oc1': 'oraclecloud.com', @@ -175,7 +182,8 @@ 'oc23': 'oraclecloud23.com', 'oc24': 'oraclecloud24.com', 'oc26': 'oraclecloud26.com', - 'oc29': 'oraclecloud29.com' + 'oc29': 'oraclecloud29.com', + 'oc35': 'oraclecloud35.com' } REGIONS = [ 'ap-chuncheon-1', @@ -246,5 +254,8 @@ 'eu-crissier-1', 'me-abudhabi-3', 'me-abudhabi-2', - 'me-abudhabi-4' + 'me-abudhabi-4', + 'ap-seoul-2', + 'ap-suwon-1', + 'ap-chuncheon-2' ] diff --git a/src/oci/retry/__init__.py b/src/oci/retry/__init__.py index 404055978..eebb22486 100644 --- a/src/oci/retry/__init__.py +++ b/src/oci/retry/__init__.py @@ -11,6 +11,26 @@ from . import retry_checkers import os +# A Default Retry Strategy for X509 calls +# defaults are: +# +# * 3 total attempts - 1 original and 2 retries +# * Total allowed elapsed time for all requests of 100 seconds +# * Exponential backoff with jitter using a base time of 1 second and an exponent of 2 +# * The maximum wait time between calls is 30 seconds +# * Exponential backoff with de-correlated jitter of 1000 milliseconds is used +# * Retries on the following exception types:- +# +# - timeouts and connection errors +# - HTTP 409/IncorrectState, 429s (throttles) +# - Any HTTP 5xx except 501 +DEFAULT_FEDERATION_CLIENT_RETRY_STRATEGY = RetryStrategyBuilder() \ + .add_max_attempts(max_attempts=3) \ + .add_total_elapsed_time(total_elapsed_time_seconds=100) \ + .add_service_error_check(service_error_retry_config={-1: []}, + service_error_retry_on_any_5xx=True) \ + .get_retry_strategy() + #: A retry strategy which has all options enabled and which will use the default settings for those options. These #: defaults are: #: diff --git a/src/oci/version.py b/src/oci/version.py index 02d9153b6..7192cdd06 100644 --- a/src/oci/version.py +++ b/src/oci/version.py @@ -2,4 +2,4 @@ # Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. -__version__ = "2.137.1" +__version__ = "2.138.0"