@@ -58,6 +58,7 @@ class KeyManagementServiceClient(object):
58
58
- ``KeyRing``
59
59
- ``CryptoKey``
60
60
- ``CryptoKeyVersion``
61
+ - ``ImportJob``
61
62
62
63
If you are using manual gRPC libraries, see `Using gRPC with Cloud
63
64
KMS <https://cloud.google.com/kms/docs/grpc>`__.
@@ -312,8 +313,12 @@ def list_key_rings(
312
313
streaming is performed per-page, this determines the maximum number
313
314
of resources in a page.
314
315
filter_ (str): Optional. Only include resources that match the filter in the response.
315
- order_by (str): Optional. Specify how the results should be sorted. If not specified, the
316
- results will be sorted in the default order.
316
+ For more information, see `Sorting and filtering list
317
+ results <https://cloud.google.com/kms/docs/sorting-and-filtering>`__.
318
+ order_by (str): Optional. Specify how the results should be sorted. If not specified,
319
+ the results will be sorted in the default order. For more information,
320
+ see `Sorting and filtering list
321
+ results <https://cloud.google.com/kms/docs/sorting-and-filtering>`__.
317
322
retry (Optional[google.api_core.retry.Retry]): A retry object used
318
323
to retry requests. If ``None`` is specified, requests will
319
324
be retried using a default configuration.
@@ -421,8 +426,12 @@ def list_import_jobs(
421
426
streaming is performed per-page, this determines the maximum number
422
427
of resources in a page.
423
428
filter_ (str): Optional. Only include resources that match the filter in the response.
424
- order_by (str): Optional. Specify how the results should be sorted. If not specified, the
425
- results will be sorted in the default order.
429
+ For more information, see `Sorting and filtering list
430
+ results <https://cloud.google.com/kms/docs/sorting-and-filtering>`__.
431
+ order_by (str): Optional. Specify how the results should be sorted. If not specified,
432
+ the results will be sorted in the default order. For more information,
433
+ see `Sorting and filtering list
434
+ results <https://cloud.google.com/kms/docs/sorting-and-filtering>`__.
426
435
retry (Optional[google.api_core.retry.Retry]): A retry object used
427
436
to retry requests. If ``None`` is specified, requests will
428
437
be retried using a default configuration.
@@ -532,8 +541,12 @@ def list_crypto_keys(
532
541
of resources in a page.
533
542
version_view (~google.cloud.kms_v1.types.CryptoKeyVersionView): The fields of the primary version to include in the response.
534
543
filter_ (str): Optional. Only include resources that match the filter in the response.
535
- order_by (str): Optional. Specify how the results should be sorted. If not specified, the
536
- results will be sorted in the default order.
544
+ For more information, see `Sorting and filtering list
545
+ results <https://cloud.google.com/kms/docs/sorting-and-filtering>`__.
546
+ order_by (str): Optional. Specify how the results should be sorted. If not specified,
547
+ the results will be sorted in the default order. For more information,
548
+ see `Sorting and filtering list
549
+ results <https://cloud.google.com/kms/docs/sorting-and-filtering>`__.
537
550
retry (Optional[google.api_core.retry.Retry]): A retry object used
538
551
to retry requests. If ``None`` is specified, requests will
539
552
be retried using a default configuration.
@@ -647,8 +660,12 @@ def list_crypto_key_versions(
647
660
of resources in a page.
648
661
view (~google.cloud.kms_v1.types.CryptoKeyVersionView): The fields to include in the response.
649
662
filter_ (str): Optional. Only include resources that match the filter in the response.
650
- order_by (str): Optional. Specify how the results should be sorted. If not specified, the
651
- results will be sorted in the default order.
663
+ For more information, see `Sorting and filtering list
664
+ results <https://cloud.google.com/kms/docs/sorting-and-filtering>`__.
665
+ order_by (str): Optional. Specify how the results should be sorted. If not specified,
666
+ the results will be sorted in the default order. For more information,
667
+ see `Sorting and filtering list
668
+ results <https://cloud.google.com/kms/docs/sorting-and-filtering>`__.
652
669
retry (Optional[google.api_core.retry.Retry]): A retry object used
653
670
to retry requests. If ``None`` is specified, requests will
654
671
be retried using a default configuration.
@@ -737,7 +754,7 @@ def get_key_ring(
737
754
>>> response = client.get_key_ring(name)
738
755
739
756
Args:
740
- name (str): The ``name`` of the ``KeyRing`` to get.
757
+ name (str): Required. The ``name`` of the ``KeyRing`` to get.
741
758
retry (Optional[google.api_core.retry.Retry]): A retry object used
742
759
to retry requests. If ``None`` is specified, requests will
743
760
be retried using a default configuration.
@@ -806,7 +823,7 @@ def get_import_job(
806
823
>>> response = client.get_import_job(name)
807
824
808
825
Args:
809
- name (str): The ``name`` of the ``ImportJob`` to get.
826
+ name (str): Required. The ``name`` of the ``ImportJob`` to get.
810
827
retry (Optional[google.api_core.retry.Retry]): A retry object used
811
828
to retry requests. If ``None`` is specified, requests will
812
829
be retried using a default configuration.
@@ -876,7 +893,7 @@ def get_crypto_key(
876
893
>>> response = client.get_crypto_key(name)
877
894
878
895
Args:
879
- name (str): The ``name`` of the ``CryptoKey`` to get.
896
+ name (str): Required. The ``name`` of the ``CryptoKey`` to get.
880
897
retry (Optional[google.api_core.retry.Retry]): A retry object used
881
898
to retry requests. If ``None`` is specified, requests will
882
899
be retried using a default configuration.
@@ -945,7 +962,7 @@ def get_crypto_key_version(
945
962
>>> response = client.get_crypto_key_version(name)
946
963
947
964
Args:
948
- name (str): The ``name`` of the ``CryptoKeyVersion`` to get.
965
+ name (str): Required. The ``name`` of the ``CryptoKeyVersion`` to get.
949
966
retry (Optional[google.api_core.retry.Retry]): A retry object used
950
967
to retry requests. If ``None`` is specified, requests will
951
968
be retried using a default configuration.
@@ -1026,7 +1043,7 @@ def create_key_ring(
1026
1043
``KeyRings``, in the format ``projects/*/locations/*``.
1027
1044
key_ring_id (str): Required. It must be unique within a location and match the regular
1028
1045
expression ``[a-zA-Z0-9_-]{1,63}``
1029
- key_ring (Union[dict, ~google.cloud.kms_v1.types.KeyRing]): A ``KeyRing`` with initial field values.
1046
+ key_ring (Union[dict, ~google.cloud.kms_v1.types.KeyRing]): Required. A ``KeyRing`` with initial field values.
1030
1047
1031
1048
If a dict is provided, it must be of the same form as the protobuf
1032
1049
message :class:`~google.cloud.kms_v1.types.KeyRing`
@@ -1205,7 +1222,7 @@ def create_crypto_key(
1205
1222
``CryptoKeys``.
1206
1223
crypto_key_id (str): Required. It must be unique within a KeyRing and match the regular
1207
1224
expression ``[a-zA-Z0-9_-]{1,63}``
1208
- crypto_key (Union[dict, ~google.cloud.kms_v1.types.CryptoKey]): A ``CryptoKey`` with initial field values.
1225
+ crypto_key (Union[dict, ~google.cloud.kms_v1.types.CryptoKey]): Required. A ``CryptoKey`` with initial field values.
1209
1226
1210
1227
If a dict is provided, it must be of the same form as the protobuf
1211
1228
message :class:`~google.cloud.kms_v1.types.CryptoKey`
@@ -1294,7 +1311,7 @@ def create_crypto_key_version(
1294
1311
Args:
1295
1312
parent (str): Required. The ``name`` of the ``CryptoKey`` associated with the
1296
1313
``CryptoKeyVersions``.
1297
- crypto_key_version (Union[dict, ~google.cloud.kms_v1.types.CryptoKeyVersion]): A ``CryptoKeyVersion`` with initial field values.
1314
+ crypto_key_version (Union[dict, ~google.cloud.kms_v1.types.CryptoKeyVersion]): Required. A ``CryptoKeyVersion`` with initial field values.
1298
1315
1299
1316
If a dict is provided, it must be of the same form as the protobuf
1300
1317
message :class:`~google.cloud.kms_v1.types.CryptoKeyVersion`
@@ -1405,6 +1422,11 @@ def import_crypto_key_version(
1405
1422
</li>
1406
1423
</ol>
1407
1424
1425
+ If importing symmetric key material, it is expected that the unwrapped
1426
+ key contains plain bytes. If importing asymmetric key material, it is
1427
+ expected that the unwrapped key is in PKCS#8-encoded DER format (the
1428
+ PrivateKeyInfo structure from RFC 5208).
1429
+
1408
1430
This format is the same as the format produced by PKCS#11 mechanism
1409
1431
CKM\_RSA\_AES\_KEY\_WRAP.
1410
1432
retry (Optional[google.api_core.retry.Retry]): A retry object used
@@ -1491,11 +1513,11 @@ def update_crypto_key(
1491
1513
>>> response = client.update_crypto_key(crypto_key, update_mask)
1492
1514
1493
1515
Args:
1494
- crypto_key (Union[dict, ~google.cloud.kms_v1.types.CryptoKey]): ``CryptoKey`` with updated values.
1516
+ crypto_key (Union[dict, ~google.cloud.kms_v1.types.CryptoKey]): Required. ``CryptoKey`` with updated values.
1495
1517
1496
1518
If a dict is provided, it must be of the same form as the protobuf
1497
1519
message :class:`~google.cloud.kms_v1.types.CryptoKey`
1498
- update_mask (Union[dict, ~google.cloud.kms_v1.types.FieldMask]): Required list of fields to be updated in this request.
1520
+ update_mask (Union[dict, ~google.cloud.kms_v1.types.FieldMask]): Required. List of fields to be updated in this request.
1499
1521
1500
1522
If a dict is provided, it must be of the same form as the protobuf
1501
1523
message :class:`~google.cloud.kms_v1.types.FieldMask`
@@ -1578,11 +1600,11 @@ def update_crypto_key_version(
1578
1600
>>> response = client.update_crypto_key_version(crypto_key_version, update_mask)
1579
1601
1580
1602
Args:
1581
- crypto_key_version (Union[dict, ~google.cloud.kms_v1.types.CryptoKeyVersion]): ``CryptoKeyVersion`` with updated values.
1603
+ crypto_key_version (Union[dict, ~google.cloud.kms_v1.types.CryptoKeyVersion]): Required. ``CryptoKeyVersion`` with updated values.
1582
1604
1583
1605
If a dict is provided, it must be of the same form as the protobuf
1584
1606
message :class:`~google.cloud.kms_v1.types.CryptoKeyVersion`
1585
- update_mask (Union[dict, ~google.cloud.kms_v1.types.FieldMask]): Required list of fields to be updated in this request.
1607
+ update_mask (Union[dict, ~google.cloud.kms_v1.types.FieldMask]): Required. List of fields to be updated in this request.
1586
1608
1587
1609
If a dict is provided, it must be of the same form as the protobuf
1588
1610
message :class:`~google.cloud.kms_v1.types.FieldMask`
@@ -1673,7 +1695,7 @@ def encrypt(
1673
1695
``SOFTWARE`` keys, the plaintext must be no larger than 64KiB. For
1674
1696
``HSM`` keys, the combined length of the plaintext and
1675
1697
additional\_authenticated\_data fields must be no larger than 8KiB.
1676
- additional_authenticated_data (bytes): Optional data that, if specified, must also be provided during
1698
+ additional_authenticated_data (bytes): Optional. Optional data that, if specified, must also be provided during
1677
1699
decryption through ``DecryptRequest.additional_authenticated_data``.
1678
1700
1679
1701
The maximum size depends on the key version's ``protection_level``. For
@@ -1762,7 +1784,7 @@ def decrypt(
1762
1784
The server will choose the appropriate version.
1763
1785
ciphertext (bytes): Required. The encrypted data originally returned in
1764
1786
``EncryptResponse.ciphertext``.
1765
- additional_authenticated_data (bytes): Optional data that must match the data originally supplied in
1787
+ additional_authenticated_data (bytes): Optional. Optional data that must match the data originally supplied in
1766
1788
``EncryptRequest.additional_authenticated_data``.
1767
1789
retry (Optional[google.api_core.retry.Retry]): A retry object used
1768
1790
to retry requests. If ``None`` is specified, requests will
@@ -1842,8 +1864,8 @@ def update_crypto_key_primary_version(
1842
1864
>>> response = client.update_crypto_key_primary_version(name, crypto_key_version_id)
1843
1865
1844
1866
Args:
1845
- name (str): The resource name of the ``CryptoKey`` to update.
1846
- crypto_key_version_id (str): The id of the child ``CryptoKeyVersion`` to use as primary.
1867
+ name (str): Required. The resource name of the ``CryptoKey`` to update.
1868
+ crypto_key_version_id (str): Required. The id of the child ``CryptoKeyVersion`` to use as primary.
1847
1869
retry (Optional[google.api_core.retry.Retry]): A retry object used
1848
1870
to retry requests. If ``None`` is specified, requests will
1849
1871
be retried using a default configuration.
@@ -1926,7 +1948,7 @@ def destroy_crypto_key_version(
1926
1948
>>> response = client.destroy_crypto_key_version(name)
1927
1949
1928
1950
Args:
1929
- name (str): The resource name of the ``CryptoKeyVersion`` to destroy.
1951
+ name (str): Required. The resource name of the ``CryptoKeyVersion`` to destroy.
1930
1952
retry (Optional[google.api_core.retry.Retry]): A retry object used
1931
1953
to retry requests. If ``None`` is specified, requests will
1932
1954
be retried using a default configuration.
@@ -1998,7 +2020,7 @@ def restore_crypto_key_version(
1998
2020
>>> response = client.restore_crypto_key_version(name)
1999
2021
2000
2022
Args:
2001
- name (str): The resource name of the ``CryptoKeyVersion`` to restore.
2023
+ name (str): Required. The resource name of the ``CryptoKeyVersion`` to restore.
2002
2024
retry (Optional[google.api_core.retry.Retry]): A retry object used
2003
2025
to retry requests. If ``None`` is specified, requests will
2004
2026
be retried using a default configuration.
@@ -2069,7 +2091,7 @@ def get_public_key(
2069
2091
>>> response = client.get_public_key(name)
2070
2092
2071
2093
Args:
2072
- name (str): The ``name`` of the ``CryptoKeyVersion`` public key to get.
2094
+ name (str): Required. The ``name`` of the ``CryptoKeyVersion`` public key to get.
2073
2095
retry (Optional[google.api_core.retry.Retry]): A retry object used
2074
2096
to retry requests. If ``None`` is specified, requests will
2075
2097
be retried using a default configuration.
@@ -2290,6 +2312,9 @@ def set_iam_policy(
2290
2312
Sets the access control policy on the specified resource. Replaces
2291
2313
any existing policy.
2292
2314
2315
+ Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and
2316
+ PERMISSION_DENIED
2317
+
2293
2318
Example:
2294
2319
>>> from google.cloud import kms_v1
2295
2320
>>>
0 commit comments