o
    ɶd_                    @   s   d dl mZ d dlmZ d dlmZ d dlmZmZ d dlm	Z	 d dl
mZmZ d dlmZ d dlmZmZmZ d	d
lmZ edZG dd deZdS )    )absolute_import)requests)six)retrycircuit_breaker)
BaseClient)get_config_value_or_defaultvalidate_config)Signer)Sentinel#get_signer_from_authentication_typeAUTHENTICATION_TYPE_FIELD_NAME   )bastion_type_mappingZMissingc                   @   s   e Zd ZdZdd Zdd Zdd Zdd	 Zd
d Zdd Z	dd Z
dd Zdd Zdd Zdd Zdd Zdd Zdd Zdd Zd d! Zd"S )#BastionClientaP  
    Use the Bastion API to provide restricted and time-limited access to target resources that don't have public endpoints. Bastions let authorized users connect from specific IP addresses to target resources using Secure Shell (SSH) sessions. For more information, see [the Bastion documentation](/iaas/Content/Bastion/home.htm).
    c              
   K   s  t ||dd d|v r|d }n"t|v rt|}nt|d |d |d |dt|d|dd	}d
|dddi |dd|dtj|dd}d|v rY|d|d< |ddu retj|d< d|v rp|d|d< t	d||t
fi || _|d| _|d| _dS )a  
        Creates a new service client

        :param dict config:
            Configuration keys and values as per `SDK and Tool Configuration <https://docs.cloud.oracle.com/Content/API/Concepts/sdkconfig.htm>`__.
            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 <https://docs.cloud.oracle.com/Content/Identity/Tasks/callingservicesfrominstances.htm>`__
            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 <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.

        :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 <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/circuit_breakers.html>`__.

        :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.
        signer)r   tenancyuserfingerprintZkey_filepass_phraseZkey_content)r   r   r   Zprivate_key_file_locationr   Zprivate_key_contentTservice_endpointz	/20210331z0https://bastion.{region}.oci.{secondLevelDomain}skip_deserializationFcircuit_breaker_strategy5client_level_realm_specific_endpoint_template_enabled)Zregional_clientr   	base_pathZservice_endpoint_templateZ#service_endpoint_template_per_realmr   r   r   timeoutNallow_control_charsZbastionretry_strategycircuit_breaker_callback)r	   getr   r   r
   r   r   ZGLOBAL_CIRCUIT_BREAKER_STRATEGYZ DEFAULT_CIRCUIT_BREAKER_STRATEGYr   r   base_clientr   r   )selfconfigkwargsr   Zbase_client_init_kwargs r$   >usr/lib/python3.10/site-packages/oci/bastion/bastion_client.py__init__   s>   3





zBastionClient.__init__c                    sh  dg}d}d}d}d}g d  fddt |D }	|	r$td	|	d|i}
d
d t |
D }
t |
D ]\}}|du sMt|t jrTt| dkrTtd|q7dd|	dt
|	dt
d}dd t |D }| jj|	d| jd}|rt|tjs| j| || j |j| jj|||
|||	d|||d
S | jj|||
|||	d|||d	S )a  
        Moves a bastion into a different compartment.


        :param str bastion_id: (required)
            The unique identifier (OCID) of the bastion.

        :param oci.bastion.models.ChangeBastionCompartmentDetails change_bastion_compartment_details: (required)
            The compartment 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 will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.

            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 <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/bastion/change_bastion_compartment.py.html>`__ to see an example of how to use change_bastion_compartment API.
        	bastionIdz//bastions/{bastionId}/actions/changeCompartmentPOSTchange_bastion_compartmentzWhttps://docs.oracle.com/iaas/api/#/en/bastion/20210331/Bastion/ChangeBastionCompartmentr   r   if_matchopc_request_idc                       g | ]}| vr|qS r$   r$   .0_keyZexpected_kwargsr$   r%   
<listcomp>       z<BastionClient.change_bastion_compartment.<locals>.<listcomp>z3change_bastion_compartment got unknown kwargs: {!r}c                 S      i | ]\}}|t ur||qS r$   missingr/   kvr$   r$   r%   
<dictcomp>       z<BastionClient.change_bastion_compartment.<locals>.<dictcomp>Nr   7Parameter {} cannot be None, whitespace or empty stringapplication/jsonr+   r,   acceptcontent-typezif-matchopc-request-idc                 S   &   i | ]\}}|t ur|d ur||qS Nr5   r7   r$   r$   r%   r:         & r   Zoperation_retry_strategyZclient_retry_strategyr   	resource_pathmethodpath_paramsheader_paramsbodyr   operation_nameapi_reference_linkrequired_argumentsr   iterkeys
ValueErrorformat	iteritems
isinstancestring_typeslenstripr   r6   r    get_preferred_retry_strategyr   r   NoneRetryStrategyadd_opc_client_retries_headeradd_circuit_breaker_callbackr   make_retrying_callcall_api)r!   
bastion_idZ"change_bastion_compartment_detailsr#   rN   rG   rH   rL   rM   extra_kwargsrI   r8   r9   rJ   r   r$   r1   r%   r)   r   sn   ($

z(BastionClient.change_bastion_compartmentc                      g }d}d}d}d}g d  fddt |D }|r#td|d	d	|d
t|dtd}	dd t |	D }	| jj|d| j	d}
|
rvt
|
tjsb| j|	 | j|	 |
| j |
j| jj|||	|d|d|||d
S | jj|||	|d|d|||d	S )as	  
        Creates a new bastion. A bastion provides secured, public access to target resources in the cloud that you cannot otherwise reach from the internet. A bastion resides in a public subnet and establishes the network infrastructure needed to connect a user to a target resource in a private subnet.


        :param oci.bastion.models.CreateBastionDetails create_bastion_details: (required)
            Details for the new bastion.

        :param str opc_retry_token: (optional)
            A token that uniquely identifies a request so it can be retried in case of a timeout or
            server error without risk of executing that same action again. Retry tokens expire after 24
            hours, but can be invalidated before then due to conflicting operations. For example, if a resource
            has been deleted and purged from the system, then a retry of the original creation request
            might be rejected.

        :param str opc_request_id: (optional)
            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 will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.

            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.bastion.models.Bastion`
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/bastion/create_bastion.py.html>`__ to see an example of how to use create_bastion API.
        	/bastionsr(   create_bastionzLhttps://docs.oracle.com/iaas/api/#/en/bastion/20210331/Bastion/CreateBastionr   r   opc_retry_tokenr,   c                    r-   r$   r$   r.   r1   r$   r%   r2     r3   z0BastionClient.create_bastion.<locals>.<listcomp>z'create_bastion got unknown kwargs: {!r}r=   rd   r,   r?   r@   zopc-retry-tokenrA   c                 S   rB   rC   r5   r7   r$   r$   r%   r:     rD   z0BastionClient.create_bastion.<locals>.<dictcomp>r   rE   Bastionr   	rG   rH   rJ   rK   response_typer   rL   rM   rN   r   rP   rQ   rR   r   r6   rS   r    rX   r   rT   r   rY   Zadd_opc_retry_token_if_neededrZ   r[   r   r\   r]   )r!   Zcreate_bastion_detailsr#   rN   rG   rH   rL   rM   r_   rJ   r   r$   r1   r%   rb      b   %

zBastionClient.create_bastionc                    r`   )a	  
        Creates a new session in a bastion. A bastion session lets authorized users connect to a target resource for a predetermined amount of time. The Bastion service recognizes two types of sessions, managed SSH sessions and SSH port forwarding sessions. Managed SSH sessions require that the target resource has an OpenSSH server and the Oracle Cloud Agent both running.


        :param oci.bastion.models.CreateSessionDetails create_session_details: (required)
            Details for the new session.

        :param str opc_retry_token: (optional)
            A token that uniquely identifies a request so it can be retried in case of a timeout or
            server error without risk of executing that same action again. Retry tokens expire after 24
            hours, but can be invalidated before then due to conflicting operations. For example, if a resource
            has been deleted and purged from the system, then a retry of the original creation request
            might be rejected.

        :param str opc_request_id: (optional)
            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 will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.

            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.bastion.models.Session`
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/bastion/create_session.py.html>`__ to see an example of how to use create_session API.
        	/sessionsr(   create_sessionzLhttps://docs.oracle.com/iaas/api/#/en/bastion/20210331/Session/CreateSessionrc   c                    r-   r$   r$   r.   r1   r$   r%   r2   p  r3   z0BastionClient.create_session.<locals>.<listcomp>z'create_session got unknown kwargs: {!r}r=   rd   r,   re   c                 S   rB   rC   r5   r7   r$   r$   r%   r:   {  rD   z0BastionClient.create_session.<locals>.<dictcomp>r   rE   Sessionr   rg   ri   )r!   Zcreate_session_detailsr#   rN   rG   rH   rL   rM   r_   rJ   r   r$   r1   r%   rl   >  rj   zBastionClient.create_sessionc                    d  dg}d}d}d}d}g d  fddt |D }|r$td	|d|i}	d
d t |	D }	t |	D ]\}
}|du sMt|t jrTt| dkrTtd|
q7dd|	dt
|	dt
d}dd t |D }| jj|	d| jd}|rt|tjs| j| || j |j| jj|||	||	d|||d	S | jj|||	||	d|||dS )a  
        Deletes a bastion identified by the bastion ID.


        :param str bastion_id: (required)
            The unique identifier (OCID) of the bastion.

        :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 will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.

            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 <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/bastion/delete_bastion.py.html>`__ to see an example of how to use delete_bastion API.
        r'   /bastions/{bastionId}DELETEdelete_bastionzLhttps://docs.oracle.com/iaas/api/#/en/bastion/20210331/Bastion/DeleteBastionr*   c                    r-   r$   r$   r.   r1   r$   r%   r2     r3   z0BastionClient.delete_bastion.<locals>.<listcomp>z'delete_bastion got unknown kwargs: {!r}c                 S   r4   r$   r5   r7   r$   r$   r%   r:     r;   z0BastionClient.delete_bastion.<locals>.<dictcomp>Nr   r<   r=   r+   r,   r>   c                 S   rB   rC   r5   r7   r$   r$   r%   r:     rD   r   rE   r   rG   rH   rI   rJ   r   rL   rM   rN   rO   r!   r^   r#   rN   rG   rH   rL   rM   r_   rI   r8   r9   rJ   r   r$   r1   r%   rq     j   %$

zBastionClient.delete_bastionc                    rn   )a  
        Deletes a session identified by the session ID.


        :param str session_id: (required)
            The unique identifier (OCID) of the session.

        :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 will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.

            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 <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/bastion/delete_session.py.html>`__ to see an example of how to use delete_session API.
        	sessionId/sessions/{sessionId}rp   delete_sessionzLhttps://docs.oracle.com/iaas/api/#/en/bastion/20210331/Session/DeleteSessionr*   c                    r-   r$   r$   r.   r1   r$   r%   r2   7  r3   z0BastionClient.delete_session.<locals>.<listcomp>z'delete_session got unknown kwargs: {!r}c                 S   r4   r$   r5   r7   r$   r$   r%   r:   @  r;   z0BastionClient.delete_session.<locals>.<dictcomp>Nr   r<   r=   r+   r,   r>   c                 S   rB   rC   r5   r7   r$   r$   r%   r:   L  rD   r   rE   r   rr   rO   r!   
session_idr#   rN   rG   rH   rL   rM   r_   rI   r8   r9   rJ   r   r$   r1   r%   rw     rt   zBastionClient.delete_sessionc                    l  dg}d}d}d}d}g d  fddt |D }|r$td	|d|i}	d
d t |	D }	t |	D ]\}
}|du sMt|t jrTt| dkrTtd|
q7dd|	dt
d}dd t |D }| jj|	d| jd}|du r|tj}|rt|tjs| j| || j |j| jj|||	|d|	d|||d
S | jj|||	|d|	d|||d	S )a  
        Retrieves a bastion identified by the bastion ID. A bastion provides secured, public access to target resources in the cloud that you cannot otherwise reach from the internet.


        :param str bastion_id: (required)
            The unique identifier (OCID) of the bastion.

        :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 <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.

            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.bastion.models.Bastion`
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/bastion/get_bastion.py.html>`__ to see an example of how to use get_bastion API.
        r'   ro   GETget_bastionzIhttps://docs.oracle.com/iaas/api/#/en/bastion/20210331/Bastion/GetBastionr   r   r,   c                    r-   r$   r$   r.   r1   r$   r%   r2     r3   z-BastionClient.get_bastion.<locals>.<listcomp>z$get_bastion got unknown kwargs: {!r}c                 S   r4   r$   r5   r7   r$   r$   r%   r:     r;   z-BastionClient.get_bastion.<locals>.<dictcomp>Nr   r<   r=   r,   r?   r@   rA   c                 S   rB   rC   r5   r7   r$   r$   r%   r:     rD   r   rE   rf   r   	rG   rH   rI   rJ   rh   r   rL   rM   rN   r   rP   rQ   rR   rS   rT   rU   rV   rW   r   r6   r    rX   r   r   ZDEFAULT_RETRY_STRATEGYrY   rZ   r[   r   r\   r]   rs   r$   r1   r%   r|   l  p   $
zBastionClient.get_bastionc                    rz   )a  
        Retrieves a session identified by the session ID. A bastion session lets authorized users connect to a target resource for a predetermined amount of time.


        :param str session_id: (required)
            The unique identifier (OCID) of the session.

        :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 <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.

            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.bastion.models.Session`
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/bastion/get_session.py.html>`__ to see an example of how to use get_session API.
        ru   rv   r{   get_sessionzIhttps://docs.oracle.com/iaas/api/#/en/bastion/20210331/Session/GetSessionr}   c                    r-   r$   r$   r.   r1   r$   r%   r2     r3   z-BastionClient.get_session.<locals>.<listcomp>z$get_session got unknown kwargs: {!r}c                 S   r4   r$   r5   r7   r$   r$   r%   r:     r;   z-BastionClient.get_session.<locals>.<dictcomp>Nr   r<   r=   r,   r~   c                 S   rB   rC   r5   r7   r$   r$   r%   r:     rD   r   rE   rm   r   r   r   rx   r$   r1   r%   r     r   zBastionClient.get_sessionc                    s^  dg}d}d}d}d}g d  fddt |D }|r$td	|d|i}	d
d t |	D }	t |	D ]\}
}|du sMt|t jrTt| dkrTtd|
q7dd|	dt
d}dd t |D }| jj|	d| jd}|rt|tjs| j| || j |j| jj|||	|d|	d|||d
S | jj|||	|d|	d|||d	S )a  
        Gets the status of the work request with the given ID.


        :param str work_request_id: (required)
            The unique identifier (OCID) 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 will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.

            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.bastion.models.WorkRequest`
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/bastion/get_work_request.py.html>`__ to see an example of how to use get_work_request API.
        workRequestIdz/workRequests/{workRequestId}r{   get_work_requestzQhttps://docs.oracle.com/iaas/api/#/en/bastion/20210331/WorkRequest/GetWorkRequestr}   c                    r-   r$   r$   r.   r1   r$   r%   r2   Z  r3   z2BastionClient.get_work_request.<locals>.<listcomp>z)get_work_request got unknown kwargs: {!r}c                 S   r4   r$   r5   r7   r$   r$   r%   r:   c  r;   z2BastionClient.get_work_request.<locals>.<dictcomp>Nr   r<   r=   r,   r~   c                 S   rB   rC   r5   r7   r$   r$   r%   r:   n  rD   r   rE   ZWorkRequestr   r   rO   )r!   work_request_idr#   rN   rG   rH   rL   rM   r_   rI   r8   r9   rJ   r   r$   r1   r%   r   0  sl   $
zBastionClient.get_work_requestc                    s  dg}d}d}d}d}g d  fddt |D }|r$td	|d
|v r9g d}	|d
 |	vr9td|	d|v rNddg}
|d |
vrNtd|
d|v rcddg}|d |vrctd|||d
t|dt|dt|dt|dt|dt|dtd}dd t |D }dd|dtd}dd t |D }| jj|d| j	d }|rt
|tjs| j| || j |j| jj||||d!|d"|||d#
S | jj||||d!|d"|||d#	S )$a  
        Retrieves a list of BastionSummary objects in a compartment. Bastions provide secured, public access to target resources in the cloud that you cannot otherwise reach from the internet.


        :param str compartment_id: (required)
            The unique identifier (OCID) of the compartment in which to list resources.

        :param str opc_request_id: (optional)
            The client request ID for tracing.

        :param str bastion_lifecycle_state: (optional)
            A filter to return only resources their lifecycleState matches the given lifecycleState.

            Allowed values are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED"

        :param str bastion_id: (optional)
            The unique identifier (OCID) of the bastion in which to list resources.

        :param str name: (optional)
            A filter to return only resources that match the entire name given.

        :param int limit: (optional)
            The maximum number of items to return.

        :param str page: (optional)
            The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.

        :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 name is ascending. If no value is specified timeCreated is default.

            Allowed values are: "timeCreated", "name"

        :param obj retry_strategy: (optional)
            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.

            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 list of :class:`~oci.bastion.models.BastionSummary`
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/bastion/list_bastions.py.html>`__ to see an example of how to use list_bastions API.
        compartmentIdra   r{   list_bastionszKhttps://docs.oracle.com/iaas/api/#/en/bastion/20210331/Bastion/ListBastions)
r   r   r,   bastion_lifecycle_stater^   namelimitpage
sort_ordersort_byc                    r-   r$   r$   r.   r1   r$   r%   r2     r3   z/BastionClient.list_bastions.<locals>.<listcomp>z&list_bastions got unknown kwargs: {!r}r   )CREATINGZUPDATINGACTIVEDELETINGDELETEDFAILEDz?Invalid value for `bastion_lifecycle_state`, must be one of {0}r   ASCDESC2Invalid value for `sort_order`, must be one of {0}r   timeCreatedr   /Invalid value for `sort_by`, must be one of {0}r^   r   r   )r   ZbastionLifecycleStater'   r   r   r   	sortOrdersortByc                 S   rB   rC   r5   r7   r$   r$   r%   r:      rD   z/BastionClient.list_bastions.<locals>.<dictcomp>r=   r,   r~   c                 S   rB   rC   r5   r7   r$   r$   r%   r:     rD   r   rE   zlist[BastionSummary]r   	rG   rH   query_paramsrJ   rh   r   rL   rM   rN   r   rP   rQ   rR   r   r6   rS   r    rX   r   rT   r   rY   rZ   r[   r   r\   r]   )r!   compartment_idr#   rN   rG   rH   rL   rM   r_   Z&bastion_lifecycle_state_allowed_valuessort_order_allowed_valuessort_by_allowed_valuesr   rJ   r   r$   r1   r%   r     s   9








