LocalUserArgs

data class LocalUserArgs(val accountName: Output<String>? = null, val allowAclAuthorization: Output<Boolean>? = null, val extendedGroups: Output<List<Int>>? = null, val groupId: Output<Int>? = null, val hasSharedKey: Output<Boolean>? = null, val hasSshKey: Output<Boolean>? = null, val hasSshPassword: Output<Boolean>? = null, val homeDirectory: Output<String>? = null, val isNFSv3Enabled: Output<Boolean>? = null, val permissionScopes: Output<List<PermissionScopeArgs>>? = null, val resourceGroupName: Output<String>? = null, val sshAuthorizedKeys: Output<List<SshPublicKeyArgs>>? = null, val username: Output<String>? = null) : ConvertibleToJava<LocalUserArgs>

The local user associated with the storage accounts. Uses Azure REST API version 2024-01-01. In version 2.x of the Azure Native provider, it used API version 2022-09-01. Other available API versions: 2022-09-01, 2023-01-01, 2023-04-01, 2023-05-01. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native storage [ApiVersion]. See the ../../../version-guide/#accessing-any-api-version-via-local-packages for details.

Example Usage

CreateLocalUser

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var localUser = new AzureNative.Storage.LocalUser("localUser", new()
{
AccountName = "sto2527",
AllowAclAuthorization = true,
GroupId = 2000,
HasSshPassword = true,
HomeDirectory = "homedirectory",
PermissionScopes = new[]
{
new AzureNative.Storage.Inputs.PermissionScopeArgs
{
Permissions = "rwd",
ResourceName = "share1",
Service = "file",
},
new AzureNative.Storage.Inputs.PermissionScopeArgs
{
Permissions = "rw",
ResourceName = "share2",
Service = "file",
},
},
ResourceGroupName = "res6977",
SshAuthorizedKeys = new[]
{
new AzureNative.Storage.Inputs.SshPublicKeyArgs
{
Description = "key name",
Key = "ssh-rsa keykeykeykeykey=",
},
},
Username = "user1",
});
});
package main
import (
storage "github.com/pulumi/pulumi-azure-native-sdk/storage/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := storage.NewLocalUser(ctx, "localUser", &storage.LocalUserArgs{
AccountName: pulumi.String("sto2527"),
AllowAclAuthorization: pulumi.Bool(true),
GroupId: pulumi.Int(2000),
HasSshPassword: pulumi.Bool(true),
HomeDirectory: pulumi.String("homedirectory"),
PermissionScopes: storage.PermissionScopeArray{
&storage.PermissionScopeArgs{
Permissions: pulumi.String("rwd"),
ResourceName: pulumi.String("share1"),
Service: pulumi.String("file"),
},
&storage.PermissionScopeArgs{
Permissions: pulumi.String("rw"),
ResourceName: pulumi.String("share2"),
Service: pulumi.String("file"),
},
},
ResourceGroupName: pulumi.String("res6977"),
SshAuthorizedKeys: storage.SshPublicKeyArray{
&storage.SshPublicKeyArgs{
Description: pulumi.String("key name"),
Key: pulumi.String("ssh-rsa keykeykeykeykey="),
},
},
Username: pulumi.String("user1"),
})
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.storage.LocalUser;
import com.pulumi.azurenative.storage.LocalUserArgs;
import com.pulumi.azurenative.storage.inputs.PermissionScopeArgs;
import com.pulumi.azurenative.storage.inputs.SshPublicKeyArgs;
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 localUser = new LocalUser("localUser", LocalUserArgs.builder()
.accountName("sto2527")
.allowAclAuthorization(true)
.groupId(2000)
.hasSshPassword(true)
.homeDirectory("homedirectory")
.permissionScopes(
PermissionScopeArgs.builder()
.permissions("rwd")
.resourceName("share1")
.service("file")
.build(),
PermissionScopeArgs.builder()
.permissions("rw")
.resourceName("share2")
.service("file")
.build())
.resourceGroupName("res6977")
.sshAuthorizedKeys(SshPublicKeyArgs.builder()
.description("key name")
.key("ssh-rsa keykeykeykeykey=")
.build())
.username("user1")
.build());
}
}

CreateNFSv3EnabledLocalUser

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var localUser = new AzureNative.Storage.LocalUser("localUser", new()
{
AccountName = "sto2527",
ExtendedGroups = new[]
{
1001,
1005,
2005,
},
IsNFSv3Enabled = true,
ResourceGroupName = "res6977",
Username = "user1",
});
});
package main
import (
storage "github.com/pulumi/pulumi-azure-native-sdk/storage/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := storage.NewLocalUser(ctx, "localUser", &storage.LocalUserArgs{
AccountName: pulumi.String("sto2527"),
ExtendedGroups: pulumi.IntArray{
pulumi.Int(1001),
pulumi.Int(1005),
pulumi.Int(2005),
},
IsNFSv3Enabled: pulumi.Bool(true),
ResourceGroupName: pulumi.String("res6977"),
Username: pulumi.String("user1"),
})
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.storage.LocalUser;
import com.pulumi.azurenative.storage.LocalUserArgs;
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 localUser = new LocalUser("localUser", LocalUserArgs.builder()
.accountName("sto2527")
.extendedGroups(
1001,
1005,
2005)
.isNFSv3Enabled(true)
.resourceGroupName("res6977")
.username("user1")
.build());
}
}

