com.pulumi.awsnative.quicksight.kotlin.DataSource.kt Maven / Gradle / Ivy
Show all versions of pulumi-aws-native-kotlin Show documentation
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.quicksight.kotlin
import com.pulumi.awsnative.kotlin.outputs.Tag
import com.pulumi.awsnative.quicksight.kotlin.enums.DataSourceResourceStatus
import com.pulumi.awsnative.quicksight.kotlin.enums.DataSourceType
import com.pulumi.awsnative.quicksight.kotlin.outputs.DataSourceCredentials
import com.pulumi.awsnative.quicksight.kotlin.outputs.DataSourceErrorInfo
import com.pulumi.awsnative.quicksight.kotlin.outputs.DataSourceParameters
import com.pulumi.awsnative.quicksight.kotlin.outputs.DataSourceResourcePermission
import com.pulumi.awsnative.quicksight.kotlin.outputs.DataSourceSslProperties
import com.pulumi.awsnative.quicksight.kotlin.outputs.DataSourceVpcConnectionProperties
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.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin as tagToKotlin
import com.pulumi.awsnative.quicksight.kotlin.enums.DataSourceResourceStatus.Companion.toKotlin as dataSourceResourceStatusToKotlin
import com.pulumi.awsnative.quicksight.kotlin.enums.DataSourceType.Companion.toKotlin as dataSourceTypeToKotlin
import com.pulumi.awsnative.quicksight.kotlin.outputs.DataSourceCredentials.Companion.toKotlin as dataSourceCredentialsToKotlin
import com.pulumi.awsnative.quicksight.kotlin.outputs.DataSourceErrorInfo.Companion.toKotlin as dataSourceErrorInfoToKotlin
import com.pulumi.awsnative.quicksight.kotlin.outputs.DataSourceParameters.Companion.toKotlin as dataSourceParametersToKotlin
import com.pulumi.awsnative.quicksight.kotlin.outputs.DataSourceResourcePermission.Companion.toKotlin as dataSourceResourcePermissionToKotlin
import com.pulumi.awsnative.quicksight.kotlin.outputs.DataSourceSslProperties.Companion.toKotlin as dataSourceSslPropertiesToKotlin
import com.pulumi.awsnative.quicksight.kotlin.outputs.DataSourceVpcConnectionProperties.Companion.toKotlin as dataSourceVpcConnectionPropertiesToKotlin
/**
* 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.quicksight.DataSource(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return DataSource(builtJavaResource)
}
}
/**
* Definition of the AWS::QuickSight::DataSource Resource Type.
*/
public class DataSource internal constructor(
override val javaResource: com.pulumi.awsnative.quicksight.DataSource,
) : KotlinCustomResource(javaResource, DataSourceMapper) {
/**
* A set of alternate data source parameters that you want to share for the credentials
* stored with this data source. The credentials are applied in tandem with the data source
* parameters when you copy a data source by using a create or update request. The API
* operation compares the DataSourceParameters
structure that's in the request
* with the structures in the AlternateDataSourceParameters
allow list. If the
* structures are an exact match, the request is allowed to use the credentials from this
* existing data source. If the AlternateDataSourceParameters
list is null,
* the Credentials
originally used with this DataSourceParameters
* are automatically allowed.
*/
public val alternateDataSourceParameters: Output>?
get() = javaResource.alternateDataSourceParameters().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
dataSourceParametersToKotlin(args0)
})
})
}).orElse(null)
})
/**
* The Amazon Resource Name (ARN) of the data source.
*/
public val arn: Output
get() = javaResource.arn().applyValue({ args0 -> args0 })
/**
* The AWS account ID.
*/
public val awsAccountId: Output?
get() = javaResource.awsAccountId().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The time that this data source was created.
*/
public val createdTime: Output
get() = javaResource.createdTime().applyValue({ args0 -> args0 })
/**
* The credentials Amazon QuickSight that uses to connect to your underlying source. Currently, only credentials based on user name and password are supported.
*/
public val credentials: Output?
get() = javaResource.credentials().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
dataSourceCredentialsToKotlin(args0)
})
}).orElse(null)
})
/**
* An ID for the data source. This ID is unique per AWS Region for each AWS account.
*/
public val dataSourceId: Output?
get() = javaResource.dataSourceId().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The parameters that Amazon QuickSight uses to connect to your underlying source.
*/
public val dataSourceParameters: Output?
get() = javaResource.dataSourceParameters().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> dataSourceParametersToKotlin(args0) })
}).orElse(null)
})
/**
* Error information from the last update or the creation of the data source.
*/
public val errorInfo: Output?
get() = javaResource.errorInfo().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
dataSourceErrorInfoToKotlin(args0)
})
}).orElse(null)
})
/**
* The last time that this data source was updated.
*/
public val lastUpdatedTime: Output
get() = javaResource.lastUpdatedTime().applyValue({ args0 -> args0 })
/**
* A display name for the data source.
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* A list of resource permissions on the data source.
*/
public val permissions: Output>?
get() = javaResource.permissions().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> dataSourceResourcePermissionToKotlin(args0) })
})
}).orElse(null)
})
/**
* Secure Socket Layer (SSL) properties that apply when Amazon QuickSight connects to your underlying source.
*/
public val sslProperties: Output?
get() = javaResource.sslProperties().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> dataSourceSslPropertiesToKotlin(args0) })
}).orElse(null)
})
/**
* The HTTP status of the request.
*/
public val status: Output
get() = javaResource.status().applyValue({ args0 ->
args0.let({ args0 ->
dataSourceResourceStatusToKotlin(args0)
})
})
/**
* Contains a map of the key-value pairs for the resource tag or tags assigned to the data source.
*/
public val tags: Output>?
get() = javaResource.tags().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> tagToKotlin(args0) })
})
}).orElse(null)
})
/**
* The type of the data source. To return a list of all data sources, use `ListDataSources` .
* Use `AMAZON_ELASTICSEARCH` for Amazon OpenSearch Service.
*/
public val type: Output
get() = javaResource.type().applyValue({ args0 ->
args0.let({ args0 ->
dataSourceTypeToKotlin(args0)
})
})
/**
* Use this parameter only when you want Amazon QuickSight to use a VPC connection when connecting to your underlying source.
*/
public val vpcConnectionProperties: Output?
get() = javaResource.vpcConnectionProperties().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> dataSourceVpcConnectionPropertiesToKotlin(args0) })
}).orElse(null)
})
}
public object DataSourceMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.quicksight.DataSource::class == javaResource::class
override fun map(javaResource: Resource): DataSource = DataSource(
javaResource as
com.pulumi.awsnative.quicksight.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()
}