1. Packages
  2. Artifactory Provider
  3. API Docs
  4. UserLockPolicy
artifactory v8.8.1 published on Wednesday, Apr 9, 2025 by Pulumi

artifactory.UserLockPolicy

Explore with Pulumi AI

Provides an Artifactory User Lock Policy resource.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as artifactory from "@pulumi/artifactory";

const my_user_lock_policy = new artifactory.UserLockPolicy("my-user-lock-policy", {
    name: "my-user-lock-policy",
    enabled: true,
    loginAttempts: 10,
});
Copy
import pulumi
import pulumi_artifactory as artifactory

my_user_lock_policy = artifactory.UserLockPolicy("my-user-lock-policy",
    name="my-user-lock-policy",
    enabled=True,
    login_attempts=10)
Copy
package main

import (
	"github.com/pulumi/pulumi-artifactory/sdk/v8/go/artifactory"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := artifactory.NewUserLockPolicy(ctx, "my-user-lock-policy", &artifactory.UserLockPolicyArgs{
			Name:          pulumi.String("my-user-lock-policy"),
			Enabled:       pulumi.Bool(true),
			LoginAttempts: pulumi.Int(10),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Artifactory = Pulumi.Artifactory;

return await Deployment.RunAsync(() => 
{
    var my_user_lock_policy = new Artifactory.UserLockPolicy("my-user-lock-policy", new()
    {
        Name = "my-user-lock-policy",
        Enabled = true,
        LoginAttempts = 10,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.artifactory.UserLockPolicy;
import com.pulumi.artifactory.UserLockPolicyArgs;
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 my_user_lock_policy = new UserLockPolicy("my-user-lock-policy", UserLockPolicyArgs.builder()
            .name("my-user-lock-policy")
            .enabled(true)
            .loginAttempts(10)
            .build());

    }
}
Copy
resources:
  my-user-lock-policy:
    type: artifactory:UserLockPolicy
    properties:
      name: my-user-lock-policy
      enabled: true
      loginAttempts: 10
Copy

Create UserLockPolicy Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new UserLockPolicy(name: string, args: UserLockPolicyArgs, opts?: CustomResourceOptions);
@overload
def UserLockPolicy(resource_name: str,
                   args: UserLockPolicyArgs,
                   opts: Optional[ResourceOptions] = None)

@overload
def UserLockPolicy(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   enabled: Optional[bool] = None,
                   login_attempts: Optional[int] = None,
                   name: Optional[str] = None)
func NewUserLockPolicy(ctx *Context, name string, args UserLockPolicyArgs, opts ...ResourceOption) (*UserLockPolicy, error)
public UserLockPolicy(string name, UserLockPolicyArgs args, CustomResourceOptions? opts = null)
public UserLockPolicy(String name, UserLockPolicyArgs args)
public UserLockPolicy(String name, UserLockPolicyArgs args, CustomResourceOptions options)
type: artifactory:UserLockPolicy
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. UserLockPolicyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. UserLockPolicyArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. UserLockPolicyArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. UserLockPolicyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. UserLockPolicyArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var userLockPolicyResource = new Artifactory.UserLockPolicy("userLockPolicyResource", new()
{
    Enabled = false,
    LoginAttempts = 0,
    Name = "string",
});
Copy
example, err := artifactory.NewUserLockPolicy(ctx, "userLockPolicyResource", &artifactory.UserLockPolicyArgs{
	Enabled:       pulumi.Bool(false),
	LoginAttempts: pulumi.Int(0),
	Name:          pulumi.String("string"),
})
Copy
var userLockPolicyResource = new UserLockPolicy("userLockPolicyResource", UserLockPolicyArgs.builder()
    .enabled(false)
    .loginAttempts(0)
    .name("string")
    .build());
Copy
user_lock_policy_resource = artifactory.UserLockPolicy("userLockPolicyResource",
    enabled=False,
    login_attempts=0,
    name="string")
Copy
const userLockPolicyResource = new artifactory.UserLockPolicy("userLockPolicyResource", {
    enabled: false,
    loginAttempts: 0,
    name: "string",
});
Copy
type: artifactory:UserLockPolicy
properties:
    enabled: false
    loginAttempts: 0
    name: string
Copy

UserLockPolicy Resource Properties

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

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The UserLockPolicy resource accepts the following input properties:

Enabled This property is required. bool
Enable User Lock Policy. Lock user after exceeding max failed login attempts.
LoginAttempts This property is required. int
Max failed login attempts.
Name string
Name of the resource. Only used for importing.
Enabled This property is required. bool
Enable User Lock Policy. Lock user after exceeding max failed login attempts.
LoginAttempts This property is required. int
Max failed login attempts.
Name string
Name of the resource. Only used for importing.
enabled This property is required. Boolean
Enable User Lock Policy. Lock user after exceeding max failed login attempts.
loginAttempts This property is required. Integer
Max failed login attempts.
name String
Name of the resource. Only used for importing.
enabled This property is required. boolean
Enable User Lock Policy. Lock user after exceeding max failed login attempts.
loginAttempts This property is required. number
Max failed login attempts.
name string
Name of the resource. Only used for importing.
enabled This property is required. bool
Enable User Lock Policy. Lock user after exceeding max failed login attempts.
login_attempts This property is required. int
Max failed login attempts.
name str
Name of the resource. Only used for importing.
enabled This property is required. Boolean
Enable User Lock Policy. Lock user after exceeding max failed login attempts.
loginAttempts This property is required. Number
Max failed login attempts.
name String
Name of the resource. Only used for importing.

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing UserLockPolicy Resource

Get an existing UserLockPolicy resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: UserLockPolicyState, opts?: CustomResourceOptions): UserLockPolicy
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        enabled: Optional[bool] = None,
        login_attempts: Optional[int] = None,
        name: Optional[str] = None) -> UserLockPolicy
func GetUserLockPolicy(ctx *Context, name string, id IDInput, state *UserLockPolicyState, opts ...ResourceOption) (*UserLockPolicy, error)
public static UserLockPolicy Get(string name, Input<string> id, UserLockPolicyState? state, CustomResourceOptions? opts = null)
public static UserLockPolicy get(String name, Output<String> id, UserLockPolicyState state, CustomResourceOptions options)
resources:  _:    type: artifactory:UserLockPolicy    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
Enabled bool
Enable User Lock Policy. Lock user after exceeding max failed login attempts.
LoginAttempts int
Max failed login attempts.
Name string
Name of the resource. Only used for importing.
Enabled bool
Enable User Lock Policy. Lock user after exceeding max failed login attempts.
LoginAttempts int
Max failed login attempts.
Name string
Name of the resource. Only used for importing.
enabled Boolean
Enable User Lock Policy. Lock user after exceeding max failed login attempts.
loginAttempts Integer
Max failed login attempts.
name String
Name of the resource. Only used for importing.
enabled boolean
Enable User Lock Policy. Lock user after exceeding max failed login attempts.
loginAttempts number
Max failed login attempts.
name string
Name of the resource. Only used for importing.
enabled bool
Enable User Lock Policy. Lock user after exceeding max failed login attempts.
login_attempts int
Max failed login attempts.
name str
Name of the resource. Only used for importing.
enabled Boolean
Enable User Lock Policy. Lock user after exceeding max failed login attempts.
loginAttempts Number
Max failed login attempts.
name String
Name of the resource. Only used for importing.

Import

$ pulumi import artifactory:index/userLockPolicy:UserLockPolicy my-user-lock-policy my-user-lock-policy
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
artifactory pulumi/pulumi-artifactory
License
Apache-2.0
Notes
This Pulumi package is based on the artifactory Terraform Provider.