diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 5315969464..5822b18a62 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -3,6 +3,18 @@ Change Log All notable changes to this project will be documented in this file. The format is based on `Keep a Changelog `_. +==================== +2.10.6 - 2020-02-25 +==================== + +Added +----- +* Support for restarting autonomous databases in the Database service +* Support for private endpoints on autonomous databases in the Database service +* Support for IP-based policies in the Identity service +* Support for management of OAuth 2.0 client credentials in the Identity service +* Support for OCI Functions as a subscription protocol in the Notifications service + ==================== 2.10.5 - 2020-02-18 ==================== diff --git a/docs/api/identity.rst b/docs/api/identity.rst index 1ff1a12cae..cfda44a867 100644 --- a/docs/api/identity.rst +++ b/docs/api/identity.rst @@ -34,6 +34,8 @@ Identity oci.identity.models.CreateGroupDetails oci.identity.models.CreateIdentityProviderDetails oci.identity.models.CreateIdpGroupMappingDetails + oci.identity.models.CreateNetworkSourceDetails + oci.identity.models.CreateOAuth2ClientCredentialDetails oci.identity.models.CreatePolicyDetails oci.identity.models.CreateRegionSubscriptionDetails oci.identity.models.CreateSaml2IdentityProviderDetails @@ -49,6 +51,7 @@ Identity oci.identity.models.DynamicGroup oci.identity.models.EnumTagDefinitionValidator oci.identity.models.FaultDomain + oci.identity.models.FullyQualifiedScope oci.identity.models.Group oci.identity.models.IdentityProvider oci.identity.models.IdentityProviderGroupSummary @@ -57,6 +60,11 @@ Identity oci.identity.models.MfaTotpDeviceSummary oci.identity.models.MfaTotpToken oci.identity.models.MoveCompartmentDetails + oci.identity.models.NetworkSources + oci.identity.models.NetworkSourcesSummary + oci.identity.models.NetworkSourcesVirtualSourceList + oci.identity.models.OAuth2ClientCredential + oci.identity.models.OAuth2ClientCredentialSummary oci.identity.models.PasswordPolicy oci.identity.models.Policy oci.identity.models.Region @@ -87,6 +95,8 @@ Identity oci.identity.models.UpdateGroupDetails oci.identity.models.UpdateIdentityProviderDetails oci.identity.models.UpdateIdpGroupMappingDetails + oci.identity.models.UpdateNetworkSourceDetails + oci.identity.models.UpdateOAuth2ClientCredentialDetails oci.identity.models.UpdatePolicyDetails oci.identity.models.UpdateSaml2IdentityProviderDetails oci.identity.models.UpdateSmtpCredentialDetails diff --git a/docs/api/identity/models/oci.identity.models.CreateNetworkSourceDetails.rst b/docs/api/identity/models/oci.identity.models.CreateNetworkSourceDetails.rst new file mode 100644 index 0000000000..f9b8e476e1 --- /dev/null +++ b/docs/api/identity/models/oci.identity.models.CreateNetworkSourceDetails.rst @@ -0,0 +1,11 @@ +CreateNetworkSourceDetails +========================== + +.. currentmodule:: oci.identity.models + +.. autoclass:: CreateNetworkSourceDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/identity/models/oci.identity.models.CreateOAuth2ClientCredentialDetails.rst b/docs/api/identity/models/oci.identity.models.CreateOAuth2ClientCredentialDetails.rst new file mode 100644 index 0000000000..2d2ae372a7 --- /dev/null +++ b/docs/api/identity/models/oci.identity.models.CreateOAuth2ClientCredentialDetails.rst @@ -0,0 +1,11 @@ +CreateOAuth2ClientCredentialDetails +=================================== + +.. currentmodule:: oci.identity.models + +.. autoclass:: CreateOAuth2ClientCredentialDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/identity/models/oci.identity.models.FullyQualifiedScope.rst b/docs/api/identity/models/oci.identity.models.FullyQualifiedScope.rst new file mode 100644 index 0000000000..3ba0c8fc04 --- /dev/null +++ b/docs/api/identity/models/oci.identity.models.FullyQualifiedScope.rst @@ -0,0 +1,11 @@ +FullyQualifiedScope +=================== + +.. currentmodule:: oci.identity.models + +.. autoclass:: FullyQualifiedScope + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/identity/models/oci.identity.models.NetworkSources.rst b/docs/api/identity/models/oci.identity.models.NetworkSources.rst new file mode 100644 index 0000000000..559631da02 --- /dev/null +++ b/docs/api/identity/models/oci.identity.models.NetworkSources.rst @@ -0,0 +1,11 @@ +NetworkSources +============== + +.. currentmodule:: oci.identity.models + +.. autoclass:: NetworkSources + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/identity/models/oci.identity.models.NetworkSourcesSummary.rst b/docs/api/identity/models/oci.identity.models.NetworkSourcesSummary.rst new file mode 100644 index 0000000000..45e09e2a09 --- /dev/null +++ b/docs/api/identity/models/oci.identity.models.NetworkSourcesSummary.rst @@ -0,0 +1,11 @@ +NetworkSourcesSummary +===================== + +.. currentmodule:: oci.identity.models + +.. autoclass:: NetworkSourcesSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/identity/models/oci.identity.models.NetworkSourcesVirtualSourceList.rst b/docs/api/identity/models/oci.identity.models.NetworkSourcesVirtualSourceList.rst new file mode 100644 index 0000000000..f4b4101e74 --- /dev/null +++ b/docs/api/identity/models/oci.identity.models.NetworkSourcesVirtualSourceList.rst @@ -0,0 +1,11 @@ +NetworkSourcesVirtualSourceList +=============================== + +.. currentmodule:: oci.identity.models + +.. autoclass:: NetworkSourcesVirtualSourceList + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/identity/models/oci.identity.models.OAuth2ClientCredential.rst b/docs/api/identity/models/oci.identity.models.OAuth2ClientCredential.rst new file mode 100644 index 0000000000..b209859ef7 --- /dev/null +++ b/docs/api/identity/models/oci.identity.models.OAuth2ClientCredential.rst @@ -0,0 +1,11 @@ +OAuth2ClientCredential +====================== + +.. currentmodule:: oci.identity.models + +.. autoclass:: OAuth2ClientCredential + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/identity/models/oci.identity.models.OAuth2ClientCredentialSummary.rst b/docs/api/identity/models/oci.identity.models.OAuth2ClientCredentialSummary.rst new file mode 100644 index 0000000000..728ed8c2d6 --- /dev/null +++ b/docs/api/identity/models/oci.identity.models.OAuth2ClientCredentialSummary.rst @@ -0,0 +1,11 @@ +OAuth2ClientCredentialSummary +============================= + +.. currentmodule:: oci.identity.models + +.. autoclass:: OAuth2ClientCredentialSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/identity/models/oci.identity.models.UpdateNetworkSourceDetails.rst b/docs/api/identity/models/oci.identity.models.UpdateNetworkSourceDetails.rst new file mode 100644 index 0000000000..758ca86c0c --- /dev/null +++ b/docs/api/identity/models/oci.identity.models.UpdateNetworkSourceDetails.rst @@ -0,0 +1,11 @@ +UpdateNetworkSourceDetails +========================== + +.. currentmodule:: oci.identity.models + +.. autoclass:: UpdateNetworkSourceDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/identity/models/oci.identity.models.UpdateOAuth2ClientCredentialDetails.rst b/docs/api/identity/models/oci.identity.models.UpdateOAuth2ClientCredentialDetails.rst new file mode 100644 index 0000000000..af14685458 --- /dev/null +++ b/docs/api/identity/models/oci.identity.models.UpdateOAuth2ClientCredentialDetails.rst @@ -0,0 +1,11 @@ +UpdateOAuth2ClientCredentialDetails +=================================== + +.. currentmodule:: oci.identity.models + +.. autoclass:: UpdateOAuth2ClientCredentialDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/src/oci/auth/signers/instance_principals_delegation_token_signer.py b/src/oci/auth/signers/instance_principals_delegation_token_signer.py index 44e994bfff..f54a3b4859 100644 --- a/src/oci/auth/signers/instance_principals_delegation_token_signer.py +++ b/src/oci/auth/signers/instance_principals_delegation_token_signer.py @@ -52,5 +52,5 @@ def __init__(self, **kwargs): # opc-obo-token is added to the request headers def do_request_sign(self, request, enforce_content_headers=True): request.headers['opc-obo-token'] = self.delegation_token - super(InstancePrincipalsDelegationTokenSigner, self).do_request_sign(request) + super(InstancePrincipalsDelegationTokenSigner, self).do_request_sign(request, enforce_content_headers) return request diff --git a/src/oci/database/database_client.py b/src/oci/database/database_client.py index c91eff3b28..40aad05e92 100644 --- a/src/oci/database/database_client.py +++ b/src/oci/database/database_client.py @@ -6022,7 +6022,7 @@ def list_autonomous_databases(self, compartment_id, **kwargs): :param str lifecycle_state: (optional) A filter to return only resources that match the given lifecycle state exactly. - Allowed values are: "PROVISIONING", "AVAILABLE", "STOPPING", "STOPPED", "STARTING", "TERMINATING", "TERMINATED", "UNAVAILABLE", "RESTORE_IN_PROGRESS", "RESTORE_FAILED", "BACKUP_IN_PROGRESS", "SCALE_IN_PROGRESS", "AVAILABLE_NEEDS_ATTENTION", "UPDATING", "MAINTENANCE_IN_PROGRESS" + Allowed values are: "PROVISIONING", "AVAILABLE", "STOPPING", "STOPPED", "STARTING", "TERMINATING", "TERMINATED", "UNAVAILABLE", "RESTORE_IN_PROGRESS", "RESTORE_FAILED", "BACKUP_IN_PROGRESS", "SCALE_IN_PROGRESS", "AVAILABLE_NEEDS_ATTENTION", "UPDATING", "MAINTENANCE_IN_PROGRESS", "RESTARTING" :param str db_workload: (optional) A filter to return only autonomous database resources that match the specified workload type. @@ -6091,7 +6091,7 @@ def list_autonomous_databases(self, compartment_id, **kwargs): ) if 'lifecycle_state' in kwargs: - lifecycle_state_allowed_values = ["PROVISIONING", "AVAILABLE", "STOPPING", "STOPPED", "STARTING", "TERMINATING", "TERMINATED", "UNAVAILABLE", "RESTORE_IN_PROGRESS", "RESTORE_FAILED", "BACKUP_IN_PROGRESS", "SCALE_IN_PROGRESS", "AVAILABLE_NEEDS_ATTENTION", "UPDATING", "MAINTENANCE_IN_PROGRESS"] + lifecycle_state_allowed_values = ["PROVISIONING", "AVAILABLE", "STOPPING", "STOPPED", "STARTING", "TERMINATING", "TERMINATED", "UNAVAILABLE", "RESTORE_IN_PROGRESS", "RESTORE_FAILED", "BACKUP_IN_PROGRESS", "SCALE_IN_PROGRESS", "AVAILABLE_NEEDS_ATTENTION", "UPDATING", "MAINTENANCE_IN_PROGRESS", "RESTARTING"] if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: raise ValueError( "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) @@ -8789,6 +8789,83 @@ def restart_autonomous_container_database(self, autonomous_container_database_id header_params=header_params, response_type="AutonomousContainerDatabase") + def restart_autonomous_database(self, autonomous_database_id, **kwargs): + """ + Restarts the specified Autonomous Database. + Restarts the specified Autonomous Database. + + + :param str autonomous_database_id: (required) + The database `OCID`__. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + parameter to the value of the etag from a previous GET or POST response for that resource. The resource + will be updated or deleted only if the etag you provide matches the resource's current etag value. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.database.models.AutonomousDatabase` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/autonomousDatabases/{autonomousDatabaseId}/actions/restart" + method = "POST" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "if_match" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "restart_autonomous_database got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "autonomousDatabaseId": autonomous_database_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="AutonomousDatabase") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="AutonomousDatabase") + def restore_autonomous_data_warehouse(self, autonomous_data_warehouse_id, restore_autonomous_data_warehouse_details, **kwargs): """ Restores an Autonomous Data Warehouse based on the provided request parameters. diff --git a/src/oci/database/database_client_composite_operations.py b/src/oci/database/database_client_composite_operations.py index 86bdb1bd03..6f19162058 100644 --- a/src/oci/database/database_client_composite_operations.py +++ b/src/oci/database/database_client_composite_operations.py @@ -2260,6 +2260,83 @@ def restart_autonomous_container_database_and_wait_for_state(self, autonomous_co except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def restart_autonomous_database_and_wait_for_work_request(self, autonomous_database_id, work_request_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.database.DatabaseClient.restart_autonomous_database` and waits for the oci.work_requests.models.WorkRequest + to enter the given state(s). + + :param str autonomous_database_id: (required) + The database `OCID`__. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + :param list[str] work_request_states: (optional) + An array of work requests states to wait on. These should be valid values for :py:attr:`~oci.work_requests.models.WorkRequest.status` + Default values are termination states: [STATUS_SUCCEEDED, STATUS_FAILED, STATUS_CANCELED] + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.database.DatabaseClient.restart_autonomous_database` + + :param dict waiter_kwargs: + A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` + as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait + """ + operation_result = self.client.restart_autonomous_database(autonomous_database_id, **operation_kwargs) + work_request_states = work_request_states if work_request_states else oci.waiter._WORK_REQUEST_TERMINATION_STATES + lowered_work_request_states = [w.lower() for w in work_request_states] + work_request_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self._work_request_client, + self._work_request_client.get_work_request(work_request_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_work_request_states, + **waiter_kwargs + ) + return waiter_result + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def restart_autonomous_database_and_wait_for_state(self, autonomous_database_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.database.DatabaseClient.restart_autonomous_database` and waits for the :py:class:`~oci.database.models.AutonomousDatabase` acted upon + to enter the given state(s). + + :param str autonomous_database_id: (required) + The database `OCID`__. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.database.models.AutonomousDatabase.lifecycle_state` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.database.DatabaseClient.restart_autonomous_database` + + :param dict waiter_kwargs: + A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` + as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait + """ + operation_result = self.client.restart_autonomous_database(autonomous_database_id, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.data.id + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_autonomous_database(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def restore_autonomous_data_warehouse_and_wait_for_state(self, autonomous_data_warehouse_id, restore_autonomous_data_warehouse_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ Calls :py:func:`~oci.database.DatabaseClient.restore_autonomous_data_warehouse` and waits for the :py:class:`~oci.database.models.AutonomousDataWarehouse` acted upon diff --git a/src/oci/database/models/autonomous_database.py b/src/oci/database/models/autonomous_database.py index 49a7dd868a..b1005bb8ba 100644 --- a/src/oci/database/models/autonomous_database.py +++ b/src/oci/database/models/autonomous_database.py @@ -72,6 +72,10 @@ class AutonomousDatabase(object): #: This constant has a value of "MAINTENANCE_IN_PROGRESS" LIFECYCLE_STATE_MAINTENANCE_IN_PROGRESS = "MAINTENANCE_IN_PROGRESS" + #: A constant which can be used with the lifecycle_state property of a AutonomousDatabase. + #: This constant has a value of "RESTARTING" + LIFECYCLE_STATE_RESTARTING = "RESTARTING" + #: A constant which can be used with the license_model property of a AutonomousDatabase. #: This constant has a value of "LICENSE_INCLUDED" LICENSE_MODEL_LICENSE_INCLUDED = "LICENSE_INCLUDED" @@ -123,7 +127,7 @@ def __init__(self, **kwargs): :param lifecycle_state: The value to assign to the lifecycle_state property of this AutonomousDatabase. - Allowed values for this property are: "PROVISIONING", "AVAILABLE", "STOPPING", "STOPPED", "STARTING", "TERMINATING", "TERMINATED", "UNAVAILABLE", "RESTORE_IN_PROGRESS", "RESTORE_FAILED", "BACKUP_IN_PROGRESS", "SCALE_IN_PROGRESS", "AVAILABLE_NEEDS_ATTENTION", "UPDATING", "MAINTENANCE_IN_PROGRESS", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "PROVISIONING", "AVAILABLE", "STOPPING", "STOPPED", "STARTING", "TERMINATING", "TERMINATED", "UNAVAILABLE", "RESTORE_IN_PROGRESS", "RESTORE_FAILED", "BACKUP_IN_PROGRESS", "SCALE_IN_PROGRESS", "AVAILABLE_NEEDS_ATTENTION", "UPDATING", "MAINTENANCE_IN_PROGRESS", "RESTARTING", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type lifecycle_state: str @@ -205,6 +209,22 @@ def __init__(self, **kwargs): The value to assign to the defined_tags property of this AutonomousDatabase. :type defined_tags: dict(str, dict(str, object)) + :param subnet_id: + The value to assign to the subnet_id property of this AutonomousDatabase. + :type subnet_id: str + + :param nsg_ids: + The value to assign to the nsg_ids property of this AutonomousDatabase. + :type nsg_ids: list[str] + + :param private_endpoint: + The value to assign to the private_endpoint property of this AutonomousDatabase. + :type private_endpoint: str + + :param private_endpoint_label: + The value to assign to the private_endpoint_label property of this AutonomousDatabase. + :type private_endpoint_label: str + :param db_version: The value to assign to the db_version property of this AutonomousDatabase. :type db_version: str @@ -265,6 +285,10 @@ def __init__(self, **kwargs): 'used_data_storage_size_in_tbs': 'int', 'freeform_tags': 'dict(str, str)', 'defined_tags': 'dict(str, dict(str, object))', + 'subnet_id': 'str', + 'nsg_ids': 'list[str]', + 'private_endpoint': 'str', + 'private_endpoint_label': 'str', 'db_version': 'str', 'is_preview': 'bool', 'db_workload': 'str', @@ -298,6 +322,10 @@ def __init__(self, **kwargs): 'used_data_storage_size_in_tbs': 'usedDataStorageSizeInTBs', 'freeform_tags': 'freeformTags', 'defined_tags': 'definedTags', + 'subnet_id': 'subnetId', + 'nsg_ids': 'nsgIds', + 'private_endpoint': 'privateEndpoint', + 'private_endpoint_label': 'privateEndpointLabel', 'db_version': 'dbVersion', 'is_preview': 'isPreview', 'db_workload': 'dbWorkload', @@ -330,6 +358,10 @@ def __init__(self, **kwargs): self._used_data_storage_size_in_tbs = None self._freeform_tags = None self._defined_tags = None + self._subnet_id = None + self._nsg_ids = None + self._private_endpoint = None + self._private_endpoint_label = None self._db_version = None self._is_preview = None self._db_workload = None @@ -401,7 +433,7 @@ def lifecycle_state(self): **[Required]** Gets the lifecycle_state of this AutonomousDatabase. The current state of the Autonomous Database. - Allowed values for this property are: "PROVISIONING", "AVAILABLE", "STOPPING", "STOPPED", "STARTING", "TERMINATING", "TERMINATED", "UNAVAILABLE", "RESTORE_IN_PROGRESS", "RESTORE_FAILED", "BACKUP_IN_PROGRESS", "SCALE_IN_PROGRESS", "AVAILABLE_NEEDS_ATTENTION", "UPDATING", "MAINTENANCE_IN_PROGRESS", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "PROVISIONING", "AVAILABLE", "STOPPING", "STOPPED", "STARTING", "TERMINATING", "TERMINATED", "UNAVAILABLE", "RESTORE_IN_PROGRESS", "RESTORE_FAILED", "BACKUP_IN_PROGRESS", "SCALE_IN_PROGRESS", "AVAILABLE_NEEDS_ATTENTION", "UPDATING", "MAINTENANCE_IN_PROGRESS", "RESTARTING", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -420,7 +452,7 @@ def lifecycle_state(self, lifecycle_state): :param lifecycle_state: The lifecycle_state of this AutonomousDatabase. :type: str """ - allowed_values = ["PROVISIONING", "AVAILABLE", "STOPPING", "STOPPED", "STARTING", "TERMINATING", "TERMINATED", "UNAVAILABLE", "RESTORE_IN_PROGRESS", "RESTORE_FAILED", "BACKUP_IN_PROGRESS", "SCALE_IN_PROGRESS", "AVAILABLE_NEEDS_ATTENTION", "UPDATING", "MAINTENANCE_IN_PROGRESS"] + allowed_values = ["PROVISIONING", "AVAILABLE", "STOPPING", "STOPPED", "STARTING", "TERMINATING", "TERMINATED", "UNAVAILABLE", "RESTORE_IN_PROGRESS", "RESTORE_FAILED", "BACKUP_IN_PROGRESS", "SCALE_IN_PROGRESS", "AVAILABLE_NEEDS_ATTENTION", "UPDATING", "MAINTENANCE_IN_PROGRESS", "RESTARTING"] if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): lifecycle_state = 'UNKNOWN_ENUM_VALUE' self._lifecycle_state = lifecycle_state @@ -921,6 +953,130 @@ def defined_tags(self, defined_tags): """ self._defined_tags = defined_tags + @property + def subnet_id(self): + """ + Gets the subnet_id of this AutonomousDatabase. + The `OCID`__ of the subnet the resource is associated with. + + **Subnet Restrictions:** + - For bare metal DB systems and for single node virtual machine DB systems, do not use a subnet that overlaps with 192.168.16.16/28. + - For Exadata and virtual machine 2-node RAC DB systems, do not use a subnet that overlaps with 192.168.128.0/20. + - For Autonomous Database, setting this will disable public secure access to the database. + + These subnets are used by the Oracle Clusterware private interconnect on the database instance. + Specifying an overlapping subnet will cause the private interconnect to malfunction. + This restriction applies to both the client subnet and the backup subnet. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :return: The subnet_id of this AutonomousDatabase. + :rtype: str + """ + return self._subnet_id + + @subnet_id.setter + def subnet_id(self, subnet_id): + """ + Sets the subnet_id of this AutonomousDatabase. + The `OCID`__ of the subnet the resource is associated with. + + **Subnet Restrictions:** + - For bare metal DB systems and for single node virtual machine DB systems, do not use a subnet that overlaps with 192.168.16.16/28. + - For Exadata and virtual machine 2-node RAC DB systems, do not use a subnet that overlaps with 192.168.128.0/20. + - For Autonomous Database, setting this will disable public secure access to the database. + + These subnets are used by the Oracle Clusterware private interconnect on the database instance. + Specifying an overlapping subnet will cause the private interconnect to malfunction. + This restriction applies to both the client subnet and the backup subnet. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :param subnet_id: The subnet_id of this AutonomousDatabase. + :type: str + """ + self._subnet_id = subnet_id + + @property + def nsg_ids(self): + """ + Gets the nsg_ids of this AutonomousDatabase. + A list of the `OCIDs`__ of the network security groups (NSGs) that this DB system belongs to. Setting this to an empty array after the list is created removes the resource from all NSGs. For more information about NSGs, see `Security Rules`__. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + __ https://docs.cloud.oracle.com/Content/Network/Concepts/securityrules.htm + + + :return: The nsg_ids of this AutonomousDatabase. + :rtype: list[str] + """ + return self._nsg_ids + + @nsg_ids.setter + def nsg_ids(self, nsg_ids): + """ + Sets the nsg_ids of this AutonomousDatabase. + A list of the `OCIDs`__ of the network security groups (NSGs) that this DB system belongs to. Setting this to an empty array after the list is created removes the resource from all NSGs. For more information about NSGs, see `Security Rules`__. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + __ https://docs.cloud.oracle.com/Content/Network/Concepts/securityrules.htm + + + :param nsg_ids: The nsg_ids of this AutonomousDatabase. + :type: list[str] + """ + self._nsg_ids = nsg_ids + + @property + def private_endpoint(self): + """ + Gets the private_endpoint of this AutonomousDatabase. + The private endpoint for the resource. + + + :return: The private_endpoint of this AutonomousDatabase. + :rtype: str + """ + return self._private_endpoint + + @private_endpoint.setter + def private_endpoint(self, private_endpoint): + """ + Sets the private_endpoint of this AutonomousDatabase. + The private endpoint for the resource. + + + :param private_endpoint: The private_endpoint of this AutonomousDatabase. + :type: str + """ + self._private_endpoint = private_endpoint + + @property + def private_endpoint_label(self): + """ + Gets the private_endpoint_label of this AutonomousDatabase. + The private endpoint label for the resource. + + + :return: The private_endpoint_label of this AutonomousDatabase. + :rtype: str + """ + return self._private_endpoint_label + + @private_endpoint_label.setter + def private_endpoint_label(self, private_endpoint_label): + """ + Sets the private_endpoint_label of this AutonomousDatabase. + The private endpoint label for the resource. + + + :param private_endpoint_label: The private_endpoint_label of this AutonomousDatabase. + :type: str + """ + self._private_endpoint_label = private_endpoint_label + @property def db_version(self): """ diff --git a/src/oci/database/models/autonomous_database_summary.py b/src/oci/database/models/autonomous_database_summary.py index 14b6a42b10..3d240e85ba 100644 --- a/src/oci/database/models/autonomous_database_summary.py +++ b/src/oci/database/models/autonomous_database_summary.py @@ -74,6 +74,10 @@ class AutonomousDatabaseSummary(object): #: This constant has a value of "MAINTENANCE_IN_PROGRESS" LIFECYCLE_STATE_MAINTENANCE_IN_PROGRESS = "MAINTENANCE_IN_PROGRESS" + #: A constant which can be used with the lifecycle_state property of a AutonomousDatabaseSummary. + #: This constant has a value of "RESTARTING" + LIFECYCLE_STATE_RESTARTING = "RESTARTING" + #: A constant which can be used with the license_model property of a AutonomousDatabaseSummary. #: This constant has a value of "LICENSE_INCLUDED" LICENSE_MODEL_LICENSE_INCLUDED = "LICENSE_INCLUDED" @@ -125,7 +129,7 @@ def __init__(self, **kwargs): :param lifecycle_state: The value to assign to the lifecycle_state property of this AutonomousDatabaseSummary. - Allowed values for this property are: "PROVISIONING", "AVAILABLE", "STOPPING", "STOPPED", "STARTING", "TERMINATING", "TERMINATED", "UNAVAILABLE", "RESTORE_IN_PROGRESS", "RESTORE_FAILED", "BACKUP_IN_PROGRESS", "SCALE_IN_PROGRESS", "AVAILABLE_NEEDS_ATTENTION", "UPDATING", "MAINTENANCE_IN_PROGRESS", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "PROVISIONING", "AVAILABLE", "STOPPING", "STOPPED", "STARTING", "TERMINATING", "TERMINATED", "UNAVAILABLE", "RESTORE_IN_PROGRESS", "RESTORE_FAILED", "BACKUP_IN_PROGRESS", "SCALE_IN_PROGRESS", "AVAILABLE_NEEDS_ATTENTION", "UPDATING", "MAINTENANCE_IN_PROGRESS", "RESTARTING", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type lifecycle_state: str @@ -207,6 +211,22 @@ def __init__(self, **kwargs): The value to assign to the defined_tags property of this AutonomousDatabaseSummary. :type defined_tags: dict(str, dict(str, object)) + :param subnet_id: + The value to assign to the subnet_id property of this AutonomousDatabaseSummary. + :type subnet_id: str + + :param nsg_ids: + The value to assign to the nsg_ids property of this AutonomousDatabaseSummary. + :type nsg_ids: list[str] + + :param private_endpoint: + The value to assign to the private_endpoint property of this AutonomousDatabaseSummary. + :type private_endpoint: str + + :param private_endpoint_label: + The value to assign to the private_endpoint_label property of this AutonomousDatabaseSummary. + :type private_endpoint_label: str + :param db_version: The value to assign to the db_version property of this AutonomousDatabaseSummary. :type db_version: str @@ -267,6 +287,10 @@ def __init__(self, **kwargs): 'used_data_storage_size_in_tbs': 'int', 'freeform_tags': 'dict(str, str)', 'defined_tags': 'dict(str, dict(str, object))', + 'subnet_id': 'str', + 'nsg_ids': 'list[str]', + 'private_endpoint': 'str', + 'private_endpoint_label': 'str', 'db_version': 'str', 'is_preview': 'bool', 'db_workload': 'str', @@ -300,6 +324,10 @@ def __init__(self, **kwargs): 'used_data_storage_size_in_tbs': 'usedDataStorageSizeInTBs', 'freeform_tags': 'freeformTags', 'defined_tags': 'definedTags', + 'subnet_id': 'subnetId', + 'nsg_ids': 'nsgIds', + 'private_endpoint': 'privateEndpoint', + 'private_endpoint_label': 'privateEndpointLabel', 'db_version': 'dbVersion', 'is_preview': 'isPreview', 'db_workload': 'dbWorkload', @@ -332,6 +360,10 @@ def __init__(self, **kwargs): self._used_data_storage_size_in_tbs = None self._freeform_tags = None self._defined_tags = None + self._subnet_id = None + self._nsg_ids = None + self._private_endpoint = None + self._private_endpoint_label = None self._db_version = None self._is_preview = None self._db_workload = None @@ -403,7 +435,7 @@ def lifecycle_state(self): **[Required]** Gets the lifecycle_state of this AutonomousDatabaseSummary. The current state of the Autonomous Database. - Allowed values for this property are: "PROVISIONING", "AVAILABLE", "STOPPING", "STOPPED", "STARTING", "TERMINATING", "TERMINATED", "UNAVAILABLE", "RESTORE_IN_PROGRESS", "RESTORE_FAILED", "BACKUP_IN_PROGRESS", "SCALE_IN_PROGRESS", "AVAILABLE_NEEDS_ATTENTION", "UPDATING", "MAINTENANCE_IN_PROGRESS", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "PROVISIONING", "AVAILABLE", "STOPPING", "STOPPED", "STARTING", "TERMINATING", "TERMINATED", "UNAVAILABLE", "RESTORE_IN_PROGRESS", "RESTORE_FAILED", "BACKUP_IN_PROGRESS", "SCALE_IN_PROGRESS", "AVAILABLE_NEEDS_ATTENTION", "UPDATING", "MAINTENANCE_IN_PROGRESS", "RESTARTING", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -422,7 +454,7 @@ def lifecycle_state(self, lifecycle_state): :param lifecycle_state: The lifecycle_state of this AutonomousDatabaseSummary. :type: str """ - allowed_values = ["PROVISIONING", "AVAILABLE", "STOPPING", "STOPPED", "STARTING", "TERMINATING", "TERMINATED", "UNAVAILABLE", "RESTORE_IN_PROGRESS", "RESTORE_FAILED", "BACKUP_IN_PROGRESS", "SCALE_IN_PROGRESS", "AVAILABLE_NEEDS_ATTENTION", "UPDATING", "MAINTENANCE_IN_PROGRESS"] + allowed_values = ["PROVISIONING", "AVAILABLE", "STOPPING", "STOPPED", "STARTING", "TERMINATING", "TERMINATED", "UNAVAILABLE", "RESTORE_IN_PROGRESS", "RESTORE_FAILED", "BACKUP_IN_PROGRESS", "SCALE_IN_PROGRESS", "AVAILABLE_NEEDS_ATTENTION", "UPDATING", "MAINTENANCE_IN_PROGRESS", "RESTARTING"] if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): lifecycle_state = 'UNKNOWN_ENUM_VALUE' self._lifecycle_state = lifecycle_state @@ -923,6 +955,130 @@ def defined_tags(self, defined_tags): """ self._defined_tags = defined_tags + @property + def subnet_id(self): + """ + Gets the subnet_id of this AutonomousDatabaseSummary. + The `OCID`__ of the subnet the resource is associated with. + + **Subnet Restrictions:** + - For bare metal DB systems and for single node virtual machine DB systems, do not use a subnet that overlaps with 192.168.16.16/28. + - For Exadata and virtual machine 2-node RAC DB systems, do not use a subnet that overlaps with 192.168.128.0/20. + - For Autonomous Database, setting this will disable public secure access to the database. + + These subnets are used by the Oracle Clusterware private interconnect on the database instance. + Specifying an overlapping subnet will cause the private interconnect to malfunction. + This restriction applies to both the client subnet and the backup subnet. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :return: The subnet_id of this AutonomousDatabaseSummary. + :rtype: str + """ + return self._subnet_id + + @subnet_id.setter + def subnet_id(self, subnet_id): + """ + Sets the subnet_id of this AutonomousDatabaseSummary. + The `OCID`__ of the subnet the resource is associated with. + + **Subnet Restrictions:** + - For bare metal DB systems and for single node virtual machine DB systems, do not use a subnet that overlaps with 192.168.16.16/28. + - For Exadata and virtual machine 2-node RAC DB systems, do not use a subnet that overlaps with 192.168.128.0/20. + - For Autonomous Database, setting this will disable public secure access to the database. + + These subnets are used by the Oracle Clusterware private interconnect on the database instance. + Specifying an overlapping subnet will cause the private interconnect to malfunction. + This restriction applies to both the client subnet and the backup subnet. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :param subnet_id: The subnet_id of this AutonomousDatabaseSummary. + :type: str + """ + self._subnet_id = subnet_id + + @property + def nsg_ids(self): + """ + Gets the nsg_ids of this AutonomousDatabaseSummary. + A list of the `OCIDs`__ of the network security groups (NSGs) that this DB system belongs to. Setting this to an empty array after the list is created removes the resource from all NSGs. For more information about NSGs, see `Security Rules`__. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + __ https://docs.cloud.oracle.com/Content/Network/Concepts/securityrules.htm + + + :return: The nsg_ids of this AutonomousDatabaseSummary. + :rtype: list[str] + """ + return self._nsg_ids + + @nsg_ids.setter + def nsg_ids(self, nsg_ids): + """ + Sets the nsg_ids of this AutonomousDatabaseSummary. + A list of the `OCIDs`__ of the network security groups (NSGs) that this DB system belongs to. Setting this to an empty array after the list is created removes the resource from all NSGs. For more information about NSGs, see `Security Rules`__. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + __ https://docs.cloud.oracle.com/Content/Network/Concepts/securityrules.htm + + + :param nsg_ids: The nsg_ids of this AutonomousDatabaseSummary. + :type: list[str] + """ + self._nsg_ids = nsg_ids + + @property + def private_endpoint(self): + """ + Gets the private_endpoint of this AutonomousDatabaseSummary. + The private endpoint for the resource. + + + :return: The private_endpoint of this AutonomousDatabaseSummary. + :rtype: str + """ + return self._private_endpoint + + @private_endpoint.setter + def private_endpoint(self, private_endpoint): + """ + Sets the private_endpoint of this AutonomousDatabaseSummary. + The private endpoint for the resource. + + + :param private_endpoint: The private_endpoint of this AutonomousDatabaseSummary. + :type: str + """ + self._private_endpoint = private_endpoint + + @property + def private_endpoint_label(self): + """ + Gets the private_endpoint_label of this AutonomousDatabaseSummary. + The private endpoint label for the resource. + + + :return: The private_endpoint_label of this AutonomousDatabaseSummary. + :rtype: str + """ + return self._private_endpoint_label + + @private_endpoint_label.setter + def private_endpoint_label(self, private_endpoint_label): + """ + Sets the private_endpoint_label of this AutonomousDatabaseSummary. + The private endpoint label for the resource. + + + :param private_endpoint_label: The private_endpoint_label of this AutonomousDatabaseSummary. + :type: str + """ + self._private_endpoint_label = private_endpoint_label + @property def db_version(self): """ diff --git a/src/oci/database/models/create_autonomous_database_base.py b/src/oci/database/models/create_autonomous_database_base.py index d53020a1c0..c8deb1974a 100644 --- a/src/oci/database/models/create_autonomous_database_base.py +++ b/src/oci/database/models/create_autonomous_database_base.py @@ -116,6 +116,18 @@ def __init__(self, **kwargs): The value to assign to the whitelisted_ips property of this CreateAutonomousDatabaseBase. :type whitelisted_ips: list[str] + :param subnet_id: + The value to assign to the subnet_id property of this CreateAutonomousDatabaseBase. + :type subnet_id: str + + :param nsg_ids: + The value to assign to the nsg_ids property of this CreateAutonomousDatabaseBase. + :type nsg_ids: list[str] + + :param private_endpoint_label: + The value to assign to the private_endpoint_label property of this CreateAutonomousDatabaseBase. + :type private_endpoint_label: str + :param freeform_tags: The value to assign to the freeform_tags property of this CreateAutonomousDatabaseBase. :type freeform_tags: dict(str, str) @@ -149,6 +161,9 @@ def __init__(self, **kwargs): 'is_dedicated': 'bool', 'autonomous_container_database_id': 'str', 'whitelisted_ips': 'list[str]', + 'subnet_id': 'str', + 'nsg_ids': 'list[str]', + 'private_endpoint_label': 'str', 'freeform_tags': 'dict(str, str)', 'defined_tags': 'dict(str, dict(str, object))', 'db_version': 'str', @@ -170,6 +185,9 @@ def __init__(self, **kwargs): 'is_dedicated': 'isDedicated', 'autonomous_container_database_id': 'autonomousContainerDatabaseId', 'whitelisted_ips': 'whitelistedIps', + 'subnet_id': 'subnetId', + 'nsg_ids': 'nsgIds', + 'private_endpoint_label': 'privateEndpointLabel', 'freeform_tags': 'freeformTags', 'defined_tags': 'definedTags', 'db_version': 'dbVersion', @@ -190,6 +208,9 @@ def __init__(self, **kwargs): self._is_dedicated = None self._autonomous_container_database_id = None self._whitelisted_ips = None + self._subnet_id = None + self._nsg_ids = None + self._private_endpoint_label = None self._freeform_tags = None self._defined_tags = None self._db_version = None @@ -607,6 +628,106 @@ def whitelisted_ips(self, whitelisted_ips): """ self._whitelisted_ips = whitelisted_ips + @property + def subnet_id(self): + """ + Gets the subnet_id of this CreateAutonomousDatabaseBase. + The `OCID`__ of the subnet the resource is associated with. + + **Subnet Restrictions:** + - For bare metal DB systems and for single node virtual machine DB systems, do not use a subnet that overlaps with 192.168.16.16/28. + - For Exadata and virtual machine 2-node RAC DB systems, do not use a subnet that overlaps with 192.168.128.0/20. + - For Autonomous Database, setting this will disable public secure access to the database. + + These subnets are used by the Oracle Clusterware private interconnect on the database instance. + Specifying an overlapping subnet will cause the private interconnect to malfunction. + This restriction applies to both the client subnet and the backup subnet. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :return: The subnet_id of this CreateAutonomousDatabaseBase. + :rtype: str + """ + return self._subnet_id + + @subnet_id.setter + def subnet_id(self, subnet_id): + """ + Sets the subnet_id of this CreateAutonomousDatabaseBase. + The `OCID`__ of the subnet the resource is associated with. + + **Subnet Restrictions:** + - For bare metal DB systems and for single node virtual machine DB systems, do not use a subnet that overlaps with 192.168.16.16/28. + - For Exadata and virtual machine 2-node RAC DB systems, do not use a subnet that overlaps with 192.168.128.0/20. + - For Autonomous Database, setting this will disable public secure access to the database. + + These subnets are used by the Oracle Clusterware private interconnect on the database instance. + Specifying an overlapping subnet will cause the private interconnect to malfunction. + This restriction applies to both the client subnet and the backup subnet. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :param subnet_id: The subnet_id of this CreateAutonomousDatabaseBase. + :type: str + """ + self._subnet_id = subnet_id + + @property + def nsg_ids(self): + """ + Gets the nsg_ids of this CreateAutonomousDatabaseBase. + A list of the `OCIDs`__ of the network security groups (NSGs) that this DB system belongs to. Setting this to an empty array after the list is created removes the resource from all NSGs. For more information about NSGs, see `Security Rules`__. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + __ https://docs.cloud.oracle.com/Content/Network/Concepts/securityrules.htm + + + :return: The nsg_ids of this CreateAutonomousDatabaseBase. + :rtype: list[str] + """ + return self._nsg_ids + + @nsg_ids.setter + def nsg_ids(self, nsg_ids): + """ + Sets the nsg_ids of this CreateAutonomousDatabaseBase. + A list of the `OCIDs`__ of the network security groups (NSGs) that this DB system belongs to. Setting this to an empty array after the list is created removes the resource from all NSGs. For more information about NSGs, see `Security Rules`__. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + __ https://docs.cloud.oracle.com/Content/Network/Concepts/securityrules.htm + + + :param nsg_ids: The nsg_ids of this CreateAutonomousDatabaseBase. + :type: list[str] + """ + self._nsg_ids = nsg_ids + + @property + def private_endpoint_label(self): + """ + Gets the private_endpoint_label of this CreateAutonomousDatabaseBase. + The private endpoint label for the resource. + + + :return: The private_endpoint_label of this CreateAutonomousDatabaseBase. + :rtype: str + """ + return self._private_endpoint_label + + @private_endpoint_label.setter + def private_endpoint_label(self, private_endpoint_label): + """ + Sets the private_endpoint_label of this CreateAutonomousDatabaseBase. + The private endpoint label for the resource. + + + :param private_endpoint_label: The private_endpoint_label of this CreateAutonomousDatabaseBase. + :type: str + """ + self._private_endpoint_label = private_endpoint_label + @property def freeform_tags(self): """ diff --git a/src/oci/database/models/create_autonomous_database_clone_details.py b/src/oci/database/models/create_autonomous_database_clone_details.py index 6c2d568708..4a3ce96239 100644 --- a/src/oci/database/models/create_autonomous_database_clone_details.py +++ b/src/oci/database/models/create_autonomous_database_clone_details.py @@ -84,6 +84,18 @@ def __init__(self, **kwargs): The value to assign to the whitelisted_ips property of this CreateAutonomousDatabaseCloneDetails. :type whitelisted_ips: list[str] + :param subnet_id: + The value to assign to the subnet_id property of this CreateAutonomousDatabaseCloneDetails. + :type subnet_id: str + + :param nsg_ids: + The value to assign to the nsg_ids property of this CreateAutonomousDatabaseCloneDetails. + :type nsg_ids: list[str] + + :param private_endpoint_label: + The value to assign to the private_endpoint_label property of this CreateAutonomousDatabaseCloneDetails. + :type private_endpoint_label: str + :param freeform_tags: The value to assign to the freeform_tags property of this CreateAutonomousDatabaseCloneDetails. :type freeform_tags: dict(str, str) @@ -126,6 +138,9 @@ def __init__(self, **kwargs): 'is_dedicated': 'bool', 'autonomous_container_database_id': 'str', 'whitelisted_ips': 'list[str]', + 'subnet_id': 'str', + 'nsg_ids': 'list[str]', + 'private_endpoint_label': 'str', 'freeform_tags': 'dict(str, str)', 'defined_tags': 'dict(str, dict(str, object))', 'db_version': 'str', @@ -149,6 +164,9 @@ def __init__(self, **kwargs): 'is_dedicated': 'isDedicated', 'autonomous_container_database_id': 'autonomousContainerDatabaseId', 'whitelisted_ips': 'whitelistedIps', + 'subnet_id': 'subnetId', + 'nsg_ids': 'nsgIds', + 'private_endpoint_label': 'privateEndpointLabel', 'freeform_tags': 'freeformTags', 'defined_tags': 'definedTags', 'db_version': 'dbVersion', @@ -171,6 +189,9 @@ def __init__(self, **kwargs): self._is_dedicated = None self._autonomous_container_database_id = None self._whitelisted_ips = None + self._subnet_id = None + self._nsg_ids = None + self._private_endpoint_label = None self._freeform_tags = None self._defined_tags = None self._db_version = None diff --git a/src/oci/database/models/create_autonomous_database_details.py b/src/oci/database/models/create_autonomous_database_details.py index a68eeaf443..10465eb82a 100644 --- a/src/oci/database/models/create_autonomous_database_details.py +++ b/src/oci/database/models/create_autonomous_database_details.py @@ -76,6 +76,18 @@ def __init__(self, **kwargs): The value to assign to the whitelisted_ips property of this CreateAutonomousDatabaseDetails. :type whitelisted_ips: list[str] + :param subnet_id: + The value to assign to the subnet_id property of this CreateAutonomousDatabaseDetails. + :type subnet_id: str + + :param nsg_ids: + The value to assign to the nsg_ids property of this CreateAutonomousDatabaseDetails. + :type nsg_ids: list[str] + + :param private_endpoint_label: + The value to assign to the private_endpoint_label property of this CreateAutonomousDatabaseDetails. + :type private_endpoint_label: str + :param freeform_tags: The value to assign to the freeform_tags property of this CreateAutonomousDatabaseDetails. :type freeform_tags: dict(str, str) @@ -109,6 +121,9 @@ def __init__(self, **kwargs): 'is_dedicated': 'bool', 'autonomous_container_database_id': 'str', 'whitelisted_ips': 'list[str]', + 'subnet_id': 'str', + 'nsg_ids': 'list[str]', + 'private_endpoint_label': 'str', 'freeform_tags': 'dict(str, str)', 'defined_tags': 'dict(str, dict(str, object))', 'db_version': 'str', @@ -130,6 +145,9 @@ def __init__(self, **kwargs): 'is_dedicated': 'isDedicated', 'autonomous_container_database_id': 'autonomousContainerDatabaseId', 'whitelisted_ips': 'whitelistedIps', + 'subnet_id': 'subnetId', + 'nsg_ids': 'nsgIds', + 'private_endpoint_label': 'privateEndpointLabel', 'freeform_tags': 'freeformTags', 'defined_tags': 'definedTags', 'db_version': 'dbVersion', @@ -150,6 +168,9 @@ def __init__(self, **kwargs): self._is_dedicated = None self._autonomous_container_database_id = None self._whitelisted_ips = None + self._subnet_id = None + self._nsg_ids = None + self._private_endpoint_label = None self._freeform_tags = None self._defined_tags = None self._db_version = None diff --git a/src/oci/database/models/create_autonomous_database_from_backup_details.py b/src/oci/database/models/create_autonomous_database_from_backup_details.py index 75fed26285..519c44d927 100644 --- a/src/oci/database/models/create_autonomous_database_from_backup_details.py +++ b/src/oci/database/models/create_autonomous_database_from_backup_details.py @@ -84,6 +84,18 @@ def __init__(self, **kwargs): The value to assign to the whitelisted_ips property of this CreateAutonomousDatabaseFromBackupDetails. :type whitelisted_ips: list[str] + :param subnet_id: + The value to assign to the subnet_id property of this CreateAutonomousDatabaseFromBackupDetails. + :type subnet_id: str + + :param nsg_ids: + The value to assign to the nsg_ids property of this CreateAutonomousDatabaseFromBackupDetails. + :type nsg_ids: list[str] + + :param private_endpoint_label: + The value to assign to the private_endpoint_label property of this CreateAutonomousDatabaseFromBackupDetails. + :type private_endpoint_label: str + :param freeform_tags: The value to assign to the freeform_tags property of this CreateAutonomousDatabaseFromBackupDetails. :type freeform_tags: dict(str, str) @@ -126,6 +138,9 @@ def __init__(self, **kwargs): 'is_dedicated': 'bool', 'autonomous_container_database_id': 'str', 'whitelisted_ips': 'list[str]', + 'subnet_id': 'str', + 'nsg_ids': 'list[str]', + 'private_endpoint_label': 'str', 'freeform_tags': 'dict(str, str)', 'defined_tags': 'dict(str, dict(str, object))', 'db_version': 'str', @@ -149,6 +164,9 @@ def __init__(self, **kwargs): 'is_dedicated': 'isDedicated', 'autonomous_container_database_id': 'autonomousContainerDatabaseId', 'whitelisted_ips': 'whitelistedIps', + 'subnet_id': 'subnetId', + 'nsg_ids': 'nsgIds', + 'private_endpoint_label': 'privateEndpointLabel', 'freeform_tags': 'freeformTags', 'defined_tags': 'definedTags', 'db_version': 'dbVersion', @@ -171,6 +189,9 @@ def __init__(self, **kwargs): self._is_dedicated = None self._autonomous_container_database_id = None self._whitelisted_ips = None + self._subnet_id = None + self._nsg_ids = None + self._private_endpoint_label = None self._freeform_tags = None self._defined_tags = None self._db_version = None diff --git a/src/oci/database/models/create_autonomous_database_from_backup_timestamp_details.py b/src/oci/database/models/create_autonomous_database_from_backup_timestamp_details.py index 6ce45827cc..335c60a328 100644 --- a/src/oci/database/models/create_autonomous_database_from_backup_timestamp_details.py +++ b/src/oci/database/models/create_autonomous_database_from_backup_timestamp_details.py @@ -84,6 +84,18 @@ def __init__(self, **kwargs): The value to assign to the whitelisted_ips property of this CreateAutonomousDatabaseFromBackupTimestampDetails. :type whitelisted_ips: list[str] + :param subnet_id: + The value to assign to the subnet_id property of this CreateAutonomousDatabaseFromBackupTimestampDetails. + :type subnet_id: str + + :param nsg_ids: + The value to assign to the nsg_ids property of this CreateAutonomousDatabaseFromBackupTimestampDetails. + :type nsg_ids: list[str] + + :param private_endpoint_label: + The value to assign to the private_endpoint_label property of this CreateAutonomousDatabaseFromBackupTimestampDetails. + :type private_endpoint_label: str + :param freeform_tags: The value to assign to the freeform_tags property of this CreateAutonomousDatabaseFromBackupTimestampDetails. :type freeform_tags: dict(str, str) @@ -130,6 +142,9 @@ def __init__(self, **kwargs): 'is_dedicated': 'bool', 'autonomous_container_database_id': 'str', 'whitelisted_ips': 'list[str]', + 'subnet_id': 'str', + 'nsg_ids': 'list[str]', + 'private_endpoint_label': 'str', 'freeform_tags': 'dict(str, str)', 'defined_tags': 'dict(str, dict(str, object))', 'db_version': 'str', @@ -154,6 +169,9 @@ def __init__(self, **kwargs): 'is_dedicated': 'isDedicated', 'autonomous_container_database_id': 'autonomousContainerDatabaseId', 'whitelisted_ips': 'whitelistedIps', + 'subnet_id': 'subnetId', + 'nsg_ids': 'nsgIds', + 'private_endpoint_label': 'privateEndpointLabel', 'freeform_tags': 'freeformTags', 'defined_tags': 'definedTags', 'db_version': 'dbVersion', @@ -177,6 +195,9 @@ def __init__(self, **kwargs): self._is_dedicated = None self._autonomous_container_database_id = None self._whitelisted_ips = None + self._subnet_id = None + self._nsg_ids = None + self._private_endpoint_label = None self._freeform_tags = None self._defined_tags = None self._db_version = None diff --git a/src/oci/database/models/update_autonomous_database_details.py b/src/oci/database/models/update_autonomous_database_details.py index c151046577..9197f1833a 100644 --- a/src/oci/database/models/update_autonomous_database_details.py +++ b/src/oci/database/models/update_autonomous_database_details.py @@ -59,6 +59,10 @@ def __init__(self, **kwargs): The value to assign to the defined_tags property of this UpdateAutonomousDatabaseDetails. :type defined_tags: dict(str, dict(str, object)) + :param nsg_ids: + The value to assign to the nsg_ids property of this UpdateAutonomousDatabaseDetails. + :type nsg_ids: list[str] + :param license_model: The value to assign to the license_model property of this UpdateAutonomousDatabaseDetails. Allowed values for this property are: "LICENSE_INCLUDED", "BRING_YOUR_OWN_LICENSE" @@ -82,6 +86,7 @@ def __init__(self, **kwargs): 'db_name': 'str', 'freeform_tags': 'dict(str, str)', 'defined_tags': 'dict(str, dict(str, object))', + 'nsg_ids': 'list[str]', 'license_model': 'str', 'whitelisted_ips': 'list[str]', 'is_auto_scaling_enabled': 'bool' @@ -96,6 +101,7 @@ def __init__(self, **kwargs): 'db_name': 'dbName', 'freeform_tags': 'freeformTags', 'defined_tags': 'definedTags', + 'nsg_ids': 'nsgIds', 'license_model': 'licenseModel', 'whitelisted_ips': 'whitelistedIps', 'is_auto_scaling_enabled': 'isAutoScalingEnabled' @@ -109,6 +115,7 @@ def __init__(self, **kwargs): self._db_name = None self._freeform_tags = None self._defined_tags = None + self._nsg_ids = None self._license_model = None self._whitelisted_ips = None self._is_auto_scaling_enabled = None @@ -325,6 +332,36 @@ def defined_tags(self, defined_tags): """ self._defined_tags = defined_tags + @property + def nsg_ids(self): + """ + Gets the nsg_ids of this UpdateAutonomousDatabaseDetails. + A list of the `OCIDs`__ of the network security groups (NSGs) that this DB system belongs to. Setting this to an empty array after the list is created removes the resource from all NSGs. For more information about NSGs, see `Security Rules`__. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + __ https://docs.cloud.oracle.com/Content/Network/Concepts/securityrules.htm + + + :return: The nsg_ids of this UpdateAutonomousDatabaseDetails. + :rtype: list[str] + """ + return self._nsg_ids + + @nsg_ids.setter + def nsg_ids(self, nsg_ids): + """ + Sets the nsg_ids of this UpdateAutonomousDatabaseDetails. + A list of the `OCIDs`__ of the network security groups (NSGs) that this DB system belongs to. Setting this to an empty array after the list is created removes the resource from all NSGs. For more information about NSGs, see `Security Rules`__. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + __ https://docs.cloud.oracle.com/Content/Network/Concepts/securityrules.htm + + + :param nsg_ids: The nsg_ids of this UpdateAutonomousDatabaseDetails. + :type: list[str] + """ + self._nsg_ids = nsg_ids + @property def license_model(self): """ diff --git a/src/oci/identity/identity_client.py b/src/oci/identity/identity_client.py index 2334d88f4d..71b4b4bc54 100644 --- a/src/oci/identity/identity_client.py +++ b/src/oci/identity/identity_client.py @@ -1129,6 +1129,179 @@ def create_mfa_totp_device(self, user_id, **kwargs): header_params=header_params, response_type="MfaTotpDevice") + def create_network_source(self, create_network_source_details, **kwargs): + """ + CreateNetworkSource + Creates a new network source in your tenancy. + + You must specify your tenancy's OCID as the compartment ID in the request object (remember that the tenancy + is simply the root compartment). Notice that IAM resources (users, groups, compartments, and some policies) + reside within the tenancy itself, unlike cloud resources such as compute instances, which typically + reside within compartments inside the tenancy. For information about OCIDs, see + `Resource Identifiers`__. + + You must also specify a *name* for the network source, which must be unique across all network sources in your + tenancy, and cannot be changed. + You can use this name or the OCID when writing policies that apply to the network source. For more information + about policies, see `How Policies Work`__. + + You must also specify a *description* for the network source (although it can be an empty string). It does not + have to be unique, and you can change it anytime with :func:`update_network_source`. + + After you send your request, the new object's `lifecycleState` will temporarily be CREATING. Before using the + object, first make sure its `lifecycleState` has changed to ACTIVE. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + __ https://docs.cloud.oracle.com/Content/Identity/Concepts/policies.htm + + + :param CreateNetworkSourceDetails create_network_source_details: (required) + Request object for creating a new network source. + + :param str opc_retry_token: (optional) + A token that uniquely identifies a request so it can be retried in case of a timeout or + server error without risk of executing that same action again. Retry tokens expire after 24 + hours, but can be invalidated before then due to conflicting operations (e.g., if a resource + has been deleted and purged from the system, then a retry of the original creation request + may be rejected). + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity.models.NetworkSources` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/networkSources" + method = "POST" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "opc_retry_token" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "create_network_source got unknown kwargs: {!r}".format(extra_kwargs)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-retry-token": kwargs.get("opc_retry_token", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + header_params=header_params, + body=create_network_source_details, + response_type="NetworkSources") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + header_params=header_params, + body=create_network_source_details, + response_type="NetworkSources") + + def create_o_auth_client_credential(self, user_id, create_o_auth2_client_credential_details, **kwargs): + """ + Creates Oauth token for the user + Creates Oauth token for the user + + + :param str user_id: (required) + The OCID of the user. + + :param CreateOAuth2ClientCredentialDetails create_o_auth2_client_credential_details: (required) + Request object containing the information required to generate an Oauth token. + + :param str opc_retry_token: (optional) + A token that uniquely identifies a request so it can be retried in case of a timeout or + server error without risk of executing that same action again. Retry tokens expire after 24 + hours, but can be invalidated before then due to conflicting operations (e.g., if a resource + has been deleted and purged from the system, then a retry of the original creation request + may be rejected). + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity.models.OAuth2ClientCredential` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/users/{userId}/oauth2ClientCredentials" + method = "POST" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "opc_retry_token" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "create_o_auth_client_credential got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "userId": user_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-retry-token": kwargs.get("opc_retry_token", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=create_o_auth2_client_credential_details, + response_type="OAuth2ClientCredential") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=create_o_auth2_client_credential_details, + response_type="OAuth2ClientCredential") + def create_or_reset_ui_password(self, user_id, **kwargs): """ CreateOrResetUIPassword @@ -2636,6 +2809,156 @@ def delete_mfa_totp_device(self, user_id, mfa_totp_device_id, **kwargs): path_params=path_params, header_params=header_params) + def delete_network_source(self, network_source_id, **kwargs): + """ + DeleteNetworkSource + Deletes the specified network source + + + :param str network_source_id: (required) + The OCID of the network source. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + parameter to the value of the etag from a previous GET or POST response for that resource. The resource + will be updated or deleted only if the etag you provide matches the resource's current etag value. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :return: A :class:`~oci.response.Response` object with data of type None + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/networkSources/{networkSourceId}" + method = "DELETE" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "if_match" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "delete_network_source got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "networkSourceId": network_source_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + + def delete_o_auth_client_credential(self, user_id, oauth2_client_credential_id, **kwargs): + """ + Delete Oauth token for the user + Delete Oauth token for the user + + + :param str user_id: (required) + The OCID of the user. + + :param str oauth2_client_credential_id: (required) + The ID of the Oauth credential. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + parameter to the value of the etag from a previous GET or POST response for that resource. The resource + will be updated or deleted only if the etag you provide matches the resource's current etag value. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :return: A :class:`~oci.response.Response` object with data of type None + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/users/{userId}/oauth2ClientCredentials/{oauth2ClientCredentialId}" + method = "DELETE" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "if_match" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "delete_o_auth_client_credential got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "userId": user_id, + "oauth2ClientCredentialId": oauth2_client_credential_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + def delete_policy(self, policy_id, **kwargs): """ DeletePolicy @@ -3740,6 +4063,70 @@ def get_mfa_totp_device(self, user_id, mfa_totp_device_id, **kwargs): header_params=header_params, response_type="MfaTotpDeviceSummary") + def get_network_source(self, network_source_id, **kwargs): + """ + GetNetworkSource + Gets the specified network source's information. + + + :param str network_source_id: (required) + The OCID of the network source. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity.models.NetworkSources` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/networkSources/{networkSourceId}" + method = "GET" + + expected_kwargs = ["retry_strategy"] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "get_network_source got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "networkSourceId": network_source_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json" + } + + retry_strategy = self.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="NetworkSources") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="NetworkSources") + def get_policy(self, policy_id, **kwargs): """ GetPolicy @@ -5179,28 +5566,229 @@ def list_identity_providers(self, protocol, compartment_id, **kwargs): To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. - :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.identity.models.IdentityProvider` + :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.identity.models.IdentityProvider` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/identityProviders" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "page", + "limit" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_identity_providers got unknown kwargs: {!r}".format(extra_kwargs)) + + query_params = { + "protocol": protocol, + "compartmentId": compartment_id, + "page": kwargs.get("page", missing), + "limit": kwargs.get("limit", missing) + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + header_params = { + "accept": "application/json", + "content-type": "application/json" + } + + retry_strategy = self.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="list[IdentityProvider]") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="list[IdentityProvider]") + + def list_idp_group_mappings(self, identity_provider_id, **kwargs): + """ + ListIdpGroupMappings + Lists the group mappings for the specified identity provider. + + + :param str identity_provider_id: (required) + The OCID of the identity provider. + + :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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.identity.models.IdpGroupMapping` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/identityProviders/{identityProviderId}/groupMappings" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "page", + "limit" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_idp_group_mappings got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "identityProviderId": identity_provider_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + query_params = { + "page": kwargs.get("page", missing), + "limit": kwargs.get("limit", missing) + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + header_params = { + "accept": "application/json", + "content-type": "application/json" + } + + retry_strategy = self.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="list[IdpGroupMapping]") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="list[IdpGroupMapping]") + + def list_mfa_totp_devices(self, user_id, **kwargs): + """ + ListMfaTotpDevices + Lists the MFA TOTP devices for the specified user. The returned object contains the device's OCID, but not + the seed. The seed is returned only upon creation or when the IAM service regenerates the MFA seed for the device. + + + :param str user_id: (required) + The OCID of the user. + + :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 str sort_by: (optional) + The field to sort by. You can provide one sort order (`sortOrder`). Default order for + TIMECREATED is descending. Default order for NAME is ascending. The NAME + sort order is case sensitive. + + **Note:** In general, some \"List\" operations (for example, `ListInstances`) let you + optionally filter by Availability Domain if the scope of the resource type is within a + single Availability Domain. If you call one of these \"List\" operations without specifying + an Availability Domain, the resources are grouped by Availability Domain, then sorted. + + Allowed values are: "TIMECREATED", "NAME" + + :param str sort_order: (optional) + The sort order to use, either ascending (`ASC`) or descending (`DESC`). The NAME sort order + is case sensitive. + + Allowed values are: "ASC", "DESC" + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.identity.models.MfaTotpDeviceSummary` :rtype: :class:`~oci.response.Response` """ - resource_path = "/identityProviders" + resource_path = "/users/{userId}/mfaTotpDevices" method = "GET" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", "page", - "limit" + "limit", + "sort_by", + "sort_order" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "list_identity_providers got unknown kwargs: {!r}".format(extra_kwargs)) + "list_mfa_totp_devices got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "userId": user_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + if 'sort_by' in kwargs: + sort_by_allowed_values = ["TIMECREATED", "NAME"] + if kwargs['sort_by'] not in sort_by_allowed_values: + raise ValueError( + "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) + ) + + if 'sort_order' in kwargs: + sort_order_allowed_values = ["ASC", "DESC"] + if kwargs['sort_order'] not in sort_order_allowed_values: + raise ValueError( + "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) + ) query_params = { - "protocol": protocol, - "compartmentId": compartment_id, "page": kwargs.get("page", missing), - "limit": kwargs.get("limit", missing) + "limit": kwargs.get("limit", missing), + "sortBy": kwargs.get("sort_by", missing), + "sortOrder": kwargs.get("sort_order", missing) } query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} @@ -5218,25 +5806,31 @@ def list_identity_providers(self, protocol, compartment_id, **kwargs): self.base_client.call_api, resource_path=resource_path, method=method, + path_params=path_params, query_params=query_params, header_params=header_params, - response_type="list[IdentityProvider]") + response_type="list[MfaTotpDeviceSummary]") else: return self.base_client.call_api( resource_path=resource_path, method=method, + path_params=path_params, query_params=query_params, header_params=header_params, - response_type="list[IdentityProvider]") + response_type="list[MfaTotpDeviceSummary]") - def list_idp_group_mappings(self, identity_provider_id, **kwargs): + def list_network_sources(self, compartment_id, **kwargs): """ - ListIdpGroupMappings - Lists the group mappings for the specified identity provider. + ListNetworkSources + Lists the network sources in your tenancy. You must specify your tenancy's OCID as the value for + the compartment ID (remember that the tenancy is simply the root compartment). + See `Where to Get the Tenancy's OCID and User's OCID`__. + + __ https://docs.cloud.oracle.com/Content/API/Concepts/apisigningkey.htm#five - :param str identity_provider_id: (required) - The OCID of the identity provider. + :param str compartment_id: (required) + The OCID of the compartment (remember that the tenancy is simply the root compartment). :param str page: (optional) The value of the `opc-next-page` response header from the previous \"List\" call. @@ -5252,10 +5846,10 @@ def list_idp_group_mappings(self, identity_provider_id, **kwargs): To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. - :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.identity.models.IdpGroupMapping` + :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.identity.models.NetworkSourcesSummary` :rtype: :class:`~oci.response.Response` """ - resource_path = "/identityProviders/{identityProviderId}/groupMappings" + resource_path = "/networkSources" method = "GET" # Don't accept unknown kwargs @@ -5267,19 +5861,10 @@ def list_idp_group_mappings(self, identity_provider_id, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "list_idp_group_mappings got unknown kwargs: {!r}".format(extra_kwargs)) - - path_params = { - "identityProviderId": identity_provider_id - } - - path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} - - for (k, v) in six.iteritems(path_params): - if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): - raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + "list_network_sources got unknown kwargs: {!r}".format(extra_kwargs)) query_params = { + "compartmentId": compartment_id, "page": kwargs.get("page", missing), "limit": kwargs.get("limit", missing) } @@ -5299,24 +5884,21 @@ def list_idp_group_mappings(self, identity_provider_id, **kwargs): self.base_client.call_api, resource_path=resource_path, method=method, - path_params=path_params, query_params=query_params, header_params=header_params, - response_type="list[IdpGroupMapping]") + response_type="list[NetworkSourcesSummary]") else: return self.base_client.call_api( resource_path=resource_path, method=method, - path_params=path_params, query_params=query_params, header_params=header_params, - response_type="list[IdpGroupMapping]") + response_type="list[NetworkSourcesSummary]") - def list_mfa_totp_devices(self, user_id, **kwargs): + def list_o_auth_client_credentials(self, user_id, **kwargs): """ - ListMfaTotpDevices - Lists the MFA TOTP devices for the specified user. The returned object contains the device's OCID, but not - the seed. The seed is returned only upon creation or when the IAM service regenerates the MFA seed for the device. + List of Oauth tokens for the user + List of Oauth tokens for the user :param str user_id: (required) @@ -5328,23 +5910,10 @@ def list_mfa_totp_devices(self, user_id, **kwargs): :param int limit: (optional) The maximum number of items to return in a paginated \"List\" call. - :param str sort_by: (optional) - The field to sort by. You can provide one sort order (`sortOrder`). Default order for - TIMECREATED is descending. Default order for NAME is ascending. The NAME - sort order is case sensitive. - - **Note:** In general, some \"List\" operations (for example, `ListInstances`) let you - optionally filter by Availability Domain if the scope of the resource type is within a - single Availability Domain. If you call one of these \"List\" operations without specifying - an Availability Domain, the resources are grouped by Availability Domain, then sorted. - - Allowed values are: "TIMECREATED", "NAME" - - :param str sort_order: (optional) - The sort order to use, either ascending (`ASC`) or descending (`DESC`). The NAME sort order - is case sensitive. + :param str lifecycle_state: (optional) + A filter to only return resources that match the given lifecycle state. The state value is case-insensitive. - Allowed values are: "ASC", "DESC" + Allowed values are: "CREATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED" :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. @@ -5354,10 +5923,10 @@ def list_mfa_totp_devices(self, user_id, **kwargs): To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. - :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.identity.models.MfaTotpDeviceSummary` + :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.identity.models.OAuth2ClientCredentialSummary` :rtype: :class:`~oci.response.Response` """ - resource_path = "/users/{userId}/mfaTotpDevices" + resource_path = "/users/{userId}/oauth2ClientCredentials" method = "GET" # Don't accept unknown kwargs @@ -5365,13 +5934,12 @@ def list_mfa_totp_devices(self, user_id, **kwargs): "retry_strategy", "page", "limit", - "sort_by", - "sort_order" + "lifecycle_state" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "list_mfa_totp_devices got unknown kwargs: {!r}".format(extra_kwargs)) + "list_o_auth_client_credentials got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "userId": user_id @@ -5383,25 +5951,17 @@ def list_mfa_totp_devices(self, user_id, **kwargs): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) - if 'sort_by' in kwargs: - sort_by_allowed_values = ["TIMECREATED", "NAME"] - if kwargs['sort_by'] not in sort_by_allowed_values: - raise ValueError( - "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) - ) - - if 'sort_order' in kwargs: - sort_order_allowed_values = ["ASC", "DESC"] - if kwargs['sort_order'] not in sort_order_allowed_values: + if 'lifecycle_state' in kwargs: + lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED"] + if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: raise ValueError( - "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) + "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) ) query_params = { "page": kwargs.get("page", missing), "limit": kwargs.get("limit", missing), - "sortBy": kwargs.get("sort_by", missing), - "sortOrder": kwargs.get("sort_order", missing) + "lifecycleState": kwargs.get("lifecycle_state", missing) } query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} @@ -5422,7 +5982,7 @@ def list_mfa_totp_devices(self, user_id, **kwargs): path_params=path_params, query_params=query_params, header_params=header_params, - response_type="list[MfaTotpDeviceSummary]") + response_type="list[OAuth2ClientCredentialSummary]") else: return self.base_client.call_api( resource_path=resource_path, @@ -5430,7 +5990,7 @@ def list_mfa_totp_devices(self, user_id, **kwargs): path_params=path_params, query_params=query_params, header_params=header_params, - response_type="list[MfaTotpDeviceSummary]") + response_type="list[OAuth2ClientCredentialSummary]") def list_policies(self, compartment_id, **kwargs): """ @@ -7514,6 +8074,170 @@ def update_idp_group_mapping(self, identity_provider_id, mapping_id, update_idp_ body=update_idp_group_mapping_details, response_type="IdpGroupMapping") + def update_network_source(self, network_source_id, update_network_source_details, **kwargs): + """ + UpdateNetworkSource + Updates the specified network source. + + + :param str network_source_id: (required) + The OCID of the network source. + + :param UpdateNetworkSourceDetails update_network_source_details: (required) + Request object for updating a network source. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + parameter to the value of the etag from a previous GET or POST response for that resource. The resource + will be updated or deleted only if the etag you provide matches the resource's current etag value. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity.models.NetworkSources` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/networkSources/{networkSourceId}" + method = "PUT" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "if_match" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "update_network_source got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "networkSourceId": network_source_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=update_network_source_details, + response_type="NetworkSources") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=update_network_source_details, + response_type="NetworkSources") + + def update_o_auth_client_credential(self, user_id, oauth2_client_credential_id, update_o_auth2_client_credential_details, **kwargs): + """ + Updates Oauth token for the user + Updates Oauth token for the user + + + :param str user_id: (required) + The OCID of the user. + + :param str oauth2_client_credential_id: (required) + The ID of the Oauth credential. + + :param UpdateOAuth2ClientCredentialDetails update_o_auth2_client_credential_details: (required) + Request object containing the information required to generate an Oauth token. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + parameter to the value of the etag from a previous GET or POST response for that resource. The resource + will be updated or deleted only if the etag you provide matches the resource's current etag value. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity.models.OAuth2ClientCredential` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/users/{userId}/oauth2ClientCredentials/{oauth2ClientCredentialId}" + method = "PUT" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "if_match" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "update_o_auth_client_credential got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "userId": user_id, + "oauth2ClientCredentialId": oauth2_client_credential_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=update_o_auth2_client_credential_details, + response_type="OAuth2ClientCredential") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=update_o_auth2_client_credential_details, + response_type="OAuth2ClientCredential") + def update_policy(self, policy_id, update_policy_details, **kwargs): """ UpdatePolicy diff --git a/src/oci/identity/models/__init__.py b/src/oci/identity/models/__init__.py index d173a1f970..9d76886bb9 100644 --- a/src/oci/identity/models/__init__.py +++ b/src/oci/identity/models/__init__.py @@ -19,6 +19,8 @@ from .create_group_details import CreateGroupDetails from .create_identity_provider_details import CreateIdentityProviderDetails from .create_idp_group_mapping_details import CreateIdpGroupMappingDetails +from .create_network_source_details import CreateNetworkSourceDetails +from .create_o_auth2_client_credential_details import CreateOAuth2ClientCredentialDetails from .create_policy_details import CreatePolicyDetails from .create_region_subscription_details import CreateRegionSubscriptionDetails from .create_saml2_identity_provider_details import CreateSaml2IdentityProviderDetails @@ -34,6 +36,7 @@ from .dynamic_group import DynamicGroup from .enum_tag_definition_validator import EnumTagDefinitionValidator from .fault_domain import FaultDomain +from .fully_qualified_scope import FullyQualifiedScope from .group import Group from .identity_provider import IdentityProvider from .identity_provider_group_summary import IdentityProviderGroupSummary @@ -42,6 +45,11 @@ from .mfa_totp_device_summary import MfaTotpDeviceSummary from .mfa_totp_token import MfaTotpToken from .move_compartment_details import MoveCompartmentDetails +from .network_sources import NetworkSources +from .network_sources_summary import NetworkSourcesSummary +from .network_sources_virtual_source_list import NetworkSourcesVirtualSourceList +from .o_auth2_client_credential import OAuth2ClientCredential +from .o_auth2_client_credential_summary import OAuth2ClientCredentialSummary from .password_policy import PasswordPolicy from .policy import Policy from .region import Region @@ -72,6 +80,8 @@ from .update_group_details import UpdateGroupDetails from .update_identity_provider_details import UpdateIdentityProviderDetails from .update_idp_group_mapping_details import UpdateIdpGroupMappingDetails +from .update_network_source_details import UpdateNetworkSourceDetails +from .update_o_auth2_client_credential_details import UpdateOAuth2ClientCredentialDetails from .update_policy_details import UpdatePolicyDetails from .update_saml2_identity_provider_details import UpdateSaml2IdentityProviderDetails from .update_smtp_credential_details import UpdateSmtpCredentialDetails @@ -109,6 +119,8 @@ "CreateGroupDetails": CreateGroupDetails, "CreateIdentityProviderDetails": CreateIdentityProviderDetails, "CreateIdpGroupMappingDetails": CreateIdpGroupMappingDetails, + "CreateNetworkSourceDetails": CreateNetworkSourceDetails, + "CreateOAuth2ClientCredentialDetails": CreateOAuth2ClientCredentialDetails, "CreatePolicyDetails": CreatePolicyDetails, "CreateRegionSubscriptionDetails": CreateRegionSubscriptionDetails, "CreateSaml2IdentityProviderDetails": CreateSaml2IdentityProviderDetails, @@ -124,6 +136,7 @@ "DynamicGroup": DynamicGroup, "EnumTagDefinitionValidator": EnumTagDefinitionValidator, "FaultDomain": FaultDomain, + "FullyQualifiedScope": FullyQualifiedScope, "Group": Group, "IdentityProvider": IdentityProvider, "IdentityProviderGroupSummary": IdentityProviderGroupSummary, @@ -132,6 +145,11 @@ "MfaTotpDeviceSummary": MfaTotpDeviceSummary, "MfaTotpToken": MfaTotpToken, "MoveCompartmentDetails": MoveCompartmentDetails, + "NetworkSources": NetworkSources, + "NetworkSourcesSummary": NetworkSourcesSummary, + "NetworkSourcesVirtualSourceList": NetworkSourcesVirtualSourceList, + "OAuth2ClientCredential": OAuth2ClientCredential, + "OAuth2ClientCredentialSummary": OAuth2ClientCredentialSummary, "PasswordPolicy": PasswordPolicy, "Policy": Policy, "Region": Region, @@ -162,6 +180,8 @@ "UpdateGroupDetails": UpdateGroupDetails, "UpdateIdentityProviderDetails": UpdateIdentityProviderDetails, "UpdateIdpGroupMappingDetails": UpdateIdpGroupMappingDetails, + "UpdateNetworkSourceDetails": UpdateNetworkSourceDetails, + "UpdateOAuth2ClientCredentialDetails": UpdateOAuth2ClientCredentialDetails, "UpdatePolicyDetails": UpdatePolicyDetails, "UpdateSaml2IdentityProviderDetails": UpdateSaml2IdentityProviderDetails, "UpdateSmtpCredentialDetails": UpdateSmtpCredentialDetails, diff --git a/src/oci/identity/models/create_network_source_details.py b/src/oci/identity/models/create_network_source_details.py new file mode 100644 index 0000000000..4efbcf5795 --- /dev/null +++ b/src/oci/identity/models/create_network_source_details.py @@ -0,0 +1,306 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class CreateNetworkSourceDetails(object): + """ + Properties for creating a network source object. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CreateNetworkSourceDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param compartment_id: + The value to assign to the compartment_id property of this CreateNetworkSourceDetails. + :type compartment_id: str + + :param name: + The value to assign to the name property of this CreateNetworkSourceDetails. + :type name: str + + :param public_source_list: + The value to assign to the public_source_list property of this CreateNetworkSourceDetails. + :type public_source_list: list[str] + + :param virtual_source_list: + The value to assign to the virtual_source_list property of this CreateNetworkSourceDetails. + :type virtual_source_list: list[NetworkSourcesVirtualSourceList] + + :param services: + The value to assign to the services property of this CreateNetworkSourceDetails. + :type services: list[str] + + :param description: + The value to assign to the description property of this CreateNetworkSourceDetails. + :type description: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this CreateNetworkSourceDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this CreateNetworkSourceDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'compartment_id': 'str', + 'name': 'str', + 'public_source_list': 'list[str]', + 'virtual_source_list': 'list[NetworkSourcesVirtualSourceList]', + 'services': 'list[str]', + 'description': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'compartment_id': 'compartmentId', + 'name': 'name', + 'public_source_list': 'publicSourceList', + 'virtual_source_list': 'virtualSourceList', + 'services': 'services', + 'description': 'description', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._compartment_id = None + self._name = None + self._public_source_list = None + self._virtual_source_list = None + self._services = None + self._description = None + self._freeform_tags = None + self._defined_tags = None + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this CreateNetworkSourceDetails. + The OCID of the tenancy containing the network source object. + + + :return: The compartment_id of this CreateNetworkSourceDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this CreateNetworkSourceDetails. + The OCID of the tenancy containing the network source object. + + + :param compartment_id: The compartment_id of this CreateNetworkSourceDetails. + :type: str + """ + self._compartment_id = compartment_id + + @property + def name(self): + """ + **[Required]** Gets the name of this CreateNetworkSourceDetails. + The name you assign to the network source during creation. The name must be unique across all groups + in the tenancy and cannot be changed. + + + :return: The name of this CreateNetworkSourceDetails. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this CreateNetworkSourceDetails. + The name you assign to the network source during creation. The name must be unique across all groups + in the tenancy and cannot be changed. + + + :param name: The name of this CreateNetworkSourceDetails. + :type: str + """ + self._name = name + + @property + def public_source_list(self): + """ + Gets the public_source_list of this CreateNetworkSourceDetails. + A list of allowed public IPs and CIDR ranges + + + :return: The public_source_list of this CreateNetworkSourceDetails. + :rtype: list[str] + """ + return self._public_source_list + + @public_source_list.setter + def public_source_list(self, public_source_list): + """ + Sets the public_source_list of this CreateNetworkSourceDetails. + A list of allowed public IPs and CIDR ranges + + + :param public_source_list: The public_source_list of this CreateNetworkSourceDetails. + :type: list[str] + """ + self._public_source_list = public_source_list + + @property + def virtual_source_list(self): + """ + Gets the virtual_source_list of this CreateNetworkSourceDetails. + A list of allowed VCN ocid/IP range pairs + + + :return: The virtual_source_list of this CreateNetworkSourceDetails. + :rtype: list[NetworkSourcesVirtualSourceList] + """ + return self._virtual_source_list + + @virtual_source_list.setter + def virtual_source_list(self, virtual_source_list): + """ + Sets the virtual_source_list of this CreateNetworkSourceDetails. + A list of allowed VCN ocid/IP range pairs + + + :param virtual_source_list: The virtual_source_list of this CreateNetworkSourceDetails. + :type: list[NetworkSourcesVirtualSourceList] + """ + self._virtual_source_list = virtual_source_list + + @property + def services(self): + """ + Gets the services of this CreateNetworkSourceDetails. + A list of OCIservices allowed to make on behalf of requests which may have different source ips. + At this time only the values of all or none are supported. + + + :return: The services of this CreateNetworkSourceDetails. + :rtype: list[str] + """ + return self._services + + @services.setter + def services(self, services): + """ + Sets the services of this CreateNetworkSourceDetails. + A list of OCIservices allowed to make on behalf of requests which may have different source ips. + At this time only the values of all or none are supported. + + + :param services: The services of this CreateNetworkSourceDetails. + :type: list[str] + """ + self._services = services + + @property + def description(self): + """ + **[Required]** Gets the description of this CreateNetworkSourceDetails. + The description you assign to the network source during creation. Does not have to be unique, and it's changeable. + + + :return: The description of this CreateNetworkSourceDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this CreateNetworkSourceDetails. + The description you assign to the network source during creation. Does not have to be unique, and it's changeable. + + + :param description: The description of this CreateNetworkSourceDetails. + :type: str + """ + self._description = description + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this CreateNetworkSourceDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + For more information, see `Resource Tags`__. + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this CreateNetworkSourceDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this CreateNetworkSourceDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + For more information, see `Resource Tags`__. + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this CreateNetworkSourceDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this CreateNetworkSourceDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. + For more information, see `Resource Tags`__. + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this CreateNetworkSourceDetails. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this CreateNetworkSourceDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. + For more information, see `Resource Tags`__. + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this CreateNetworkSourceDetails. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/identity/models/create_o_auth2_client_credential_details.py b/src/oci/identity/models/create_o_auth2_client_credential_details.py new file mode 100644 index 0000000000..58a66bc56e --- /dev/null +++ b/src/oci/identity/models/create_o_auth2_client_credential_details.py @@ -0,0 +1,131 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class CreateOAuth2ClientCredentialDetails(object): + """ + CreateOAuth2ClientCredentialDetails model. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CreateOAuth2ClientCredentialDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param name: + The value to assign to the name property of this CreateOAuth2ClientCredentialDetails. + :type name: str + + :param description: + The value to assign to the description property of this CreateOAuth2ClientCredentialDetails. + :type description: str + + :param scopes: + The value to assign to the scopes property of this CreateOAuth2ClientCredentialDetails. + :type scopes: list[FullyQualifiedScope] + + """ + self.swagger_types = { + 'name': 'str', + 'description': 'str', + 'scopes': 'list[FullyQualifiedScope]' + } + + self.attribute_map = { + 'name': 'name', + 'description': 'description', + 'scopes': 'scopes' + } + + self._name = None + self._description = None + self._scopes = None + + @property + def name(self): + """ + **[Required]** Gets the name of this CreateOAuth2ClientCredentialDetails. + Name of the oauth credential to help user differentiate them. + + + :return: The name of this CreateOAuth2ClientCredentialDetails. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this CreateOAuth2ClientCredentialDetails. + Name of the oauth credential to help user differentiate them. + + + :param name: The name of this CreateOAuth2ClientCredentialDetails. + :type: str + """ + self._name = name + + @property + def description(self): + """ + **[Required]** Gets the description of this CreateOAuth2ClientCredentialDetails. + Description of the oauth credential to help user differentiate them. + + + :return: The description of this CreateOAuth2ClientCredentialDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this CreateOAuth2ClientCredentialDetails. + Description of the oauth credential to help user differentiate them. + + + :param description: The description of this CreateOAuth2ClientCredentialDetails. + :type: str + """ + self._description = description + + @property + def scopes(self): + """ + **[Required]** Gets the scopes of this CreateOAuth2ClientCredentialDetails. + Allowed scopes for the given oauth credential. + + + :return: The scopes of this CreateOAuth2ClientCredentialDetails. + :rtype: list[FullyQualifiedScope] + """ + return self._scopes + + @scopes.setter + def scopes(self, scopes): + """ + Sets the scopes of this CreateOAuth2ClientCredentialDetails. + Allowed scopes for the given oauth credential. + + + :param scopes: The scopes of this CreateOAuth2ClientCredentialDetails. + :type: list[FullyQualifiedScope] + """ + self._scopes = scopes + + 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/models/fully_qualified_scope.py b/src/oci/identity/models/fully_qualified_scope.py new file mode 100644 index 0000000000..69f35e94e7 --- /dev/null +++ b/src/oci/identity/models/fully_qualified_scope.py @@ -0,0 +1,100 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class FullyQualifiedScope(object): + """ + FullyQualifiedScope model. + """ + + def __init__(self, **kwargs): + """ + Initializes a new FullyQualifiedScope object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param audience: + The value to assign to the audience property of this FullyQualifiedScope. + :type audience: str + + :param scope: + The value to assign to the scope property of this FullyQualifiedScope. + :type scope: str + + """ + self.swagger_types = { + 'audience': 'str', + 'scope': 'str' + } + + self.attribute_map = { + 'audience': 'audience', + 'scope': 'scope' + } + + self._audience = None + self._scope = None + + @property + def audience(self): + """ + **[Required]** Gets the audience of this FullyQualifiedScope. + Audience for the given scope context. + + + :return: The audience of this FullyQualifiedScope. + :rtype: str + """ + return self._audience + + @audience.setter + def audience(self, audience): + """ + Sets the audience of this FullyQualifiedScope. + Audience for the given scope context. + + + :param audience: The audience of this FullyQualifiedScope. + :type: str + """ + self._audience = audience + + @property + def scope(self): + """ + **[Required]** Gets the scope of this FullyQualifiedScope. + Allowed permission scope for the given context. + + + :return: The scope of this FullyQualifiedScope. + :rtype: str + """ + return self._scope + + @scope.setter + def scope(self, scope): + """ + Sets the scope of this FullyQualifiedScope. + Allowed permission scope for the given context. + + + :param scope: The scope of this FullyQualifiedScope. + :type: str + """ + self._scope = scope + + 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/models/network_sources.py b/src/oci/identity/models/network_sources.py new file mode 100644 index 0000000000..2b533071b4 --- /dev/null +++ b/src/oci/identity/models/network_sources.py @@ -0,0 +1,465 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class NetworkSources(object): + """ + A network source defines a list of source IPs that are allowed to make auth requests + More info needed here + """ + + #: A constant which can be used with the lifecycle_state property of a NetworkSources. + #: This constant has a value of "CREATING" + LIFECYCLE_STATE_CREATING = "CREATING" + + #: A constant which can be used with the lifecycle_state property of a NetworkSources. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a NetworkSources. + #: This constant has a value of "INACTIVE" + LIFECYCLE_STATE_INACTIVE = "INACTIVE" + + #: A constant which can be used with the lifecycle_state property of a NetworkSources. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + #: A constant which can be used with the lifecycle_state property of a NetworkSources. + #: This constant has a value of "DELETED" + LIFECYCLE_STATE_DELETED = "DELETED" + + def __init__(self, **kwargs): + """ + Initializes a new NetworkSources 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 NetworkSources. + :type id: str + + :param compartment_id: + The value to assign to the compartment_id property of this NetworkSources. + :type compartment_id: str + + :param name: + The value to assign to the name property of this NetworkSources. + :type name: str + + :param description: + The value to assign to the description property of this NetworkSources. + :type description: str + + :param public_source_list: + The value to assign to the public_source_list property of this NetworkSources. + :type public_source_list: list[str] + + :param virtual_source_list: + The value to assign to the virtual_source_list property of this NetworkSources. + :type virtual_source_list: list[NetworkSourcesVirtualSourceList] + + :param services: + The value to assign to the services property of this NetworkSources. + :type services: list[str] + + :param time_created: + The value to assign to the time_created property of this NetworkSources. + :type time_created: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this NetworkSources. + Allowed values for this property are: "CREATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param inactive_status: + The value to assign to the inactive_status property of this NetworkSources. + :type inactive_status: int + + :param freeform_tags: + The value to assign to the freeform_tags property of this NetworkSources. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this NetworkSources. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'id': 'str', + 'compartment_id': 'str', + 'name': 'str', + 'description': 'str', + 'public_source_list': 'list[str]', + 'virtual_source_list': 'list[NetworkSourcesVirtualSourceList]', + 'services': 'list[str]', + 'time_created': 'datetime', + 'lifecycle_state': 'str', + 'inactive_status': 'int', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'id': 'id', + 'compartment_id': 'compartmentId', + 'name': 'name', + 'description': 'description', + 'public_source_list': 'publicSourceList', + 'virtual_source_list': 'virtualSourceList', + 'services': 'services', + 'time_created': 'timeCreated', + 'lifecycle_state': 'lifecycleState', + 'inactive_status': 'inactiveStatus', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._id = None + self._compartment_id = None + self._name = None + self._description = None + self._public_source_list = None + self._virtual_source_list = None + self._services = None + self._time_created = None + self._lifecycle_state = None + self._inactive_status = None + self._freeform_tags = None + self._defined_tags = None + + @property + def id(self): + """ + **[Required]** Gets the id of this NetworkSources. + The OCID of the network source. + + + :return: The id of this NetworkSources. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this NetworkSources. + The OCID of the network source. + + + :param id: The id of this NetworkSources. + :type: str + """ + self._id = id + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this NetworkSources. + The OCID of the tenancy containing the network source. + + + :return: The compartment_id of this NetworkSources. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this NetworkSources. + The OCID of the tenancy containing the network source. + + + :param compartment_id: The compartment_id of this NetworkSources. + :type: str + """ + self._compartment_id = compartment_id + + @property + def name(self): + """ + **[Required]** Gets the name of this NetworkSources. + The name you assign to the network source during creation. The name must be unique across + the tenancy and cannot be changed. + + + :return: The name of this NetworkSources. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this NetworkSources. + The name you assign to the network source during creation. The name must be unique across + the tenancy and cannot be changed. + + + :param name: The name of this NetworkSources. + :type: str + """ + self._name = name + + @property + def description(self): + """ + **[Required]** Gets the description of this NetworkSources. + The description you assign to the network source. Does not have to be unique, and it's changeable. + + + :return: The description of this NetworkSources. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this NetworkSources. + The description you assign to the network source. Does not have to be unique, and it's changeable. + + + :param description: The description of this NetworkSources. + :type: str + """ + self._description = description + + @property + def public_source_list(self): + """ + Gets the public_source_list of this NetworkSources. + A list of allowed public IPs and CIDR ranges + + + :return: The public_source_list of this NetworkSources. + :rtype: list[str] + """ + return self._public_source_list + + @public_source_list.setter + def public_source_list(self, public_source_list): + """ + Sets the public_source_list of this NetworkSources. + A list of allowed public IPs and CIDR ranges + + + :param public_source_list: The public_source_list of this NetworkSources. + :type: list[str] + """ + self._public_source_list = public_source_list + + @property + def virtual_source_list(self): + """ + Gets the virtual_source_list of this NetworkSources. + A list of allowed VCN ocid/IP range pairs + + + :return: The virtual_source_list of this NetworkSources. + :rtype: list[NetworkSourcesVirtualSourceList] + """ + return self._virtual_source_list + + @virtual_source_list.setter + def virtual_source_list(self, virtual_source_list): + """ + Sets the virtual_source_list of this NetworkSources. + A list of allowed VCN ocid/IP range pairs + + + :param virtual_source_list: The virtual_source_list of this NetworkSources. + :type: list[NetworkSourcesVirtualSourceList] + """ + self._virtual_source_list = virtual_source_list + + @property + def services(self): + """ + Gets the services of this NetworkSources. + A list of OCIservices allowed to make on behalf of requests which may have different source ips. + At this time only the values of all or none are supported. + + + :return: The services of this NetworkSources. + :rtype: list[str] + """ + return self._services + + @services.setter + def services(self, services): + """ + Sets the services of this NetworkSources. + A list of OCIservices allowed to make on behalf of requests which may have different source ips. + At this time only the values of all or none are supported. + + + :param services: The services of this NetworkSources. + :type: list[str] + """ + self._services = services + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this NetworkSources. + Date and time the group was created, in the format defined by RFC3339. + + Example: `2016-08-25T21:10:29.600Z` + + + :return: The time_created of this NetworkSources. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this NetworkSources. + Date and time the group was created, in the format defined by RFC3339. + + Example: `2016-08-25T21:10:29.600Z` + + + :param time_created: The time_created of this NetworkSources. + :type: datetime + """ + self._time_created = time_created + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this NetworkSources. + The network source object's current state. After creating a network source, make sure its `lifecycleState` changes from CREATING to + ACTIVE before using it. + + Allowed values for this property are: "CREATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this NetworkSources. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this NetworkSources. + The network source object's current state. After creating a network source, make sure its `lifecycleState` changes from CREATING to + ACTIVE before using it. + + + :param lifecycle_state: The lifecycle_state of this NetworkSources. + :type: str + """ + allowed_values = ["CREATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED"] + if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): + lifecycle_state = 'UNKNOWN_ENUM_VALUE' + self._lifecycle_state = lifecycle_state + + @property + def inactive_status(self): + """ + Gets the inactive_status of this NetworkSources. + The detailed status of INACTIVE lifecycleState. + + + :return: The inactive_status of this NetworkSources. + :rtype: int + """ + return self._inactive_status + + @inactive_status.setter + def inactive_status(self, inactive_status): + """ + Sets the inactive_status of this NetworkSources. + The detailed status of INACTIVE lifecycleState. + + + :param inactive_status: The inactive_status of this NetworkSources. + :type: int + """ + self._inactive_status = inactive_status + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this NetworkSources. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + For more information, see `Resource Tags`__. + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this NetworkSources. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this NetworkSources. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + For more information, see `Resource Tags`__. + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this NetworkSources. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this NetworkSources. + Defined tags for this resource. Each key is predefined and scoped to a namespace. + For more information, see `Resource Tags`__. + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this NetworkSources. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this NetworkSources. + Defined tags for this resource. Each key is predefined and scoped to a namespace. + For more information, see `Resource Tags`__. + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this NetworkSources. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/identity/models/network_sources_summary.py b/src/oci/identity/models/network_sources_summary.py new file mode 100644 index 0000000000..9c519b9eee --- /dev/null +++ b/src/oci/identity/models/network_sources_summary.py @@ -0,0 +1,295 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class NetworkSourcesSummary(object): + """ + A network source defines a list of source IPs that are allowed to make auth requests + More info needed here + """ + + def __init__(self, **kwargs): + """ + Initializes a new NetworkSourcesSummary 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 NetworkSourcesSummary. + :type id: str + + :param compartment_id: + The value to assign to the compartment_id property of this NetworkSourcesSummary. + :type compartment_id: str + + :param name: + The value to assign to the name property of this NetworkSourcesSummary. + :type name: str + + :param description: + The value to assign to the description property of this NetworkSourcesSummary. + :type description: str + + :param public_source_list: + The value to assign to the public_source_list property of this NetworkSourcesSummary. + :type public_source_list: list[str] + + :param virtual_source_list: + The value to assign to the virtual_source_list property of this NetworkSourcesSummary. + :type virtual_source_list: list[NetworkSourcesVirtualSourceList] + + :param services: + The value to assign to the services property of this NetworkSourcesSummary. + :type services: list[str] + + :param time_created: + The value to assign to the time_created property of this NetworkSourcesSummary. + :type time_created: datetime + + """ + self.swagger_types = { + 'id': 'str', + 'compartment_id': 'str', + 'name': 'str', + 'description': 'str', + 'public_source_list': 'list[str]', + 'virtual_source_list': 'list[NetworkSourcesVirtualSourceList]', + 'services': 'list[str]', + 'time_created': 'datetime' + } + + self.attribute_map = { + 'id': 'id', + 'compartment_id': 'compartmentId', + 'name': 'name', + 'description': 'description', + 'public_source_list': 'publicSourceList', + 'virtual_source_list': 'virtualSourceList', + 'services': 'services', + 'time_created': 'timeCreated' + } + + self._id = None + self._compartment_id = None + self._name = None + self._description = None + self._public_source_list = None + self._virtual_source_list = None + self._services = None + self._time_created = None + + @property + def id(self): + """ + Gets the id of this NetworkSourcesSummary. + The OCID of the network source. + + + :return: The id of this NetworkSourcesSummary. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this NetworkSourcesSummary. + The OCID of the network source. + + + :param id: The id of this NetworkSourcesSummary. + :type: str + """ + self._id = id + + @property + def compartment_id(self): + """ + Gets the compartment_id of this NetworkSourcesSummary. + The OCID of the tenancy containing the network source. + + + :return: The compartment_id of this NetworkSourcesSummary. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this NetworkSourcesSummary. + The OCID of the tenancy containing the network source. + + + :param compartment_id: The compartment_id of this NetworkSourcesSummary. + :type: str + """ + self._compartment_id = compartment_id + + @property + def name(self): + """ + Gets the name of this NetworkSourcesSummary. + The name you assign to the network source during creation. The name must be unique across + the tenancy and cannot be changed. + + + :return: The name of this NetworkSourcesSummary. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this NetworkSourcesSummary. + The name you assign to the network source during creation. The name must be unique across + the tenancy and cannot be changed. + + + :param name: The name of this NetworkSourcesSummary. + :type: str + """ + self._name = name + + @property + def description(self): + """ + Gets the description of this NetworkSourcesSummary. + The description you assign to the network source. Does not have to be unique, and it's changeable. + + + :return: The description of this NetworkSourcesSummary. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this NetworkSourcesSummary. + The description you assign to the network source. Does not have to be unique, and it's changeable. + + + :param description: The description of this NetworkSourcesSummary. + :type: str + """ + self._description = description + + @property + def public_source_list(self): + """ + Gets the public_source_list of this NetworkSourcesSummary. + A list of allowed public IPs and CIDR ranges + + + :return: The public_source_list of this NetworkSourcesSummary. + :rtype: list[str] + """ + return self._public_source_list + + @public_source_list.setter + def public_source_list(self, public_source_list): + """ + Sets the public_source_list of this NetworkSourcesSummary. + A list of allowed public IPs and CIDR ranges + + + :param public_source_list: The public_source_list of this NetworkSourcesSummary. + :type: list[str] + """ + self._public_source_list = public_source_list + + @property + def virtual_source_list(self): + """ + Gets the virtual_source_list of this NetworkSourcesSummary. + A list of allowed VCN ocid/IP range pairs + + + :return: The virtual_source_list of this NetworkSourcesSummary. + :rtype: list[NetworkSourcesVirtualSourceList] + """ + return self._virtual_source_list + + @virtual_source_list.setter + def virtual_source_list(self, virtual_source_list): + """ + Sets the virtual_source_list of this NetworkSourcesSummary. + A list of allowed VCN ocid/IP range pairs + + + :param virtual_source_list: The virtual_source_list of this NetworkSourcesSummary. + :type: list[NetworkSourcesVirtualSourceList] + """ + self._virtual_source_list = virtual_source_list + + @property + def services(self): + """ + Gets the services of this NetworkSourcesSummary. + A list of OCIservices allowed to make on behalf of requests which may have different source ips. + At this time only the values of all or none are supported. + + + :return: The services of this NetworkSourcesSummary. + :rtype: list[str] + """ + return self._services + + @services.setter + def services(self, services): + """ + Sets the services of this NetworkSourcesSummary. + A list of OCIservices allowed to make on behalf of requests which may have different source ips. + At this time only the values of all or none are supported. + + + :param services: The services of this NetworkSourcesSummary. + :type: list[str] + """ + self._services = services + + @property + def time_created(self): + """ + Gets the time_created of this NetworkSourcesSummary. + Date and time the group was created, in the format defined by RFC3339. + + Example: `2016-08-25T21:10:29.600Z` + + + :return: The time_created of this NetworkSourcesSummary. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this NetworkSourcesSummary. + Date and time the group was created, in the format defined by RFC3339. + + Example: `2016-08-25T21:10:29.600Z` + + + :param time_created: The time_created of this NetworkSourcesSummary. + :type: datetime + """ + self._time_created = time_created + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/identity/models/network_sources_virtual_source_list.py b/src/oci/identity/models/network_sources_virtual_source_list.py new file mode 100644 index 0000000000..a694517364 --- /dev/null +++ b/src/oci/identity/models/network_sources_virtual_source_list.py @@ -0,0 +1,92 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class NetworkSourcesVirtualSourceList(object): + """ + NetworkSourcesVirtualSourceList model. + """ + + def __init__(self, **kwargs): + """ + Initializes a new NetworkSourcesVirtualSourceList object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param vcn_id: + The value to assign to the vcn_id property of this NetworkSourcesVirtualSourceList. + :type vcn_id: str + + :param ip_ranges: + The value to assign to the ip_ranges property of this NetworkSourcesVirtualSourceList. + :type ip_ranges: list[str] + + """ + self.swagger_types = { + 'vcn_id': 'str', + 'ip_ranges': 'list[str]' + } + + self.attribute_map = { + 'vcn_id': 'vcnId', + 'ip_ranges': 'ipRanges' + } + + self._vcn_id = None + self._ip_ranges = None + + @property + def vcn_id(self): + """ + Gets the vcn_id of this NetworkSourcesVirtualSourceList. + + :return: The vcn_id of this NetworkSourcesVirtualSourceList. + :rtype: str + """ + return self._vcn_id + + @vcn_id.setter + def vcn_id(self, vcn_id): + """ + Sets the vcn_id of this NetworkSourcesVirtualSourceList. + + :param vcn_id: The vcn_id of this NetworkSourcesVirtualSourceList. + :type: str + """ + self._vcn_id = vcn_id + + @property + def ip_ranges(self): + """ + Gets the ip_ranges of this NetworkSourcesVirtualSourceList. + + :return: The ip_ranges of this NetworkSourcesVirtualSourceList. + :rtype: list[str] + """ + return self._ip_ranges + + @ip_ranges.setter + def ip_ranges(self, ip_ranges): + """ + Sets the ip_ranges of this NetworkSourcesVirtualSourceList. + + :param ip_ranges: The ip_ranges of this NetworkSourcesVirtualSourceList. + :type: list[str] + """ + self._ip_ranges = ip_ranges + + 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/models/o_auth2_client_credential.py b/src/oci/identity/models/o_auth2_client_credential.py new file mode 100644 index 0000000000..ad32a30178 --- /dev/null +++ b/src/oci/identity/models/o_auth2_client_credential.py @@ -0,0 +1,388 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class OAuth2ClientCredential(object): + """ + User can define Oauth clients in IAM, then use it to generate a token to grant access to app resources. + """ + + #: A constant which can be used with the lifecycle_state property of a OAuth2ClientCredential. + #: This constant has a value of "CREATING" + LIFECYCLE_STATE_CREATING = "CREATING" + + #: A constant which can be used with the lifecycle_state property of a OAuth2ClientCredential. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a OAuth2ClientCredential. + #: This constant has a value of "INACTIVE" + LIFECYCLE_STATE_INACTIVE = "INACTIVE" + + #: A constant which can be used with the lifecycle_state property of a OAuth2ClientCredential. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + #: A constant which can be used with the lifecycle_state property of a OAuth2ClientCredential. + #: This constant has a value of "DELETED" + LIFECYCLE_STATE_DELETED = "DELETED" + + def __init__(self, **kwargs): + """ + Initializes a new OAuth2ClientCredential object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param scopes: + The value to assign to the scopes property of this OAuth2ClientCredential. + :type scopes: list[FullyQualifiedScope] + + :param password: + The value to assign to the password property of this OAuth2ClientCredential. + :type password: str + + :param user_id: + The value to assign to the user_id property of this OAuth2ClientCredential. + :type user_id: str + + :param expires_on: + The value to assign to the expires_on property of this OAuth2ClientCredential. + :type expires_on: datetime + + :param id: + The value to assign to the id property of this OAuth2ClientCredential. + :type id: str + + :param compartment_id: + The value to assign to the compartment_id property of this OAuth2ClientCredential. + :type compartment_id: str + + :param name: + The value to assign to the name property of this OAuth2ClientCredential. + :type name: str + + :param description: + The value to assign to the description property of this OAuth2ClientCredential. + :type description: str + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this OAuth2ClientCredential. + Allowed values for this property are: "CREATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param time_created: + The value to assign to the time_created property of this OAuth2ClientCredential. + :type time_created: datetime + + """ + self.swagger_types = { + 'scopes': 'list[FullyQualifiedScope]', + 'password': 'str', + 'user_id': 'str', + 'expires_on': 'datetime', + 'id': 'str', + 'compartment_id': 'str', + 'name': 'str', + 'description': 'str', + 'lifecycle_state': 'str', + 'time_created': 'datetime' + } + + self.attribute_map = { + 'scopes': 'scopes', + 'password': 'password', + 'user_id': 'userId', + 'expires_on': 'expiresOn', + 'id': 'id', + 'compartment_id': 'compartmentId', + 'name': 'name', + 'description': 'description', + 'lifecycle_state': 'lifecycleState', + 'time_created': 'timeCreated' + } + + self._scopes = None + self._password = None + self._user_id = None + self._expires_on = None + self._id = None + self._compartment_id = None + self._name = None + self._description = None + self._lifecycle_state = None + self._time_created = None + + @property + def scopes(self): + """ + Gets the scopes of this OAuth2ClientCredential. + Allowed scopes for the given oauth credential. + + + :return: The scopes of this OAuth2ClientCredential. + :rtype: list[FullyQualifiedScope] + """ + return self._scopes + + @scopes.setter + def scopes(self, scopes): + """ + Sets the scopes of this OAuth2ClientCredential. + Allowed scopes for the given oauth credential. + + + :param scopes: The scopes of this OAuth2ClientCredential. + :type: list[FullyQualifiedScope] + """ + self._scopes = scopes + + @property + def password(self): + """ + Gets the password of this OAuth2ClientCredential. + Returned during create and update with password reset requests. + + + :return: The password of this OAuth2ClientCredential. + :rtype: str + """ + return self._password + + @password.setter + def password(self, password): + """ + Sets the password of this OAuth2ClientCredential. + Returned during create and update with password reset requests. + + + :param password: The password of this OAuth2ClientCredential. + :type: str + """ + self._password = password + + @property + def user_id(self): + """ + Gets the user_id of this OAuth2ClientCredential. + The OCID of the user the Oauth credential belongs to. + + + :return: The user_id of this OAuth2ClientCredential. + :rtype: str + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """ + Sets the user_id of this OAuth2ClientCredential. + The OCID of the user the Oauth credential belongs to. + + + :param user_id: The user_id of this OAuth2ClientCredential. + :type: str + """ + self._user_id = user_id + + @property + def expires_on(self): + """ + Gets the expires_on of this OAuth2ClientCredential. + Date and time when this credential will expire, in the format defined by RFC3339. + Null if it never expires. + + Example: `2016-08-25T21:10:29.600Z` + + + :return: The expires_on of this OAuth2ClientCredential. + :rtype: datetime + """ + return self._expires_on + + @expires_on.setter + def expires_on(self, expires_on): + """ + Sets the expires_on of this OAuth2ClientCredential. + Date and time when this credential will expire, in the format defined by RFC3339. + Null if it never expires. + + Example: `2016-08-25T21:10:29.600Z` + + + :param expires_on: The expires_on of this OAuth2ClientCredential. + :type: datetime + """ + self._expires_on = expires_on + + @property + def id(self): + """ + Gets the id of this OAuth2ClientCredential. + The OCID of the Oauth credential. + + + :return: The id of this OAuth2ClientCredential. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this OAuth2ClientCredential. + The OCID of the Oauth credential. + + + :param id: The id of this OAuth2ClientCredential. + :type: str + """ + self._id = id + + @property + def compartment_id(self): + """ + Gets the compartment_id of this OAuth2ClientCredential. + The OCID of the compartment containing the Oauth credential. + + + :return: The compartment_id of this OAuth2ClientCredential. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this OAuth2ClientCredential. + The OCID of the compartment containing the Oauth credential. + + + :param compartment_id: The compartment_id of this OAuth2ClientCredential. + :type: str + """ + self._compartment_id = compartment_id + + @property + def name(self): + """ + Gets the name of this OAuth2ClientCredential. + The name of the Oauth credential. + + + :return: The name of this OAuth2ClientCredential. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this OAuth2ClientCredential. + The name of the Oauth credential. + + + :param name: The name of this OAuth2ClientCredential. + :type: str + """ + self._name = name + + @property + def description(self): + """ + Gets the description of this OAuth2ClientCredential. + The description of the Oauth credential. + + + :return: The description of this OAuth2ClientCredential. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this OAuth2ClientCredential. + The description of the Oauth credential. + + + :param description: The description of this OAuth2ClientCredential. + :type: str + """ + self._description = description + + @property + def lifecycle_state(self): + """ + Gets the lifecycle_state of this OAuth2ClientCredential. + The credential's current state. After creating a Oauth credential, make sure its `lifecycleState` changes from + CREATING to ACTIVE before using it. + + Allowed values for this property are: "CREATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this OAuth2ClientCredential. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this OAuth2ClientCredential. + The credential's current state. After creating a Oauth credential, make sure its `lifecycleState` changes from + CREATING to ACTIVE before using it. + + + :param lifecycle_state: The lifecycle_state of this OAuth2ClientCredential. + :type: str + """ + allowed_values = ["CREATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED"] + if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): + lifecycle_state = 'UNKNOWN_ENUM_VALUE' + self._lifecycle_state = lifecycle_state + + @property + def time_created(self): + """ + Gets the time_created of this OAuth2ClientCredential. + Date and time the `OAuth2ClientCredential` object was created, in the format defined by RFC3339. + + Example: `2016-08-25T21:10:29.600Z` + + + :return: The time_created of this OAuth2ClientCredential. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this OAuth2ClientCredential. + Date and time the `OAuth2ClientCredential` object was created, in the format defined by RFC3339. + + Example: `2016-08-25T21:10:29.600Z` + + + :param time_created: The time_created of this OAuth2ClientCredential. + :type: datetime + """ + self._time_created = time_created + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/identity/models/o_auth2_client_credential_summary.py b/src/oci/identity/models/o_auth2_client_credential_summary.py new file mode 100644 index 0000000000..5ce2ed391d --- /dev/null +++ b/src/oci/identity/models/o_auth2_client_credential_summary.py @@ -0,0 +1,357 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class OAuth2ClientCredentialSummary(object): + """ + User can define Oauth clients in IAM, then use it to generate a token to grant access to app resources. + """ + + #: A constant which can be used with the lifecycle_state property of a OAuth2ClientCredentialSummary. + #: This constant has a value of "CREATING" + LIFECYCLE_STATE_CREATING = "CREATING" + + #: A constant which can be used with the lifecycle_state property of a OAuth2ClientCredentialSummary. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a OAuth2ClientCredentialSummary. + #: This constant has a value of "INACTIVE" + LIFECYCLE_STATE_INACTIVE = "INACTIVE" + + #: A constant which can be used with the lifecycle_state property of a OAuth2ClientCredentialSummary. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + #: A constant which can be used with the lifecycle_state property of a OAuth2ClientCredentialSummary. + #: This constant has a value of "DELETED" + LIFECYCLE_STATE_DELETED = "DELETED" + + def __init__(self, **kwargs): + """ + Initializes a new OAuth2ClientCredentialSummary object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param scopes: + The value to assign to the scopes property of this OAuth2ClientCredentialSummary. + :type scopes: list[FullyQualifiedScope] + + :param user_id: + The value to assign to the user_id property of this OAuth2ClientCredentialSummary. + :type user_id: str + + :param expires_on: + The value to assign to the expires_on property of this OAuth2ClientCredentialSummary. + :type expires_on: datetime + + :param id: + The value to assign to the id property of this OAuth2ClientCredentialSummary. + :type id: str + + :param compartment_id: + The value to assign to the compartment_id property of this OAuth2ClientCredentialSummary. + :type compartment_id: str + + :param name: + The value to assign to the name property of this OAuth2ClientCredentialSummary. + :type name: str + + :param description: + The value to assign to the description property of this OAuth2ClientCredentialSummary. + :type description: str + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this OAuth2ClientCredentialSummary. + Allowed values for this property are: "CREATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param time_created: + The value to assign to the time_created property of this OAuth2ClientCredentialSummary. + :type time_created: datetime + + """ + self.swagger_types = { + 'scopes': 'list[FullyQualifiedScope]', + 'user_id': 'str', + 'expires_on': 'datetime', + 'id': 'str', + 'compartment_id': 'str', + 'name': 'str', + 'description': 'str', + 'lifecycle_state': 'str', + 'time_created': 'datetime' + } + + self.attribute_map = { + 'scopes': 'scopes', + 'user_id': 'userId', + 'expires_on': 'expiresOn', + 'id': 'id', + 'compartment_id': 'compartmentId', + 'name': 'name', + 'description': 'description', + 'lifecycle_state': 'lifecycleState', + 'time_created': 'timeCreated' + } + + self._scopes = None + self._user_id = None + self._expires_on = None + self._id = None + self._compartment_id = None + self._name = None + self._description = None + self._lifecycle_state = None + self._time_created = None + + @property + def scopes(self): + """ + Gets the scopes of this OAuth2ClientCredentialSummary. + Allowed scopes for the given oauth credential. + + + :return: The scopes of this OAuth2ClientCredentialSummary. + :rtype: list[FullyQualifiedScope] + """ + return self._scopes + + @scopes.setter + def scopes(self, scopes): + """ + Sets the scopes of this OAuth2ClientCredentialSummary. + Allowed scopes for the given oauth credential. + + + :param scopes: The scopes of this OAuth2ClientCredentialSummary. + :type: list[FullyQualifiedScope] + """ + self._scopes = scopes + + @property + def user_id(self): + """ + Gets the user_id of this OAuth2ClientCredentialSummary. + The OCID of the user the Oauth credential belongs to. + + + :return: The user_id of this OAuth2ClientCredentialSummary. + :rtype: str + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """ + Sets the user_id of this OAuth2ClientCredentialSummary. + The OCID of the user the Oauth credential belongs to. + + + :param user_id: The user_id of this OAuth2ClientCredentialSummary. + :type: str + """ + self._user_id = user_id + + @property + def expires_on(self): + """ + Gets the expires_on of this OAuth2ClientCredentialSummary. + Date and time when this credential will expire, in the format defined by RFC3339. + Null if it never expires. + + Example: `2016-08-25T21:10:29.600Z` + + + :return: The expires_on of this OAuth2ClientCredentialSummary. + :rtype: datetime + """ + return self._expires_on + + @expires_on.setter + def expires_on(self, expires_on): + """ + Sets the expires_on of this OAuth2ClientCredentialSummary. + Date and time when this credential will expire, in the format defined by RFC3339. + Null if it never expires. + + Example: `2016-08-25T21:10:29.600Z` + + + :param expires_on: The expires_on of this OAuth2ClientCredentialSummary. + :type: datetime + """ + self._expires_on = expires_on + + @property + def id(self): + """ + Gets the id of this OAuth2ClientCredentialSummary. + The OCID of the Oauth credential. + + + :return: The id of this OAuth2ClientCredentialSummary. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this OAuth2ClientCredentialSummary. + The OCID of the Oauth credential. + + + :param id: The id of this OAuth2ClientCredentialSummary. + :type: str + """ + self._id = id + + @property + def compartment_id(self): + """ + Gets the compartment_id of this OAuth2ClientCredentialSummary. + The OCID of the compartment containing the Oauth credential. + + + :return: The compartment_id of this OAuth2ClientCredentialSummary. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this OAuth2ClientCredentialSummary. + The OCID of the compartment containing the Oauth credential. + + + :param compartment_id: The compartment_id of this OAuth2ClientCredentialSummary. + :type: str + """ + self._compartment_id = compartment_id + + @property + def name(self): + """ + Gets the name of this OAuth2ClientCredentialSummary. + The name of the Oauth credential. + + + :return: The name of this OAuth2ClientCredentialSummary. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this OAuth2ClientCredentialSummary. + The name of the Oauth credential. + + + :param name: The name of this OAuth2ClientCredentialSummary. + :type: str + """ + self._name = name + + @property + def description(self): + """ + Gets the description of this OAuth2ClientCredentialSummary. + The description of the Oauth credential. + + + :return: The description of this OAuth2ClientCredentialSummary. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this OAuth2ClientCredentialSummary. + The description of the Oauth credential. + + + :param description: The description of this OAuth2ClientCredentialSummary. + :type: str + """ + self._description = description + + @property + def lifecycle_state(self): + """ + Gets the lifecycle_state of this OAuth2ClientCredentialSummary. + The credential's current state. After creating a Oauth credential, make sure its `lifecycleState` changes from + CREATING to ACTIVE before using it. + + Allowed values for this property are: "CREATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this OAuth2ClientCredentialSummary. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this OAuth2ClientCredentialSummary. + The credential's current state. After creating a Oauth credential, make sure its `lifecycleState` changes from + CREATING to ACTIVE before using it. + + + :param lifecycle_state: The lifecycle_state of this OAuth2ClientCredentialSummary. + :type: str + """ + allowed_values = ["CREATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED"] + if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): + lifecycle_state = 'UNKNOWN_ENUM_VALUE' + self._lifecycle_state = lifecycle_state + + @property + def time_created(self): + """ + Gets the time_created of this OAuth2ClientCredentialSummary. + Date and time the `OAuth2ClientCredential` object was created, in the format defined by RFC3339. + + Example: `2016-08-25T21:10:29.600Z` + + + :return: The time_created of this OAuth2ClientCredentialSummary. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this OAuth2ClientCredentialSummary. + Date and time the `OAuth2ClientCredential` object was created, in the format defined by RFC3339. + + Example: `2016-08-25T21:10:29.600Z` + + + :param time_created: The time_created of this OAuth2ClientCredentialSummary. + :type: datetime + """ + self._time_created = time_created + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/identity/models/tenancy.py b/src/oci/identity/models/tenancy.py index 2d5de569cc..ef006bf208 100644 --- a/src/oci/identity/models/tenancy.py +++ b/src/oci/identity/models/tenancy.py @@ -42,6 +42,10 @@ def __init__(self, **kwargs): The value to assign to the home_region_key property of this Tenancy. :type home_region_key: str + :param upi_idcs_compatibility_layer_endpoint: + The value to assign to the upi_idcs_compatibility_layer_endpoint property of this Tenancy. + :type upi_idcs_compatibility_layer_endpoint: str + :param freeform_tags: The value to assign to the freeform_tags property of this Tenancy. :type freeform_tags: dict(str, str) @@ -56,6 +60,7 @@ def __init__(self, **kwargs): 'name': 'str', 'description': 'str', 'home_region_key': 'str', + 'upi_idcs_compatibility_layer_endpoint': 'str', 'freeform_tags': 'dict(str, str)', 'defined_tags': 'dict(str, dict(str, object))' } @@ -65,6 +70,7 @@ def __init__(self, **kwargs): 'name': 'name', 'description': 'description', 'home_region_key': 'homeRegionKey', + 'upi_idcs_compatibility_layer_endpoint': 'upiIdcsCompatibilityLayerEndpoint', 'freeform_tags': 'freeformTags', 'defined_tags': 'definedTags' } @@ -73,6 +79,7 @@ def __init__(self, **kwargs): self._name = None self._description = None self._home_region_key = None + self._upi_idcs_compatibility_layer_endpoint = None self._freeform_tags = None self._defined_tags = None @@ -196,6 +203,30 @@ def home_region_key(self, home_region_key): """ self._home_region_key = home_region_key + @property + def upi_idcs_compatibility_layer_endpoint(self): + """ + Gets the upi_idcs_compatibility_layer_endpoint of this Tenancy. + Url which refers to the UPI IDCS compatibility layer endpoint configured for this Tenant's home region. + + + :return: The upi_idcs_compatibility_layer_endpoint of this Tenancy. + :rtype: str + """ + return self._upi_idcs_compatibility_layer_endpoint + + @upi_idcs_compatibility_layer_endpoint.setter + def upi_idcs_compatibility_layer_endpoint(self, upi_idcs_compatibility_layer_endpoint): + """ + Sets the upi_idcs_compatibility_layer_endpoint of this Tenancy. + Url which refers to the UPI IDCS compatibility layer endpoint configured for this Tenant's home region. + + + :param upi_idcs_compatibility_layer_endpoint: The upi_idcs_compatibility_layer_endpoint of this Tenancy. + :type: str + """ + self._upi_idcs_compatibility_layer_endpoint = upi_idcs_compatibility_layer_endpoint + @property def freeform_tags(self): """ diff --git a/src/oci/identity/models/update_network_source_details.py b/src/oci/identity/models/update_network_source_details.py new file mode 100644 index 0000000000..d95ebc40d6 --- /dev/null +++ b/src/oci/identity/models/update_network_source_details.py @@ -0,0 +1,242 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class UpdateNetworkSourceDetails(object): + """ + UpdateNetworkSourceDetails model. + """ + + def __init__(self, **kwargs): + """ + Initializes a new UpdateNetworkSourceDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param description: + The value to assign to the description property of this UpdateNetworkSourceDetails. + :type description: str + + :param public_source_list: + The value to assign to the public_source_list property of this UpdateNetworkSourceDetails. + :type public_source_list: list[str] + + :param virtual_source_list: + The value to assign to the virtual_source_list property of this UpdateNetworkSourceDetails. + :type virtual_source_list: list[NetworkSourcesVirtualSourceList] + + :param services: + The value to assign to the services property of this UpdateNetworkSourceDetails. + :type services: list[str] + + :param freeform_tags: + The value to assign to the freeform_tags property of this UpdateNetworkSourceDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this UpdateNetworkSourceDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'description': 'str', + 'public_source_list': 'list[str]', + 'virtual_source_list': 'list[NetworkSourcesVirtualSourceList]', + 'services': 'list[str]', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'description': 'description', + 'public_source_list': 'publicSourceList', + 'virtual_source_list': 'virtualSourceList', + 'services': 'services', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._description = None + self._public_source_list = None + self._virtual_source_list = None + self._services = None + self._freeform_tags = None + self._defined_tags = None + + @property + def description(self): + """ + Gets the description of this UpdateNetworkSourceDetails. + The description you assign to the network source. Does not have to be unique, and it's changeable. + + + :return: The description of this UpdateNetworkSourceDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this UpdateNetworkSourceDetails. + The description you assign to the network source. Does not have to be unique, and it's changeable. + + + :param description: The description of this UpdateNetworkSourceDetails. + :type: str + """ + self._description = description + + @property + def public_source_list(self): + """ + Gets the public_source_list of this UpdateNetworkSourceDetails. + A list of allowed public IPs and CIDR ranges + + + :return: The public_source_list of this UpdateNetworkSourceDetails. + :rtype: list[str] + """ + return self._public_source_list + + @public_source_list.setter + def public_source_list(self, public_source_list): + """ + Sets the public_source_list of this UpdateNetworkSourceDetails. + A list of allowed public IPs and CIDR ranges + + + :param public_source_list: The public_source_list of this UpdateNetworkSourceDetails. + :type: list[str] + """ + self._public_source_list = public_source_list + + @property + def virtual_source_list(self): + """ + Gets the virtual_source_list of this UpdateNetworkSourceDetails. + A list of allowed VCN ocid/IP range pairs + + + :return: The virtual_source_list of this UpdateNetworkSourceDetails. + :rtype: list[NetworkSourcesVirtualSourceList] + """ + return self._virtual_source_list + + @virtual_source_list.setter + def virtual_source_list(self, virtual_source_list): + """ + Sets the virtual_source_list of this UpdateNetworkSourceDetails. + A list of allowed VCN ocid/IP range pairs + + + :param virtual_source_list: The virtual_source_list of this UpdateNetworkSourceDetails. + :type: list[NetworkSourcesVirtualSourceList] + """ + self._virtual_source_list = virtual_source_list + + @property + def services(self): + """ + Gets the services of this UpdateNetworkSourceDetails. + A list of OCIservices allowed to make on behalf of requests which may have different source ips. + At this time only the values of all or none are supported. + + + :return: The services of this UpdateNetworkSourceDetails. + :rtype: list[str] + """ + return self._services + + @services.setter + def services(self, services): + """ + Sets the services of this UpdateNetworkSourceDetails. + A list of OCIservices allowed to make on behalf of requests which may have different source ips. + At this time only the values of all or none are supported. + + + :param services: The services of this UpdateNetworkSourceDetails. + :type: list[str] + """ + self._services = services + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this UpdateNetworkSourceDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + For more information, see `Resource Tags`__. + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this UpdateNetworkSourceDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this UpdateNetworkSourceDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + For more information, see `Resource Tags`__. + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this UpdateNetworkSourceDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this UpdateNetworkSourceDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. + For more information, see `Resource Tags`__. + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this UpdateNetworkSourceDetails. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this UpdateNetworkSourceDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. + For more information, see `Resource Tags`__. + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this UpdateNetworkSourceDetails. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/identity/models/update_o_auth2_client_credential_details.py b/src/oci/identity/models/update_o_auth2_client_credential_details.py new file mode 100644 index 0000000000..945d2c44c0 --- /dev/null +++ b/src/oci/identity/models/update_o_auth2_client_credential_details.py @@ -0,0 +1,131 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class UpdateOAuth2ClientCredentialDetails(object): + """ + UpdateOAuth2ClientCredentialDetails model. + """ + + def __init__(self, **kwargs): + """ + Initializes a new UpdateOAuth2ClientCredentialDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param description: + The value to assign to the description property of this UpdateOAuth2ClientCredentialDetails. + :type description: str + + :param scopes: + The value to assign to the scopes property of this UpdateOAuth2ClientCredentialDetails. + :type scopes: list[FullyQualifiedScope] + + :param is_reset_password: + The value to assign to the is_reset_password property of this UpdateOAuth2ClientCredentialDetails. + :type is_reset_password: bool + + """ + self.swagger_types = { + 'description': 'str', + 'scopes': 'list[FullyQualifiedScope]', + 'is_reset_password': 'bool' + } + + self.attribute_map = { + 'description': 'description', + 'scopes': 'scopes', + 'is_reset_password': 'isResetPassword' + } + + self._description = None + self._scopes = None + self._is_reset_password = None + + @property + def description(self): + """ + **[Required]** Gets the description of this UpdateOAuth2ClientCredentialDetails. + Description of the oauth credential to help user differentiate them. + + + :return: The description of this UpdateOAuth2ClientCredentialDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this UpdateOAuth2ClientCredentialDetails. + Description of the oauth credential to help user differentiate them. + + + :param description: The description of this UpdateOAuth2ClientCredentialDetails. + :type: str + """ + self._description = description + + @property + def scopes(self): + """ + **[Required]** Gets the scopes of this UpdateOAuth2ClientCredentialDetails. + Allowed scopes for the given oauth credential. + + + :return: The scopes of this UpdateOAuth2ClientCredentialDetails. + :rtype: list[FullyQualifiedScope] + """ + return self._scopes + + @scopes.setter + def scopes(self, scopes): + """ + Sets the scopes of this UpdateOAuth2ClientCredentialDetails. + Allowed scopes for the given oauth credential. + + + :param scopes: The scopes of this UpdateOAuth2ClientCredentialDetails. + :type: list[FullyQualifiedScope] + """ + self._scopes = scopes + + @property + def is_reset_password(self): + """ + Gets the is_reset_password of this UpdateOAuth2ClientCredentialDetails. + Indicate if the password to be reset or not in the update. + + + :return: The is_reset_password of this UpdateOAuth2ClientCredentialDetails. + :rtype: bool + """ + return self._is_reset_password + + @is_reset_password.setter + def is_reset_password(self, is_reset_password): + """ + Sets the is_reset_password of this UpdateOAuth2ClientCredentialDetails. + Indicate if the password to be reset or not in the update. + + + :param is_reset_password: The is_reset_password of this UpdateOAuth2ClientCredentialDetails. + :type: bool + """ + self._is_reset_password = is_reset_password + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/identity/models/update_user_capabilities_details.py b/src/oci/identity/models/update_user_capabilities_details.py index a6fb5c9bd3..7f601ea483 100644 --- a/src/oci/identity/models/update_user_capabilities_details.py +++ b/src/oci/identity/models/update_user_capabilities_details.py @@ -37,13 +37,18 @@ def __init__(self, **kwargs): The value to assign to the can_use_customer_secret_keys property of this UpdateUserCapabilitiesDetails. :type can_use_customer_secret_keys: bool + :param can_use_o_auth2_client_credentials: + The value to assign to the can_use_o_auth2_client_credentials property of this UpdateUserCapabilitiesDetails. + :type can_use_o_auth2_client_credentials: bool + """ self.swagger_types = { 'can_use_console_password': 'bool', 'can_use_api_keys': 'bool', 'can_use_auth_tokens': 'bool', 'can_use_smtp_credentials': 'bool', - 'can_use_customer_secret_keys': 'bool' + 'can_use_customer_secret_keys': 'bool', + 'can_use_o_auth2_client_credentials': 'bool' } self.attribute_map = { @@ -51,7 +56,8 @@ def __init__(self, **kwargs): 'can_use_api_keys': 'canUseApiKeys', 'can_use_auth_tokens': 'canUseAuthTokens', 'can_use_smtp_credentials': 'canUseSmtpCredentials', - 'can_use_customer_secret_keys': 'canUseCustomerSecretKeys' + 'can_use_customer_secret_keys': 'canUseCustomerSecretKeys', + 'can_use_o_auth2_client_credentials': 'canUseOAuth2ClientCredentials' } self._can_use_console_password = None @@ -59,6 +65,7 @@ def __init__(self, **kwargs): self._can_use_auth_tokens = None self._can_use_smtp_credentials = None self._can_use_customer_secret_keys = None + self._can_use_o_auth2_client_credentials = None @property def can_use_console_password(self): @@ -180,6 +187,30 @@ def can_use_customer_secret_keys(self, can_use_customer_secret_keys): """ self._can_use_customer_secret_keys = can_use_customer_secret_keys + @property + def can_use_o_auth2_client_credentials(self): + """ + Gets the can_use_o_auth2_client_credentials of this UpdateUserCapabilitiesDetails. + Indicates if the user can use OAuth2 credentials and tokens. + + + :return: The can_use_o_auth2_client_credentials of this UpdateUserCapabilitiesDetails. + :rtype: bool + """ + return self._can_use_o_auth2_client_credentials + + @can_use_o_auth2_client_credentials.setter + def can_use_o_auth2_client_credentials(self, can_use_o_auth2_client_credentials): + """ + Sets the can_use_o_auth2_client_credentials of this UpdateUserCapabilitiesDetails. + Indicates if the user can use OAuth2 credentials and tokens. + + + :param can_use_o_auth2_client_credentials: The can_use_o_auth2_client_credentials of this UpdateUserCapabilitiesDetails. + :type: bool + """ + self._can_use_o_auth2_client_credentials = can_use_o_auth2_client_credentials + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/identity/models/user_capabilities.py b/src/oci/identity/models/user_capabilities.py index b506b9216c..f1c825b01d 100644 --- a/src/oci/identity/models/user_capabilities.py +++ b/src/oci/identity/models/user_capabilities.py @@ -37,13 +37,18 @@ def __init__(self, **kwargs): The value to assign to the can_use_customer_secret_keys property of this UserCapabilities. :type can_use_customer_secret_keys: bool + :param can_use_o_auth2_client_credentials: + The value to assign to the can_use_o_auth2_client_credentials property of this UserCapabilities. + :type can_use_o_auth2_client_credentials: bool + """ self.swagger_types = { 'can_use_console_password': 'bool', 'can_use_api_keys': 'bool', 'can_use_auth_tokens': 'bool', 'can_use_smtp_credentials': 'bool', - 'can_use_customer_secret_keys': 'bool' + 'can_use_customer_secret_keys': 'bool', + 'can_use_o_auth2_client_credentials': 'bool' } self.attribute_map = { @@ -51,7 +56,8 @@ def __init__(self, **kwargs): 'can_use_api_keys': 'canUseApiKeys', 'can_use_auth_tokens': 'canUseAuthTokens', 'can_use_smtp_credentials': 'canUseSmtpCredentials', - 'can_use_customer_secret_keys': 'canUseCustomerSecretKeys' + 'can_use_customer_secret_keys': 'canUseCustomerSecretKeys', + 'can_use_o_auth2_client_credentials': 'canUseOAuth2ClientCredentials' } self._can_use_console_password = None @@ -59,6 +65,7 @@ def __init__(self, **kwargs): self._can_use_auth_tokens = None self._can_use_smtp_credentials = None self._can_use_customer_secret_keys = None + self._can_use_o_auth2_client_credentials = None @property def can_use_console_password(self): @@ -180,6 +187,30 @@ def can_use_customer_secret_keys(self, can_use_customer_secret_keys): """ self._can_use_customer_secret_keys = can_use_customer_secret_keys + @property + def can_use_o_auth2_client_credentials(self): + """ + Gets the can_use_o_auth2_client_credentials of this UserCapabilities. + Indicates if the user can use OAuth2 credentials and tokens. + + + :return: The can_use_o_auth2_client_credentials of this UserCapabilities. + :rtype: bool + """ + return self._can_use_o_auth2_client_credentials + + @can_use_o_auth2_client_credentials.setter + def can_use_o_auth2_client_credentials(self, can_use_o_auth2_client_credentials): + """ + Sets the can_use_o_auth2_client_credentials of this UserCapabilities. + Indicates if the user can use OAuth2 credentials and tokens. + + + :param can_use_o_auth2_client_credentials: The can_use_o_auth2_client_credentials of this UserCapabilities. + :type: bool + """ + self._can_use_o_auth2_client_credentials = can_use_o_auth2_client_credentials + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/ons/models/create_subscription_details.py b/src/oci/ons/models/create_subscription_details.py index 969faff289..e4026b3ac5 100644 --- a/src/oci/ons/models/create_subscription_details.py +++ b/src/oci/ons/models/create_subscription_details.py @@ -142,6 +142,7 @@ def protocol(self): * `HTTPS` (deprecated; for PagerDuty endpoints, use `PAGERDUTY`) * `PAGERDUTY` * `SLACK` + * `ORACLE_FUNCTIONS` For information about subscription protocols, see `To create a subscription`__. @@ -166,6 +167,7 @@ def protocol(self, protocol): * `HTTPS` (deprecated; for PagerDuty endpoints, use `PAGERDUTY`) * `PAGERDUTY` * `SLACK` + * `ORACLE_FUNCTIONS` For information about subscription protocols, see `To create a subscription`__. diff --git a/src/oci/ons/notification_data_plane_client.py b/src/oci/ons/notification_data_plane_client.py index 504c0d7dc6..47ed95f11f 100644 --- a/src/oci/ons/notification_data_plane_client.py +++ b/src/oci/ons/notification_data_plane_client.py @@ -369,6 +369,7 @@ def get_confirm_subscription(self, id, token, protocol, **kwargs): * `HTTPS` (deprecated; for PagerDuty endpoints, use `PAGERDUTY`) * `PAGERDUTY` * `SLACK` + * `ORACLE_FUNCTIONS` For information about subscription protocols, see `To create a subscription`__. @@ -549,6 +550,7 @@ def get_unsubscription(self, id, token, protocol, **kwargs): * `HTTPS` (deprecated; for PagerDuty endpoints, use `PAGERDUTY`) * `PAGERDUTY` * `SLACK` + * `ORACLE_FUNCTIONS` For information about subscription protocols, see `To create a subscription`__. diff --git a/src/oci/version.py b/src/oci/version.py index ff3fe4e9fb..6b04b7a9cd 100644 --- a/src/oci/version.py +++ b/src/oci/version.py @@ -1,4 +1,4 @@ # coding: utf-8 # Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. -__version__ = "2.10.5" +__version__ = "2.10.6"