Show / Hide Table of Contents

Class RepositoryFile

This resource allows you to create and manage files within a GitHub repository.

Example Usage

using Pulumi;
using Github = Pulumi.Github;

class MyStack : Stack
{
public MyStack()
{
    var gitignore = new Github.RepositoryFile("gitignore", new Github.RepositoryFileArgs
    {
        Content = "**/*.tfstate",
        File = ".gitignore",
        Repository = "example",
    });
}

}
Inheritance
System.Object
Resource
CustomResource
RepositoryFile
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Github
Assembly: Pulumi.Github.dll
Syntax
public class RepositoryFile : CustomResource

Constructors

View Source

RepositoryFile(String, RepositoryFileArgs, CustomResourceOptions)

Create a RepositoryFile resource with the given unique name, arguments, and options.

Declaration
public RepositoryFile(string name, RepositoryFileArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

RepositoryFileArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

Branch

Git branch (defaults to master). The branch must already exist, it will not be created if it does not already exist.

Declaration
public Output<string> Branch { get; }
Property Value
Type Description
Output<System.String>
View Source

CommitAuthor

Committer author name to use.

Declaration
public Output<string> CommitAuthor { get; }
Property Value
Type Description
Output<System.String>
View Source

CommitEmail

Committer email address to use.

Declaration
public Output<string> CommitEmail { get; }
Property Value
Type Description
Output<System.String>
View Source

CommitMessage

Commit message when adding or updating the managed file.

Declaration
public Output<string> CommitMessage { get; }
Property Value
Type Description
Output<System.String>
View Source

Content

The file content.

Declaration
public Output<string> Content { get; }
Property Value
Type Description
Output<System.String>
View Source

File

The path of the file to manage.

Declaration
public Output<string> File { get; }
Property Value
Type Description
Output<System.String>
View Source

Repository

The repository name

Declaration
public Output<string> Repository { get; }
Property Value
Type Description
Output<System.String>
View Source

Sha

The SHA blob of the file.

Declaration
public Output<string> Sha { get; }
Property Value
Type Description
Output<System.String>

Methods

View Source

Get(String, Input<String>, RepositoryFileState, CustomResourceOptions)

Get an existing RepositoryFile resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

Declaration
public static RepositoryFile Get(string name, Input<string> id, RepositoryFileState state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

RepositoryFileState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
RepositoryFile
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.