1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Artifacts
  5. Repository
Oracle Cloud Infrastructure v2.2.0 published on Friday, Jul 12, 2024 by Pulumi

oci.Artifacts.Repository

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v2.2.0 published on Friday, Jul 12, 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("test_repository", {
        compartmentId: compartmentId,
        isImmutable: repositoryIsImmutable,
        repositoryType: repositoryRepositoryType,
        definedTags: {
            "Operations.CostCenter": "42",
        },
        description: repositoryDescription,
        displayName: repositoryDisplayName,
        freeformTags: {
            Department: "Finance",
        },
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_repository = oci.artifacts.Repository("test_repository",
        compartment_id=compartment_id,
        is_immutable=repository_is_immutable,
        repository_type=repository_repository_type,
        defined_tags={
            "Operations.CostCenter": "42",
        },
        description=repository_description,
        display_name=repository_display_name,
        freeform_tags={
            "Department": "Finance",
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/Artifacts"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := Artifacts.NewRepository(ctx, "test_repository", &Artifacts.RepositoryArgs{
    			CompartmentId:  pulumi.Any(compartmentId),
    			IsImmutable:    pulumi.Any(repositoryIsImmutable),
    			RepositoryType: pulumi.Any(repositoryRepositoryType),
    			DefinedTags: pulumi.Map{
    				"Operations.CostCenter": pulumi.Any("42"),
    			},
    			Description: pulumi.Any(repositoryDescription),
    			DisplayName: pulumi.Any(repositoryDisplayName),
    			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("test_repository", new()
        {
            CompartmentId = compartmentId,
            IsImmutable = repositoryIsImmutable,
            RepositoryType = repositoryRepositoryType,
            DefinedTags = 
            {
                { "Operations.CostCenter", "42" },
            },
            Description = repositoryDescription,
            DisplayName = repositoryDisplayName,
            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(compartmentId)
                .isImmutable(repositoryIsImmutable)
                .repositoryType(repositoryRepositoryType)
                .definedTags(Map.of("Operations.CostCenter", "42"))
                .description(repositoryDescription)
                .displayName(repositoryDisplayName)
                .freeformTags(Map.of("Department", "Finance"))
                .build());
    
        }
    }
    
    resources:
      testRepository:
        type: oci:Artifacts:Repository
        name: test_repository
        properties:
          compartmentId: ${compartmentId}
          isImmutable: ${repositoryIsImmutable}
          repositoryType: ${repositoryRepositoryType}
          definedTags:
            Operations.CostCenter: '42'
          description: ${repositoryDescription}
          displayName: ${repositoryDisplayName}
          freeformTags:
            Department: Finance
    

    Create Repository Resource

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

    Constructor syntax

    new Repository(name: string, args: RepositoryArgs, opts?: CustomResourceOptions);
    @overload
    def Repository(resource_name: str,
                   args: RepositoryArgs,
                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def Repository(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   compartment_id: Optional[str] = None,
                   is_immutable: Optional[bool] = None,
                   repository_type: 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)
    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.
    
    

    Parameters

    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.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var repositoryResource = new Oci.Artifacts.Repository("repositoryResource", new()
    {
        CompartmentId = "string",
        IsImmutable = false,
        RepositoryType = "string",
        DefinedTags = 
        {
            { "string", "any" },
        },
        Description = "string",
        DisplayName = "string",
        FreeformTags = 
        {
            { "string", "any" },
        },
    });
    
    example, err := Artifacts.NewRepository(ctx, "repositoryResource", &Artifacts.RepositoryArgs{
    	CompartmentId:  pulumi.String("string"),
    	IsImmutable:    pulumi.Bool(false),
    	RepositoryType: pulumi.String("string"),
    	DefinedTags: pulumi.Map{
    		"string": pulumi.Any("any"),
    	},
    	Description: pulumi.String("string"),
    	DisplayName: pulumi.String("string"),
    	FreeformTags: pulumi.Map{
    		"string": pulumi.Any("any"),
    	},
    })
    
    var repositoryResource = new Repository("repositoryResource", RepositoryArgs.builder()
        .compartmentId("string")
        .isImmutable(false)
        .repositoryType("string")
        .definedTags(Map.of("string", "any"))
        .description("string")
        .displayName("string")
        .freeformTags(Map.of("string", "any"))
        .build());
    
    repository_resource = oci.artifacts.Repository("repositoryResource",
        compartment_id="string",
        is_immutable=False,
        repository_type="string",
        defined_tags={
            "string": "any",
        },
        description="string",
        display_name="string",
        freeform_tags={
            "string": "any",
        })
    
    const repositoryResource = new oci.artifacts.Repository("repositoryResource", {
        compartmentId: "string",
        isImmutable: false,
        repositoryType: "string",
        definedTags: {
            string: "any",
        },
        description: "string",
        displayName: "string",
        freeformTags: {
            string: "any",
        },
    });
    
    type: oci:Artifacts:Repository
    properties:
        compartmentId: string
        definedTags:
            string: any
        description: string
        displayName: string
        freeformTags:
            string: any
        isImmutable: false
        repositoryType: string
    

    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"
    

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

    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 v2.2.0 published on Friday, Jul 12, 2024 by Pulumi