Class Code
Represents the contents to initialize the repository with.
Inheritance
Namespace: Amazon.CDK.AWS.CodeCommit
Assembly: Amazon.CDK.AWS.CodeCommit.dll
Syntax (csharp)
public abstract class Code : DeputyBase
Syntax (vb)
Public MustInherit Class Code
Inherits DeputyBase
Remarks
ExampleMetadata: infused
Examples
var repo = new Repository(this, "Repository", new RepositoryProps {
RepositoryName = "MyRepositoryName",
Code = Code.FromDirectory(Join(__dirname, "directory/"), "develop")
});
Synopsis
Constructors
Code() | |
Code(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
Code(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Methods
Bind(Construct) | This method is called after a repository is passed this instance of Code in its 'code' property. |
FromAsset(Asset, String) | Code from user-supplied asset. |
FromDirectory(String, String) | Code from directory. |
FromZipFile(String, String) | Code from preexisting ZIP file. |
Constructors
Code()
protected Code()
Code(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected Code(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
Code(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected Code(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Methods
Bind(Construct)
This method is called after a repository is passed this instance of Code in its 'code' property.
public abstract ICodeConfig Bind(Construct scope)
Parameters
- scope Constructs.Construct
the binding scope.
Returns
FromAsset(Asset, String)
Code from user-supplied asset.
public static Code FromAsset(Asset asset, string branch = null)
Parameters
- asset Asset
pre-existing asset.
- branch System.String
the name of the branch to create in the repository.
Returns
FromDirectory(String, String)
Code from directory.
public static Code FromDirectory(string directoryPath, string branch = null)
Parameters
- directoryPath System.String
the path to the local directory containing the contents to initialize the repository with.
- branch System.String
the name of the branch to create in the repository.
Returns
FromZipFile(String, String)
Code from preexisting ZIP file.
public static Code FromZipFile(string filePath, string branch = null)
Parameters
- filePath System.String
the path to the local ZIP file containing the contents to initialize the repository with.
- branch System.String
the name of the branch to create in the repository.
Returns