oci.DevOps.RepositoryRef
Explore with Pulumi AI
This resource provides the Repository Ref resource in Oracle Cloud Infrastructure Devops service.
Creates a new reference or updates an existing one. This API will be deprecated on Wed, 12 June 2024 01:00:00 GMT as it does not get recognized when refName has ‘/’. This will be replaced by “/repositories/{repositoryId}/actions/createOrUpdateGitRef”
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/v2/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.
Constructor 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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The RepositoryRef resource accepts the following input properties:
- Ref
Name string - A filter to return only resources that match the given reference name.
- Ref
Type string - (Updatable) The type of reference (BRANCH or TAG).
- Repository
Id 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 string - (Updatable) Commit ID pointed to by the new branch.
- Object
Id string - (Updatable) SHA-1 hash value of the object pointed to by the tag.
- Ref
Name string - A filter to return only resources that match the given reference name.
- Ref
Type string - (Updatable) The type of reference (BRANCH or TAG).
- Repository
Id 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 string - (Updatable) Commit ID pointed to by the new branch.
- Object
Id string - (Updatable) SHA-1 hash value of the object pointed to by the tag.
- ref
Name String - A filter to return only resources that match the given reference name.
- ref
Type String - (Updatable) The type of reference (BRANCH or TAG).
- repository
Id 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 String - (Updatable) Commit ID pointed to by the new branch.
- object
Id String - (Updatable) SHA-1 hash value of the object pointed to by the tag.
- ref
Name string - A filter to return only resources that match the given reference name.
- ref
Type string - (Updatable) The type of reference (BRANCH or TAG).
- repository
Id 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 string - (Updatable) Commit ID pointed to by the new branch.
- object
Id 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.
- ref
Name String - A filter to return only resources that match the given reference name.
- ref
Type String - (Updatable) The type of reference (BRANCH or TAG).
- repository
Id 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 String - (Updatable) Commit ID pointed to by the new branch.
- object
Id 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:
- Dictionary<string, string>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. See Resource Tags. Example:
{"foo-namespace.bar-key": "value"}
- Dictionary<string, string>
- 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 stringName - Unique full reference name inside a repository.
- Id string
- The provider-assigned unique ID for this managed resource.
- map[string]string
- Defined tags for this resource. Each key is predefined and scoped to a namespace. See Resource Tags. Example:
{"foo-namespace.bar-key": "value"}
- map[string]string
- 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 stringName - Unique full reference name inside a repository.
- Id string
- The provider-assigned unique ID for this managed resource.
- Map<String,String>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. See Resource Tags. Example:
{"foo-namespace.bar-key": "value"}
- Map<String,String>
- 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 StringName - Unique full reference name inside a repository.
- id String
- The provider-assigned unique ID for this managed resource.
- {[key: string]: string}
- Defined tags for this resource. Each key is predefined and scoped to a namespace. See Resource Tags. Example:
{"foo-namespace.bar-key": "value"}
- {[key: string]: string}
- 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 stringName - Unique full reference name inside a repository.
- id string
- The provider-assigned unique ID for this managed resource.
- Mapping[str, str]
- Defined tags for this resource. Each key is predefined and scoped to a namespace. See Resource Tags. Example:
{"foo-namespace.bar-key": "value"}
- Mapping[str, str]
- 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_ strname - Unique full reference name inside a repository.
- id str
- The provider-assigned unique ID for this managed resource.
- Map<String>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. See Resource Tags. Example:
{"foo-namespace.bar-key": "value"}
- Map<String>
- 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 StringName - 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, str]] = None,
freeform_tags: Optional[Mapping[str, str]] = 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.
- Commit
Id string - (Updatable) Commit ID pointed to by the new branch.
- Dictionary<string, string>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. See Resource Tags. Example:
{"foo-namespace.bar-key": "value"}
- Dictionary<string, string>
- 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 stringName - Unique full reference name inside a repository.
- Object
Id string - (Updatable) SHA-1 hash value of the object pointed to by the tag.
- Ref
Name string - A filter to return only resources that match the given reference name.
- Ref
Type string - (Updatable) The type of reference (BRANCH or TAG).
- Repository
Id 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 string - (Updatable) Commit ID pointed to by the new branch.
- map[string]string
- Defined tags for this resource. Each key is predefined and scoped to a namespace. See Resource Tags. Example:
{"foo-namespace.bar-key": "value"}
- map[string]string
- 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 stringName - Unique full reference name inside a repository.
- Object
Id string - (Updatable) SHA-1 hash value of the object pointed to by the tag.
- Ref
Name string - A filter to return only resources that match the given reference name.
- Ref
Type string - (Updatable) The type of reference (BRANCH or TAG).
- Repository
Id 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 String - (Updatable) Commit ID pointed to by the new branch.
- Map<String,String>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. See Resource Tags. Example:
{"foo-namespace.bar-key": "value"}
- Map<String,String>
- 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 StringName - Unique full reference name inside a repository.
- object
Id String - (Updatable) SHA-1 hash value of the object pointed to by the tag.
- ref
Name String - A filter to return only resources that match the given reference name.
- ref
Type String - (Updatable) The type of reference (BRANCH or TAG).
- repository
Id 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 string - (Updatable) Commit ID pointed to by the new branch.
- {[key: string]: string}
- Defined tags for this resource. Each key is predefined and scoped to a namespace. See Resource Tags. Example:
{"foo-namespace.bar-key": "value"}
- {[key: string]: string}
- 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 stringName - Unique full reference name inside a repository.
- object
Id string - (Updatable) SHA-1 hash value of the object pointed to by the tag.
- ref
Name string - A filter to return only resources that match the given reference name.
- ref
Type string - (Updatable) The type of reference (BRANCH or TAG).
- repository
Id 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.
- Mapping[str, str]
- Defined tags for this resource. Each key is predefined and scoped to a namespace. See Resource Tags. Example:
{"foo-namespace.bar-key": "value"}
- Mapping[str, str]
- 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_ strname - 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
- commit
Id String - (Updatable) Commit ID pointed to by the new branch.
- Map<String>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. See Resource Tags. Example:
{"foo-namespace.bar-key": "value"}
- Map<String>
- 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 StringName - Unique full reference name inside a repository.
- object
Id String - (Updatable) SHA-1 hash value of the object pointed to by the tag.
- ref
Name String - A filter to return only resources that match the given reference name.
- ref
Type String - (Updatable) The type of reference (BRANCH or TAG).
- repository
Id 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.