policy

package
v4.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 6, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Assignment

type Assignment struct {
	pulumi.CustomResourceState

	// A description to use for this Policy Assignment. Changing this forces a new resource to be created.
	Description pulumi.StringPtrOutput `pulumi:"description"`
	// A friendly display name to use for this Policy Assignment. Changing this forces a new resource to be created.
	DisplayName pulumi.StringPtrOutput `pulumi:"displayName"`
	// Can be set to 'true' or 'false' to control whether the assignment is enforced (true) or not (false). Default is 'true'.
	EnforcementMode pulumi.BoolPtrOutput `pulumi:"enforcementMode"`
	// An `identity` block.
	Identity AssignmentIdentityOutput `pulumi:"identity"`
	// The Azure location where this policy assignment should exist. This is required when an Identity is assigned. Changing this forces a new resource to be created.
	Location pulumi.StringOutput `pulumi:"location"`
	// The metadata for the policy assignment. This is a JSON string representing additional metadata that should be stored with the policy assignment.
	Metadata pulumi.StringOutput `pulumi:"metadata"`
	// The name of the Policy Assignment. Changing this forces a new resource to be created.
	Name pulumi.StringOutput `pulumi:"name"`
	// A list of the Policy Assignment's excluded scopes. The list must contain Resource IDs (such as Subscriptions e.g. `/subscriptions/00000000-0000-0000-000000000000` or Resource Groups e.g.`/subscriptions/00000000-0000-0000-000000000000/resourceGroups/myResourceGroup`).
	NotScopes pulumi.StringArrayOutput `pulumi:"notScopes"`
	// Parameters for the policy definition. This field is a JSON string that maps to the Parameters field from the Policy Definition. Changing this forces a new resource to be created.
	Parameters pulumi.StringPtrOutput `pulumi:"parameters"`
	// The ID of the Policy Definition to be applied at the specified Scope.
	PolicyDefinitionId pulumi.StringOutput `pulumi:"policyDefinitionId"`
	// The Scope at which the Policy Assignment should be applied, which must be a Resource ID (such as Subscription e.g. `/subscriptions/00000000-0000-0000-000000000000` or a Resource Group e.g.`/subscriptions/00000000-0000-0000-000000000000/resourceGroups/myResourceGroup`). Changing this forces a new resource to be created.
	Scope pulumi.StringOutput `pulumi:"scope"`
}

Configures the specified Policy Definition at the specified Scope. Also, Policy Set Definitions are supported.

!> **Note:** The `policy.Assignment` resource has been deprecated in favour of the `management.GroupPolicyAssignment`, `core.ResourcePolicyAssignment`, `core.ResourceGroupPolicyAssignment` and `core.SubscriptionPolicyAssignment` resources and will be removed in v3.0 of the Azure Provider.

## Example Usage

```go package main

import (

"fmt"

"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/policy"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		exampleDefinition, err := policy.NewDefinition(ctx, "exampleDefinition", &policy.DefinitionArgs{
			PolicyType:  pulumi.String("Custom"),
			Mode:        pulumi.String("All"),
			DisplayName: pulumi.String("my-policy-definition"),
			PolicyRule: pulumi.String(fmt.Sprintf("%v%v%v%v%v%v%v%v%v%v%v", "	{\n", "    \"if\": {\n", "      \"not\": {\n", "        \"field\": \"location\",\n", "        \"in\": \"[parameters('allowedLocations')]\"\n", "      }\n", "    },\n", "    \"then\": {\n", "      \"effect\": \"audit\"\n", "    }\n", "  }\n")),
			Parameters: pulumi.String(fmt.Sprintf("%v%v%v%v%v%v%v%v%v%v", "	{\n", "    \"allowedLocations\": {\n", "      \"type\": \"Array\",\n", "      \"metadata\": {\n", "        \"description\": \"The list of allowed locations for resources.\",\n", "        \"displayName\": \"Allowed locations\",\n", "        \"strongType\": \"location\"\n", "      }\n", "    }\n", "  }\n")),
		})
		if err != nil {
			return err
		}
		exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
			Location: pulumi.String("West Europe"),
		})
		if err != nil {
			return err
		}
		_, err = policy.NewAssignment(ctx, "exampleAssignment", &policy.AssignmentArgs{
			Scope:              exampleResourceGroup.ID(),
			PolicyDefinitionId: exampleDefinition.ID(),
			Description:        pulumi.String("Policy Assignment created via an Acceptance Test"),
			DisplayName:        pulumi.String("My Example Policy Assignment"),
			Metadata:           pulumi.String(fmt.Sprintf("%v%v%v", "    {\n", "    \"category\": \"General\"\n", "    }\n")),
			Parameters:         pulumi.String(fmt.Sprintf("%v%v%v%v%v", "{\n", "  \"allowedLocations\": {\n", "    \"value\": [ \"West Europe\" ]\n", "  }\n", "}\n")),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

Policy Assignments can be imported using the `policy name`, e.g.

```sh

$ pulumi import azure:policy/assignment:Assignment assignment1 /subscriptions/00000000-0000-0000-000000000000/providers/Microsoft.Authorization/policyAssignments/assignment1

```

func GetAssignment

func GetAssignment(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *AssignmentState, opts ...pulumi.ResourceOption) (*Assignment, error)

GetAssignment gets an existing Assignment resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewAssignment

func NewAssignment(ctx *pulumi.Context,
	name string, args *AssignmentArgs, opts ...pulumi.ResourceOption) (*Assignment, error)

NewAssignment registers a new resource with the given unique name, arguments, and options.

func (*Assignment) ElementType

func (*Assignment) ElementType() reflect.Type

func (*Assignment) ToAssignmentOutput

func (i *Assignment) ToAssignmentOutput() AssignmentOutput

func (*Assignment) ToAssignmentOutputWithContext

func (i *Assignment) ToAssignmentOutputWithContext(ctx context.Context) AssignmentOutput

func (*Assignment) ToAssignmentPtrOutput

func (i *Assignment) ToAssignmentPtrOutput() AssignmentPtrOutput

func (*Assignment) ToAssignmentPtrOutputWithContext

func (i *Assignment) ToAssignmentPtrOutputWithContext(ctx context.Context) AssignmentPtrOutput

type AssignmentArgs

type AssignmentArgs struct {
	// A description to use for this Policy Assignment. Changing this forces a new resource to be created.
	Description pulumi.StringPtrInput
	// A friendly display name to use for this Policy Assignment. Changing this forces a new resource to be created.
	DisplayName pulumi.StringPtrInput
	// Can be set to 'true' or 'false' to control whether the assignment is enforced (true) or not (false). Default is 'true'.
	EnforcementMode pulumi.BoolPtrInput
	// An `identity` block.
	Identity AssignmentIdentityPtrInput
	// The Azure location where this policy assignment should exist. This is required when an Identity is assigned. Changing this forces a new resource to be created.
	Location pulumi.StringPtrInput
	// The metadata for the policy assignment. This is a JSON string representing additional metadata that should be stored with the policy assignment.
	Metadata pulumi.StringPtrInput
	// The name of the Policy Assignment. Changing this forces a new resource to be created.
	Name pulumi.StringPtrInput
	// A list of the Policy Assignment's excluded scopes. The list must contain Resource IDs (such as Subscriptions e.g. `/subscriptions/00000000-0000-0000-000000000000` or Resource Groups e.g.`/subscriptions/00000000-0000-0000-000000000000/resourceGroups/myResourceGroup`).
	NotScopes pulumi.StringArrayInput
	// Parameters for the policy definition. This field is a JSON string that maps to the Parameters field from the Policy Definition. Changing this forces a new resource to be created.
	Parameters pulumi.StringPtrInput
	// The ID of the Policy Definition to be applied at the specified Scope.
	PolicyDefinitionId pulumi.StringInput
	// The Scope at which the Policy Assignment should be applied, which must be a Resource ID (such as Subscription e.g. `/subscriptions/00000000-0000-0000-000000000000` or a Resource Group e.g.`/subscriptions/00000000-0000-0000-000000000000/resourceGroups/myResourceGroup`). Changing this forces a new resource to be created.
	Scope pulumi.StringInput
}

The set of arguments for constructing a Assignment resource.

func (AssignmentArgs) ElementType

func (AssignmentArgs) ElementType() reflect.Type

type AssignmentArray

type AssignmentArray []AssignmentInput

func (AssignmentArray) ElementType

func (AssignmentArray) ElementType() reflect.Type

func (AssignmentArray) ToAssignmentArrayOutput

func (i AssignmentArray) ToAssignmentArrayOutput() AssignmentArrayOutput

func (AssignmentArray) ToAssignmentArrayOutputWithContext

func (i AssignmentArray) ToAssignmentArrayOutputWithContext(ctx context.Context) AssignmentArrayOutput

type AssignmentArrayInput

type AssignmentArrayInput interface {
	pulumi.Input

	ToAssignmentArrayOutput() AssignmentArrayOutput
	ToAssignmentArrayOutputWithContext(context.Context) AssignmentArrayOutput
}

AssignmentArrayInput is an input type that accepts AssignmentArray and AssignmentArrayOutput values. You can construct a concrete instance of `AssignmentArrayInput` via:

AssignmentArray{ AssignmentArgs{...} }

type AssignmentArrayOutput

type AssignmentArrayOutput struct{ *pulumi.OutputState }

func (AssignmentArrayOutput) ElementType

func (AssignmentArrayOutput) ElementType() reflect.Type

func (AssignmentArrayOutput) Index

func (AssignmentArrayOutput) ToAssignmentArrayOutput

func (o AssignmentArrayOutput) ToAssignmentArrayOutput() AssignmentArrayOutput

func (AssignmentArrayOutput) ToAssignmentArrayOutputWithContext

func (o AssignmentArrayOutput) ToAssignmentArrayOutputWithContext(ctx context.Context) AssignmentArrayOutput

type AssignmentIdentity

type AssignmentIdentity struct {
	// The Principal ID of this Policy Assignment if `type` is `SystemAssigned`.
	PrincipalId *string `pulumi:"principalId"`
	// The Tenant ID of this Policy Assignment if `type` is `SystemAssigned`.
	TenantId *string `pulumi:"tenantId"`
	// The type of Managed Identity for this Policy Assignment. Possible values are `SystemAssigned` (where Azure will generate a Service Principal for you).
	Type *string `pulumi:"type"`
}

type AssignmentIdentityArgs

type AssignmentIdentityArgs struct {
	// The Principal ID of this Policy Assignment if `type` is `SystemAssigned`.
	PrincipalId pulumi.StringPtrInput `pulumi:"principalId"`
	// The Tenant ID of this Policy Assignment if `type` is `SystemAssigned`.
	TenantId pulumi.StringPtrInput `pulumi:"tenantId"`
	// The type of Managed Identity for this Policy Assignment. Possible values are `SystemAssigned` (where Azure will generate a Service Principal for you).
	Type pulumi.StringPtrInput `pulumi:"type"`
}

func (AssignmentIdentityArgs) ElementType

func (AssignmentIdentityArgs) ElementType() reflect.Type

func (AssignmentIdentityArgs) ToAssignmentIdentityOutput

func (i AssignmentIdentityArgs) ToAssignmentIdentityOutput() AssignmentIdentityOutput

func (AssignmentIdentityArgs) ToAssignmentIdentityOutputWithContext

func (i AssignmentIdentityArgs) ToAssignmentIdentityOutputWithContext(ctx context.Context) AssignmentIdentityOutput

func (AssignmentIdentityArgs) ToAssignmentIdentityPtrOutput

func (i AssignmentIdentityArgs) ToAssignmentIdentityPtrOutput() AssignmentIdentityPtrOutput

func (AssignmentIdentityArgs) ToAssignmentIdentityPtrOutputWithContext

func (i AssignmentIdentityArgs) ToAssignmentIdentityPtrOutputWithContext(ctx context.Context) AssignmentIdentityPtrOutput

type AssignmentIdentityInput

type AssignmentIdentityInput interface {
	pulumi.Input

	ToAssignmentIdentityOutput() AssignmentIdentityOutput
	ToAssignmentIdentityOutputWithContext(context.Context) AssignmentIdentityOutput
}

AssignmentIdentityInput is an input type that accepts AssignmentIdentityArgs and AssignmentIdentityOutput values. You can construct a concrete instance of `AssignmentIdentityInput` via:

AssignmentIdentityArgs{...}

type AssignmentIdentityOutput

type AssignmentIdentityOutput struct{ *pulumi.OutputState }

func (AssignmentIdentityOutput) ElementType

func (AssignmentIdentityOutput) ElementType() reflect.Type

func (AssignmentIdentityOutput) PrincipalId

The Principal ID of this Policy Assignment if `type` is `SystemAssigned`.

func (AssignmentIdentityOutput) TenantId

The Tenant ID of this Policy Assignment if `type` is `SystemAssigned`.

func (AssignmentIdentityOutput) ToAssignmentIdentityOutput

func (o AssignmentIdentityOutput) ToAssignmentIdentityOutput() AssignmentIdentityOutput

func (AssignmentIdentityOutput) ToAssignmentIdentityOutputWithContext

func (o AssignmentIdentityOutput) ToAssignmentIdentityOutputWithContext(ctx context.Context) AssignmentIdentityOutput

func (AssignmentIdentityOutput) ToAssignmentIdentityPtrOutput

func (o AssignmentIdentityOutput) ToAssignmentIdentityPtrOutput() AssignmentIdentityPtrOutput

func (AssignmentIdentityOutput) ToAssignmentIdentityPtrOutputWithContext

func (o AssignmentIdentityOutput) ToAssignmentIdentityPtrOutputWithContext(ctx context.Context) AssignmentIdentityPtrOutput

func (AssignmentIdentityOutput) Type

The type of Managed Identity for this Policy Assignment. Possible values are `SystemAssigned` (where Azure will generate a Service Principal for you).

type AssignmentIdentityPtrInput

type AssignmentIdentityPtrInput interface {
	pulumi.Input

	ToAssignmentIdentityPtrOutput() AssignmentIdentityPtrOutput
	ToAssignmentIdentityPtrOutputWithContext(context.Context) AssignmentIdentityPtrOutput
}

AssignmentIdentityPtrInput is an input type that accepts AssignmentIdentityArgs, AssignmentIdentityPtr and AssignmentIdentityPtrOutput values. You can construct a concrete instance of `AssignmentIdentityPtrInput` via:

        AssignmentIdentityArgs{...}

or:

        nil

type AssignmentIdentityPtrOutput

type AssignmentIdentityPtrOutput struct{ *pulumi.OutputState }

func (AssignmentIdentityPtrOutput) Elem

func (AssignmentIdentityPtrOutput) ElementType

func (AssignmentIdentityPtrOutput) PrincipalId

The Principal ID of this Policy Assignment if `type` is `SystemAssigned`.

func (AssignmentIdentityPtrOutput) TenantId

The Tenant ID of this Policy Assignment if `type` is `SystemAssigned`.

func (AssignmentIdentityPtrOutput) ToAssignmentIdentityPtrOutput

func (o AssignmentIdentityPtrOutput) ToAssignmentIdentityPtrOutput() AssignmentIdentityPtrOutput

func (AssignmentIdentityPtrOutput) ToAssignmentIdentityPtrOutputWithContext

func (o AssignmentIdentityPtrOutput) ToAssignmentIdentityPtrOutputWithContext(ctx context.Context) AssignmentIdentityPtrOutput

func (AssignmentIdentityPtrOutput) Type

The type of Managed Identity for this Policy Assignment. Possible values are `SystemAssigned` (where Azure will generate a Service Principal for you).

type AssignmentInput

type AssignmentInput interface {
	pulumi.Input

	ToAssignmentOutput() AssignmentOutput
	ToAssignmentOutputWithContext(ctx context.Context) AssignmentOutput
}

type AssignmentMap

type AssignmentMap map[string]AssignmentInput

func (AssignmentMap) ElementType

func (AssignmentMap) ElementType() reflect.Type

func (AssignmentMap) ToAssignmentMapOutput

func (i AssignmentMap) ToAssignmentMapOutput() AssignmentMapOutput

func (AssignmentMap) ToAssignmentMapOutputWithContext

func (i AssignmentMap) ToAssignmentMapOutputWithContext(ctx context.Context) AssignmentMapOutput

type AssignmentMapInput

type AssignmentMapInput interface {
	pulumi.Input

	ToAssignmentMapOutput() AssignmentMapOutput
	ToAssignmentMapOutputWithContext(context.Context) AssignmentMapOutput
}

AssignmentMapInput is an input type that accepts AssignmentMap and AssignmentMapOutput values. You can construct a concrete instance of `AssignmentMapInput` via:

AssignmentMap{ "key": AssignmentArgs{...} }

type AssignmentMapOutput

type AssignmentMapOutput struct{ *pulumi.OutputState }

func (AssignmentMapOutput) ElementType

func (AssignmentMapOutput) ElementType() reflect.Type

func (AssignmentMapOutput) MapIndex

func (AssignmentMapOutput) ToAssignmentMapOutput

func (o AssignmentMapOutput) ToAssignmentMapOutput() AssignmentMapOutput

func (AssignmentMapOutput) ToAssignmentMapOutputWithContext

func (o AssignmentMapOutput) ToAssignmentMapOutputWithContext(ctx context.Context) AssignmentMapOutput

type AssignmentOutput

type AssignmentOutput struct {
	*pulumi.OutputState
}

func (AssignmentOutput) ElementType

func (AssignmentOutput) ElementType() reflect.Type

func (AssignmentOutput) ToAssignmentOutput

func (o AssignmentOutput) ToAssignmentOutput() AssignmentOutput

func (AssignmentOutput) ToAssignmentOutputWithContext

func (o AssignmentOutput) ToAssignmentOutputWithContext(ctx context.Context) AssignmentOutput

func (AssignmentOutput) ToAssignmentPtrOutput

func (o AssignmentOutput) ToAssignmentPtrOutput() AssignmentPtrOutput

func (AssignmentOutput) ToAssignmentPtrOutputWithContext

func (o AssignmentOutput) ToAssignmentPtrOutputWithContext(ctx context.Context) AssignmentPtrOutput

type AssignmentPtrInput

type AssignmentPtrInput interface {
	pulumi.Input

	ToAssignmentPtrOutput() AssignmentPtrOutput
	ToAssignmentPtrOutputWithContext(ctx context.Context) AssignmentPtrOutput
}

type AssignmentPtrOutput

type AssignmentPtrOutput struct {
	*pulumi.OutputState
}

func (AssignmentPtrOutput) ElementType

func (AssignmentPtrOutput) ElementType() reflect.Type

func (AssignmentPtrOutput) ToAssignmentPtrOutput

func (o AssignmentPtrOutput) ToAssignmentPtrOutput() AssignmentPtrOutput

func (AssignmentPtrOutput) ToAssignmentPtrOutputWithContext

func (o AssignmentPtrOutput) ToAssignmentPtrOutputWithContext(ctx context.Context) AssignmentPtrOutput

type AssignmentState

type AssignmentState struct {
	// A description to use for this Policy Assignment. Changing this forces a new resource to be created.
	Description pulumi.StringPtrInput
	// A friendly display name to use for this Policy Assignment. Changing this forces a new resource to be created.
	DisplayName pulumi.StringPtrInput
	// Can be set to 'true' or 'false' to control whether the assignment is enforced (true) or not (false). Default is 'true'.
	EnforcementMode pulumi.BoolPtrInput
	// An `identity` block.
	Identity AssignmentIdentityPtrInput
	// The Azure location where this policy assignment should exist. This is required when an Identity is assigned. Changing this forces a new resource to be created.
	Location pulumi.StringPtrInput
	// The metadata for the policy assignment. This is a JSON string representing additional metadata that should be stored with the policy assignment.
	Metadata pulumi.StringPtrInput
	// The name of the Policy Assignment. Changing this forces a new resource to be created.
	Name pulumi.StringPtrInput
	// A list of the Policy Assignment's excluded scopes. The list must contain Resource IDs (such as Subscriptions e.g. `/subscriptions/00000000-0000-0000-000000000000` or Resource Groups e.g.`/subscriptions/00000000-0000-0000-000000000000/resourceGroups/myResourceGroup`).
	NotScopes pulumi.StringArrayInput
	// Parameters for the policy definition. This field is a JSON string that maps to the Parameters field from the Policy Definition. Changing this forces a new resource to be created.
	Parameters pulumi.StringPtrInput
	// The ID of the Policy Definition to be applied at the specified Scope.
	PolicyDefinitionId pulumi.StringPtrInput
	// The Scope at which the Policy Assignment should be applied, which must be a Resource ID (such as Subscription e.g. `/subscriptions/00000000-0000-0000-000000000000` or a Resource Group e.g.`/subscriptions/00000000-0000-0000-000000000000/resourceGroups/myResourceGroup`). Changing this forces a new resource to be created.
	Scope pulumi.StringPtrInput
}

func (AssignmentState) ElementType

func (AssignmentState) ElementType() reflect.Type

type Definition

type Definition struct {
	pulumi.CustomResourceState

	// The description of the policy definition.
	Description pulumi.StringPtrOutput `pulumi:"description"`
	// The display name of the policy definition.
	DisplayName pulumi.StringOutput `pulumi:"displayName"`
	// The name of the Management Group where this policy should be defined. Changing this forces a new resource to be created.
	//
	// Deprecated: Deprecated in favour of `management_group_name`
	ManagementGroupId pulumi.StringOutput `pulumi:"managementGroupId"`
	// The name of the Management Group where this policy should be defined. Changing this forces a new resource to be created.
	ManagementGroupName pulumi.StringOutput `pulumi:"managementGroupName"`
	// The metadata for the policy definition. This
	// is a JSON string representing additional metadata that should be stored
	// with the policy definition.
	Metadata pulumi.StringOutput `pulumi:"metadata"`
	// The policy mode that allows you to specify which resource
	// types will be evaluated. Possible values are `All`, `Indexed`, `Microsoft.ContainerService.Data`, `Microsoft.CustomerLockbox.Data`, `Microsoft.DataCatalog.Data`, `Microsoft.KeyVault.Data`, `Microsoft.Kubernetes.Data`, `Microsoft.MachineLearningServices.Data`, `Microsoft.Network.Data` and `Microsoft.Synapse.Data`.
	Mode pulumi.StringOutput `pulumi:"mode"`
	// The name of the policy definition. Changing this forces a
	// new resource to be created.
	Name pulumi.StringOutput `pulumi:"name"`
	// Parameters for the policy definition. This field
	// is a JSON string that allows you to parameterize your policy definition.
	Parameters pulumi.StringPtrOutput `pulumi:"parameters"`
	// The policy rule for the policy definition. This
	// is a JSON string representing the rule that contains an if and
	// a then block.
	PolicyRule pulumi.StringPtrOutput `pulumi:"policyRule"`
	// The policy type. Possible values are `BuiltIn`, `Custom` and `NotSpecified`. Changing this forces a new resource to be created.
	PolicyType pulumi.StringOutput `pulumi:"policyType"`
}

Manages a policy rule definition on a management group or your provider subscription.

Policy definitions do not take effect until they are assigned to a scope using a Policy Assignment.

## Example Usage

```go package main

import (

"fmt"

"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/policy"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := policy.NewDefinition(ctx, "policy", &policy.DefinitionArgs{
			DisplayName: pulumi.String("acceptance test policy definition"),
			Metadata:    pulumi.String(fmt.Sprintf("%v%v%v%v%v", "    {\n", "    \"category\": \"General\"\n", "    }\n", "\n", "\n")),
			Mode:        pulumi.String("Indexed"),
			Parameters: pulumi.String(fmt.Sprintf("%v%v%v%v%v%v%v%v%v%v%v", "	{\n", "    \"allowedLocations\": {\n", "      \"type\": \"Array\",\n", "      \"metadata\": {\n", "        \"description\": \"The list of allowed locations for resources.\",\n", "        \"displayName\": \"Allowed locations\",\n", "        \"strongType\": \"location\"\n", "      }\n", "    }\n", "  }\n", "\n")),
			PolicyRule: pulumi.String(fmt.Sprintf("%v%v%v%v%v%v%v%v%v%v%v%v", "	{\n", "    \"if\": {\n", "      \"not\": {\n", "        \"field\": \"location\",\n", "        \"in\": \"[parameters('allowedLocations')]\"\n", "      }\n", "    },\n", "    \"then\": {\n", "      \"effect\": \"audit\"\n", "    }\n", "  }\n", "\n")),
			PolicyType: pulumi.String("Custom"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

Policy Definitions can be imported using the `policy name`, e.g.

```sh

$ pulumi import azure:policy/definition:Definition examplePolicy /subscriptions/<SUBSCRIPTION_ID>/providers/Microsoft.Authorization/policyDefinitions/<POLICY_NAME>

```

or

```sh

$ pulumi import azure:policy/definition:Definition examplePolicy /providers/Microsoft.Management/managementgroups/<MANGAGEMENT_GROUP_ID>/providers/Microsoft.Authorization/policyDefinitions/<POLICY_NAME>

```

func GetDefinition

func GetDefinition(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *DefinitionState, opts ...pulumi.ResourceOption) (*Definition, error)

GetDefinition gets an existing Definition resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewDefinition

func NewDefinition(ctx *pulumi.Context,
	name string, args *DefinitionArgs, opts ...pulumi.ResourceOption) (*Definition, error)

NewDefinition registers a new resource with the given unique name, arguments, and options.

func (*Definition) ElementType

func (*Definition) ElementType() reflect.Type

func (*Definition) ToDefinitionOutput

func (i *Definition) ToDefinitionOutput() DefinitionOutput

func (*Definition) ToDefinitionOutputWithContext

func (i *Definition) ToDefinitionOutputWithContext(ctx context.Context) DefinitionOutput

func (*Definition) ToDefinitionPtrOutput

func (i *Definition) ToDefinitionPtrOutput() DefinitionPtrOutput

func (*Definition) ToDefinitionPtrOutputWithContext

func (i *Definition) ToDefinitionPtrOutputWithContext(ctx context.Context) DefinitionPtrOutput

type DefinitionArgs

type DefinitionArgs struct {
	// The description of the policy definition.
	Description pulumi.StringPtrInput
	// The display name of the policy definition.
	DisplayName pulumi.StringInput
	// The name of the Management Group where this policy should be defined. Changing this forces a new resource to be created.
	//
	// Deprecated: Deprecated in favour of `management_group_name`
	ManagementGroupId pulumi.StringPtrInput
	// The name of the Management Group where this policy should be defined. Changing this forces a new resource to be created.
	ManagementGroupName pulumi.StringPtrInput
	// The metadata for the policy definition. This
	// is a JSON string representing additional metadata that should be stored
	// with the policy definition.
	Metadata pulumi.StringPtrInput
	// The policy mode that allows you to specify which resource
	// types will be evaluated. Possible values are `All`, `Indexed`, `Microsoft.ContainerService.Data`, `Microsoft.CustomerLockbox.Data`, `Microsoft.DataCatalog.Data`, `Microsoft.KeyVault.Data`, `Microsoft.Kubernetes.Data`, `Microsoft.MachineLearningServices.Data`, `Microsoft.Network.Data` and `Microsoft.Synapse.Data`.
	Mode pulumi.StringInput
	// The name of the policy definition. Changing this forces a
	// new resource to be created.
	Name pulumi.StringPtrInput
	// Parameters for the policy definition. This field
	// is a JSON string that allows you to parameterize your policy definition.
	Parameters pulumi.StringPtrInput
	// The policy rule for the policy definition. This
	// is a JSON string representing the rule that contains an if and
	// a then block.
	PolicyRule pulumi.StringPtrInput
	// The policy type. Possible values are `BuiltIn`, `Custom` and `NotSpecified`. Changing this forces a new resource to be created.
	PolicyType pulumi.StringInput
}

The set of arguments for constructing a Definition resource.

func (DefinitionArgs) ElementType

func (DefinitionArgs) ElementType() reflect.Type

type DefinitionArray

type DefinitionArray []DefinitionInput

func (DefinitionArray) ElementType

func (DefinitionArray) ElementType() reflect.Type

func (DefinitionArray) ToDefinitionArrayOutput

func (i DefinitionArray) ToDefinitionArrayOutput() DefinitionArrayOutput

func (DefinitionArray) ToDefinitionArrayOutputWithContext

func (i DefinitionArray) ToDefinitionArrayOutputWithContext(ctx context.Context) DefinitionArrayOutput

type DefinitionArrayInput

type DefinitionArrayInput interface {
	pulumi.Input

	ToDefinitionArrayOutput() DefinitionArrayOutput
	ToDefinitionArrayOutputWithContext(context.Context) DefinitionArrayOutput
}

DefinitionArrayInput is an input type that accepts DefinitionArray and DefinitionArrayOutput values. You can construct a concrete instance of `DefinitionArrayInput` via:

DefinitionArray{ DefinitionArgs{...} }

type DefinitionArrayOutput

type DefinitionArrayOutput struct{ *pulumi.OutputState }

func (DefinitionArrayOutput) ElementType

func (DefinitionArrayOutput) ElementType() reflect.Type

func (DefinitionArrayOutput) Index

func (DefinitionArrayOutput) ToDefinitionArrayOutput

func (o DefinitionArrayOutput) ToDefinitionArrayOutput() DefinitionArrayOutput

func (DefinitionArrayOutput) ToDefinitionArrayOutputWithContext

func (o DefinitionArrayOutput) ToDefinitionArrayOutputWithContext(ctx context.Context) DefinitionArrayOutput

type DefinitionInput

type DefinitionInput interface {
	pulumi.Input

	ToDefinitionOutput() DefinitionOutput
	ToDefinitionOutputWithContext(ctx context.Context) DefinitionOutput
}

type DefinitionMap

type DefinitionMap map[string]DefinitionInput

func (DefinitionMap) ElementType

func (DefinitionMap) ElementType() reflect.Type

func (DefinitionMap) ToDefinitionMapOutput

func (i DefinitionMap) ToDefinitionMapOutput() DefinitionMapOutput

func (DefinitionMap) ToDefinitionMapOutputWithContext

func (i DefinitionMap) ToDefinitionMapOutputWithContext(ctx context.Context) DefinitionMapOutput

type DefinitionMapInput

type DefinitionMapInput interface {
	pulumi.Input

	ToDefinitionMapOutput() DefinitionMapOutput
	ToDefinitionMapOutputWithContext(context.Context) DefinitionMapOutput
}

DefinitionMapInput is an input type that accepts DefinitionMap and DefinitionMapOutput values. You can construct a concrete instance of `DefinitionMapInput` via:

DefinitionMap{ "key": DefinitionArgs{...} }

type DefinitionMapOutput

type DefinitionMapOutput struct{ *pulumi.OutputState }

func (DefinitionMapOutput) ElementType

func (DefinitionMapOutput) ElementType() reflect.Type

func (DefinitionMapOutput) MapIndex

func (DefinitionMapOutput) ToDefinitionMapOutput

func (o DefinitionMapOutput) ToDefinitionMapOutput() DefinitionMapOutput

func (DefinitionMapOutput) ToDefinitionMapOutputWithContext

func (o DefinitionMapOutput) ToDefinitionMapOutputWithContext(ctx context.Context) DefinitionMapOutput

type DefinitionOutput

type DefinitionOutput struct {
	*pulumi.OutputState
}

func (DefinitionOutput) ElementType

func (DefinitionOutput) ElementType() reflect.Type

func (DefinitionOutput) ToDefinitionOutput

func (o DefinitionOutput) ToDefinitionOutput() DefinitionOutput

func (DefinitionOutput) ToDefinitionOutputWithContext

func (o DefinitionOutput) ToDefinitionOutputWithContext(ctx context.Context) DefinitionOutput

func (DefinitionOutput) ToDefinitionPtrOutput

func (o DefinitionOutput) ToDefinitionPtrOutput() DefinitionPtrOutput

func (DefinitionOutput) ToDefinitionPtrOutputWithContext

func (o DefinitionOutput) ToDefinitionPtrOutputWithContext(ctx context.Context) DefinitionPtrOutput

type DefinitionPtrInput

type DefinitionPtrInput interface {
	pulumi.Input

	ToDefinitionPtrOutput() DefinitionPtrOutput
	ToDefinitionPtrOutputWithContext(ctx context.Context) DefinitionPtrOutput
}

type DefinitionPtrOutput

type DefinitionPtrOutput struct {
	*pulumi.OutputState
}

func (DefinitionPtrOutput) ElementType

func (DefinitionPtrOutput) ElementType() reflect.Type

func (DefinitionPtrOutput) ToDefinitionPtrOutput

func (o DefinitionPtrOutput) ToDefinitionPtrOutput() DefinitionPtrOutput

func (DefinitionPtrOutput) ToDefinitionPtrOutputWithContext

func (o DefinitionPtrOutput) ToDefinitionPtrOutputWithContext(ctx context.Context) DefinitionPtrOutput

type DefinitionState

type DefinitionState struct {
	// The description of the policy definition.
	Description pulumi.StringPtrInput
	// The display name of the policy definition.
	DisplayName pulumi.StringPtrInput
	// The name of the Management Group where this policy should be defined. Changing this forces a new resource to be created.
	//
	// Deprecated: Deprecated in favour of `management_group_name`
	ManagementGroupId pulumi.StringPtrInput
	// The name of the Management Group where this policy should be defined. Changing this forces a new resource to be created.
	ManagementGroupName pulumi.StringPtrInput
	// The metadata for the policy definition. This
	// is a JSON string representing additional metadata that should be stored
	// with the policy definition.
	Metadata pulumi.StringPtrInput
	// The policy mode that allows you to specify which resource
	// types will be evaluated. Possible values are `All`, `Indexed`, `Microsoft.ContainerService.Data`, `Microsoft.CustomerLockbox.Data`, `Microsoft.DataCatalog.Data`, `Microsoft.KeyVault.Data`, `Microsoft.Kubernetes.Data`, `Microsoft.MachineLearningServices.Data`, `Microsoft.Network.Data` and `Microsoft.Synapse.Data`.
	Mode pulumi.StringPtrInput
	// The name of the policy definition. Changing this forces a
	// new resource to be created.
	Name pulumi.StringPtrInput
	// Parameters for the policy definition. This field
	// is a JSON string that allows you to parameterize your policy definition.
	Parameters pulumi.StringPtrInput
	// The policy rule for the policy definition. This
	// is a JSON string representing the rule that contains an if and
	// a then block.
	PolicyRule pulumi.StringPtrInput
	// The policy type. Possible values are `BuiltIn`, `Custom` and `NotSpecified`. Changing this forces a new resource to be created.
	PolicyType pulumi.StringPtrInput
}

func (DefinitionState) ElementType

func (DefinitionState) ElementType() reflect.Type

type GetPolicyDefintionArgs

type GetPolicyDefintionArgs struct {
	// Specifies the display name of the Policy Definition. Conflicts with `name`.
	DisplayName *string `pulumi:"displayName"`
	// Deprecated: Deprecated in favour of `management_group_name`
	ManagementGroupId *string `pulumi:"managementGroupId"`
	// Only retrieve Policy Definitions from this Management Group.
	ManagementGroupName *string `pulumi:"managementGroupName"`
	// Specifies the name of the Policy Definition. Conflicts with `displayName`.
	Name *string `pulumi:"name"`
}

A collection of arguments for invoking getPolicyDefintion.

type GetPolicyDefintionResult

type GetPolicyDefintionResult struct {
	// The Description of the Policy.
	Description string `pulumi:"description"`
	DisplayName string `pulumi:"displayName"`
	// The provider-assigned unique ID for this managed resource.
	Id string `pulumi:"id"`
	// Deprecated: Deprecated in favour of `management_group_name`
	ManagementGroupId   *string `pulumi:"managementGroupId"`
	ManagementGroupName *string `pulumi:"managementGroupName"`
	// Any Metadata defined in the Policy.
	Metadata string `pulumi:"metadata"`
	Name     string `pulumi:"name"`
	// Any Parameters defined in the Policy.
	Parameters string `pulumi:"parameters"`
	// The Rule as defined (in JSON) in the Policy.
	PolicyRule string `pulumi:"policyRule"`
	// The Type of the Policy. Possible values are "BuiltIn", "Custom" and "NotSpecified".
	PolicyType string `pulumi:"policyType"`
	// The Type of Policy.
	Type string `pulumi:"type"`
}

A collection of values returned by getPolicyDefintion.

func GetPolicyDefintion

func GetPolicyDefintion(ctx *pulumi.Context, args *GetPolicyDefintionArgs, opts ...pulumi.InvokeOption) (*GetPolicyDefintionResult, error)

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.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/policy"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		opt0 := "Allowed resource types"
		example, err := policy.GetPolicyDefintion(ctx, &policy.GetPolicyDefintionArgs{
			DisplayName: &opt0,
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("id", example.Id)
		return nil
	})
}

```

type GetPolicySetDefinitionPolicyDefinitionGroup

type GetPolicySetDefinitionPolicyDefinitionGroup struct {
	// The ID of a resource that contains additional metadata about this policy definition group.
	AdditionalMetadataResourceId string `pulumi:"additionalMetadataResourceId"`
	// The category of this policy definition group.
	Category string `pulumi:"category"`
	// The description of this policy definition group.
	Description string `pulumi:"description"`
	// Specifies the display name of the Policy Set Definition. Conflicts with `name`.
	DisplayName string `pulumi:"displayName"`
	// Specifies the name of the Policy Set Definition. Conflicts with `displayName`.
	Name string `pulumi:"name"`
}

type GetPolicySetDefinitionPolicyDefinitionGroupArgs

type GetPolicySetDefinitionPolicyDefinitionGroupArgs struct {
	// The ID of a resource that contains additional metadata about this policy definition group.
	AdditionalMetadataResourceId pulumi.StringInput `pulumi:"additionalMetadataResourceId"`
	// The category of this policy definition group.
	Category pulumi.StringInput `pulumi:"category"`
	// The description of this policy definition group.
	Description pulumi.StringInput `pulumi:"description"`
	// Specifies the display name of the Policy Set Definition. Conflicts with `name`.
	DisplayName pulumi.StringInput `pulumi:"displayName"`
	// Specifies the name of the Policy Set Definition. Conflicts with `displayName`.
	Name pulumi.StringInput `pulumi:"name"`
}

func (GetPolicySetDefinitionPolicyDefinitionGroupArgs) ElementType

func (GetPolicySetDefinitionPolicyDefinitionGroupArgs) ToGetPolicySetDefinitionPolicyDefinitionGroupOutput

func (i GetPolicySetDefinitionPolicyDefinitionGroupArgs) ToGetPolicySetDefinitionPolicyDefinitionGroupOutput() GetPolicySetDefinitionPolicyDefinitionGroupOutput

func (GetPolicySetDefinitionPolicyDefinitionGroupArgs) ToGetPolicySetDefinitionPolicyDefinitionGroupOutputWithContext

func (i GetPolicySetDefinitionPolicyDefinitionGroupArgs) ToGetPolicySetDefinitionPolicyDefinitionGroupOutputWithContext(ctx context.Context) GetPolicySetDefinitionPolicyDefinitionGroupOutput

type GetPolicySetDefinitionPolicyDefinitionGroupArray

type GetPolicySetDefinitionPolicyDefinitionGroupArray []GetPolicySetDefinitionPolicyDefinitionGroupInput

func (GetPolicySetDefinitionPolicyDefinitionGroupArray) ElementType

func (GetPolicySetDefinitionPolicyDefinitionGroupArray) ToGetPolicySetDefinitionPolicyDefinitionGroupArrayOutput

func (i GetPolicySetDefinitionPolicyDefinitionGroupArray) ToGetPolicySetDefinitionPolicyDefinitionGroupArrayOutput() GetPolicySetDefinitionPolicyDefinitionGroupArrayOutput

func (GetPolicySetDefinitionPolicyDefinitionGroupArray) ToGetPolicySetDefinitionPolicyDefinitionGroupArrayOutputWithContext

func (i GetPolicySetDefinitionPolicyDefinitionGroupArray) ToGetPolicySetDefinitionPolicyDefinitionGroupArrayOutputWithContext(ctx context.Context) GetPolicySetDefinitionPolicyDefinitionGroupArrayOutput

type GetPolicySetDefinitionPolicyDefinitionGroupArrayInput

type GetPolicySetDefinitionPolicyDefinitionGroupArrayInput interface {
	pulumi.Input

	ToGetPolicySetDefinitionPolicyDefinitionGroupArrayOutput() GetPolicySetDefinitionPolicyDefinitionGroupArrayOutput
	ToGetPolicySetDefinitionPolicyDefinitionGroupArrayOutputWithContext(context.Context) GetPolicySetDefinitionPolicyDefinitionGroupArrayOutput
}

GetPolicySetDefinitionPolicyDefinitionGroupArrayInput is an input type that accepts GetPolicySetDefinitionPolicyDefinitionGroupArray and GetPolicySetDefinitionPolicyDefinitionGroupArrayOutput values. You can construct a concrete instance of `GetPolicySetDefinitionPolicyDefinitionGroupArrayInput` via:

GetPolicySetDefinitionPolicyDefinitionGroupArray{ GetPolicySetDefinitionPolicyDefinitionGroupArgs{...} }

type GetPolicySetDefinitionPolicyDefinitionGroupArrayOutput

type GetPolicySetDefinitionPolicyDefinitionGroupArrayOutput struct{ *pulumi.OutputState }

func (GetPolicySetDefinitionPolicyDefinitionGroupArrayOutput) ElementType

func (GetPolicySetDefinitionPolicyDefinitionGroupArrayOutput) Index

func (GetPolicySetDefinitionPolicyDefinitionGroupArrayOutput) ToGetPolicySetDefinitionPolicyDefinitionGroupArrayOutput

func (GetPolicySetDefinitionPolicyDefinitionGroupArrayOutput) ToGetPolicySetDefinitionPolicyDefinitionGroupArrayOutputWithContext

func (o GetPolicySetDefinitionPolicyDefinitionGroupArrayOutput) ToGetPolicySetDefinitionPolicyDefinitionGroupArrayOutputWithContext(ctx context.Context) GetPolicySetDefinitionPolicyDefinitionGroupArrayOutput

type GetPolicySetDefinitionPolicyDefinitionGroupInput

type GetPolicySetDefinitionPolicyDefinitionGroupInput interface {
	pulumi.Input

	ToGetPolicySetDefinitionPolicyDefinitionGroupOutput() GetPolicySetDefinitionPolicyDefinitionGroupOutput
	ToGetPolicySetDefinitionPolicyDefinitionGroupOutputWithContext(context.Context) GetPolicySetDefinitionPolicyDefinitionGroupOutput
}

GetPolicySetDefinitionPolicyDefinitionGroupInput is an input type that accepts GetPolicySetDefinitionPolicyDefinitionGroupArgs and GetPolicySetDefinitionPolicyDefinitionGroupOutput values. You can construct a concrete instance of `GetPolicySetDefinitionPolicyDefinitionGroupInput` via:

GetPolicySetDefinitionPolicyDefinitionGroupArgs{...}

type GetPolicySetDefinitionPolicyDefinitionGroupOutput

type GetPolicySetDefinitionPolicyDefinitionGroupOutput struct{ *pulumi.OutputState }

func (GetPolicySetDefinitionPolicyDefinitionGroupOutput) AdditionalMetadataResourceId

The ID of a resource that contains additional metadata about this policy definition group.

func (GetPolicySetDefinitionPolicyDefinitionGroupOutput) Category

The category of this policy definition group.

func (GetPolicySetDefinitionPolicyDefinitionGroupOutput) Description

The description of this policy definition group.

func (GetPolicySetDefinitionPolicyDefinitionGroupOutput) DisplayName

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

func (GetPolicySetDefinitionPolicyDefinitionGroupOutput) ElementType

func (GetPolicySetDefinitionPolicyDefinitionGroupOutput) Name

Specifies the name of the Policy Set Definition. Conflicts with `displayName`.

func (GetPolicySetDefinitionPolicyDefinitionGroupOutput) ToGetPolicySetDefinitionPolicyDefinitionGroupOutput

func (o GetPolicySetDefinitionPolicyDefinitionGroupOutput) ToGetPolicySetDefinitionPolicyDefinitionGroupOutput() GetPolicySetDefinitionPolicyDefinitionGroupOutput

func (GetPolicySetDefinitionPolicyDefinitionGroupOutput) ToGetPolicySetDefinitionPolicyDefinitionGroupOutputWithContext

func (o GetPolicySetDefinitionPolicyDefinitionGroupOutput) ToGetPolicySetDefinitionPolicyDefinitionGroupOutputWithContext(ctx context.Context) GetPolicySetDefinitionPolicyDefinitionGroupOutput

type GetPolicySetDefinitionPolicyDefinitionReference

type GetPolicySetDefinitionPolicyDefinitionReference struct {
	// The parameter values for the referenced policy rule. This field is a json object.
	ParameterValues string `pulumi:"parameterValues"`
	// The mapping of the parameter values for the referenced policy rule. The keys are the parameter names.
	Parameters map[string]string `pulumi:"parameters"`
	// The ID of the policy definition or policy set definition that is included in this policy set definition.
	PolicyDefinitionId string `pulumi:"policyDefinitionId"`
	// The list of names of the policy definition groups that this policy definition reference belongs to.
	PolicyGroupNames []string `pulumi:"policyGroupNames"`
	// The unique ID within this policy set definition for this policy definition reference.
	ReferenceId string `pulumi:"referenceId"`
}

type GetPolicySetDefinitionPolicyDefinitionReferenceArgs

type GetPolicySetDefinitionPolicyDefinitionReferenceArgs struct {
	// The parameter values for the referenced policy rule. This field is a json object.
	ParameterValues pulumi.StringInput `pulumi:"parameterValues"`
	// The mapping of the parameter values for the referenced policy rule. The keys are the parameter names.
	Parameters pulumi.StringMapInput `pulumi:"parameters"`
	// The ID of the policy definition or policy set definition that is included in this policy set definition.
	PolicyDefinitionId pulumi.StringInput `pulumi:"policyDefinitionId"`
	// The list of names of the policy definition groups that this policy definition reference belongs to.
	PolicyGroupNames pulumi.StringArrayInput `pulumi:"policyGroupNames"`
	// The unique ID within this policy set definition for this policy definition reference.
	ReferenceId pulumi.StringInput `pulumi:"referenceId"`
}

func (GetPolicySetDefinitionPolicyDefinitionReferenceArgs) ElementType

func (GetPolicySetDefinitionPolicyDefinitionReferenceArgs) ToGetPolicySetDefinitionPolicyDefinitionReferenceOutput

func (i GetPolicySetDefinitionPolicyDefinitionReferenceArgs) ToGetPolicySetDefinitionPolicyDefinitionReferenceOutput() GetPolicySetDefinitionPolicyDefinitionReferenceOutput

func (GetPolicySetDefinitionPolicyDefinitionReferenceArgs) ToGetPolicySetDefinitionPolicyDefinitionReferenceOutputWithContext

func (i GetPolicySetDefinitionPolicyDefinitionReferenceArgs) ToGetPolicySetDefinitionPolicyDefinitionReferenceOutputWithContext(ctx context.Context) GetPolicySetDefinitionPolicyDefinitionReferenceOutput

type GetPolicySetDefinitionPolicyDefinitionReferenceArray

type GetPolicySetDefinitionPolicyDefinitionReferenceArray []GetPolicySetDefinitionPolicyDefinitionReferenceInput

func (GetPolicySetDefinitionPolicyDefinitionReferenceArray) ElementType

func (GetPolicySetDefinitionPolicyDefinitionReferenceArray) ToGetPolicySetDefinitionPolicyDefinitionReferenceArrayOutput

func (i GetPolicySetDefinitionPolicyDefinitionReferenceArray) ToGetPolicySetDefinitionPolicyDefinitionReferenceArrayOutput() GetPolicySetDefinitionPolicyDefinitionReferenceArrayOutput

func (GetPolicySetDefinitionPolicyDefinitionReferenceArray) ToGetPolicySetDefinitionPolicyDefinitionReferenceArrayOutputWithContext

func (i GetPolicySetDefinitionPolicyDefinitionReferenceArray) ToGetPolicySetDefinitionPolicyDefinitionReferenceArrayOutputWithContext(ctx context.Context) GetPolicySetDefinitionPolicyDefinitionReferenceArrayOutput

type GetPolicySetDefinitionPolicyDefinitionReferenceArrayInput

type GetPolicySetDefinitionPolicyDefinitionReferenceArrayInput interface {
	pulumi.Input

	ToGetPolicySetDefinitionPolicyDefinitionReferenceArrayOutput() GetPolicySetDefinitionPolicyDefinitionReferenceArrayOutput
	ToGetPolicySetDefinitionPolicyDefinitionReferenceArrayOutputWithContext(context.Context) GetPolicySetDefinitionPolicyDefinitionReferenceArrayOutput
}

GetPolicySetDefinitionPolicyDefinitionReferenceArrayInput is an input type that accepts GetPolicySetDefinitionPolicyDefinitionReferenceArray and GetPolicySetDefinitionPolicyDefinitionReferenceArrayOutput values. You can construct a concrete instance of `GetPolicySetDefinitionPolicyDefinitionReferenceArrayInput` via:

GetPolicySetDefinitionPolicyDefinitionReferenceArray{ GetPolicySetDefinitionPolicyDefinitionReferenceArgs{...} }

type GetPolicySetDefinitionPolicyDefinitionReferenceArrayOutput

type GetPolicySetDefinitionPolicyDefinitionReferenceArrayOutput struct{ *pulumi.OutputState }

func (GetPolicySetDefinitionPolicyDefinitionReferenceArrayOutput) ElementType

func (GetPolicySetDefinitionPolicyDefinitionReferenceArrayOutput) Index

func (GetPolicySetDefinitionPolicyDefinitionReferenceArrayOutput) ToGetPolicySetDefinitionPolicyDefinitionReferenceArrayOutput

func (GetPolicySetDefinitionPolicyDefinitionReferenceArrayOutput) ToGetPolicySetDefinitionPolicyDefinitionReferenceArrayOutputWithContext

func (o GetPolicySetDefinitionPolicyDefinitionReferenceArrayOutput) ToGetPolicySetDefinitionPolicyDefinitionReferenceArrayOutputWithContext(ctx context.Context) GetPolicySetDefinitionPolicyDefinitionReferenceArrayOutput

type GetPolicySetDefinitionPolicyDefinitionReferenceInput

type GetPolicySetDefinitionPolicyDefinitionReferenceInput interface {
	pulumi.Input

	ToGetPolicySetDefinitionPolicyDefinitionReferenceOutput() GetPolicySetDefinitionPolicyDefinitionReferenceOutput
	ToGetPolicySetDefinitionPolicyDefinitionReferenceOutputWithContext(context.Context) GetPolicySetDefinitionPolicyDefinitionReferenceOutput
}

GetPolicySetDefinitionPolicyDefinitionReferenceInput is an input type that accepts GetPolicySetDefinitionPolicyDefinitionReferenceArgs and GetPolicySetDefinitionPolicyDefinitionReferenceOutput values. You can construct a concrete instance of `GetPolicySetDefinitionPolicyDefinitionReferenceInput` via:

GetPolicySetDefinitionPolicyDefinitionReferenceArgs{...}

type GetPolicySetDefinitionPolicyDefinitionReferenceOutput

type GetPolicySetDefinitionPolicyDefinitionReferenceOutput struct{ *pulumi.OutputState }

func (GetPolicySetDefinitionPolicyDefinitionReferenceOutput) ElementType

func (GetPolicySetDefinitionPolicyDefinitionReferenceOutput) ParameterValues

The parameter values for the referenced policy rule. This field is a json object.

func (GetPolicySetDefinitionPolicyDefinitionReferenceOutput) Parameters

The mapping of the parameter values for the referenced policy rule. The keys are the parameter names.

func (GetPolicySetDefinitionPolicyDefinitionReferenceOutput) PolicyDefinitionId

The ID of the policy definition or policy set definition that is included in this policy set definition.

func (GetPolicySetDefinitionPolicyDefinitionReferenceOutput) PolicyGroupNames

The list of names of the policy definition groups that this policy definition reference belongs to.

func (GetPolicySetDefinitionPolicyDefinitionReferenceOutput) ReferenceId

The unique ID within this policy set definition for this policy definition reference.

func (GetPolicySetDefinitionPolicyDefinitionReferenceOutput) ToGetPolicySetDefinitionPolicyDefinitionReferenceOutput

func (GetPolicySetDefinitionPolicyDefinitionReferenceOutput) ToGetPolicySetDefinitionPolicyDefinitionReferenceOutputWithContext

func (o GetPolicySetDefinitionPolicyDefinitionReferenceOutput) ToGetPolicySetDefinitionPolicyDefinitionReferenceOutputWithContext(ctx context.Context) GetPolicySetDefinitionPolicyDefinitionReferenceOutput

type LookupPolicySetDefinitionArgs

type LookupPolicySetDefinitionArgs struct {
	// Specifies the display name of the Policy Set Definition. Conflicts with `name`.
	DisplayName *string `pulumi:"displayName"`
	// Only retrieve Policy Set Definitions from this Management Group.
	ManagementGroupName *string `pulumi:"managementGroupName"`
	// Specifies the name of the Policy Set Definition. Conflicts with `displayName`.
	Name *string `pulumi:"name"`
}

A collection of arguments for invoking getPolicySetDefinition.

type LookupPolicySetDefinitionResult

type LookupPolicySetDefinitionResult struct {
	// The description of this policy definition group.
	Description string `pulumi:"description"`
	// The display name of this policy definition group.
	DisplayName string `pulumi:"displayName"`
	// The provider-assigned unique ID for this managed resource.
	Id                  string  `pulumi:"id"`
	ManagementGroupName *string `pulumi:"managementGroupName"`
	// Any Metadata defined in the Policy Set Definition.
	Metadata string `pulumi:"metadata"`
	// The name of this policy definition group.
	Name string `pulumi:"name"`
	// The mapping of the parameter values for the referenced policy rule. The keys are the parameter names.
	Parameters string `pulumi:"parameters"`
	// One or more `policyDefinitionGroup` blocks as defined below.
	PolicyDefinitionGroups []GetPolicySetDefinitionPolicyDefinitionGroup `pulumi:"policyDefinitionGroups"`
	// One or more `policyDefinitionReference` blocks as defined below.
	PolicyDefinitionReferences []GetPolicySetDefinitionPolicyDefinitionReference `pulumi:"policyDefinitionReferences"`
	// The policy definitions contained within the policy set definition.
	PolicyDefinitions string `pulumi:"policyDefinitions"`
	// The Type of the Policy Set Definition.
	PolicyType string `pulumi:"policyType"`
}

A collection of values returned by getPolicySetDefinition.

func LookupPolicySetDefinition

func LookupPolicySetDefinition(ctx *pulumi.Context, args *LookupPolicySetDefinitionArgs, opts ...pulumi.InvokeOption) (*LookupPolicySetDefinitionResult, error)

Use this data source to access information about an existing Policy Set Definition.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/policy"
"github.com/pulumi/pulumi/sdk/v3/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
	})
}

```

type PolicySetDefinition

type PolicySetDefinition struct {
	pulumi.CustomResourceState

	// The description of the policy set definition.
	Description pulumi.StringPtrOutput `pulumi:"description"`
	// The display name of the policy set definition.
	DisplayName pulumi.StringOutput `pulumi:"displayName"`
	// The name of the Management Group where this policy set definition should be defined. Changing this forces a new resource to be created.
	//
	// Deprecated: Deprecated in favour of `management_group_name`
	ManagementGroupId pulumi.StringOutput `pulumi:"managementGroupId"`
	// The name of the Management Group where this policy set definition should be defined. Changing this forces a new resource to be created.
	ManagementGroupName pulumi.StringOutput `pulumi:"managementGroupName"`
	// The metadata for the policy set definition. This is a json object representing additional metadata that should be stored with the policy definition.
	Metadata pulumi.StringOutput `pulumi:"metadata"`
	// The name of the policy set definition. Changing this forces a new resource to be created.
	Name pulumi.StringOutput `pulumi:"name"`
	// Parameters for the policy set definition. This field is a json object that allows you to parameterize your policy definition.
	Parameters pulumi.StringPtrOutput `pulumi:"parameters"`
	// One or more `policyDefinitionGroup` blocks as defined below.
	PolicyDefinitionGroups PolicySetDefinitionPolicyDefinitionGroupArrayOutput `pulumi:"policyDefinitionGroups"`
	// One or more `policyDefinitionReference` blocks as defined below.
	PolicyDefinitionReferences PolicySetDefinitionPolicyDefinitionReferenceArrayOutput `pulumi:"policyDefinitionReferences"`
	// The policy definitions for the policy set definition. This is a json object representing the bundled policy definitions.
	//
	// Deprecated: Deprecated in favour of `policy_definition_reference`
	PolicyDefinitions pulumi.StringOutput `pulumi:"policyDefinitions"`
	// The policy set type. Possible values are `BuiltIn` or `Custom`. Changing this forces a new resource to be created.
	PolicyType pulumi.StringOutput `pulumi:"policyType"`
}

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

```go package main

import (

"fmt"

"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/policy"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := policy.NewPolicySetDefinition(ctx, "example", &policy.PolicySetDefinitionArgs{
			DisplayName: pulumi.String("Test Policy Set"),
			Parameters:  pulumi.String(fmt.Sprintf("%v%v%v%v%v%v%v%v%v%v%v", "    {\n", "        \"allowedLocations\": {\n", "            \"type\": \"Array\",\n", "            \"metadata\": {\n", "                \"description\": \"The list of allowed locations for resources.\",\n", "                \"displayName\": \"Allowed locations\",\n", "                \"strongType\": \"location\"\n", "            }\n", "        }\n", "    }\n", "\n")),
			PolicyDefinitionReferences: policy.PolicySetDefinitionPolicyDefinitionReferenceArray{
				&policy.PolicySetDefinitionPolicyDefinitionReferenceArgs{
					ParameterValues:    pulumi.String(fmt.Sprintf("%v%v%v%v", "    {\n", "      \"listOfAllowedLocations\": {\"value\": \"[parameters('allowedLocations')]\"}\n", "    }\n", "    \n")),
					PolicyDefinitionId: pulumi.String("/providers/Microsoft.Authorization/policyDefinitions/e765b5de-1225-4ba3-bd56-1ac6695af988"),
				},
			},
			PolicyType: pulumi.String("Custom"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## 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/testPolicySet

```

or

```sh

$ pulumi import azure:policy/policySetDefinition:PolicySetDefinition example /providers/Microsoft.Management/managementGroups/my-mgmt-group-id/providers/Microsoft.Authorization/policySetDefinitions/testPolicySet

```

func GetPolicySetDefinition

func GetPolicySetDefinition(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *PolicySetDefinitionState, opts ...pulumi.ResourceOption) (*PolicySetDefinition, error)

GetPolicySetDefinition gets an existing PolicySetDefinition resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewPolicySetDefinition

func NewPolicySetDefinition(ctx *pulumi.Context,
	name string, args *PolicySetDefinitionArgs, opts ...pulumi.ResourceOption) (*PolicySetDefinition, error)

NewPolicySetDefinition registers a new resource with the given unique name, arguments, and options.

func (*PolicySetDefinition) ElementType

func (*PolicySetDefinition) ElementType() reflect.Type

func (*PolicySetDefinition) ToPolicySetDefinitionOutput

func (i *PolicySetDefinition) ToPolicySetDefinitionOutput() PolicySetDefinitionOutput

func (*PolicySetDefinition) ToPolicySetDefinitionOutputWithContext

func (i *PolicySetDefinition) ToPolicySetDefinitionOutputWithContext(ctx context.Context) PolicySetDefinitionOutput

func (*PolicySetDefinition) ToPolicySetDefinitionPtrOutput

func (i *PolicySetDefinition) ToPolicySetDefinitionPtrOutput() PolicySetDefinitionPtrOutput

func (*PolicySetDefinition) ToPolicySetDefinitionPtrOutputWithContext

func (i *PolicySetDefinition) ToPolicySetDefinitionPtrOutputWithContext(ctx context.Context) PolicySetDefinitionPtrOutput

type PolicySetDefinitionArgs

type PolicySetDefinitionArgs struct {
	// The description of the policy set definition.
	Description pulumi.StringPtrInput
	// The display name of the policy set definition.
	DisplayName pulumi.StringInput
	// The name of the Management Group where this policy set definition should be defined. Changing this forces a new resource to be created.
	//
	// Deprecated: Deprecated in favour of `management_group_name`
	ManagementGroupId pulumi.StringPtrInput
	// The name of the Management Group where this policy set definition should be defined. Changing this forces a new resource to be created.
	ManagementGroupName pulumi.StringPtrInput
	// The metadata for the policy set definition. This is a json object representing additional metadata that should be stored with the policy definition.
	Metadata pulumi.StringPtrInput
	// The name of the policy set definition. Changing this forces a new resource to be created.
	Name pulumi.StringPtrInput
	// Parameters for the policy set definition. This field is a json object that allows you to parameterize your policy definition.
	Parameters pulumi.StringPtrInput
	// One or more `policyDefinitionGroup` blocks as defined below.
	PolicyDefinitionGroups PolicySetDefinitionPolicyDefinitionGroupArrayInput
	// One or more `policyDefinitionReference` blocks as defined below.
	PolicyDefinitionReferences PolicySetDefinitionPolicyDefinitionReferenceArrayInput
	// The policy definitions for the policy set definition. This is a json object representing the bundled policy definitions.
	//
	// Deprecated: Deprecated in favour of `policy_definition_reference`
	PolicyDefinitions pulumi.StringPtrInput
	// The policy set type. Possible values are `BuiltIn` or `Custom`. Changing this forces a new resource to be created.
	PolicyType pulumi.StringInput
}

The set of arguments for constructing a PolicySetDefinition resource.

func (PolicySetDefinitionArgs) ElementType

func (PolicySetDefinitionArgs) ElementType() reflect.Type

type PolicySetDefinitionArray

type PolicySetDefinitionArray []PolicySetDefinitionInput

func (PolicySetDefinitionArray) ElementType

func (PolicySetDefinitionArray) ElementType() reflect.Type

func (PolicySetDefinitionArray) ToPolicySetDefinitionArrayOutput

func (i PolicySetDefinitionArray) ToPolicySetDefinitionArrayOutput() PolicySetDefinitionArrayOutput

func (PolicySetDefinitionArray) ToPolicySetDefinitionArrayOutputWithContext

func (i PolicySetDefinitionArray) ToPolicySetDefinitionArrayOutputWithContext(ctx context.Context) PolicySetDefinitionArrayOutput

type PolicySetDefinitionArrayInput

type PolicySetDefinitionArrayInput interface {
	pulumi.Input

	ToPolicySetDefinitionArrayOutput() PolicySetDefinitionArrayOutput
	ToPolicySetDefinitionArrayOutputWithContext(context.Context) PolicySetDefinitionArrayOutput
}

PolicySetDefinitionArrayInput is an input type that accepts PolicySetDefinitionArray and PolicySetDefinitionArrayOutput values. You can construct a concrete instance of `PolicySetDefinitionArrayInput` via:

PolicySetDefinitionArray{ PolicySetDefinitionArgs{...} }

type PolicySetDefinitionArrayOutput

type PolicySetDefinitionArrayOutput struct{ *pulumi.OutputState }

func (PolicySetDefinitionArrayOutput) ElementType

func (PolicySetDefinitionArrayOutput) Index

func (PolicySetDefinitionArrayOutput) ToPolicySetDefinitionArrayOutput

func (o PolicySetDefinitionArrayOutput) ToPolicySetDefinitionArrayOutput() PolicySetDefinitionArrayOutput

func (PolicySetDefinitionArrayOutput) ToPolicySetDefinitionArrayOutputWithContext

func (o PolicySetDefinitionArrayOutput) ToPolicySetDefinitionArrayOutputWithContext(ctx context.Context) PolicySetDefinitionArrayOutput

type PolicySetDefinitionInput

type PolicySetDefinitionInput interface {
	pulumi.Input

	ToPolicySetDefinitionOutput() PolicySetDefinitionOutput
	ToPolicySetDefinitionOutputWithContext(ctx context.Context) PolicySetDefinitionOutput
}

type PolicySetDefinitionMap

type PolicySetDefinitionMap map[string]PolicySetDefinitionInput

func (PolicySetDefinitionMap) ElementType

func (PolicySetDefinitionMap) ElementType() reflect.Type

func (PolicySetDefinitionMap) ToPolicySetDefinitionMapOutput

func (i PolicySetDefinitionMap) ToPolicySetDefinitionMapOutput() PolicySetDefinitionMapOutput

func (PolicySetDefinitionMap) ToPolicySetDefinitionMapOutputWithContext

func (i PolicySetDefinitionMap) ToPolicySetDefinitionMapOutputWithContext(ctx context.Context) PolicySetDefinitionMapOutput

type PolicySetDefinitionMapInput

type PolicySetDefinitionMapInput interface {
	pulumi.Input

	ToPolicySetDefinitionMapOutput() PolicySetDefinitionMapOutput
	ToPolicySetDefinitionMapOutputWithContext(context.Context) PolicySetDefinitionMapOutput
}

PolicySetDefinitionMapInput is an input type that accepts PolicySetDefinitionMap and PolicySetDefinitionMapOutput values. You can construct a concrete instance of `PolicySetDefinitionMapInput` via:

PolicySetDefinitionMap{ "key": PolicySetDefinitionArgs{...} }

type PolicySetDefinitionMapOutput

type PolicySetDefinitionMapOutput struct{ *pulumi.OutputState }

func (PolicySetDefinitionMapOutput) ElementType

func (PolicySetDefinitionMapOutput) MapIndex

func (PolicySetDefinitionMapOutput) ToPolicySetDefinitionMapOutput

func (o PolicySetDefinitionMapOutput) ToPolicySetDefinitionMapOutput() PolicySetDefinitionMapOutput

func (PolicySetDefinitionMapOutput) ToPolicySetDefinitionMapOutputWithContext

func (o PolicySetDefinitionMapOutput) ToPolicySetDefinitionMapOutputWithContext(ctx context.Context) PolicySetDefinitionMapOutput

type PolicySetDefinitionOutput

type PolicySetDefinitionOutput struct {
	*pulumi.OutputState
}

func (PolicySetDefinitionOutput) ElementType

func (PolicySetDefinitionOutput) ElementType() reflect.Type

func (PolicySetDefinitionOutput) ToPolicySetDefinitionOutput

func (o PolicySetDefinitionOutput) ToPolicySetDefinitionOutput() PolicySetDefinitionOutput

func (PolicySetDefinitionOutput) ToPolicySetDefinitionOutputWithContext

func (o PolicySetDefinitionOutput) ToPolicySetDefinitionOutputWithContext(ctx context.Context) PolicySetDefinitionOutput

func (PolicySetDefinitionOutput) ToPolicySetDefinitionPtrOutput

func (o PolicySetDefinitionOutput) ToPolicySetDefinitionPtrOutput() PolicySetDefinitionPtrOutput

func (PolicySetDefinitionOutput) ToPolicySetDefinitionPtrOutputWithContext

func (o PolicySetDefinitionOutput) ToPolicySetDefinitionPtrOutputWithContext(ctx context.Context) PolicySetDefinitionPtrOutput

type PolicySetDefinitionPolicyDefinitionGroup

type PolicySetDefinitionPolicyDefinitionGroup struct {
	// The ID of a resource that contains additional metadata about this policy definition group.
	AdditionalMetadataResourceId *string `pulumi:"additionalMetadataResourceId"`
	// The category of this policy definition group.
	Category *string `pulumi:"category"`
	// The description of this policy definition group.
	Description *string `pulumi:"description"`
	// The display name of this policy definition group.
	DisplayName *string `pulumi:"displayName"`
	// The name of this policy definition group.
	Name string `pulumi:"name"`
}

type PolicySetDefinitionPolicyDefinitionGroupArgs

type PolicySetDefinitionPolicyDefinitionGroupArgs struct {
	// The ID of a resource that contains additional metadata about this policy definition group.
	AdditionalMetadataResourceId pulumi.StringPtrInput `pulumi:"additionalMetadataResourceId"`
	// The category of this policy definition group.
	Category pulumi.StringPtrInput `pulumi:"category"`
	// The description of this policy definition group.
	Description pulumi.StringPtrInput `pulumi:"description"`
	// The display name of this policy definition group.
	DisplayName pulumi.StringPtrInput `pulumi:"displayName"`
	// The name of this policy definition group.
	Name pulumi.StringInput `pulumi:"name"`
}

func (PolicySetDefinitionPolicyDefinitionGroupArgs) ElementType

func (PolicySetDefinitionPolicyDefinitionGroupArgs) ToPolicySetDefinitionPolicyDefinitionGroupOutput

func (i PolicySetDefinitionPolicyDefinitionGroupArgs) ToPolicySetDefinitionPolicyDefinitionGroupOutput() PolicySetDefinitionPolicyDefinitionGroupOutput

func (PolicySetDefinitionPolicyDefinitionGroupArgs) ToPolicySetDefinitionPolicyDefinitionGroupOutputWithContext

func (i PolicySetDefinitionPolicyDefinitionGroupArgs) ToPolicySetDefinitionPolicyDefinitionGroupOutputWithContext(ctx context.Context) PolicySetDefinitionPolicyDefinitionGroupOutput

type PolicySetDefinitionPolicyDefinitionGroupArray

type PolicySetDefinitionPolicyDefinitionGroupArray []PolicySetDefinitionPolicyDefinitionGroupInput

func (PolicySetDefinitionPolicyDefinitionGroupArray) ElementType

func (PolicySetDefinitionPolicyDefinitionGroupArray) ToPolicySetDefinitionPolicyDefinitionGroupArrayOutput

func (i PolicySetDefinitionPolicyDefinitionGroupArray) ToPolicySetDefinitionPolicyDefinitionGroupArrayOutput() PolicySetDefinitionPolicyDefinitionGroupArrayOutput

func (PolicySetDefinitionPolicyDefinitionGroupArray) ToPolicySetDefinitionPolicyDefinitionGroupArrayOutputWithContext

func (i PolicySetDefinitionPolicyDefinitionGroupArray) ToPolicySetDefinitionPolicyDefinitionGroupArrayOutputWithContext(ctx context.Context) PolicySetDefinitionPolicyDefinitionGroupArrayOutput

type PolicySetDefinitionPolicyDefinitionGroupArrayInput

type PolicySetDefinitionPolicyDefinitionGroupArrayInput interface {
	pulumi.Input

	ToPolicySetDefinitionPolicyDefinitionGroupArrayOutput() PolicySetDefinitionPolicyDefinitionGroupArrayOutput
	ToPolicySetDefinitionPolicyDefinitionGroupArrayOutputWithContext(context.Context) PolicySetDefinitionPolicyDefinitionGroupArrayOutput
}

PolicySetDefinitionPolicyDefinitionGroupArrayInput is an input type that accepts PolicySetDefinitionPolicyDefinitionGroupArray and PolicySetDefinitionPolicyDefinitionGroupArrayOutput values. You can construct a concrete instance of `PolicySetDefinitionPolicyDefinitionGroupArrayInput` via:

PolicySetDefinitionPolicyDefinitionGroupArray{ PolicySetDefinitionPolicyDefinitionGroupArgs{...} }

type PolicySetDefinitionPolicyDefinitionGroupArrayOutput

type PolicySetDefinitionPolicyDefinitionGroupArrayOutput struct{ *pulumi.OutputState }

func (PolicySetDefinitionPolicyDefinitionGroupArrayOutput) ElementType

func (PolicySetDefinitionPolicyDefinitionGroupArrayOutput) Index

func (PolicySetDefinitionPolicyDefinitionGroupArrayOutput) ToPolicySetDefinitionPolicyDefinitionGroupArrayOutput

func (o PolicySetDefinitionPolicyDefinitionGroupArrayOutput) ToPolicySetDefinitionPolicyDefinitionGroupArrayOutput() PolicySetDefinitionPolicyDefinitionGroupArrayOutput

func (PolicySetDefinitionPolicyDefinitionGroupArrayOutput) ToPolicySetDefinitionPolicyDefinitionGroupArrayOutputWithContext

func (o PolicySetDefinitionPolicyDefinitionGroupArrayOutput) ToPolicySetDefinitionPolicyDefinitionGroupArrayOutputWithContext(ctx context.Context) PolicySetDefinitionPolicyDefinitionGroupArrayOutput

type PolicySetDefinitionPolicyDefinitionGroupInput

type PolicySetDefinitionPolicyDefinitionGroupInput interface {
	pulumi.Input

	ToPolicySetDefinitionPolicyDefinitionGroupOutput() PolicySetDefinitionPolicyDefinitionGroupOutput
	ToPolicySetDefinitionPolicyDefinitionGroupOutputWithContext(context.Context) PolicySetDefinitionPolicyDefinitionGroupOutput
}

PolicySetDefinitionPolicyDefinitionGroupInput is an input type that accepts PolicySetDefinitionPolicyDefinitionGroupArgs and PolicySetDefinitionPolicyDefinitionGroupOutput values. You can construct a concrete instance of `PolicySetDefinitionPolicyDefinitionGroupInput` via:

PolicySetDefinitionPolicyDefinitionGroupArgs{...}

type PolicySetDefinitionPolicyDefinitionGroupOutput

type PolicySetDefinitionPolicyDefinitionGroupOutput struct{ *pulumi.OutputState }

func (PolicySetDefinitionPolicyDefinitionGroupOutput) AdditionalMetadataResourceId

The ID of a resource that contains additional metadata about this policy definition group.

func (PolicySetDefinitionPolicyDefinitionGroupOutput) Category

The category of this policy definition group.

func (PolicySetDefinitionPolicyDefinitionGroupOutput) Description

The description of this policy definition group.

func (PolicySetDefinitionPolicyDefinitionGroupOutput) DisplayName

The display name of this policy definition group.

func (PolicySetDefinitionPolicyDefinitionGroupOutput) ElementType

func (PolicySetDefinitionPolicyDefinitionGroupOutput) Name

The name of this policy definition group.

func (PolicySetDefinitionPolicyDefinitionGroupOutput) ToPolicySetDefinitionPolicyDefinitionGroupOutput

func (o PolicySetDefinitionPolicyDefinitionGroupOutput) ToPolicySetDefinitionPolicyDefinitionGroupOutput() PolicySetDefinitionPolicyDefinitionGroupOutput

func (PolicySetDefinitionPolicyDefinitionGroupOutput) ToPolicySetDefinitionPolicyDefinitionGroupOutputWithContext

func (o PolicySetDefinitionPolicyDefinitionGroupOutput) ToPolicySetDefinitionPolicyDefinitionGroupOutputWithContext(ctx context.Context) PolicySetDefinitionPolicyDefinitionGroupOutput

type PolicySetDefinitionPolicyDefinitionReference

type PolicySetDefinitionPolicyDefinitionReference struct {
	// Parameter values for the referenced policy rule. This field is a JSON string that allows you to assign parameters to this policy rule.
	ParameterValues *string `pulumi:"parameterValues"`
	// Parameters for the policy set definition. This field is a json object that allows you to parameterize your policy definition.
	//
	// Deprecated: Deprecated in favour of `parameter_values`
	Parameters map[string]string `pulumi:"parameters"`
	// The ID of the policy definition or policy set definition that will be included in this policy set definition.
	PolicyDefinitionId string `pulumi:"policyDefinitionId"`
	// A list of names of the policy definition groups that this policy definition reference belongs to.
	PolicyGroupNames []string `pulumi:"policyGroupNames"`
	// A unique ID within this policy set definition for this policy definition reference.
	ReferenceId *string `pulumi:"referenceId"`
}

type PolicySetDefinitionPolicyDefinitionReferenceArgs

type PolicySetDefinitionPolicyDefinitionReferenceArgs struct {
	// Parameter values for the referenced policy rule. This field is a JSON string that allows you to assign parameters to this policy rule.
	ParameterValues pulumi.StringPtrInput `pulumi:"parameterValues"`
	// Parameters for the policy set definition. This field is a json object that allows you to parameterize your policy definition.
	//
	// Deprecated: Deprecated in favour of `parameter_values`
	Parameters pulumi.StringMapInput `pulumi:"parameters"`
	// The ID of the policy definition or policy set definition that will be included in this policy set definition.
	PolicyDefinitionId pulumi.StringInput `pulumi:"policyDefinitionId"`
	// A list of names of the policy definition groups that this policy definition reference belongs to.
	PolicyGroupNames pulumi.StringArrayInput `pulumi:"policyGroupNames"`
	// A unique ID within this policy set definition for this policy definition reference.
	ReferenceId pulumi.StringPtrInput `pulumi:"referenceId"`
}

func (PolicySetDefinitionPolicyDefinitionReferenceArgs) ElementType

func (PolicySetDefinitionPolicyDefinitionReferenceArgs) ToPolicySetDefinitionPolicyDefinitionReferenceOutput

func (i PolicySetDefinitionPolicyDefinitionReferenceArgs) ToPolicySetDefinitionPolicyDefinitionReferenceOutput() PolicySetDefinitionPolicyDefinitionReferenceOutput

func (PolicySetDefinitionPolicyDefinitionReferenceArgs) ToPolicySetDefinitionPolicyDefinitionReferenceOutputWithContext

func (i PolicySetDefinitionPolicyDefinitionReferenceArgs) ToPolicySetDefinitionPolicyDefinitionReferenceOutputWithContext(ctx context.Context) PolicySetDefinitionPolicyDefinitionReferenceOutput

type PolicySetDefinitionPolicyDefinitionReferenceArray

type PolicySetDefinitionPolicyDefinitionReferenceArray []PolicySetDefinitionPolicyDefinitionReferenceInput

func (PolicySetDefinitionPolicyDefinitionReferenceArray) ElementType

func (PolicySetDefinitionPolicyDefinitionReferenceArray) ToPolicySetDefinitionPolicyDefinitionReferenceArrayOutput

func (i PolicySetDefinitionPolicyDefinitionReferenceArray) ToPolicySetDefinitionPolicyDefinitionReferenceArrayOutput() PolicySetDefinitionPolicyDefinitionReferenceArrayOutput

func (PolicySetDefinitionPolicyDefinitionReferenceArray) ToPolicySetDefinitionPolicyDefinitionReferenceArrayOutputWithContext

func (i PolicySetDefinitionPolicyDefinitionReferenceArray) ToPolicySetDefinitionPolicyDefinitionReferenceArrayOutputWithContext(ctx context.Context) PolicySetDefinitionPolicyDefinitionReferenceArrayOutput

type PolicySetDefinitionPolicyDefinitionReferenceArrayInput

type PolicySetDefinitionPolicyDefinitionReferenceArrayInput interface {
	pulumi.Input

	ToPolicySetDefinitionPolicyDefinitionReferenceArrayOutput() PolicySetDefinitionPolicyDefinitionReferenceArrayOutput
	ToPolicySetDefinitionPolicyDefinitionReferenceArrayOutputWithContext(context.Context) PolicySetDefinitionPolicyDefinitionReferenceArrayOutput
}

PolicySetDefinitionPolicyDefinitionReferenceArrayInput is an input type that accepts PolicySetDefinitionPolicyDefinitionReferenceArray and PolicySetDefinitionPolicyDefinitionReferenceArrayOutput values. You can construct a concrete instance of `PolicySetDefinitionPolicyDefinitionReferenceArrayInput` via:

PolicySetDefinitionPolicyDefinitionReferenceArray{ PolicySetDefinitionPolicyDefinitionReferenceArgs{...} }

type PolicySetDefinitionPolicyDefinitionReferenceArrayOutput

type PolicySetDefinitionPolicyDefinitionReferenceArrayOutput struct{ *pulumi.OutputState }

func (PolicySetDefinitionPolicyDefinitionReferenceArrayOutput) ElementType

func (PolicySetDefinitionPolicyDefinitionReferenceArrayOutput) Index

func (PolicySetDefinitionPolicyDefinitionReferenceArrayOutput) ToPolicySetDefinitionPolicyDefinitionReferenceArrayOutput

func (PolicySetDefinitionPolicyDefinitionReferenceArrayOutput) ToPolicySetDefinitionPolicyDefinitionReferenceArrayOutputWithContext

func (o PolicySetDefinitionPolicyDefinitionReferenceArrayOutput) ToPolicySetDefinitionPolicyDefinitionReferenceArrayOutputWithContext(ctx context.Context) PolicySetDefinitionPolicyDefinitionReferenceArrayOutput

type PolicySetDefinitionPolicyDefinitionReferenceInput

type PolicySetDefinitionPolicyDefinitionReferenceInput interface {
	pulumi.Input

	ToPolicySetDefinitionPolicyDefinitionReferenceOutput() PolicySetDefinitionPolicyDefinitionReferenceOutput
	ToPolicySetDefinitionPolicyDefinitionReferenceOutputWithContext(context.Context) PolicySetDefinitionPolicyDefinitionReferenceOutput
}

PolicySetDefinitionPolicyDefinitionReferenceInput is an input type that accepts PolicySetDefinitionPolicyDefinitionReferenceArgs and PolicySetDefinitionPolicyDefinitionReferenceOutput values. You can construct a concrete instance of `PolicySetDefinitionPolicyDefinitionReferenceInput` via:

PolicySetDefinitionPolicyDefinitionReferenceArgs{...}

type PolicySetDefinitionPolicyDefinitionReferenceOutput

type PolicySetDefinitionPolicyDefinitionReferenceOutput struct{ *pulumi.OutputState }

func (PolicySetDefinitionPolicyDefinitionReferenceOutput) ElementType

func (PolicySetDefinitionPolicyDefinitionReferenceOutput) ParameterValues

Parameter values for the referenced policy rule. This field is a JSON string that allows you to assign parameters to this policy rule.

func (PolicySetDefinitionPolicyDefinitionReferenceOutput) Parameters deprecated

Parameters for the policy set definition. This field is a json object that allows you to parameterize your policy definition.

Deprecated: Deprecated in favour of `parameter_values`

func (PolicySetDefinitionPolicyDefinitionReferenceOutput) PolicyDefinitionId

The ID of the policy definition or policy set definition that will be included in this policy set definition.

func (PolicySetDefinitionPolicyDefinitionReferenceOutput) PolicyGroupNames

A list of names of the policy definition groups that this policy definition reference belongs to.

func (PolicySetDefinitionPolicyDefinitionReferenceOutput) ReferenceId

A unique ID within this policy set definition for this policy definition reference.

func (PolicySetDefinitionPolicyDefinitionReferenceOutput) ToPolicySetDefinitionPolicyDefinitionReferenceOutput

func (o PolicySetDefinitionPolicyDefinitionReferenceOutput) ToPolicySetDefinitionPolicyDefinitionReferenceOutput() PolicySetDefinitionPolicyDefinitionReferenceOutput

func (PolicySetDefinitionPolicyDefinitionReferenceOutput) ToPolicySetDefinitionPolicyDefinitionReferenceOutputWithContext

func (o PolicySetDefinitionPolicyDefinitionReferenceOutput) ToPolicySetDefinitionPolicyDefinitionReferenceOutputWithContext(ctx context.Context) PolicySetDefinitionPolicyDefinitionReferenceOutput

type PolicySetDefinitionPtrInput

type PolicySetDefinitionPtrInput interface {
	pulumi.Input

	ToPolicySetDefinitionPtrOutput() PolicySetDefinitionPtrOutput
	ToPolicySetDefinitionPtrOutputWithContext(ctx context.Context) PolicySetDefinitionPtrOutput
}

type PolicySetDefinitionPtrOutput

type PolicySetDefinitionPtrOutput struct {
	*pulumi.OutputState
}

func (PolicySetDefinitionPtrOutput) ElementType

func (PolicySetDefinitionPtrOutput) ToPolicySetDefinitionPtrOutput

func (o PolicySetDefinitionPtrOutput) ToPolicySetDefinitionPtrOutput() PolicySetDefinitionPtrOutput

func (PolicySetDefinitionPtrOutput) ToPolicySetDefinitionPtrOutputWithContext

func (o PolicySetDefinitionPtrOutput) ToPolicySetDefinitionPtrOutputWithContext(ctx context.Context) PolicySetDefinitionPtrOutput

type PolicySetDefinitionState

type PolicySetDefinitionState struct {
	// The description of the policy set definition.
	Description pulumi.StringPtrInput
	// The display name of the policy set definition.
	DisplayName pulumi.StringPtrInput
	// The name of the Management Group where this policy set definition should be defined. Changing this forces a new resource to be created.
	//
	// Deprecated: Deprecated in favour of `management_group_name`
	ManagementGroupId pulumi.StringPtrInput
	// The name of the Management Group where this policy set definition should be defined. Changing this forces a new resource to be created.
	ManagementGroupName pulumi.StringPtrInput
	// The metadata for the policy set definition. This is a json object representing additional metadata that should be stored with the policy definition.
	Metadata pulumi.StringPtrInput
	// The name of the policy set definition. Changing this forces a new resource to be created.
	Name pulumi.StringPtrInput
	// Parameters for the policy set definition. This field is a json object that allows you to parameterize your policy definition.
	Parameters pulumi.StringPtrInput
	// One or more `policyDefinitionGroup` blocks as defined below.
	PolicyDefinitionGroups PolicySetDefinitionPolicyDefinitionGroupArrayInput
	// One or more `policyDefinitionReference` blocks as defined below.
	PolicyDefinitionReferences PolicySetDefinitionPolicyDefinitionReferenceArrayInput
	// The policy definitions for the policy set definition. This is a json object representing the bundled policy definitions.
	//
	// Deprecated: Deprecated in favour of `policy_definition_reference`
	PolicyDefinitions pulumi.StringPtrInput
	// The policy set type. Possible values are `BuiltIn` or `Custom`. Changing this forces a new resource to be created.
	PolicyType pulumi.StringPtrInput
}

func (PolicySetDefinitionState) ElementType

func (PolicySetDefinitionState) ElementType() reflect.Type

type Remediation

type Remediation struct {
	pulumi.CustomResourceState

	// A list of the resource locations that will be remediated.
	LocationFilters pulumi.StringArrayOutput `pulumi:"locationFilters"`
	// The name of the Policy Remediation. Changing this forces a new resource to be created.
	Name pulumi.StringOutput `pulumi:"name"`
	// The ID of the Policy Assignment that should be remediated.
	PolicyAssignmentId pulumi.StringOutput `pulumi:"policyAssignmentId"`
	// The unique ID for the policy definition within the policy set definition that should be remediated. Required when the policy assignment being remediated assigns a policy set definition.
	PolicyDefinitionReferenceId pulumi.StringPtrOutput `pulumi:"policyDefinitionReferenceId"`
	// The way that resources to remediate are discovered. Possible values are `ExistingNonCompliant`, `ReEvaluateCompliance`. Defaults to `ExistingNonCompliant`.
	ResourceDiscoveryMode pulumi.StringPtrOutput `pulumi:"resourceDiscoveryMode"`
	// The Scope at which the Policy Remediation should be applied. Changing this forces a new resource to be created. A scope must be a Resource ID out of one of the following list:
	Scope pulumi.StringOutput `pulumi:"scope"`
}

Manages an Azure Policy Remediation at the specified Scope.

## Example Usage

```go package main

import (

"fmt"

"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/policy"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
			Location: pulumi.String("West Europe"),
		})
		if err != nil {
			return err
		}
		exampleDefinition, err := policy.NewDefinition(ctx, "exampleDefinition", &policy.DefinitionArgs{
			PolicyType:  pulumi.String("Custom"),
			Mode:        pulumi.String("All"),
			DisplayName: pulumi.String("my-policy-definition"),
			PolicyRule:  pulumi.String(fmt.Sprintf("%v%v%v%v%v%v%v%v%v%v%v", "    {\n", "    \"if\": {\n", "      \"not\": {\n", "        \"field\": \"location\",\n", "        \"in\": \"[parameters('allowedLocations')]\"\n", "      }\n", "    },\n", "    \"then\": {\n", "      \"effect\": \"audit\"\n", "    }\n", "  }\n")),
			Parameters:  pulumi.String(fmt.Sprintf("%v%v%v%v%v%v%v%v%v%v", "    {\n", "    \"allowedLocations\": {\n", "      \"type\": \"Array\",\n", "      \"metadata\": {\n", "        \"description\": \"The list of allowed locations for resources.\",\n", "        \"displayName\": \"Allowed locations\",\n", "        \"strongType\": \"location\"\n", "      }\n", "    }\n", "  }\n")),
		})
		if err != nil {
			return err
		}
		exampleAssignment, err := policy.NewAssignment(ctx, "exampleAssignment", &policy.AssignmentArgs{
			Scope:              exampleResourceGroup.ID(),
			PolicyDefinitionId: exampleDefinition.ID(),
			Description:        pulumi.String("Policy Assignment created via an Acceptance Test"),
			DisplayName:        pulumi.String("My Example Policy Assignment"),
			Parameters:         pulumi.String(fmt.Sprintf("%v%v%v%v%v", "{\n", "  \"allowedLocations\": {\n", "    \"value\": [ \"West Europe\" ]\n", "  }\n", "}\n")),
		})
		if err != nil {
			return err
		}
		_, err = policy.NewRemediation(ctx, "exampleRemediation", &policy.RemediationArgs{
			Scope:              exampleAssignment.Scope,
			PolicyAssignmentId: exampleAssignment.ID(),
			LocationFilters: pulumi.StringArray{
				pulumi.String("West Europe"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

Policy Remediations can be imported using the `resource id`, e.g.

```sh

$ pulumi import azure:policy/remediation:Remediation example /subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.PolicyInsights/remediations/remediation1

```

or

```sh

$ pulumi import azure:policy/remediation:Remediation example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.PolicyInsights/remediations/remediation1

```

or

```sh

$ pulumi import azure:policy/remediation:Remediation example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Compute/virtualMachines/vm1/providers/Microsoft.PolicyInsights/remediations/remediation1

```

or

```sh

$ pulumi import azure:policy/remediation:Remediation example /providers/Microsoft.Management/managementGroups/my-mgmt-group-id/providers/Microsoft.PolicyInsights/remediations/remediation1

```

func GetRemediation

func GetRemediation(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *RemediationState, opts ...pulumi.ResourceOption) (*Remediation, error)

GetRemediation gets an existing Remediation resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewRemediation

func NewRemediation(ctx *pulumi.Context,
	name string, args *RemediationArgs, opts ...pulumi.ResourceOption) (*Remediation, error)

NewRemediation registers a new resource with the given unique name, arguments, and options.

func (*Remediation) ElementType

func (*Remediation) ElementType() reflect.Type

func (*Remediation) ToRemediationOutput

func (i *Remediation) ToRemediationOutput() RemediationOutput

func (*Remediation) ToRemediationOutputWithContext

func (i *Remediation) ToRemediationOutputWithContext(ctx context.Context) RemediationOutput

func (*Remediation) ToRemediationPtrOutput

func (i *Remediation) ToRemediationPtrOutput() RemediationPtrOutput

func (*Remediation) ToRemediationPtrOutputWithContext

func (i *Remediation) ToRemediationPtrOutputWithContext(ctx context.Context) RemediationPtrOutput

type RemediationArgs

type RemediationArgs struct {
	// A list of the resource locations that will be remediated.
	LocationFilters pulumi.StringArrayInput
	// The name of the Policy Remediation. Changing this forces a new resource to be created.
	Name pulumi.StringPtrInput
	// The ID of the Policy Assignment that should be remediated.
	PolicyAssignmentId pulumi.StringInput
	// The unique ID for the policy definition within the policy set definition that should be remediated. Required when the policy assignment being remediated assigns a policy set definition.
	PolicyDefinitionReferenceId pulumi.StringPtrInput
	// The way that resources to remediate are discovered. Possible values are `ExistingNonCompliant`, `ReEvaluateCompliance`. Defaults to `ExistingNonCompliant`.
	ResourceDiscoveryMode pulumi.StringPtrInput
	// The Scope at which the Policy Remediation should be applied. Changing this forces a new resource to be created. A scope must be a Resource ID out of one of the following list:
	Scope pulumi.StringInput
}

The set of arguments for constructing a Remediation resource.

func (RemediationArgs) ElementType

func (RemediationArgs) ElementType() reflect.Type

type RemediationArray

type RemediationArray []RemediationInput

func (RemediationArray) ElementType

func (RemediationArray) ElementType() reflect.Type

func (RemediationArray) ToRemediationArrayOutput

func (i RemediationArray) ToRemediationArrayOutput() RemediationArrayOutput

func (RemediationArray) ToRemediationArrayOutputWithContext

func (i RemediationArray) ToRemediationArrayOutputWithContext(ctx context.Context) RemediationArrayOutput

type RemediationArrayInput

type RemediationArrayInput interface {
	pulumi.Input

	ToRemediationArrayOutput() RemediationArrayOutput
	ToRemediationArrayOutputWithContext(context.Context) RemediationArrayOutput
}

RemediationArrayInput is an input type that accepts RemediationArray and RemediationArrayOutput values. You can construct a concrete instance of `RemediationArrayInput` via:

RemediationArray{ RemediationArgs{...} }

type RemediationArrayOutput

type RemediationArrayOutput struct{ *pulumi.OutputState }

func (RemediationArrayOutput) ElementType

func (RemediationArrayOutput) ElementType() reflect.Type

func (RemediationArrayOutput) Index

func (RemediationArrayOutput) ToRemediationArrayOutput

func (o RemediationArrayOutput) ToRemediationArrayOutput() RemediationArrayOutput

func (RemediationArrayOutput) ToRemediationArrayOutputWithContext

func (o RemediationArrayOutput) ToRemediationArrayOutputWithContext(ctx context.Context) RemediationArrayOutput

type RemediationInput

type RemediationInput interface {
	pulumi.Input

	ToRemediationOutput() RemediationOutput
	ToRemediationOutputWithContext(ctx context.Context) RemediationOutput
}

type RemediationMap

type RemediationMap map[string]RemediationInput

func (RemediationMap) ElementType

func (RemediationMap) ElementType() reflect.Type

func (RemediationMap) ToRemediationMapOutput

func (i RemediationMap) ToRemediationMapOutput() RemediationMapOutput

func (RemediationMap) ToRemediationMapOutputWithContext

func (i RemediationMap) ToRemediationMapOutputWithContext(ctx context.Context) RemediationMapOutput

type RemediationMapInput

type RemediationMapInput interface {
	pulumi.Input

	ToRemediationMapOutput() RemediationMapOutput
	ToRemediationMapOutputWithContext(context.Context) RemediationMapOutput
}

RemediationMapInput is an input type that accepts RemediationMap and RemediationMapOutput values. You can construct a concrete instance of `RemediationMapInput` via:

RemediationMap{ "key": RemediationArgs{...} }

type RemediationMapOutput

type RemediationMapOutput struct{ *pulumi.OutputState }

func (RemediationMapOutput) ElementType

func (RemediationMapOutput) ElementType() reflect.Type

func (RemediationMapOutput) MapIndex

func (RemediationMapOutput) ToRemediationMapOutput

func (o RemediationMapOutput) ToRemediationMapOutput() RemediationMapOutput

func (RemediationMapOutput) ToRemediationMapOutputWithContext

func (o RemediationMapOutput) ToRemediationMapOutputWithContext(ctx context.Context) RemediationMapOutput

type RemediationOutput

type RemediationOutput struct {
	*pulumi.OutputState
}

func (RemediationOutput) ElementType

func (RemediationOutput) ElementType() reflect.Type

func (RemediationOutput) ToRemediationOutput

func (o RemediationOutput) ToRemediationOutput() RemediationOutput

func (RemediationOutput) ToRemediationOutputWithContext

func (o RemediationOutput) ToRemediationOutputWithContext(ctx context.Context) RemediationOutput

func (RemediationOutput) ToRemediationPtrOutput

func (o RemediationOutput) ToRemediationPtrOutput() RemediationPtrOutput

func (RemediationOutput) ToRemediationPtrOutputWithContext

func (o RemediationOutput) ToRemediationPtrOutputWithContext(ctx context.Context) RemediationPtrOutput

type RemediationPtrInput

type RemediationPtrInput interface {
	pulumi.Input

	ToRemediationPtrOutput() RemediationPtrOutput
	ToRemediationPtrOutputWithContext(ctx context.Context) RemediationPtrOutput
}

type RemediationPtrOutput

type RemediationPtrOutput struct {
	*pulumi.OutputState
}

func (RemediationPtrOutput) ElementType

func (RemediationPtrOutput) ElementType() reflect.Type

func (RemediationPtrOutput) ToRemediationPtrOutput

func (o RemediationPtrOutput) ToRemediationPtrOutput() RemediationPtrOutput

func (RemediationPtrOutput) ToRemediationPtrOutputWithContext

func (o RemediationPtrOutput) ToRemediationPtrOutputWithContext(ctx context.Context) RemediationPtrOutput

type RemediationState

type RemediationState struct {
	// A list of the resource locations that will be remediated.
	LocationFilters pulumi.StringArrayInput
	// The name of the Policy Remediation. Changing this forces a new resource to be created.
	Name pulumi.StringPtrInput
	// The ID of the Policy Assignment that should be remediated.
	PolicyAssignmentId pulumi.StringPtrInput
	// The unique ID for the policy definition within the policy set definition that should be remediated. Required when the policy assignment being remediated assigns a policy set definition.
	PolicyDefinitionReferenceId pulumi.StringPtrInput
	// The way that resources to remediate are discovered. Possible values are `ExistingNonCompliant`, `ReEvaluateCompliance`. Defaults to `ExistingNonCompliant`.
	ResourceDiscoveryMode pulumi.StringPtrInput
	// The Scope at which the Policy Remediation should be applied. Changing this forces a new resource to be created. A scope must be a Resource ID out of one of the following list:
	Scope pulumi.StringPtrInput
}

func (RemediationState) ElementType

func (RemediationState) ElementType() reflect.Type

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL