Management Lock At Resource Level Args
data class ManagementLockAtResourceLevelArgs(val level: Output<Either<String, LockLevel>>? = null, val lockName: Output<String>? = null, val notes: Output<String>? = null, val owners: Output<List<ManagementLockOwnerArgs>>? = null, val parentResourcePath: Output<String>? = null, val resourceGroupName: Output<String>? = null, val resourceName: Output<String>? = null, val resourceProviderNamespace: Output<String>? = null, val resourceType: Output<String>? = null) : ConvertibleToJava<ManagementLockAtResourceLevelArgs>
The lock information. API Version: 2017-04-01.
Example Usage
Create management lock at resource level
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var managementLockAtResourceLevel = new AzureNative.Authorization.ManagementLockAtResourceLevel("managementLockAtResourceLevel", new()
{
Level = "ReadOnly",
LockName = "testlock",
ParentResourcePath = "parentResourcePath",
ResourceGroupName = "resourcegroupname",
ResourceName = "teststorageaccount",
ResourceProviderNamespace = "Microsoft.Storage",
ResourceType = "storageAccounts",
});
});
Content copied to clipboard
package main
import (
authorization "github.com/pulumi/pulumi-azure-native-sdk/authorization"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := authorization.NewManagementLockAtResourceLevel(ctx, "managementLockAtResourceLevel", &authorization.ManagementLockAtResourceLevelArgs{
Level: pulumi.String("ReadOnly"),
LockName: pulumi.String("testlock"),
ParentResourcePath: pulumi.String("parentResourcePath"),
ResourceGroupName: pulumi.String("resourcegroupname"),
ResourceName: pulumi.String("teststorageaccount"),
ResourceProviderNamespace: pulumi.String("Microsoft.Storage"),
ResourceType: pulumi.String("storageAccounts"),
})
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.authorization.ManagementLockAtResourceLevel;
import com.pulumi.azurenative.authorization.ManagementLockAtResourceLevelArgs;
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 managementLockAtResourceLevel = new ManagementLockAtResourceLevel("managementLockAtResourceLevel", ManagementLockAtResourceLevelArgs.builder()
.level("ReadOnly")
.lockName("testlock")
.parentResourcePath("parentResourcePath")
.resourceGroupName("resourcegroupname")
.resourceName("teststorageaccount")
.resourceProviderNamespace("Microsoft.Storage")
.resourceType("storageAccounts")
.build());
}
}
Content copied to clipboard
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:authorization:ManagementLockAtResourceLevel testlock /subscriptions/subscriptionId/resourceGroups/resourcegroupname/providers/Microsoft.Authorization/locks/testlock
Content copied to clipboard
Constructors
Link copied to clipboard
constructor(level: Output<Either<String, LockLevel>>? = null, lockName: Output<String>? = null, notes: Output<String>? = null, owners: Output<List<ManagementLockOwnerArgs>>? = null, parentResourcePath: Output<String>? = null, resourceGroupName: Output<String>? = null, resourceName: Output<String>? = null, resourceProviderNamespace: Output<String>? = null, resourceType: Output<String>? = null)
Properties
Link copied to clipboard
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.
Link copied to clipboard
The owners of the lock.
Link copied to clipboard
The parent resource identity.
Link copied to clipboard
The name of the resource group containing the resource to lock.
Link copied to clipboard
The name of the resource to lock.
Link copied to clipboard
The resource provider namespace of the resource to lock.
Link copied to clipboard
The resource type of the resource to lock.