GalleryInVMAccessControlProfileVersion

class GalleryInVMAccessControlProfileVersion : KotlinCustomResource

Specifies information about the gallery inVMAccessControlProfile version that you want to create or update. Uses Azure REST API version 2024-03-03. In version 2.x of the Azure Native provider, it used API version 2024-03-03.

Example Usage

Create or update a Gallery InVMAccessControlProfile Version.

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var galleryInVMAccessControlProfileVersion = new AzureNative.Compute.GalleryInVMAccessControlProfileVersion("galleryInVMAccessControlProfileVersion", new()
{
DefaultAccess = AzureNative.Compute.EndpointAccess.Allow,
ExcludeFromLatest = false,
GalleryName = "myGalleryName",
InVMAccessControlProfileName = "myInVMAccessControlProfileName",
InVMAccessControlProfileVersionName = "1.0.0",
Location = "West US",
Mode = AzureNative.Compute.AccessControlRulesMode.Audit,
ResourceGroupName = "myResourceGroup",
Rules = new AzureNative.Compute.Inputs.AccessControlRulesArgs
{
Identities = new[]
{
new AzureNative.Compute.Inputs.AccessControlRulesIdentityArgs
{
ExePath = "C:\\Windows\\System32\\cscript.exe",
GroupName = "Administrators",
Name = "WinPA",
ProcessName = "cscript",
UserName = "SYSTEM",
},
},
Privileges = new[]
{
new AzureNative.Compute.Inputs.AccessControlRulesPrivilegeArgs
{
Name = "GoalState",
Path = "/machine",
QueryParameters =
{
{ "comp", "goalstate" },
},
},
},
RoleAssignments = new[]
{
new AzureNative.Compute.Inputs.AccessControlRulesRoleAssignmentArgs
{
Identities = new[]
{
"WinPA",
},
Role = "Provisioning",
},
},
Roles = new[]
{
new AzureNative.Compute.Inputs.AccessControlRulesRoleArgs
{
Name = "Provisioning",
Privileges = new[]
{
"GoalState",
},
},
},
},
TargetLocations = new[]
{
new AzureNative.Compute.Inputs.TargetRegionArgs
{
Name = "West US",
},
new AzureNative.Compute.Inputs.TargetRegionArgs
{
Name = "South Central US",
},
},
});
});
package main
import (
compute "github.com/pulumi/pulumi-azure-native-sdk/compute/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewGalleryInVMAccessControlProfileVersion(ctx, "galleryInVMAccessControlProfileVersion", &compute.GalleryInVMAccessControlProfileVersionArgs{
DefaultAccess: pulumi.String(compute.EndpointAccessAllow),
ExcludeFromLatest: pulumi.Bool(false),
GalleryName: pulumi.String("myGalleryName"),
InVMAccessControlProfileName: pulumi.String("myInVMAccessControlProfileName"),
InVMAccessControlProfileVersionName: pulumi.String("1.0.0"),
Location: pulumi.String("West US"),
Mode: pulumi.String(compute.AccessControlRulesModeAudit),
ResourceGroupName: pulumi.String("myResourceGroup"),
Rules: &compute.AccessControlRulesArgs{
Identities: compute.AccessControlRulesIdentityArray{
&compute.AccessControlRulesIdentityArgs{
ExePath: pulumi.String("C:\\Windows\\System32\\cscript.exe"),
GroupName: pulumi.String("Administrators"),
Name: pulumi.String("WinPA"),
ProcessName: pulumi.String("cscript"),
UserName: pulumi.String("SYSTEM"),
},
},
Privileges: compute.AccessControlRulesPrivilegeArray{
&compute.AccessControlRulesPrivilegeArgs{
Name: pulumi.String("GoalState"),
Path: pulumi.String("/machine"),
QueryParameters: pulumi.StringMap{
"comp": pulumi.String("goalstate"),
},
},
},
RoleAssignments: compute.AccessControlRulesRoleAssignmentArray{
&compute.AccessControlRulesRoleAssignmentArgs{
Identities: pulumi.StringArray{
pulumi.String("WinPA"),
},
Role: pulumi.String("Provisioning"),
},
},
Roles: compute.AccessControlRulesRoleArray{
&compute.AccessControlRulesRoleArgs{
Name: pulumi.String("Provisioning"),
Privileges: pulumi.StringArray{
pulumi.String("GoalState"),
},
},
},
},
TargetLocations: compute.TargetRegionArray{
&compute.TargetRegionArgs{
Name: pulumi.String("West US"),
},
&compute.TargetRegionArgs{
Name: pulumi.String("South Central US"),
},
},
})
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.compute.GalleryInVMAccessControlProfileVersion;
import com.pulumi.azurenative.compute.GalleryInVMAccessControlProfileVersionArgs;
import com.pulumi.azurenative.compute.inputs.AccessControlRulesArgs;
import com.pulumi.azurenative.compute.inputs.TargetRegionArgs;
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 galleryInVMAccessControlProfileVersion = new GalleryInVMAccessControlProfileVersion("galleryInVMAccessControlProfileVersion", GalleryInVMAccessControlProfileVersionArgs.builder()
.defaultAccess("Allow")
.excludeFromLatest(false)
.galleryName("myGalleryName")
.inVMAccessControlProfileName("myInVMAccessControlProfileName")
.inVMAccessControlProfileVersionName("1.0.0")
.location("West US")
.mode("Audit")
.resourceGroupName("myResourceGroup")
.rules(AccessControlRulesArgs.builder()
.identities(AccessControlRulesIdentityArgs.builder()
.exePath("C:\\Windows\\System32\\cscript.exe")
.groupName("Administrators")
.name("WinPA")
.processName("cscript")
.userName("SYSTEM")
.build())
.privileges(AccessControlRulesPrivilegeArgs.builder()
.name("GoalState")
.path("/machine")
.queryParameters(Map.of("comp", "goalstate"))
.build())
.roleAssignments(AccessControlRulesRoleAssignmentArgs.builder()
.identities("WinPA")
.role("Provisioning")
.build())
.roles(AccessControlRulesRoleArgs.builder()
.name("Provisioning")
.privileges("GoalState")
.build())
.build())
.targetLocations(
TargetRegionArgs.builder()
.name("West US")
.build(),
TargetRegionArgs.builder()
.name("South Central US")
.build())
.build());
}
}

Import

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

$ pulumi import azure-native:compute:GalleryInVMAccessControlProfileVersion 1.0.0 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{inVMAccessControlProfileName}/versions/{inVMAccessControlProfileVersionName}

Properties

Link copied to clipboard
val azureApiVersion: Output<String>

The Azure API version of the resource.

Link copied to clipboard
val defaultAccess: Output<String>

This property allows you to specify if the requests will be allowed to access the host endpoints. Possible values are: 'Allow', 'Deny'.

Link copied to clipboard

If set to true, Virtual Machines deployed from the latest version of the Resource Profile won't use this Profile version.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val location: Output<String>

Resource location

Link copied to clipboard
val mode: Output<String>

This property allows you to specify whether the access control rules are in Audit mode, in Enforce mode or Disabled. Possible values are: 'Audit', 'Enforce' or 'Disabled'.

Link copied to clipboard
val name: Output<String>

Resource name

Link copied to clipboard

The provisioning state, which only appears in the response.

Link copied to clipboard
val publishedDate: Output<String>

The timestamp for when the Resource Profile Version is published.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

This is the replication status of the gallery image version.

Link copied to clipboard

This is the Access Control Rules specification for an inVMAccessControlProfile version.

Link copied to clipboard
val tags: Output<Map<String, String>>?

Resource tags

Link copied to clipboard

The target regions where the Resource Profile version is going to be replicated to. This property is updatable.

Link copied to clipboard
val type: Output<String>

Resource type

Link copied to clipboard
val urn: Output<String>