1. Packages
  2. Artifactory Provider
  3. API Docs
  4. Proxy
artifactory v8.1.0 published on Saturday, Sep 28, 2024 by Pulumi

artifactory.Proxy

Explore with Pulumi AI

artifactory logo
artifactory v8.1.0 published on Saturday, Sep 28, 2024 by Pulumi

    Provides an Artifactory Proxy resource.

    This resource configuration corresponds to ‘proxies’ config block in system configuration XML (REST endpoint: artifactory/api/system/configuration).

    ~>The artifactory.Proxy resource utilizes endpoints which are blocked/removed in SaaS environments (i.e. in Artifactory online), rendering this resource incompatible with Artifactory SaaS environments.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as artifactory from "@pulumi/artifactory";
    
    const my_proxy = new artifactory.Proxy("my-proxy", {
        key: "my-proxy",
        host: "my-proxy.mycompany.com",
        port: 8888,
        username: "user1",
        password: "password",
        ntHost: "MYCOMPANY.COM",
        ntDomain: "MYCOMPANY",
        platformDefault: false,
        redirectToHosts: ["redirec-host.mycompany.com"],
        services: [
            "jfrt",
            "jfxr",
        ],
    });
    
    import pulumi
    import pulumi_artifactory as artifactory
    
    my_proxy = artifactory.Proxy("my-proxy",
        key="my-proxy",
        host="my-proxy.mycompany.com",
        port=8888,
        username="user1",
        password="password",
        nt_host="MYCOMPANY.COM",
        nt_domain="MYCOMPANY",
        platform_default=False,
        redirect_to_hosts=["redirec-host.mycompany.com"],
        services=[
            "jfrt",
            "jfxr",
        ])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-artifactory/sdk/v8/go/artifactory"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := artifactory.NewProxy(ctx, "my-proxy", &artifactory.ProxyArgs{
    			Key:             pulumi.String("my-proxy"),
    			Host:            pulumi.String("my-proxy.mycompany.com"),
    			Port:            pulumi.Int(8888),
    			Username:        pulumi.String("user1"),
    			Password:        pulumi.String("password"),
    			NtHost:          pulumi.String("MYCOMPANY.COM"),
    			NtDomain:        pulumi.String("MYCOMPANY"),
    			PlatformDefault: pulumi.Bool(false),
    			RedirectToHosts: pulumi.StringArray{
    				pulumi.String("redirec-host.mycompany.com"),
    			},
    			Services: pulumi.StringArray{
    				pulumi.String("jfrt"),
    				pulumi.String("jfxr"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Artifactory = Pulumi.Artifactory;
    
    return await Deployment.RunAsync(() => 
    {
        var my_proxy = new Artifactory.Proxy("my-proxy", new()
        {
            Key = "my-proxy",
            Host = "my-proxy.mycompany.com",
            Port = 8888,
            Username = "user1",
            Password = "password",
            NtHost = "MYCOMPANY.COM",
            NtDomain = "MYCOMPANY",
            PlatformDefault = false,
            RedirectToHosts = new[]
            {
                "redirec-host.mycompany.com",
            },
            Services = new[]
            {
                "jfrt",
                "jfxr",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.artifactory.Proxy;
    import com.pulumi.artifactory.ProxyArgs;
    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_proxy = new Proxy("my-proxy", ProxyArgs.builder()
                .key("my-proxy")
                .host("my-proxy.mycompany.com")
                .port(8888)
                .username("user1")
                .password("password")
                .ntHost("MYCOMPANY.COM")
                .ntDomain("MYCOMPANY")
                .platformDefault(false)
                .redirectToHosts("redirec-host.mycompany.com")
                .services(            
                    "jfrt",
                    "jfxr")
                .build());
    
        }
    }
    
    resources:
      my-proxy:
        type: artifactory:Proxy
        properties:
          key: my-proxy
          host: my-proxy.mycompany.com
          port: 8888
          username: user1
          password: password
          ntHost: MYCOMPANY.COM
          ntDomain: MYCOMPANY
          platformDefault: false
          redirectToHosts:
            - redirec-host.mycompany.com
          services:
            - jfrt
            - jfxr
    

    Create Proxy Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Proxy(name: string, args: ProxyArgs, opts?: CustomResourceOptions);
    @overload
    def Proxy(resource_name: str,
              args: ProxyArgs,
              opts: Optional[ResourceOptions] = None)
    
    @overload
    def Proxy(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              host: Optional[str] = None,
              key: Optional[str] = None,
              port: Optional[int] = None,
              nt_domain: Optional[str] = None,
              nt_host: Optional[str] = None,
              password: Optional[str] = None,
              platform_default: Optional[bool] = None,
              redirect_to_hosts: Optional[Sequence[str]] = None,
              services: Optional[Sequence[str]] = None,
              username: Optional[str] = None)
    func NewProxy(ctx *Context, name string, args ProxyArgs, opts ...ResourceOption) (*Proxy, error)
    public Proxy(string name, ProxyArgs args, CustomResourceOptions? opts = null)
    public Proxy(String name, ProxyArgs args)
    public Proxy(String name, ProxyArgs args, CustomResourceOptions options)
    
    type: artifactory:Proxy
    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 ProxyArgs
    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 ProxyArgs
    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 ProxyArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ProxyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ProxyArgs
    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 proxyResource = new Artifactory.Proxy("proxyResource", new()
    {
        Host = "string",
        Key = "string",
        Port = 0,
        NtDomain = "string",
        NtHost = "string",
        Password = "string",
        PlatformDefault = false,
        RedirectToHosts = new[]
        {
            "string",
        },
        Services = new[]
        {
            "string",
        },
        Username = "string",
    });
    
    example, err := artifactory.NewProxy(ctx, "proxyResource", &artifactory.ProxyArgs{
    	Host:            pulumi.String("string"),
    	Key:             pulumi.String("string"),
    	Port:            pulumi.Int(0),
    	NtDomain:        pulumi.String("string"),
    	NtHost:          pulumi.String("string"),
    	Password:        pulumi.String("string"),
    	PlatformDefault: pulumi.Bool(false),
    	RedirectToHosts: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Services: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Username: pulumi.String("string"),
    })
    
    var proxyResource = new Proxy("proxyResource", ProxyArgs.builder()
        .host("string")
        .key("string")
        .port(0)
        .ntDomain("string")
        .ntHost("string")
        .password("string")
        .platformDefault(false)
        .redirectToHosts("string")
        .services("string")
        .username("string")
        .build());
    
    proxy_resource = artifactory.Proxy("proxyResource",
        host="string",
        key="string",
        port=0,
        nt_domain="string",
        nt_host="string",
        password="string",
        platform_default=False,
        redirect_to_hosts=["string"],
        services=["string"],
        username="string")
    
    const proxyResource = new artifactory.Proxy("proxyResource", {
        host: "string",
        key: "string",
        port: 0,
        ntDomain: "string",
        ntHost: "string",
        password: "string",
        platformDefault: false,
        redirectToHosts: ["string"],
        services: ["string"],
        username: "string",
    });
    
    type: artifactory:Proxy
    properties:
        host: string
        key: string
        ntDomain: string
        ntHost: string
        password: string
        platformDefault: false
        port: 0
        redirectToHosts:
            - string
        services:
            - string
        username: string
    

    Proxy 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 Proxy resource accepts the following input properties:

    Host string
    The name of the proxy host.
    Key string
    The unique ID of the proxy.
    Port int
    The proxy port number.
    NtDomain string
    The proxy domain/realm name.
    NtHost string
    The computer name of the machine (the machine connecting to the NTLM proxy).
    Password string
    The proxy password when authentication credentials are required.
    PlatformDefault bool
    When set, this proxy will be the default proxy for new remote repositories and for internal HTTP requests issued by Artifactory. Will also be used as proxy for all other services in the platform (for example: Xray, Distribution, etc).
    RedirectToHosts List<string>
    An optional list of host names to which this proxy may redirect requests. The credentials defined for the proxy are reused by requests redirected to all of these hosts.
    Services List<string>
    An optional list of services names to which this proxy be the default of. The options are jfrt, jfmc, jfxr, jfds.
    Username string
    The proxy username when authentication credentials are required.
    Host string
    The name of the proxy host.
    Key string
    The unique ID of the proxy.
    Port int
    The proxy port number.
    NtDomain string
    The proxy domain/realm name.
    NtHost string
    The computer name of the machine (the machine connecting to the NTLM proxy).
    Password string
    The proxy password when authentication credentials are required.
    PlatformDefault bool
    When set, this proxy will be the default proxy for new remote repositories and for internal HTTP requests issued by Artifactory. Will also be used as proxy for all other services in the platform (for example: Xray, Distribution, etc).
    RedirectToHosts []string
    An optional list of host names to which this proxy may redirect requests. The credentials defined for the proxy are reused by requests redirected to all of these hosts.
    Services []string
    An optional list of services names to which this proxy be the default of. The options are jfrt, jfmc, jfxr, jfds.
    Username string
    The proxy username when authentication credentials are required.
    host String
    The name of the proxy host.
    key String
    The unique ID of the proxy.
    port Integer
    The proxy port number.
    ntDomain String
    The proxy domain/realm name.
    ntHost String
    The computer name of the machine (the machine connecting to the NTLM proxy).
    password String
    The proxy password when authentication credentials are required.
    platformDefault Boolean
    When set, this proxy will be the default proxy for new remote repositories and for internal HTTP requests issued by Artifactory. Will also be used as proxy for all other services in the platform (for example: Xray, Distribution, etc).
    redirectToHosts List<String>
    An optional list of host names to which this proxy may redirect requests. The credentials defined for the proxy are reused by requests redirected to all of these hosts.
    services List<String>
    An optional list of services names to which this proxy be the default of. The options are jfrt, jfmc, jfxr, jfds.
    username String
    The proxy username when authentication credentials are required.
    host string
    The name of the proxy host.
    key string
    The unique ID of the proxy.
    port number
    The proxy port number.
    ntDomain string
    The proxy domain/realm name.
    ntHost string
    The computer name of the machine (the machine connecting to the NTLM proxy).
    password string
    The proxy password when authentication credentials are required.
    platformDefault boolean
    When set, this proxy will be the default proxy for new remote repositories and for internal HTTP requests issued by Artifactory. Will also be used as proxy for all other services in the platform (for example: Xray, Distribution, etc).
    redirectToHosts string[]
    An optional list of host names to which this proxy may redirect requests. The credentials defined for the proxy are reused by requests redirected to all of these hosts.
    services string[]
    An optional list of services names to which this proxy be the default of. The options are jfrt, jfmc, jfxr, jfds.
    username string
    The proxy username when authentication credentials are required.
    host str
    The name of the proxy host.
    key str
    The unique ID of the proxy.
    port int
    The proxy port number.
    nt_domain str
    The proxy domain/realm name.
    nt_host str
    The computer name of the machine (the machine connecting to the NTLM proxy).
    password str
    The proxy password when authentication credentials are required.
    platform_default bool
    When set, this proxy will be the default proxy for new remote repositories and for internal HTTP requests issued by Artifactory. Will also be used as proxy for all other services in the platform (for example: Xray, Distribution, etc).
    redirect_to_hosts Sequence[str]
    An optional list of host names to which this proxy may redirect requests. The credentials defined for the proxy are reused by requests redirected to all of these hosts.
    services Sequence[str]
    An optional list of services names to which this proxy be the default of. The options are jfrt, jfmc, jfxr, jfds.
    username str
    The proxy username when authentication credentials are required.
    host String
    The name of the proxy host.
    key String
    The unique ID of the proxy.
    port Number
    The proxy port number.
    ntDomain String
    The proxy domain/realm name.
    ntHost String
    The computer name of the machine (the machine connecting to the NTLM proxy).
    password String
    The proxy password when authentication credentials are required.
    platformDefault Boolean
    When set, this proxy will be the default proxy for new remote repositories and for internal HTTP requests issued by Artifactory. Will also be used as proxy for all other services in the platform (for example: Xray, Distribution, etc).
    redirectToHosts List<String>
    An optional list of host names to which this proxy may redirect requests. The credentials defined for the proxy are reused by requests redirected to all of these hosts.
    services List<String>
    An optional list of services names to which this proxy be the default of. The options are jfrt, jfmc, jfxr, jfds.
    username String
    The proxy username when authentication credentials are required.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Proxy resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing Proxy Resource

    Get an existing Proxy 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?: ProxyState, opts?: CustomResourceOptions): Proxy
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            host: Optional[str] = None,
            key: Optional[str] = None,
            nt_domain: Optional[str] = None,
            nt_host: Optional[str] = None,
            password: Optional[str] = None,
            platform_default: Optional[bool] = None,
            port: Optional[int] = None,
            redirect_to_hosts: Optional[Sequence[str]] = None,
            services: Optional[Sequence[str]] = None,
            username: Optional[str] = None) -> Proxy
    func GetProxy(ctx *Context, name string, id IDInput, state *ProxyState, opts ...ResourceOption) (*Proxy, error)
    public static Proxy Get(string name, Input<string> id, ProxyState? state, CustomResourceOptions? opts = null)
    public static Proxy get(String name, Output<String> id, ProxyState 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:
    Host string
    The name of the proxy host.
    Key string
    The unique ID of the proxy.
    NtDomain string
    The proxy domain/realm name.
    NtHost string
    The computer name of the machine (the machine connecting to the NTLM proxy).
    Password string
    The proxy password when authentication credentials are required.
    PlatformDefault bool
    When set, this proxy will be the default proxy for new remote repositories and for internal HTTP requests issued by Artifactory. Will also be used as proxy for all other services in the platform (for example: Xray, Distribution, etc).
    Port int
    The proxy port number.
    RedirectToHosts List<string>
    An optional list of host names to which this proxy may redirect requests. The credentials defined for the proxy are reused by requests redirected to all of these hosts.
    Services List<string>
    An optional list of services names to which this proxy be the default of. The options are jfrt, jfmc, jfxr, jfds.
    Username string
    The proxy username when authentication credentials are required.
    Host string
    The name of the proxy host.
    Key string
    The unique ID of the proxy.
    NtDomain string
    The proxy domain/realm name.
    NtHost string
    The computer name of the machine (the machine connecting to the NTLM proxy).
    Password string
    The proxy password when authentication credentials are required.
    PlatformDefault bool
    When set, this proxy will be the default proxy for new remote repositories and for internal HTTP requests issued by Artifactory. Will also be used as proxy for all other services in the platform (for example: Xray, Distribution, etc).
    Port int
    The proxy port number.
    RedirectToHosts []string
    An optional list of host names to which this proxy may redirect requests. The credentials defined for the proxy are reused by requests redirected to all of these hosts.
    Services []string
    An optional list of services names to which this proxy be the default of. The options are jfrt, jfmc, jfxr, jfds.
    Username string
    The proxy username when authentication credentials are required.
    host String
    The name of the proxy host.
    key String
    The unique ID of the proxy.
    ntDomain String
    The proxy domain/realm name.
    ntHost String
    The computer name of the machine (the machine connecting to the NTLM proxy).
    password String
    The proxy password when authentication credentials are required.
    platformDefault Boolean
    When set, this proxy will be the default proxy for new remote repositories and for internal HTTP requests issued by Artifactory. Will also be used as proxy for all other services in the platform (for example: Xray, Distribution, etc).
    port Integer
    The proxy port number.
    redirectToHosts List<String>
    An optional list of host names to which this proxy may redirect requests. The credentials defined for the proxy are reused by requests redirected to all of these hosts.
    services List<String>
    An optional list of services names to which this proxy be the default of. The options are jfrt, jfmc, jfxr, jfds.
    username String
    The proxy username when authentication credentials are required.
    host string
    The name of the proxy host.
    key string
    The unique ID of the proxy.
    ntDomain string
    The proxy domain/realm name.
    ntHost string
    The computer name of the machine (the machine connecting to the NTLM proxy).
    password string
    The proxy password when authentication credentials are required.
    platformDefault boolean
    When set, this proxy will be the default proxy for new remote repositories and for internal HTTP requests issued by Artifactory. Will also be used as proxy for all other services in the platform (for example: Xray, Distribution, etc).
    port number
    The proxy port number.
    redirectToHosts string[]
    An optional list of host names to which this proxy may redirect requests. The credentials defined for the proxy are reused by requests redirected to all of these hosts.
    services string[]
    An optional list of services names to which this proxy be the default of. The options are jfrt, jfmc, jfxr, jfds.
    username string
    The proxy username when authentication credentials are required.
    host str
    The name of the proxy host.
    key str
    The unique ID of the proxy.
    nt_domain str
    The proxy domain/realm name.
    nt_host str
    The computer name of the machine (the machine connecting to the NTLM proxy).
    password str
    The proxy password when authentication credentials are required.
    platform_default bool
    When set, this proxy will be the default proxy for new remote repositories and for internal HTTP requests issued by Artifactory. Will also be used as proxy for all other services in the platform (for example: Xray, Distribution, etc).
    port int
    The proxy port number.
    redirect_to_hosts Sequence[str]
    An optional list of host names to which this proxy may redirect requests. The credentials defined for the proxy are reused by requests redirected to all of these hosts.
    services Sequence[str]
    An optional list of services names to which this proxy be the default of. The options are jfrt, jfmc, jfxr, jfds.
    username str
    The proxy username when authentication credentials are required.
    host String
    The name of the proxy host.
    key String
    The unique ID of the proxy.
    ntDomain String
    The proxy domain/realm name.
    ntHost String
    The computer name of the machine (the machine connecting to the NTLM proxy).
    password String
    The proxy password when authentication credentials are required.
    platformDefault Boolean
    When set, this proxy will be the default proxy for new remote repositories and for internal HTTP requests issued by Artifactory. Will also be used as proxy for all other services in the platform (for example: Xray, Distribution, etc).
    port Number
    The proxy port number.
    redirectToHosts List<String>
    An optional list of host names to which this proxy may redirect requests. The credentials defined for the proxy are reused by requests redirected to all of these hosts.
    services List<String>
    An optional list of services names to which this proxy be the default of. The options are jfrt, jfmc, jfxr, jfds.
    username String
    The proxy username when authentication credentials are required.

    Import

    Current Proxy can be imported using proxy-key from Artifactory as the ID, e.g.

    $ pulumi import artifactory:index/proxy:Proxy my-proxy proxy-key
    

    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.
    artifactory logo
    artifactory v8.1.0 published on Saturday, Sep 28, 2024 by Pulumi