![JAR search and dependency download from the Maven repository](/logo.png)
com.pulumi.azurenative.authorization.kotlin.ManagementLockAtResourceGroupLevelArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-azure-native-kotlin Show documentation
Show all versions of pulumi-azure-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.azurenative.authorization.kotlin
import com.pulumi.azurenative.authorization.ManagementLockAtResourceGroupLevelArgs.builder
import com.pulumi.azurenative.authorization.kotlin.enums.LockLevel
import com.pulumi.azurenative.authorization.kotlin.inputs.ManagementLockOwnerArgs
import com.pulumi.azurenative.authorization.kotlin.inputs.ManagementLockOwnerArgsBuilder
import com.pulumi.core.Either
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName
/**
* The lock information.
* Azure REST API version: 2020-05-01. Prior API version in Azure Native 1.x: 2017-04-01.
* Other available API versions: 2015-01-01.
* ## Example Usage
* ### Create management lock at resource group level
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var managementLockAtResourceGroupLevel = new AzureNative.Authorization.ManagementLockAtResourceGroupLevel("managementLockAtResourceGroupLevel", new()
* {
* Level = AzureNative.Authorization.LockLevel.ReadOnly,
* LockName = "testlock",
* ResourceGroupName = "resourcegroupname",
* });
* });
* ```
* ```go
* package main
* import (
* authorization "github.com/pulumi/pulumi-azure-native-sdk/authorization/v2"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := authorization.NewManagementLockAtResourceGroupLevel(ctx, "managementLockAtResourceGroupLevel", &authorization.ManagementLockAtResourceGroupLevelArgs{
* Level: pulumi.String(authorization.LockLevelReadOnly),
* LockName: pulumi.String("testlock"),
* ResourceGroupName: pulumi.String("resourcegroupname"),
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azurenative.authorization.ManagementLockAtResourceGroupLevel;
* import com.pulumi.azurenative.authorization.ManagementLockAtResourceGroupLevelArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
* public static void stack(Context ctx) {
* var managementLockAtResourceGroupLevel = new ManagementLockAtResourceGroupLevel("managementLockAtResourceGroupLevel", ManagementLockAtResourceGroupLevelArgs.builder()
* .level("ReadOnly")
* .lockName("testlock")
* .resourceGroupName("resourcegroupname")
* .build());
* }
* }
* ```
* ## Import
* An existing resource can be imported using its type token, name, and identifier, e.g.
* ```sh
* $ pulumi import azure-native:authorization:ManagementLockAtResourceGroupLevel testlock /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Authorization/locks/{lockName}
* ```
* @property level The level of the lock. Possible values are: NotSpecified, CanNotDelete, ReadOnly. CanNotDelete means authorized users are able to read and modify the resources, but not delete. ReadOnly means authorized users can only read from a resource, but they can't modify or delete it.
* @property lockName The lock name. The lock name can be a maximum of 260 characters. It cannot contain <, > %, &, :, \, ?, /, or any control characters.
* @property notes Notes about the lock. Maximum of 512 characters.
* @property owners The owners of the lock.
* @property resourceGroupName The name of the resource group to lock.
*/
public data class ManagementLockAtResourceGroupLevelArgs(
public val level: Output>? = null,
public val lockName: Output? = null,
public val notes: Output? = null,
public val owners: Output>? = null,
public val resourceGroupName: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azurenative.authorization.ManagementLockAtResourceGroupLevelArgs = com.pulumi.azurenative.authorization.ManagementLockAtResourceGroupLevelArgs.builder()
.level(
level?.applyValue({ args0 ->
args0.transform({ args0 -> args0 }, { args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
)
.lockName(lockName?.applyValue({ args0 -> args0 }))
.notes(notes?.applyValue({ args0 -> args0 }))
.owners(owners?.applyValue({ args0 -> args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) }) }))
.resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [ManagementLockAtResourceGroupLevelArgs].
*/
@PulumiTagMarker
public class ManagementLockAtResourceGroupLevelArgsBuilder internal constructor() {
private var level: Output>? = null
private var lockName: Output? = null
private var notes: Output? = null
private var owners: Output>? = null
private var resourceGroupName: Output? = null
/**
* @param value The level of the lock. Possible values are: NotSpecified, CanNotDelete, ReadOnly. CanNotDelete means authorized users are able to read and modify the resources, but not delete. ReadOnly means authorized users can only read from a resource, but they can't modify or delete it.
*/
@JvmName("myjwqosaregjncsk")
public suspend fun level(`value`: Output>) {
this.level = value
}
/**
* @param value The lock name. The lock name can be a maximum of 260 characters. It cannot contain <, > %, &, :, \, ?, /, or any control characters.
*/
@JvmName("jhnxobqjqbqtjnrf")
public suspend fun lockName(`value`: Output) {
this.lockName = value
}
/**
* @param value Notes about the lock. Maximum of 512 characters.
*/
@JvmName("vbrhlgehmphjuyaa")
public suspend fun notes(`value`: Output) {
this.notes = value
}
/**
* @param value The owners of the lock.
*/
@JvmName("ptfdutavigdjmwci")
public suspend fun owners(`value`: Output>) {
this.owners = value
}
@JvmName("hlohqkybjpommnjb")
public suspend fun owners(vararg values: Output) {
this.owners = Output.all(values.asList())
}
/**
* @param values The owners of the lock.
*/
@JvmName("slrbxexinfewuqto")
public suspend fun owners(values: List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy