![JAR search and dependency download from the Maven repository](/logo.png)
com.pulumi.awsnative.apigateway.kotlin.Account.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.apigateway.kotlin
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
/**
* Builder for [Account].
*/
@PulumiTagMarker
public class AccountResourceBuilder internal constructor() {
public var name: String? = null
public var args: AccountArgs = AccountArgs()
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 AccountArgsBuilder.() -> Unit) {
val builder = AccountArgsBuilder()
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(): Account {
val builtJavaResource = com.pulumi.awsnative.apigateway.Account(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return Account(builtJavaResource)
}
}
/**
* The ``AWS::ApiGateway::Account`` resource specifies the IAM role that Amazon API Gateway uses to write API logs to Amazon CloudWatch Logs. To avoid overwriting other roles, you should only have one ``AWS::ApiGateway::Account`` resource per region per account.
*/
public class Account internal constructor(
override val javaResource: com.pulumi.awsnative.apigateway.Account,
) : KotlinCustomResource(javaResource, AccountMapper) {
/**
* The ID for the account. For example: `abc123` .
*/
public val awsId: Output
get() = javaResource.awsId().applyValue({ args0 -> args0 })
/**
* The ARN of an Amazon CloudWatch role for the current Account.
*/
public val cloudWatchRoleArn: Output?
get() = javaResource.cloudWatchRoleArn().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
}
public object AccountMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.apigateway.Account::class == javaResource::class
override fun map(javaResource: Resource): Account = Account(
javaResource as
com.pulumi.awsnative.apigateway.Account,
)
}
/**
* @see [Account].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [Account].
*/
public suspend fun account(name: String, block: suspend AccountResourceBuilder.() -> Unit): Account {
val builder = AccountResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [Account].
* @param name The _unique_ name of the resulting resource.
*/
public fun account(name: String): Account {
val builder = AccountResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy