nexus.SecurityUserToken
Explore with Pulumi AI
PRO Feature
Use this resource to manage the global configuration for the user-tokens.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as nexus from "@pulumi/nexus";
const nexus = new nexus.SecurityUserToken("nexus", {
enabled: true,
protectContent: false,
});
import pulumi
import pulumi_nexus as nexus
nexus = nexus.SecurityUserToken("nexus",
enabled=True,
protect_content=False)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/nexus/v2/nexus"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := nexus.NewSecurityUserToken(ctx, "nexus", &nexus.SecurityUserTokenArgs{
Enabled: pulumi.Bool(true),
ProtectContent: pulumi.Bool(false),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Nexus = Pulumi.Nexus;
return await Deployment.RunAsync(() =>
{
var nexus = new Nexus.SecurityUserToken("nexus", new()
{
Enabled = true,
ProtectContent = false,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.nexus.SecurityUserToken;
import com.pulumi.nexus.SecurityUserTokenArgs;
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 nexus = new SecurityUserToken("nexus", SecurityUserTokenArgs.builder()
.enabled(true)
.protectContent(false)
.build());
}
}
resources:
nexus:
type: nexus:SecurityUserToken
properties:
enabled: true
protectContent: false
Create SecurityUserToken Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new SecurityUserToken(name: string, args: SecurityUserTokenArgs, opts?: CustomResourceOptions);
@overload
def SecurityUserToken(resource_name: str,
args: SecurityUserTokenArgs,
opts: Optional[ResourceOptions] = None)
@overload
def SecurityUserToken(resource_name: str,
opts: Optional[ResourceOptions] = None,
enabled: Optional[bool] = None,
expiration_days: Optional[float] = None,
expiration_enabled: Optional[bool] = None,
protect_content: Optional[bool] = None)
func NewSecurityUserToken(ctx *Context, name string, args SecurityUserTokenArgs, opts ...ResourceOption) (*SecurityUserToken, error)
public SecurityUserToken(string name, SecurityUserTokenArgs args, CustomResourceOptions? opts = null)
public SecurityUserToken(String name, SecurityUserTokenArgs args)
public SecurityUserToken(String name, SecurityUserTokenArgs args, CustomResourceOptions options)
type: nexus:SecurityUserToken
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 SecurityUserTokenArgs
- 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 SecurityUserTokenArgs
- 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 SecurityUserTokenArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SecurityUserTokenArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SecurityUserTokenArgs
- 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 securityUserTokenResource = new Nexus.SecurityUserToken("securityUserTokenResource", new()
{
Enabled = false,
ExpirationDays = 0,
ExpirationEnabled = false,
ProtectContent = false,
});
example, err := nexus.NewSecurityUserToken(ctx, "securityUserTokenResource", &nexus.SecurityUserTokenArgs{
Enabled: pulumi.Bool(false),
ExpirationDays: pulumi.Float64(0),
ExpirationEnabled: pulumi.Bool(false),
ProtectContent: pulumi.Bool(false),
})
var securityUserTokenResource = new SecurityUserToken("securityUserTokenResource", SecurityUserTokenArgs.builder()
.enabled(false)
.expirationDays(0)
.expirationEnabled(false)
.protectContent(false)
.build());
security_user_token_resource = nexus.SecurityUserToken("securityUserTokenResource",
enabled=False,
expiration_days=0,
expiration_enabled=False,
protect_content=False)
const securityUserTokenResource = new nexus.SecurityUserToken("securityUserTokenResource", {
enabled: false,
expirationDays: 0,
expirationEnabled: false,
protectContent: false,
});
type: nexus:SecurityUserToken
properties:
enabled: false
expirationDays: 0
expirationEnabled: false
protectContent: false
SecurityUserToken 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 SecurityUserToken resource accepts the following input properties:
- Enabled bool
- Activate the feature of user tokens.
- Expiration
Days double - Number of days for which you want user tokens to remain valid.
- Expiration
Enabled bool - Set user tokens expiration.
- Protect
Content bool - Require user tokens for repository authentication. This does not effect UI access.
- Enabled bool
- Activate the feature of user tokens.
- Expiration
Days float64 - Number of days for which you want user tokens to remain valid.
- Expiration
Enabled bool - Set user tokens expiration.
- Protect
Content bool - Require user tokens for repository authentication. This does not effect UI access.
- enabled Boolean
- Activate the feature of user tokens.
- expiration
Days Double - Number of days for which you want user tokens to remain valid.
- expiration
Enabled Boolean - Set user tokens expiration.
- protect
Content Boolean - Require user tokens for repository authentication. This does not effect UI access.
- enabled boolean
- Activate the feature of user tokens.
- expiration
Days number - Number of days for which you want user tokens to remain valid.
- expiration
Enabled boolean - Set user tokens expiration.
- protect
Content boolean - Require user tokens for repository authentication. This does not effect UI access.
- enabled bool
- Activate the feature of user tokens.
- expiration_
days float - Number of days for which you want user tokens to remain valid.
- expiration_
enabled bool - Set user tokens expiration.
- protect_
content bool - Require user tokens for repository authentication. This does not effect UI access.
- enabled Boolean
- Activate the feature of user tokens.
- expiration
Days Number - Number of days for which you want user tokens to remain valid.
- expiration
Enabled Boolean - Set user tokens expiration.
- protect
Content Boolean - Require user tokens for repository authentication. This does not effect UI access.
Outputs
All input properties are implicitly available as output properties. Additionally, the SecurityUserToken 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 SecurityUserToken Resource
Get an existing SecurityUserToken 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?: SecurityUserTokenState, opts?: CustomResourceOptions): SecurityUserToken
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
enabled: Optional[bool] = None,
expiration_days: Optional[float] = None,
expiration_enabled: Optional[bool] = None,
protect_content: Optional[bool] = None) -> SecurityUserToken
func GetSecurityUserToken(ctx *Context, name string, id IDInput, state *SecurityUserTokenState, opts ...ResourceOption) (*SecurityUserToken, error)
public static SecurityUserToken Get(string name, Input<string> id, SecurityUserTokenState? state, CustomResourceOptions? opts = null)
public static SecurityUserToken get(String name, Output<String> id, SecurityUserTokenState state, CustomResourceOptions options)
resources: _: type: nexus:SecurityUserToken get: id: ${id}
- 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
- Activate the feature of user tokens.
- Expiration
Days double - Number of days for which you want user tokens to remain valid.
- Expiration
Enabled bool - Set user tokens expiration.
- Protect
Content bool - Require user tokens for repository authentication. This does not effect UI access.
- Enabled bool
- Activate the feature of user tokens.
- Expiration
Days float64 - Number of days for which you want user tokens to remain valid.
- Expiration
Enabled bool - Set user tokens expiration.
- Protect
Content bool - Require user tokens for repository authentication. This does not effect UI access.
- enabled Boolean
- Activate the feature of user tokens.
- expiration
Days Double - Number of days for which you want user tokens to remain valid.
- expiration
Enabled Boolean - Set user tokens expiration.
- protect
Content Boolean - Require user tokens for repository authentication. This does not effect UI access.
- enabled boolean
- Activate the feature of user tokens.
- expiration
Days number - Number of days for which you want user tokens to remain valid.
- expiration
Enabled boolean - Set user tokens expiration.
- protect
Content boolean - Require user tokens for repository authentication. This does not effect UI access.
- enabled bool
- Activate the feature of user tokens.
- expiration_
days float - Number of days for which you want user tokens to remain valid.
- expiration_
enabled bool - Set user tokens expiration.
- protect_
content bool - Require user tokens for repository authentication. This does not effect UI access.
- enabled Boolean
- Activate the feature of user tokens.
- expiration
Days Number - Number of days for which you want user tokens to remain valid.
- expiration
Enabled Boolean - Set user tokens expiration.
- protect
Content Boolean - Require user tokens for repository authentication. This does not effect UI access.
Import
import of the global user token configuration
$ pulumi import nexus:index/securityUserToken:SecurityUserToken nexus golbalUserTokenConfiguration
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- nexus datadrivers/terraform-provider-nexus
- License
- Notes
- This Pulumi package is based on the
nexus
Terraform Provider.