Undocumented
Method | create |
Create a secret |
Method | inspect |
Retrieve secret metadata |
Method | remove |
Remove a secret |
Method | secrets |
List secrets |
def create_secret(self, name, data, labels=None, driver=None): (source) ¶
Create a secret Args: name (string): Name of the secret data (bytes): Secret data to be stored labels (dict): A mapping of labels to assign to the secret driver (DriverConfig): A custom driver configuration. If unspecified, the default ``internal`` driver will be used Returns (dict): ID of the newly created secret
Retrieve secret metadata Args: id (string): Full ID of the secret to inspect Returns (dict): A dictionary of metadata Raises: :py:class:`docker.errors.NotFound` if no secret with that ID exists
Remove a secret Args: id (string): Full ID of the secret to remove Returns (boolean): True if successful Raises: :py:class:`docker.errors.NotFound` if no secret with that ID exists