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 – This is not intended to be used directly. See
new()andexisting().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._connectionin Resource code should protect itself with a check for None.
- resources_key = 'secrets'¶
Plural form of key for resource.
- base_path = '/secrets'¶
The base part of the URI for this resource.
- allow_create = True¶
Allow create operation for this resource.
- allow_fetch = True¶
Allow get operation for this resource.
- allow_commit = True¶
Allow update operation for this resource.
- allow_delete = True¶
Allow delete operation for this resource.
- allow_list = True¶
Allow list operation for this resource.
- 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.
- consumers¶
Consumers registered for this secret, as a list of dictionaries with
service,resource_type, andresource_idkeys. Available in API microversion 1.1 and later.
- 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_store_id¶
Computed UUID of the secret store currently holding the payload (microversion 1.3+; JSON null when N/A)
- secret_store_ref¶
Computed HREF of the secret store currently holding the payload (microversion 1.3+; JSON null when N/A)
- 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_payload(session, *, microversion=None)¶
Fetch the secret’s payload.
Uses
payload_content_typeif set, otherwise the default fromcontent_types. If neither is available, no request is made. Fetch the secret’s metadata first to populatecontent_types.- Parameters:
session – The session to use for making this request.
microversion – API microversion to use. Defaults to the negotiated microversion for this resource.
- Returns:
The secret with its payload populated. Text/plain payloads are decoded as UTF-8; other payloads are returned as bytes.
- migrate_store(session, secret_store_id, *, microversion=None)¶
Migrate this secret onto another secret store.
Requires key-manager microversion 1.3. Prefer
migrate_secret_store()which enforces that and accepts UUID/URI/SecretStore.- Parameters:
session – The session to use for making this request.
secret_store_id – Destination store UUID (or trailing path segment of a
…/secret-stores/<uuid>URI).microversion – API microversion to use. Defaults to the negotiated microversion for this resource.
- Returns:
None