Class KeyRingImportJob


  • public class KeyRingImportJob
    extends com.pulumi.resources.CustomResource
    A `KeyRingImportJob` can be used to create `CryptoKeys` and `CryptoKeyVersions` using pre-existing key material, generated outside of Cloud KMS. A `KeyRingImportJob` 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 `KeyRingImportJob`'s public key. > **Note:** KeyRingImportJobs cannot be deleted from Google Cloud Platform. Destroying a provider-managed KeyRingImportJob will remove it from state but *will not delete the resource from the project.* To get more information about KeyRingImportJob, see: * [API documentation](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.importJobs) * How-to Guides * [Importing a key](https://cloud.google.com/kms/docs/importing-a-key) ## Example Usage ## Import KeyRingImportJob can be imported using any of these accepted formats* `{{name}}` In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import KeyRingImportJob using one of the formats above. For exampletf import { id = "{{name}}" to = google_kms_key_ring_import_job.default } ```sh $ pulumi import gcp:kms/keyRingImportJob:KeyRingImportJob When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), KeyRingImportJob can be imported using one of the formats above. For example ``` ```sh $ pulumi import gcp:kms/keyRingImportJob:KeyRingImportJob default {{name}} ```
    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.pulumi.resources.CustomResource

        com.pulumi.resources.CustomResource.CustomResourceInternal
      • Nested classes/interfaces inherited from class com.pulumi.resources.Resource

        com.pulumi.resources.Resource.LazyField<T extends java.lang.Object>, com.pulumi.resources.Resource.LazyFields, com.pulumi.resources.Resource.ResourceInternal
    • Field Summary

      • Fields inherited from class com.pulumi.resources.Resource

        childResources, remote
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.pulumi.core.Output<java.util.List<KeyRingImportJobAttestation>> attestations()  
      com.pulumi.core.Output<java.lang.String> expireTime()  
      static KeyRingImportJob get​(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, KeyRingImportJobState state, com.pulumi.resources.CustomResourceOptions options)
      Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
      com.pulumi.core.Output<java.lang.String> importJobId()  
      com.pulumi.core.Output<java.lang.String> importMethod()  
      com.pulumi.core.Output<java.lang.String> keyRing()  
      com.pulumi.core.Output<java.lang.String> name()  
      com.pulumi.core.Output<java.lang.String> protectionLevel()  
      com.pulumi.core.Output<java.util.List<KeyRingImportJobPublicKey>> publicKeys()  
      com.pulumi.core.Output<java.lang.String> state()  
      • Methods inherited from class com.pulumi.resources.CustomResource

        getId, id, idFuture
      • Methods inherited from class com.pulumi.resources.Resource

        getChildResources, getResourceName, getResourceType, getUrn, pulumiChildResources, pulumiResourceName, pulumiResourceType, urn
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • KeyRingImportJob

        public KeyRingImportJob​(java.lang.String name)
        Parameters:
        name - The _unique_ name of the resulting resource.
      • KeyRingImportJob

        public KeyRingImportJob​(java.lang.String name,
                                KeyRingImportJobArgs args)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
      • KeyRingImportJob

        public KeyRingImportJob​(java.lang.String name,
                                KeyRingImportJobArgs args,
                                @Nullable
                                com.pulumi.resources.CustomResourceOptions options)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
        options - A bag of options that control this resource's behavior.
    • Method Detail

      • attestations

        public com.pulumi.core.Output<java.util.List<KeyRingImportJobAttestation>> attestations()
        Returns:
        Statement that was generated and signed by the key creator (for example, an HSM) at key creation time. Use this statement to verify attributes of the key as stored on the HSM, independently of Google. Only present if the chosen ImportMethod is one with a protection level of HSM. Structure is documented below.
      • expireTime

        public com.pulumi.core.Output<java.lang.String> expireTime()
        Returns:
        The time at which this resource is scheduled for expiration and can no longer be used. This is in RFC3339 text format.
      • importJobId

        public com.pulumi.core.Output<java.lang.String> importJobId()
        Returns:
        It must be unique within a KeyRing and match the regular expression [a-zA-Z0-9_-]{1,63} ***
      • importMethod

        public com.pulumi.core.Output<java.lang.String> importMethod()
        Returns:
        The wrapping method to be used for incoming key material. Possible values are: `RSA_OAEP_3072_SHA1_AES_256`, `RSA_OAEP_4096_SHA1_AES_256`.
      • keyRing

        public com.pulumi.core.Output<java.lang.String> keyRing()
        Returns:
        The KeyRing that this import job belongs to. Format: `'projects/{{project}}/locations/{{location}}/keyRings/{{keyRing}}'`.
      • name

        public com.pulumi.core.Output<java.lang.String> name()
        Returns:
        The resource name for this ImportJob in the format projects/*/locations/*/keyRings/*/importJobs/*.
      • protectionLevel

        public com.pulumi.core.Output<java.lang.String> protectionLevel()
        Returns:
        The protection level of the ImportJob. This must match the protectionLevel of the versionTemplate on the CryptoKey you attempt to import into. Possible values are: `SOFTWARE`, `HSM`, `EXTERNAL`.
      • publicKeys

        public com.pulumi.core.Output<java.util.List<KeyRingImportJobPublicKey>> publicKeys()
        Returns:
        The public key with which to wrap key material prior to import. Only returned if state is `ACTIVE`. Structure is documented below.
      • state

        public com.pulumi.core.Output<java.lang.String> state()
        Returns:
        The current state of the ImportJob, indicating if it can be used.
      • get

        public static KeyRingImportJob get​(java.lang.String name,
                                           com.pulumi.core.Output<java.lang.String> id,
                                           @Nullable
                                           KeyRingImportJobState state,
                                           @Nullable
                                           com.pulumi.resources.CustomResourceOptions options)
        Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
        Parameters:
        name - The _unique_ name of the resulting resource.
        id - The _unique_ provider ID of the resource to lookup.
        state -
        options - Optional settings to control the behavior of the CustomResource.