Class ComponentDocument
(experimental) Properties of an EC2 Image Builder Component Document.
Implements
Inherited Members
Namespace: Amazon.CDK.AWS.ImageBuilder.Alpha
Assembly: Amazon.CDK.AWS.ImageBuilder.Alpha.dll
Syntax (csharp)
public class ComponentDocument : IComponentDocument
Syntax (vb)
Public Class ComponentDocument Implements IComponentDocument
Remarks
Stability: Experimental
ExampleMetadata: infused
Examples
var component = new Component(this, "StructuredComponent", new ComponentProps {
Platform = Platform.LINUX,
Data = ComponentData.FromComponentDocumentJsonObject(new ComponentDocument {
SchemaVersion = ComponentSchemaVersion.V1_0,
Phases = new [] { new ComponentDocumentPhase {
Name = ComponentPhaseName.BUILD,
Steps = new [] { new ComponentDocumentStep {
Name = "install-with-timeout",
Action = ComponentAction.EXECUTE_BASH,
Timeout = Duration.Minutes(10),
OnFailure = ComponentOnFailure.CONTINUE,
Inputs = ComponentStepInputs.FromObject(new Dictionary<string, object> {
{ "commands", new [] { "./install-script.sh" } }
})
} }
} }
})
});
Synopsis
Constructors
| ComponentDocument() | (experimental) Properties of an EC2 Image Builder Component Document. |
Properties
| Constants | (experimental) The constants to define in the document. |
| Description | (experimental) The description of the document. |
| Name | (experimental) The name of the document. |
| Parameters | (experimental) The parameters to define in the document. |
| Phases | (experimental) The phases which define the grouping of steps to run in the build and test workflows of the image build. |
| SchemaVersion | (experimental) The schema version of the component. |
Constructors
ComponentDocument()
(experimental) Properties of an EC2 Image Builder Component Document.
public ComponentDocument()
Remarks
Stability: Experimental
ExampleMetadata: infused
Examples
var component = new Component(this, "StructuredComponent", new ComponentProps {
Platform = Platform.LINUX,
Data = ComponentData.FromComponentDocumentJsonObject(new ComponentDocument {
SchemaVersion = ComponentSchemaVersion.V1_0,
Phases = new [] { new ComponentDocumentPhase {
Name = ComponentPhaseName.BUILD,
Steps = new [] { new ComponentDocumentStep {
Name = "install-with-timeout",
Action = ComponentAction.EXECUTE_BASH,
Timeout = Duration.Minutes(10),
OnFailure = ComponentOnFailure.CONTINUE,
Inputs = ComponentStepInputs.FromObject(new Dictionary<string, object> {
{ "commands", new [] { "./install-script.sh" } }
})
} }
} }
})
});
Properties
Constants
(experimental) The constants to define in the document.
public IDictionary<string, ComponentConstantValue>? Constants { get; set; }
Property Value
IDictionary<string, ComponentConstantValue>
Remarks
Default: None
Stability: Experimental
Description
(experimental) The description of the document.
public string? Description { get; set; }
Property Value
Remarks
Default: None
Stability: Experimental
Name
(experimental) The name of the document.
public string? Name { get; set; }
Property Value
Remarks
Default: None
Stability: Experimental
Parameters
(experimental) The parameters to define in the document.
public IDictionary<string, IComponentDocumentParameterDefinition>? Parameters { get; set; }
Property Value
IDictionary<string, IComponentDocumentParameterDefinition>
Remarks
Default: None
Stability: Experimental
Phases
(experimental) The phases which define the grouping of steps to run in the build and test workflows of the image build.
public IComponentDocumentPhase[] Phases { get; set; }
Property Value
Remarks
Stability: Experimental
SchemaVersion
(experimental) The schema version of the component.
public ComponentSchemaVersion SchemaVersion { get; set; }
Property Value
Remarks
Stability: Experimental