This page documents the language specification for the azure package. If you're looking for help working with the inputs, outputs, or functions of azure resources in a Pulumi program, please see the resource documentation for examples and API reference.

managementresource

This provider is a derived work of the Terraform Provider distributed under MPL 2.0. If you encounter a bug or missing feature, first check the pulumi/pulumi-azure repo; however, if that doesn’t turn up anything, please consult the source terraform-providers/terraform-provider-azurerm repo.

class pulumi_azure.managementresource.ManangementLock(resource_name, opts=None, lock_level=None, name=None, notes=None, scope=None, __props__=None, __name__=None, __opts__=None)

Manages a Management Lock which is scoped to a Subscription, Resource Group or Resource.

import pulumi
import pulumi_azure as azure

current = azure.core.get_subscription()
subscription_level = azure.management.Lock("subscription-level",
    scope=current.id,
    lock_level="CanNotDelete",
    notes="Items can't be deleted in this subscription!")
import pulumi
import pulumi_azure as azure

example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
example_public_ip = azure.network.PublicIp("examplePublicIp",
    location=example_resource_group.location,
    resource_group_name=example_resource_group.name,
    allocation_method="Static",
    idle_timeout_in_minutes=30)
public_ip = azure.management.Lock("public-ip",
    scope=example_public_ip.id,
    lock_level="CanNotDelete",
    notes="Locked because it's needed by a third-party")
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • lock_level (pulumi.Input[str]) – Specifies the Level to be used for this Lock. Possible values are CanNotDelete and ReadOnly. Changing this forces a new resource to be created.

  • name (pulumi.Input[str]) – Specifies the name of the Management Lock. Changing this forces a new resource to be created.

  • notes (pulumi.Input[str]) – Specifies some notes about the lock. Maximum of 512 characters. Changing this forces a new resource to be created.

  • scope (pulumi.Input[str]) – Specifies the scope at which the Management Lock should be created. Changing this forces a new resource to be created.

lock_level: pulumi.Output[str] = None

Specifies the Level to be used for this Lock. Possible values are CanNotDelete and ReadOnly. Changing this forces a new resource to be created.

name: pulumi.Output[str] = None

Specifies the name of the Management Lock. Changing this forces a new resource to be created.

notes: pulumi.Output[str] = None

Specifies some notes about the lock. Maximum of 512 characters. Changing this forces a new resource to be created.

scope: pulumi.Output[str] = None

Specifies the scope at which the Management Lock should be created. Changing this forces a new resource to be created.

static get(resource_name, id, opts=None, lock_level=None, name=None, notes=None, scope=None)

Get an existing ManangementLock resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • lock_level (pulumi.Input[str]) – Specifies the Level to be used for this Lock. Possible values are CanNotDelete and ReadOnly. Changing this forces a new resource to be created.

  • name (pulumi.Input[str]) – Specifies the name of the Management Lock. Changing this forces a new resource to be created.

  • notes (pulumi.Input[str]) – Specifies some notes about the lock. Maximum of 512 characters. Changing this forces a new resource to be created.

  • scope (pulumi.Input[str]) – Specifies the scope at which the Management Lock should be created. Changing this forces a new resource to be created.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str