Dynatrace v0.10.0 published on Friday, Jun 7, 2024 by Pulumiverse
dynatrace.ApiToken
Explore with Pulumi AI
Create ApiToken Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ApiToken(name: string, args: ApiTokenArgs, opts?: CustomResourceOptions);
@overload
def ApiToken(resource_name: str,
args: ApiTokenArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ApiToken(resource_name: str,
opts: Optional[ResourceOptions] = None,
scopes: Optional[Sequence[str]] = None,
creation_date: Optional[str] = None,
enabled: Optional[bool] = None,
expiration_date: Optional[str] = None,
last_used_date: Optional[str] = None,
last_used_ip_address: Optional[str] = None,
modified_date: Optional[str] = None,
name: Optional[str] = None,
owner: Optional[str] = None,
personal_access_token: Optional[bool] = None)
func NewApiToken(ctx *Context, name string, args ApiTokenArgs, opts ...ResourceOption) (*ApiToken, error)
public ApiToken(string name, ApiTokenArgs args, CustomResourceOptions? opts = null)
public ApiToken(String name, ApiTokenArgs args)
public ApiToken(String name, ApiTokenArgs args, CustomResourceOptions options)
type: dynatrace:ApiToken
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 ApiTokenArgs
- 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 ApiTokenArgs
- 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 ApiTokenArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ApiTokenArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ApiTokenArgs
- 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 apiTokenResource = new Dynatrace.ApiToken("apiTokenResource", new()
{
Scopes = new[]
{
"string",
},
CreationDate = "string",
Enabled = false,
ExpirationDate = "string",
LastUsedDate = "string",
LastUsedIpAddress = "string",
ModifiedDate = "string",
Name = "string",
Owner = "string",
PersonalAccessToken = false,
});
example, err := dynatrace.NewApiToken(ctx, "apiTokenResource", &dynatrace.ApiTokenArgs{
Scopes: pulumi.StringArray{
pulumi.String("string"),
},
CreationDate: pulumi.String("string"),
Enabled: pulumi.Bool(false),
ExpirationDate: pulumi.String("string"),
LastUsedDate: pulumi.String("string"),
LastUsedIpAddress: pulumi.String("string"),
ModifiedDate: pulumi.String("string"),
Name: pulumi.String("string"),
Owner: pulumi.String("string"),
PersonalAccessToken: pulumi.Bool(false),
})
var apiTokenResource = new ApiToken("apiTokenResource", ApiTokenArgs.builder()
.scopes("string")
.creationDate("string")
.enabled(false)
.expirationDate("string")
.lastUsedDate("string")
.lastUsedIpAddress("string")
.modifiedDate("string")
.name("string")
.owner("string")
.personalAccessToken(false)
.build());
api_token_resource = dynatrace.ApiToken("apiTokenResource",
scopes=["string"],
creation_date="string",
enabled=False,
expiration_date="string",
last_used_date="string",
last_used_ip_address="string",
modified_date="string",
name="string",
owner="string",
personal_access_token=False)
const apiTokenResource = new dynatrace.ApiToken("apiTokenResource", {
scopes: ["string"],
creationDate: "string",
enabled: false,
expirationDate: "string",
lastUsedDate: "string",
lastUsedIpAddress: "string",
modifiedDate: "string",
name: "string",
owner: "string",
personalAccessToken: false,
});
type: dynatrace:ApiToken
properties:
creationDate: string
enabled: false
expirationDate: string
lastUsedDate: string
lastUsedIpAddress: string
modifiedDate: string
name: string
owner: string
personalAccessToken: false
scopes:
- string
ApiToken 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 ApiToken resource accepts the following input properties:
- Scopes List<string>
- A list of the scopes to be assigned to the token.
- Creation
Date string - Token creation date in ISO 8601 format (yyyy-MM-dd'T'HH:mm:ss.SSS'Z')
- Enabled bool
- The token is enabled (true) or disabled (false), default disabled (false).
- Expiration
Date string - The expiration date of the token.
- Last
Used stringDate - Token last used date in ISO 8601 format (yyyy-MM-dd'T'HH:mm:ss.SSS'Z')
- Last
Used stringIp Address - Token last used IP address.
- Modified
Date string - Token last modified date in ISO 8601 format (yyyy-MM-dd'T'HH:mm:ss.SSS'Z').
- Name string
- The name of the token.
- Owner string
- The owner of the token
- Personal
Access boolToken - The token is a personal access token (true) or an API token (false).
- Scopes []string
- A list of the scopes to be assigned to the token.
- Creation
Date string - Token creation date in ISO 8601 format (yyyy-MM-dd'T'HH:mm:ss.SSS'Z')
- Enabled bool
- The token is enabled (true) or disabled (false), default disabled (false).
- Expiration
Date string - The expiration date of the token.
- Last
Used stringDate - Token last used date in ISO 8601 format (yyyy-MM-dd'T'HH:mm:ss.SSS'Z')
- Last
Used stringIp Address - Token last used IP address.
- Modified
Date string - Token last modified date in ISO 8601 format (yyyy-MM-dd'T'HH:mm:ss.SSS'Z').
- Name string
- The name of the token.
- Owner string
- The owner of the token
- Personal
Access boolToken - The token is a personal access token (true) or an API token (false).
- scopes List<String>
- A list of the scopes to be assigned to the token.
- creation
Date String - Token creation date in ISO 8601 format (yyyy-MM-dd'T'HH:mm:ss.SSS'Z')
- enabled Boolean
- The token is enabled (true) or disabled (false), default disabled (false).
- expiration
Date String - The expiration date of the token.
- last
Used StringDate - Token last used date in ISO 8601 format (yyyy-MM-dd'T'HH:mm:ss.SSS'Z')
- last
Used StringIp Address - Token last used IP address.
- modified
Date String - Token last modified date in ISO 8601 format (yyyy-MM-dd'T'HH:mm:ss.SSS'Z').
- name String
- The name of the token.
- owner String
- The owner of the token
- personal
Access BooleanToken - The token is a personal access token (true) or an API token (false).
- scopes string[]
- A list of the scopes to be assigned to the token.
- creation
Date string - Token creation date in ISO 8601 format (yyyy-MM-dd'T'HH:mm:ss.SSS'Z')
- enabled boolean
- The token is enabled (true) or disabled (false), default disabled (false).
- expiration
Date string - The expiration date of the token.
- last
Used stringDate - Token last used date in ISO 8601 format (yyyy-MM-dd'T'HH:mm:ss.SSS'Z')
- last
Used stringIp Address - Token last used IP address.
- modified
Date string - Token last modified date in ISO 8601 format (yyyy-MM-dd'T'HH:mm:ss.SSS'Z').
- name string
- The name of the token.
- owner string
- The owner of the token
- personal
Access booleanToken - The token is a personal access token (true) or an API token (false).
- scopes Sequence[str]
- A list of the scopes to be assigned to the token.
- creation_
date str - Token creation date in ISO 8601 format (yyyy-MM-dd'T'HH:mm:ss.SSS'Z')
- enabled bool
- The token is enabled (true) or disabled (false), default disabled (false).
- expiration_
date str - The expiration date of the token.
- last_
used_ strdate - Token last used date in ISO 8601 format (yyyy-MM-dd'T'HH:mm:ss.SSS'Z')
- last_
used_ strip_ address - Token last used IP address.
- modified_
date str - Token last modified date in ISO 8601 format (yyyy-MM-dd'T'HH:mm:ss.SSS'Z').
- name str
- The name of the token.
- owner str
- The owner of the token
- personal_
access_ booltoken - The token is a personal access token (true) or an API token (false).
- scopes List<String>
- A list of the scopes to be assigned to the token.
- creation
Date String - Token creation date in ISO 8601 format (yyyy-MM-dd'T'HH:mm:ss.SSS'Z')
- enabled Boolean
- The token is enabled (true) or disabled (false), default disabled (false).
- expiration
Date String - The expiration date of the token.
- last
Used StringDate - Token last used date in ISO 8601 format (yyyy-MM-dd'T'HH:mm:ss.SSS'Z')
- last
Used StringIp Address - Token last used IP address.
- modified
Date String - Token last modified date in ISO 8601 format (yyyy-MM-dd'T'HH:mm:ss.SSS'Z').
- name String
- The name of the token.
- owner String
- The owner of the token
- personal
Access BooleanToken - The token is a personal access token (true) or an API token (false).
Outputs
All input properties are implicitly available as output properties. Additionally, the ApiToken resource produces the following output properties:
Look up Existing ApiToken Resource
Get an existing ApiToken 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?: ApiTokenState, opts?: CustomResourceOptions): ApiToken
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
creation_date: Optional[str] = None,
enabled: Optional[bool] = None,
expiration_date: Optional[str] = None,
last_used_date: Optional[str] = None,
last_used_ip_address: Optional[str] = None,
modified_date: Optional[str] = None,
name: Optional[str] = None,
owner: Optional[str] = None,
personal_access_token: Optional[bool] = None,
scopes: Optional[Sequence[str]] = None,
token: Optional[str] = None) -> ApiToken
func GetApiToken(ctx *Context, name string, id IDInput, state *ApiTokenState, opts ...ResourceOption) (*ApiToken, error)
public static ApiToken Get(string name, Input<string> id, ApiTokenState? state, CustomResourceOptions? opts = null)
public static ApiToken get(String name, Output<String> id, ApiTokenState 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.
- Creation
Date string - Token creation date in ISO 8601 format (yyyy-MM-dd'T'HH:mm:ss.SSS'Z')
- Enabled bool
- The token is enabled (true) or disabled (false), default disabled (false).
- Expiration
Date string - The expiration date of the token.
- Last
Used stringDate - Token last used date in ISO 8601 format (yyyy-MM-dd'T'HH:mm:ss.SSS'Z')
- Last
Used stringIp Address - Token last used IP address.
- Modified
Date string - Token last modified date in ISO 8601 format (yyyy-MM-dd'T'HH:mm:ss.SSS'Z').
- Name string
- The name of the token.
- Owner string
- The owner of the token
- Personal
Access boolToken - The token is a personal access token (true) or an API token (false).
- Scopes List<string>
- A list of the scopes to be assigned to the token.
- Token string
- The secret of the token.
- Creation
Date string - Token creation date in ISO 8601 format (yyyy-MM-dd'T'HH:mm:ss.SSS'Z')
- Enabled bool
- The token is enabled (true) or disabled (false), default disabled (false).
- Expiration
Date string - The expiration date of the token.
- Last
Used stringDate - Token last used date in ISO 8601 format (yyyy-MM-dd'T'HH:mm:ss.SSS'Z')
- Last
Used stringIp Address - Token last used IP address.
- Modified
Date string - Token last modified date in ISO 8601 format (yyyy-MM-dd'T'HH:mm:ss.SSS'Z').
- Name string
- The name of the token.
- Owner string
- The owner of the token
- Personal
Access boolToken - The token is a personal access token (true) or an API token (false).
- Scopes []string
- A list of the scopes to be assigned to the token.
- Token string
- The secret of the token.
- creation
Date String - Token creation date in ISO 8601 format (yyyy-MM-dd'T'HH:mm:ss.SSS'Z')
- enabled Boolean
- The token is enabled (true) or disabled (false), default disabled (false).
- expiration
Date String - The expiration date of the token.
- last
Used StringDate - Token last used date in ISO 8601 format (yyyy-MM-dd'T'HH:mm:ss.SSS'Z')
- last
Used StringIp Address - Token last used IP address.
- modified
Date String - Token last modified date in ISO 8601 format (yyyy-MM-dd'T'HH:mm:ss.SSS'Z').
- name String
- The name of the token.
- owner String
- The owner of the token
- personal
Access BooleanToken - The token is a personal access token (true) or an API token (false).
- scopes List<String>
- A list of the scopes to be assigned to the token.
- token String
- The secret of the token.
- creation
Date string - Token creation date in ISO 8601 format (yyyy-MM-dd'T'HH:mm:ss.SSS'Z')
- enabled boolean
- The token is enabled (true) or disabled (false), default disabled (false).
- expiration
Date string - The expiration date of the token.
- last
Used stringDate - Token last used date in ISO 8601 format (yyyy-MM-dd'T'HH:mm:ss.SSS'Z')
- last
Used stringIp Address - Token last used IP address.
- modified
Date string - Token last modified date in ISO 8601 format (yyyy-MM-dd'T'HH:mm:ss.SSS'Z').
- name string
- The name of the token.
- owner string
- The owner of the token
- personal
Access booleanToken - The token is a personal access token (true) or an API token (false).
- scopes string[]
- A list of the scopes to be assigned to the token.
- token string
- The secret of the token.
- creation_
date str - Token creation date in ISO 8601 format (yyyy-MM-dd'T'HH:mm:ss.SSS'Z')
- enabled bool
- The token is enabled (true) or disabled (false), default disabled (false).
- expiration_
date str - The expiration date of the token.
- last_
used_ strdate - Token last used date in ISO 8601 format (yyyy-MM-dd'T'HH:mm:ss.SSS'Z')
- last_
used_ strip_ address - Token last used IP address.
- modified_
date str - Token last modified date in ISO 8601 format (yyyy-MM-dd'T'HH:mm:ss.SSS'Z').
- name str
- The name of the token.
- owner str
- The owner of the token
- personal_
access_ booltoken - The token is a personal access token (true) or an API token (false).
- scopes Sequence[str]
- A list of the scopes to be assigned to the token.
- token str
- The secret of the token.
- creation
Date String - Token creation date in ISO 8601 format (yyyy-MM-dd'T'HH:mm:ss.SSS'Z')
- enabled Boolean
- The token is enabled (true) or disabled (false), default disabled (false).
- expiration
Date String - The expiration date of the token.
- last
Used StringDate - Token last used date in ISO 8601 format (yyyy-MM-dd'T'HH:mm:ss.SSS'Z')
- last
Used StringIp Address - Token last used IP address.
- modified
Date String - Token last modified date in ISO 8601 format (yyyy-MM-dd'T'HH:mm:ss.SSS'Z').
- name String
- The name of the token.
- owner String
- The owner of the token
- personal
Access BooleanToken - The token is a personal access token (true) or an API token (false).
- scopes List<String>
- A list of the scopes to be assigned to the token.
- token String
- The secret of the token.
Package Details
- Repository
- dynatrace pulumiverse/pulumi-dynatrace
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
dynatrace
Terraform Provider.