Class GetPolicyDefintion
Inheritance
System.Object
GetPolicyDefintion
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Azure.Policy
Assembly: Pulumi.Azure.dll
Syntax
public static class GetPolicyDefintion
Methods
View SourceInvokeAsync(GetPolicyDefintionArgs, InvokeOptions)
Use this data source to access information about a Policy Definition, both custom and built in. Retrieves Policy Definitions from your current subscription by default.
{{% examples %}}
Example Usage
{{% example %}}
using Pulumi;
using Azure = Pulumi.Azure;
class MyStack : Stack
{
public MyStack()
{
var example = Output.Create(Azure.Policy.GetPolicyDefintion.InvokeAsync(new Azure.Policy.GetPolicyDefintionArgs
{
DisplayName = "Allowed resource types",
}));
this.Id = example.Apply(example => example.Id);
}
[Output("id")]
public Output<string> Id { get; set; }
}
{{% /example %}} {{% /examples %}}
Declaration
public static Task<GetPolicyDefintionResult> InvokeAsync(GetPolicyDefintionArgs args = null, InvokeOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| GetPolicyDefintionArgs | args | |
| InvokeOptions | options |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<GetPolicyDefintionResult> |