artifactory.DistributionPublicKey
Explore with Pulumi AI
Provides an Artifactory Distribution Public Key resource. This can be used to create and manage Artifactory Distribution Public Keys.
See API description in the Artifactory documentation for more details. Also the UI documentation has further details on where to find these keys in Artifactory.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as artifactory from "@pulumi/artifactory";
import * as std from "@pulumi/std";
const my_key = new artifactory.DistributionPublicKey("my-key", {
alias: "my-key",
publicKey: std.file({
input: "samples/rsa.pub",
}).then(invoke => invoke.result),
});
import pulumi
import pulumi_artifactory as artifactory
import pulumi_std as std
my_key = artifactory.DistributionPublicKey("my-key",
alias="my-key",
public_key=std.file(input="samples/rsa.pub").result)
package main
import (
"github.com/pulumi/pulumi-artifactory/sdk/v8/go/artifactory"
"github.com/pulumi/pulumi-std/sdk/go/std"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
invokeFile, err := std.File(ctx, &std.FileArgs{
Input: "samples/rsa.pub",
}, nil)
if err != nil {
return err
}
_, err = artifactory.NewDistributionPublicKey(ctx, "my-key", &artifactory.DistributionPublicKeyArgs{
Alias: pulumi.String("my-key"),
PublicKey: pulumi.String(invokeFile.Result),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Artifactory = Pulumi.Artifactory;
using Std = Pulumi.Std;
return await Deployment.RunAsync(() =>
{
var my_key = new Artifactory.DistributionPublicKey("my-key", new()
{
Alias = "my-key",
PublicKey = Std.File.Invoke(new()
{
Input = "samples/rsa.pub",
}).Apply(invoke => invoke.Result),
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.artifactory.DistributionPublicKey;
import com.pulumi.artifactory.DistributionPublicKeyArgs;
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 my_key = new DistributionPublicKey("my-key", DistributionPublicKeyArgs.builder()
.alias("my-key")
.publicKey(StdFunctions.file(FileArgs.builder()
.input("samples/rsa.pub")
.build()).result())
.build());
}
}
resources:
my-key:
type: artifactory:DistributionPublicKey
properties:
alias: my-key
publicKey:
fn::invoke:
Function: std:file
Arguments:
input: samples/rsa.pub
Return: result
Create DistributionPublicKey Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new DistributionPublicKey(name: string, args: DistributionPublicKeyArgs, opts?: CustomResourceOptions);
@overload
def DistributionPublicKey(resource_name: str,
args: DistributionPublicKeyArgs,
opts: Optional[ResourceOptions] = None)
@overload
def DistributionPublicKey(resource_name: str,
opts: Optional[ResourceOptions] = None,
alias: Optional[str] = None,
public_key: Optional[str] = None)
func NewDistributionPublicKey(ctx *Context, name string, args DistributionPublicKeyArgs, opts ...ResourceOption) (*DistributionPublicKey, error)
public DistributionPublicKey(string name, DistributionPublicKeyArgs args, CustomResourceOptions? opts = null)
public DistributionPublicKey(String name, DistributionPublicKeyArgs args)
public DistributionPublicKey(String name, DistributionPublicKeyArgs args, CustomResourceOptions options)
type: artifactory:DistributionPublicKey
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 DistributionPublicKeyArgs
- 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 DistributionPublicKeyArgs
- 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 DistributionPublicKeyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DistributionPublicKeyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DistributionPublicKeyArgs
- 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 distributionPublicKeyResource = new Artifactory.DistributionPublicKey("distributionPublicKeyResource", new()
{
Alias = "string",
PublicKey = "string",
});
example, err := artifactory.NewDistributionPublicKey(ctx, "distributionPublicKeyResource", &artifactory.DistributionPublicKeyArgs{
Alias: pulumi.String("string"),
PublicKey: pulumi.String("string"),
})
var distributionPublicKeyResource = new DistributionPublicKey("distributionPublicKeyResource", DistributionPublicKeyArgs.builder()
.alias("string")
.publicKey("string")
.build());
distribution_public_key_resource = artifactory.DistributionPublicKey("distributionPublicKeyResource",
alias="string",
public_key="string")
const distributionPublicKeyResource = new artifactory.DistributionPublicKey("distributionPublicKeyResource", {
alias: "string",
publicKey: "string",
});
type: artifactory:DistributionPublicKey
properties:
alias: string
publicKey: string
DistributionPublicKey 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 DistributionPublicKey resource accepts the following input properties:
- alias str
- Will be used as an identifier when uploading/retrieving the public key via REST API.
- public_
key str The Public key to add as a trusted distribution GPG key.
The following additional attributes are exported:
Outputs
All input properties are implicitly available as output properties. Additionally, the DistributionPublicKey resource produces the following output properties:
- Fingerprint string
- Returns the computed key fingerprint
- Id string
- The provider-assigned unique ID for this managed resource.
- Issued
By string - Returns the name and eMail address of issuer
- Issued
On string - Returns the date/time when this GPG key was created
- Key
Id string - Returns the key id by which this key is referenced in Artifactory
- Valid
Until string - Returns the date/time when this GPG key expires.
- Fingerprint string
- Returns the computed key fingerprint
- Id string
- The provider-assigned unique ID for this managed resource.
- Issued
By string - Returns the name and eMail address of issuer
- Issued
On string - Returns the date/time when this GPG key was created
- Key
Id string - Returns the key id by which this key is referenced in Artifactory
- Valid
Until string - Returns the date/time when this GPG key expires.
- fingerprint String
- Returns the computed key fingerprint
- id String
- The provider-assigned unique ID for this managed resource.
- issued
By String - Returns the name and eMail address of issuer
- issued
On String - Returns the date/time when this GPG key was created
- key
Id String - Returns the key id by which this key is referenced in Artifactory
- valid
Until String - Returns the date/time when this GPG key expires.
- fingerprint string
- Returns the computed key fingerprint
- id string
- The provider-assigned unique ID for this managed resource.
- issued
By string - Returns the name and eMail address of issuer
- issued
On string - Returns the date/time when this GPG key was created
- key
Id string - Returns the key id by which this key is referenced in Artifactory
- valid
Until string - Returns the date/time when this GPG key expires.
- fingerprint str
- Returns the computed key fingerprint
- id str
- The provider-assigned unique ID for this managed resource.
- issued_
by str - Returns the name and eMail address of issuer
- issued_
on str - Returns the date/time when this GPG key was created
- key_
id str - Returns the key id by which this key is referenced in Artifactory
- valid_
until str - Returns the date/time when this GPG key expires.
- fingerprint String
- Returns the computed key fingerprint
- id String
- The provider-assigned unique ID for this managed resource.
- issued
By String - Returns the name and eMail address of issuer
- issued
On String - Returns the date/time when this GPG key was created
- key
Id String - Returns the key id by which this key is referenced in Artifactory
- valid
Until String - Returns the date/time when this GPG key expires.
Look up Existing DistributionPublicKey Resource
Get an existing DistributionPublicKey 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?: DistributionPublicKeyState, opts?: CustomResourceOptions): DistributionPublicKey
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
alias: Optional[str] = None,
fingerprint: Optional[str] = None,
issued_by: Optional[str] = None,
issued_on: Optional[str] = None,
key_id: Optional[str] = None,
public_key: Optional[str] = None,
valid_until: Optional[str] = None) -> DistributionPublicKey
func GetDistributionPublicKey(ctx *Context, name string, id IDInput, state *DistributionPublicKeyState, opts ...ResourceOption) (*DistributionPublicKey, error)
public static DistributionPublicKey Get(string name, Input<string> id, DistributionPublicKeyState? state, CustomResourceOptions? opts = null)
public static DistributionPublicKey get(String name, Output<String> id, DistributionPublicKeyState 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.
- Alias string
- Will be used as an identifier when uploading/retrieving the public key via REST API.
- Fingerprint string
- Returns the computed key fingerprint
- Issued
By string - Returns the name and eMail address of issuer
- Issued
On string - Returns the date/time when this GPG key was created
- Key
Id string - Returns the key id by which this key is referenced in Artifactory
- Public
Key string The Public key to add as a trusted distribution GPG key.
The following additional attributes are exported:
- Valid
Until string - Returns the date/time when this GPG key expires.
- Alias string
- Will be used as an identifier when uploading/retrieving the public key via REST API.
- Fingerprint string
- Returns the computed key fingerprint
- Issued
By string - Returns the name and eMail address of issuer
- Issued
On string - Returns the date/time when this GPG key was created
- Key
Id string - Returns the key id by which this key is referenced in Artifactory
- Public
Key string The Public key to add as a trusted distribution GPG key.
The following additional attributes are exported:
- Valid
Until string - Returns the date/time when this GPG key expires.
- alias String
- Will be used as an identifier when uploading/retrieving the public key via REST API.
- fingerprint String
- Returns the computed key fingerprint
- issued
By String - Returns the name and eMail address of issuer
- issued
On String - Returns the date/time when this GPG key was created
- key
Id String - Returns the key id by which this key is referenced in Artifactory
- public
Key String The Public key to add as a trusted distribution GPG key.
The following additional attributes are exported:
- valid
Until String - Returns the date/time when this GPG key expires.
- alias string
- Will be used as an identifier when uploading/retrieving the public key via REST API.
- fingerprint string
- Returns the computed key fingerprint
- issued
By string - Returns the name and eMail address of issuer
- issued
On string - Returns the date/time when this GPG key was created
- key
Id string - Returns the key id by which this key is referenced in Artifactory
- public
Key string The Public key to add as a trusted distribution GPG key.
The following additional attributes are exported:
- valid
Until string - Returns the date/time when this GPG key expires.
- alias str
- Will be used as an identifier when uploading/retrieving the public key via REST API.
- fingerprint str
- Returns the computed key fingerprint
- issued_
by str - Returns the name and eMail address of issuer
- issued_
on str - Returns the date/time when this GPG key was created
- key_
id str - Returns the key id by which this key is referenced in Artifactory
- public_
key str The Public key to add as a trusted distribution GPG key.
The following additional attributes are exported:
- valid_
until str - Returns the date/time when this GPG key expires.
- alias String
- Will be used as an identifier when uploading/retrieving the public key via REST API.
- fingerprint String
- Returns the computed key fingerprint
- issued
By String - Returns the name and eMail address of issuer
- issued
On String - Returns the date/time when this GPG key was created
- key
Id String - Returns the key id by which this key is referenced in Artifactory
- public
Key String The Public key to add as a trusted distribution GPG key.
The following additional attributes are exported:
- valid
Until String - Returns the date/time when this GPG key expires.
Import
Distribution Public Key can be imported using the key id, e.g.
$ pulumi import artifactory:index/distributionPublicKey:DistributionPublicKey my-key keyid
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- artifactory pulumi/pulumi-artifactory
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
artifactory
Terraform Provider.