All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.hashicorp.cdktf.DataResource Maven / Gradle / Ivy

package com.hashicorp.cdktf;

/**
 * (experimental) The DataResource implements the standard resource lifecycle, but does not directly take any other actions.
 * 

* You can use the DataResource resource without requiring or configuring a provider. *

* The DataResource resource is useful for storing values which need to follow a manage resource lifecycle, and for triggering provisioners when there is no other logical managed resource in which to place them. *

* It requires Terraform 1.4 or later. *

* It is also possible to generate these bindings by adding "terraform.io/builtin/terraform" to the "terraformProviders" key in your cdktf.json file and running "cdktf get". *

* https://developer.hashicorp.com/terraform/language/resources/terraform-data */ @javax.annotation.Generated(value = "jsii-pacmak/1.98.0 (build 00b106d)", date = "2024-05-27T11:46:32.045Z") @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @software.amazon.jsii.Jsii(module = com.hashicorp.cdktf.$Module.class, fqn = "cdktf.DataResource") public class DataResource extends com.hashicorp.cdktf.TerraformResource { protected DataResource(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } protected DataResource(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) { super(initializationMode); } static { TF_RESOURCE_TYPE = software.amazon.jsii.JsiiObject.jsiiStaticGet(com.hashicorp.cdktf.DataResource.class, "tfResourceType", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** * (experimental) Create a new TerraformData Resource. *

* The DataResource resource is useful for storing values which need to follow a manage resource lifecycle, and for triggering provisioners when there is no other logical managed resource in which to place them. *

* @param scope The scope in which to define this construct. This parameter is required. * @param id The scoped construct ID. This parameter is required. * @param config */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public DataResource(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.Nullable com.hashicorp.cdktf.DataConfig config) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), java.util.Objects.requireNonNull(id, "id is required"), config }); } /** * (experimental) Create a new TerraformData Resource. *

* The DataResource resource is useful for storing values which need to follow a manage resource lifecycle, and for triggering provisioners when there is no other logical managed resource in which to place them. *

* @param scope The scope in which to define this construct. This parameter is required. * @param id The scoped construct ID. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public DataResource(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), java.util.Objects.requireNonNull(id, "id is required") }); } /** * (experimental) Generates CDKTF code for importing a Data resource upon running "cdktf plan ". *

* @param scope The scope in which to define this construct. This parameter is required. * @param importToId The construct id used in the generated config for the Data to import. This parameter is required. * @param importFromId The id of the existing Data that should be imported. This parameter is required. * @param provider ? Optional instance of the provider where the Data to import is found. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public static @org.jetbrains.annotations.NotNull com.hashicorp.cdktf.ImportableResource generateConfigForImport(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String importToId, final @org.jetbrains.annotations.NotNull java.lang.String importFromId, final @org.jetbrains.annotations.Nullable com.hashicorp.cdktf.TerraformProvider provider) { return software.amazon.jsii.JsiiObject.jsiiStaticCall(com.hashicorp.cdktf.DataResource.class, "generateConfigForImport", software.amazon.jsii.NativeType.forClass(com.hashicorp.cdktf.ImportableResource.class), new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), java.util.Objects.requireNonNull(importToId, "importToId is required"), java.util.Objects.requireNonNull(importFromId, "importFromId is required"), provider }); } /** * (experimental) Generates CDKTF code for importing a Data resource upon running "cdktf plan ". *

* @param scope The scope in which to define this construct. This parameter is required. * @param importToId The construct id used in the generated config for the Data to import. This parameter is required. * @param importFromId The id of the existing Data that should be imported. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public static @org.jetbrains.annotations.NotNull com.hashicorp.cdktf.ImportableResource generateConfigForImport(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String importToId, final @org.jetbrains.annotations.NotNull java.lang.String importFromId) { return software.amazon.jsii.JsiiObject.jsiiStaticCall(com.hashicorp.cdktf.DataResource.class, "generateConfigForImport", software.amazon.jsii.NativeType.forClass(com.hashicorp.cdktf.ImportableResource.class), new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), java.util.Objects.requireNonNull(importToId, "importToId is required"), java.util.Objects.requireNonNull(importFromId, "importFromId is required") }); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public void resetInput() { software.amazon.jsii.Kernel.call(this, "resetInput", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public void resetTriggersReplace() { software.amazon.jsii.Kernel.call(this, "resetTriggersReplace", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @Override protected @org.jetbrains.annotations.NotNull java.util.Map synthesizeAttributes() { return java.util.Collections.unmodifiableMap(software.amazon.jsii.Kernel.call(this, "synthesizeAttributes", software.amazon.jsii.NativeType.mapOf(software.amazon.jsii.NativeType.forClass(java.lang.Object.class)))); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @Override protected @org.jetbrains.annotations.NotNull java.util.Map synthesizeHclAttributes() { return java.util.Collections.unmodifiableMap(software.amazon.jsii.Kernel.call(this, "synthesizeHclAttributes", software.amazon.jsii.NativeType.mapOf(software.amazon.jsii.NativeType.forClass(java.lang.Object.class)))); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public final static java.lang.String TF_RESOURCE_TYPE; /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public @org.jetbrains.annotations.NotNull java.lang.String getId() { return software.amazon.jsii.Kernel.get(this, "id", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public @org.jetbrains.annotations.NotNull com.hashicorp.cdktf.AnyMap getOutput() { return software.amazon.jsii.Kernel.get(this, "output", software.amazon.jsii.NativeType.forClass(com.hashicorp.cdktf.AnyMap.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public @org.jetbrains.annotations.Nullable java.util.Map getInputInput() { return java.util.Optional.ofNullable((java.util.Map)(software.amazon.jsii.Kernel.get(this, "inputInput", software.amazon.jsii.NativeType.mapOf(software.amazon.jsii.NativeType.forClass(java.lang.Object.class))))).map(java.util.Collections::unmodifiableMap).orElse(null); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public @org.jetbrains.annotations.Nullable java.util.Map getTriggersReplaceInput() { return java.util.Optional.ofNullable((java.util.Map)(software.amazon.jsii.Kernel.get(this, "triggersReplaceInput", software.amazon.jsii.NativeType.mapOf(software.amazon.jsii.NativeType.forClass(java.lang.Object.class))))).map(java.util.Collections::unmodifiableMap).orElse(null); } /** * (experimental) (Optional) A value which will be stored in the instance state, and reflected in the output attribute after apply. *

* https://developer.hashicorp.com/terraform/language/resources/terraform-data#input */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public @org.jetbrains.annotations.NotNull java.util.Map getInput() { return java.util.Collections.unmodifiableMap(software.amazon.jsii.Kernel.get(this, "input", software.amazon.jsii.NativeType.mapOf(software.amazon.jsii.NativeType.forClass(java.lang.Object.class)))); } /** * (experimental) (Optional) A value which will be stored in the instance state, and reflected in the output attribute after apply. *

* https://developer.hashicorp.com/terraform/language/resources/terraform-data#input */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public void setInput(final @org.jetbrains.annotations.NotNull java.util.Map value) { software.amazon.jsii.Kernel.set(this, "input", java.util.Objects.requireNonNull(value, "input is required")); } /** * (experimental) (Optional) A value which is stored in the instance state, and will force replacement when the value changes. *

* https://developer.hashicorp.com/terraform/language/resources/terraform-data#triggers_replace */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public @org.jetbrains.annotations.NotNull java.util.Map getTriggersReplace() { return java.util.Collections.unmodifiableMap(software.amazon.jsii.Kernel.get(this, "triggersReplace", software.amazon.jsii.NativeType.mapOf(software.amazon.jsii.NativeType.forClass(java.lang.Object.class)))); } /** * (experimental) (Optional) A value which is stored in the instance state, and will force replacement when the value changes. *

* https://developer.hashicorp.com/terraform/language/resources/terraform-data#triggers_replace */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public void setTriggersReplace(final @org.jetbrains.annotations.NotNull java.util.Map value) { software.amazon.jsii.Kernel.set(this, "triggersReplace", java.util.Objects.requireNonNull(value, "triggersReplace is required")); } /** * (experimental) A fluent builder for {@link com.hashicorp.cdktf.DataResource}. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public static final class Builder implements software.amazon.jsii.Builder { /** * @return a new instance of {@link Builder}. * @param scope The scope in which to define this construct. This parameter is required. * @param id The scoped construct ID. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public static Builder create(final software.constructs.Construct scope, final java.lang.String id) { return new Builder(scope, id); } private final software.constructs.Construct scope; private final java.lang.String id; private com.hashicorp.cdktf.DataConfig.Builder config; private Builder(final software.constructs.Construct scope, final java.lang.String id) { this.scope = scope; this.id = id; } /** * @return {@code this} * @param connection This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder connection(final com.hashicorp.cdktf.SSHProvisionerConnection connection) { this.config().connection(connection); return this; } /** * @return {@code this} * @param connection This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder connection(final com.hashicorp.cdktf.WinrmProvisionerConnection connection) { this.config().connection(connection); return this; } /** * @return {@code this} * @param count This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder count(final java.lang.Number count) { this.config().count(count); return this; } /** * @return {@code this} * @param count This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder count(final com.hashicorp.cdktf.TerraformCount count) { this.config().count(count); return this; } /** * @return {@code this} * @param dependsOn This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder dependsOn(final java.util.List dependsOn) { this.config().dependsOn(dependsOn); return this; } /** * @return {@code this} * @param forEach This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder forEach(final com.hashicorp.cdktf.ITerraformIterator forEach) { this.config().forEach(forEach); return this; } /** * @return {@code this} * @param lifecycle This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder lifecycle(final com.hashicorp.cdktf.TerraformResourceLifecycle lifecycle) { this.config().lifecycle(lifecycle); return this; } /** * @return {@code this} * @param provider This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder provider(final com.hashicorp.cdktf.TerraformProvider provider) { this.config().provider(provider); return this; } /** * @return {@code this} * @param provisioners This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder provisioners(final java.util.List provisioners) { this.config().provisioners(provisioners); return this; } /** * (experimental) (Optional) A value which will be stored in the instance state, and reflected in the output attribute after apply. *

* https://developer.hashicorp.com/terraform/language/resources/terraform-data#input *

* @return {@code this} * @param input (Optional) A value which will be stored in the instance state, and reflected in the output attribute after apply. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder input(final java.util.Map input) { this.config().input(input); return this; } /** * (experimental) (Optional) A value which is stored in the instance state, and will force replacement when the value changes. *

* https://developer.hashicorp.com/terraform/language/resources/terraform-data#triggers_replace *

* @return {@code this} * @param triggersReplace (Optional) A value which is stored in the instance state, and will force replacement when the value changes. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder triggersReplace(final java.util.Map triggersReplace) { this.config().triggersReplace(triggersReplace); return this; } /** * @return a newly built instance of {@link com.hashicorp.cdktf.DataResource}. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @Override public com.hashicorp.cdktf.DataResource build() { return new com.hashicorp.cdktf.DataResource( this.scope, this.id, this.config != null ? this.config.build() : null ); } private com.hashicorp.cdktf.DataConfig.Builder config() { if (this.config == null) { this.config = new com.hashicorp.cdktf.DataConfig.Builder(); } return this.config; } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy