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 LookupPolicySetDefinition in the Go SDK.

public static class GetPolicySetDefinition {
    public static Task<GetPolicySetDefinitionResult> InvokeAsync(GetPolicySetDefinitionArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

DisplayName string

Specifies the display name of the Policy Set Definition. Conflicts with name.

ManagementGroupName string

Only retrieve Policy Set Definitions from this Management Group.

Name string

Specifies the name of the Policy Set Definition. Conflicts with display_name.

DisplayName string

Specifies the display name of the Policy Set Definition. Conflicts with name.

ManagementGroupName string

Only retrieve Policy Set Definitions from this Management Group.

Name string

Specifies the name of the Policy Set Definition. Conflicts with display_name.

displayName string

Specifies the display name of the Policy Set Definition. Conflicts with name.

managementGroupName string

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_name str

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.

DisplayName 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.

PolicyDefinitions string

The policy definitions contained within the policy set definition.

PolicyType string

The Type of the Policy Set Definition.

ManagementGroupName string
Description string

The Description of the Policy Set Definition.

DisplayName 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.

PolicyDefinitions string

The policy definitions contained within the policy set definition.

PolicyType string

The Type of the Policy Set Definition.

ManagementGroupName string
description string

The Description of the Policy Set Definition.

displayName 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.

policyDefinitions string

The policy definitions contained within the policy set definition.

policyType string

The Type of the Policy Set Definition.

managementGroupName string
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_name str

Package Details

Repository
https://github.com/pulumi/pulumi-azure
License
Apache-2.0
Notes
This Pulumi package is based on the azurerm Terraform Provider.