Class: Google::Apis::CloudkmsV1::ImportJob
- Inherits:
-
Object
- Object
- Google::Apis::CloudkmsV1::ImportJob
- Includes:
- Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
- Defined in:
- lib/google/apis/cloudkms_v1/classes.rb,
lib/google/apis/cloudkms_v1/representations.rb,
lib/google/apis/cloudkms_v1/representations.rb
Overview
An ImportJob can be used to create CryptoKeys and CryptoKeyVersions using pre- existing key material, generated outside of Cloud KMS. When an ImportJob is created, Cloud KMS will generate a "wrapping key", which is a public/private key pair. You use the wrapping key to encrypt (also known as wrap) the pre- existing key material to protect it during the import process. The nature of the wrapping key depends on the choice of import_method. When the wrapping key generation is complete, the state will be set to ACTIVE and the public_key can be fetched. The fetched public key can then be used to wrap your pre-existing key material. Once the key material is wrapped, it can be imported into a new CryptoKeyVersion in an existing CryptoKey by calling ImportCryptoKeyVersion. Multiple CryptoKeyVersions can be imported with a single ImportJob. Cloud KMS uses the private key portion of the wrapping key to unwrap the key material. Only Cloud KMS has access to the private key. An ImportJob expires 3 days after it is created. Once expired, Cloud KMS will no longer be able to import or unwrap any key material that was wrapped with the ImportJob's public key. For more information, see Importing a key.
Instance Attribute Summary collapse
-
#attestation ⇒ Google::Apis::CloudkmsV1::KeyOperationAttestation
Contains an HSM-generated attestation about a key operation.
-
#create_time ⇒ String
Output only.
-
#crypto_key_backend ⇒ String
Immutable.
-
#expire_event_time ⇒ String
Output only.
-
#expire_time ⇒ String
Output only.
-
#generate_time ⇒ String
Output only.
-
#import_method ⇒ String
Required.
-
#name ⇒ String
Output only.
-
#protection_level ⇒ String
Required.
-
#public_key ⇒ Google::Apis::CloudkmsV1::WrappingPublicKey
The public key component of the wrapping key.
-
#public_key_format ⇒ String
Output only.
-
#state ⇒ String
Output only.
Instance Method Summary collapse
-
#initialize(**args) ⇒ ImportJob
constructor
A new instance of ImportJob.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ ImportJob
Returns a new instance of ImportJob.
1895 1896 1897 |
# File 'lib/google/apis/cloudkms_v1/classes.rb', line 1895 def initialize(**args) update!(**args) end |
Instance Attribute Details
#attestation ⇒ Google::Apis::CloudkmsV1::KeyOperationAttestation
Contains an HSM-generated attestation about a key operation. For more
information, see Verifying attestations.
Corresponds to the JSON property attestation
1827 1828 1829 |
# File 'lib/google/apis/cloudkms_v1/classes.rb', line 1827 def attestation @attestation end |
#create_time ⇒ String
Output only. The time at which this ImportJob was created.
Corresponds to the JSON property createTime
1832 1833 1834 |
# File 'lib/google/apis/cloudkms_v1/classes.rb', line 1832 def create_time @create_time end |
#crypto_key_backend ⇒ String
Immutable. The resource name of the backend environment where the key material
for the wrapping key resides and where all related cryptographic operations
are performed. Currently, this field is only populated for keys stored in
HSM_SINGLE_TENANT. Note, this list is non-exhaustive and may apply to
additional ProtectionLevels in the future. Supported resources: * "projects/*/
locations/*/singleTenantHsmInstances/*"
Corresponds to the JSON property cryptoKeyBackend
1842 1843 1844 |
# File 'lib/google/apis/cloudkms_v1/classes.rb', line 1842 def crypto_key_backend @crypto_key_backend end |
#expire_event_time ⇒ String
Output only. The time this ImportJob expired. Only present if state is EXPIRED.
Corresponds to the JSON property expireEventTime
1847 1848 1849 |
# File 'lib/google/apis/cloudkms_v1/classes.rb', line 1847 def expire_event_time @expire_event_time end |
#expire_time ⇒ String
Output only. The time at which this ImportJob is scheduled for expiration and
can no longer be used to import key material.
Corresponds to the JSON property expireTime
1853 1854 1855 |
# File 'lib/google/apis/cloudkms_v1/classes.rb', line 1853 def expire_time @expire_time end |
#generate_time ⇒ String
Output only. The time this ImportJob's key material was generated.
Corresponds to the JSON property generateTime
1858 1859 1860 |
# File 'lib/google/apis/cloudkms_v1/classes.rb', line 1858 def generate_time @generate_time end |
#import_method ⇒ String
Required. Immutable. The wrapping method to be used for incoming key material.
Corresponds to the JSON property importMethod
1863 1864 1865 |
# File 'lib/google/apis/cloudkms_v1/classes.rb', line 1863 def import_method @import_method end |
#name ⇒ String
Output only. The resource name for this ImportJob in the format projects/*/
locations/*/keyRings/*/importJobs/*.
Corresponds to the JSON property name
1869 1870 1871 |
# File 'lib/google/apis/cloudkms_v1/classes.rb', line 1869 def name @name end |
#protection_level ⇒ String
Required. Immutable. The protection level of the ImportJob. This must match
the protection_level of the version_template on the CryptoKey you attempt to
import into.
Corresponds to the JSON property protectionLevel
1876 1877 1878 |
# File 'lib/google/apis/cloudkms_v1/classes.rb', line 1876 def protection_level @protection_level end |
#public_key ⇒ Google::Apis::CloudkmsV1::WrappingPublicKey
The public key component of the wrapping key. For details of the type of key
this public key corresponds to, see the ImportMethod.
Corresponds to the JSON property publicKey
1882 1883 1884 |
# File 'lib/google/apis/cloudkms_v1/classes.rb', line 1882 def public_key @public_key end |
#public_key_format ⇒ String
Output only. Specifies the WrappingPublicKey format provided by the customer
in the KeyManagementService.GetImportJob request.
Corresponds to the JSON property publicKeyFormat
1888 1889 1890 |
# File 'lib/google/apis/cloudkms_v1/classes.rb', line 1888 def public_key_format @public_key_format end |
#state ⇒ String
Output only. The current state of the ImportJob, indicating if it can be used.
Corresponds to the JSON property state
1893 1894 1895 |
# File 'lib/google/apis/cloudkms_v1/classes.rb', line 1893 def state @state end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 |
# File 'lib/google/apis/cloudkms_v1/classes.rb', line 1900 def update!(**args) @attestation = args[:attestation] if args.key?(:attestation) @create_time = args[:create_time] if args.key?(:create_time) @crypto_key_backend = args[:crypto_key_backend] if args.key?(:crypto_key_backend) @expire_event_time = args[:expire_event_time] if args.key?(:expire_event_time) @expire_time = args[:expire_time] if args.key?(:expire_time) @generate_time = args[:generate_time] if args.key?(:generate_time) @import_method = args[:import_method] if args.key?(:import_method) @name = args[:name] if args.key?(:name) @protection_level = args[:protection_level] if args.key?(:protection_level) @public_key = args[:public_key] if args.key?(:public_key) @public_key_format = args[:public_key_format] if args.key?(:public_key_format) @state = args[:state] if args.key?(:state) end |