
com.pulumi.gcp.apigee.kotlin.InstanceAttachment.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.gcp.apigee.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 [InstanceAttachment].
*/
@PulumiTagMarker
public class InstanceAttachmentResourceBuilder internal constructor() {
public var name: String? = null
public var args: InstanceAttachmentArgs = InstanceAttachmentArgs()
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 InstanceAttachmentArgsBuilder.() -> Unit) {
val builder = InstanceAttachmentArgsBuilder()
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(): InstanceAttachment {
val builtJavaResource = com.pulumi.gcp.apigee.InstanceAttachment(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return InstanceAttachment(builtJavaResource)
}
}
/**
* An `Instance attachment` in Apigee.
* To get more information about InstanceAttachment, see:
* * [API documentation](https://cloud.google.com/apigee/docs/reference/apis/apigee/rest/v1/organizations.instances.attachments/create)
* * How-to Guides
* * [Creating an environment](https://cloud.google.com/apigee/docs/api-platform/get-started/create-environment)
* ## Example Usage
* ## Import
* InstanceAttachment can be imported using any of these accepted formats:
* * `{{instance_id}}/attachments/{{name}}`
* * `{{instance_id}}/{{name}}`
* When using the `pulumi import` command, InstanceAttachment can be imported using one of the formats above. For example:
* ```sh
* $ pulumi import gcp:apigee/instanceAttachment:InstanceAttachment default {{instance_id}}/attachments/{{name}}
* ```
* ```sh
* $ pulumi import gcp:apigee/instanceAttachment:InstanceAttachment default {{instance_id}}/{{name}}
* ```
*/
public class InstanceAttachment internal constructor(
override val javaResource: com.pulumi.gcp.apigee.InstanceAttachment,
) : KotlinCustomResource(javaResource, InstanceAttachmentMapper) {
/**
* The resource ID of the environment.
*/
public val environment: Output
get() = javaResource.environment().applyValue({ args0 -> args0 })
/**
* The Apigee instance associated with the Apigee environment,
* in the format `organizations/{{org_name}}/instances/{{instance_name}}`.
* - - -
*/
public val instanceId: Output
get() = javaResource.instanceId().applyValue({ args0 -> args0 })
/**
* The name of the newly created attachment (output parameter).
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
}
public object InstanceAttachmentMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.gcp.apigee.InstanceAttachment::class == javaResource::class
override fun map(javaResource: Resource): InstanceAttachment = InstanceAttachment(
javaResource as
com.pulumi.gcp.apigee.InstanceAttachment,
)
}
/**
* @see [InstanceAttachment].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [InstanceAttachment].
*/
public suspend fun instanceAttachment(
name: String,
block: suspend InstanceAttachmentResourceBuilder.() -> Unit,
): InstanceAttachment {
val builder = InstanceAttachmentResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [InstanceAttachment].
* @param name The _unique_ name of the resulting resource.
*/
public fun instanceAttachment(name: String): InstanceAttachment {
val builder = InstanceAttachmentResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy