a f2@sddlmZddlmZddlmZddlmZmZddlm Z ddl m Z m Z ddl mZddlmZmZmZdd lmZdd lmZd d lmZed ZGdddeZdS))absolute_import)requests)six)retrycircuit_breaker) BaseClient)get_config_value_or_defaultvalidate_config)Signer)Sentinel#get_signer_from_authentication_typeAUTHENTICATION_TYPE_FIELD_NAME)InvalidAlloyConfig)OCI_SDK_ENABLED_SERVICES_SET)psql_type_mappingZMissingc@s eZdZdZddZddZddZdd Zd d Zd d Z ddZ ddZ ddZ ddZ ddZddZddZddZddZd d!Zd"d#Zd$d%Zd&d'Zd(d)Zd*d+Zd,d-Zd.d/Zd0d1Zd2d3Zd4d5Zd6d7Zd8d9Zd:d;Z dd?Z"d@dAZ#dBdCZ$dDdEZ%dFS)GPostgresqlClientz Use the OCI Database with PostgreSQL API to manage resources such as database systems, database nodes, backups, and configurations. For information, see the user guide documentation for the [service](/iaas/Content/postgresql/home.htm). c Ks&tdstdt||ddd|vr6|d}nDt|vrHt|}n2t|d|d|d|dt|d |d d }d |d ddi|dd|dt j |dd}d|vr|d|d<|ddurt j |d<d|vr|d|d<t d||t fi||_|d|_|d|_dS)a Creates a new service client :param dict config: Configuration keys and values as per `SDK and Tool Configuration `__. The :py:meth:`~oci.config.from_file` method can be used to load configuration from a file. Alternatively, a ``dict`` can be passed. You can validate_config the dict using :py:meth:`~oci.config.validate_config` :param str service_endpoint: (optional) The endpoint of the service to call using this client. For example ``https://iaas.us-ashburn-1.oraclecloud.com``. If this keyword argument is not provided then it will be derived using the region in the config parameter. You should only provide this keyword argument if you have an explicit need to specify a service endpoint. :param timeout: (optional) The connection and read timeouts for the client. The default values are connection timeout 10 seconds and read timeout 60 seconds. This keyword argument can be provided as a single float, in which case the value provided is used for both the read and connection timeouts, or as a tuple of two floats. If a tuple is provided then the first value is used as the connection timeout and the second value as the read timeout. :type timeout: float or tuple(float, float) :param signer: (optional) The signer to use when signing requests made by the service client. The default is to use a :py:class:`~oci.signer.Signer` based on the values provided in the config parameter. One use case for this parameter is for `Instance Principals authentication `__ by passing an instance of :py:class:`~oci.auth.signers.InstancePrincipalsSecurityTokenSigner` as the value for this keyword argument :type signer: :py:class:`~oci.signer.AbstractBaseSigner` :param obj retry_strategy: (optional) A retry strategy to apply to all calls made by this service client (i.e. at the client level). There is no retry strategy applied by default. Retry strategies can also be applied at the operation level by passing a ``retry_strategy`` keyword argument as part of calling the operation. Any value provided at the operation level will override whatever is specified at the client level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` is also available. The specifics of the default retry strategy are described `here `__. :param obj circuit_breaker_strategy: (optional) A circuit breaker strategy to apply to all calls made by this service client (i.e. at the client level). This client uses :py:data:`~oci.circuit_breaker.DEFAULT_CIRCUIT_BREAKER_STRATEGY` as default if no circuit breaker strategy is provided. The specifics of circuit breaker strategy are described `here `__. :param function circuit_breaker_callback: (optional) Callback function to receive any exceptions triggerred by the circuit breaker. :param bool client_level_realm_specific_endpoint_template_enabled: (optional) A boolean flag to indicate whether or not this client should be created with realm specific endpoint template enabled or disable. By default, this will be set as None. :param allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this client should allow control characters in the response object. By default, the client will not allow control characters to be in the response object. ZpsqlaThe Alloy configuration has disabled this service, this behavior is controlled by OCI_SDK_ENABLED_SERVICES_SET variable. Please check if your local alloy-config file configured the service you're targeting or contact the cloud provider on the availability of this servicesigner)rtenancyuser fingerprintZkey_file pass_phraseZ key_content)rrrZprivate_key_file_locationrZprivate_key_contentTservice_endpointz /20220915z3https://postgresql.{region}.oci.{secondLevelDomain}skip_deserializationFcircuit_breaker_strategy5client_level_realm_specific_endpoint_template_enabled)Zregional_clientr base_pathZservice_endpoint_templateZ#service_endpoint_template_per_realmrrrtimeoutNallow_control_charsZ postgresqlretry_strategycircuit_breaker_callback)rZis_service_enabledrr getr r r rrZGLOBAL_CIRCUIT_BREAKER_STRATEGYZ DEFAULT_CIRCUIT_BREAKER_STRATEGYrr base_clientrr )selfZconfigkwargsrZbase_client_init_kwargsr%>/usr/lib/python3.9/site-packages/oci/psql/postgresql_client.py__init__sB3         zPostgresqlClient.__init__c sdg}d}d}d}d}gdfddt|D} | rHtd | d|i} d d t| D} t| D]<\} } | d ust| tjrnt| d krntd| dqndd|dt |dt |dt d} dd t| D} |j j |d|j d}|d urt j}|rpt|t jsH|j | |j | ||j|j|j j||| | ||d|||d S|j j||| | ||d|||d Sd S)a9 Moves a backup from one compartment to another. When provided, If-Match is checked against ETag values of the resource. :param str backup_id: (required) A unique identifier for the backup. :param oci.psql.models.ChangeBackupCompartmentDetails change_backup_compartment_details: (required) The information to be updated. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. :param str opc_request_id: (optional) The client request ID for tracing. :param str opc_retry_token: (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, `retrytoken` could be expired or invalidated. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. The specifics of the default retry strategy are described `here `__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` :example: Click `here `__ to see an example of how to use change_backup_compartment API. backupIdz-/backups/{backupId}/actions/changeCompartmentPOSTchange_backup_compartmentzXhttps://docs.oracle.com/iaas/api/#/en/postgresql/20220915/Backup/ChangeBackupCompartmentrrif_matchopc_request_idopc_retry_tokencsg|]}|vr|qSr%r%.0Z_keyZexpected_kwargsr%r& z>PostgresqlClient.change_backup_compartment..z.change_backup_compartment got unknown kwargs: cSsi|]\}}|tur||qSr%missingr0kvr%r%r& r3z>PostgresqlClient.change_backup_compartment..Nr Parameter + cannot be None, whitespace or empty stringapplication/jsonr,r-r.accept content-typeif-matchopc-request-idopc-retry-tokencSs&i|]\}}|tur|dur||qSNr4r6r%r%r&r9r3rZoperation_retry_strategyZclient_retry_strategyr resource_pathmethod path_params header_paramsbodyroperation_nameapi_reference_linkrequired_argumentsriterkeys ValueError iteritems isinstance string_typeslenstripr!r5r"get_preferred_retry_strategyrrDEFAULT_RETRY_STRATEGYNoneRetryStrategyadd_opc_retry_token_if_neededadd_opc_client_retries_headeradd_circuit_breaker_callbackr make_retrying_callcall_api)r# backup_idZ!change_backup_compartment_detailsr$rMrFrGrKrL extra_kwargsrHr7r8rIrr%r1r&r*xst+$        z*PostgresqlClient.change_backup_compartmentc sdg}d}d}d}d}gdfddt|D} | rHtd | d|i} d d t| D} t| D]<\} } | d ust| tjrnt| d krntd| dqndd|dt |dt |dt d} dd t| D} |j j |d|j d}|d urt j}|rpt|t jsH|j | |j | ||j|j|j j||| | ||d|||d S|j j||| | ||d|||d Sd S)aj Moves a configuration from one compartment to another. When provided, If-Match is checked against ETag values of the resource. :param str configuration_id: (required) A unique identifier for the configuration. :param oci.psql.models.ChangeConfigurationCompartmentDetails change_configuration_compartment_details: (required) The information to be updated. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. :param str opc_request_id: (optional) The client request ID for tracing. :param str opc_retry_token: (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, `retrytoken` could be expired or invalidated. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. The specifics of the default retry strategy are described `here `__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` :example: Click `here `__ to see an example of how to use change_configuration_compartment API. configurationIdz;/configurations/{configurationId}/actions/changeCompartmentr) change_configuration_compartmentzfhttps://docs.oracle.com/iaas/api/#/en/postgresql/20220915/Configuration/ChangeConfigurationCompartmentr+csg|]}|vr|qSr%r%r/r1r%r&r2%r3zEPostgresqlClient.change_configuration_compartment..z5change_configuration_compartment got unknown kwargs: cSsi|]\}}|tur||qSr%r4r6r%r%r&r9.r3zEPostgresqlClient.change_configuration_compartment..Nrr:r;r<r,r-r.r=cSs&i|]\}}|tur|dur||qSrCr4r6r%r%r&r9;r3rrDrrErN)r#configuration_idZ(change_configuration_compartment_detailsr$rMrFrGrKrLr_rHr7r8rIrr%r1r&rast+$        z1PostgresqlClient.change_configuration_compartmentc sdg}d}d}d}d}gdfddt|D} | rHtd | d|i} d d t| D} t| D]<\} } | d ust| tjrnt| d krntd| dqndd|dt |dt |dt d} dd t| D} |j j |d|j d}|d urt j}|rpt|t jsH|j | |j | ||j|j|j j||| | ||d|||d S|j j||| | ||d|||d Sd S)aY Moves a database system from one compartment to another. When provided, If-Match is checked against ETag values of the resource. :param str db_system_id: (required) A unique identifier for the database system. :param oci.psql.models.ChangeDbSystemCompartmentDetails change_db_system_compartment_details: (required) The information to be updated. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. :param str opc_request_id: (optional) The client request ID for tracing. :param str opc_retry_token: (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, `retrytoken` could be expired or invalidated. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. The specifics of the default retry strategy are described `here `__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` :example: Click `here `__ to see an example of how to use change_db_system_compartment API. dbSystemIdz1/dbSystems/{dbSystemId}/actions/changeCompartmentr)change_db_system_compartmentz\https://docs.oracle.com/iaas/api/#/en/postgresql/20220915/DbSystem/ChangeDbSystemCompartmentr+csg|]}|vr|qSr%r%r/r1r%r&r2r3zAPostgresqlClient.change_db_system_compartment..z1change_db_system_compartment got unknown kwargs: cSsi|]\}}|tur||qSr%r4r6r%r%r&r9r3zAPostgresqlClient.change_db_system_compartment..Nrr:r;r<r,r-r.r=cSs&i|]\}}|tur|dur||qSrCr4r6r%r%r&r9r3rrDrrErN)r# db_system_idZ$change_db_system_compartment_detailsr$rMrFrGrKrLr_rHr7r8rIrr%r1r&rd`st+$        z-PostgresqlClient.change_db_system_compartmentc sg}d}d}d}d}gdfddt|D}|rFtd|d d |d t|d td } d dt| D} |jj|d|jd} | durt j } | rt | t j s|j | |j| | |j| j|jj||| ||d|||d S|jj||| ||d|||dSdS)a Creates a new backup. :param oci.psql.models.CreateBackupDetails create_backup_details: (required) Details for the new backup. :param str opc_retry_token: (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, `retrytoken` could be expired or invalidated. :param str opc_request_id: (optional) The client request ID for tracing. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. The specifics of the default retry strategy are described `here `__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` :example: Click `here `__ to see an example of how to use create_backup API. /backupsr) create_backupzMhttps://docs.oracle.com/iaas/api/#/en/postgresql/20220915/Backup/CreateBackuprrr.r-csg|]}|vr|qSr%r%r/r1r%r&r2r3z2PostgresqlClient.create_backup..z"create_backup got unknown kwargs: r<r.r-r>r?rBrAcSs&i|]\}}|tur|dur||qSrCr4r6r%r%r&r9r3z2PostgresqlClient.create_backup..rrDNr)rFrGrIrJrrKrLrMrrOrPr!r5rQr"rVrrrWrRrXrYrZr[r r\r]) r#Zcreate_backup_detailsr$rMrFrGrKrLr_rIrr%r1r&rgsb$       zPostgresqlClient.create_backupc s"g}d}d}d}d}gdfddt|D}|rFtd|d d |d t|d td } d dt| D} |jj|d|jd} | durt j } | rt | t j s|j | |j| | |j| j|jj||| |d|d|||d S|jj||| |d|d|||d SdS)a+ Creates a new configuration. :param oci.psql.models.CreateConfigurationDetails create_configuration_details: (required) Details for the new configuration. :param str opc_retry_token: (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, `retrytoken` could be expired or invalidated. :param str opc_request_id: (optional) The client request ID for tracing. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. The specifics of the default retry strategy are described `here `__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.psql.models.Configuration` :rtype: :class:`~oci.response.Response` :example: Click `here `__ to see an example of how to use create_configuration API. /configurationsr)create_configurationz[https://docs.oracle.com/iaas/api/#/en/postgresql/20220915/Configuration/CreateConfigurationrhcsg|]}|vr|qSr%r%r/r1r%r&r2dr3z9PostgresqlClient.create_configuration..z)create_configuration got unknown kwargs: r<r.r-ricSs&i|]\}}|tur|dur||qSrCr4r6r%r%r&r9or3z9PostgresqlClient.create_configuration..rrDN Configurationr rFrGrIrJ response_typerrKrLrMrj) r#Zcreate_configuration_detailsr$rMrFrGrKrLr_rIrr%r1r&rl3sf$       z%PostgresqlClient.create_configurationc s"g}d}d}d}d}gdfddt|D}|rFtd|d d |d t|d td } d dt| D} |jj|d|jd} | durt j } | rt | t j s|j | |j| | |j| j|jj||| |d|d|||d S|jj||| |d|d|||d SdS)a Creates a new database system. :param oci.psql.models.CreateDbSystemDetails create_db_system_details: (required) Details for the new database system. :param str opc_retry_token: (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, `retrytoken` could be expired or invalidated. :param str opc_request_id: (optional) The client request ID for tracing. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. The specifics of the default retry strategy are described `here `__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.psql.models.DbSystem` :rtype: :class:`~oci.response.Response` :example: Click `here `__ to see an example of how to use create_db_system API. /dbSystemsr)create_db_systemzQhttps://docs.oracle.com/iaas/api/#/en/postgresql/20220915/DbSystem/CreateDbSystemrhcsg|]}|vr|qSr%r%r/r1r%r&r2r3z5PostgresqlClient.create_db_system..z%create_db_system got unknown kwargs: r<r.r-ricSs&i|]\}}|tur|dur||qSrCr4r6r%r%r&r9r3z5PostgresqlClient.create_db_system..rrDNDbSystemrrnrj) r#Zcreate_db_system_detailsr$rMrFrGrKrLr_rIrr%r1r&rqsf$       z!PostgresqlClient.create_db_systemc s~dg}d}d}d}d}gdfddt|D}|rHtd |d|i} d d t| D} t| D]<\} } | d ust| tjrnt| d krntd| dqndd|dt |dt d} dd t| D} |j j |d|j d} | d urt j} | rXt| t js2|j | | |j| j|j j||| | |d|||d S|j j||| | |d|||dSd S)a^ Deletes a backup by identifier. :param str backup_id: (required) A unique identifier for the backup. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. :param str opc_request_id: (optional) The client request ID for tracing. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. The specifics of the default retry strategy are described `here `__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` :example: Click `here `__ to see an example of how to use delete_backup API. r(/backups/{backupId}DELETE delete_backupzMhttps://docs.oracle.com/iaas/api/#/en/postgresql/20220915/Backup/DeleteBackuprrr,r-csg|]}|vr|qSr%r%r/r1r%r&r2$r3z2PostgresqlClient.delete_backup..z"delete_backup got unknown kwargs: cSsi|]\}}|tur||qSr%r4r6r%r%r&r9-r3z2PostgresqlClient.delete_backup..Nrr:r;r<r,r-r>r?r@rAcSs&i|]\}}|tur|dur||qSrCr4r6r%r%r&r99r3rrDrrFrGrHrIrrKrLrMrrOrPrQrRrSrTrUr!r5r"rVrrrWrXrZr[r r\r]r#r^r$rMrFrGrKrLr_rHr7r8rIrr%r1r&rusl"$      zPostgresqlClient.delete_backupc s~dg}d}d}d}d}gdfddt|D}|rHtd |d|i} d d t| D} t| D]<\} } | d ust| tjrnt| d krntd| dqndd|dt |dt d} dd t| D} |j j |d|j d} | d urt j} | rXt| t js2|j | | |j| j|j j||| | |d|||d S|j j||| | |d|||dSd S)a Deletes a configuration by identifier. :param str configuration_id: (required) A unique identifier for the configuration. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. :param str opc_request_id: (optional) The client request ID for tracing. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. The specifics of the default retry strategy are described `here `__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` :example: Click `here `__ to see an example of how to use delete_configuration API. r`!/configurations/{configurationId}rtdelete_configurationz[https://docs.oracle.com/iaas/api/#/en/postgresql/20220915/Configuration/DeleteConfigurationrvcsg|]}|vr|qSr%r%r/r1r%r&r2r3z9PostgresqlClient.delete_configuration..z)delete_configuration got unknown kwargs: cSsi|]\}}|tur||qSr%r4r6r%r%r&r9r3z9PostgresqlClient.delete_configuration..Nrr:r;r<r,r-rwcSs&i|]\}}|tur|dur||qSrCr4r6r%r%r&r9r3rrDrrxryr#rbr$rMrFrGrKrLr_rHr7r8rIrr%r1r&r|[sl"$      z%PostgresqlClient.delete_configurationc s~dg}d}d}d}d}gdfddt|D}|rHtd |d|i} d d t| D} t| D]<\} } | d ust| tjrnt| d krntd| dqndd|dt |dt d} dd t| D} |j j |d|j d} | d urt j} | rXt| t js2|j | | |j| j|j j||| | |d|||d S|j j||| | |d|||dSd S)ay Deletes a database system by identifier. :param str db_system_id: (required) A unique identifier for the database system. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. :param str opc_request_id: (optional) The client request ID for tracing. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. The specifics of the default retry strategy are described `here `__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` :example: Click `here `__ to see an example of how to use delete_db_system API. rc/dbSystems/{dbSystemId}rtdelete_db_systemzQhttps://docs.oracle.com/iaas/api/#/en/postgresql/20220915/DbSystem/DeleteDbSystemrvcsg|]}|vr|qSr%r%r/r1r%r&r2r3z5PostgresqlClient.delete_db_system..z%delete_db_system got unknown kwargs: cSsi|]\}}|tur||qSr%r4r6r%r%r&r9r3z5PostgresqlClient.delete_db_system..Nrr:r;r<r,r-rwcSs&i|]\}}|tur|dur||qSrCr4r6r%r%r&r9r3rrDrrxryr#rer$rMrFrGrKrLr_rHr7r8rIrr%r1r&rsl"$      z!PostgresqlClient.delete_db_systemc sdg}d}d}d}d}gdfddt|D} | rHtd | d|i} d d t| D} t| D]<\} } | d ust| tjrnt| d krntd| dqndd|dt |dt |dt d} dd t| D} |j j |d|j d}|d urt j}|rpt|t jsH|j | |j | ||j|j|j j||| | ||d|||d S|j j||| | ||d|||d Sd S)a Runs a failover operation. Optionally, specify the desired AD for regions with three ADs. :param str db_system_id: (required) A unique identifier for the database system. :param oci.psql.models.FailoverDbSystemDetails failover_db_system_details: (required) The information to be updated. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. :param str opc_request_id: (optional) The client request ID for tracing. :param str opc_retry_token: (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, `retrytoken` could be expired or invalidated. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. The specifics of the default retry strategy are described `here `__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` :example: Click `here `__ to see an example of how to use failover_db_system API. rcz(/dbSystems/{dbSystemId}/actions/failoverr)failover_db_systemzShttps://docs.oracle.com/iaas/api/#/en/postgresql/20220915/DbSystem/FailoverDbSystemr+csg|]}|vr|qSr%r%r/r1r%r&r2`r3z7PostgresqlClient.failover_db_system..z'failover_db_system got unknown kwargs: cSsi|]\}}|tur||qSr%r4r6r%r%r&r9ir3z7PostgresqlClient.failover_db_system..Nrr:r;r<r,r-r.r=cSs&i|]\}}|tur|dur||qSrCr4r6r%r%r&r9vr3rrDrrErN)r#reZfailover_db_system_detailsr$rMrFrGrKrLr_rHr7r8rIrr%r1r&r'st+$        z#PostgresqlClient.failover_db_systemc svdg}d}d}d}d}gdfddt|D}|rHtd |d|i} d d t| D} t| D]<\} } | d ust| tjrnt| d krntd| dqndd|dt d} dd t| D} |j j |d|j d} | d urt j} | rNt| t js&|j | | |j| j|j j||| | d|d|||d S|j j||| | d|d|||d Sd S)a Gets a backup by identifier. :param str backup_id: (required) A unique identifier for the backup. :param str opc_request_id: (optional) The client request ID for tracing. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. The specifics of the default retry strategy are described `here `__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.psql.models.Backup` :rtype: :class:`~oci.response.Response` :example: Click `here `__ to see an example of how to use get_backup API. r(rsGET get_backupzJhttps://docs.oracle.com/iaas/api/#/en/postgresql/20220915/Backup/GetBackuprrr-csg|]}|vr|qSr%r%r/r1r%r&r2r3z/PostgresqlClient.get_backup..zget_backup got unknown kwargs: cSsi|]\}}|tur||qSr%r4r6r%r%r&r9r3z/PostgresqlClient.get_backup..Nrr:r;r<r-r>r?rAcSs&i|]\}}|tur|dur||qSrCr4r6r%r%r&r9r3rrDBackupr rFrGrHrIrorrKrLrMryrzr%r1r&rsn$    zPostgresqlClient.get_backupc svdg}d}d}d}d}gdfddt|D}|rHtd |d|i} d d t| D} t| D]<\} } | d ust| tjrnt| d krntd| dqndd|dt d} dd t| D} |j j |d|j d} | d urt j} | rNt| t js&|j | | |j| j|j j||| | d|d|||d S|j j||| | d|d|||d Sd S)a. Gets a configuration by identifier. :param str configuration_id: (required) A unique identifier for the configuration. :param str opc_request_id: (optional) The client request ID for tracing. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. The specifics of the default retry strategy are described `here `__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.psql.models.Configuration` :rtype: :class:`~oci.response.Response` :example: Click `here `__ to see an example of how to use get_configuration API. r`r{rget_configurationzXhttps://docs.oracle.com/iaas/api/#/en/postgresql/20220915/Configuration/GetConfigurationrcsg|]}|vr|qSr%r%r/r1r%r&r2'r3z6PostgresqlClient.get_configuration..z&get_configuration got unknown kwargs: cSsi|]\}}|tur||qSr%r4r6r%r%r&r90r3z6PostgresqlClient.get_configuration..Nrr:r;r<r-rcSs&i|]\}}|tur|dur||qSrCr4r6r%r%r&r9;r3rrDrmrrryr}r%r1r&rsn$    z"PostgresqlClient.get_configurationc svdg}d}d}d}d}gdfddt|D}|rHtd |d|i} d d t| D} t| D]<\} } | d ust| tjrnt| d krntd| dqndd|dt d} dd t| D} |j j |d|j d} | d urt j} | rNt| t js&|j | | |j| j|j j||| | d|d|||d S|j j||| | d|d|||d Sd S)aC Gets the database system connection details. :param str db_system_id: (required) A unique identifier for the database system. :param str opc_request_id: (optional) The client request ID for tracing. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. The specifics of the default retry strategy are described `here `__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.psql.models.ConnectionDetails` :rtype: :class:`~oci.response.Response` :example: Click `here `__ to see an example of how to use get_connection_details API. rcz)/dbSystems/{dbSystemId}/connectionDetailsrget_connection_detailsz`https://docs.oracle.com/iaas/api/#/en/postgresql/20220915/ConnectionDetails/GetConnectionDetailsrcsg|]}|vr|qSr%r%r/r1r%r&r2r3z;PostgresqlClient.get_connection_details..z+get_connection_details got unknown kwargs: cSsi|]\}}|tur||qSr%r4r6r%r%r&r9r3z;PostgresqlClient.get_connection_details..Nrr:r;r<r-rcSs&i|]\}}|tur|dur||qSrCr4r6r%r%r&r9r3rrDZConnectionDetailsrrryrr%r1r&r_sn$    z'PostgresqlClient.get_connection_detailsc sdg}d}d}d}d}gdfddt|D}|rHtd |d|i} d d t| D} t| D]<\} } | d ust| tjrnt| d krntd| dqnd|vrdg} |dD]} | | vrtd| qd|j | dt di}dd t|D}dd| dt d}dd t|D}|jj | d|j d}|d ur\tj}|rt|tjs|j|||j|j|jj||| ||d| d|||d S|jj||| ||d| d|||d Sd S)a Gets a database system by identifier. :param str db_system_id: (required) A unique identifier for the database system. :param str opc_request_id: (optional) The client request ID for tracing. :param list[str] excluded_fields: (optional) A filter to exclude database configuration when this query parameter is set to OverrideDbConfig. Allowed values are: "dbConfigurationParams" :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. The specifics of the default retry strategy are described `here `__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.psql.models.DbSystem` :rtype: :class:`~oci.response.Response` :example: Click `here `__ to see an example of how to use get_db_system API. rcr~r get_db_systemzNhttps://docs.oracle.com/iaas/api/#/en/postgresql/20220915/DbSystem/GetDbSystem)rrr-excluded_fieldscsg|]}|vr|qSr%r%r/r1r%r&r2r3z2PostgresqlClient.get_db_system..z"get_db_system got unknown kwargs: cSsi|]\}}|tur||qSr%r4r6r%r%r&r9r3z2PostgresqlClient.get_db_system..Nrr:r;rZdbConfigurationParamsz4Invalid value for `excluded_fields`, must be one of ZexcludedFieldsZmulticSs&i|]\}}|tur|dur||qSrCr4r6r%r%r&r9 r3r<r-rcSs&i|]\}}|tur|dur||qSrCr4r6r%r%r&r9r3rrDrrr rFrGrH query_paramsrIrorrKrLrM)rrOrPrQrRrSrTrUr"Z generate_collection_format_paramr!r5rVrrrWrXrZr[r r\r])r#rer$rMrFrGrKrLr_rHr7r8Zexcluded_fields_allowed_valuesZexcluded_fields_itemrrIrr%r1r&rs#$      zPostgresqlClient.get_db_systemc svdg}d}d}d}d}gdfddt|D}|rHtd |d|i} d d t| D} t| D]<\} } | d ust| tjrnt| d krntd| dqndd|dt d} dd t| D} |j j |d|j d} | d urt j} | rNt| t js&|j | | |j| j|j j||| | d|d|||d S|j j||| | d|d|||d Sd S)aU Gets a default configuration by identifier. :param str default_configuration_id: (required) A unique identifier for the configuration. :param str opc_request_id: (optional) The client request ID for tracing. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. The specifics of the default retry strategy are described `here `__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.psql.models.DefaultConfiguration` :rtype: :class:`~oci.response.Response` :example: Click `here `__ to see an example of how to use get_default_configuration API. ZdefaultConfigurationIdz//defaultConfigurations/{defaultConfigurationId}rget_default_configurationzfhttps://docs.oracle.com/iaas/api/#/en/postgresql/20220915/DefaultConfiguration/GetDefaultConfigurationrcsg|]}|vr|qSr%r%r/r1r%r&r2br3z>PostgresqlClient.get_default_configuration..z.get_default_configuration got unknown kwargs: cSsi|]\}}|tur||qSr%r4r6r%r%r&r9kr3z>PostgresqlClient.get_default_configuration..Nrr:r;r<r-rcSs&i|]\}}|tur|dur||qSrCr4r6r%r%r&r9vr3rrDZDefaultConfigurationrrry)r#Zdefault_configuration_idr$rMrFrGrKrLr_rHr7r8rIrr%r1r&r8sn$    z*PostgresqlClient.get_default_configurationc svdg}d}d}d}d}gdfddt|D}|rHtd |d|i} d d t| D} t| D]<\} } | d ust| tjrnt| d krntd| dqndd|dt d} dd t| D} |j j |d|j d} | d urt j} | rNt| t js&|j | | |j| j|j j||| | d|d|||d S|j j||| | d|d|||d Sd S)aP Gets the primary database instance node details. :param str db_system_id: (required) A unique identifier for the database system. :param str opc_request_id: (optional) The client request ID for tracing. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. The specifics of the default retry strategy are described `here `__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.psql.models.PrimaryDbInstanceDetails` :rtype: :class:`~oci.response.Response` :example: Click `here `__ to see an example of how to use get_primary_db_instance API. rcz)/dbSystems/{dbSystemId}/primaryDbInstancerget_primary_db_instancezWhttps://docs.oracle.com/iaas/api/#/en/postgresql/20220915/DbSystem/GetPrimaryDbInstancercsg|]}|vr|qSr%r%r/r1r%r&r2r3z.z,get_primary_db_instance got unknown kwargs: cSsi|]\}}|tur||qSr%r4r6r%r%r&r9r3z.Nrr:r;r<r-rcSs&i|]\}}|tur|dur||qSrCr4r6r%r%r&r9r3rrDZPrimaryDbInstanceDetailsrrryrr%r1r&rsn$    z(PostgresqlClient.get_primary_db_instancec svdg}d}d}d}d}gdfddt|D}|rHtd |d|i} d d t| D} t| D]<\} } | d ust| tjrnt| d krntd| dqndd|dt d} dd t| D} |j j |d|j d} | d urt j} | rNt| t js&|j | | |j| j|j j||| | d|d|||d S|j j||| | d|d|||d Sd S)a2 Gets details of the work request with the given ID. :param str work_request_id: (required) The ID of the asynchronous request. :param str opc_request_id: (optional) The client request ID for tracing. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. The specifics of the default retry strategy are described `here `__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.psql.models.WorkRequest` :rtype: :class:`~oci.response.Response` :example: Click `here `__ to see an example of how to use get_work_request API. workRequestIdz/workRequests/{workRequestId}rget_work_requestzThttps://docs.oracle.com/iaas/api/#/en/postgresql/20220915/WorkRequest/GetWorkRequestrcsg|]}|vr|qSr%r%r/r1r%r&r2&r3z5PostgresqlClient.get_work_request..z%get_work_request got unknown kwargs: cSsi|]\}}|tur||qSr%r4r6r%r%r&r9/r3z5PostgresqlClient.get_work_request..Nrr:r;r<r-rcSs&i|]\}}|tur|dur||qSrCr4r6r%r%r&r9:r3rrDZ WorkRequestrrry)r#work_request_idr$rMrFrGrKrLr_rHr7r8rIrr%r1r&rsn$    z!PostgresqlClient.get_work_requestc sg}d}d}d}d}gdfddt|D}|rFtd|d |vrpgd }|d |vrptd |d |vrd dg} |d | vrtd| d|vrddg} |d| vrtd| |dt|dt|dt|d t|dt|dt|dt|dt|dt|d t|dtd } ddt| D} dd|d td!} d"dt| D} |jj|d#|jd$} | d%urt j } | rt | t j s|j | | |j| j|jj||| | d&|d'|||d( S|jj||| | d&|d'|||d( Sd%S))a Returns a list of backups. :param str compartment_id: (optional) The ID of the compartment in which to list resources. :param datetime time_started: (optional) The start date for getting backups. An `RFC 3339`__ formatted datetime string. __ https://tools.ietf.org/rfc/rfc3339 :param datetime time_ended: (optional) The end date for getting backups. An `RFC 3339`__ formatted datetime string. __ https://tools.ietf.org/rfc/rfc3339 :param str lifecycle_state: (optional) A filter to return only resources if their `lifecycleState` matches the given `lifecycleState`. Allowed values are: "CREATING", "ACTIVE", "DELETING", "DELETED", "FAILED" :param str display_name: (optional) A filter to return only resources that match the entire display name given. :param str backup_id: (optional) A unique identifier for the backup. :param str id: (optional) A unique identifier for the database system. :param int limit: (optional) The maximum number of items to return. :param str page: (optional) A token representing the position at which to start retrieving results. This must come from the `opc-next-page` header field of a previous response. :param str sort_order: (optional) The sort order to use, either 'ASC' or 'DESC'. Allowed values are: "ASC", "DESC" :param str sort_by: (optional) The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. Allowed values are: "timeCreated", "displayName" :param str opc_request_id: (optional) The client request ID for tracing. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. The specifics of the default retry strategy are described `here `__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.psql.models.BackupCollection` :rtype: :class:`~oci.response.Response` :example: Click `here `__ to see an example of how to use list_backups API. rfr list_backupszVhttps://docs.oracle.com/iaas/api/#/en/postgresql/20220915/BackupCollection/ListBackups)rrcompartment_id time_started time_endedlifecycle_state display_namer^idlimitpage sort_ordersort_byr-csg|]}|vr|qSr%r%r/r1r%r&r2r3z1PostgresqlClient.list_backups..z!list_backups got unknown kwargs: r)CREATINGACTIVEDELETINGDELETEDFAILED4Invalid value for `lifecycle_state`, must be one of rASCDESC/Invalid value for `sort_order`, must be one of r timeCreated displayName,Invalid value for `sort_by`, must be one of rrrrr^rrr) compartmentIdZ timeStartedZ timeEndedlifecycleStaterr(rrr sortOrdersortBycSs&i|]\}}|tur|dur||qSrCr4r6r%r%r&r9r3z1PostgresqlClient.list_backups..r<r-rcSs&i|]\}}|tur|dur||qSrCr4r6r%r%r&r9r3rrDNZBackupCollectionr rFrGrrIrorrKrLrMrrOrPr!r5rQr"rVrrrWrRrXrZr[r r\r]r#r$rMrFrGrKrLr_Zlifecycle_state_allowed_valuessort_order_allowed_valuessort_by_allowed_valuesrrIrr%r1r&r^sF                    zPostgresqlClient.list_backupsc sg}d}d}d}d}gdfddt|D}|rFtd|d |vrpgd }|d |vrptd |d |vrd dg} |d | vrtd| d|vrddg} |d| vrtd| |dt|d t|dt|dt|dt|dt|dt|dt|d t|dtd } ddt| D} dd|dtd } d!dt| D} |jj|d"|jd#} | d$urt j } | rt | t j s|j | | |j| j|jj||| | d%|d&|||d' S|jj||| | d%|d&|||d' Sd$S)(a Returns a list of configurations. :param str compartment_id: (optional) The ID of the compartment in which to list resources. :param str lifecycle_state: (optional) A filter to return only resources if their `lifecycleState` matches the given `lifecycleState`. Allowed values are: "ACTIVE", "DELETING", "DELETED", "FAILED" :param str display_name: (optional) A filter to return only resources that match the entire display name given. :param str db_version: (optional) Version of the PostgreSQL database, such as 14.9. :param str shape: (optional) The name of the shape for the configuration. Example: `VM.Standard.E4.Flex` :param str configuration_id: (optional) A unique identifier for the configuration. :param int limit: (optional) The maximum number of items to return. :param str page: (optional) A token representing the position at which to start retrieving results. This must come from the `opc-next-page` header field of a previous response. :param str sort_order: (optional) The sort order to use, either 'ASC' or 'DESC'. Allowed values are: "ASC", "DESC" :param str sort_by: (optional) The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. Allowed values are: "timeCreated", "displayName" :param str opc_request_id: (optional) The client request ID for tracing. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. The specifics of the default retry strategy are described `here `__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.psql.models.ConfigurationCollection` :rtype: :class:`~oci.response.Response` :example: Click `here `__ to see an example of how to use list_configurations API. rkrlist_configurationszdhttps://docs.oracle.com/iaas/api/#/en/postgresql/20220915/ConfigurationCollection/ListConfigurations) rrrrr db_versionshaperbrrrrr-csg|]}|vr|qSr%r%r/r1r%r&r2cr3z8PostgresqlClient.list_configurations..z(list_configurations got unknown kwargs: rrrrrrrrrrrrrrrrrrrbrr) rrr dbVersionrr`rrrrcSs&i|]\}}|tur|dur||qSrCr4r6r%r%r&r9r3z8PostgresqlClient.list_configurations..r<r-rcSs&i|]\}}|tur|dur||qSrCr4r6r%r%r&r9r3rrDNZConfigurationCollectionrrrrr%r1r&r s@                   z$PostgresqlClient.list_configurationsc sg}d}d}d}d}gdfddt|D}|rFtd|d |vrpgd }|d |vrptd |d |vrd dg} |d | vrtd| d|vrddg} |d| vrtd| |dt|d t|dt|dt|dt|dt|d t|dtd} ddt| D} dd|dtd} ddt| D} |jj|d |jd!} | d"ur~t j } | rt | t j s|j | | |j| j|jj||| | d#|d$|||d% S|jj||| | d#|d$|||d% Sd"S)&a Returns a list of database systems. :param str compartment_id: (optional) The ID of the compartment in which to list resources. :param str lifecycle_state: (optional) A filter to return only resources if their `lifecycleState` matches the given `lifecycleState`. Allowed values are: "CREATING", "UPDATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", "FAILED", "NEEDS_ATTENTION" :param str display_name: (optional) A filter to return only resources that match the entire display name given. :param str id: (optional) A unique identifier for the database system. :param int limit: (optional) The maximum number of items to return. :param str page: (optional) A token representing the position at which to start retrieving results. This must come from the `opc-next-page` header field of a previous response. :param str sort_order: (optional) The sort order to use, either 'ASC' or 'DESC'. Allowed values are: "ASC", "DESC" :param str sort_by: (optional) The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. Allowed values are: "timeCreated", "displayName" :param str opc_request_id: (optional) The client request ID for tracing. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. The specifics of the default retry strategy are described `here `__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.psql.models.DbSystemCollection` :rtype: :class:`~oci.response.Response` :example: Click `here `__ to see an example of how to use list_db_systems API. rprlist_db_systemszZhttps://docs.oracle.com/iaas/api/#/en/postgresql/20220915/DbSystemCollection/ListDbSystems) rrrrrrrrrrr-csg|]}|vr|qSr%r%r/r1r%r&r2 r3z4PostgresqlClient.list_db_systems..z$list_db_systems got unknown kwargs: r)rZUPDATINGrZINACTIVErrrZNEEDS_ATTENTIONrrrrrrrrrrrrrr)rrrrrrrrcSs&i|]\}}|tur|dur||qSrCr4r6r%r%r&r9% r3z4PostgresqlClient.list_db_systems..r<r-rcSs&i|]\}}|tur|dur||qSrCr4r6r%r%r&r9, r3rrDNZDbSystemCollectionrrrrr%r1r&rs9                  z PostgresqlClient.list_db_systemsc sg}d}d}d}d}gdfddt|D}|rFtd|d |vrpgd }|d |vrptd |d |vrd dg} |d | vrtd| d|vrddg} |d| vrtd| |d t|dt|dt|dt|dt|dt|dt|d t|dtd } ddt| D} dd|dtd} d dt| D} |jj|d!|jd"} | d#urt j } | rt | t j s|j | | |j| j|jj||| | d$|d%|||d& S|jj||| | d$|d%|||d& Sd#S)'ar Returns a list of default configurations. :param str lifecycle_state: (optional) A filter to return only resources if their `lifecycleState` matches the given `lifecycleState`. Allowed values are: "ACTIVE", "DELETING", "DELETED", "FAILED" :param str display_name: (optional) A filter to return only resources that match the entire display name given. :param str db_version: (optional) Version of the PostgreSQL database, such as 14.9. :param str shape: (optional) The name of the shape for the configuration. Example: `VM.Standard.E4.Flex` :param str configuration_id: (optional) A unique identifier for the configuration. :param int limit: (optional) The maximum number of items to return. :param str page: (optional) A token representing the position at which to start retrieving results. This must come from the `opc-next-page` header field of a previous response. :param str sort_order: (optional) The sort order to use, either 'ASC' or 'DESC'. Allowed values are: "ASC", "DESC" :param str sort_by: (optional) The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. Allowed values are: "timeCreated", "displayName" :param str opc_request_id: (optional) The client request ID for tracing. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. The specifics of the default retry strategy are described `here `__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.psql.models.DefaultConfigurationCollection` :rtype: :class:`~oci.response.Response` :example: Click `here `__ to see an example of how to use list_default_configurations API. z/defaultConfigurationsrlist_default_configurationszrhttps://docs.oracle.com/iaas/api/#/en/postgresql/20220915/DefaultConfigurationCollection/ListDefaultConfigurations) rrrrrrrbrrrrr-csg|]}|vr|qSr%r%r/r1r%r&r2 r3z@PostgresqlClient.list_default_configurations..z0list_default_configurations got unknown kwargs: rrrrrrrrrrrrrrrbrr) rrrrr`rrrrcSs&i|]\}}|tur|dur||qSrCr4r6r%r%r&r9 r3z@PostgresqlClient.list_default_configurations..r<r-rcSs&i|]\}}|tur|dur||qSrCr4r6r%r%r&r9 r3rrDNZDefaultConfigurationCollectionrrrrr%r1r&rP s=                  z,PostgresqlClient.list_default_configurationsc sg}d}d}d}d}gdfddt|D}|rFtd|d |vrpd d g}|d |vrptd |d |vrddg} |d | vrtd| |dt|dt|dt|dt|d t|d td} ddt| D} dd|dtd} ddt| D} |jj|d|jd} | dur@t j } | rt | t j sl|j | | |j| j|jj||| | d|d |||d! S|jj||| | d|d |||d! SdS)"aV Returns the list of shapes allowed in the region. :param str compartment_id: (optional) The ID of the compartment in which to list resources. :param str id: (optional) A filter to return the feature by the shape name. :param str opc_request_id: (optional) The client request ID for tracing. :param int limit: (optional) The maximum number of items to return. :param str page: (optional) A token representing the position at which to start retrieving results. This must come from the `opc-next-page` header field of a previous response. :param str sort_order: (optional) The sort order to use, either 'ASC' or 'DESC'. Allowed values are: "ASC", "DESC" :param str sort_by: (optional) The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. Allowed values are: "timeCreated", "displayName" :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. The specifics of the default retry strategy are described `here `__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.psql.models.ShapeCollection` :rtype: :class:`~oci.response.Response` :example: Click `here `__ to see an example of how to use list_shapes API. z/shapesr list_shapeszQhttps://docs.oracle.com/iaas/api/#/en/postgresql/20220915/ShapeSummary/ListShapes) rrrrr-rrrrcsg|]}|vr|qSr%r%r/r1r%r&r25 r3z0PostgresqlClient.list_shapes..z list_shapes got unknown kwargs: rrrrrrrrrrrr)rrrrrrcSs&i|]\}}|tur|dur||qSrCr4r6r%r%r&r9P r3z0PostgresqlClient.list_shapes..r<r-rcSs&i|]\}}|tur|dur||qSrCr4r6r%r%r&r9W r3rrDNZShapeCollectionrrr) r#r$rMrFrGrKrLr_rrrrIrr%r1r&r s1              zPostgresqlClient.list_shapesc sdg}d}d}d}d}gdfddt|D}|rHtd |d|i} d d t| D} t| D]<\} } | d ust| tjrnt| d krntd| dqnd|vrdg} |d| vrtd| d|vrddg} |d| vrtd| |dt |dt |dt |dt d}dd t|D}dd|dt d}dd t|D}|j j |d|j d }|d urt j}|rt|t js|j |||j|j|j j||| ||d!|d"|||d# S|j j||| ||d!|d"|||d# Sd S)$a Returns a (paginated) list of errors for the work request with the given ID. :param str work_request_id: (required) The ID of the asynchronous request. :param str opc_request_id: (optional) The client request ID for tracing. :param str page: (optional) A token representing the position at which to start retrieving results. This must come from the `opc-next-page` header field of a previous response. :param int limit: (optional) The maximum number of items to return. :param str sort_by: (optional) The field to sort by. Only one sort order may be provided. Default order for timestamp is descending. Allowed values are: "timestamp" :param str sort_order: (optional) The sort order to use, either 'ASC' or 'DESC'. Allowed values are: "ASC", "DESC" :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. The specifics of the default retry strategy are described `here `__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.psql.models.WorkRequestErrorCollection` :rtype: :class:`~oci.response.Response` :example: Click `here `__ to see an example of how to use list_work_request_errors API. rz$/workRequests/{workRequestId}/errorsrlist_work_request_errorsz`https://docs.oracle.com/iaas/api/#/en/postgresql/20220915/WorkRequestError/ListWorkRequestErrorsrrr-rrrrcsg|]}|vr|qSr%r%r/r1r%r&r2 r3z=PostgresqlClient.list_work_request_errors..z-list_work_request_errors got unknown kwargs: cSsi|]\}}|tur||qSr%r4r6r%r%r&r9 r3z=PostgresqlClient.list_work_request_errors..Nrr:r;r timestamprrrrrrrrrrrcSs&i|]\}}|tur|dur||qSrCr4r6r%r%r&r9 r3r<r-rcSs&i|]\}}|tur|dur||qSrCr4r6r%r%r&r9 r3rrDZWorkRequestErrorCollectionrrryr#rr$rMrFrGrKrLr_rHr7r8rrrrIrr%r1r&r{ s. $           z)PostgresqlClient.list_work_request_errorsc sdg}d}d}d}d}gdfddt|D}|rHtd |d|i} d d t| D} t| D]<\} } | d ust| tjrnt| d krntd| dqnd|vrdg} |d| vrtd| d|vrddg} |d| vrtd| |dt |dt |dt |dt d}dd t|D}dd|dt d}dd t|D}|j j |d|j d }|d urt j}|rt|t js|j |||j|j|j j||| ||d!|d"|||d# S|j j||| ||d!|d"|||d# Sd S)$a Returns a (paginated) list of logs for the work request with the given ID. :param str work_request_id: (required) The ID of the asynchronous request. :param str opc_request_id: (optional) The client request ID for tracing. :param str page: (optional) A token representing the position at which to start retrieving results. This must come from the `opc-next-page` header field of a previous response. :param int limit: (optional) The maximum number of items to return. :param str sort_by: (optional) The field to sort by. Only one sort order may be provided. Default order for timestamp is descending. Allowed values are: "timestamp" :param str sort_order: (optional) The sort order to use, either 'ASC' or 'DESC'. Allowed values are: "ASC", "DESC" :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. The specifics of the default retry strategy are described `here `__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.psql.models.WorkRequestLogEntryCollection` :rtype: :class:`~oci.response.Response` :example: Click `here `__ to see an example of how to use list_work_request_logs API. rz"/workRequests/{workRequestId}/logsrlist_work_request_logszahttps://docs.oracle.com/iaas/api/#/en/postgresql/20220915/WorkRequestLogEntry/ListWorkRequestLogsrcsg|]}|vr|qSr%r%r/r1r%r&r2G r3z;PostgresqlClient.list_work_request_logs..z+list_work_request_logs got unknown kwargs: cSsi|]\}}|tur||qSr%r4r6r%r%r&r9P r3z;PostgresqlClient.list_work_request_logs..Nrr:r;rrrrrrrrrrcSs&i|]\}}|tur|dur||qSrCr4r6r%r%r&r9j r3r<r-rcSs&i|]\}}|tur|dur||qSrCr4r6r%r%r&r9q r3rrDZWorkRequestLogEntryCollectionrrryrr%r1r&r s. $           z'PostgresqlClient.list_work_request_logsc sg}d}d}d}d}gdfddt|D}|rFtd|d |vrpgd }|d |vrptd |d |vrd dg} |d | vrtd| d|vrdg} |d| vrtd| |dt|dt|d t|dt|dt|dt|d t|dtd} ddt| D} dd|dtd} ddt| D} |jj|d|jd } | d!ur|t j } | rt | t j s|j | | |j| j|jj||| | d"|d#|||d$ S|jj||| | d"|d#|||d$ Sd!S)%a Lists the work requests in a compartment. :param str compartment_id: (optional) The ID of the compartment in which to list resources. :param str work_request_id: (optional) The ID of the asynchronous work request. :param str status: (optional) A filter to return only resources if their `lifecycleState` matches the given OperationStatus. Allowed values are: "ACCEPTED", "IN_PROGRESS", "WAITING", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED" :param str resource_id: (optional) The ID of the resource affected by the request. :param str opc_request_id: (optional) The client request ID for tracing. :param str page: (optional) A token representing the position at which to start retrieving results. This must come from the `opc-next-page` header field of a previous response. :param int limit: (optional) The maximum number of items to return. :param str sort_order: (optional) The sort order to use, either 'ASC' or 'DESC'. Allowed values are: "ASC", "DESC" :param str sort_by: (optional) The field to sort by. Only one sort order may be provided. Default order for timeAccepted is descending. Allowed values are: "timeAccepted" :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. The specifics of the default retry strategy are described `here `__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.psql.models.WorkRequestSummaryCollection` :rtype: :class:`~oci.response.Response` :example: Click `here `__ to see an example of how to use list_work_requests API. z /workRequestsrlist_work_requestszVhttps://docs.oracle.com/iaas/api/#/en/postgresql/20220915/WorkRequest/ListWorkRequests) rrrrstatus resource_idr-rrrrcsg|]}|vr|qSr%r%r/r1r%r&r2 r3z7PostgresqlClient.list_work_requests..z'list_work_requests got unknown kwargs: r)ZACCEPTEDZ IN_PROGRESSZWAITINGrZ SUCCEEDEDZ CANCELINGZCANCELEDz+Invalid value for `status`, must be one of rrrrrZ timeAcceptedrrrrrr)rrrZ resourceIdrrrrcSs&i|]\}}|tur|dur||qSrCr4r6r%r%r&r9 r3z7PostgresqlClient.list_work_requests..r<r-rcSs&i|]\}}|tur|dur||qSrCr4r6r%r%r&r9 r3rrDNZWorkRequestSummaryCollectionrrr)r#r$rMrFrGrKrLr_Zstatus_allowed_valuesrrrrIrr%r1r&r s9                  z#PostgresqlClient.list_work_requestsc sdg}d}d}d}d}gdfddt|D} | rHtd | d|i} d d t| D} t| D]<\} } | d ust| tjrnt| d krntd| dqndd|dt |dt d} dd t| D} |j j |d|j d}|d urt j}|rZt|t js2|j | ||j|j|j j||| | ||d|||d S|j j||| | ||d|||d Sd S)a Modifies the database system by adding or removing database instance nodes. :param str db_system_id: (required) A unique identifier for the database system. :param oci.psql.models.PatchDbSystemDetails patch_db_system_details: (required) The information to be modified. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. :param str opc_request_id: (optional) The client request ID for tracing. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. The specifics of the default retry strategy are described `here `__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` :example: Click `here `__ to see an example of how to use patch_db_system API. rcr~ZPATCHpatch_db_systemzPhttps://docs.oracle.com/iaas/api/#/en/postgresql/20220915/DbSystem/PatchDbSystemrvcsg|]}|vr|qSr%r%r/r1r%r&r2e r3z4PostgresqlClient.patch_db_system..z$patch_db_system got unknown kwargs: cSsi|]\}}|tur||qSr%r4r6r%r%r&r9n r3z4PostgresqlClient.patch_db_system..Nrr:r;r<r,r-rwcSs&i|]\}}|tur|dur||qSrCr4r6r%r%r&r9z r3rrDrrEry)r#reZpatch_db_system_detailsr$rMrFrGrKrLr_rHr7r8rIrr%r1r&r3 sp%$      z PostgresqlClient.patch_db_systemc sdg}d}d}d}d}gdfddt|D} | rHtd | d|i} d d t| D} t| D]<\} } | d ust| tjrnt| d krntd| dqndd|dt |dt |dt d} dd t| D} |j j |d|j d}|d urt j}|rpt|t jsH|j | |j | ||j|j|j j||| | ||d|||d S|j j||| | ||d|||d Sd S)a Resets the database system's master password. :param str db_system_id: (required) A unique identifier for the database system. :param oci.psql.models.ResetMasterUserPasswordDetails reset_master_user_password_details: (required) The information to be updated. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. :param str opc_request_id: (optional) The client request ID for tracing. :param str opc_retry_token: (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, `retrytoken` could be expired or invalidated. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. The specifics of the default retry strategy are described `here `__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` :example: Click `here `__ to see an example of how to use reset_master_user_password API. rcz7/dbSystems/{dbSystemId}/actions/resetMasterUserPasswordr)reset_master_user_passwordzZhttps://docs.oracle.com/iaas/api/#/en/postgresql/20220915/DbSystem/ResetMasterUserPasswordr+csg|]}|vr|qSr%r%r/r1r%r&r2 r3z?PostgresqlClient.reset_master_user_password..z/reset_master_user_password got unknown kwargs: cSsi|]\}}|tur||qSr%r4r6r%r%r&r9 r3z?PostgresqlClient.reset_master_user_password..Nrr:r;r<r,r-r.r=cSs&i|]\}}|tur|dur||qSrCr4r6r%r%r&r9 r3rrDrrErN)r#reZ"reset_master_user_password_detailsr$rMrFrGrKrLr_rHr7r8rIrr%r1r&r st+$        z+PostgresqlClient.reset_master_user_passwordc sdg}d}d}d}d}gdfddt|D} | rHtd | d|i} d d t| D} t| D]<\} } | d ust| tjrnt| d krntd| dqndd|dt |dt |dt d} dd t| D} |j j |d|j d}|d urt j}|rpt|t jsH|j | |j | ||j|j|j j||| | ||d|||d S|j j||| | ||d|||d Sd S)a Restarts the running database instance node. :param str db_system_id: (required) A unique identifier for the database system. :param oci.psql.models.RestartDbInstanceInDbSystemDetails restart_db_instance_in_db_system_details: (required) Database instance node restart parameters. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. :param str opc_request_id: (optional) The client request ID for tracing. :param str opc_retry_token: (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, `retrytoken` could be expired or invalidated. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. The specifics of the default retry strategy are described `here `__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` :example: Click `here `__ to see an example of how to use restart_db_instance_in_db_system API. rcz1/dbSystems/{dbSystemId}/actions/restartDbInstancer) restart_db_instance_in_db_systemz^https://docs.oracle.com/iaas/api/#/en/postgresql/20220915/DbSystem/RestartDbInstanceInDbSystemr+csg|]}|vr|qSr%r%r/r1r%r&r2K r3zEPostgresqlClient.restart_db_instance_in_db_system..z5restart_db_instance_in_db_system got unknown kwargs: cSsi|]\}}|tur||qSr%r4r6r%r%r&r9T r3zEPostgresqlClient.restart_db_instance_in_db_system..Nrr:r;r<r,r-r.r=cSs&i|]\}}|tur|dur||qSrCr4r6r%r%r&r9a r3rrDrrErN)r#reZ(restart_db_instance_in_db_system_detailsr$rMrFrGrKrLr_rHr7r8rIrr%r1r&r st+$        z1PostgresqlClient.restart_db_instance_in_db_systemc sdg}d}d}d}d}gdfddt|D} | rHtd | d|i} d d t| D} t| D]<\} } | d ust| tjrnt| d krntd| dqndd|dt |dt |dt d} dd t| D} |j j |d|j d}|d urt j}|rpt|t jsH|j | |j | ||j|j|j j||| | ||d|||d S|j j||| | ||d|||d Sd S)a Restore the database system. :param str db_system_id: (required) A unique identifier for the database system. :param oci.psql.models.RestoreDbSystemDetails restore_db_system_details: (required) Database system restore parameters. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. :param str opc_request_id: (optional) The client request ID for tracing. :param str opc_retry_token: (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, `retrytoken` could be expired or invalidated. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. The specifics of the default retry strategy are described `here `__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` :example: Click `here `__ to see an example of how to use restore_db_system API. rcz'/dbSystems/{dbSystemId}/actions/restorer)restore_db_systemzRhttps://docs.oracle.com/iaas/api/#/en/postgresql/20220915/DbSystem/RestoreDbSystemr+csg|]}|vr|qSr%r%r/r1r%r&r2 r3z6PostgresqlClient.restore_db_system..z&restore_db_system got unknown kwargs: cSsi|]\}}|tur||qSr%r4r6r%r%r&r9 r3z6PostgresqlClient.restore_db_system..Nrr:r;r<r,r-r.r=cSs&i|]\}}|tur|dur||qSrCr4r6r%r%r&r9 r3rrDrrErN)r#reZrestore_db_system_detailsr$rMrFrGrKrLr_rHr7r8rIrr%r1r&r st+$        z"PostgresqlClient.restore_db_systemc sdg}d}d}d}d}gdfddt|D} | rHtd | d|i} d d t| D} t| D]<\} } | d ust| tjrnt| d krntd| dqndd|dt |dt d} dd t| D} |j j |d|j d}|d urt j}|r\t|t js2|j | ||j|j|j j||| | |d|d|||d S|j j||| | |d|d|||d Sd S)a Updates the backup. :param str backup_id: (required) A unique identifier for the backup. :param oci.psql.models.UpdateBackupDetails update_backup_details: (required) The information to be updated. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. :param str opc_request_id: (optional) The client request ID for tracing. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. The specifics of the default retry strategy are described `here `__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.psql.models.Backup` :rtype: :class:`~oci.response.Response` :example: Click `here `__ to see an example of how to use update_backup API. r(rsPUT update_backupzMhttps://docs.oracle.com/iaas/api/#/en/postgresql/20220915/Backup/UpdateBackuprvcsg|]}|vr|qSr%r%r/r1r%r&r2,r3z2PostgresqlClient.update_backup..z"update_backup got unknown kwargs: cSsi|]\}}|tur||qSr%r4r6r%r%r&r95r3z2PostgresqlClient.update_backup..Nrr:r;r<r,r-rwcSs&i|]\}}|tur|dur||qSrCr4r6r%r%r&r9Ar3rrDrr rFrGrHrIrJrorrKrLrMry)r#r^Zupdate_backup_detailsr$rMrFrGrKrLr_rHr7r8rIrr%r1r&r st%$      zPostgresqlClient.update_backupc sdg}d}d}d}d}gdfddt|D} | rHtd | d|i} d d t| D} t| D]<\} } | d ust| tjrnt| d krntd| dqndd|dt |dt |dt d} dd t| D} |j j |d|j d}|d urt j}|rrt|t jsH|j | |j | ||j|j|j j||| | |d|d|||d S|j j||| | |d|d|||d Sd S)aB Updates a display name or description of the configuration. :param str configuration_id: (required) A unique identifier for the configuration. :param oci.psql.models.UpdateConfigurationDetails update_configuration_details: (required) Details for updating display name or description for a configuration. :param str opc_retry_token: (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, `retrytoken` could be expired or invalidated. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. :param str opc_request_id: (optional) The client request ID for tracing. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. The specifics of the default retry strategy are described `here `__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.psql.models.Configuration` :rtype: :class:`~oci.response.Response` :example: Click `here `__ to see an example of how to use update_configuration API. r`r{rupdate_configurationz[https://docs.oracle.com/iaas/api/#/en/postgresql/20220915/Configuration/UpdateConfiguration)rrr.r,r-csg|]}|vr|qSr%r%r/r1r%r&r2r3z9PostgresqlClient.update_configuration..z)update_configuration got unknown kwargs: cSsi|]\}}|tur||qSr%r4r6r%r%r&r9r3z9PostgresqlClient.update_configuration..Nrr:r;r<r.r,r-)r>r?rBr@rAcSs&i|]\}}|tur|dur||qSrCr4r6r%r%r&r9r3rrDrmrrrN)r#rbZupdate_configuration_detailsr$rMrFrGrKrLr_rHr7r8rIrr%r1r&rgsx+$        z%PostgresqlClient.update_configurationc sdg}d}d}d}d}gdfddt|D} | rHtd | d|i} d d t| D} t| D]<\} } | d ust| tjrnt| d krntd| dqndd|dt |dt |dt d} dd t| D} |j j |d|j d}|d urt j}|rpt|t jsH|j | |j | ||j|j|j j||| | ||d|||d S|j j||| | ||d|||d Sd S)a Updates the database system. :param str db_system_id: (required) A unique identifier for the database system. :param oci.psql.models.UpdateDbSystemDetails update_db_system_details: (required) The information to be updated. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. :param str opc_request_id: (optional) The client request ID for tracing. :param str opc_retry_token: (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, `retrytoken` could be expired or invalidated. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. The specifics of the default retry strategy are described `here `__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` :example: Click `here `__ to see an example of how to use update_db_system API. rcr~rupdate_db_systemzQhttps://docs.oracle.com/iaas/api/#/en/postgresql/20220915/DbSystem/UpdateDbSystemr+csg|]}|vr|qSr%r%r/r1r%r&r2r3z5PostgresqlClient.update_db_system..z%update_db_system got unknown kwargs: cSsi|]\}}|tur||qSr%r4r6r%r%r&r9r3z5PostgresqlClient.update_db_system..Nrr:r;r<r,r-r.r=cSs&i|]\}}|tur|dur||qSrCr4r6r%r%r&r9,r3rrDrrErN)r#reZupdate_db_system_detailsr$rMrFrGrKrLr_rHr7r8rIrr%r1r&rst+$        z!PostgresqlClient.update_db_systemc sddg}d}d}d}d} gdfdd t|D} | rJtd | ||d } d d t| D} t| D]<\} } | dust| tjrrt| dkrrtd| dqrdd|dt |dt |dt d}dd t|D}|j j |d|j d}|durt j}|rtt|t jsL|j ||j |||j|j|j j||| |||d|| |d S|j j||| |||d|| |d SdS)au Updates the database instance node. :param str db_system_id: (required) A unique identifier for the database system. :param str db_instance_id: (required) A unique identifier for the database instance node. :param oci.psql.models.UpdateDbSystemDbInstanceDetails update_db_system_db_instance_details: (required) Database instance node update parameters. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. :param str opc_request_id: (optional) The client request ID for tracing. :param str opc_retry_token: (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, `retrytoken` could be expired or invalidated. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. The specifics of the default retry strategy are described `here `__. To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. :param bool allow_control_chars: (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` :example: Click `here `__ to see an example of how to use update_db_system_db_instance API. rc dbInstanceIdz2/dbSystems/{dbSystemId}/dbinstances/{dbInstanceId}rupdate_db_system_db_instancez[https://docs.oracle.com/iaas/api/#/en/postgresql/20220915/DbSystem/UpdateDbSystemDbInstancer+csg|]}|vr|qSr%r%r/r1r%r&r2r3zAPostgresqlClient.update_db_system_db_instance..z1update_db_system_db_instance got unknown kwargs: )rcrcSsi|]\}}|tur||qSr%r4r6r%r%r&r9r3zAPostgresqlClient.update_db_system_db_instance..Nrr:r;r<r,r-r.r=cSs&i|]\}}|tur|dur||qSrCr4r6r%r%r&r9r3rrDrrErN)r#reZdb_instance_idZ$update_db_system_db_instance_detailsr$rMrFrGrKrLr_rHr7r8rIrr%r1r&rQsv.$        z-PostgresqlClient.update_db_system_db_instanceN)&__name__ __module__ __qualname____doc__r'r*rardrgrlrqrur|rrrrrrrrrrrrrrrrrrrrrrrrrr%r%r%r&rsV[ttt_aaffftbbbwbbb0(# ktttmvtrN)Z __future__rZ oci._vendorrrZocirrZoci.base_clientrZ oci.configrr Z oci.signerr Zoci.utilr r r Zoci.exceptionsrZ oci.alloyrZmodelsrr5objectrr%r%r%r&s