artifactory.AccessToken
Import
Artifactory does not retain access tokens and cannot be imported into state.
Create AccessToken Resource
new AccessToken(name: string, args: AccessTokenArgs, opts?: CustomResourceOptions);
@overload
def AccessToken(resource_name: str,
opts: Optional[ResourceOptions] = None,
admin_token: Optional[AccessTokenAdminTokenArgs] = None,
audience: Optional[str] = None,
end_date: Optional[str] = None,
end_date_relative: Optional[str] = None,
groups: Optional[Sequence[str]] = None,
refreshable: Optional[bool] = None,
username: Optional[str] = None)
@overload
def AccessToken(resource_name: str,
args: AccessTokenArgs,
opts: Optional[ResourceOptions] = None)
func NewAccessToken(ctx *Context, name string, args AccessTokenArgs, opts ...ResourceOption) (*AccessToken, error)
public AccessToken(string name, AccessTokenArgs args, CustomResourceOptions? opts = null)
public AccessToken(String name, AccessTokenArgs args)
public AccessToken(String name, AccessTokenArgs args, CustomResourceOptions options)
type: artifactory:AccessToken
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AccessTokenArgs
- 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 AccessTokenArgs
- 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 AccessTokenArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AccessTokenArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AccessTokenArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
AccessToken Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The AccessToken resource accepts the following input properties:
- Username string
(Required) The username or subject for the token. A non-admin can only specify their own username. Admins can specify any existing username, or a new name for a temporary token. Temporary tokens require
groups
to be set.- Admin
Token AccessToken Admin Token Args (Optional) Specify the
instance_id
in this block to grant this token admin privileges. This can only be created when the authenticated user is an admin.admin_token
cannot be specified withgroups
.- Audience string
(Optional) A space-separate list of the other Artifactory instances or services that should accept this token identified by their Artifactory Service IDs. You may set
"jfrt@*"
so the token to be accepted by all Artifactory instances.- End
Date string (Optional) The end date which the token is valid until, formatted as a RFC3339 date string (e.g.
2018-01-01T01:02:03Z
).- End
Date stringRelative (Optional) A relative duration for which the token is valid until, for example
240h
(10 days) or2400h30m
. Valid time units are "s", "m", "h".- Groups List<string>
(Optional) List of groups. The token is granted access based on the permissions of the groups. Specify
["*"]
for all groups that the user belongs to.groups
cannot be specified withadmin_token
.- Refreshable bool
(Optional) Is this token refreshable? Defaults to
false
- Username string
(Required) The username or subject for the token. A non-admin can only specify their own username. Admins can specify any existing username, or a new name for a temporary token. Temporary tokens require
groups
to be set.- Admin
Token AccessToken Admin Token Args (Optional) Specify the
instance_id
in this block to grant this token admin privileges. This can only be created when the authenticated user is an admin.admin_token
cannot be specified withgroups
.- Audience string
(Optional) A space-separate list of the other Artifactory instances or services that should accept this token identified by their Artifactory Service IDs. You may set
"jfrt@*"
so the token to be accepted by all Artifactory instances.- End
Date string (Optional) The end date which the token is valid until, formatted as a RFC3339 date string (e.g.
2018-01-01T01:02:03Z
).- End
Date stringRelative (Optional) A relative duration for which the token is valid until, for example
240h
(10 days) or2400h30m
. Valid time units are "s", "m", "h".- Groups []string
(Optional) List of groups. The token is granted access based on the permissions of the groups. Specify
["*"]
for all groups that the user belongs to.groups
cannot be specified withadmin_token
.- Refreshable bool
(Optional) Is this token refreshable? Defaults to
false
- username String
(Required) The username or subject for the token. A non-admin can only specify their own username. Admins can specify any existing username, or a new name for a temporary token. Temporary tokens require
groups
to be set.- admin
Token AccessToken Admin Token Args (Optional) Specify the
instance_id
in this block to grant this token admin privileges. This can only be created when the authenticated user is an admin.admin_token
cannot be specified withgroups
.- audience String
(Optional) A space-separate list of the other Artifactory instances or services that should accept this token identified by their Artifactory Service IDs. You may set
"jfrt@*"
so the token to be accepted by all Artifactory instances.- end
Date String (Optional) The end date which the token is valid until, formatted as a RFC3339 date string (e.g.
2018-01-01T01:02:03Z
).- end
Date StringRelative (Optional) A relative duration for which the token is valid until, for example
240h
(10 days) or2400h30m
. Valid time units are "s", "m", "h".- groups List<String>
(Optional) List of groups. The token is granted access based on the permissions of the groups. Specify
["*"]
for all groups that the user belongs to.groups
cannot be specified withadmin_token
.- refreshable Boolean
(Optional) Is this token refreshable? Defaults to
false
- username string
(Required) The username or subject for the token. A non-admin can only specify their own username. Admins can specify any existing username, or a new name for a temporary token. Temporary tokens require
groups
to be set.- admin
Token AccessToken Admin Token Args (Optional) Specify the
instance_id
in this block to grant this token admin privileges. This can only be created when the authenticated user is an admin.admin_token
cannot be specified withgroups
.- audience string
(Optional) A space-separate list of the other Artifactory instances or services that should accept this token identified by their Artifactory Service IDs. You may set
"jfrt@*"
so the token to be accepted by all Artifactory instances.- end
Date string (Optional) The end date which the token is valid until, formatted as a RFC3339 date string (e.g.
2018-01-01T01:02:03Z
).- end
Date stringRelative (Optional) A relative duration for which the token is valid until, for example
240h
(10 days) or2400h30m
. Valid time units are "s", "m", "h".- groups string[]
(Optional) List of groups. The token is granted access based on the permissions of the groups. Specify
["*"]
for all groups that the user belongs to.groups
cannot be specified withadmin_token
.- refreshable boolean
(Optional) Is this token refreshable? Defaults to
false
- username str
(Required) The username or subject for the token. A non-admin can only specify their own username. Admins can specify any existing username, or a new name for a temporary token. Temporary tokens require
groups
to be set.- admin_
token AccessToken Admin Token Args (Optional) Specify the
instance_id
in this block to grant this token admin privileges. This can only be created when the authenticated user is an admin.admin_token
cannot be specified withgroups
.- audience str
(Optional) A space-separate list of the other Artifactory instances or services that should accept this token identified by their Artifactory Service IDs. You may set
"jfrt@*"
so the token to be accepted by all Artifactory instances.- end_
date str (Optional) The end date which the token is valid until, formatted as a RFC3339 date string (e.g.
2018-01-01T01:02:03Z
).- end_
date_ strrelative (Optional) A relative duration for which the token is valid until, for example
240h
(10 days) or2400h30m
. Valid time units are "s", "m", "h".- groups Sequence[str]
(Optional) List of groups. The token is granted access based on the permissions of the groups. Specify
["*"]
for all groups that the user belongs to.groups
cannot be specified withadmin_token
.- refreshable bool
(Optional) Is this token refreshable? Defaults to
false
- username String
(Required) The username or subject for the token. A non-admin can only specify their own username. Admins can specify any existing username, or a new name for a temporary token. Temporary tokens require
groups
to be set.- admin
Token Property Map (Optional) Specify the
instance_id
in this block to grant this token admin privileges. This can only be created when the authenticated user is an admin.admin_token
cannot be specified withgroups
.- audience String
(Optional) A space-separate list of the other Artifactory instances or services that should accept this token identified by their Artifactory Service IDs. You may set
"jfrt@*"
so the token to be accepted by all Artifactory instances.- end
Date String (Optional) The end date which the token is valid until, formatted as a RFC3339 date string (e.g.
2018-01-01T01:02:03Z
).- end
Date StringRelative (Optional) A relative duration for which the token is valid until, for example
240h
(10 days) or2400h30m
. Valid time units are "s", "m", "h".- groups List<String>
(Optional) List of groups. The token is granted access based on the permissions of the groups. Specify
["*"]
for all groups that the user belongs to.groups
cannot be specified withadmin_token
.- refreshable Boolean
(Optional) Is this token refreshable? Defaults to
false
Outputs
All input properties are implicitly available as output properties. Additionally, the AccessToken resource produces the following output properties:
- Details string
Returns the access token to authenciate to Artifactory
- Id string
The provider-assigned unique ID for this managed resource.
- Refresh
Token string Returns the refresh token when
refreshable
is true, or an empty string whenrefreshable
is false.
- Access
Token string Returns the access token to authenciate to Artifactory
- Id string
The provider-assigned unique ID for this managed resource.
- Refresh
Token string Returns the refresh token when
refreshable
is true, or an empty string whenrefreshable
is false.
- access
Token String Returns the access token to authenciate to Artifactory
- id String
The provider-assigned unique ID for this managed resource.
- refresh
Token String Returns the refresh token when
refreshable
is true, or an empty string whenrefreshable
is false.
- access
Token string Returns the access token to authenciate to Artifactory
- id string
The provider-assigned unique ID for this managed resource.
- refresh
Token string Returns the refresh token when
refreshable
is true, or an empty string whenrefreshable
is false.
- access_
token str Returns the access token to authenciate to Artifactory
- id str
The provider-assigned unique ID for this managed resource.
- refresh_
token str Returns the refresh token when
refreshable
is true, or an empty string whenrefreshable
is false.
- access
Token String Returns the access token to authenciate to Artifactory
- id String
The provider-assigned unique ID for this managed resource.
- refresh
Token String Returns the refresh token when
refreshable
is true, or an empty string whenrefreshable
is false.
Look up Existing AccessToken Resource
Get an existing AccessToken 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?: AccessTokenState, opts?: CustomResourceOptions): AccessToken
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
access_token: Optional[str] = None,
admin_token: Optional[AccessTokenAdminTokenArgs] = None,
audience: Optional[str] = None,
end_date: Optional[str] = None,
end_date_relative: Optional[str] = None,
groups: Optional[Sequence[str]] = None,
refresh_token: Optional[str] = None,
refreshable: Optional[bool] = None,
username: Optional[str] = None) -> AccessToken
func GetAccessToken(ctx *Context, name string, id IDInput, state *AccessTokenState, opts ...ResourceOption) (*AccessToken, error)
public static AccessToken Get(string name, Input<string> id, AccessTokenState? state, CustomResourceOptions? opts = null)
public static AccessToken get(String name, Output<String> id, AccessTokenState 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.
- Admin
Token AccessToken Admin Token Args (Optional) Specify the
instance_id
in this block to grant this token admin privileges. This can only be created when the authenticated user is an admin.admin_token
cannot be specified withgroups
.- Audience string
(Optional) A space-separate list of the other Artifactory instances or services that should accept this token identified by their Artifactory Service IDs. You may set
"jfrt@*"
so the token to be accepted by all Artifactory instances.- Details string
Returns the access token to authenciate to Artifactory
- End
Date string (Optional) The end date which the token is valid until, formatted as a RFC3339 date string (e.g.
2018-01-01T01:02:03Z
).- End
Date stringRelative (Optional) A relative duration for which the token is valid until, for example
240h
(10 days) or2400h30m
. Valid time units are "s", "m", "h".- Groups List<string>
(Optional) List of groups. The token is granted access based on the permissions of the groups. Specify
["*"]
for all groups that the user belongs to.groups
cannot be specified withadmin_token
.- Refresh
Token string Returns the refresh token when
refreshable
is true, or an empty string whenrefreshable
is false.- Refreshable bool
(Optional) Is this token refreshable? Defaults to
false
- Username string
(Required) The username or subject for the token. A non-admin can only specify their own username. Admins can specify any existing username, or a new name for a temporary token. Temporary tokens require
groups
to be set.
- Access
Token string Returns the access token to authenciate to Artifactory
- Admin
Token AccessToken Admin Token Args (Optional) Specify the
instance_id
in this block to grant this token admin privileges. This can only be created when the authenticated user is an admin.admin_token
cannot be specified withgroups
.- Audience string
(Optional) A space-separate list of the other Artifactory instances or services that should accept this token identified by their Artifactory Service IDs. You may set
"jfrt@*"
so the token to be accepted by all Artifactory instances.- End
Date string (Optional) The end date which the token is valid until, formatted as a RFC3339 date string (e.g.
2018-01-01T01:02:03Z
).- End
Date stringRelative (Optional) A relative duration for which the token is valid until, for example
240h
(10 days) or2400h30m
. Valid time units are "s", "m", "h".- Groups []string
(Optional) List of groups. The token is granted access based on the permissions of the groups. Specify
["*"]
for all groups that the user belongs to.groups
cannot be specified withadmin_token
.- Refresh
Token string Returns the refresh token when
refreshable
is true, or an empty string whenrefreshable
is false.- Refreshable bool
(Optional) Is this token refreshable? Defaults to
false
- Username string
(Required) The username or subject for the token. A non-admin can only specify their own username. Admins can specify any existing username, or a new name for a temporary token. Temporary tokens require
groups
to be set.
- access
Token String Returns the access token to authenciate to Artifactory
- admin
Token AccessToken Admin Token Args (Optional) Specify the
instance_id
in this block to grant this token admin privileges. This can only be created when the authenticated user is an admin.admin_token
cannot be specified withgroups
.- audience String
(Optional) A space-separate list of the other Artifactory instances or services that should accept this token identified by their Artifactory Service IDs. You may set
"jfrt@*"
so the token to be accepted by all Artifactory instances.- end
Date String (Optional) The end date which the token is valid until, formatted as a RFC3339 date string (e.g.
2018-01-01T01:02:03Z
).- end
Date StringRelative (Optional) A relative duration for which the token is valid until, for example
240h
(10 days) or2400h30m
. Valid time units are "s", "m", "h".- groups List<String>
(Optional) List of groups. The token is granted access based on the permissions of the groups. Specify
["*"]
for all groups that the user belongs to.groups
cannot be specified withadmin_token
.- refresh
Token String Returns the refresh token when
refreshable
is true, or an empty string whenrefreshable
is false.- refreshable Boolean
(Optional) Is this token refreshable? Defaults to
false
- username String
(Required) The username or subject for the token. A non-admin can only specify their own username. Admins can specify any existing username, or a new name for a temporary token. Temporary tokens require
groups
to be set.
- access
Token string Returns the access token to authenciate to Artifactory
- admin
Token AccessToken Admin Token Args (Optional) Specify the
instance_id
in this block to grant this token admin privileges. This can only be created when the authenticated user is an admin.admin_token
cannot be specified withgroups
.- audience string
(Optional) A space-separate list of the other Artifactory instances or services that should accept this token identified by their Artifactory Service IDs. You may set
"jfrt@*"
so the token to be accepted by all Artifactory instances.- end
Date string (Optional) The end date which the token is valid until, formatted as a RFC3339 date string (e.g.
2018-01-01T01:02:03Z
).- end
Date stringRelative (Optional) A relative duration for which the token is valid until, for example
240h
(10 days) or2400h30m
. Valid time units are "s", "m", "h".- groups string[]
(Optional) List of groups. The token is granted access based on the permissions of the groups. Specify
["*"]
for all groups that the user belongs to.groups
cannot be specified withadmin_token
.- refresh
Token string Returns the refresh token when
refreshable
is true, or an empty string whenrefreshable
is false.- refreshable boolean
(Optional) Is this token refreshable? Defaults to
false
- username string
(Required) The username or subject for the token. A non-admin can only specify their own username. Admins can specify any existing username, or a new name for a temporary token. Temporary tokens require
groups
to be set.
- access_
token str Returns the access token to authenciate to Artifactory
- admin_
token AccessToken Admin Token Args (Optional) Specify the
instance_id
in this block to grant this token admin privileges. This can only be created when the authenticated user is an admin.admin_token
cannot be specified withgroups
.- audience str
(Optional) A space-separate list of the other Artifactory instances or services that should accept this token identified by their Artifactory Service IDs. You may set
"jfrt@*"
so the token to be accepted by all Artifactory instances.- end_
date str (Optional) The end date which the token is valid until, formatted as a RFC3339 date string (e.g.
2018-01-01T01:02:03Z
).- end_
date_ strrelative (Optional) A relative duration for which the token is valid until, for example
240h
(10 days) or2400h30m
. Valid time units are "s", "m", "h".- groups Sequence[str]
(Optional) List of groups. The token is granted access based on the permissions of the groups. Specify
["*"]
for all groups that the user belongs to.groups
cannot be specified withadmin_token
.- refresh_
token str Returns the refresh token when
refreshable
is true, or an empty string whenrefreshable
is false.- refreshable bool
(Optional) Is this token refreshable? Defaults to
false
- username str
(Required) The username or subject for the token. A non-admin can only specify their own username. Admins can specify any existing username, or a new name for a temporary token. Temporary tokens require
groups
to be set.
- access
Token String Returns the access token to authenciate to Artifactory
- admin
Token Property Map (Optional) Specify the
instance_id
in this block to grant this token admin privileges. This can only be created when the authenticated user is an admin.admin_token
cannot be specified withgroups
.- audience String
(Optional) A space-separate list of the other Artifactory instances or services that should accept this token identified by their Artifactory Service IDs. You may set
"jfrt@*"
so the token to be accepted by all Artifactory instances.- end
Date String (Optional) The end date which the token is valid until, formatted as a RFC3339 date string (e.g.
2018-01-01T01:02:03Z
).- end
Date StringRelative (Optional) A relative duration for which the token is valid until, for example
240h
(10 days) or2400h30m
. Valid time units are "s", "m", "h".- groups List<String>
(Optional) List of groups. The token is granted access based on the permissions of the groups. Specify
["*"]
for all groups that the user belongs to.groups
cannot be specified withadmin_token
.- refresh
Token String Returns the refresh token when
refreshable
is true, or an empty string whenrefreshable
is false.- refreshable Boolean
(Optional) Is this token refreshable? Defaults to
false
- username String
(Required) The username or subject for the token. A non-admin can only specify their own username. Admins can specify any existing username, or a new name for a temporary token. Temporary tokens require
groups
to be set.
Supporting Types
AccessTokenAdminToken
- Instance
Id string
- Instance
Id string
- instance
Id String
- instance
Id string
- instance_
id str
- instance
Id String
Package Details
- Repository
- artifactory pulumi/pulumi-artifactory
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
artifactory
Terraform Provider.