File: seal.rst

package info (click to toggle)
python-hvac 2.3.0-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,800 kB
  • sloc: python: 29,360; makefile: 42; sh: 14
file content (134 lines) | stat: -rw-r--r-- 1,965 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
Seal
====

.. contents::
   :local:
   :depth: 1


Seal Status
-----------

.. autoattribute:: hvac.v1.Client.seal_status
   :noindex:

Examples
````````

.. testcode:: sys_seal

    import hvac
    client = hvac.Client(url='https://127.0.0.1:8200')

    print('Is Vault sealed: %s' % client.seal_status['sealed'])

Example output:

.. testoutput:: sys_seal

    Is Vault sealed: False


Is Sealed
---------

.. automethod:: hvac.api.system_backend.Seal.is_sealed
   :noindex:

Examples
````````

.. testcode:: sys_seal

    import hvac
    client = hvac.Client(url='https://127.0.0.1:8200')

    print('Is Vault sealed: %s' % client.sys.is_sealed())

Example output:

.. testoutput:: sys_seal

    Is Vault sealed: False


Read Seal Status
----------------

.. automethod:: hvac.api.system_backend.Seal.read_seal_status
   :noindex:

Examples
````````

.. testcode:: sys_seal

    import hvac
    client = hvac.Client(url='https://127.0.0.1:8200')

    print('Is Vault sealed: %s' % client.sys.read_seal_status()['sealed'])

Example output:

.. testoutput:: sys_seal

    Is Vault sealed: False


Seal
----

.. automethod:: hvac.api.system_backend.Seal.seal
   :noindex:

Examples
````````

.. testsetup:: sys_seal_seal

    key = manager.keys[0]
    keys = manager.keys[1:]

.. testcode:: sys_seal_seal

    import hvac
    client = hvac.Client(url='https://127.0.0.1:8200')

    client.sys.seal()


Submit Unseal Key
-----------------

.. automethod:: hvac.api.system_backend.Seal.submit_unseal_key
   :noindex:

Examples
````````

.. testcode:: sys_seal_seal

    import hvac
    client = hvac.Client(url='https://127.0.0.1:8200')

    client.sys.submit_unseal_key(key=key)


Submit Unseal Keys
------------------

.. automethod:: hvac.api.system_backend.Seal.submit_unseal_keys
   :noindex:

Examples
````````

.. testcode:: sys_seal_seal

    import hvac
    client = hvac.Client(url='https://127.0.0.1:8200')

    client.sys.submit_unseal_keys(keys=keys)