azure-native.authorization.ManagementLockAtSubscriptionLevel
Explore with Pulumi AI
The lock information. API Version: 2017-04-01.
Example Usage
Create management lock at subscription level
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var managementLockAtSubscriptionLevel = new AzureNative.Authorization.ManagementLockAtSubscriptionLevel("managementLockAtSubscriptionLevel", new()
{
Level = "ReadOnly",
LockName = "testlock",
});
});
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.NewManagementLockAtSubscriptionLevel(ctx, "managementLockAtSubscriptionLevel", &authorization.ManagementLockAtSubscriptionLevelArgs{
Level: pulumi.String("ReadOnly"),
LockName: pulumi.String("testlock"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.authorization.ManagementLockAtSubscriptionLevel;
import com.pulumi.azurenative.authorization.ManagementLockAtSubscriptionLevelArgs;
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 managementLockAtSubscriptionLevel = new ManagementLockAtSubscriptionLevel("managementLockAtSubscriptionLevel", ManagementLockAtSubscriptionLevelArgs.builder()
.level("ReadOnly")
.lockName("testlock")
.build());
}
}
import pulumi
import pulumi_azure_native as azure_native
management_lock_at_subscription_level = azure_native.authorization.ManagementLockAtSubscriptionLevel("managementLockAtSubscriptionLevel",
level="ReadOnly",
lock_name="testlock")
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const managementLockAtSubscriptionLevel = new azure_native.authorization.ManagementLockAtSubscriptionLevel("managementLockAtSubscriptionLevel", {
level: "ReadOnly",
lockName: "testlock",
});
resources:
managementLockAtSubscriptionLevel:
type: azure-native:authorization:ManagementLockAtSubscriptionLevel
properties:
level: ReadOnly
lockName: testlock
Create ManagementLockAtSubscriptionLevel Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ManagementLockAtSubscriptionLevel(name: string, args: ManagementLockAtSubscriptionLevelArgs, opts?: CustomResourceOptions);
@overload
def ManagementLockAtSubscriptionLevel(resource_name: str,
args: ManagementLockAtSubscriptionLevelArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ManagementLockAtSubscriptionLevel(resource_name: str,
opts: Optional[ResourceOptions] = None,
level: Optional[Union[str, LockLevel]] = None,
lock_name: Optional[str] = None,
notes: Optional[str] = None,
owners: Optional[Sequence[ManagementLockOwnerArgs]] = None)
func NewManagementLockAtSubscriptionLevel(ctx *Context, name string, args ManagementLockAtSubscriptionLevelArgs, opts ...ResourceOption) (*ManagementLockAtSubscriptionLevel, error)
public ManagementLockAtSubscriptionLevel(string name, ManagementLockAtSubscriptionLevelArgs args, CustomResourceOptions? opts = null)
public ManagementLockAtSubscriptionLevel(String name, ManagementLockAtSubscriptionLevelArgs args)
public ManagementLockAtSubscriptionLevel(String name, ManagementLockAtSubscriptionLevelArgs args, CustomResourceOptions options)
type: azure-native:authorization:ManagementLockAtSubscriptionLevel
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args ManagementLockAtSubscriptionLevelArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ManagementLockAtSubscriptionLevelArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ManagementLockAtSubscriptionLevelArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ManagementLockAtSubscriptionLevelArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ManagementLockAtSubscriptionLevelArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var managementLockAtSubscriptionLevelResource = new AzureNative.Authorization.ManagementLockAtSubscriptionLevel("managementLockAtSubscriptionLevelResource", new()
{
Level = "string",
LockName = "string",
Notes = "string",
Owners = new[]
{
{
{ "applicationId", "string" },
},
},
});
example, err := authorization.NewManagementLockAtSubscriptionLevel(ctx, "managementLockAtSubscriptionLevelResource", &authorization.ManagementLockAtSubscriptionLevelArgs{
Level: "string",
LockName: "string",
Notes: "string",
Owners: []map[string]interface{}{
map[string]interface{}{
"applicationId": "string",
},
},
})
var managementLockAtSubscriptionLevelResource = new ManagementLockAtSubscriptionLevel("managementLockAtSubscriptionLevelResource", ManagementLockAtSubscriptionLevelArgs.builder()
.level("string")
.lockName("string")
.notes("string")
.owners(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
.build());
management_lock_at_subscription_level_resource = azure_native.authorization.ManagementLockAtSubscriptionLevel("managementLockAtSubscriptionLevelResource",
level=string,
lock_name=string,
notes=string,
owners=[{
applicationId: string,
}])
const managementLockAtSubscriptionLevelResource = new azure_native.authorization.ManagementLockAtSubscriptionLevel("managementLockAtSubscriptionLevelResource", {
level: "string",
lockName: "string",
notes: "string",
owners: [{
applicationId: "string",
}],
});
type: azure-native:authorization:ManagementLockAtSubscriptionLevel
properties:
level: string
lockName: string
notes: string
owners:
- applicationId: string
ManagementLockAtSubscriptionLevel Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The ManagementLockAtSubscriptionLevel resource accepts the following input properties:
- Level
string | Pulumi.
Azure Native. Authorization. Lock 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.
- Lock
Name string - The name of lock. The lock name can be a maximum of 260 characters. It cannot contain <, > %, &, :, , ?, /, or any control characters.
- Notes string
- Notes about the lock. Maximum of 512 characters.
- Owners
List<Pulumi.
Azure Native. Authorization. Inputs. Management Lock Owner> - The owners of the lock.
- Level
string | Lock
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.
- Lock
Name string - The name of lock. The lock name can be a maximum of 260 characters. It cannot contain <, > %, &, :, , ?, /, or any control characters.
- Notes string
- Notes about the lock. Maximum of 512 characters.
- Owners
[]Management
Lock Owner Args - The owners of the lock.
- level
String | Lock
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.
- lock
Name String - The name of lock. The lock name can be a maximum of 260 characters. It cannot contain <, > %, &, :, , ?, /, or any control characters.
- notes String
- Notes about the lock. Maximum of 512 characters.
- owners
List<Management
Lock Owner> - The owners of the lock.
- level
string | Lock
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.
- lock
Name string - The name of lock. The lock name can be a maximum of 260 characters. It cannot contain <, > %, &, :, , ?, /, or any control characters.
- notes string
- Notes about the lock. Maximum of 512 characters.
- owners
Management
Lock Owner[] - The owners of the lock.
- level
str | Lock
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.
- lock_
name str - The name of lock. The lock name can be a maximum of 260 characters. It cannot contain <, > %, &, :, , ?, /, or any control characters.
- notes str
- Notes about the lock. Maximum of 512 characters.
- owners
Sequence[Management
Lock Owner Args] - The owners of the lock.
- level
String | "Not
Specified" | "Can Not Delete" | "Read Only" - 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.
- lock
Name String - The name of lock. The lock name can be a maximum of 260 characters. It cannot contain <, > %, &, :, , ?, /, or any control characters.
- notes String
- Notes about the lock. Maximum of 512 characters.
- owners List<Property Map>
- The owners of the lock.
Outputs
All input properties are implicitly available as output properties. Additionally, the ManagementLockAtSubscriptionLevel resource produces the following output properties:
Supporting Types
LockLevel, LockLevelArgs
- Not
Specified - NotSpecified
- Can
Not Delete - CanNotDelete
- Read
Only - ReadOnly
- Lock
Level Not Specified - NotSpecified
- Lock
Level Can Not Delete - CanNotDelete
- Lock
Level Read Only - ReadOnly
- Not
Specified - NotSpecified
- Can
Not Delete - CanNotDelete
- Read
Only - ReadOnly
- Not
Specified - NotSpecified
- Can
Not Delete - CanNotDelete
- Read
Only - ReadOnly
- NOT_SPECIFIED
- NotSpecified
- CAN_NOT_DELETE
- CanNotDelete
- READ_ONLY
- ReadOnly
- "Not
Specified" - NotSpecified
- "Can
Not Delete" - CanNotDelete
- "Read
Only" - ReadOnly
ManagementLockOwner, ManagementLockOwnerArgs
- Application
Id string - The application ID of the lock owner.
- Application
Id string - The application ID of the lock owner.
- application
Id String - The application ID of the lock owner.
- application
Id string - The application ID of the lock owner.
- application_
id str - The application ID of the lock owner.
- application
Id String - The application ID of the lock owner.
ManagementLockOwnerResponse, ManagementLockOwnerResponseArgs
- Application
Id string - The application ID of the lock owner.
- Application
Id string - The application ID of the lock owner.
- application
Id String - The application ID of the lock owner.
- application
Id string - The application ID of the lock owner.
- application_
id str - The application ID of the lock owner.
- application
Id String - The application ID of the lock owner.
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:authorization:ManagementLockAtSubscriptionLevel testlock /subscriptions/subscriptionId/resourceGroups/resourcegroupname/providers/Microsoft.Authorization/locks/testlock
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- azure-native-v1 pulumi/pulumi-azure-native
- License
- Apache-2.0