1. Packages
  2. Dynatrace
  3. API Docs
  4. ApiToken
Dynatrace v0.21.1 published on Monday, Nov 25, 2024 by Pulumiverse

dynatrace.ApiToken

Explore with Pulumi AI

dynatrace logo
Dynatrace v0.21.1 published on Monday, Nov 25, 2024 by Pulumiverse

    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

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The ApiToken resource accepts the following input properties:

    Scopes List<string>
    A list of the scopes to be assigned to the token.
    CreationDate 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).
    ExpirationDate string
    The expiration date of the token.
    LastUsedDate string
    Token last used date in ISO 8601 format (yyyy-MM-dd'T'HH:mm:ss.SSS'Z')
    LastUsedIpAddress string
    Token last used IP address.
    ModifiedDate 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
    PersonalAccessToken bool
    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.
    CreationDate 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).
    ExpirationDate string
    The expiration date of the token.
    LastUsedDate string
    Token last used date in ISO 8601 format (yyyy-MM-dd'T'HH:mm:ss.SSS'Z')
    LastUsedIpAddress string
    Token last used IP address.
    ModifiedDate 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
    PersonalAccessToken bool
    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.
    creationDate 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).
    expirationDate String
    The expiration date of the token.
    lastUsedDate String
    Token last used date in ISO 8601 format (yyyy-MM-dd'T'HH:mm:ss.SSS'Z')
    lastUsedIpAddress String
    Token last used IP address.
    modifiedDate 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
    personalAccessToken Boolean
    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.
    creationDate 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).
    expirationDate string
    The expiration date of the token.
    lastUsedDate string
    Token last used date in ISO 8601 format (yyyy-MM-dd'T'HH:mm:ss.SSS'Z')
    lastUsedIpAddress string
    Token last used IP address.
    modifiedDate 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
    personalAccessToken boolean
    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_date str
    Token last used date in ISO 8601 format (yyyy-MM-dd'T'HH:mm:ss.SSS'Z')
    last_used_ip_address str
    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_token bool
    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.
    creationDate 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).
    expirationDate String
    The expiration date of the token.
    lastUsedDate String
    Token last used date in ISO 8601 format (yyyy-MM-dd'T'HH:mm:ss.SSS'Z')
    lastUsedIpAddress String
    Token last used IP address.
    modifiedDate 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
    personalAccessToken Boolean
    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:

    Id string
    The provider-assigned unique ID for this managed resource.
    Token string
    The secret of the token.
    Id string
    The provider-assigned unique ID for this managed resource.
    Token string
    The secret of the token.
    id String
    The provider-assigned unique ID for this managed resource.
    token String
    The secret of the token.
    id string
    The provider-assigned unique ID for this managed resource.
    token string
    The secret of the token.
    id str
    The provider-assigned unique ID for this managed resource.
    token str
    The secret of the token.
    id String
    The provider-assigned unique ID for this managed resource.
    token String
    The secret of the token.

    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.
    The following state arguments are supported:
    CreationDate 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).
    ExpirationDate string
    The expiration date of the token.
    LastUsedDate string
    Token last used date in ISO 8601 format (yyyy-MM-dd'T'HH:mm:ss.SSS'Z')
    LastUsedIpAddress string
    Token last used IP address.
    ModifiedDate 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
    PersonalAccessToken bool
    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.
    CreationDate 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).
    ExpirationDate string
    The expiration date of the token.
    LastUsedDate string
    Token last used date in ISO 8601 format (yyyy-MM-dd'T'HH:mm:ss.SSS'Z')
    LastUsedIpAddress string
    Token last used IP address.
    ModifiedDate 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
    PersonalAccessToken bool
    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.
    creationDate 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).
    expirationDate String
    The expiration date of the token.
    lastUsedDate String
    Token last used date in ISO 8601 format (yyyy-MM-dd'T'HH:mm:ss.SSS'Z')
    lastUsedIpAddress String
    Token last used IP address.
    modifiedDate 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
    personalAccessToken Boolean
    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.
    creationDate 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).
    expirationDate string
    The expiration date of the token.
    lastUsedDate string
    Token last used date in ISO 8601 format (yyyy-MM-dd'T'HH:mm:ss.SSS'Z')
    lastUsedIpAddress string
    Token last used IP address.
    modifiedDate 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
    personalAccessToken boolean
    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_date str
    Token last used date in ISO 8601 format (yyyy-MM-dd'T'HH:mm:ss.SSS'Z')
    last_used_ip_address str
    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_token bool
    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.
    creationDate 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).
    expirationDate String
    The expiration date of the token.
    lastUsedDate String
    Token last used date in ISO 8601 format (yyyy-MM-dd'T'HH:mm:ss.SSS'Z')
    lastUsedIpAddress String
    Token last used IP address.
    modifiedDate 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
    personalAccessToken Boolean
    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.
    dynatrace logo
    Dynatrace v0.21.1 published on Monday, Nov 25, 2024 by Pulumiverse