HEX
Server: Apache
System: Linux scp1.abinfocom.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: confeduphaar (1010)
PHP: 8.1.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //lib/python3/dist-packages/uaclient/api/u/pro/attach/magic/revoke/__pycache__/v1.cpython-38.pyc
U

��JhR
�
@s�ddlmZddlmZddlmZddlmZddlm	Z	ddl
mZmZm
Z
Gdd�de�ZGd	d
�d
ee�Zeed�dd
�Zeeed�dd�Zeddeed�Zdddeejdfejdfejdfejdfejdfgddd�ZdS) �)�
exceptions)�APIEndpoint)�AdditionalInfo)�UAConfig)�UAContractClient)�
DataObject�Field�StringDataValuec@s$eZdZededd�gZdd�ZdS)�MagicAttachRevokeOptions�magic_tokenz,The Token provided by the initiate endpoint.)�doccCs
||_dS�N)r)�selfr�r�K/usr/lib/python3/dist-packages/uaclient/api/u/pro/attach/magic/revoke/v1.py�__init__sz!MagicAttachRevokeOptions.__init__N)�__name__�
__module__�__qualname__rr	Zfieldsrrrrrr
	s��r
c@seZdZdS)�MagicAttachRevokeResultN)rrrrrrrrsr)�options�returncCst|t��Sr
)�_revoker)rrrr�revokesr)r�cfgrcCst|�}|�|j�t�S)z5
    This endpoint revokes a Magic Attach Token.
    )rZrevoke_magic_attach_tokenrr)rrZcontractrrrrsrZv1ZMagicAttachRevoke)�version�name�fnZoptions_clsz27.11Tz�
from uaclient.api.u.pro.attach.magic.revoke.v1 import MagicAttachRevokeOptions, revoke

options = MagicAttachWaitOptions(magic_token="<magic_token>")
result = revoke(options)
zARaised if it is not possible to connect to the contracts service.zLRaised if there is an unexpected error in the contracts service interaction.zPRaised when trying to revoke a Token which was already activated through the UI.z-Raised when an invalid/expired Token is sent.zHRaised if the Magic Attach service is busy or unavailable at the moment.z?pro api u.pro.attach.magic.revoke.v1 --args magic_token=<token>z
{}
)Z
introduced_inZrequires_networkZexample_pythonZresult_classrZexample_cliZexample_jsonN)Zuaclient.apirZuaclient.api.apirZuaclient.api.data_typesrZuaclient.configrZuaclient.contractrZuaclient.data_typesrrr	r
rrrZendpointZConnectivityErrorZContractAPIErrorZ MagicAttachTokenAlreadyActivatedZMagicAttachTokenErrorZMagicAttachUnavailableZ_docrrrr�<module>sR
��������"