![JAR search and dependency download from the Maven repository](/logo.png)
com.pulumi.awsnative.datasync.kotlin.LocationObjectStorage.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.datasync.kotlin
import com.pulumi.awsnative.datasync.kotlin.enums.LocationObjectStorageServerProtocol
import com.pulumi.awsnative.kotlin.outputs.Tag
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.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import com.pulumi.awsnative.datasync.kotlin.enums.LocationObjectStorageServerProtocol.Companion.toKotlin as locationObjectStorageServerProtocolToKotlin
import com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin as tagToKotlin
/**
* Builder for [LocationObjectStorage].
*/
@PulumiTagMarker
public class LocationObjectStorageResourceBuilder internal constructor() {
public var name: String? = null
public var args: LocationObjectStorageArgs = LocationObjectStorageArgs()
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 LocationObjectStorageArgsBuilder.() -> Unit) {
val builder = LocationObjectStorageArgsBuilder()
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(): LocationObjectStorage {
val builtJavaResource =
com.pulumi.awsnative.datasync.LocationObjectStorage(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return LocationObjectStorage(builtJavaResource)
}
}
/**
* Resource schema for AWS::DataSync::LocationObjectStorage.
* ## Example Usage
* ### Example
* No Java example available.
*/
public class LocationObjectStorage internal constructor(
override val javaResource: com.pulumi.awsnative.datasync.LocationObjectStorage,
) : KotlinCustomResource(javaResource, LocationObjectStorageMapper) {
/**
* Optional. The access key is used if credentials are required to access the self-managed object storage server.
*/
public val accessKey: Output?
get() = javaResource.accessKey().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* The Amazon Resource Name (ARN) of the agents associated with the self-managed object storage server location.
*/
public val agentArns: Output>
get() = javaResource.agentArns().applyValue({ args0 -> args0.map({ args0 -> args0 }) })
/**
* The name of the bucket on the self-managed object storage server.
*/
public val bucketName: Output?
get() = javaResource.bucketName().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The Amazon Resource Name (ARN) of the location that is created.
*/
public val locationArn: Output
get() = javaResource.locationArn().applyValue({ args0 -> args0 })
/**
* The URL of the object storage location that was described.
*/
public val locationUri: Output
get() = javaResource.locationUri().applyValue({ args0 -> args0 })
/**
* Optional. The secret key is used if credentials are required to access the self-managed object storage server.
*/
public val secretKey: Output?
get() = javaResource.secretKey().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* X.509 PEM content containing a certificate authority or chain to trust.
*/
public val serverCertificate: Output?
get() = javaResource.serverCertificate().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The name of the self-managed object storage server. This value is the IP address or Domain Name Service (DNS) name of the object storage server.
*/
public val serverHostname: Output?
get() = javaResource.serverHostname().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The port that your self-managed server accepts inbound network traffic on.
*/
public val serverPort: Output?
get() = javaResource.serverPort().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The protocol that the object storage server uses to communicate.
*/
public val serverProtocol: Output?
get() = javaResource.serverProtocol().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> locationObjectStorageServerProtocolToKotlin(args0) })
}).orElse(null)
})
/**
* The subdirectory in the self-managed object storage server that is used to read data from.
*/
public val subdirectory: Output?
get() = javaResource.subdirectory().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* An array of key-value pairs to apply to this resource.
*/
public val tags: Output>?
get() = javaResource.tags().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> tagToKotlin(args0) })
})
}).orElse(null)
})
}
public object LocationObjectStorageMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.datasync.LocationObjectStorage::class == javaResource::class
override fun map(javaResource: Resource): LocationObjectStorage =
LocationObjectStorage(javaResource as com.pulumi.awsnative.datasync.LocationObjectStorage)
}
/**
* @see [LocationObjectStorage].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [LocationObjectStorage].
*/
public suspend fun locationObjectStorage(
name: String,
block: suspend LocationObjectStorageResourceBuilder.() -> Unit,
): LocationObjectStorage {
val builder = LocationObjectStorageResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [LocationObjectStorage].
* @param name The _unique_ name of the resulting resource.
*/
public fun locationObjectStorage(name: String): LocationObjectStorage {
val builder = LocationObjectStorageResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy