1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Artifacts
  5. Repository
Oracle Cloud Infrastructure v1.29.0 published on Thursday, Mar 28, 2024 by Pulumi

oci.Artifacts.Repository

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.29.0 published on Thursday, Mar 28, 2024 by Pulumi

    This resource provides the Repository resource in Oracle Cloud Infrastructure Artifacts service.

    Creates a new repository for storing artifacts.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testRepository = new oci.artifacts.Repository("testRepository", {
        compartmentId: _var.compartment_id,
        isImmutable: _var.repository_is_immutable,
        repositoryType: _var.repository_repository_type,
        definedTags: {
            "Operations.CostCenter": "42",
        },
        description: _var.repository_description,
        displayName: _var.repository_display_name,
        freeformTags: {
            Department: "Finance",
        },
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_repository = oci.artifacts.Repository("testRepository",
        compartment_id=var["compartment_id"],
        is_immutable=var["repository_is_immutable"],
        repository_type=var["repository_repository_type"],
        defined_tags={
            "Operations.CostCenter": "42",
        },
        description=var["repository_description"],
        display_name=var["repository_display_name"],
        freeform_tags={
            "Department": "Finance",
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/go/oci/Artifacts"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := Artifacts.NewRepository(ctx, "testRepository", &Artifacts.RepositoryArgs{
    			CompartmentId:  pulumi.Any(_var.Compartment_id),
    			IsImmutable:    pulumi.Any(_var.Repository_is_immutable),
    			RepositoryType: pulumi.Any(_var.Repository_repository_type),
    			DefinedTags: pulumi.Map{
    				"Operations.CostCenter": pulumi.Any("42"),
    			},
    			Description: pulumi.Any(_var.Repository_description),
    			DisplayName: pulumi.Any(_var.Repository_display_name),
    			FreeformTags: pulumi.Map{
    				"Department": pulumi.Any("Finance"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Oci = Pulumi.Oci;
    
    return await Deployment.RunAsync(() => 
    {
        var testRepository = new Oci.Artifacts.Repository("testRepository", new()
        {
            CompartmentId = @var.Compartment_id,
            IsImmutable = @var.Repository_is_immutable,
            RepositoryType = @var.Repository_repository_type,
            DefinedTags = 
            {
                { "Operations.CostCenter", "42" },
            },
            Description = @var.Repository_description,
            DisplayName = @var.Repository_display_name,
            FreeformTags = 
            {
                { "Department", "Finance" },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.Artifacts.Repository;
    import com.pulumi.oci.Artifacts.RepositoryArgs;
    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 testRepository = new Repository("testRepository", RepositoryArgs.builder()        
                .compartmentId(var_.compartment_id())
                .isImmutable(var_.repository_is_immutable())
                .repositoryType(var_.repository_repository_type())
                .definedTags(Map.of("Operations.CostCenter", "42"))
                .description(var_.repository_description())
                .displayName(var_.repository_display_name())
                .freeformTags(Map.of("Department", "Finance"))
                .build());
    
        }
    }
    
    resources:
      testRepository:
        type: oci:Artifacts:Repository
        properties:
          #Required
          compartmentId: ${var.compartment_id}
          isImmutable: ${var.repository_is_immutable}
          repositoryType: ${var.repository_repository_type}
          #Optional
          definedTags:
            Operations.CostCenter: '42'
          description: ${var.repository_description}
          displayName: ${var.repository_display_name}
          freeformTags:
            Department: Finance
    

    Create Repository Resource

    new Repository(name: string, args: RepositoryArgs, opts?: CustomResourceOptions);
    @overload
    def Repository(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   compartment_id: Optional[str] = None,
                   defined_tags: Optional[Mapping[str, Any]] = None,
                   description: Optional[str] = None,
                   display_name: Optional[str] = None,
                   freeform_tags: Optional[Mapping[str, Any]] = None,
                   is_immutable: Optional[bool] = None,
                   repository_type: Optional[str] = None)
    @overload
    def Repository(resource_name: str,
                   args: RepositoryArgs,
                   opts: Optional[ResourceOptions] = None)
    func NewRepository(ctx *Context, name string, args RepositoryArgs, opts ...ResourceOption) (*Repository, error)
    public Repository(string name, RepositoryArgs args, CustomResourceOptions? opts = null)
    public Repository(String name, RepositoryArgs args)
    public Repository(String name, RepositoryArgs args, CustomResourceOptions options)
    
    type: oci:Artifacts:Repository
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args RepositoryArgs
    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 RepositoryArgs
    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 RepositoryArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args RepositoryArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args RepositoryArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    CompartmentId string
    (Updatable) The OCID of the repository's compartment.
    IsImmutable bool
    Whether to make the repository immutable. The artifacts of an immutable repository cannot be overwritten.
    RepositoryType string

    (Updatable) The repository's supported artifact type.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    DefinedTags Dictionary<string, object>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    Description string
    (Updatable) A short description of the repository. It can be updated later.
    DisplayName string
    (Updatable) A user-friendly display name for the repository. If not present, will be auto-generated. It can be modified later. Avoid entering confidential information.
    FreeformTags Dictionary<string, object>
    (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    CompartmentId string
    (Updatable) The OCID of the repository's compartment.
    IsImmutable bool
    Whether to make the repository immutable. The artifacts of an immutable repository cannot be overwritten.
    RepositoryType string

    (Updatable) The repository's supported artifact type.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    DefinedTags map[string]interface{}
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    Description string
    (Updatable) A short description of the repository. It can be updated later.
    DisplayName string
    (Updatable) A user-friendly display name for the repository. If not present, will be auto-generated. It can be modified later. Avoid entering confidential information.
    FreeformTags map[string]interface{}
    (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    compartmentId String
    (Updatable) The OCID of the repository's compartment.
    isImmutable Boolean
    Whether to make the repository immutable. The artifacts of an immutable repository cannot be overwritten.
    repositoryType String

    (Updatable) The repository's supported artifact type.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    definedTags Map<String,Object>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    description String
    (Updatable) A short description of the repository. It can be updated later.
    displayName String
    (Updatable) A user-friendly display name for the repository. If not present, will be auto-generated. It can be modified later. Avoid entering confidential information.
    freeformTags Map<String,Object>
    (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    compartmentId string
    (Updatable) The OCID of the repository's compartment.
    isImmutable boolean
    Whether to make the repository immutable. The artifacts of an immutable repository cannot be overwritten.
    repositoryType string

    (Updatable) The repository's supported artifact type.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    definedTags {[key: string]: any}
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    description string
    (Updatable) A short description of the repository. It can be updated later.
    displayName string
    (Updatable) A user-friendly display name for the repository. If not present, will be auto-generated. It can be modified later. Avoid entering confidential information.
    freeformTags {[key: string]: any}
    (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    compartment_id str
    (Updatable) The OCID of the repository's compartment.
    is_immutable bool
    Whether to make the repository immutable. The artifacts of an immutable repository cannot be overwritten.
    repository_type str

    (Updatable) The repository's supported artifact type.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    defined_tags Mapping[str, Any]
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    description str
    (Updatable) A short description of the repository. It can be updated later.
    display_name str
    (Updatable) A user-friendly display name for the repository. If not present, will be auto-generated. It can be modified later. Avoid entering confidential information.
    freeform_tags Mapping[str, Any]
    (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    compartmentId String
    (Updatable) The OCID of the repository's compartment.
    isImmutable Boolean
    Whether to make the repository immutable. The artifacts of an immutable repository cannot be overwritten.
    repositoryType String

    (Updatable) The repository's supported artifact type.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    definedTags Map<Any>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    description String
    (Updatable) A short description of the repository. It can be updated later.
    displayName String
    (Updatable) A user-friendly display name for the repository. If not present, will be auto-generated. It can be modified later. Avoid entering confidential information.
    freeformTags Map<Any>
    (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    State string
    The current state of the repository.
    TimeCreated string
    An RFC 3339 timestamp indicating when the repository was created.
    Id string
    The provider-assigned unique ID for this managed resource.
    State string
    The current state of the repository.
    TimeCreated string
    An RFC 3339 timestamp indicating when the repository was created.
    id String
    The provider-assigned unique ID for this managed resource.
    state String
    The current state of the repository.
    timeCreated String
    An RFC 3339 timestamp indicating when the repository was created.
    id string
    The provider-assigned unique ID for this managed resource.
    state string
    The current state of the repository.
    timeCreated string
    An RFC 3339 timestamp indicating when the repository was created.
    id str
    The provider-assigned unique ID for this managed resource.
    state str
    The current state of the repository.
    time_created str
    An RFC 3339 timestamp indicating when the repository was created.
    id String
    The provider-assigned unique ID for this managed resource.
    state String
    The current state of the repository.
    timeCreated String
    An RFC 3339 timestamp indicating when the repository was created.

    Look up Existing Repository Resource

    Get an existing Repository 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?: RepositoryState, opts?: CustomResourceOptions): Repository
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            compartment_id: Optional[str] = None,
            defined_tags: Optional[Mapping[str, Any]] = None,
            description: Optional[str] = None,
            display_name: Optional[str] = None,
            freeform_tags: Optional[Mapping[str, Any]] = None,
            is_immutable: Optional[bool] = None,
            repository_type: Optional[str] = None,
            state: Optional[str] = None,
            time_created: Optional[str] = None) -> Repository
    func GetRepository(ctx *Context, name string, id IDInput, state *RepositoryState, opts ...ResourceOption) (*Repository, error)
    public static Repository Get(string name, Input<string> id, RepositoryState? state, CustomResourceOptions? opts = null)
    public static Repository get(String name, Output<String> id, RepositoryState 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:
    CompartmentId string
    (Updatable) The OCID of the repository's compartment.
    DefinedTags Dictionary<string, object>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    Description string
    (Updatable) A short description of the repository. It can be updated later.
    DisplayName string
    (Updatable) A user-friendly display name for the repository. If not present, will be auto-generated. It can be modified later. Avoid entering confidential information.
    FreeformTags Dictionary<string, object>
    (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    IsImmutable bool
    Whether to make the repository immutable. The artifacts of an immutable repository cannot be overwritten.
    RepositoryType string

    (Updatable) The repository's supported artifact type.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    State string
    The current state of the repository.
    TimeCreated string
    An RFC 3339 timestamp indicating when the repository was created.
    CompartmentId string
    (Updatable) The OCID of the repository's compartment.
    DefinedTags map[string]interface{}
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    Description string
    (Updatable) A short description of the repository. It can be updated later.
    DisplayName string
    (Updatable) A user-friendly display name for the repository. If not present, will be auto-generated. It can be modified later. Avoid entering confidential information.
    FreeformTags map[string]interface{}
    (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    IsImmutable bool
    Whether to make the repository immutable. The artifacts of an immutable repository cannot be overwritten.
    RepositoryType string

    (Updatable) The repository's supported artifact type.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    State string
    The current state of the repository.
    TimeCreated string
    An RFC 3339 timestamp indicating when the repository was created.
    compartmentId String
    (Updatable) The OCID of the repository's compartment.
    definedTags Map<String,Object>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    description String
    (Updatable) A short description of the repository. It can be updated later.
    displayName String
    (Updatable) A user-friendly display name for the repository. If not present, will be auto-generated. It can be modified later. Avoid entering confidential information.
    freeformTags Map<String,Object>
    (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    isImmutable Boolean
    Whether to make the repository immutable. The artifacts of an immutable repository cannot be overwritten.
    repositoryType String

    (Updatable) The repository's supported artifact type.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    state String
    The current state of the repository.
    timeCreated String
    An RFC 3339 timestamp indicating when the repository was created.
    compartmentId string
    (Updatable) The OCID of the repository's compartment.
    definedTags {[key: string]: any}
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    description string
    (Updatable) A short description of the repository. It can be updated later.
    displayName string
    (Updatable) A user-friendly display name for the repository. If not present, will be auto-generated. It can be modified later. Avoid entering confidential information.
    freeformTags {[key: string]: any}
    (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    isImmutable boolean
    Whether to make the repository immutable. The artifacts of an immutable repository cannot be overwritten.
    repositoryType string

    (Updatable) The repository's supported artifact type.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    state string
    The current state of the repository.
    timeCreated string
    An RFC 3339 timestamp indicating when the repository was created.
    compartment_id str
    (Updatable) The OCID of the repository's compartment.
    defined_tags Mapping[str, Any]
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    description str
    (Updatable) A short description of the repository. It can be updated later.
    display_name str
    (Updatable) A user-friendly display name for the repository. If not present, will be auto-generated. It can be modified later. Avoid entering confidential information.
    freeform_tags Mapping[str, Any]
    (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    is_immutable bool
    Whether to make the repository immutable. The artifacts of an immutable repository cannot be overwritten.
    repository_type str

    (Updatable) The repository's supported artifact type.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    state str
    The current state of the repository.
    time_created str
    An RFC 3339 timestamp indicating when the repository was created.
    compartmentId String
    (Updatable) The OCID of the repository's compartment.
    definedTags Map<Any>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    description String
    (Updatable) A short description of the repository. It can be updated later.
    displayName String
    (Updatable) A user-friendly display name for the repository. If not present, will be auto-generated. It can be modified later. Avoid entering confidential information.
    freeformTags Map<Any>
    (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    isImmutable Boolean
    Whether to make the repository immutable. The artifacts of an immutable repository cannot be overwritten.
    repositoryType String

    (Updatable) The repository's supported artifact type.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    state String
    The current state of the repository.
    timeCreated String
    An RFC 3339 timestamp indicating when the repository was created.

    Import

    Repositories can be imported using the id, e.g.

    $ pulumi import oci:Artifacts/repository:Repository test_repository "id"
    

    Package Details

    Repository
    oci pulumi/pulumi-oci
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the oci Terraform Provider.
    oci logo
    Oracle Cloud Infrastructure v1.29.0 published on Thursday, Mar 28, 2024 by Pulumi