Class KmsCryptoKey.Builder

  • All Implemented Interfaces:
    software.amazon.jsii.Builder<KmsCryptoKey>
    Enclosing class:
    KmsCryptoKey

    @Stability(Stable)
    public static final class KmsCryptoKey.Builder
    extends Object
    implements software.amazon.jsii.Builder<KmsCryptoKey>
    A fluent builder for KmsCryptoKey.
    • Method Detail

      • create

        @Stability(Stable)
        public static KmsCryptoKey.Builder create​(software.constructs.Construct scope,
                                                  String id)
        Parameters:
        scope - The scope in which to define this construct. This parameter is required.
        id - The scoped construct ID. This parameter is required.
        Returns:
        a new instance of KmsCryptoKey.Builder.
      • connection

        @Stability(Experimental)
        public KmsCryptoKey.Builder connection​(com.hashicorp.cdktf.SSHProvisionerConnection connection)
        Parameters:
        connection - This parameter is required.
        Returns:
        this
      • connection

        @Stability(Experimental)
        public KmsCryptoKey.Builder connection​(com.hashicorp.cdktf.WinrmProvisionerConnection connection)
        Parameters:
        connection - This parameter is required.
        Returns:
        this
      • count

        @Stability(Experimental)
        public KmsCryptoKey.Builder count​(Number count)
        Parameters:
        count - This parameter is required.
        Returns:
        this
      • count

        @Stability(Experimental)
        public KmsCryptoKey.Builder count​(com.hashicorp.cdktf.TerraformCount count)
        Parameters:
        count - This parameter is required.
        Returns:
        this
      • dependsOn

        @Stability(Experimental)
        public KmsCryptoKey.Builder dependsOn​(List<? extends com.hashicorp.cdktf.ITerraformDependable> dependsOn)
        Parameters:
        dependsOn - This parameter is required.
        Returns:
        this
      • forEach

        @Stability(Experimental)
        public KmsCryptoKey.Builder forEach​(com.hashicorp.cdktf.ITerraformIterator forEach)
        Parameters:
        forEach - This parameter is required.
        Returns:
        this
      • lifecycle

        @Stability(Experimental)
        public KmsCryptoKey.Builder lifecycle​(com.hashicorp.cdktf.TerraformResourceLifecycle lifecycle)
        Parameters:
        lifecycle - This parameter is required.
        Returns:
        this
      • provider

        @Stability(Experimental)
        public KmsCryptoKey.Builder provider​(com.hashicorp.cdktf.TerraformProvider provider)
        Parameters:
        provider - This parameter is required.
        Returns:
        this
      • provisioners

        @Stability(Experimental)
        public KmsCryptoKey.Builder provisioners​(List<? extends Object> provisioners)
        Parameters:
        provisioners - This parameter is required.
        Returns:
        this
      • keyRing

        @Stability(Stable)
        public KmsCryptoKey.Builder keyRing​(String keyRing)
        The KeyRing that this key belongs to. Format: ''projects/{{project}}/locations/{{location}}/keyRings/{{keyRing}}''.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/kms_crypto_key#key_ring KmsCryptoKey#key_ring}

        Parameters:
        keyRing - The KeyRing that this key belongs to. Format: ''projects/{{project}}/locations/{{location}}/keyRings/{{keyRing}}''. This parameter is required.
        Returns:
        this
      • name

        @Stability(Stable)
        public KmsCryptoKey.Builder name​(String name)
        The resource name for the CryptoKey.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/kms_crypto_key#name KmsCryptoKey#name}

        Parameters:
        name - The resource name for the CryptoKey. This parameter is required.
        Returns:
        this
      • cryptoKeyBackend

        @Stability(Stable)
        public KmsCryptoKey.Builder cryptoKeyBackend​(String cryptoKeyBackend)
        The resource name of the backend environment associated with all CryptoKeyVersions within this CryptoKey.

        The resource name is in the format "projects/* /locations/* /ekmConnections/*" and only applies to "EXTERNAL_VPC" keys. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/kms_crypto_key#crypto_key_backend KmsCryptoKey#crypto_key_backend} Note: The above comment contained a comment block ending sequence (* followed by /). We have introduced a space between to prevent syntax errors. Please ignore the space.

        Parameters:
        cryptoKeyBackend - The resource name of the backend environment associated with all CryptoKeyVersions within this CryptoKey. This parameter is required.
        Returns:
        this
      • destroyScheduledDuration

        @Stability(Stable)
        public KmsCryptoKey.Builder destroyScheduledDuration​(String destroyScheduledDuration)
        The period of time that versions of this key spend in the DESTROY_SCHEDULED state before transitioning to DESTROYED.

        If not specified at creation time, the default duration is 30 days. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/kms_crypto_key#destroy_scheduled_duration KmsCryptoKey#destroy_scheduled_duration}

        Parameters:
        destroyScheduledDuration - The period of time that versions of this key spend in the DESTROY_SCHEDULED state before transitioning to DESTROYED. This parameter is required.
        Returns:
        this
      • id

        @Stability(Stable)
        public KmsCryptoKey.Builder id​(String id)
        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/kms_crypto_key#id KmsCryptoKey#id}.

        Please be aware that the id field is automatically added to all resources in Terraform providers using a Terraform provider SDK version below 2. If you experience problems setting this value it might not be settable. Please take a look at the provider documentation to ensure it should be settable.

        Parameters:
        id - Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/kms_crypto_key#id KmsCryptoKey#id}. This parameter is required.
        Returns:
        this
      • importOnly

        @Stability(Stable)
        public KmsCryptoKey.Builder importOnly​(Boolean importOnly)
        Whether this key may contain imported versions only.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/kms_crypto_key#import_only KmsCryptoKey#import_only}

        Parameters:
        importOnly - Whether this key may contain imported versions only. This parameter is required.
        Returns:
        this
      • importOnly

        @Stability(Stable)
        public KmsCryptoKey.Builder importOnly​(com.hashicorp.cdktf.IResolvable importOnly)
        Whether this key may contain imported versions only.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/kms_crypto_key#import_only KmsCryptoKey#import_only}

        Parameters:
        importOnly - Whether this key may contain imported versions only. This parameter is required.
        Returns:
        this
      • labels

        @Stability(Stable)
        public KmsCryptoKey.Builder labels​(Map<String,​String> labels)
        Labels with user-defined metadata to apply to this resource.

        **Note**: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/kms_crypto_key#labels KmsCryptoKey#labels}

        Parameters:
        labels - Labels with user-defined metadata to apply to this resource. This parameter is required.
        Returns:
        this
      • purpose

        @Stability(Stable)
        public KmsCryptoKey.Builder purpose​(String purpose)
        The immutable purpose of this CryptoKey. See the purpose reference for possible inputs. Default value is "ENCRYPT_DECRYPT".

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/kms_crypto_key#purpose KmsCryptoKey#purpose}

        Parameters:
        purpose - The immutable purpose of this CryptoKey. See the purpose reference for possible inputs. Default value is "ENCRYPT_DECRYPT". This parameter is required.
        Returns:
        this
      • rotationPeriod

        @Stability(Stable)
        public KmsCryptoKey.Builder rotationPeriod​(String rotationPeriod)
        Every time this period passes, generate a new CryptoKeyVersion and set it as the primary.

        The first rotation will take place after the specified period. The rotation period has the format of a decimal number with up to 9 fractional digits, followed by the letter 's' (seconds). It must be greater than a day (ie, 86400). Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/kms_crypto_key#rotation_period KmsCryptoKey#rotation_period}

        Parameters:
        rotationPeriod - Every time this period passes, generate a new CryptoKeyVersion and set it as the primary. This parameter is required.
        Returns:
        this
      • skipInitialVersionCreation

        @Stability(Stable)
        public KmsCryptoKey.Builder skipInitialVersionCreation​(Boolean skipInitialVersionCreation)
        If set to true, the request will create a CryptoKey without any CryptoKeyVersions.

        You must use the 'google_kms_crypto_key_version' resource to create a new CryptoKeyVersion or 'google_kms_key_ring_import_job' resource to import the CryptoKeyVersion. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/kms_crypto_key#skip_initial_version_creation KmsCryptoKey#skip_initial_version_creation}

        Parameters:
        skipInitialVersionCreation - If set to true, the request will create a CryptoKey without any CryptoKeyVersions. This parameter is required.
        Returns:
        this
      • skipInitialVersionCreation

        @Stability(Stable)
        public KmsCryptoKey.Builder skipInitialVersionCreation​(com.hashicorp.cdktf.IResolvable skipInitialVersionCreation)
        If set to true, the request will create a CryptoKey without any CryptoKeyVersions.

        You must use the 'google_kms_crypto_key_version' resource to create a new CryptoKeyVersion or 'google_kms_key_ring_import_job' resource to import the CryptoKeyVersion. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/kms_crypto_key#skip_initial_version_creation KmsCryptoKey#skip_initial_version_creation}

        Parameters:
        skipInitialVersionCreation - If set to true, the request will create a CryptoKey without any CryptoKeyVersions. This parameter is required.
        Returns:
        this
      • timeouts

        @Stability(Stable)
        public KmsCryptoKey.Builder timeouts​(KmsCryptoKeyTimeouts timeouts)
        timeouts block.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/kms_crypto_key#timeouts KmsCryptoKey#timeouts}

        Parameters:
        timeouts - timeouts block. This parameter is required.
        Returns:
        this
      • versionTemplate

        @Stability(Stable)
        public KmsCryptoKey.Builder versionTemplate​(KmsCryptoKeyVersionTemplate versionTemplate)
        version_template block.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/kms_crypto_key#version_template KmsCryptoKey#version_template}

        Parameters:
        versionTemplate - version_template block. This parameter is required.
        Returns:
        this
      • build

        @Stability(Stable)
        public KmsCryptoKey build()
        Specified by:
        build in interface software.amazon.jsii.Builder<KmsCryptoKey>
        Returns:
        a newly built instance of KmsCryptoKey.