com.pulumi.awsnative.datazone.kotlin.DataSource.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.datazone.kotlin
import com.pulumi.awsnative.datazone.kotlin.enums.DataSourceEnableSetting
import com.pulumi.awsnative.datazone.kotlin.enums.DataSourceStatus
import com.pulumi.awsnative.datazone.kotlin.outputs.DataSourceConfigurationInput0Properties
import com.pulumi.awsnative.datazone.kotlin.outputs.DataSourceConfigurationInput1Properties
import com.pulumi.awsnative.datazone.kotlin.outputs.DataSourceFormInput
import com.pulumi.awsnative.datazone.kotlin.outputs.DataSourceRecommendationConfiguration
import com.pulumi.awsnative.datazone.kotlin.outputs.DataSourceScheduleConfiguration
import com.pulumi.core.Either
import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.Double
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import com.pulumi.awsnative.datazone.kotlin.enums.DataSourceEnableSetting.Companion.toKotlin as dataSourceEnableSettingToKotlin
import com.pulumi.awsnative.datazone.kotlin.enums.DataSourceStatus.Companion.toKotlin as dataSourceStatusToKotlin
import com.pulumi.awsnative.datazone.kotlin.outputs.DataSourceFormInput.Companion.toKotlin as dataSourceFormInputToKotlin
import com.pulumi.awsnative.datazone.kotlin.outputs.DataSourceRecommendationConfiguration.Companion.toKotlin as dataSourceRecommendationConfigurationToKotlin
import com.pulumi.awsnative.datazone.kotlin.outputs.DataSourceScheduleConfiguration.Companion.toKotlin as dataSourceScheduleConfigurationToKotlin
/**
* Builder for [DataSource].
*/
@PulumiTagMarker
public class DataSourceResourceBuilder internal constructor() {
public var name: String? = null
public var args: DataSourceArgs = DataSourceArgs()
public var opts: CustomResourceOptions = CustomResourceOptions()
/**
* @param name The _unique_ name of the resulting resource.
*/
public fun name(`value`: String) {
this.name = value
}
/**
* @param block The arguments to use to populate this resource's properties.
*/
public suspend fun args(block: suspend DataSourceArgsBuilder.() -> Unit) {
val builder = DataSourceArgsBuilder()
block(builder)
this.args = builder.build()
}
/**
* @param block A bag of options that control this resource's behavior.
*/
public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
}
internal fun build(): DataSource {
val builtJavaResource = com.pulumi.awsnative.datazone.DataSource(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return DataSource(builtJavaResource)
}
}
/**
* A data source is used to import technical metadata of assets (data) from the source databases or data warehouses into Amazon DataZone.
*/
public class DataSource internal constructor(
override val javaResource: com.pulumi.awsnative.datazone.DataSource,
) : KotlinCustomResource(javaResource, DataSourceMapper) {
/**
* The metadata forms that are to be attached to the assets that this data source works with.
*/
public val assetFormsInput: Output>?
get() = javaResource.assetFormsInput().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
dataSourceFormInputToKotlin(args0)
})
})
}).orElse(null)
})
/**
* The unique identifier of the data source.
*/
public val awsId: Output
get() = javaResource.awsId().applyValue({ args0 -> args0 })
/**
* Configuration of the data source. It can be set to either glueRunConfiguration or redshiftRunConfiguration.
*/
public val configuration:
Output>?
get() = javaResource.configuration().applyValue({ args0 ->
args0.map({ args0 ->
args0.transform(
{ args0 ->
args0.let({ args0 ->
com.pulumi.awsnative.datazone.kotlin.outputs.DataSourceConfigurationInput0Properties.Companion.toKotlin(args0)
})
},
{ args0 ->
args0.let({ args0 ->
com.pulumi.awsnative.datazone.kotlin.outputs.DataSourceConfigurationInput1Properties.Companion.toKotlin(args0)
})
},
)
}).orElse(null)
})
/**
* The timestamp of when the data source was created.
*/
public val createdAt: Output
get() = javaResource.createdAt().applyValue({ args0 -> args0 })
/**
* The description of the data source.
*/
public val description: Output?
get() = javaResource.description().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The ID of the Amazon DataZone domain where the data source is created.
*/
public val domainId: Output
get() = javaResource.domainId().applyValue({ args0 -> args0 })
/**
* The ID of the Amazon DataZone domain where the data source is created.
*/
public val domainIdentifier: Output
get() = javaResource.domainIdentifier().applyValue({ args0 -> args0 })
/**
* Specifies whether the data source is enabled.
*/
public val enableSetting: Output?
get() = javaResource.enableSetting().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> dataSourceEnableSettingToKotlin(args0) })
}).orElse(null)
})
/**
* The unique identifier of the Amazon DataZone environment to which the data source publishes assets.
*/
public val environmentId: Output
get() = javaResource.environmentId().applyValue({ args0 -> args0 })
/**
* The unique identifier of the Amazon DataZone environment to which the data source publishes assets.
*/
public val environmentIdentifier: Output
get() = javaResource.environmentIdentifier().applyValue({ args0 -> args0 })
/**
* The number of assets created by the data source during its last run.
*/
public val lastRunAssetCount: Output
get() = javaResource.lastRunAssetCount().applyValue({ args0 -> args0 })
/**
* The timestamp that specifies when the data source was last run.
*/
public val lastRunAt: Output
get() = javaResource.lastRunAt().applyValue({ args0 -> args0 })
/**
* The status of the last run of this data source.
*/
public val lastRunStatus: Output
get() = javaResource.lastRunStatus().applyValue({ args0 -> args0 })
/**
* The name of the data source.
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* The ID of the Amazon DataZone project to which the data source is added.
*/
public val projectId: Output
get() = javaResource.projectId().applyValue({ args0 -> args0 })
/**
* The identifier of the Amazon DataZone project in which you want to add the data source.
*/
public val projectIdentifier: Output
get() = javaResource.projectIdentifier().applyValue({ args0 -> args0 })
/**
* Specifies whether the assets that this data source creates in the inventory are to be also automatically published to the catalog.
*/
public val publishOnImport: Output?
get() = javaResource.publishOnImport().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Specifies whether the business name generation is to be enabled for this data source.
*/
public val recommendation: Output?
get() = javaResource.recommendation().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> dataSourceRecommendationConfigurationToKotlin(args0) })
}).orElse(null)
})
/**
* The schedule of the data source runs.
*/
public val schedule: Output?
get() = javaResource.schedule().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
dataSourceScheduleConfigurationToKotlin(args0)
})
}).orElse(null)
})
/**
* The status of the data source.
*/
public val status: Output
get() = javaResource.status().applyValue({ args0 ->
args0.let({ args0 ->
dataSourceStatusToKotlin(args0)
})
})
/**
* The type of the data source.
*/
public val type: Output
get() = javaResource.type().applyValue({ args0 -> args0 })
/**
* The timestamp of when this data source was updated.
*/
public val updatedAt: Output
get() = javaResource.updatedAt().applyValue({ args0 -> args0 })
}
public object DataSourceMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.datazone.DataSource::class == javaResource::class
override fun map(javaResource: Resource): DataSource = DataSource(
javaResource as
com.pulumi.awsnative.datazone.DataSource,
)
}
/**
* @see [DataSource].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [DataSource].
*/
public suspend fun dataSource(name: String, block: suspend DataSourceResourceBuilder.() -> Unit): DataSource {
val builder = DataSourceResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [DataSource].
* @param name The _unique_ name of the resulting resource.
*/
public fun dataSource(name: String): DataSource {
val builder = DataSourceResourceBuilder()
builder.name(name)
return builder.build()
}