Class KmsCryptoKeyConfig.Builder

    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • keyRing

        @Stability(Stable)
        public KmsCryptoKeyConfig.Builder keyRing​(String keyRing)
        Parameters:
        keyRing - The KeyRing that this key belongs to. Format: ''projects/{{project}}/locations/{{location}}/keyRings/{{keyRing}}''. This parameter is required. 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}
        Returns:
        this
      • name

        @Stability(Stable)
        public KmsCryptoKeyConfig.Builder name​(String name)
        Parameters:
        name - The resource name for the CryptoKey. This parameter is required. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/kms_crypto_key#name KmsCryptoKey#name}
        Returns:
        this
      • cryptoKeyBackend

        @Stability(Stable)
        public KmsCryptoKeyConfig.Builder cryptoKeyBackend​(String cryptoKeyBackend)
        Parameters:
        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.
        Returns:
        this
      • destroyScheduledDuration

        @Stability(Stable)
        public KmsCryptoKeyConfig.Builder destroyScheduledDuration​(String destroyScheduledDuration)
        Parameters:
        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}
        Returns:
        this
      • id

        @Stability(Stable)
        public KmsCryptoKeyConfig.Builder id​(String id)
        Sets the value of KmsCryptoKeyConfig.getId()
        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}. 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.
        Returns:
        this
      • importOnly

        @Stability(Stable)
        public KmsCryptoKeyConfig.Builder importOnly​(Boolean importOnly)
        Parameters:
        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}
        Returns:
        this
      • importOnly

        @Stability(Stable)
        public KmsCryptoKeyConfig.Builder importOnly​(com.hashicorp.cdktf.IResolvable importOnly)
        Parameters:
        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}
        Returns:
        this
      • labels

        @Stability(Stable)
        public KmsCryptoKeyConfig.Builder labels​(Map<String,​String> labels)
        Parameters:
        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}
        Returns:
        this
      • purpose

        @Stability(Stable)
        public KmsCryptoKeyConfig.Builder purpose​(String purpose)
        Parameters:
        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}
        Returns:
        this
      • rotationPeriod

        @Stability(Stable)
        public KmsCryptoKeyConfig.Builder rotationPeriod​(String rotationPeriod)
        Parameters:
        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}
        Returns:
        this
      • skipInitialVersionCreation

        @Stability(Stable)
        public KmsCryptoKeyConfig.Builder skipInitialVersionCreation​(Boolean skipInitialVersionCreation)
        Parameters:
        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}
        Returns:
        this
      • skipInitialVersionCreation

        @Stability(Stable)
        public KmsCryptoKeyConfig.Builder skipInitialVersionCreation​(com.hashicorp.cdktf.IResolvable skipInitialVersionCreation)
        Parameters:
        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}
        Returns:
        this
      • connection

        @Stability(Experimental)
        public KmsCryptoKeyConfig.Builder connection​(com.hashicorp.cdktf.SSHProvisionerConnection connection)
        Sets the value of TerraformMetaArguments.getConnection()
        Parameters:
        connection - the value to be set.
        Returns:
        this
      • connection

        @Stability(Experimental)
        public KmsCryptoKeyConfig.Builder connection​(com.hashicorp.cdktf.WinrmProvisionerConnection connection)
        Sets the value of TerraformMetaArguments.getConnection()
        Parameters:
        connection - the value to be set.
        Returns:
        this
      • count

        @Stability(Experimental)
        public KmsCryptoKeyConfig.Builder count​(Number count)
        Sets the value of TerraformMetaArguments.getCount()
        Parameters:
        count - the value to be set.
        Returns:
        this
      • count

        @Stability(Experimental)
        public KmsCryptoKeyConfig.Builder count​(com.hashicorp.cdktf.TerraformCount count)
        Sets the value of TerraformMetaArguments.getCount()
        Parameters:
        count - the value to be set.
        Returns:
        this
      • dependsOn

        @Stability(Experimental)
        public KmsCryptoKeyConfig.Builder dependsOn​(List<? extends com.hashicorp.cdktf.ITerraformDependable> dependsOn)
        Sets the value of TerraformMetaArguments.getDependsOn()
        Parameters:
        dependsOn - the value to be set.
        Returns:
        this
      • forEach

        @Stability(Experimental)
        public KmsCryptoKeyConfig.Builder forEach​(com.hashicorp.cdktf.ITerraformIterator forEach)
        Sets the value of TerraformMetaArguments.getForEach()
        Parameters:
        forEach - the value to be set.
        Returns:
        this
      • lifecycle

        @Stability(Experimental)
        public KmsCryptoKeyConfig.Builder lifecycle​(com.hashicorp.cdktf.TerraformResourceLifecycle lifecycle)
        Sets the value of TerraformMetaArguments.getLifecycle()
        Parameters:
        lifecycle - the value to be set.
        Returns:
        this
      • provider

        @Stability(Experimental)
        public KmsCryptoKeyConfig.Builder provider​(com.hashicorp.cdktf.TerraformProvider provider)
        Sets the value of TerraformMetaArguments.getProvider()
        Parameters:
        provider - the value to be set.
        Returns:
        this
      • provisioners

        @Stability(Experimental)
        public KmsCryptoKeyConfig.Builder provisioners​(List<? extends Object> provisioners)
        Sets the value of TerraformMetaArguments.getProvisioners()
        Parameters:
        provisioners - the value to be set.
        Returns:
        this