Tokens API¶
- class cloudify_rest_client.tokens.Token(token)[source]¶
 Bases:
dict- property value¶
 - Returns:
 The value of the token.
- property role¶
 - Returns:
 The role of the user associated with the token.
- property username¶
 - Returns:
 The username associated with the token.
- property description¶
 - Returns:
 The description of the token.
- property expiration_date¶
 - Returns:
 The expiration date of the token.
- property last_used¶
 - Returns:
 The last time the token was used.
- property id¶
 - Returns:
 The ID of the token.
- class cloudify_rest_client.tokens.TokensClient(api)[source]¶
 Bases:
object- list(**kwargs)[source]¶
 Get a list of tokens. :param kwargs: Optional fields or filter arguments as defined in the
restservice.
- get(token_id)[source]¶
 Get details of an existing authentication token. :param token_id: The ID of the token to get.
- Returns:
 Token
- create(description=None, expiration=None)[source]¶
 Create a new authentication token for the current user. :param description: The description of the token. :param expiration: The expiration date of the token.
Can be provided in format YYYY-MM-DD HH:mm or relative to current time, e.g. ‘+10h’ for 10 hours or ‘+30 minutes’ for 30 minutes or ‘+1 day’ for 1 day
- Returns:
 Token