Module policy

@pulumi/azure > policy

Index

policy/assignment.ts policy/definition.ts

class Assignment

Configures the specified Policy Definition at the specified Scope.

constructor

new Assignment(name: string, args: AssignmentArgs, opts?: pulumi.CustomResourceOptions)

Create a Assignment resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: AssignmentState): Assignment

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

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

static isInstance(obj: any): boolean

Returns true if the given object is an instance of CustomResource. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property description

public description: pulumi.Output<string | undefined>;

A description to use for this Policy Assignment. Changing this forces a new resource to be created.

property displayName

public displayName: pulumi.Output<string | undefined>;

A friendly display name to use for this Policy Assignment. 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 of the Policy Assignment. Changing this forces a new resource to be created.

property parameters

public parameters: pulumi.Output<string | undefined>;

Parameters for the policy definition. This field is a JSON object that maps to the Parameters field from the Policy Definition. Changing this forces a new resource to be created.

property policyDefinitionId

public policyDefinitionId: pulumi.Output<string>;

The ID of the Policy Definition to be applied at the specified Scope.

property scope

public scope: pulumi.Output<string>;

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

class Definition

Manages a policy rule definition. Policy definitions do not take effect until they are assigned to a scope using a Policy Assignment.

constructor

new Definition(name: string, args: DefinitionArgs, opts?: pulumi.CustomResourceOptions)

Create a Definition resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: DefinitionState): Definition

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

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

static isInstance(obj: any): boolean

Returns true if the given object is an instance of CustomResource. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property description

public description: pulumi.Output<string | undefined>;

The description of the policy definition.

property displayName

public displayName: pulumi.Output<string>;

The display name of the policy definition.

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 metadata

public metadata: pulumi.Output<string | undefined>;

The metadata for the policy definition. This is a json object representing additional metadata that should be stored with the policy definition.

property mode

public mode: pulumi.Output<string>;

The policy mode that allows you to specify which resource types will be evaluated. The value can be “All”, “Indexed” or “NotSpecified”. Changing this resource forces a new resource to be created.

property name

public name: pulumi.Output<string>;

The name of the policy definition. Changing this forces a new resource to be created.

property parameters

public parameters: pulumi.Output<string | undefined>;

Parameters for the policy definition. This field is a json object that allows you to parameterize your policy definition.

property policyRule

public policyRule: pulumi.Output<string | undefined>;

The policy rule for the policy definition. This is a json object representing the rule that contains an if and a then block.

property policyType

public policyType: pulumi.Output<string>;

The policy type. The value can be “BuiltIn”, “Custom” or “NotSpecified”. 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.

interface AssignmentArgs

The set of arguments for constructing a Assignment resource.

property description

description?: pulumi.Input<string>;

A description to use for this Policy Assignment. Changing this forces a new resource to be created.

property displayName

displayName?: pulumi.Input<string>;

A friendly display name to use for this Policy Assignment. Changing this forces a new resource to be created.

property name

name?: pulumi.Input<string>;

The name of the Policy Assignment. Changing this forces a new resource to be created.

property parameters

parameters?: pulumi.Input<string>;

Parameters for the policy definition. This field is a JSON object that maps to the Parameters field from the Policy Definition. Changing this forces a new resource to be created.

property policyDefinitionId

policyDefinitionId: pulumi.Input<string>;

The ID of the Policy Definition to be applied at the specified Scope.

property scope

scope: pulumi.Input<string>;

interface AssignmentState

Input properties used for looking up and filtering Assignment resources.

property description

description?: pulumi.Input<string>;

A description to use for this Policy Assignment. Changing this forces a new resource to be created.

property displayName

displayName?: pulumi.Input<string>;

A friendly display name to use for this Policy Assignment. Changing this forces a new resource to be created.

property name

name?: pulumi.Input<string>;

The name of the Policy Assignment. Changing this forces a new resource to be created.

property parameters

parameters?: pulumi.Input<string>;

Parameters for the policy definition. This field is a JSON object that maps to the Parameters field from the Policy Definition. Changing this forces a new resource to be created.

property policyDefinitionId

policyDefinitionId?: pulumi.Input<string>;

The ID of the Policy Definition to be applied at the specified Scope.

property scope

scope?: pulumi.Input<string>;

interface DefinitionArgs

The set of arguments for constructing a Definition resource.

property description

description?: pulumi.Input<string>;

The description of the policy definition.

property displayName

displayName: pulumi.Input<string>;

The display name of the policy definition.

property metadata

metadata?: pulumi.Input<string>;

The metadata for the policy definition. This is a json object representing additional metadata that should be stored with the policy definition.

property mode

mode: pulumi.Input<string>;

The policy mode that allows you to specify which resource types will be evaluated. The value can be “All”, “Indexed” or “NotSpecified”. Changing this resource forces a new resource to be created.

property name

name?: pulumi.Input<string>;

The name of the policy definition. Changing this forces a new resource to be created.

property parameters

parameters?: pulumi.Input<string>;

Parameters for the policy definition. This field is a json object that allows you to parameterize your policy definition.

property policyRule

policyRule?: pulumi.Input<string>;

The policy rule for the policy definition. This is a json object representing the rule that contains an if and a then block.

property policyType

policyType: pulumi.Input<string>;

The policy type. The value can be “BuiltIn”, “Custom” or “NotSpecified”. Changing this forces a new resource to be created.

interface DefinitionState

Input properties used for looking up and filtering Definition resources.

property description

description?: pulumi.Input<string>;

The description of the policy definition.

property displayName

displayName?: pulumi.Input<string>;

The display name of the policy definition.

property metadata

metadata?: pulumi.Input<string>;

The metadata for the policy definition. This is a json object representing additional metadata that should be stored with the policy definition.

property mode

mode?: pulumi.Input<string>;

The policy mode that allows you to specify which resource types will be evaluated. The value can be “All”, “Indexed” or “NotSpecified”. Changing this resource forces a new resource to be created.

property name

name?: pulumi.Input<string>;

The name of the policy definition. Changing this forces a new resource to be created.

property parameters

parameters?: pulumi.Input<string>;

Parameters for the policy definition. This field is a json object that allows you to parameterize your policy definition.

property policyRule

policyRule?: pulumi.Input<string>;

The policy rule for the policy definition. This is a json object representing the rule that contains an if and a then block.

property policyType

policyType?: pulumi.Input<string>;

The policy type. The value can be “BuiltIn”, “Custom” or “NotSpecified”. Changing this forces a new resource to be created.