com.hashicorp.cdktf.TerraformDataSource Maven / Gradle / Ivy
package com.hashicorp.cdktf;
/**
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.98.0 (build 00b106d)", date = "2024-05-27T11:46:32.260Z")
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@software.amazon.jsii.Jsii(module = com.hashicorp.cdktf.$Module.class, fqn = "cdktf.TerraformDataSource")
public class TerraformDataSource extends com.hashicorp.cdktf.TerraformElement implements com.hashicorp.cdktf.ITerraformResource, com.hashicorp.cdktf.ITerraformDependable, com.hashicorp.cdktf.IInterpolatingParent {
protected TerraformDataSource(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
}
protected TerraformDataSource(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
super(initializationMode);
}
/**
* @param scope This parameter is required.
* @param id This parameter is required.
* @param config This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public TerraformDataSource(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull com.hashicorp.cdktf.TerraformResourceConfig 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"), java.util.Objects.requireNonNull(config, "config is required") });
}
/**
* @param x This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public static @org.jetbrains.annotations.NotNull java.lang.Boolean isTerraformDataSource(final @org.jetbrains.annotations.NotNull java.lang.Object x) {
return software.amazon.jsii.JsiiObject.jsiiStaticCall(com.hashicorp.cdktf.TerraformDataSource.class, "isTerraformDataSource", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class), new Object[] { x });
}
/**
* @param terraformAttribute This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.NotNull java.util.Map getAnyMapAttribute(final @org.jetbrains.annotations.NotNull java.lang.String terraformAttribute) {
return java.util.Collections.unmodifiableMap(software.amazon.jsii.Kernel.call(this, "getAnyMapAttribute", software.amazon.jsii.NativeType.mapOf(software.amazon.jsii.NativeType.forClass(java.lang.Object.class)), new Object[] { java.util.Objects.requireNonNull(terraformAttribute, "terraformAttribute is required") }));
}
/**
* @param terraformAttribute This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.NotNull com.hashicorp.cdktf.IResolvable getBooleanAttribute(final @org.jetbrains.annotations.NotNull java.lang.String terraformAttribute) {
return software.amazon.jsii.Kernel.call(this, "getBooleanAttribute", software.amazon.jsii.NativeType.forClass(com.hashicorp.cdktf.IResolvable.class), new Object[] { java.util.Objects.requireNonNull(terraformAttribute, "terraformAttribute is required") });
}
/**
* @param terraformAttribute This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.NotNull java.util.Map getBooleanMapAttribute(final @org.jetbrains.annotations.NotNull java.lang.String terraformAttribute) {
return java.util.Collections.unmodifiableMap(software.amazon.jsii.Kernel.call(this, "getBooleanMapAttribute", software.amazon.jsii.NativeType.mapOf(software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class)), new Object[] { java.util.Objects.requireNonNull(terraformAttribute, "terraformAttribute is required") }));
}
/**
* @param terraformAttribute This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.NotNull java.util.List getListAttribute(final @org.jetbrains.annotations.NotNull java.lang.String terraformAttribute) {
return java.util.Collections.unmodifiableList(software.amazon.jsii.Kernel.call(this, "getListAttribute", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class)), new Object[] { java.util.Objects.requireNonNull(terraformAttribute, "terraformAttribute is required") }));
}
/**
* @param terraformAttribute This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.NotNull java.lang.Number getNumberAttribute(final @org.jetbrains.annotations.NotNull java.lang.String terraformAttribute) {
return software.amazon.jsii.Kernel.call(this, "getNumberAttribute", software.amazon.jsii.NativeType.forClass(java.lang.Number.class), new Object[] { java.util.Objects.requireNonNull(terraformAttribute, "terraformAttribute is required") });
}
/**
* @param terraformAttribute This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.NotNull java.util.List getNumberListAttribute(final @org.jetbrains.annotations.NotNull java.lang.String terraformAttribute) {
return java.util.Collections.unmodifiableList(software.amazon.jsii.Kernel.call(this, "getNumberListAttribute", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.Number.class)), new Object[] { java.util.Objects.requireNonNull(terraformAttribute, "terraformAttribute is required") }));
}
/**
* @param terraformAttribute This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.NotNull java.util.Map getNumberMapAttribute(final @org.jetbrains.annotations.NotNull java.lang.String terraformAttribute) {
return java.util.Collections.unmodifiableMap(software.amazon.jsii.Kernel.call(this, "getNumberMapAttribute", software.amazon.jsii.NativeType.mapOf(software.amazon.jsii.NativeType.forClass(java.lang.Number.class)), new Object[] { java.util.Objects.requireNonNull(terraformAttribute, "terraformAttribute is required") }));
}
/**
* @param terraformAttribute This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.NotNull java.lang.String getStringAttribute(final @org.jetbrains.annotations.NotNull java.lang.String terraformAttribute) {
return software.amazon.jsii.Kernel.call(this, "getStringAttribute", software.amazon.jsii.NativeType.forClass(java.lang.String.class), new Object[] { java.util.Objects.requireNonNull(terraformAttribute, "terraformAttribute is required") });
}
/**
* @param terraformAttribute This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.NotNull java.util.Map getStringMapAttribute(final @org.jetbrains.annotations.NotNull java.lang.String terraformAttribute) {
return java.util.Collections.unmodifiableMap(software.amazon.jsii.Kernel.call(this, "getStringMapAttribute", software.amazon.jsii.NativeType.mapOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class)), new Object[] { java.util.Objects.requireNonNull(terraformAttribute, "terraformAttribute is required") }));
}
/**
* @param terraformAttribute This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public @org.jetbrains.annotations.NotNull com.hashicorp.cdktf.IResolvable interpolationForAttribute(final @org.jetbrains.annotations.NotNull java.lang.String terraformAttribute) {
return software.amazon.jsii.Kernel.call(this, "interpolationForAttribute", software.amazon.jsii.NativeType.forClass(com.hashicorp.cdktf.IResolvable.class), new Object[] { java.util.Objects.requireNonNull(terraformAttribute, "terraformAttribute is required") });
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
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)
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))));
}
/**
* (experimental) Adds this resource to the terraform JSON output.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public @org.jetbrains.annotations.NotNull java.lang.Object toHclTerraform() {
return software.amazon.jsii.Kernel.call(this, "toHclTerraform", software.amazon.jsii.NativeType.forClass(java.lang.Object.class));
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public @org.jetbrains.annotations.NotNull java.lang.Object toMetadata() {
return software.amazon.jsii.Kernel.call(this, "toMetadata", software.amazon.jsii.NativeType.forClass(java.lang.Object.class));
}
/**
* (experimental) Adds this resource to the terraform JSON output.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public @org.jetbrains.annotations.NotNull java.lang.Object toTerraform() {
return software.amazon.jsii.Kernel.call(this, "toTerraform", software.amazon.jsii.NativeType.forClass(java.lang.Object.class));
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.NotNull java.util.Map getTerraformMetaArguments() {
return java.util.Collections.unmodifiableMap(software.amazon.jsii.Kernel.get(this, "terraformMetaArguments", software.amazon.jsii.NativeType.mapOf(software.amazon.jsii.NativeType.forClass(java.lang.Object.class))));
}
/**
*/
@Override
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.NotNull java.lang.String getTerraformResourceType() {
return software.amazon.jsii.Kernel.get(this, "terraformResourceType", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.Nullable com.hashicorp.cdktf.TerraformProviderGeneratorMetadata getTerraformGeneratorMetadata() {
return software.amazon.jsii.Kernel.get(this, "terraformGeneratorMetadata", software.amazon.jsii.NativeType.forClass(com.hashicorp.cdktf.TerraformProviderGeneratorMetadata.class));
}
/**
*/
@Override
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.Nullable java.lang.Object getCount() {
return software.amazon.jsii.Kernel.get(this, "count", software.amazon.jsii.NativeType.forClass(java.lang.Object.class));
}
/**
*/
@Override
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public void setCount(final @org.jetbrains.annotations.Nullable java.lang.Number value) {
software.amazon.jsii.Kernel.set(this, "count", value);
}
/**
*/
@Override
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public void setCount(final @org.jetbrains.annotations.Nullable com.hashicorp.cdktf.TerraformCount value) {
software.amazon.jsii.Kernel.set(this, "count", value);
}
/**
*/
@Override
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.Nullable java.util.List getDependsOn() {
return java.util.Optional.ofNullable((java.util.List)(software.amazon.jsii.Kernel.get(this, "dependsOn", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class))))).map(java.util.Collections::unmodifiableList).orElse(null);
}
/**
*/
@Override
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public void setDependsOn(final @org.jetbrains.annotations.Nullable java.util.List value) {
software.amazon.jsii.Kernel.set(this, "dependsOn", value);
}
/**
*/
@Override
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.Nullable com.hashicorp.cdktf.ITerraformIterator getForEach() {
return software.amazon.jsii.Kernel.get(this, "forEach", software.amazon.jsii.NativeType.forClass(com.hashicorp.cdktf.ITerraformIterator.class));
}
/**
*/
@Override
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public void setForEach(final @org.jetbrains.annotations.Nullable com.hashicorp.cdktf.ITerraformIterator value) {
software.amazon.jsii.Kernel.set(this, "forEach", value);
}
/**
*/
@Override
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.Nullable com.hashicorp.cdktf.TerraformResourceLifecycle getLifecycle() {
return software.amazon.jsii.Kernel.get(this, "lifecycle", software.amazon.jsii.NativeType.forClass(com.hashicorp.cdktf.TerraformResourceLifecycle.class));
}
/**
*/
@Override
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public void setLifecycle(final @org.jetbrains.annotations.Nullable com.hashicorp.cdktf.TerraformResourceLifecycle value) {
software.amazon.jsii.Kernel.set(this, "lifecycle", value);
}
/**
*/
@Override
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.Nullable com.hashicorp.cdktf.TerraformProvider getProvider() {
return software.amazon.jsii.Kernel.get(this, "provider", software.amazon.jsii.NativeType.forClass(com.hashicorp.cdktf.TerraformProvider.class));
}
/**
*/
@Override
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public void setProvider(final @org.jetbrains.annotations.Nullable com.hashicorp.cdktf.TerraformProvider value) {
software.amazon.jsii.Kernel.set(this, "provider", value);
}
/**
* (experimental) A fluent builder for {@link com.hashicorp.cdktf.TerraformDataSource}.
*/
@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 This parameter is required.
* @param 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 final com.hashicorp.cdktf.TerraformResourceConfig.Builder config;
private Builder(final software.constructs.Construct scope, final java.lang.String id) {
this.scope = scope;
this.id = id;
this.config = new com.hashicorp.cdktf.TerraformResourceConfig.Builder();
}
/**
* @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 extends com.hashicorp.cdktf.ITerraformDependable> 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 extends java.lang.Object> provisioners) {
this.config.provisioners(provisioners);
return this;
}
/**
* @return {@code this}
* @param terraformResourceType This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder terraformResourceType(final java.lang.String terraformResourceType) {
this.config.terraformResourceType(terraformResourceType);
return this;
}
/**
* @return {@code this}
* @param terraformGeneratorMetadata This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder terraformGeneratorMetadata(final com.hashicorp.cdktf.TerraformProviderGeneratorMetadata terraformGeneratorMetadata) {
this.config.terraformGeneratorMetadata(terraformGeneratorMetadata);
return this;
}
/**
* @return a newly built instance of {@link com.hashicorp.cdktf.TerraformDataSource}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public com.hashicorp.cdktf.TerraformDataSource build() {
return new com.hashicorp.cdktf.TerraformDataSource(
this.scope,
this.id,
this.config.build()
);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy