@pulumi/azure-native
Version:
[](https://slack.pulumi.com) [](https://npmjs.com/package/@pulumi/azure-native) [ • 5.32 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
import * as enums from "../types/enums";
/**
* The policy definition.
*
* Uses Azure REST API version 2025-01-01. In version 2.x of the Azure Native provider, it used API version 2021-06-01.
*
* Other available API versions: 2020-09-01, 2021-06-01, 2023-04-01, 2024-05-01, 2025-03-01. These can be accessed by generating a local SDK package using the CLI command `pulumi package add azure-native authorization [ApiVersion]`. See the [version guide](../../../version-guide/#accessing-any-api-version-via-local-packages) for details.
*/
export declare class PolicyDefinition extends pulumi.CustomResource {
/**
* Get an existing PolicyDefinition resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, opts?: pulumi.CustomResourceOptions): PolicyDefinition;
/**
* Returns true if the given object is an instance of PolicyDefinition. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is PolicyDefinition;
/**
* The Azure API version of the resource.
*/
readonly azureApiVersion: pulumi.Output<string>;
/**
* The policy definition description.
*/
readonly description: pulumi.Output<string | undefined>;
/**
* The display name of the policy definition.
*/
readonly displayName: pulumi.Output<string | undefined>;
/**
* The policy definition metadata. Metadata is an open ended object and is typically a collection of key value pairs.
*/
readonly metadata: pulumi.Output<any | undefined>;
/**
* The policy definition mode. Some examples are All, Indexed, Microsoft.KeyVault.Data.
*/
readonly mode: pulumi.Output<string | undefined>;
/**
* The name of the policy definition.
*/
readonly name: pulumi.Output<string>;
/**
* The parameter definitions for parameters used in the policy rule. The keys are the parameter names.
*/
readonly parameters: pulumi.Output<{
[key: string]: outputs.authorization.ParameterDefinitionsValueResponse;
} | undefined>;
/**
* The policy rule.
*/
readonly policyRule: pulumi.Output<any | undefined>;
/**
* The type of policy definition. Possible values are NotSpecified, BuiltIn, Custom, and Static.
*/
readonly policyType: pulumi.Output<string | undefined>;
/**
* The system metadata relating to this resource.
*/
readonly systemData: pulumi.Output<outputs.authorization.SystemDataResponse>;
/**
* The type of the resource (Microsoft.Authorization/policyDefinitions).
*/
readonly type: pulumi.Output<string>;
/**
* The policy definition version in #.#.# format.
*/
readonly version: pulumi.Output<string | undefined>;
/**
* A list of available versions for this policy definition.
*/
readonly versions: pulumi.Output<string[] | undefined>;
/**
* Create a PolicyDefinition resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args?: PolicyDefinitionArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* The set of arguments for constructing a PolicyDefinition resource.
*/
export interface PolicyDefinitionArgs {
/**
* The policy definition description.
*/
description?: pulumi.Input<string>;
/**
* The display name of the policy definition.
*/
displayName?: pulumi.Input<string>;
/**
* The policy definition metadata. Metadata is an open ended object and is typically a collection of key value pairs.
*/
metadata?: any;
/**
* The policy definition mode. Some examples are All, Indexed, Microsoft.KeyVault.Data.
*/
mode?: pulumi.Input<string>;
/**
* The parameter definitions for parameters used in the policy rule. The keys are the parameter names.
*/
parameters?: pulumi.Input<{
[key: string]: pulumi.Input<inputs.authorization.ParameterDefinitionsValueArgs>;
}>;
/**
* The name of the policy definition to create.
*/
policyDefinitionName?: pulumi.Input<string>;
/**
* The policy rule.
*/
policyRule?: any;
/**
* The type of policy definition. Possible values are NotSpecified, BuiltIn, Custom, and Static.
*/
policyType?: pulumi.Input<string | enums.authorization.PolicyType>;
/**
* The policy definition version in #.#.# format.
*/
version?: pulumi.Input<string>;
/**
* A list of available versions for this policy definition.
*/
versions?: pulumi.Input<pulumi.Input<string>[]>;
}