zBastionClient.list_bastionsc                    s  dg}d}d}d}d}g d  fddt |D }|r$td	|d
|v r9g d}	|d
 |	vr9td|	d|v rNddg}
|d |
vrNtd|
d|v rcddg}|d |vrctd||dt||d
t|dt|dt|dt|dt|dtd}dd t |D }dd|dtd}dd t |D }| jj|d | j	d!}|rt
|tjs| j| || j |j| jj||||d"|d#|||d$
S | jj||||d"|d#|||d$	S )%a  
        Retrieves a list of SessionSummary objects for an existing bastion. Bastion sessions let authorized users connect to a target resource for a predetermined amount of time.


        :param str bastion_id: (required)
            The unique identifier (OCID) of the bastion in which to list sessions.

        :param str opc_request_id: (optional)
            The client request ID for tracing.

        :param str display_name: (optional)
            A filter to return only resources that match the entire display name given.

        :param str session_lifecycle_state: (optional)
            A filter to return only resources their lifecycleState matches the given lifecycleState.

            Allowed values are: "CREATING", "ACTIVE", "DELETING", "DELETED", "FAILED"

        :param str session_id: (optional)
            The unique identifier (OCID) of the session in which to list resources.

        :param int limit: (optional)
            The maximum number of items to return.

        :param str page: (optional)
            The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.

        :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. If no value is specified timeCreated is default.

            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 will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.

            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 list of :class:`~oci.bastion.models.SessionSummary`
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/bastion/list_sessions.py.html>`__ to see an example of how to use list_sessions API.
        r'   rk   r{   list_sessionszKhttps://docs.oracle.com/iaas/api/#/en/bastion/20210331/Session/ListSessions)
r   r   r,   display_namesession_lifecycle_statery   r   r   r   r   c                    r-   r$   r$   r.   r1   r$   r%   r2   u  r3   z/BastionClient.list_sessions.<locals>.<listcomp>z&list_sessions got unknown kwargs: {!r}r   )r   r   r   r   r   z?Invalid value for `session_lifecycle_state`, must be one of {0}r   r   r   r   r   r   displayNamer   r   ry   r   r   )r   r'   ZsessionLifecycleStateru   r   r   r   r   c                 S   rB   rC   r5   r7   r$   r$   r%   r:     rD   z/BastionClient.list_sessions.<locals>.<dictcomp>r=   r,   r~   c                 S   rB   rC   r5   r7   r$   r$   r%   r:     rD   r   rE   zlist[SessionSummary]r   r   r   )r!   r^   r#   rN   rG   rH   rL   rM   r_   Z&session_lifecycle_state_allowed_valuesr   r   r   rJ   r   r$   r1   r%   r   )  s   9








zBastionClient.list_sessionsc                      dg}d}d}d}d}g d  fddt |D }|r$td	|d|i}	d
d t |	D }	t |	D ]\}
}|du sMt|t jrTt| dkrTtd|
q7|	dt
|	dt
d}dd t |D }dd|	dt
d}dd t |D }| jj|	d| jd}|rt|tjs| j| || j |j| jj|||	||d|	d|||dS | jj|||	||d|	d|||d
S )a  
        Return a (paginated) list of errors for a given work request.


        :param str work_request_id: (required)
            The unique identifier (OCID) of the asynchronous request.

        :param str opc_request_id: (optional)
            The client request ID for tracing.

        :param str page: (optional)
            The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.

        :param int limit: (optional)
            The maximum number of items to return.

        :param obj retry_strategy: (optional)
            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.

            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 list of :class:`~oci.bastion.models.WorkRequestError`
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/bastion/list_work_request_errors.py.html>`__ to see an example of how to use list_work_request_errors API.
        r   z$/workRequests/{workRequestId}/errorsr{   list_work_request_errorsz]https://docs.oracle.com/iaas/api/#/en/bastion/20210331/WorkRequestError/ListWorkRequestErrorsr   r   r,   r   r   c                    r-   r$   r$   r.   r1   r$   r%   r2     r3   z:BastionClient.list_work_request_errors.<locals>.<listcomp>z1list_work_request_errors got unknown kwargs: {!r}c                 S   r4   r$   r5   r7   r$   r$   r%   r:     r;   z:BastionClient.list_work_request_errors.<locals>.<dictcomp>Nr   r<   r   r   r   r   c                 S   rB   rC   r5   r7   r$   r$   r%   r:     rD   r=   r,   r~   c                 S   rB   rC   r5   r7   r$   r$   r%   r:     rD   r   rE   zlist[WorkRequestError]r   
