Assignment Args
data class AssignmentArgs(val assignmentName: Output<String>? = null, val blueprintId: Output<String>? = null, val description: Output<String>? = null, val displayName: Output<String>? = null, val identity: Output<ManagedServiceIdentityArgs>? = null, val location: Output<String>? = null, val locks: Output<AssignmentLockSettingsArgs>? = null, val parameters: Output<Map<String, ParameterValueArgs>>? = null, val resourceGroups: Output<Map<String, ResourceGroupValueArgs>>? = null, val resourceScope: Output<String>? = null, val scope: Output<String>? = null) : ConvertibleToJava<AssignmentArgs>
Represents a blueprint assignment. API Version: 2018-11-01-preview.
Example Usage
Assignment with system-assigned managed identity at management group scope
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var assignment = new AzureNative.Blueprint.Assignment("assignment", new()
{
AssignmentName = "assignSimpleBlueprint",
BlueprintId = "/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint",
Description = "enforce pre-defined simpleBlueprint to this XXXXXXXX subscription.",
Identity = new AzureNative.Blueprint.Inputs.ManagedServiceIdentityArgs
{
Type = "SystemAssigned",
},
Location = "eastus",
Parameters =
{
{ "costCenter", new AzureNative.Blueprint.Inputs.ParameterValueArgs
{
Value = "Contoso/Online/Shopping/Production",
} },
{ "owners", new AzureNative.Blueprint.Inputs.ParameterValueArgs
{
Value = new[]
{
"johnDoe@contoso.com",
"johnsteam@contoso.com",
},
} },
{ "storageAccountType", new AzureNative.Blueprint.Inputs.ParameterValueArgs
{
Value = "Standard_LRS",
} },
},
ResourceGroups =
{
{ "storageRG", new AzureNative.Blueprint.Inputs.ResourceGroupValueArgs
{
Location = "eastus",
Name = "defaultRG",
} },
},
ResourceScope = "managementGroups/ContosoOnlineGroup",
Scope = "subscriptions/00000000-0000-0000-0000-000000000000",
});
});
Content copied to clipboard
package main
import (
blueprint "github.com/pulumi/pulumi-azure-native-sdk/blueprint"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := blueprint.NewAssignment(ctx, "assignment", &blueprint.AssignmentArgs{
AssignmentName: pulumi.String("assignSimpleBlueprint"),
BlueprintId: pulumi.String("/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint"),
Description: pulumi.String("enforce pre-defined simpleBlueprint to this XXXXXXXX subscription."),
Identity: &blueprint.ManagedServiceIdentityArgs{
Type: pulumi.String("SystemAssigned"),
},
Location: pulumi.String("eastus"),
Parameters: blueprint.ParameterValueMap{
"costCenter": &blueprint.ParameterValueArgs{
Value: pulumi.Any("Contoso/Online/Shopping/Production"),
},
"owners": &blueprint.ParameterValueArgs{
Value: pulumi.Any{
"johnDoe@contoso.com",
"johnsteam@contoso.com",
},
},
"storageAccountType": &blueprint.ParameterValueArgs{
Value: pulumi.Any("Standard_LRS"),
},
},
ResourceGroups: blueprint.ResourceGroupValueMap{
"storageRG": &blueprint.ResourceGroupValueArgs{
Location: pulumi.String("eastus"),
Name: pulumi.String("defaultRG"),
},
},
ResourceScope: pulumi.String("managementGroups/ContosoOnlineGroup"),
Scope: pulumi.String("subscriptions/00000000-0000-0000-0000-000000000000"),
})
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.blueprint.Assignment;
import com.pulumi.azurenative.blueprint.AssignmentArgs;
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 assignment = new Assignment("assignment", AssignmentArgs.builder()
.assignmentName("assignSimpleBlueprint")
.blueprintId("/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint")
.description("enforce pre-defined simpleBlueprint to this XXXXXXXX subscription.")
.identity(Map.of("type", "SystemAssigned"))
.location("eastus")
.parameters(Map.ofEntries(
Map.entry("costCenter", Map.of("value", "Contoso/Online/Shopping/Production")),
Map.entry("owners", Map.of("value",
"johnDoe@contoso.com",
"johnsteam@contoso.com")),
Map.entry("storageAccountType", Map.of("value", "Standard_LRS"))
))
.resourceGroups(Map.of("storageRG", Map.ofEntries(
Map.entry("location", "eastus"),
Map.entry("name", "defaultRG")
)))
.resourceScope("managementGroups/ContosoOnlineGroup")
.scope("subscriptions/00000000-0000-0000-0000-000000000000")
.build());
}
}
Content copied to clipboard
Assignment with system-assigned managed identity at subscription scope
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var assignment = new AzureNative.Blueprint.Assignment("assignment", new()
{
AssignmentName = "assignSimpleBlueprint",
BlueprintId = "/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint",
Description = "enforce pre-defined simpleBlueprint to this XXXXXXXX subscription.",
Identity = new AzureNative.Blueprint.Inputs.ManagedServiceIdentityArgs
{
Type = "SystemAssigned",
},
Location = "eastus",
Parameters =
{
{ "costCenter", new AzureNative.Blueprint.Inputs.ParameterValueArgs
{
Value = "Contoso/Online/Shopping/Production",
} },
{ "owners", new AzureNative.Blueprint.Inputs.ParameterValueArgs
{
Value = new[]
{
"johnDoe@contoso.com",
"johnsteam@contoso.com",
},
} },
{ "storageAccountType", new AzureNative.Blueprint.Inputs.ParameterValueArgs
{
Value = "Standard_LRS",
} },
},
ResourceGroups =
{
{ "storageRG", new AzureNative.Blueprint.Inputs.ResourceGroupValueArgs
{
Location = "eastus",
Name = "defaultRG",
} },
},
ResourceScope = "subscriptions/00000000-0000-0000-0000-000000000000",
});
});
Content copied to clipboard
package main
import (
blueprint "github.com/pulumi/pulumi-azure-native-sdk/blueprint"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := blueprint.NewAssignment(ctx, "assignment", &blueprint.AssignmentArgs{
AssignmentName: pulumi.String("assignSimpleBlueprint"),
BlueprintId: pulumi.String("/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint"),
Description: pulumi.String("enforce pre-defined simpleBlueprint to this XXXXXXXX subscription."),
Identity: &blueprint.ManagedServiceIdentityArgs{
Type: pulumi.String("SystemAssigned"),
},
Location: pulumi.String("eastus"),
Parameters: blueprint.ParameterValueMap{
"costCenter": &blueprint.ParameterValueArgs{
Value: pulumi.Any("Contoso/Online/Shopping/Production"),
},
"owners": &blueprint.ParameterValueArgs{
Value: pulumi.Any{
"johnDoe@contoso.com",
"johnsteam@contoso.com",
},
},
"storageAccountType": &blueprint.ParameterValueArgs{
Value: pulumi.Any("Standard_LRS"),
},
},
ResourceGroups: blueprint.ResourceGroupValueMap{
"storageRG": &blueprint.ResourceGroupValueArgs{
Location: pulumi.String("eastus"),
Name: pulumi.String("defaultRG"),
},
},
ResourceScope: pulumi.String("subscriptions/00000000-0000-0000-0000-000000000000"),
})
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.blueprint.Assignment;
import com.pulumi.azurenative.blueprint.AssignmentArgs;
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 assignment = new Assignment("assignment", AssignmentArgs.builder()
.assignmentName("assignSimpleBlueprint")
.blueprintId("/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint")
.description("enforce pre-defined simpleBlueprint to this XXXXXXXX subscription.")
.identity(Map.of("type", "SystemAssigned"))
.location("eastus")
.parameters(Map.ofEntries(
Map.entry("costCenter", Map.of("value", "Contoso/Online/Shopping/Production")),
Map.entry("owners", Map.of("value",
"johnDoe@contoso.com",
"johnsteam@contoso.com")),
Map.entry("storageAccountType", Map.of("value", "Standard_LRS"))
))
.resourceGroups(Map.of("storageRG", Map.ofEntries(
Map.entry("location", "eastus"),
Map.entry("name", "defaultRG")
)))
.resourceScope("subscriptions/00000000-0000-0000-0000-000000000000")
.build());
}
}
Content copied to clipboard
Assignment with user-assigned managed identity at management group scope
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var assignment = new AzureNative.Blueprint.Assignment("assignment", new()
{
AssignmentName = "assignSimpleBlueprint",
BlueprintId = "/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint",
Description = "enforce pre-defined simpleBlueprint to this XXXXXXXX subscription.",
Identity = new AzureNative.Blueprint.Inputs.ManagedServiceIdentityArgs
{
Type = "UserAssigned",
UserAssignedIdentities =
{
{ "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/contoso-identity", null },
},
},
Location = "eastus",
Parameters =
{
{ "costCenter", new AzureNative.Blueprint.Inputs.ParameterValueArgs
{
Value = "Contoso/Online/Shopping/Production",
} },
{ "owners", new AzureNative.Blueprint.Inputs.ParameterValueArgs
{
Value = new[]
{
"johnDoe@contoso.com",
"johnsteam@contoso.com",
},
} },
{ "storageAccountType", new AzureNative.Blueprint.Inputs.ParameterValueArgs
{
Value = "Standard_LRS",
} },
},
ResourceGroups =
{
{ "storageRG", new AzureNative.Blueprint.Inputs.ResourceGroupValueArgs
{
Location = "eastus",
Name = "defaultRG",
} },
},
ResourceScope = "managementGroups/ContosoOnlineGroup",
Scope = "subscriptions/00000000-0000-0000-0000-000000000000",
});
});
Content copied to clipboard
package main
import (
blueprint "github.com/pulumi/pulumi-azure-native-sdk/blueprint"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := blueprint.NewAssignment(ctx, "assignment", &blueprint.AssignmentArgs{
AssignmentName: pulumi.String("assignSimpleBlueprint"),
BlueprintId: pulumi.String("/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint"),
Description: pulumi.String("enforce pre-defined simpleBlueprint to this XXXXXXXX subscription."),
Identity: blueprint.ManagedServiceIdentityResponse{
Type: pulumi.String("UserAssigned"),
UserAssignedIdentities: blueprint.UserAssignedIdentityMap{
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/contoso-identity": nil,
},
},
Location: pulumi.String("eastus"),
Parameters: blueprint.ParameterValueMap{
"costCenter": &blueprint.ParameterValueArgs{
Value: pulumi.Any("Contoso/Online/Shopping/Production"),
},
"owners": &blueprint.ParameterValueArgs{
Value: pulumi.Any{
"johnDoe@contoso.com",
"johnsteam@contoso.com",
},
},
"storageAccountType": &blueprint.ParameterValueArgs{
Value: pulumi.Any("Standard_LRS"),
},
},
ResourceGroups: blueprint.ResourceGroupValueMap{
"storageRG": &blueprint.ResourceGroupValueArgs{
Location: pulumi.String("eastus"),
Name: pulumi.String("defaultRG"),
},
},
ResourceScope: pulumi.String("managementGroups/ContosoOnlineGroup"),
Scope: pulumi.String("subscriptions/00000000-0000-0000-0000-000000000000"),
})
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.blueprint.Assignment;
import com.pulumi.azurenative.blueprint.AssignmentArgs;
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 assignment = new Assignment("assignment", AssignmentArgs.builder()
.assignmentName("assignSimpleBlueprint")
.blueprintId("/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint")
.description("enforce pre-defined simpleBlueprint to this XXXXXXXX subscription.")
.identity(Map.ofEntries(
Map.entry("type", "UserAssigned"),
Map.entry("userAssignedIdentities", Map.of("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/contoso-identity", ))
))
.location("eastus")
.parameters(Map.ofEntries(
Map.entry("costCenter", Map.of("value", "Contoso/Online/Shopping/Production")),
Map.entry("owners", Map.of("value",
"johnDoe@contoso.com",
"johnsteam@contoso.com")),
Map.entry("storageAccountType", Map.of("value", "Standard_LRS"))
))
.resourceGroups(Map.of("storageRG", Map.ofEntries(
Map.entry("location", "eastus"),
Map.entry("name", "defaultRG")
)))
.resourceScope("managementGroups/ContosoOnlineGroup")
.scope("subscriptions/00000000-0000-0000-0000-000000000000")
.build());
}
}
Content copied to clipboard
Assignment with user-assigned managed identity at subscription scope
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var assignment = new AzureNative.Blueprint.Assignment("assignment", new()
{
AssignmentName = "assignSimpleBlueprint",
BlueprintId = "/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint",
Description = "enforce pre-defined simpleBlueprint to this XXXXXXXX subscription.",
Identity = new AzureNative.Blueprint.Inputs.ManagedServiceIdentityArgs
{
Type = "UserAssigned",
UserAssignedIdentities =
{
{ "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/contoso-identity", null },
},
},
Location = "eastus",
Parameters =
{
{ "costCenter", new AzureNative.Blueprint.Inputs.ParameterValueArgs
{
Value = "Contoso/Online/Shopping/Production",
} },
{ "owners", new AzureNative.Blueprint.Inputs.ParameterValueArgs
{
Value = new[]
{
"johnDoe@contoso.com",
"johnsteam@contoso.com",
},
} },
{ "storageAccountType", new AzureNative.Blueprint.Inputs.ParameterValueArgs
{
Value = "Standard_LRS",
} },
},
ResourceGroups =
{
{ "storageRG", new AzureNative.Blueprint.Inputs.ResourceGroupValueArgs
{
Location = "eastus",
Name = "defaultRG",
} },
},
ResourceScope = "subscriptions/00000000-0000-0000-0000-000000000000",
});
});
Content copied to clipboard
package main
import (
blueprint "github.com/pulumi/pulumi-azure-native-sdk/blueprint"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := blueprint.NewAssignment(ctx, "assignment", &blueprint.AssignmentArgs{
AssignmentName: pulumi.String("assignSimpleBlueprint"),
BlueprintId: pulumi.String("/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint"),
Description: pulumi.String("enforce pre-defined simpleBlueprint to this XXXXXXXX subscription."),
Identity: blueprint.ManagedServiceIdentityResponse{
Type: pulumi.String("UserAssigned"),
UserAssignedIdentities: blueprint.UserAssignedIdentityMap{
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/contoso-identity": nil,
},
},
Location: pulumi.String("eastus"),
Parameters: blueprint.ParameterValueMap{
"costCenter": &blueprint.ParameterValueArgs{
Value: pulumi.Any("Contoso/Online/Shopping/Production"),
},
"owners": &blueprint.ParameterValueArgs{
Value: pulumi.Any{
"johnDoe@contoso.com",
"johnsteam@contoso.com",
},
},
"storageAccountType": &blueprint.ParameterValueArgs{
Value: pulumi.Any("Standard_LRS"),
},
},
ResourceGroups: blueprint.ResourceGroupValueMap{
"storageRG": &blueprint.ResourceGroupValueArgs{
Location: pulumi.String("eastus"),
Name: pulumi.String("defaultRG"),
},
},
ResourceScope: pulumi.String("subscriptions/00000000-0000-0000-0000-000000000000"),
})
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.blueprint.Assignment;
import com.pulumi.azurenative.blueprint.AssignmentArgs;
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 assignment = new Assignment("assignment", AssignmentArgs.builder()
.assignmentName("assignSimpleBlueprint")
.blueprintId("/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint")
.description("enforce pre-defined simpleBlueprint to this XXXXXXXX subscription.")
.identity(Map.ofEntries(
Map.entry("type", "UserAssigned"),
Map.entry("userAssignedIdentities", Map.of("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/contoso-identity", ))
))
.location("eastus")
.parameters(Map.ofEntries(
Map.entry("costCenter", Map.of("value", "Contoso/Online/Shopping/Production")),
Map.entry("owners", Map.of("value",
"johnDoe@contoso.com",
"johnsteam@contoso.com")),
Map.entry("storageAccountType", Map.of("value", "Standard_LRS"))
))
.resourceGroups(Map.of("storageRG", Map.ofEntries(
Map.entry("location", "eastus"),
Map.entry("name", "defaultRG")
)))
.resourceScope("subscriptions/00000000-0000-0000-0000-000000000000")
.build());
}
}
Content copied to clipboard
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:blueprint:Assignment assignSimpleBlueprint /subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Blueprint/blueprintAssignments/assignSimpleBlueprint
Content copied to clipboard
Constructors
Link copied to clipboard
constructor(assignmentName: Output<String>? = null, blueprintId: Output<String>? = null, description: Output<String>? = null, displayName: Output<String>? = null, identity: Output<ManagedServiceIdentityArgs>? = null, location: Output<String>? = null, locks: Output<AssignmentLockSettingsArgs>? = null, parameters: Output<Map<String, ParameterValueArgs>>? = null, resourceGroups: Output<Map<String, ResourceGroupValueArgs>>? = null, resourceScope: Output<String>? = null, scope: Output<String>? = null)
Properties
Link copied to clipboard
Name of the blueprint assignment.
Link copied to clipboard
ID of the published version of a blueprint definition.
Link copied to clipboard
Multi-line explain this resource.
Link copied to clipboard
One-liner string explain this resource.
Link copied to clipboard
Managed identity for this blueprint assignment.
Link copied to clipboard
Defines how resources deployed by a blueprint assignment are locked.
Link copied to clipboard
Blueprint assignment parameter values.
Link copied to clipboard
Names and locations of resource group placeholders.
Link copied to clipboard
The scope of the resource. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}').