openstack.key_manager.v1.secret

openstack.key_manager.v1.secret

The Secret Class

The Secret class inherits from Resource.

class openstack.key_manager.v1.secret.Secret(_synchronized=False, connection=None, **attrs)

The base resource

Parameters:
  • _synchronized (bool) – This is not intended to be used directly. See new() and existing().
  • connection (openstack.connection.Connection) – Reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
algorithm

Metadata provided by a user or system for informational purposes

bit_length

Metadata provided by a user or system for informational purposes. Value must be greater than zero.

content_types

A list of content types

expires_at

Once this timestamp has past, the secret will no longer be available.

created_at

Timestamp of when the secret was created.

mode

The type/mode of the algorithm associated with the secret information.

name

The name of the secret set by the user

secret_ref

A URI to the sercret

secret_type

Used to indicate the type of secret being stored.

status

The status of this secret

updated_at

A timestamp when this secret was updated.

payload

The secret’s data to be stored. payload_content_type must also be supplied if payload is included. (optional)

payload_content_type

The media type for the content of the payload. (required if payload is included)

payload_content_encoding

The encoding used for the payload to be able to include it in the JSON request. Currently only base64 is supported. (required if payload is encoded)

fetch(session, requires_id=True, base_path=None, error_message=None)

Get a remote resource based on this instance.

Parameters:
  • session (Adapter) – The session to use for making this request.
  • requires_id (boolean) – A boolean indicating whether resource ID should be part of the requested URI.
  • base_path (str) – Base part of the URI for fetching resources, if different from base_path.
  • error_message (str) – An Error message to be returned if requested object does not exist.
Returns:

This Resource instance.

Raises:

MethodNotSupported if Resource.allow_fetch is not set to True.

Raises:

ResourceNotFound if the resource was not found.

Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.