com.pulumi.awsnative.datasync.kotlin.Agent.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-aws-native-kotlin Show documentation
Show all versions of pulumi-aws-native-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.datasync.kotlin
import com.pulumi.awsnative.datasync.kotlin.enums.AgentEndpointType
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.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import com.pulumi.awsnative.datasync.kotlin.enums.AgentEndpointType.Companion.toKotlin as agentEndpointTypeToKotlin
import com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin as tagToKotlin
/**
* Builder for [Agent].
*/
@PulumiTagMarker
public class AgentResourceBuilder internal constructor() {
public var name: String? = null
public var args: AgentArgs = AgentArgs()
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 AgentArgsBuilder.() -> Unit) {
val builder = AgentArgsBuilder()
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(): Agent {
val builtJavaResource = com.pulumi.awsnative.datasync.Agent(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return Agent(builtJavaResource)
}
}
/**
* Resource schema for AWS::DataSync::Agent.
* ## Example Usage
* ### Example
* No Java example available.
* ### Example
* No Java example available.
*/
public class Agent internal constructor(
override val javaResource: com.pulumi.awsnative.datasync.Agent,
) : KotlinCustomResource(javaResource, AgentMapper) {
/**
* Activation key of the Agent.
*/
public val activationKey: Output?
get() = javaResource.activationKey().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The DataSync Agent ARN.
*/
public val agentArn: Output
get() = javaResource.agentArn().applyValue({ args0 -> args0 })
/**
* The name configured for the agent. Text reference used to identify the agent in the console.
*/
public val agentName: Output?
get() = javaResource.agentName().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* The service endpoints that the agent will connect to.
*/
public val endpointType: Output
get() = javaResource.endpointType().applyValue({ args0 ->
args0.let({ args0 ->
agentEndpointTypeToKotlin(args0)
})
})
/**
* The ARNs of the security group used to protect your data transfer task subnets.
*/
public val securityGroupArns: Output>?
get() = javaResource.securityGroupArns().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 -> args0 })
}).orElse(null)
})
/**
* The ARNs of the subnets in which DataSync will create elastic network interfaces for each data transfer task.
*/
public val subnetArns: Output>?
get() = javaResource.subnetArns().applyValue({ args0 ->
args0.map({ 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)
})
/**
* The ID of the VPC endpoint that the agent has access to.
*/
public val vpcEndpointId: Output?
get() = javaResource.vpcEndpointId().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
}
public object AgentMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.datasync.Agent::class == javaResource::class
override fun map(javaResource: Resource): Agent = Agent(
javaResource as
com.pulumi.awsnative.datasync.Agent,
)
}
/**
* @see [Agent].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [Agent].
*/
public suspend fun agent(name: String, block: suspend AgentResourceBuilder.() -> Unit): Agent {
val builder = AgentResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [Agent].
* @param name The _unique_ name of the resulting resource.
*/
public fun agent(name: String): Agent {
val builder = AgentResourceBuilder()
builder.name(name)
return builder.build()
}