UpdateLocalUser

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var localUser = new AzureNative.Storage.LocalUser("localUser", new()
{
AccountName = "sto2527",
AllowAclAuthorization = false,
ExtendedGroups = new[]
{
1001,
1005,
2005,
},
GroupId = 3000,
HasSharedKey = false,
HasSshKey = false,
HasSshPassword = false,
HomeDirectory = "homedirectory2",
IsNFSv3Enabled = true,
ResourceGroupName = "res6977",
Username = "user1",
});
});
package main
import (
storage "github.com/pulumi/pulumi-azure-native-sdk/storage/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := storage.NewLocalUser(ctx, "localUser", &storage.LocalUserArgs{
AccountName: pulumi.String("sto2527"),
AllowAclAuthorization: pulumi.Bool(false),
ExtendedGroups: pulumi.IntArray{
pulumi.Int(1001),
pulumi.Int(1005),
pulumi.Int(2005),
},
GroupId: pulumi.Int(3000),
HasSharedKey: pulumi.Bool(false),
HasSshKey: pulumi.Bool(false),
HasSshPassword: pulumi.Bool(false),
HomeDirectory: pulumi.String("homedirectory2"),
IsNFSv3Enabled: pulumi.Bool(true),
ResourceGroupName: pulumi.String("res6977"),
Username: pulumi.String("user1"),
})
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.storage.LocalUser;
import com.pulumi.azurenative.storage.LocalUserArgs;
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 localUser = new LocalUser("localUser", LocalUserArgs.builder()
.accountName("sto2527")
.allowAclAuthorization(false)
.extendedGroups(
1001,
1005,
2005)
.groupId(3000)
.hasSharedKey(false)
.hasSshKey(false)
.hasSshPassword(false)
.homeDirectory("homedirectory2")
.isNFSv3Enabled(true)
.resourceGroupName("res6977")
.username("user1")
.build());
}
}

Import

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

$ pulumi import azure-native:storage:LocalUser user1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/localUsers/{username}

Constructors

Link copied to clipboard
constructor(accountName: Output<String>? = null, allowAclAuthorization: Output<Boolean>? = null, extendedGroups: Output<List<Int>>? = null, groupId: Output<Int>? = null, hasSharedKey: Output<Boolean>? = null, hasSshKey: Output<Boolean>? = null, hasSshPassword: Output<Boolean>? = null, homeDirectory: Output<String>? = null, isNFSv3Enabled: Output<Boolean>? = null, permissionScopes: Output<List<PermissionScopeArgs>>? = null, resourceGroupName: Output<String>? = null, sshAuthorizedKeys: Output<List<SshPublicKeyArgs>>? = null, username: Output<String>? = null)

Properties

Link copied to clipboard
val accountName: Output<String>? = null

The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.

Link copied to clipboard
val allowAclAuthorization: Output<Boolean>? = null

Indicates whether ACL authorization is allowed for this user. Set it to false to disallow using ACL authorization.

Link copied to clipboard
val extendedGroups: Output<List<Int>>? = null

Supplementary group membership. Only applicable for local users enabled for NFSv3 access.

Link copied to clipboard
val groupId: Output<Int>? = null

An identifier for associating a group of users.

Link copied to clipboard
val hasSharedKey: Output<Boolean>? = null

Indicates whether shared key exists. Set it to false to remove existing shared key.

Link copied to clipboard
val hasSshKey: Output<Boolean>? = null

Indicates whether ssh key exists. Set it to false to remove existing SSH key.

Link copied to clipboard
val hasSshPassword: Output<Boolean>? = null

Indicates whether ssh password exists. Set it to false to remove existing SSH password.

Link copied to clipboard
val homeDirectory: Output<String>? = null

Optional, local user home directory.

Link copied to clipboard
val isNFSv3Enabled: Output<Boolean>? = null

Indicates if the local user is enabled for access with NFSv3 protocol.

Link copied to clipboard

The permission scopes of the local user.

Link copied to clipboard
val resourceGroupName: Output<String>? = null

The name of the resource group within the user's subscription. The name is case insensitive.

Link copied to clipboard

Optional, local user ssh authorized keys for SFTP.

Link copied to clipboard
val username: Output<String>? = null

The name of local user. The username must contain lowercase letters and numbers only. It must be unique only within the storage account.

Functions

Link copied to clipboard
open override fun toJava(): LocalUserArgs