Class KmsCryptoKeyConfig.Builder
- java.lang.Object
-
- com.hashicorp.cdktf.providers.google.kms_crypto_key.KmsCryptoKeyConfig.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<KmsCryptoKeyConfig>
- Enclosing interface:
- KmsCryptoKeyConfig
@Stability(Stable) public static final class KmsCryptoKeyConfig.Builder extends Object implements software.amazon.jsii.Builder<KmsCryptoKeyConfig>
A builder forKmsCryptoKeyConfig
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description KmsCryptoKeyConfigbuild()Builds the configured instance.KmsCryptoKeyConfig.Builderconnection(com.hashicorp.cdktf.SSHProvisionerConnection connection)Sets the value ofTerraformMetaArguments.getConnection()KmsCryptoKeyConfig.Builderconnection(com.hashicorp.cdktf.WinrmProvisionerConnection connection)Sets the value ofTerraformMetaArguments.getConnection()KmsCryptoKeyConfig.Buildercount(com.hashicorp.cdktf.TerraformCount count)Sets the value ofTerraformMetaArguments.getCount()KmsCryptoKeyConfig.Buildercount(Number count)Sets the value ofTerraformMetaArguments.getCount()KmsCryptoKeyConfig.BuildercryptoKeyBackend(String cryptoKeyBackend)Sets the value ofKmsCryptoKeyConfig.getCryptoKeyBackend()KmsCryptoKeyConfig.BuilderdependsOn(List<? extends com.hashicorp.cdktf.ITerraformDependable> dependsOn)Sets the value ofTerraformMetaArguments.getDependsOn()KmsCryptoKeyConfig.BuilderdestroyScheduledDuration(String destroyScheduledDuration)Sets the value ofKmsCryptoKeyConfig.getDestroyScheduledDuration()KmsCryptoKeyConfig.BuilderforEach(com.hashicorp.cdktf.ITerraformIterator forEach)Sets the value ofTerraformMetaArguments.getForEach()KmsCryptoKeyConfig.Builderid(String id)Sets the value ofKmsCryptoKeyConfig.getId()KmsCryptoKeyConfig.BuilderimportOnly(com.hashicorp.cdktf.IResolvable importOnly)Sets the value ofKmsCryptoKeyConfig.getImportOnly()KmsCryptoKeyConfig.BuilderimportOnly(Boolean importOnly)Sets the value ofKmsCryptoKeyConfig.getImportOnly()KmsCryptoKeyConfig.BuilderkeyRing(String keyRing)Sets the value ofKmsCryptoKeyConfig.getKeyRing()KmsCryptoKeyConfig.Builderlabels(Map<String,String> labels)Sets the value ofKmsCryptoKeyConfig.getLabels()KmsCryptoKeyConfig.Builderlifecycle(com.hashicorp.cdktf.TerraformResourceLifecycle lifecycle)Sets the value ofTerraformMetaArguments.getLifecycle()KmsCryptoKeyConfig.Buildername(String name)Sets the value ofKmsCryptoKeyConfig.getName()KmsCryptoKeyConfig.Builderprovider(com.hashicorp.cdktf.TerraformProvider provider)Sets the value ofTerraformMetaArguments.getProvider()KmsCryptoKeyConfig.Builderprovisioners(List<? extends Object> provisioners)Sets the value ofTerraformMetaArguments.getProvisioners()KmsCryptoKeyConfig.Builderpurpose(String purpose)Sets the value ofKmsCryptoKeyConfig.getPurpose()KmsCryptoKeyConfig.BuilderrotationPeriod(String rotationPeriod)Sets the value ofKmsCryptoKeyConfig.getRotationPeriod()KmsCryptoKeyConfig.BuilderskipInitialVersionCreation(com.hashicorp.cdktf.IResolvable skipInitialVersionCreation)Sets the value ofKmsCryptoKeyConfig.getSkipInitialVersionCreation()KmsCryptoKeyConfig.BuilderskipInitialVersionCreation(Boolean skipInitialVersionCreation)Sets the value ofKmsCryptoKeyConfig.getSkipInitialVersionCreation()KmsCryptoKeyConfig.Buildertimeouts(KmsCryptoKeyTimeouts timeouts)Sets the value ofKmsCryptoKeyConfig.getTimeouts()KmsCryptoKeyConfig.BuilderversionTemplate(KmsCryptoKeyVersionTemplate versionTemplate)Sets the value ofKmsCryptoKeyConfig.getVersionTemplate()
-
-
-
Method Detail
-
keyRing
@Stability(Stable) public KmsCryptoKeyConfig.Builder keyRing(String keyRing)
Sets the value ofKmsCryptoKeyConfig.getKeyRing()- 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)
Sets the value ofKmsCryptoKeyConfig.getName()- 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)
Sets the value ofKmsCryptoKeyConfig.getCryptoKeyBackend()- 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)
Sets the value ofKmsCryptoKeyConfig.getDestroyScheduledDuration()- 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 ofKmsCryptoKeyConfig.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)
Sets the value ofKmsCryptoKeyConfig.getImportOnly()- 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)
Sets the value ofKmsCryptoKeyConfig.getImportOnly()- 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)
Sets the value ofKmsCryptoKeyConfig.getLabels()- 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)
Sets the value ofKmsCryptoKeyConfig.getPurpose()- 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)
Sets the value ofKmsCryptoKeyConfig.getRotationPeriod()- 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)
Sets the value ofKmsCryptoKeyConfig.getSkipInitialVersionCreation()- 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)
Sets the value ofKmsCryptoKeyConfig.getSkipInitialVersionCreation()- 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
-
timeouts
@Stability(Stable) public KmsCryptoKeyConfig.Builder timeouts(KmsCryptoKeyTimeouts timeouts)
Sets the value ofKmsCryptoKeyConfig.getTimeouts()- Parameters:
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}- Returns:
this
-
versionTemplate
@Stability(Stable) public KmsCryptoKeyConfig.Builder versionTemplate(KmsCryptoKeyVersionTemplate versionTemplate)
Sets the value ofKmsCryptoKeyConfig.getVersionTemplate()- Parameters:
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}- Returns:
this
-
connection
@Stability(Experimental) public KmsCryptoKeyConfig.Builder connection(com.hashicorp.cdktf.SSHProvisionerConnection connection)
Sets the value ofTerraformMetaArguments.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 ofTerraformMetaArguments.getConnection()- Parameters:
connection- the value to be set.- Returns:
this
-
count
@Stability(Experimental) public KmsCryptoKeyConfig.Builder count(Number count)
Sets the value ofTerraformMetaArguments.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 ofTerraformMetaArguments.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 ofTerraformMetaArguments.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 ofTerraformMetaArguments.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 ofTerraformMetaArguments.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 ofTerraformMetaArguments.getProvider()- Parameters:
provider- the value to be set.- Returns:
this
-
provisioners
@Stability(Experimental) public KmsCryptoKeyConfig.Builder provisioners(List<? extends Object> provisioners)
Sets the value ofTerraformMetaArguments.getProvisioners()- Parameters:
provisioners- the value to be set.- Returns:
this
-
build
@Stability(Stable) public KmsCryptoKeyConfig build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<KmsCryptoKeyConfig>- Returns:
- a new instance of
KmsCryptoKeyConfig - Throws:
NullPointerException- if any required attribute was not provided
-
-