rG   rH   rI   r   rJ   rh   r   rL   rM   rN   rO   r!   r   r#   rN   rG   rH   rL   rM   r_   rI   r8   r9   r   rJ   r   r$   r1   r%   r     x   $$


z&BastionClient.list_work_request_errorsc                    r   )a  
        Return a (paginated) list of logs for a given work request.


        :param str work_request_id: (required)
            The unique identifier (OCID) of the asynchronous request.

        :param str opc_request_id: (optional)
            The client request ID for tracing.

        :param str page: (optional)
            The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.

        :param int limit: (optional)
            The maximum number of items to return.

        :param obj retry_strategy: (optional)
            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.

            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 list of :class:`~oci.bastion.models.WorkRequestLogEntry`
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/bastion/list_work_request_logs.py.html>`__ to see an example of how to use list_work_request_logs API.
        r   z"/workRequests/{workRequestId}/logsr{   list_work_request_logsz^https://docs.oracle.com/iaas/api/#/en/bastion/20210331/WorkRequestLogEntry/ListWorkRequestLogsr   c                    r-   r$   r$   r.   r1   r$   r%   r2   d  r3   z8BastionClient.list_work_request_logs.<locals>.<listcomp>z/list_work_request_logs got unknown kwargs: {!r}c                 S   r4   r$   r5   r7   r$   r$   r%   r:   m  r;   z8BastionClient.list_work_request_logs.<locals>.<dictcomp>Nr   r<   r   r   r   c                 S   rB   rC   r5   r7   r$   r$   r%   r:   w  rD   r=   r,   r~   c                 S   rB   rC   r5   r7   r$   r$   r%   r:   ~  rD   r   rE   zlist[WorkRequestLogEntry]r   r   rO   r   r$   r1   r%   r   2  r   z$BastionClient.list_work_request_logsc                    s,  dg}d}d}d}d}g d  fddt |D }|r$td	|||d
t|dtd}	dd t |	D }	dd|dtd}
dd t |
D }
| jj|d| j	d}|rt
|tjsp| j|
 || j |j| jj|||	|
d|d|||d
S | jj|||	|
d|d|||d	S )a  
        Lists the work requests in a compartment.


        :param str compartment_id: (required)
            The unique identifier (OCID) of the compartment in which to list resources.

        :param str opc_request_id: (optional)
            The client request ID for tracing.

        :param str page: (optional)
            The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.

        :param int limit: (optional)
            The maximum number of items to return.

        :param obj retry_strategy: (optional)
            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.

            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 list of :class:`~oci.bastion.models.WorkRequestSummary`
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/bastion/list_work_requests.py.html>`__ to see an example of how to use list_work_requests API.
        r   z/workRequestsr{   list_work_requestszShttps://docs.oracle.com/iaas/api/#/en/bastion/20210331/WorkRequest/ListWorkRequestsr   c                    r-   r$   r$   r.   r1   r$   r%   r2     r3   z4BastionClient.list_work_requests.<locals>.<listcomp>z+list_work_requests got unknown kwargs: {!r}r   r   )r   r   r   c                 S   rB   rC   r5   r7   r$   r$   r%   r:     rD   z4BastionClient.list_work_requests.<locals>.<dictcomp>r=   r,   r~   c                 S   rB   rC   r5   r7   r$   r$   r%   r:     rD   r   rE   zlist[WorkRequestSummary]r   r   r   )r!   r   r#   rN   rG   rH   rL   rM   r_   r   rJ   r   r$   r1   r%   r     sh   $


z BastionClient.list_work_requestsc                    sv  dg}d}d}d}d}g d  fddt |D }	|	r$td	|	d|i}
d
d t |
D }
t |
D ]\}}|du sMt|t jrTt| dkrTtd|q7dd|	dt
|	dt
d}dd t |D }| jj|	d| jd}|du rtj}|rt|tjs| j| || j |j| jj|||
|||	d|||d
S | jj|||
|||	d|||d	S )a  
        Updates the bastion identified by the bastion ID. A bastion provides secured, public access to target resources in the cloud that you cannot otherwise reach from the internet.


        :param str bastion_id: (required)
            The unique identifier (OCID) of the bastion.

        :param oci.bastion.models.UpdateBastionDetails update_bastion_details: (required)
            The bastion 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 <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.

            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 <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/bastion/update_bastion.py.html>`__ to see an example of how to use update_bastion API.
        r'   ro   PUTupdate_bastionzLhttps://docs.oracle.com/iaas/api/#/en/bastion/20210331/Bastion/UpdateBastionr*   c                    r-   r$   r$   r.   r1   r$   r%   r2   <  r3   z0BastionClient.update_bastion.<locals>.<listcomp>z'update_bastion got unknown kwargs: {!r}c                 S   r4   r$   r5   r7   r$   r$   r%   r:   E  r;   z0BastionClient.update_bastion.<locals>.<dictcomp>Nr   r<   r=   r+   r,   r>   c                 S   rB   rC   r5   r7   r$   r$   r%   r:   Q  rD   r   rE   r   rF   r   )r!   r^   Zupdate_bastion_detailsr#   rN   rG   rH   rL   rM   r_   rI   r8   r9   rJ   r   r$   r1   r%   r     sr   ($

zBastionClient.update_bastionc                    sz  dg}d}d}d}d}g d  fddt |D }	|	r$td	|	d|i}
d
d t |
D }
t |
D ]\}}|du sMt|t jrTt| dkrTtd|q7dd|	dt
|	dt
d}dd t |D }| jj|	d| jd}|du rtj}|rt|tjs| j| || j |j| jj|||
||d|	d|||dS | jj|||
||d|	d|||d
S )a  
        Updates the session identified by the session ID. A bastion session lets authorized users connect to a target resource for a predetermined amount of time.


        :param str session_id: (required)
            The unique identifier (OCID) of the session.

        :param oci.bastion.models.UpdateSessionDetails update_session_details: (required)
            The session 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 <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.

            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.bastion.models.Session`
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/bastion/update_session.py.html>`__ to see an example of how to use update_session API.
        ru   rv   r   update_sessionzLhttps://docs.oracle.com/iaas/api/#/en/bastion/20210331/Session/UpdateSessionr*   c                    r-   r$   r$   r.   r1   r$   r%   r2     r3   z0BastionClient.update_session.<locals>.<listcomp>z'update_session got unknown kwargs: {!r}c                 S   r4   r$   r5   r7   r$   r$   r%   r:     r;   z0BastionClient.update_session.<locals>.<dictcomp>Nr   r<   r=   r+   r,   r>   c                 S   rB   rC   r5   r7   r$   r$   r%   r:     rD   r   rE   rm   r   )
rG   rH   rI   rJ   rK   rh   r   rL   rM   rN   r   )r!   ry   Zupdate_session_detailsr#   rN   rG   rH   rL   rM   r_   rI   r8   r9   rJ   r   r$   r1   r%   r   u  sv   ($

zBastionClient.update_sessionN)__name__
__module____qualname____doc__r&   r)   rb   rl   rq   rw   r|   r   r   r   r   r   r   r   r   r   r$   r$   r$   r%   r      s(    Xl``ggbb`  ppenr   N)
__future__r   Zoci._vendorr   r   ocir   r   Zoci.base_clientr   Z
oci.configr   r	   Z
oci.signerr
   Zoci.utilr   r   r   Zmodelsr   r6   objectr   r$   r$   r$   r%   <module>   s   