Class RepositoryProps
Inheritance
System.Object
RepositoryProps
Implements
Namespace: Amazon.CDK.AWS.CodeCommit
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class RepositoryProps : Object, IRepositoryProps
Syntax (vb)
Public Class RepositoryProps
Inherits Object
Implements IRepositoryProps
Remarks
ExampleMetadata: lit=aws-codepipeline-actions/test/integ.cfn-template-from-repo.lit.ts infused
Examples
// Source stage: read from repository
var repo = new Repository(stack, "TemplateRepo", new RepositoryProps {
RepositoryName = "template-repo"
});
var sourceOutput = new Artifact("SourceArtifact");
var source = new CodeCommitSourceAction(new CodeCommitSourceActionProps {
ActionName = "Source",
Repository = repo,
Output = sourceOutput,
Trigger = CodeCommitTrigger.POLL
});
IDictionary<string, object> sourceStage = new Dictionary<string, object> {
{ "stageName", "Source" },
{ "actions", new [] { source } }
};
// Deployment stage: create and deploy changeset with manual approval
var stackName = "OurStack";
var changeSetName = "StagedChangeSet";
IDictionary<string, object> prodStage = new Dictionary<string, object> {
{ "stageName", "Deploy" },
{ "actions", new [] {
new CloudFormationCreateReplaceChangeSetAction(new CloudFormationCreateReplaceChangeSetActionProps {
ActionName = "PrepareChanges",
StackName = stackName,
ChangeSetName = changeSetName,
AdminPermissions = true,
TemplatePath = sourceOutput.AtPath("template.yaml"),
RunOrder = 1
}),
new ManualApprovalAction(new ManualApprovalActionProps {
ActionName = "ApproveChanges",
RunOrder = 2
}),
new CloudFormationExecuteChangeSetAction(new CloudFormationExecuteChangeSetActionProps {
ActionName = "ExecuteChanges",
StackName = stackName,
ChangeSetName = changeSetName,
RunOrder = 3
}) } }
};
new Pipeline(stack, "Pipeline", new PipelineProps {
CrossAccountKeys = true,
Stages = new [] { sourceStage, prodStage }
});
Synopsis
Constructors
RepositoryProps() |
Properties
Code | The contents with which to initialize the repository after it has been created. |
Description | A description of the repository. |
RepositoryName | Name of the repository. |
Constructors
RepositoryProps()
public RepositoryProps()
Properties
Code
The contents with which to initialize the repository after it has been created.
public Code Code { get; set; }
Property Value
Remarks
Default: - No initialization (create empty repo)
Description
A description of the repository.
public string Description { get; set; }
Property Value
System.String
Remarks
Use the description to identify the purpose of the repository.
Default: - No description.
RepositoryName
Name of the repository.
public string RepositoryName { get; set; }
Property Value
System.String
Remarks
This property is required for all CodeCommit repositories.