import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Manages a Policy Set Definition. * * > **Note:** Policy set definitions (also known as policy initiatives) do not take effect until they are assigned to a scope using a Policy Set Assignment. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as azure from "@pulumi/azure"; * * const example = new azure.policy.PolicySetDefinition("example", { * name: "example", * policyType: "Custom", * displayName: "Example", * parameters: ` { * \\"allowedLocations\\": { * \\"type\\": \\"Array\\", * \\"metadata\\": { * \\"description\\": \\"The list of allowed locations for resources.\\", * \\"displayName\\": \\"Allowed locations\\", * \\"strongType\\": \\"location\\" * } * } * } * `, * policyDefinitionReferences: [{ * version: "1.0.*", * policyDefinitionId: "/providers/Microsoft.Authorization/policyDefinitions/e765b5de-1225-4ba3-bd56-1ac6695af988", * parameterValues: ` { * \\"listOfAllowedLocations\\": {\\"value\\": \\"[parameters('allowedLocations')]\\"} * } * `, * }], * }); * ``` * * ## API Providers * * * This resource uses the following Azure API Providers: * * * `Microsoft.Authorization` - 2025-01-01 * * * `Microsoft.Management` - 2025-01-01 * * ## Import * * Policy Set Definitions can be imported using the `resource id`, e.g. * * ```sh * $ pulumi import azure:policy/policySetDefinition:PolicySetDefinition example /subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/policySetDefinitions/policySetDefinitionName * ``` */ export declare class PolicySetDefinition extends pulumi.CustomResource { /** * Get an existing PolicySetDefinition 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 state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: PolicySetDefinitionState, opts?: pulumi.CustomResourceOptions): PolicySetDefinition; /** * Returns true if the given object is an instance of PolicySetDefinition. 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 PolicySetDefinition; /** * The description of this Policy Set Definition. */ readonly description: pulumi.Output; /** * The display name of this Policy Set Definition. */ readonly displayName: pulumi.Output; /** * @deprecated `managementGroupId` has been deprecated in favour of the `azure.management.GroupPolicySetDefinition` resource and will be removed in v5.0 of the AzureRM Provider. */ readonly managementGroupId: pulumi.Output; /** * The metadata for the Policy Set Definition in JSON format. */ readonly metadata: pulumi.Output; /** * The name which should be used for this Policy Set Definition. Changing this forces a new Policy Set Definition to be created. */ readonly name: pulumi.Output; /** * The parameters for the Policy Set Definition in JSON format. Reducing the number of parameters forces a new resource to be created. */ readonly parameters: pulumi.Output; /** * One or more `policyDefinitionGroup` blocks as defined below. */ readonly policyDefinitionGroups: pulumi.Output; /** * One or more `policyDefinitionReference` blocks as defined below. */ readonly policyDefinitionReferences: pulumi.Output; /** * The Policy Set Definition type. Possible values are `BuiltIn`, `Custom`, `NotSpecified`, and `Static`. Changing this forces a new Policy Set Definition to be created. */ readonly policyType: pulumi.Output; /** * Create a PolicySetDefinition 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: PolicySetDefinitionArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering PolicySetDefinition resources. */ export interface PolicySetDefinitionState { /** * The description of this Policy Set Definition. */ description?: pulumi.Input; /** * The display name of this Policy Set Definition. */ displayName?: pulumi.Input; /** * @deprecated `managementGroupId` has been deprecated in favour of the `azure.management.GroupPolicySetDefinition` resource and will be removed in v5.0 of the AzureRM Provider. */ managementGroupId?: pulumi.Input; /** * The metadata for the Policy Set Definition in JSON format. */ metadata?: pulumi.Input; /** * The name which should be used for this Policy Set Definition. Changing this forces a new Policy Set Definition to be created. */ name?: pulumi.Input; /** * The parameters for the Policy Set Definition in JSON format. Reducing the number of parameters forces a new resource to be created. */ parameters?: pulumi.Input; /** * One or more `policyDefinitionGroup` blocks as defined below. */ policyDefinitionGroups?: pulumi.Input[]>; /** * One or more `policyDefinitionReference` blocks as defined below. */ policyDefinitionReferences?: pulumi.Input[]>; /** * The Policy Set Definition type. Possible values are `BuiltIn`, `Custom`, `NotSpecified`, and `Static`. Changing this forces a new Policy Set Definition to be created. */ policyType?: pulumi.Input; } /** * The set of arguments for constructing a PolicySetDefinition resource. */ export interface PolicySetDefinitionArgs { /** * The description of this Policy Set Definition. */ description?: pulumi.Input; /** * The display name of this Policy Set Definition. */ displayName: pulumi.Input; /** * @deprecated `managementGroupId` has been deprecated in favour of the `azure.management.GroupPolicySetDefinition` resource and will be removed in v5.0 of the AzureRM Provider. */ managementGroupId?: pulumi.Input; /** * The metadata for the Policy Set Definition in JSON format. */ metadata?: pulumi.Input; /** * The name which should be used for this Policy Set Definition. Changing this forces a new Policy Set Definition to be created. */ name?: pulumi.Input; /** * The parameters for the Policy Set Definition in JSON format. Reducing the number of parameters forces a new resource to be created. */ parameters?: pulumi.Input; /** * One or more `policyDefinitionGroup` blocks as defined below. */ policyDefinitionGroups?: pulumi.Input[]>; /** * One or more `policyDefinitionReference` blocks as defined below. */ policyDefinitionReferences: pulumi.Input[]>; /** * The Policy Set Definition type. Possible values are `BuiltIn`, `Custom`, `NotSpecified`, and `Static`. Changing this forces a new Policy Set Definition to be created. */ policyType: pulumi.Input; }