Module management
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.
Resources
Functions
Others
Resources
Resource Group
class Group extends CustomResourceManages a Management Group.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const current = azure.core.getSubscription({});
const exampleParent = new azure.management.Group("exampleParent", {
displayName: "ParentGroup",
subscriptionIds: [current.then(current => current.subscriptionId)],
});
const exampleChild = new azure.management.Group("exampleChild", {
displayName: "ChildGroup",
parentManagementGroupId: exampleParent.id,
subscriptionIds: [current.then(current => current.subscriptionId)],
});
// other subscription IDs can go hereconstructor
new Group(name: string, args?: GroupArgs, opts?: pulumi.CustomResourceOptions)Create a Group resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: GroupState, opts?: pulumi.CustomResourceOptions): GroupGet an existing Group resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is GroupReturns true if the given object is an instance of Group. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property displayName
public displayName: pulumi.Output<string>;A friendly name for this Management Group. If not specified, this’ll be the same as the name.
property groupId
namepublic groupId: pulumi.Output<string>;The name or UUID for this Management Group, which needs to be unique across your tenant. A new UUID will be generated if not provided. Changing this forces a new resource to be created.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property name
public name: pulumi.Output<string>;The name or UUID for this Management Group, which needs to be unique across your tenant. A new UUID will be generated if not provided. Changing this forces a new resource to be created.
property parentManagementGroupId
public parentManagementGroupId: pulumi.Output<string>;The ID of the Parent Management Group. Changing this forces a new resource to be created.
property subscriptionIds
public subscriptionIds: pulumi.Output<string[] | undefined>;A list of Subscription GUIDs which should be assigned to the Management Group.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Resource Lock
class Lock extends CustomResourceManages a Management Lock which is scoped to a Subscription, Resource Group or Resource.
Example Usage
Subscription Level Lock)
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const current = azure.core.getSubscription({});
const subscription_level = new azure.management.Lock("subscription-level", {
scope: current.then(current => current.id),
lockLevel: "CanNotDelete",
notes: "Items can't be deleted in this subscription!",
});Resource Level Lock)
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
const examplePublicIp = new azure.network.PublicIp("examplePublicIp", {
location: exampleResourceGroup.location,
resourceGroupName: exampleResourceGroup.name,
allocationMethod: "Static",
idleTimeoutInMinutes: 30,
});
const public_ip = new azure.management.Lock("public-ip", {
scope: examplePublicIp.id,
lockLevel: "CanNotDelete",
notes: "Locked because it's needed by a third-party",
});constructor
new Lock(name: string, args: LockArgs, opts?: pulumi.CustomResourceOptions)Create a Lock resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: LockState, opts?: pulumi.CustomResourceOptions): LockGet an existing Lock resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is LockReturns true if the given object is an instance of Lock. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property lockLevel
public lockLevel: pulumi.Output<string>;Specifies the Level to be used for this Lock. Possible values are CanNotDelete and ReadOnly. Changing this forces a new resource to be created.
property name
public name: pulumi.Output<string>;Specifies the name of the Management Lock. Changing this forces a new resource to be created.
property notes
public notes: pulumi.Output<string | undefined>;Specifies some notes about the lock. Maximum of 512 characters. Changing this forces a new resource to be created.
property scope
public scope: pulumi.Output<string>;Specifies the scope at which the Management Lock should be created. Changing this forces a new resource to be created.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Functions
Function getGroup
getGroup(args?: GetGroupArgs, opts?: pulumi.InvokeOptions): Promise<GetGroupResult>Use this data source to access information about an existing Management Group.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = azure.management.getGroup({
name: "00000000-0000-0000-0000-000000000000",
});
export const displayName = example.then(example => example.displayName);Others
interface GetGroupArgs
interface GetGroupArgsA collection of arguments for invoking getGroup.
property groupId
namegroupId?: undefined | string;Specifies the name or UUID of this Management Group.
property name
name?: undefined | string;Specifies the name or UUID of this Management Group.
interface GetGroupResult
interface GetGroupResultA collection of values returned by getGroup.
property displayName
displayName: string;A friendly name for the Management Group.
property groupId
namegroupId: string;property id
id: string;The provider-assigned unique ID for this managed resource.
property name
name: string;property parentManagementGroupId
parentManagementGroupId: string;The ID of any Parent Management Group.
property subscriptionIds
subscriptionIds: string[];A list of Subscription ID’s which are assigned to the Management Group.
interface GroupArgs
interface GroupArgsThe set of arguments for constructing a Group resource.
property displayName
displayName?: pulumi.Input<string>;A friendly name for this Management Group. If not specified, this’ll be the same as the name.
property groupId
namegroupId?: pulumi.Input<string>;The name or UUID for this Management Group, which needs to be unique across your tenant. A new UUID will be generated if not provided. Changing this forces a new resource to be created.
property name
name?: pulumi.Input<string>;The name or UUID for this Management Group, which needs to be unique across your tenant. A new UUID will be generated if not provided. Changing this forces a new resource to be created.
property parentManagementGroupId
parentManagementGroupId?: pulumi.Input<string>;The ID of the Parent Management Group. Changing this forces a new resource to be created.
property subscriptionIds
subscriptionIds?: pulumi.Input<pulumi.Input<string>[]>;A list of Subscription GUIDs which should be assigned to the Management Group.
interface GroupState
interface GroupStateInput properties used for looking up and filtering Group resources.
property displayName
displayName?: pulumi.Input<string>;A friendly name for this Management Group. If not specified, this’ll be the same as the name.
property groupId
namegroupId?: pulumi.Input<string>;The name or UUID for this Management Group, which needs to be unique across your tenant. A new UUID will be generated if not provided. Changing this forces a new resource to be created.
property name
name?: pulumi.Input<string>;The name or UUID for this Management Group, which needs to be unique across your tenant. A new UUID will be generated if not provided. Changing this forces a new resource to be created.
property parentManagementGroupId
parentManagementGroupId?: pulumi.Input<string>;The ID of the Parent Management Group. Changing this forces a new resource to be created.
property subscriptionIds
subscriptionIds?: pulumi.Input<pulumi.Input<string>[]>;A list of Subscription GUIDs which should be assigned to the Management Group.
interface LockArgs
interface LockArgsThe set of arguments for constructing a Lock resource.
property lockLevel
lockLevel: pulumi.Input<string>;Specifies the Level to be used for this Lock. Possible values are CanNotDelete and ReadOnly. Changing this forces a new resource to be created.
property name
name?: pulumi.Input<string>;Specifies the name of the Management Lock. Changing this forces a new resource to be created.
property notes
notes?: pulumi.Input<string>;Specifies some notes about the lock. Maximum of 512 characters. Changing this forces a new resource to be created.
property scope
scope: pulumi.Input<string>;Specifies the scope at which the Management Lock should be created. Changing this forces a new resource to be created.
interface LockState
interface LockStateInput properties used for looking up and filtering Lock resources.
property lockLevel
lockLevel?: pulumi.Input<string>;Specifies the Level to be used for this Lock. Possible values are CanNotDelete and ReadOnly. Changing this forces a new resource to be created.
property name
name?: pulumi.Input<string>;Specifies the name of the Management Lock. Changing this forces a new resource to be created.
property notes
notes?: pulumi.Input<string>;Specifies some notes about the lock. Maximum of 512 characters. Changing this forces a new resource to be created.
property scope
scope?: pulumi.Input<string>;Specifies the scope at which the Management Lock should be created. Changing this forces a new resource to be created.