com.pulumi.gcp.apigee.kotlin.Sharedflow.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.gcp.apigee.kotlin
import com.pulumi.core.Output
import com.pulumi.gcp.apigee.kotlin.outputs.SharedflowMetaData
import com.pulumi.gcp.apigee.kotlin.outputs.SharedflowMetaData.Companion.toKotlin
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
/**
* Builder for [Sharedflow].
*/
@PulumiTagMarker
public class SharedflowResourceBuilder internal constructor() {
public var name: String? = null
public var args: SharedflowArgs = SharedflowArgs()
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 SharedflowArgsBuilder.() -> Unit) {
val builder = SharedflowArgsBuilder()
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(): Sharedflow {
val builtJavaResource = com.pulumi.gcp.apigee.Sharedflow(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return Sharedflow(builtJavaResource)
}
}
/**
* You can combine policies and resources into a shared flow that you can consume from multiple API proxies, and even from other shared flows. Although it's like a proxy, a shared flow has no endpoint. It can be used only from an API proxy or shared flow that's in the same organization as the shared flow itself.
* To get more information about SharedFlow, see:
* * [API documentation](https://cloud.google.com/apigee/docs/reference/apis/apigee/rest/v1/organizations.sharedflows)
* * How-to Guides
* * [Sharedflows](https://cloud.google.com/apigee/docs/resources)
* ## Import
* SharedFlow can be imported using any of these accepted formats:
* * `{{org_id}}/sharedflows/{{name}}`
* * `{{org_id}}/{{name}}`
* When using the `pulumi import` command, SharedFlow can be imported using one of the formats above. For example:
* ```sh
* $ pulumi import gcp:apigee/sharedflow:Sharedflow default {{org_id}}/sharedflows/{{name}}
* ```
* ```sh
* $ pulumi import gcp:apigee/sharedflow:Sharedflow default {{org_id}}/{{name}}
* ```
*/
public class Sharedflow internal constructor(
override val javaResource: com.pulumi.gcp.apigee.Sharedflow,
) : KotlinCustomResource(javaResource, SharedflowMapper) {
/**
* Path to the config zip bundle.
* - - -
*/
public val configBundle: Output
get() = javaResource.configBundle().applyValue({ args0 -> args0 })
public val detectMd5hash: Output?
get() = javaResource.detectMd5hash().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The id of the most recently created revision for this shared flow.
*/
public val latestRevisionId: Output
get() = javaResource.latestRevisionId().applyValue({ args0 -> args0 })
/**
* (Computed) Base 64 MD5 hash of the uploaded data. It is speculative as remote does not return hash of the bundle. Remote changes are detected using returned last_modified timestamp.
*/
public val md5hash: Output
get() = javaResource.md5hash().applyValue({ args0 -> args0 })
/**
* Metadata describing the shared flow.
* Structure is documented below.
*/
public val metaDatas: Output>
get() = javaResource.metaDatas().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
toKotlin(args0)
})
})
})
/**
* The ID of the shared flow.
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* The Apigee Organization name associated with the Apigee instance.
*/
public val orgId: Output
get() = javaResource.orgId().applyValue({ args0 -> args0 })
/**
* A list of revisions of this shared flow.
*/
public val revisions: Output>
get() = javaResource.revisions().applyValue({ args0 -> args0.map({ args0 -> args0 }) })
}
public object SharedflowMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.gcp.apigee.Sharedflow::class == javaResource::class
override fun map(javaResource: Resource): Sharedflow = Sharedflow(
javaResource as
com.pulumi.gcp.apigee.Sharedflow,
)
}
/**
* @see [Sharedflow].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [Sharedflow].
*/
public suspend fun sharedflow(name: String, block: suspend SharedflowResourceBuilder.() -> Unit): Sharedflow {
val builder = SharedflowResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [Sharedflow].
* @param name The _unique_ name of the resulting resource.
*/
public fun sharedflow(name: String): Sharedflow {
val builder = SharedflowResourceBuilder()
builder.name(name)
return builder.build()
}