1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. DevOps
  5. RepositoryRef
Oracle Cloud Infrastructure v1.37.0 published on Friday, May 24, 2024 by Pulumi

oci.DevOps.RepositoryRef

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.37.0 published on Friday, May 24, 2024 by Pulumi

    This resource provides the Repository Ref resource in Oracle Cloud Infrastructure Devops service.

    Creates a new reference or updates an existing one.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testRepositoryRef = new oci.devops.RepositoryRef("test_repository_ref", {
        refName: repositoryRefRefName,
        refType: repositoryRefRefType,
        repositoryId: testRepository.id,
        commitId: testCommit.id,
        objectId: testObject.id,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_repository_ref = oci.dev_ops.RepositoryRef("test_repository_ref",
        ref_name=repository_ref_ref_name,
        ref_type=repository_ref_ref_type,
        repository_id=test_repository["id"],
        commit_id=test_commit["id"],
        object_id=test_object["id"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/go/oci/DevOps"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := DevOps.NewRepositoryRef(ctx, "test_repository_ref", &DevOps.RepositoryRefArgs{
    			RefName:      pulumi.Any(repositoryRefRefName),
    			RefType:      pulumi.Any(repositoryRefRefType),
    			RepositoryId: pulumi.Any(testRepository.Id),
    			CommitId:     pulumi.Any(testCommit.Id),
    			ObjectId:     pulumi.Any(testObject.Id),
    		})
    		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 testRepositoryRef = new Oci.DevOps.RepositoryRef("test_repository_ref", new()
        {
            RefName = repositoryRefRefName,
            RefType = repositoryRefRefType,
            RepositoryId = testRepository.Id,
            CommitId = testCommit.Id,
            ObjectId = testObject.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.DevOps.RepositoryRef;
    import com.pulumi.oci.DevOps.RepositoryRefArgs;
    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 testRepositoryRef = new RepositoryRef("testRepositoryRef", RepositoryRefArgs.builder()
                .refName(repositoryRefRefName)
                .refType(repositoryRefRefType)
                .repositoryId(testRepository.id())
                .commitId(testCommit.id())
                .objectId(testObject.id())
                .build());
    
        }
    }
    
    resources:
      testRepositoryRef:
        type: oci:DevOps:RepositoryRef
        name: test_repository_ref
        properties:
          refName: ${repositoryRefRefName}
          refType: ${repositoryRefRefType}
          repositoryId: ${testRepository.id}
          commitId: ${testCommit.id}
          objectId: ${testObject.id}
    

    Create RepositoryRef Resource

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

    Constructor syntax

    new RepositoryRef(name: string, args: RepositoryRefArgs, opts?: CustomResourceOptions);
    @overload
    def RepositoryRef(resource_name: str,
                      args: RepositoryRefArgs,
                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def RepositoryRef(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      ref_name: Optional[str] = None,
                      ref_type: Optional[str] = None,
                      repository_id: Optional[str] = None,
                      commit_id: Optional[str] = None,
                      object_id: Optional[str] = None)
    func NewRepositoryRef(ctx *Context, name string, args RepositoryRefArgs, opts ...ResourceOption) (*RepositoryRef, error)
    public RepositoryRef(string name, RepositoryRefArgs args, CustomResourceOptions? opts = null)
    public RepositoryRef(String name, RepositoryRefArgs args)
    public RepositoryRef(String name, RepositoryRefArgs args, CustomResourceOptions options)
    
    type: oci:DevOps:RepositoryRef
    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 RepositoryRefArgs
    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 RepositoryRefArgs
    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 RepositoryRefArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args RepositoryRefArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args RepositoryRefArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

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

    var repositoryRefResource = new Oci.DevOps.RepositoryRef("repositoryRefResource", new()
    {
        RefName = "string",
        RefType = "string",
        RepositoryId = "string",
        CommitId = "string",
        ObjectId = "string",
    });
    
    example, err := DevOps.NewRepositoryRef(ctx, "repositoryRefResource", &DevOps.RepositoryRefArgs{
    	RefName:      pulumi.String("string"),
    	RefType:      pulumi.String("string"),
    	RepositoryId: pulumi.String("string"),
    	CommitId:     pulumi.String("string"),
    	ObjectId:     pulumi.String("string"),
    })
    
    var repositoryRefResource = new RepositoryRef("repositoryRefResource", RepositoryRefArgs.builder()        
        .refName("string")
        .refType("string")
        .repositoryId("string")
        .commitId("string")
        .objectId("string")
        .build());
    
    repository_ref_resource = oci.dev_ops.RepositoryRef("repositoryRefResource",
        ref_name="string",
        ref_type="string",
        repository_id="string",
        commit_id="string",
        object_id="string")
    
    const repositoryRefResource = new oci.devops.RepositoryRef("repositoryRefResource", {
        refName: "string",
        refType: "string",
        repositoryId: "string",
        commitId: "string",
        objectId: "string",
    });
    
    type: oci:DevOps:RepositoryRef
    properties:
        commitId: string
        objectId: string
        refName: string
        refType: string
        repositoryId: string
    

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

    RefName string
    A filter to return only resources that match the given reference name.
    RefType string
    (Updatable) The type of reference (BRANCH or TAG).
    RepositoryId string

    Unique repository identifier.

    ** 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

    CommitId string
    (Updatable) Commit ID pointed to by the new branch.
    ObjectId string
    (Updatable) SHA-1 hash value of the object pointed to by the tag.
    RefName string
    A filter to return only resources that match the given reference name.
    RefType string
    (Updatable) The type of reference (BRANCH or TAG).
    RepositoryId string

    Unique repository identifier.

    ** 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

    CommitId string
    (Updatable) Commit ID pointed to by the new branch.
    ObjectId string
    (Updatable) SHA-1 hash value of the object pointed to by the tag.
    refName String
    A filter to return only resources that match the given reference name.
    refType String
    (Updatable) The type of reference (BRANCH or TAG).
    repositoryId String

    Unique repository identifier.

    ** 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

    commitId String
    (Updatable) Commit ID pointed to by the new branch.
    objectId String
    (Updatable) SHA-1 hash value of the object pointed to by the tag.
    refName string
    A filter to return only resources that match the given reference name.
    refType string
    (Updatable) The type of reference (BRANCH or TAG).
    repositoryId string

    Unique repository identifier.

    ** 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

    commitId string
    (Updatable) Commit ID pointed to by the new branch.
    objectId string
    (Updatable) SHA-1 hash value of the object pointed to by the tag.
    ref_name str
    A filter to return only resources that match the given reference name.
    ref_type str
    (Updatable) The type of reference (BRANCH or TAG).
    repository_id str

    Unique repository identifier.

    ** 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

    commit_id str
    (Updatable) Commit ID pointed to by the new branch.
    object_id str
    (Updatable) SHA-1 hash value of the object pointed to by the tag.
    refName String
    A filter to return only resources that match the given reference name.
    refType String
    (Updatable) The type of reference (BRANCH or TAG).
    repositoryId String

    Unique repository identifier.

    ** 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

    commitId String
    (Updatable) Commit ID pointed to by the new branch.
    objectId String
    (Updatable) SHA-1 hash value of the object pointed to by the tag.

    Outputs

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

    DefinedTags Dictionary<string, object>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. See Resource Tags. Example: {"foo-namespace.bar-key": "value"}
    FreeformTags Dictionary<string, object>
    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See Resource Tags. Example: {"bar-key": "value"}
    FullRefName string
    Unique full reference name inside a repository.
    Id string
    The provider-assigned unique ID for this managed resource.
    DefinedTags map[string]interface{}
    Defined tags for this resource. Each key is predefined and scoped to a namespace. See Resource Tags. Example: {"foo-namespace.bar-key": "value"}
    FreeformTags map[string]interface{}
    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See Resource Tags. Example: {"bar-key": "value"}
    FullRefName string
    Unique full reference name inside a repository.
    Id string
    The provider-assigned unique ID for this managed resource.
    definedTags Map<String,Object>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. See Resource Tags. Example: {"foo-namespace.bar-key": "value"}
    freeformTags Map<String,Object>
    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See Resource Tags. Example: {"bar-key": "value"}
    fullRefName String
    Unique full reference name inside a repository.
    id String
    The provider-assigned unique ID for this managed resource.
    definedTags {[key: string]: any}
    Defined tags for this resource. Each key is predefined and scoped to a namespace. See Resource Tags. Example: {"foo-namespace.bar-key": "value"}
    freeformTags {[key: string]: any}
    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See Resource Tags. Example: {"bar-key": "value"}
    fullRefName string
    Unique full reference name inside a repository.
    id string
    The provider-assigned unique ID for this managed resource.
    defined_tags Mapping[str, Any]
    Defined tags for this resource. Each key is predefined and scoped to a namespace. See Resource Tags. Example: {"foo-namespace.bar-key": "value"}
    freeform_tags Mapping[str, Any]
    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See Resource Tags. Example: {"bar-key": "value"}
    full_ref_name str
    Unique full reference name inside a repository.
    id str
    The provider-assigned unique ID for this managed resource.
    definedTags Map<Any>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. See Resource Tags. Example: {"foo-namespace.bar-key": "value"}
    freeformTags Map<Any>
    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See Resource Tags. Example: {"bar-key": "value"}
    fullRefName String
    Unique full reference name inside a repository.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing RepositoryRef Resource

    Get an existing RepositoryRef 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?: RepositoryRefState, opts?: CustomResourceOptions): RepositoryRef
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            commit_id: Optional[str] = None,
            defined_tags: Optional[Mapping[str, Any]] = None,
            freeform_tags: Optional[Mapping[str, Any]] = None,
            full_ref_name: Optional[str] = None,
            object_id: Optional[str] = None,
            ref_name: Optional[str] = None,
            ref_type: Optional[str] = None,
            repository_id: Optional[str] = None) -> RepositoryRef
    func GetRepositoryRef(ctx *Context, name string, id IDInput, state *RepositoryRefState, opts ...ResourceOption) (*RepositoryRef, error)
    public static RepositoryRef Get(string name, Input<string> id, RepositoryRefState? state, CustomResourceOptions? opts = null)
    public static RepositoryRef get(String name, Output<String> id, RepositoryRefState 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:
    CommitId string
    (Updatable) Commit ID pointed to by the new branch.
    DefinedTags Dictionary<string, object>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. See Resource Tags. Example: {"foo-namespace.bar-key": "value"}
    FreeformTags Dictionary<string, object>
    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See Resource Tags. Example: {"bar-key": "value"}
    FullRefName string
    Unique full reference name inside a repository.
    ObjectId string
    (Updatable) SHA-1 hash value of the object pointed to by the tag.
    RefName string
    A filter to return only resources that match the given reference name.
    RefType string
    (Updatable) The type of reference (BRANCH or TAG).
    RepositoryId string

    Unique repository identifier.

    ** 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

    CommitId string
    (Updatable) Commit ID pointed to by the new branch.
    DefinedTags map[string]interface{}
    Defined tags for this resource. Each key is predefined and scoped to a namespace. See Resource Tags. Example: {"foo-namespace.bar-key": "value"}
    FreeformTags map[string]interface{}
    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See Resource Tags. Example: {"bar-key": "value"}
    FullRefName string
    Unique full reference name inside a repository.
    ObjectId string
    (Updatable) SHA-1 hash value of the object pointed to by the tag.
    RefName string
    A filter to return only resources that match the given reference name.
    RefType string
    (Updatable) The type of reference (BRANCH or TAG).
    RepositoryId string

    Unique repository identifier.

    ** 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

    commitId String
    (Updatable) Commit ID pointed to by the new branch.
    definedTags Map<String,Object>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. See Resource Tags. Example: {"foo-namespace.bar-key": "value"}
    freeformTags Map<String,Object>
    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See Resource Tags. Example: {"bar-key": "value"}
    fullRefName String
    Unique full reference name inside a repository.
    objectId String
    (Updatable) SHA-1 hash value of the object pointed to by the tag.
    refName String
    A filter to return only resources that match the given reference name.
    refType String
    (Updatable) The type of reference (BRANCH or TAG).
    repositoryId String

    Unique repository identifier.

    ** 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

    commitId string
    (Updatable) Commit ID pointed to by the new branch.
    definedTags {[key: string]: any}
    Defined tags for this resource. Each key is predefined and scoped to a namespace. See Resource Tags. Example: {"foo-namespace.bar-key": "value"}
    freeformTags {[key: string]: any}
    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See Resource Tags. Example: {"bar-key": "value"}
    fullRefName string
    Unique full reference name inside a repository.
    objectId string
    (Updatable) SHA-1 hash value of the object pointed to by the tag.
    refName string
    A filter to return only resources that match the given reference name.
    refType string
    (Updatable) The type of reference (BRANCH or TAG).
    repositoryId string

    Unique repository identifier.

    ** 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

    commit_id str
    (Updatable) Commit ID pointed to by the new branch.
    defined_tags Mapping[str, Any]
    Defined tags for this resource. Each key is predefined and scoped to a namespace. See Resource Tags. Example: {"foo-namespace.bar-key": "value"}
    freeform_tags Mapping[str, Any]
    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See Resource Tags. Example: {"bar-key": "value"}
    full_ref_name str
    Unique full reference name inside a repository.
    object_id str
    (Updatable) SHA-1 hash value of the object pointed to by the tag.
    ref_name str
    A filter to return only resources that match the given reference name.
    ref_type str
    (Updatable) The type of reference (BRANCH or TAG).
    repository_id str

    Unique repository identifier.

    ** 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

    commitId String
    (Updatable) Commit ID pointed to by the new branch.
    definedTags Map<Any>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. See Resource Tags. Example: {"foo-namespace.bar-key": "value"}
    freeformTags Map<Any>
    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See Resource Tags. Example: {"bar-key": "value"}
    fullRefName String
    Unique full reference name inside a repository.
    objectId String
    (Updatable) SHA-1 hash value of the object pointed to by the tag.
    refName String
    A filter to return only resources that match the given reference name.
    refType String
    (Updatable) The type of reference (BRANCH or TAG).
    repositoryId String

    Unique repository identifier.

    ** 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

    Import

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

    $ pulumi import oci:DevOps/repositoryRef:RepositoryRef test_repository_ref "repositories/{repositoryId}/refs/{refName}"
    

    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 v1.37.0 published on Friday, May 24, 2024 by Pulumi