GitHub

v5.1.0 published on Tuesday, Nov 15, 2022 by Pulumi

Branch

Create Branch Resource

new Branch(name: string, args: BranchArgs, opts?: CustomResourceOptions);
@overload
def Branch(resource_name: str,
           opts: Optional[ResourceOptions] = None,
           branch: Optional[str] = None,
           repository: Optional[str] = None,
           source_branch: Optional[str] = None,
           source_sha: Optional[str] = None)
@overload
def Branch(resource_name: str,
           args: BranchArgs,
           opts: Optional[ResourceOptions] = None)
func NewBranch(ctx *Context, name string, args BranchArgs, opts ...ResourceOption) (*Branch, error)
public Branch(string name, BranchArgs args, CustomResourceOptions? opts = null)
public Branch(String name, BranchArgs args)
public Branch(String name, BranchArgs args, CustomResourceOptions options)
type: github:Branch
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args BranchArgs
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 BranchArgs
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 BranchArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args BranchArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args BranchArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

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

BranchName string
Repository string
SourceBranch string
SourceSha string
Branch string
Repository string
SourceBranch string
SourceSha string
branch String
repository String
sourceBranch String
sourceSha String
branch string
repository string
sourceBranch string
sourceSha string
branch String
repository String
sourceBranch String
sourceSha String

Outputs

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

Etag string
Id string

The provider-assigned unique ID for this managed resource.

Ref string
Sha string
Etag string
Id string

The provider-assigned unique ID for this managed resource.

Ref string
Sha string
etag String
id String

The provider-assigned unique ID for this managed resource.

ref String
sha String
etag string
id string

The provider-assigned unique ID for this managed resource.

ref string
sha string
etag str
id str

The provider-assigned unique ID for this managed resource.

ref str
sha str
etag String
id String

The provider-assigned unique ID for this managed resource.

ref String
sha String

Look up Existing Branch Resource

Get an existing Branch 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?: BranchState, opts?: CustomResourceOptions): Branch
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        branch: Optional[str] = None,
        etag: Optional[str] = None,
        ref: Optional[str] = None,
        repository: Optional[str] = None,
        sha: Optional[str] = None,
        source_branch: Optional[str] = None,
        source_sha: Optional[str] = None) -> Branch
func GetBranch(ctx *Context, name string, id IDInput, state *BranchState, opts ...ResourceOption) (*Branch, error)
public static Branch Get(string name, Input<string> id, BranchState? state, CustomResourceOptions? opts = null)
public static Branch get(String name, Output<String> id, BranchState 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:
BranchName string
Etag string
Ref string
Repository string
Sha string
SourceBranch string
SourceSha string
Branch string
Etag string
Ref string
Repository string
Sha string
SourceBranch string
SourceSha string
branch String
etag String
ref String
repository String
sha String
sourceBranch String
sourceSha String
branch string
etag string
ref string
repository string
sha string
sourceBranch string
sourceSha string
branch String
etag String
ref String
repository String
sha String
sourceBranch String
sourceSha String

Package Details

Repository
https://github.com/pulumi/pulumi-github
License
Apache-2.0
Notes

This Pulumi package is based on the github Terraform Provider.