
com.pulumi.azure.keyvault.kotlin.ManagedHardwareSecurityModuleRoleAssignment.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-azure-kotlin Show documentation
Show all versions of pulumi-azure-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.azure.keyvault.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.Deprecated
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
/**
* Builder for [ManagedHardwareSecurityModuleRoleAssignment].
*/
@PulumiTagMarker
public class ManagedHardwareSecurityModuleRoleAssignmentResourceBuilder internal constructor() {
public var name: String? = null
public var args: ManagedHardwareSecurityModuleRoleAssignmentArgs =
ManagedHardwareSecurityModuleRoleAssignmentArgs()
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 ManagedHardwareSecurityModuleRoleAssignmentArgsBuilder.() -> Unit) {
val builder = ManagedHardwareSecurityModuleRoleAssignmentArgsBuilder()
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(): ManagedHardwareSecurityModuleRoleAssignment {
val builtJavaResource =
com.pulumi.azure.keyvault.ManagedHardwareSecurityModuleRoleAssignment(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return ManagedHardwareSecurityModuleRoleAssignment(builtJavaResource)
}
}
/**
* Manages a Managed Hardware Security Module Role Assignment.
* ## Import
* Managed Hardware Security Modules can be imported using the `resource id`, e.g.
* ```sh
* $ pulumi import azure:keyvault/managedHardwareSecurityModuleRoleAssignment:ManagedHardwareSecurityModuleRoleAssignment example https://0000.managedhsm.azure.net///RoleAssignment/00000000-0000-0000-0000-000000000000
* ```
*/
public class ManagedHardwareSecurityModuleRoleAssignment internal constructor(
override val javaResource: com.pulumi.azure.keyvault.ManagedHardwareSecurityModuleRoleAssignment,
) : KotlinCustomResource(javaResource, ManagedHardwareSecurityModuleRoleAssignmentMapper) {
/**
* The ID of a Managed Hardware Security Module resource. Changing this forces a new Managed Hardware Security Module to be created.
* *
*/
public val managedHsmId: Output
get() = javaResource.managedHsmId().applyValue({ args0 -> args0 })
/**
* The name in GUID notation which should be used for this Managed Hardware Security Module Role Assignment. Changing this forces a new Managed Hardware Security Module to be created.
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* The principal ID to be assigned to this role. It can point to a user, service principal, or security group. Changing this forces a new Managed Hardware Security Module to be created.
*/
public val principalId: Output
get() = javaResource.principalId().applyValue({ args0 -> args0 })
/**
* (Deprecated) The resource id of created assignment resource.
*/
public val resourceId: Output
get() = javaResource.resourceId().applyValue({ args0 -> args0 })
/**
* The resource ID of the role definition to assign. Changing this forces a new Managed Hardware Security Module to be created.
*/
public val roleDefinitionId: Output
get() = javaResource.roleDefinitionId().applyValue({ args0 -> args0 })
/**
* Specifies the scope to create the role assignment. Changing this forces a new Managed Hardware Security Module to be created.
*/
public val scope: Output
get() = javaResource.scope().applyValue({ args0 -> args0 })
@Deprecated(
message = """
The field `vault_base_url` has been deprecated in favour of `managed_hsm_id` and will be removed
in 4.0 of the Azure Provider
""",
)
public val vaultBaseUrl: Output
get() = javaResource.vaultBaseUrl().applyValue({ args0 -> args0 })
}
public object ManagedHardwareSecurityModuleRoleAssignmentMapper :
ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.azure.keyvault.ManagedHardwareSecurityModuleRoleAssignment::class == javaResource::class
override fun map(javaResource: Resource): ManagedHardwareSecurityModuleRoleAssignment =
ManagedHardwareSecurityModuleRoleAssignment(
javaResource as
com.pulumi.azure.keyvault.ManagedHardwareSecurityModuleRoleAssignment,
)
}
/**
* @see [ManagedHardwareSecurityModuleRoleAssignment].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [ManagedHardwareSecurityModuleRoleAssignment].
*/
public suspend fun managedHardwareSecurityModuleRoleAssignment(
name: String,
block: suspend ManagedHardwareSecurityModuleRoleAssignmentResourceBuilder.() -> Unit,
): ManagedHardwareSecurityModuleRoleAssignment {
val builder = ManagedHardwareSecurityModuleRoleAssignmentResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [ManagedHardwareSecurityModuleRoleAssignment].
* @param name The _unique_ name of the resulting resource.
*/
public fun managedHardwareSecurityModuleRoleAssignment(name: String): ManagedHardwareSecurityModuleRoleAssignment {
val builder = ManagedHardwareSecurityModuleRoleAssignmentResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy