artifactory.PasswordExpirationPolicy
Explore with Pulumi AI
Provides an Artifactory Password Expiration Policy resource.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as artifactory from "@pulumi/artifactory";
const my_password_expiration_policy = new artifactory.PasswordExpirationPolicy("my-password-expiration-policy", {
name: "my-password-expiration-policy",
enabled: true,
passwordMaxAge: 120,
notifyByEmail: true,
});
import pulumi
import pulumi_artifactory as artifactory
my_password_expiration_policy = artifactory.PasswordExpirationPolicy("my-password-expiration-policy",
name="my-password-expiration-policy",
enabled=True,
password_max_age=120,
notify_by_email=True)
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.NewPasswordExpirationPolicy(ctx, "my-password-expiration-policy", &artifactory.PasswordExpirationPolicyArgs{
Name: pulumi.String("my-password-expiration-policy"),
Enabled: pulumi.Bool(true),
PasswordMaxAge: pulumi.Int(120),
NotifyByEmail: pulumi.Bool(true),
})
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_password_expiration_policy = new Artifactory.PasswordExpirationPolicy("my-password-expiration-policy", new()
{
Name = "my-password-expiration-policy",
Enabled = true,
PasswordMaxAge = 120,
NotifyByEmail = true,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.artifactory.PasswordExpirationPolicy;
import com.pulumi.artifactory.PasswordExpirationPolicyArgs;
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_password_expiration_policy = new PasswordExpirationPolicy("my-password-expiration-policy", PasswordExpirationPolicyArgs.builder()
.name("my-password-expiration-policy")
.enabled(true)
.passwordMaxAge(120)
.notifyByEmail(true)
.build());
}
}
resources:
my-password-expiration-policy:
type: artifactory:PasswordExpirationPolicy
properties:
name: my-password-expiration-policy
enabled: true
passwordMaxAge: 120
notifyByEmail: true
Create PasswordExpirationPolicy Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new PasswordExpirationPolicy(name: string, args: PasswordExpirationPolicyArgs, opts?: CustomResourceOptions);
@overload
def PasswordExpirationPolicy(resource_name: str,
args: PasswordExpirationPolicyArgs,
opts: Optional[ResourceOptions] = None)
@overload
def PasswordExpirationPolicy(resource_name: str,
opts: Optional[ResourceOptions] = None,
enabled: Optional[bool] = None,
notify_by_email: Optional[bool] = None,
password_max_age: Optional[int] = None,
name: Optional[str] = None)
func NewPasswordExpirationPolicy(ctx *Context, name string, args PasswordExpirationPolicyArgs, opts ...ResourceOption) (*PasswordExpirationPolicy, error)
public PasswordExpirationPolicy(string name, PasswordExpirationPolicyArgs args, CustomResourceOptions? opts = null)
public PasswordExpirationPolicy(String name, PasswordExpirationPolicyArgs args)
public PasswordExpirationPolicy(String name, PasswordExpirationPolicyArgs args, CustomResourceOptions options)
type: artifactory:PasswordExpirationPolicy
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 PasswordExpirationPolicyArgs
- 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 PasswordExpirationPolicyArgs
- 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 PasswordExpirationPolicyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args PasswordExpirationPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args PasswordExpirationPolicyArgs
- 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 passwordExpirationPolicyResource = new Artifactory.PasswordExpirationPolicy("passwordExpirationPolicyResource", new()
{
Enabled = false,
NotifyByEmail = false,
PasswordMaxAge = 0,
Name = "string",
});
example, err := artifactory.NewPasswordExpirationPolicy(ctx, "passwordExpirationPolicyResource", &artifactory.PasswordExpirationPolicyArgs{
Enabled: pulumi.Bool(false),
NotifyByEmail: pulumi.Bool(false),
PasswordMaxAge: pulumi.Int(0),
Name: pulumi.String("string"),
})
var passwordExpirationPolicyResource = new PasswordExpirationPolicy("passwordExpirationPolicyResource", PasswordExpirationPolicyArgs.builder()
.enabled(false)
.notifyByEmail(false)
.passwordMaxAge(0)
.name("string")
.build());
password_expiration_policy_resource = artifactory.PasswordExpirationPolicy("passwordExpirationPolicyResource",
enabled=False,
notify_by_email=False,
password_max_age=0,
name="string")
const passwordExpirationPolicyResource = new artifactory.PasswordExpirationPolicy("passwordExpirationPolicyResource", {
enabled: false,
notifyByEmail: false,
passwordMaxAge: 0,
name: "string",
});
type: artifactory:PasswordExpirationPolicy
properties:
enabled: false
name: string
notifyByEmail: false
passwordMaxAge: 0
PasswordExpirationPolicy 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 PasswordExpirationPolicy resource accepts the following input properties:
- Enabled bool
- Enable Password Expiration Policy. This only applies to internal user passwords.
- Notify
By boolEmail - Send mail notification before password expiration. Users will receive an email notification X days before password will expire. Mail server must be enabled and configured correctly.
- Password
Max intAge - Password expires every N days. The time interval in which users will be obligated to change their password.
- Name string
- Name of the resource. Only used for importing.
- Enabled bool
- Enable Password Expiration Policy. This only applies to internal user passwords.
- Notify
By boolEmail - Send mail notification before password expiration. Users will receive an email notification X days before password will expire. Mail server must be enabled and configured correctly.
- Password
Max intAge - Password expires every N days. The time interval in which users will be obligated to change their password.
- Name string
- Name of the resource. Only used for importing.
- enabled Boolean
- Enable Password Expiration Policy. This only applies to internal user passwords.
- notify
By BooleanEmail - Send mail notification before password expiration. Users will receive an email notification X days before password will expire. Mail server must be enabled and configured correctly.
- password
Max IntegerAge - Password expires every N days. The time interval in which users will be obligated to change their password.
- name String
- Name of the resource. Only used for importing.
- enabled boolean
- Enable Password Expiration Policy. This only applies to internal user passwords.
- notify
By booleanEmail - Send mail notification before password expiration. Users will receive an email notification X days before password will expire. Mail server must be enabled and configured correctly.
- password
Max numberAge - Password expires every N days. The time interval in which users will be obligated to change their password.
- name string
- Name of the resource. Only used for importing.
- enabled bool
- Enable Password Expiration Policy. This only applies to internal user passwords.
- notify_
by_ boolemail - Send mail notification before password expiration. Users will receive an email notification X days before password will expire. Mail server must be enabled and configured correctly.
- password_
max_ intage - Password expires every N days. The time interval in which users will be obligated to change their password.
- name str
- Name of the resource. Only used for importing.
- enabled Boolean
- Enable Password Expiration Policy. This only applies to internal user passwords.
- notify
By BooleanEmail - Send mail notification before password expiration. Users will receive an email notification X days before password will expire. Mail server must be enabled and configured correctly.
- password
Max NumberAge - Password expires every N days. The time interval in which users will be obligated to change their password.
- name String
- Name of the resource. Only used for importing.
Outputs
All input properties are implicitly available as output properties. Additionally, the PasswordExpirationPolicy 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 PasswordExpirationPolicy Resource
Get an existing PasswordExpirationPolicy 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?: PasswordExpirationPolicyState, opts?: CustomResourceOptions): PasswordExpirationPolicy
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
enabled: Optional[bool] = None,
name: Optional[str] = None,
notify_by_email: Optional[bool] = None,
password_max_age: Optional[int] = None) -> PasswordExpirationPolicy
func GetPasswordExpirationPolicy(ctx *Context, name string, id IDInput, state *PasswordExpirationPolicyState, opts ...ResourceOption) (*PasswordExpirationPolicy, error)
public static PasswordExpirationPolicy Get(string name, Input<string> id, PasswordExpirationPolicyState? state, CustomResourceOptions? opts = null)
public static PasswordExpirationPolicy get(String name, Output<String> id, PasswordExpirationPolicyState 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 Password Expiration Policy. This only applies to internal user passwords.
- Name string
- Name of the resource. Only used for importing.
- Notify
By boolEmail - Send mail notification before password expiration. Users will receive an email notification X days before password will expire. Mail server must be enabled and configured correctly.
- Password
Max intAge - Password expires every N days. The time interval in which users will be obligated to change their password.
- Enabled bool
- Enable Password Expiration Policy. This only applies to internal user passwords.
- Name string
- Name of the resource. Only used for importing.
- Notify
By boolEmail - Send mail notification before password expiration. Users will receive an email notification X days before password will expire. Mail server must be enabled and configured correctly.
- Password
Max intAge - Password expires every N days. The time interval in which users will be obligated to change their password.
- enabled Boolean
- Enable Password Expiration Policy. This only applies to internal user passwords.
- name String
- Name of the resource. Only used for importing.
- notify
By BooleanEmail - Send mail notification before password expiration. Users will receive an email notification X days before password will expire. Mail server must be enabled and configured correctly.
- password
Max IntegerAge - Password expires every N days. The time interval in which users will be obligated to change their password.
- enabled boolean
- Enable Password Expiration Policy. This only applies to internal user passwords.
- name string
- Name of the resource. Only used for importing.
- notify
By booleanEmail - Send mail notification before password expiration. Users will receive an email notification X days before password will expire. Mail server must be enabled and configured correctly.
- password
Max numberAge - Password expires every N days. The time interval in which users will be obligated to change their password.
- enabled bool
- Enable Password Expiration Policy. This only applies to internal user passwords.
- name str
- Name of the resource. Only used for importing.
- notify_
by_ boolemail - Send mail notification before password expiration. Users will receive an email notification X days before password will expire. Mail server must be enabled and configured correctly.
- password_
max_ intage - Password expires every N days. The time interval in which users will be obligated to change their password.
- enabled Boolean
- Enable Password Expiration Policy. This only applies to internal user passwords.
- name String
- Name of the resource. Only used for importing.
- notify
By BooleanEmail - Send mail notification before password expiration. Users will receive an email notification X days before password will expire. Mail server must be enabled and configured correctly.
- password
Max NumberAge - Password expires every N days. The time interval in which users will be obligated to change their password.
Import
$ pulumi import artifactory:index/passwordExpirationPolicy:PasswordExpirationPolicy my-password-expiration-policy my-password-expiration-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.