1. Packages
  2. Databricks
  3. API Docs
  4. ArtifactAllowlist
Databricks v1.56.0 published on Tuesday, Nov 12, 2024 by Pulumi

databricks.ArtifactAllowlist

Explore with Pulumi AI

databricks logo
Databricks v1.56.0 published on Tuesday, Nov 12, 2024 by Pulumi

    It is required to define all allowlist for an artifact type in a single resource, otherwise Pulumi cannot guarantee config drift prevention.

    This resource can only be used with a workspace-level provider!

    In Databricks Runtime 13.3 and above, you can add libraries and init scripts to the allowlist in UC so that users can leverage these artifacts on compute configured with shared access mode.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as databricks from "@pulumi/databricks";
    
    const initScripts = new databricks.ArtifactAllowlist("init_scripts", {
        artifactType: "INIT_SCRIPT",
        artifactMatchers: [{
            artifact: "/Volumes/inits",
            matchType: "PREFIX_MATCH",
        }],
    });
    
    import pulumi
    import pulumi_databricks as databricks
    
    init_scripts = databricks.ArtifactAllowlist("init_scripts",
        artifact_type="INIT_SCRIPT",
        artifact_matchers=[{
            "artifact": "/Volumes/inits",
            "match_type": "PREFIX_MATCH",
        }])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-databricks/sdk/go/databricks"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := databricks.NewArtifactAllowlist(ctx, "init_scripts", &databricks.ArtifactAllowlistArgs{
    			ArtifactType: pulumi.String("INIT_SCRIPT"),
    			ArtifactMatchers: databricks.ArtifactAllowlistArtifactMatcherArray{
    				&databricks.ArtifactAllowlistArtifactMatcherArgs{
    					Artifact:  pulumi.String("/Volumes/inits"),
    					MatchType: pulumi.String("PREFIX_MATCH"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Databricks = Pulumi.Databricks;
    
    return await Deployment.RunAsync(() => 
    {
        var initScripts = new Databricks.ArtifactAllowlist("init_scripts", new()
        {
            ArtifactType = "INIT_SCRIPT",
            ArtifactMatchers = new[]
            {
                new Databricks.Inputs.ArtifactAllowlistArtifactMatcherArgs
                {
                    Artifact = "/Volumes/inits",
                    MatchType = "PREFIX_MATCH",
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.databricks.ArtifactAllowlist;
    import com.pulumi.databricks.ArtifactAllowlistArgs;
    import com.pulumi.databricks.inputs.ArtifactAllowlistArtifactMatcherArgs;
    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 initScripts = new ArtifactAllowlist("initScripts", ArtifactAllowlistArgs.builder()
                .artifactType("INIT_SCRIPT")
                .artifactMatchers(ArtifactAllowlistArtifactMatcherArgs.builder()
                    .artifact("/Volumes/inits")
                    .matchType("PREFIX_MATCH")
                    .build())
                .build());
    
        }
    }
    
    resources:
      initScripts:
        type: databricks:ArtifactAllowlist
        name: init_scripts
        properties:
          artifactType: INIT_SCRIPT
          artifactMatchers:
            - artifact: /Volumes/inits
              matchType: PREFIX_MATCH
    

    The following resources are used in the same context:

    Create ArtifactAllowlist Resource

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

    Constructor syntax

    new ArtifactAllowlist(name: string, args: ArtifactAllowlistArgs, opts?: CustomResourceOptions);
    @overload
    def ArtifactAllowlist(resource_name: str,
                          args: ArtifactAllowlistArgs,
                          opts: Optional[ResourceOptions] = None)
    
    @overload
    def ArtifactAllowlist(resource_name: str,
                          opts: Optional[ResourceOptions] = None,
                          artifact_matchers: Optional[Sequence[ArtifactAllowlistArtifactMatcherArgs]] = None,
                          artifact_type: Optional[str] = None,
                          created_at: Optional[int] = None,
                          created_by: Optional[str] = None,
                          metastore_id: Optional[str] = None)
    func NewArtifactAllowlist(ctx *Context, name string, args ArtifactAllowlistArgs, opts ...ResourceOption) (*ArtifactAllowlist, error)
    public ArtifactAllowlist(string name, ArtifactAllowlistArgs args, CustomResourceOptions? opts = null)
    public ArtifactAllowlist(String name, ArtifactAllowlistArgs args)
    public ArtifactAllowlist(String name, ArtifactAllowlistArgs args, CustomResourceOptions options)
    
    type: databricks:ArtifactAllowlist
    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 ArtifactAllowlistArgs
    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 ArtifactAllowlistArgs
    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 ArtifactAllowlistArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ArtifactAllowlistArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ArtifactAllowlistArgs
    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 artifactAllowlistResource = new Databricks.ArtifactAllowlist("artifactAllowlistResource", new()
    {
        ArtifactMatchers = new[]
        {
            new Databricks.Inputs.ArtifactAllowlistArtifactMatcherArgs
            {
                Artifact = "string",
                MatchType = "string",
            },
        },
        ArtifactType = "string",
        CreatedAt = 0,
        CreatedBy = "string",
        MetastoreId = "string",
    });
    
    example, err := databricks.NewArtifactAllowlist(ctx, "artifactAllowlistResource", &databricks.ArtifactAllowlistArgs{
    	ArtifactMatchers: databricks.ArtifactAllowlistArtifactMatcherArray{
    		&databricks.ArtifactAllowlistArtifactMatcherArgs{
    			Artifact:  pulumi.String("string"),
    			MatchType: pulumi.String("string"),
    		},
    	},
    	ArtifactType: pulumi.String("string"),
    	CreatedAt:    pulumi.Int(0),
    	CreatedBy:    pulumi.String("string"),
    	MetastoreId:  pulumi.String("string"),
    })
    
    var artifactAllowlistResource = new ArtifactAllowlist("artifactAllowlistResource", ArtifactAllowlistArgs.builder()
        .artifactMatchers(ArtifactAllowlistArtifactMatcherArgs.builder()
            .artifact("string")
            .matchType("string")
            .build())
        .artifactType("string")
        .createdAt(0)
        .createdBy("string")
        .metastoreId("string")
        .build());
    
    artifact_allowlist_resource = databricks.ArtifactAllowlist("artifactAllowlistResource",
        artifact_matchers=[{
            "artifact": "string",
            "match_type": "string",
        }],
        artifact_type="string",
        created_at=0,
        created_by="string",
        metastore_id="string")
    
    const artifactAllowlistResource = new databricks.ArtifactAllowlist("artifactAllowlistResource", {
        artifactMatchers: [{
            artifact: "string",
            matchType: "string",
        }],
        artifactType: "string",
        createdAt: 0,
        createdBy: "string",
        metastoreId: "string",
    });
    
    type: databricks:ArtifactAllowlist
    properties:
        artifactMatchers:
            - artifact: string
              matchType: string
        artifactType: string
        createdAt: 0
        createdBy: string
        metastoreId: string
    

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

    ArtifactMatchers List<ArtifactAllowlistArtifactMatcher>
    ArtifactType string
    The artifact type of the allowlist. Can be INIT_SCRIPT, LIBRARY_JAR or LIBRARY_MAVEN. Change forces creation of a new resource.
    CreatedAt int
    Time at which this artifact allowlist was set.
    CreatedBy string
    Identity that set the artifact allowlist.
    MetastoreId string
    ID of the parent metastore.
    ArtifactMatchers []ArtifactAllowlistArtifactMatcherArgs
    ArtifactType string
    The artifact type of the allowlist. Can be INIT_SCRIPT, LIBRARY_JAR or LIBRARY_MAVEN. Change forces creation of a new resource.
    CreatedAt int
    Time at which this artifact allowlist was set.
    CreatedBy string
    Identity that set the artifact allowlist.
    MetastoreId string
    ID of the parent metastore.
    artifactMatchers List<ArtifactAllowlistArtifactMatcher>
    artifactType String
    The artifact type of the allowlist. Can be INIT_SCRIPT, LIBRARY_JAR or LIBRARY_MAVEN. Change forces creation of a new resource.
    createdAt Integer
    Time at which this artifact allowlist was set.
    createdBy String
    Identity that set the artifact allowlist.
    metastoreId String
    ID of the parent metastore.
    artifactMatchers ArtifactAllowlistArtifactMatcher[]
    artifactType string
    The artifact type of the allowlist. Can be INIT_SCRIPT, LIBRARY_JAR or LIBRARY_MAVEN. Change forces creation of a new resource.
    createdAt number
    Time at which this artifact allowlist was set.
    createdBy string
    Identity that set the artifact allowlist.
    metastoreId string
    ID of the parent metastore.
    artifact_matchers Sequence[ArtifactAllowlistArtifactMatcherArgs]
    artifact_type str
    The artifact type of the allowlist. Can be INIT_SCRIPT, LIBRARY_JAR or LIBRARY_MAVEN. Change forces creation of a new resource.
    created_at int
    Time at which this artifact allowlist was set.
    created_by str
    Identity that set the artifact allowlist.
    metastore_id str
    ID of the parent metastore.
    artifactMatchers List<Property Map>
    artifactType String
    The artifact type of the allowlist. Can be INIT_SCRIPT, LIBRARY_JAR or LIBRARY_MAVEN. Change forces creation of a new resource.
    createdAt Number
    Time at which this artifact allowlist was set.
    createdBy String
    Identity that set the artifact allowlist.
    metastoreId String
    ID of the parent metastore.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ArtifactAllowlist 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 ArtifactAllowlist Resource

    Get an existing ArtifactAllowlist 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?: ArtifactAllowlistState, opts?: CustomResourceOptions): ArtifactAllowlist
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            artifact_matchers: Optional[Sequence[ArtifactAllowlistArtifactMatcherArgs]] = None,
            artifact_type: Optional[str] = None,
            created_at: Optional[int] = None,
            created_by: Optional[str] = None,
            metastore_id: Optional[str] = None) -> ArtifactAllowlist
    func GetArtifactAllowlist(ctx *Context, name string, id IDInput, state *ArtifactAllowlistState, opts ...ResourceOption) (*ArtifactAllowlist, error)
    public static ArtifactAllowlist Get(string name, Input<string> id, ArtifactAllowlistState? state, CustomResourceOptions? opts = null)
    public static ArtifactAllowlist get(String name, Output<String> id, ArtifactAllowlistState 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:
    ArtifactMatchers List<ArtifactAllowlistArtifactMatcher>
    ArtifactType string
    The artifact type of the allowlist. Can be INIT_SCRIPT, LIBRARY_JAR or LIBRARY_MAVEN. Change forces creation of a new resource.
    CreatedAt int
    Time at which this artifact allowlist was set.
    CreatedBy string
    Identity that set the artifact allowlist.
    MetastoreId string
    ID of the parent metastore.
    ArtifactMatchers []ArtifactAllowlistArtifactMatcherArgs
    ArtifactType string
    The artifact type of the allowlist. Can be INIT_SCRIPT, LIBRARY_JAR or LIBRARY_MAVEN. Change forces creation of a new resource.
    CreatedAt int
    Time at which this artifact allowlist was set.
    CreatedBy string
    Identity that set the artifact allowlist.
    MetastoreId string
    ID of the parent metastore.
    artifactMatchers List<ArtifactAllowlistArtifactMatcher>
    artifactType String
    The artifact type of the allowlist. Can be INIT_SCRIPT, LIBRARY_JAR or LIBRARY_MAVEN. Change forces creation of a new resource.
    createdAt Integer
    Time at which this artifact allowlist was set.
    createdBy String
    Identity that set the artifact allowlist.
    metastoreId String
    ID of the parent metastore.
    artifactMatchers ArtifactAllowlistArtifactMatcher[]
    artifactType string
    The artifact type of the allowlist. Can be INIT_SCRIPT, LIBRARY_JAR or LIBRARY_MAVEN. Change forces creation of a new resource.
    createdAt number
    Time at which this artifact allowlist was set.
    createdBy string
    Identity that set the artifact allowlist.
    metastoreId string
    ID of the parent metastore.
    artifact_matchers Sequence[ArtifactAllowlistArtifactMatcherArgs]
    artifact_type str
    The artifact type of the allowlist. Can be INIT_SCRIPT, LIBRARY_JAR or LIBRARY_MAVEN. Change forces creation of a new resource.
    created_at int
    Time at which this artifact allowlist was set.
    created_by str
    Identity that set the artifact allowlist.
    metastore_id str
    ID of the parent metastore.
    artifactMatchers List<Property Map>
    artifactType String
    The artifact type of the allowlist. Can be INIT_SCRIPT, LIBRARY_JAR or LIBRARY_MAVEN. Change forces creation of a new resource.
    createdAt Number
    Time at which this artifact allowlist was set.
    createdBy String
    Identity that set the artifact allowlist.
    metastoreId String
    ID of the parent metastore.

    Supporting Types

    ArtifactAllowlistArtifactMatcher, ArtifactAllowlistArtifactMatcherArgs

    Artifact string
    The artifact path or maven coordinate.
    MatchType string
    The pattern matching type of the artifact. Only PREFIX_MATCH is supported.
    Artifact string
    The artifact path or maven coordinate.
    MatchType string
    The pattern matching type of the artifact. Only PREFIX_MATCH is supported.
    artifact String
    The artifact path or maven coordinate.
    matchType String
    The pattern matching type of the artifact. Only PREFIX_MATCH is supported.
    artifact string
    The artifact path or maven coordinate.
    matchType string
    The pattern matching type of the artifact. Only PREFIX_MATCH is supported.
    artifact str
    The artifact path or maven coordinate.
    match_type str
    The pattern matching type of the artifact. Only PREFIX_MATCH is supported.
    artifact String
    The artifact path or maven coordinate.
    matchType String
    The pattern matching type of the artifact. Only PREFIX_MATCH is supported.

    Import

    This resource can be imported by name:

    bash

    $ pulumi import databricks:index/artifactAllowlist:ArtifactAllowlist this '<metastore_id>|<artifact_type>'
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    databricks pulumi/pulumi-databricks
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the databricks Terraform Provider.
    databricks logo
    Databricks v1.56.0 published on Tuesday, Nov 12, 2024 by Pulumi