artifactory.ApiKey
Explore with Pulumi AI
Provides an Artifactory API key resource. This can be used to create and manage Artifactory API keys.
Note: API keys will be stored in the raw state as plain-text. Read more about sensitive data in state.
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Artifactory = Pulumi.Artifactory;
return await Deployment.RunAsync(() =>
{
// Create a new Artifactory API key for the configured user
var ci = new Artifactory.ApiKey("ci");
});
package main
import (
"github.com/pulumi/pulumi-artifactory/sdk/v4/go/artifactory"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := artifactory.NewApiKey(ctx, "ci", nil)
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.artifactory.ApiKey;
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 ci = new ApiKey("ci");
}
}
import pulumi
import pulumi_artifactory as artifactory
# Create a new Artifactory API key for the configured user
ci = artifactory.ApiKey("ci")
import * as pulumi from "@pulumi/pulumi";
import * as artifactory from "@pulumi/artifactory";
// Create a new Artifactory API key for the configured user
const ci = new artifactory.ApiKey("ci", {});
resources:
# Create a new Artifactory API key for the configured user
ci:
type: artifactory:ApiKey
Create ApiKey Resource
new ApiKey(name: string, args?: ApiKeyArgs, opts?: CustomResourceOptions);
@overload
def ApiKey(resource_name: str,
opts: Optional[ResourceOptions] = None)
@overload
def ApiKey(resource_name: str,
args: Optional[ApiKeyArgs] = None,
opts: Optional[ResourceOptions] = None)
func NewApiKey(ctx *Context, name string, args *ApiKeyArgs, opts ...ResourceOption) (*ApiKey, error)
public ApiKey(string name, ApiKeyArgs? args = null, CustomResourceOptions? opts = null)
public ApiKey(String name, ApiKeyArgs args)
public ApiKey(String name, ApiKeyArgs args, CustomResourceOptions options)
type: artifactory:ApiKey
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ApiKeyArgs
- 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 ApiKeyArgs
- 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 ApiKeyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ApiKeyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ApiKeyArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
ApiKey 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 ApiKey resource accepts the following input properties:
Outputs
All input properties are implicitly available as output properties. Additionally, the ApiKey resource produces the following output properties:
- Id string
The provider-assigned unique ID for this managed resource.
- Key string
The API key. Deprecated. An upcoming version will support the option to block the usage/creation of API Keys (for admins to set on their platform). In September 2022, the option to block the usage/creation of API Keys will be enabled by default, with the option for admins to change it back to enable API Keys. In January 2023, API Keys will be deprecated all together and the option to use them will no longer be available. It is recommended to use scoped tokens instead -
artifactory.ScopedToken
resource. Please check the release notes.
- Api
Key string The API key. Deprecated. An upcoming version will support the option to block the usage/creation of API Keys (for admins to set on their platform). In September 2022, the option to block the usage/creation of API Keys will be enabled by default, with the option for admins to change it back to enable API Keys. In January 2023, API Keys will be deprecated all together and the option to use them will no longer be available. It is recommended to use scoped tokens instead -
artifactory.ScopedToken
resource. Please check the release notes.- Id string
The provider-assigned unique ID for this managed resource.
- api
Key String The API key. Deprecated. An upcoming version will support the option to block the usage/creation of API Keys (for admins to set on their platform). In September 2022, the option to block the usage/creation of API Keys will be enabled by default, with the option for admins to change it back to enable API Keys. In January 2023, API Keys will be deprecated all together and the option to use them will no longer be available. It is recommended to use scoped tokens instead -
artifactory.ScopedToken
resource. Please check the release notes.- id String
The provider-assigned unique ID for this managed resource.
- api
Key string The API key. Deprecated. An upcoming version will support the option to block the usage/creation of API Keys (for admins to set on their platform). In September 2022, the option to block the usage/creation of API Keys will be enabled by default, with the option for admins to change it back to enable API Keys. In January 2023, API Keys will be deprecated all together and the option to use them will no longer be available. It is recommended to use scoped tokens instead -
artifactory.ScopedToken
resource. Please check the release notes.- id string
The provider-assigned unique ID for this managed resource.
- api_
key str The API key. Deprecated. An upcoming version will support the option to block the usage/creation of API Keys (for admins to set on their platform). In September 2022, the option to block the usage/creation of API Keys will be enabled by default, with the option for admins to change it back to enable API Keys. In January 2023, API Keys will be deprecated all together and the option to use them will no longer be available. It is recommended to use scoped tokens instead -
artifactory.ScopedToken
resource. Please check the release notes.- id str
The provider-assigned unique ID for this managed resource.
- api
Key String The API key. Deprecated. An upcoming version will support the option to block the usage/creation of API Keys (for admins to set on their platform). In September 2022, the option to block the usage/creation of API Keys will be enabled by default, with the option for admins to change it back to enable API Keys. In January 2023, API Keys will be deprecated all together and the option to use them will no longer be available. It is recommended to use scoped tokens instead -
artifactory.ScopedToken
resource. Please check the release notes.- id String
The provider-assigned unique ID for this managed resource.
Look up Existing ApiKey Resource
Get an existing ApiKey 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?: ApiKeyState, opts?: CustomResourceOptions): ApiKey
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
api_key: Optional[str] = None) -> ApiKey
func GetApiKey(ctx *Context, name string, id IDInput, state *ApiKeyState, opts ...ResourceOption) (*ApiKey, error)
public static ApiKey Get(string name, Input<string> id, ApiKeyState? state, CustomResourceOptions? opts = null)
public static ApiKey get(String name, Output<String> id, ApiKeyState 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.
- Key string
The API key. Deprecated. An upcoming version will support the option to block the usage/creation of API Keys (for admins to set on their platform). In September 2022, the option to block the usage/creation of API Keys will be enabled by default, with the option for admins to change it back to enable API Keys. In January 2023, API Keys will be deprecated all together and the option to use them will no longer be available. It is recommended to use scoped tokens instead -
artifactory.ScopedToken
resource. Please check the release notes.
- Api
Key string The API key. Deprecated. An upcoming version will support the option to block the usage/creation of API Keys (for admins to set on their platform). In September 2022, the option to block the usage/creation of API Keys will be enabled by default, with the option for admins to change it back to enable API Keys. In January 2023, API Keys will be deprecated all together and the option to use them will no longer be available. It is recommended to use scoped tokens instead -
artifactory.ScopedToken
resource. Please check the release notes.
- api
Key String The API key. Deprecated. An upcoming version will support the option to block the usage/creation of API Keys (for admins to set on their platform). In September 2022, the option to block the usage/creation of API Keys will be enabled by default, with the option for admins to change it back to enable API Keys. In January 2023, API Keys will be deprecated all together and the option to use them will no longer be available. It is recommended to use scoped tokens instead -
artifactory.ScopedToken
resource. Please check the release notes.
- api
Key string The API key. Deprecated. An upcoming version will support the option to block the usage/creation of API Keys (for admins to set on their platform). In September 2022, the option to block the usage/creation of API Keys will be enabled by default, with the option for admins to change it back to enable API Keys. In January 2023, API Keys will be deprecated all together and the option to use them will no longer be available. It is recommended to use scoped tokens instead -
artifactory.ScopedToken
resource. Please check the release notes.
- api_
key str The API key. Deprecated. An upcoming version will support the option to block the usage/creation of API Keys (for admins to set on their platform). In September 2022, the option to block the usage/creation of API Keys will be enabled by default, with the option for admins to change it back to enable API Keys. In January 2023, API Keys will be deprecated all together and the option to use them will no longer be available. It is recommended to use scoped tokens instead -
artifactory.ScopedToken
resource. Please check the release notes.
- api
Key String The API key. Deprecated. An upcoming version will support the option to block the usage/creation of API Keys (for admins to set on their platform). In September 2022, the option to block the usage/creation of API Keys will be enabled by default, with the option for admins to change it back to enable API Keys. In January 2023, API Keys will be deprecated all together and the option to use them will no longer be available. It is recommended to use scoped tokens instead -
artifactory.ScopedToken
resource. Please check the release notes.
Import
A user’s API key can be imported using any identifier, e.g.
$ pulumi import artifactory:index/apiKey:ApiKey test import
Package Details
- Repository
- artifactory pulumi/pulumi-artifactory
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
artifactory
Terraform Provider.