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,
});
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)
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
})
}
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,
});
});
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());
}
}
resources:
my-user-lock-policy:
type: artifactory:UserLockPolicy
properties:
name: my-user-lock-policy
enabled: true
loginAttempts: 10
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 string
- The unique name of the resource.
- args UserLockPolicyArgs
- 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 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 string
- The unique name of the resource.
- args UserLockPolicyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args UserLockPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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",
});
example, err := artifactory.NewUserLockPolicy(ctx, "userLockPolicyResource", &artifactory.UserLockPolicyArgs{
Enabled: pulumi.Bool(false),
LoginAttempts: pulumi.Int(0),
Name: pulumi.String("string"),
})
var userLockPolicyResource = new UserLockPolicy("userLockPolicyResource", UserLockPolicyArgs.builder()
.enabled(false)
.loginAttempts(0)
.name("string")
.build());
user_lock_policy_resource = artifactory.UserLockPolicy("userLockPolicyResource",
enabled=False,
login_attempts=0,
name="string")
const userLockPolicyResource = new artifactory.UserLockPolicy("userLockPolicyResource", {
enabled: false,
loginAttempts: 0,
name: "string",
});
type: artifactory:UserLockPolicy
properties:
enabled: false
loginAttempts: 0
name: string
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 bool
- Enable User Lock Policy. Lock user after exceeding max failed login attempts.
- Login
Attempts 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.
- Login
Attempts 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.
- login
Attempts 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.
- login
Attempts 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.
- login
Attempts 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)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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.
- Enabled bool
- Enable User Lock Policy. Lock user after exceeding max failed login attempts.
- Login
Attempts 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.
- Login
Attempts 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.
- login
Attempts 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.
- login
Attempts 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.
- login
Attempts 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
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.