1. Packages
  2. Azure Native
  3. API Docs
  4. blueprint
  5. PolicyAssignmentArtifact
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.34.0 published on Thursday, Mar 28, 2024 by Pulumi

azure-native.blueprint.PolicyAssignmentArtifact

Explore with Pulumi AI

azure-native logo
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.34.0 published on Thursday, Mar 28, 2024 by Pulumi

    Blueprint artifact that applies a Policy assignment. Azure REST API version: 2018-11-01-preview. Prior API version in Azure Native 1.x: 2018-11-01-preview.

    Example Usage

    MG-ARMTemplateArtifact

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureNative = Pulumi.AzureNative;
    
    return await Deployment.RunAsync(() => 
    {
        var policyAssignmentArtifact = new AzureNative.Blueprint.PolicyAssignmentArtifact("policyAssignmentArtifact", new()
        {
            ArtifactName = "storageTemplate",
            BlueprintName = "simpleBlueprint",
            ResourceScope = "providers/Microsoft.Management/managementGroups/ContosoOnlineGroup",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure-native-sdk/blueprint/v2"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := blueprint.NewPolicyAssignmentArtifact(ctx, "policyAssignmentArtifact", &blueprint.PolicyAssignmentArtifactArgs{
    			ArtifactName:  pulumi.String("storageTemplate"),
    			BlueprintName: pulumi.String("simpleBlueprint"),
    			ResourceScope: pulumi.String("providers/Microsoft.Management/managementGroups/ContosoOnlineGroup"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azurenative.blueprint.PolicyAssignmentArtifact;
    import com.pulumi.azurenative.blueprint.PolicyAssignmentArtifactArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var policyAssignmentArtifact = new PolicyAssignmentArtifact("policyAssignmentArtifact", PolicyAssignmentArtifactArgs.builder()        
                .artifactName("storageTemplate")
                .blueprintName("simpleBlueprint")
                .resourceScope("providers/Microsoft.Management/managementGroups/ContosoOnlineGroup")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_azure_native as azure_native
    
    policy_assignment_artifact = azure_native.blueprint.PolicyAssignmentArtifact("policyAssignmentArtifact",
        artifact_name="storageTemplate",
        blueprint_name="simpleBlueprint",
        resource_scope="providers/Microsoft.Management/managementGroups/ContosoOnlineGroup")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure_native from "@pulumi/azure-native";
    
    const policyAssignmentArtifact = new azure_native.blueprint.PolicyAssignmentArtifact("policyAssignmentArtifact", {
        artifactName: "storageTemplate",
        blueprintName: "simpleBlueprint",
        resourceScope: "providers/Microsoft.Management/managementGroups/ContosoOnlineGroup",
    });
    
    resources:
      policyAssignmentArtifact:
        type: azure-native:blueprint:PolicyAssignmentArtifact
        properties:
          artifactName: storageTemplate
          blueprintName: simpleBlueprint
          resourceScope: providers/Microsoft.Management/managementGroups/ContosoOnlineGroup
    

    MG-PolicyAssignmentArtifact

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureNative = Pulumi.AzureNative;
    
    return await Deployment.RunAsync(() => 
    {
        var policyAssignmentArtifact = new AzureNative.Blueprint.PolicyAssignmentArtifact("policyAssignmentArtifact", new()
        {
            ArtifactName = "costCenterPolicy",
            BlueprintName = "simpleBlueprint",
            DisplayName = "force costCenter tag on all resources",
            Kind = "policyAssignment",
            Parameters = 
            {
                { "tagName", new AzureNative.Blueprint.Inputs.ParameterValueArgs
                {
                    Value = "costCenter",
                } },
                { "tagValue", new AzureNative.Blueprint.Inputs.ParameterValueArgs
                {
                    Value = "[parameter('costCenter')]",
                } },
            },
            PolicyDefinitionId = "/providers/Microsoft.Authorization/policyDefinitions/1e30110a-5ceb-460c-a204-c1c3969c6d62",
            ResourceScope = "providers/Microsoft.Management/managementGroups/ContosoOnlineGroup",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure-native-sdk/blueprint/v2"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := blueprint.NewPolicyAssignmentArtifact(ctx, "policyAssignmentArtifact", &blueprint.PolicyAssignmentArtifactArgs{
    			ArtifactName:  pulumi.String("costCenterPolicy"),
    			BlueprintName: pulumi.String("simpleBlueprint"),
    			DisplayName:   pulumi.String("force costCenter tag on all resources"),
    			Kind:          pulumi.String("policyAssignment"),
    			Parameters: blueprint.ParameterValueMap{
    				"tagName": &blueprint.ParameterValueArgs{
    					Value: pulumi.Any("costCenter"),
    				},
    				"tagValue": &blueprint.ParameterValueArgs{
    					Value: pulumi.Any("[parameter('costCenter')]"),
    				},
    			},
    			PolicyDefinitionId: pulumi.String("/providers/Microsoft.Authorization/policyDefinitions/1e30110a-5ceb-460c-a204-c1c3969c6d62"),
    			ResourceScope:      pulumi.String("providers/Microsoft.Management/managementGroups/ContosoOnlineGroup"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azurenative.blueprint.PolicyAssignmentArtifact;
    import com.pulumi.azurenative.blueprint.PolicyAssignmentArtifactArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var policyAssignmentArtifact = new PolicyAssignmentArtifact("policyAssignmentArtifact", PolicyAssignmentArtifactArgs.builder()        
                .artifactName("costCenterPolicy")
                .blueprintName("simpleBlueprint")
                .displayName("force costCenter tag on all resources")
                .kind("policyAssignment")
                .parameters(Map.ofEntries(
                    Map.entry("tagName", Map.of("value", "costCenter")),
                    Map.entry("tagValue", Map.of("value", "[parameter('costCenter')]"))
                ))
                .policyDefinitionId("/providers/Microsoft.Authorization/policyDefinitions/1e30110a-5ceb-460c-a204-c1c3969c6d62")
                .resourceScope("providers/Microsoft.Management/managementGroups/ContosoOnlineGroup")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_azure_native as azure_native
    
    policy_assignment_artifact = azure_native.blueprint.PolicyAssignmentArtifact("policyAssignmentArtifact",
        artifact_name="costCenterPolicy",
        blueprint_name="simpleBlueprint",
        display_name="force costCenter tag on all resources",
        kind="policyAssignment",
        parameters={
            "tagName": azure_native.blueprint.ParameterValueArgs(
                value="costCenter",
            ),
            "tagValue": azure_native.blueprint.ParameterValueArgs(
                value="[parameter('costCenter')]",
            ),
        },
        policy_definition_id="/providers/Microsoft.Authorization/policyDefinitions/1e30110a-5ceb-460c-a204-c1c3969c6d62",
        resource_scope="providers/Microsoft.Management/managementGroups/ContosoOnlineGroup")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure_native from "@pulumi/azure-native";
    
    const policyAssignmentArtifact = new azure_native.blueprint.PolicyAssignmentArtifact("policyAssignmentArtifact", {
        artifactName: "costCenterPolicy",
        blueprintName: "simpleBlueprint",
        displayName: "force costCenter tag on all resources",
        kind: "policyAssignment",
        parameters: {
            tagName: {
                value: "costCenter",
            },
            tagValue: {
                value: "[parameter('costCenter')]",
            },
        },
        policyDefinitionId: "/providers/Microsoft.Authorization/policyDefinitions/1e30110a-5ceb-460c-a204-c1c3969c6d62",
        resourceScope: "providers/Microsoft.Management/managementGroups/ContosoOnlineGroup",
    });
    
    resources:
      policyAssignmentArtifact:
        type: azure-native:blueprint:PolicyAssignmentArtifact
        properties:
          artifactName: costCenterPolicy
          blueprintName: simpleBlueprint
          displayName: force costCenter tag on all resources
          kind: policyAssignment
          parameters:
            tagName:
              value: costCenter
            tagValue:
              value: '[parameter(''costCenter'')]'
          policyDefinitionId: /providers/Microsoft.Authorization/policyDefinitions/1e30110a-5ceb-460c-a204-c1c3969c6d62
          resourceScope: providers/Microsoft.Management/managementGroups/ContosoOnlineGroup
    

    MG-RoleAssignmentArtifact

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureNative = Pulumi.AzureNative;
    
    return await Deployment.RunAsync(() => 
    {
        var policyAssignmentArtifact = new AzureNative.Blueprint.PolicyAssignmentArtifact("policyAssignmentArtifact", new()
        {
            ArtifactName = "ownerAssignment",
            BlueprintName = "simpleBlueprint",
            ResourceScope = "providers/Microsoft.Management/managementGroups/ContosoOnlineGroup",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure-native-sdk/blueprint/v2"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := blueprint.NewPolicyAssignmentArtifact(ctx, "policyAssignmentArtifact", &blueprint.PolicyAssignmentArtifactArgs{
    			ArtifactName:  pulumi.String("ownerAssignment"),
    			BlueprintName: pulumi.String("simpleBlueprint"),
    			ResourceScope: pulumi.String("providers/Microsoft.Management/managementGroups/ContosoOnlineGroup"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azurenative.blueprint.PolicyAssignmentArtifact;
    import com.pulumi.azurenative.blueprint.PolicyAssignmentArtifactArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var policyAssignmentArtifact = new PolicyAssignmentArtifact("policyAssignmentArtifact", PolicyAssignmentArtifactArgs.builder()        
                .artifactName("ownerAssignment")
                .blueprintName("simpleBlueprint")
                .resourceScope("providers/Microsoft.Management/managementGroups/ContosoOnlineGroup")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_azure_native as azure_native
    
    policy_assignment_artifact = azure_native.blueprint.PolicyAssignmentArtifact("policyAssignmentArtifact",
        artifact_name="ownerAssignment",
        blueprint_name="simpleBlueprint",
        resource_scope="providers/Microsoft.Management/managementGroups/ContosoOnlineGroup")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure_native from "@pulumi/azure-native";
    
    const policyAssignmentArtifact = new azure_native.blueprint.PolicyAssignmentArtifact("policyAssignmentArtifact", {
        artifactName: "ownerAssignment",
        blueprintName: "simpleBlueprint",
        resourceScope: "providers/Microsoft.Management/managementGroups/ContosoOnlineGroup",
    });
    
    resources:
      policyAssignmentArtifact:
        type: azure-native:blueprint:PolicyAssignmentArtifact
        properties:
          artifactName: ownerAssignment
          blueprintName: simpleBlueprint
          resourceScope: providers/Microsoft.Management/managementGroups/ContosoOnlineGroup
    

    Sub-ARMTemplateArtifact

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureNative = Pulumi.AzureNative;
    
    return await Deployment.RunAsync(() => 
    {
        var policyAssignmentArtifact = new AzureNative.Blueprint.PolicyAssignmentArtifact("policyAssignmentArtifact", new()
        {
            ArtifactName = "storageTemplate",
            BlueprintName = "simpleBlueprint",
            ResourceScope = "subscriptions/00000000-0000-0000-0000-000000000000",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure-native-sdk/blueprint/v2"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := blueprint.NewPolicyAssignmentArtifact(ctx, "policyAssignmentArtifact", &blueprint.PolicyAssignmentArtifactArgs{
    			ArtifactName:  pulumi.String("storageTemplate"),
    			BlueprintName: pulumi.String("simpleBlueprint"),
    			ResourceScope: pulumi.String("subscriptions/00000000-0000-0000-0000-000000000000"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azurenative.blueprint.PolicyAssignmentArtifact;
    import com.pulumi.azurenative.blueprint.PolicyAssignmentArtifactArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var policyAssignmentArtifact = new PolicyAssignmentArtifact("policyAssignmentArtifact", PolicyAssignmentArtifactArgs.builder()        
                .artifactName("storageTemplate")
                .blueprintName("simpleBlueprint")
                .resourceScope("subscriptions/00000000-0000-0000-0000-000000000000")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_azure_native as azure_native
    
    policy_assignment_artifact = azure_native.blueprint.PolicyAssignmentArtifact("policyAssignmentArtifact",
        artifact_name="storageTemplate",
        blueprint_name="simpleBlueprint",
        resource_scope="subscriptions/00000000-0000-0000-0000-000000000000")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure_native from "@pulumi/azure-native";
    
    const policyAssignmentArtifact = new azure_native.blueprint.PolicyAssignmentArtifact("policyAssignmentArtifact", {
        artifactName: "storageTemplate",
        blueprintName: "simpleBlueprint",
        resourceScope: "subscriptions/00000000-0000-0000-0000-000000000000",
    });
    
    resources:
      policyAssignmentArtifact:
        type: azure-native:blueprint:PolicyAssignmentArtifact
        properties:
          artifactName: storageTemplate
          blueprintName: simpleBlueprint
          resourceScope: subscriptions/00000000-0000-0000-0000-000000000000
    

    Sub-PolicyAssignmentArtifact

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureNative = Pulumi.AzureNative;
    
    return await Deployment.RunAsync(() => 
    {
        var policyAssignmentArtifact = new AzureNative.Blueprint.PolicyAssignmentArtifact("policyAssignmentArtifact", new()
        {
            ArtifactName = "costCenterPolicy",
            BlueprintName = "simpleBlueprint",
            DisplayName = "force costCenter tag on all resources",
            Kind = "policyAssignment",
            Parameters = 
            {
                { "tagName", new AzureNative.Blueprint.Inputs.ParameterValueArgs
                {
                    Value = "costCenter",
                } },
                { "tagValue", new AzureNative.Blueprint.Inputs.ParameterValueArgs
                {
                    Value = "[parameter('costCenter')]",
                } },
            },
            PolicyDefinitionId = "/providers/Microsoft.Authorization/policyDefinitions/1e30110a-5ceb-460c-a204-c1c3969c6d62",
            ResourceScope = "subscriptions/00000000-0000-0000-0000-000000000000",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure-native-sdk/blueprint/v2"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := blueprint.NewPolicyAssignmentArtifact(ctx, "policyAssignmentArtifact", &blueprint.PolicyAssignmentArtifactArgs{
    			ArtifactName:  pulumi.String("costCenterPolicy"),
    			BlueprintName: pulumi.String("simpleBlueprint"),
    			DisplayName:   pulumi.String("force costCenter tag on all resources"),
    			Kind:          pulumi.String("policyAssignment"),
    			Parameters: blueprint.ParameterValueMap{
    				"tagName": &blueprint.ParameterValueArgs{
    					Value: pulumi.Any("costCenter"),
    				},
    				"tagValue": &blueprint.ParameterValueArgs{
    					Value: pulumi.Any("[parameter('costCenter')]"),
    				},
    			},
    			PolicyDefinitionId: pulumi.String("/providers/Microsoft.Authorization/policyDefinitions/1e30110a-5ceb-460c-a204-c1c3969c6d62"),
    			ResourceScope:      pulumi.String("subscriptions/00000000-0000-0000-0000-000000000000"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azurenative.blueprint.PolicyAssignmentArtifact;
    import com.pulumi.azurenative.blueprint.PolicyAssignmentArtifactArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var policyAssignmentArtifact = new PolicyAssignmentArtifact("policyAssignmentArtifact", PolicyAssignmentArtifactArgs.builder()        
                .artifactName("costCenterPolicy")
                .blueprintName("simpleBlueprint")
                .displayName("force costCenter tag on all resources")
                .kind("policyAssignment")
                .parameters(Map.ofEntries(
                    Map.entry("tagName", Map.of("value", "costCenter")),
                    Map.entry("tagValue", Map.of("value", "[parameter('costCenter')]"))
                ))
                .policyDefinitionId("/providers/Microsoft.Authorization/policyDefinitions/1e30110a-5ceb-460c-a204-c1c3969c6d62")
                .resourceScope("subscriptions/00000000-0000-0000-0000-000000000000")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_azure_native as azure_native
    
    policy_assignment_artifact = azure_native.blueprint.PolicyAssignmentArtifact("policyAssignmentArtifact",
        artifact_name="costCenterPolicy",
        blueprint_name="simpleBlueprint",
        display_name="force costCenter tag on all resources",
        kind="policyAssignment",
        parameters={
            "tagName": azure_native.blueprint.ParameterValueArgs(
                value="costCenter",
            ),
            "tagValue": azure_native.blueprint.ParameterValueArgs(
                value="[parameter('costCenter')]",
            ),
        },
        policy_definition_id="/providers/Microsoft.Authorization/policyDefinitions/1e30110a-5ceb-460c-a204-c1c3969c6d62",
        resource_scope="subscriptions/00000000-0000-0000-0000-000000000000")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure_native from "@pulumi/azure-native";
    
    const policyAssignmentArtifact = new azure_native.blueprint.PolicyAssignmentArtifact("policyAssignmentArtifact", {
        artifactName: "costCenterPolicy",
        blueprintName: "simpleBlueprint",
        displayName: "force costCenter tag on all resources",
        kind: "policyAssignment",
        parameters: {
            tagName: {
                value: "costCenter",
            },
            tagValue: {
                value: "[parameter('costCenter')]",
            },
        },
        policyDefinitionId: "/providers/Microsoft.Authorization/policyDefinitions/1e30110a-5ceb-460c-a204-c1c3969c6d62",
        resourceScope: "subscriptions/00000000-0000-0000-0000-000000000000",
    });
    
    resources:
      policyAssignmentArtifact:
        type: azure-native:blueprint:PolicyAssignmentArtifact
        properties:
          artifactName: costCenterPolicy
          blueprintName: simpleBlueprint
          displayName: force costCenter tag on all resources
          kind: policyAssignment
          parameters:
            tagName:
              value: costCenter
            tagValue:
              value: '[parameter(''costCenter'')]'
          policyDefinitionId: /providers/Microsoft.Authorization/policyDefinitions/1e30110a-5ceb-460c-a204-c1c3969c6d62
          resourceScope: subscriptions/00000000-0000-0000-0000-000000000000
    

    Sub-RoleAssignmentArtifact

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureNative = Pulumi.AzureNative;
    
    return await Deployment.RunAsync(() => 
    {
        var policyAssignmentArtifact = new AzureNative.Blueprint.PolicyAssignmentArtifact("policyAssignmentArtifact", new()
        {
            ArtifactName = "ownerAssignment",
            BlueprintName = "simpleBlueprint",
            ResourceScope = "subscriptions/00000000-0000-0000-0000-000000000000",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure-native-sdk/blueprint/v2"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := blueprint.NewPolicyAssignmentArtifact(ctx, "policyAssignmentArtifact", &blueprint.PolicyAssignmentArtifactArgs{
    			ArtifactName:  pulumi.String("ownerAssignment"),
    			BlueprintName: pulumi.String("simpleBlueprint"),
    			ResourceScope: pulumi.String("subscriptions/00000000-0000-0000-0000-000000000000"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azurenative.blueprint.PolicyAssignmentArtifact;
    import com.pulumi.azurenative.blueprint.PolicyAssignmentArtifactArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var policyAssignmentArtifact = new PolicyAssignmentArtifact("policyAssignmentArtifact", PolicyAssignmentArtifactArgs.builder()        
                .artifactName("ownerAssignment")
                .blueprintName("simpleBlueprint")
                .resourceScope("subscriptions/00000000-0000-0000-0000-000000000000")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_azure_native as azure_native
    
    policy_assignment_artifact = azure_native.blueprint.PolicyAssignmentArtifact("policyAssignmentArtifact",
        artifact_name="ownerAssignment",
        blueprint_name="simpleBlueprint",
        resource_scope="subscriptions/00000000-0000-0000-0000-000000000000")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure_native from "@pulumi/azure-native";
    
    const policyAssignmentArtifact = new azure_native.blueprint.PolicyAssignmentArtifact("policyAssignmentArtifact", {
        artifactName: "ownerAssignment",
        blueprintName: "simpleBlueprint",
        resourceScope: "subscriptions/00000000-0000-0000-0000-000000000000",
    });
    
    resources:
      policyAssignmentArtifact:
        type: azure-native:blueprint:PolicyAssignmentArtifact
        properties:
          artifactName: ownerAssignment
          blueprintName: simpleBlueprint
          resourceScope: subscriptions/00000000-0000-0000-0000-000000000000
    

    Create PolicyAssignmentArtifact Resource

    new PolicyAssignmentArtifact(name: string, args: PolicyAssignmentArtifactArgs, opts?: CustomResourceOptions);
    @overload
    def PolicyAssignmentArtifact(resource_name: str,
                                 opts: Optional[ResourceOptions] = None,
                                 artifact_name: Optional[str] = None,
                                 blueprint_name: Optional[str] = None,
                                 depends_on: Optional[Sequence[str]] = None,
                                 description: Optional[str] = None,
                                 display_name: Optional[str] = None,
                                 parameters: Optional[Mapping[str, ParameterValueArgs]] = None,
                                 policy_definition_id: Optional[str] = None,
                                 resource_group: Optional[str] = None,
                                 resource_scope: Optional[str] = None)
    @overload
    def PolicyAssignmentArtifact(resource_name: str,
                                 args: PolicyAssignmentArtifactArgs,
                                 opts: Optional[ResourceOptions] = None)
    func NewPolicyAssignmentArtifact(ctx *Context, name string, args PolicyAssignmentArtifactArgs, opts ...ResourceOption) (*PolicyAssignmentArtifact, error)
    public PolicyAssignmentArtifact(string name, PolicyAssignmentArtifactArgs args, CustomResourceOptions? opts = null)
    public PolicyAssignmentArtifact(String name, PolicyAssignmentArtifactArgs args)
    public PolicyAssignmentArtifact(String name, PolicyAssignmentArtifactArgs args, CustomResourceOptions options)
    
    type: azure-native:blueprint:PolicyAssignmentArtifact
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args PolicyAssignmentArtifactArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args PolicyAssignmentArtifactArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args PolicyAssignmentArtifactArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args PolicyAssignmentArtifactArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args PolicyAssignmentArtifactArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    PolicyAssignmentArtifact Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The PolicyAssignmentArtifact resource accepts the following input properties:

    BlueprintName string
    Name of the blueprint definition.
    Parameters Dictionary<string, Pulumi.AzureNative.Blueprint.Inputs.ParameterValueArgs>
    Parameter values for the policy definition.
    PolicyDefinitionId string
    Azure resource ID of the policy definition.
    ResourceScope string
    The scope of the resource. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}').
    ArtifactName string
    Name of the blueprint artifact.
    DependsOn List<string>
    Artifacts which need to be deployed before the specified artifact.
    Description string
    Multi-line explain this resource.
    DisplayName string
    One-liner string explain this resource.
    ResourceGroup string
    Name of the resource group placeholder to which the policy will be assigned.
    BlueprintName string
    Name of the blueprint definition.
    Parameters map[string]ParameterValueArgs
    Parameter values for the policy definition.
    PolicyDefinitionId string
    Azure resource ID of the policy definition.
    ResourceScope string
    The scope of the resource. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}').
    ArtifactName string
    Name of the blueprint artifact.
    DependsOn []string
    Artifacts which need to be deployed before the specified artifact.
    Description string
    Multi-line explain this resource.
    DisplayName string
    One-liner string explain this resource.
    ResourceGroup string
    Name of the resource group placeholder to which the policy will be assigned.
    blueprintName String
    Name of the blueprint definition.
    parameters Map<String,ParameterValueArgs>
    Parameter values for the policy definition.
    policyDefinitionId String
    Azure resource ID of the policy definition.
    resourceScope String
    The scope of the resource. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}').
    artifactName String
    Name of the blueprint artifact.
    dependsOn List<String>
    Artifacts which need to be deployed before the specified artifact.
    description String
    Multi-line explain this resource.
    displayName String
    One-liner string explain this resource.
    resourceGroup String
    Name of the resource group placeholder to which the policy will be assigned.
    blueprintName string
    Name of the blueprint definition.
    parameters {[key: string]: ParameterValueArgs}
    Parameter values for the policy definition.
    policyDefinitionId string
    Azure resource ID of the policy definition.
    resourceScope string
    The scope of the resource. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}').
    artifactName string
    Name of the blueprint artifact.
    dependsOn string[]
    Artifacts which need to be deployed before the specified artifact.
    description string
    Multi-line explain this resource.
    displayName string
    One-liner string explain this resource.
    resourceGroup string
    Name of the resource group placeholder to which the policy will be assigned.
    blueprint_name str
    Name of the blueprint definition.
    parameters Mapping[str, ParameterValueArgs]
    Parameter values for the policy definition.
    policy_definition_id str
    Azure resource ID of the policy definition.
    resource_scope str
    The scope of the resource. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}').
    artifact_name str
    Name of the blueprint artifact.
    depends_on Sequence[str]
    Artifacts which need to be deployed before the specified artifact.
    description str
    Multi-line explain this resource.
    display_name str
    One-liner string explain this resource.
    resource_group str
    Name of the resource group placeholder to which the policy will be assigned.
    blueprintName String
    Name of the blueprint definition.
    parameters Map<Property Map>
    Parameter values for the policy definition.
    policyDefinitionId String
    Azure resource ID of the policy definition.
    resourceScope String
    The scope of the resource. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}').
    artifactName String
    Name of the blueprint artifact.
    dependsOn List<String>
    Artifacts which need to be deployed before the specified artifact.
    description String
    Multi-line explain this resource.
    displayName String
    One-liner string explain this resource.
    resourceGroup String
    Name of the resource group placeholder to which the policy will be assigned.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the PolicyAssignmentArtifact resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    Name of this resource.
    Type string
    Type of this resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    Name of this resource.
    Type string
    Type of this resource.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    Name of this resource.
    type String
    Type of this resource.
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    Name of this resource.
    type string
    Type of this resource.
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    Name of this resource.
    type str
    Type of this resource.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    Name of this resource.
    type String
    Type of this resource.

    Supporting Types

    KeyVaultReference, KeyVaultReferenceArgs

    Id string
    Azure resource ID of the Key Vault.
    Id string
    Azure resource ID of the Key Vault.
    id String
    Azure resource ID of the Key Vault.
    id string
    Azure resource ID of the Key Vault.
    id str
    Azure resource ID of the Key Vault.
    id String
    Azure resource ID of the Key Vault.

    KeyVaultReferenceResponse, KeyVaultReferenceResponseArgs

    Id string
    Azure resource ID of the Key Vault.
    Id string
    Azure resource ID of the Key Vault.
    id String
    Azure resource ID of the Key Vault.
    id string
    Azure resource ID of the Key Vault.
    id str
    Azure resource ID of the Key Vault.
    id String
    Azure resource ID of the Key Vault.

    ParameterValue, ParameterValueArgs

    Reference Pulumi.AzureNative.Blueprint.Inputs.SecretValueReference
    Parameter value as reference type.
    Value object
    Parameter value. Any valid JSON value is allowed including objects, arrays, strings, numbers and booleans.
    Reference SecretValueReference
    Parameter value as reference type.
    Value interface{}
    Parameter value. Any valid JSON value is allowed including objects, arrays, strings, numbers and booleans.
    reference SecretValueReference
    Parameter value as reference type.
    value Object
    Parameter value. Any valid JSON value is allowed including objects, arrays, strings, numbers and booleans.
    reference SecretValueReference
    Parameter value as reference type.
    value any
    Parameter value. Any valid JSON value is allowed including objects, arrays, strings, numbers and booleans.
    reference SecretValueReference
    Parameter value as reference type.
    value Any
    Parameter value. Any valid JSON value is allowed including objects, arrays, strings, numbers and booleans.
    reference Property Map
    Parameter value as reference type.
    value Any
    Parameter value. Any valid JSON value is allowed including objects, arrays, strings, numbers and booleans.

    ParameterValueResponse, ParameterValueResponseArgs

    Reference Pulumi.AzureNative.Blueprint.Inputs.SecretValueReferenceResponse
    Parameter value as reference type.
    Value object
    Parameter value. Any valid JSON value is allowed including objects, arrays, strings, numbers and booleans.
    Reference SecretValueReferenceResponse
    Parameter value as reference type.
    Value interface{}
    Parameter value. Any valid JSON value is allowed including objects, arrays, strings, numbers and booleans.
    reference SecretValueReferenceResponse
    Parameter value as reference type.
    value Object
    Parameter value. Any valid JSON value is allowed including objects, arrays, strings, numbers and booleans.
    reference SecretValueReferenceResponse
    Parameter value as reference type.
    value any
    Parameter value. Any valid JSON value is allowed including objects, arrays, strings, numbers and booleans.
    reference SecretValueReferenceResponse
    Parameter value as reference type.
    value Any
    Parameter value. Any valid JSON value is allowed including objects, arrays, strings, numbers and booleans.
    reference Property Map
    Parameter value as reference type.
    value Any
    Parameter value. Any valid JSON value is allowed including objects, arrays, strings, numbers and booleans.

    SecretValueReference, SecretValueReferenceArgs

    KeyVault Pulumi.AzureNative.Blueprint.Inputs.KeyVaultReference
    Specifies the reference to a given Azure Key Vault.
    SecretName string
    Name of the secret.
    SecretVersion string
    The version of the secret to use. If left blank, the latest version of the secret is used.
    KeyVault KeyVaultReference
    Specifies the reference to a given Azure Key Vault.
    SecretName string
    Name of the secret.
    SecretVersion string
    The version of the secret to use. If left blank, the latest version of the secret is used.
    keyVault KeyVaultReference
    Specifies the reference to a given Azure Key Vault.
    secretName String
    Name of the secret.
    secretVersion String
    The version of the secret to use. If left blank, the latest version of the secret is used.
    keyVault KeyVaultReference
    Specifies the reference to a given Azure Key Vault.
    secretName string
    Name of the secret.
    secretVersion string
    The version of the secret to use. If left blank, the latest version of the secret is used.
    key_vault KeyVaultReference
    Specifies the reference to a given Azure Key Vault.
    secret_name str
    Name of the secret.
    secret_version str
    The version of the secret to use. If left blank, the latest version of the secret is used.
    keyVault Property Map
    Specifies the reference to a given Azure Key Vault.
    secretName String
    Name of the secret.
    secretVersion String
    The version of the secret to use. If left blank, the latest version of the secret is used.

    SecretValueReferenceResponse, SecretValueReferenceResponseArgs

    KeyVault Pulumi.AzureNative.Blueprint.Inputs.KeyVaultReferenceResponse
    Specifies the reference to a given Azure Key Vault.
    SecretName string
    Name of the secret.
    SecretVersion string
    The version of the secret to use. If left blank, the latest version of the secret is used.
    KeyVault KeyVaultReferenceResponse
    Specifies the reference to a given Azure Key Vault.
    SecretName string
    Name of the secret.
    SecretVersion string
    The version of the secret to use. If left blank, the latest version of the secret is used.
    keyVault KeyVaultReferenceResponse
    Specifies the reference to a given Azure Key Vault.
    secretName String
    Name of the secret.
    secretVersion String
    The version of the secret to use. If left blank, the latest version of the secret is used.
    keyVault KeyVaultReferenceResponse
    Specifies the reference to a given Azure Key Vault.
    secretName string
    Name of the secret.
    secretVersion string
    The version of the secret to use. If left blank, the latest version of the secret is used.
    key_vault KeyVaultReferenceResponse
    Specifies the reference to a given Azure Key Vault.
    secret_name str
    Name of the secret.
    secret_version str
    The version of the secret to use. If left blank, the latest version of the secret is used.
    keyVault Property Map
    Specifies the reference to a given Azure Key Vault.
    secretName String
    Name of the secret.
    secretVersion String
    The version of the secret to use. If left blank, the latest version of the secret is used.

    Import

    An existing resource can be imported using its type token, name, and identifier, e.g.

    $ pulumi import azure-native:blueprint:PolicyAssignmentArtifact ownerAssignment /{resourceScope}/providers/Microsoft.Blueprint/blueprints/{blueprintName}/artifacts/{artifactName} 
    

    Package Details

    Repository
    Azure Native pulumi/pulumi-azure-native
    License
    Apache-2.0
    azure-native logo
    This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
    Azure Native v2.34.0 published on Thursday, Mar 28, 2024 by Pulumi