import * as pulumi from "@pulumi/pulumi"; import * as outputs from "../types/output"; /** * Use this data source to access information about an existing Policy Assignment. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as azure from "@pulumi/azure"; * * const example = azure.policy.getPolicyAssignment({ * name: "existing", * scopeId: exampleAzurermResourceGroup.id, * }); * export const id = example.then(example => example.id); * ``` * * ## API Providers * * * This data source uses the following Azure API Providers: * * * `Microsoft.Authorization` - 2022-06-01 */ export declare function getPolicyAssignment(args: GetPolicyAssignmentArgs, opts?: pulumi.InvokeOptions): Promise; /** * A collection of arguments for invoking getPolicyAssignment. */ export interface GetPolicyAssignmentArgs { /** * The name of this Policy Assignment. Changing this forces a new Policy Assignment to be created. */ name: string; /** * The ID of the scope this Policy Assignment is assigned to. The `scopeId` can be a subscription id, a resource group id, a management group id, or an ID of any resource that is assigned with a policy. Changing this forces a new Policy Assignment to be created. */ scopeId: string; } /** * A collection of values returned by getPolicyAssignment. */ export interface GetPolicyAssignmentResult { /** * The description of this Policy Assignment. */ readonly description: string; /** * The display name of this Policy Assignment. */ readonly displayName: string; /** * Whether this Policy is enforced or not? */ readonly enforce: boolean; /** * The provider-assigned unique ID for this managed resource. */ readonly id: string; /** * A `identity` block as defined below. */ readonly identities: outputs.policy.GetPolicyAssignmentIdentity[]; /** * The Azure Region where the Policy Assignment exists. */ readonly location: string; /** * A JSON mapping of any Metadata for this Policy. */ readonly metadata: string; readonly name: string; /** * A `nonComplianceMessage` block as defined below. */ readonly nonComplianceMessages: outputs.policy.GetPolicyAssignmentNonComplianceMessage[]; /** * A `notScopes` block as defined below. */ readonly notScopes: string[]; /** * A JSON mapping of any Parameters for this Policy. */ readonly parameters: string; /** * The ID of the assigned Policy Definition. */ readonly policyDefinitionId: string; readonly scopeId: string; } /** * Use this data source to access information about an existing Policy Assignment. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as azure from "@pulumi/azure"; * * const example = azure.policy.getPolicyAssignment({ * name: "existing", * scopeId: exampleAzurermResourceGroup.id, * }); * export const id = example.then(example => example.id); * ``` * * ## API Providers * * * This data source uses the following Azure API Providers: * * * `Microsoft.Authorization` - 2022-06-01 */ export declare function getPolicyAssignmentOutput(args: GetPolicyAssignmentOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output; /** * A collection of arguments for invoking getPolicyAssignment. */ export interface GetPolicyAssignmentOutputArgs { /** * The name of this Policy Assignment. Changing this forces a new Policy Assignment to be created. */ name: pulumi.Input; /** * The ID of the scope this Policy Assignment is assigned to. The `scopeId` can be a subscription id, a resource group id, a management group id, or an ID of any resource that is assigned with a policy. Changing this forces a new Policy Assignment to be created. */ scopeId: pulumi.Input; }