GetPolicySetDefinition
Use this data source to access information about an existing Policy Set Definition.
Example Usage
using Pulumi;
using Azure = Pulumi.Azure;
class MyStack : Stack
{
public MyStack()
{
var example = Output.Create(Azure.Policy.GetPolicySetDefinition.InvokeAsync(new Azure.Policy.GetPolicySetDefinitionArgs
{
DisplayName = "Policy Set Definition Example",
}));
this.Id = example.Apply(example => example.Id);
}
[Output("id")]
public Output<string> Id { get; set; }
}
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/policy"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
opt0 := "Policy Set Definition Example"
example, err := policy.LookupPolicySetDefinition(ctx, &policy.LookupPolicySetDefinitionArgs{
DisplayName: &opt0,
}, nil)
if err != nil {
return err
}
ctx.Export("id", example.Id)
return nil
})
}import pulumi
import pulumi_azure as azure
example = azure.policy.get_policy_set_definition(display_name="Policy Set Definition Example")
pulumi.export("id", example.id)import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = azure.policy.getPolicySetDefinition({
displayName: "Policy Set Definition Example",
});
export const id = example.then(example => example.id);Using GetPolicySetDefinition
function getPolicySetDefinition(args: GetPolicySetDefinitionArgs, opts?: InvokeOptions): Promise<GetPolicySetDefinitionResult>function get_policy_set_definition(display_name=None, management_group_name=None, name=None, opts=None)func LookupPolicySetDefinition(ctx *Context, args *LookupPolicySetDefinitionArgs, opts ...InvokeOption) (*LookupPolicySetDefinitionResult, error)Note: This function is named
LookupPolicySetDefinitionin the Go SDK.
public static class GetPolicySetDefinition {
public static Task<GetPolicySetDefinitionResult> InvokeAsync(GetPolicySetDefinitionArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
- Display
Name string Specifies the display name of the Policy Set Definition. Conflicts with
name.- Management
Group stringName Only retrieve Policy Set Definitions from this Management Group.
- Name string
Specifies the name of the Policy Set Definition. Conflicts with
display_name.
- Display
Name string Specifies the display name of the Policy Set Definition. Conflicts with
name.- Management
Group stringName Only retrieve Policy Set Definitions from this Management Group.
- Name string
Specifies the name of the Policy Set Definition. Conflicts with
display_name.
- display
Name string Specifies the display name of the Policy Set Definition. Conflicts with
name.- management
Group stringName Only retrieve Policy Set Definitions from this Management Group.
- name string
Specifies the name of the Policy Set Definition. Conflicts with
display_name.
- display_
name str Specifies the display name of the Policy Set Definition. Conflicts with
name.- management_
group_ strname Only retrieve Policy Set Definitions from this Management Group.
- name str
Specifies the name of the Policy Set Definition. Conflicts with
display_name.
GetPolicySetDefinition Result
The following output properties are available:
- Description string
The Description of the Policy Set Definition.
- Display
Name string - Id string
The provider-assigned unique ID for this managed resource.
- Metadata string
Any Metadata defined in the Policy Set Definition.
- Name string
- Parameters string
Any Parameters defined in the Policy Set Definition.
- Policy
Definitions string The policy definitions contained within the policy set definition.
- Policy
Type string The Type of the Policy Set Definition.
- Management
Group stringName
- Description string
The Description of the Policy Set Definition.
- Display
Name string - Id string
The provider-assigned unique ID for this managed resource.
- Metadata string
Any Metadata defined in the Policy Set Definition.
- Name string
- Parameters string
Any Parameters defined in the Policy Set Definition.
- Policy
Definitions string The policy definitions contained within the policy set definition.
- Policy
Type string The Type of the Policy Set Definition.
- Management
Group stringName
- description string
The Description of the Policy Set Definition.
- display
Name string - id string
The provider-assigned unique ID for this managed resource.
- metadata string
Any Metadata defined in the Policy Set Definition.
- name string
- parameters string
Any Parameters defined in the Policy Set Definition.
- policy
Definitions string The policy definitions contained within the policy set definition.
- policy
Type string The Type of the Policy Set Definition.
- management
Group stringName
- description str
The Description of the Policy Set Definition.
- display_
name str - id str
The provider-assigned unique ID for this managed resource.
- metadata str
Any Metadata defined in the Policy Set Definition.
- name str
- parameters str
Any Parameters defined in the Policy Set Definition.
- policy_
definitions str The policy definitions contained within the policy set definition.
- policy_
type str The Type of the Policy Set Definition.
- management_
group_ strname
Package Details
- Repository
- https://github.com/pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurermTerraform Provider.