← Back
Editing: v1.cpython-38.pyc
U UٵgR � @ s� d dl mZ d dlmZ d dlmZ d dlmZ d dlm Z d dl mZmZm Z G dd� de�ZG d d � d ee�Zeed�dd �Zeeed�dd�Zeddeed�Zdddeejdfejdfejdfejdfejdfgddd�ZdS ) � )� exceptions)�APIEndpoint)�AdditionalInfo)�UAConfig)�UAContractClient)� DataObject�Field�StringDataValuec @ s$ e Zd Zededd�gZdd� ZdS )�MagicAttachRevokeOptions�magic_tokenz,The Token provided by the initiate endpoint.)�docc C s || _ d S �N)r )�selfr � r �K/usr/lib/python3/dist-packages/uaclient/api/u/pro/attach/magic/revoke/v1.py�__init__ s z!MagicAttachRevokeOptions.__init__N)�__name__� __module__�__qualname__r r Zfieldsr r r r r r s ��r c @ s e Zd ZdS )�MagicAttachRevokeResultN)r r r r r r r r s r )�options�returnc C s t | t� �S r )�_revoker )r r r r �revoke s r )r �cfgr c C s t |�}|�| j� t� S )z5 This endpoint revokes a Magic Attach Token. )r Zrevoke_magic_attach_tokenr r )r r Zcontractr r r r s r Zv1ZMagicAttachRevoke)�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_pythonZresult_classr Zexample_cliZexample_jsonN)Zuaclient.apir Zuaclient.api.apir Zuaclient.api.data_typesr Zuaclient.configr Zuaclient.contractr Zuaclient.data_typesr r r r r r r ZendpointZConnectivityErrorZContractAPIErrorZ MagicAttachTokenAlreadyActivatedZMagicAttachTokenErrorZMagicAttachUnavailableZ_docr r r r �<module> sR ��������"�
Save File
Cancel