Interface IProject
- All Superinterfaces:
IConnectable
,software.constructs.IConstruct
,software.constructs.IDependable
,IGrantable
,INotificationRuleSource
,IResource
,software.amazon.jsii.JsiiSerializable
- All Known Subinterfaces:
IProject.Jsii$Default
- All Known Implementing Classes:
IProject.Jsii$Proxy
,PipelineProject
,Project
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Internal default implementation forIProject
.static final class
A proxy class which represents a concrete javascript instance of this type. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addToRolePolicy
(PolicyStatement policyStatement) Enable batch builds.The ARN of this Project.The human-visible name of this Project.default IRole
getRole()
The IAM service Role of this Project.metric
(String metricName, MetricOptions props) Measures the number of builds triggered.metricBuilds
(MetricOptions props) Measures the number of builds triggered.Measures the duration of all builds over time.metricDuration
(MetricOptions props) Measures the duration of all builds over time.Measures the number of builds that failed because of client error or because of a timeout.metricFailedBuilds
(MetricOptions props) Measures the number of builds that failed because of client error or because of a timeout.Measures the number of successful builds.Measures the number of successful builds.notifyOn
(String id, INotificationRuleTarget target, ProjectNotifyOnOptions options) Defines a CodeStar Notification rule triggered when the project events emitted by you specified, it very similar toonEvent
API.notifyOnBuildFailed
(String id, INotificationRuleTarget target) Defines a CodeStar notification rule which triggers when a build fails.notifyOnBuildFailed
(String id, INotificationRuleTarget target, NotificationRuleOptions options) Defines a CodeStar notification rule which triggers when a build fails.notifyOnBuildSucceeded
(String id, INotificationRuleTarget target) Defines a CodeStar notification rule which triggers when a build completes successfully.notifyOnBuildSucceeded
(String id, INotificationRuleTarget target, NotificationRuleOptions options) Defines a CodeStar notification rule which triggers when a build completes successfully.onBuildFailed
(String id) Defines an event rule which triggers when a build fails.onBuildFailed
(String id, OnEventOptions options) Defines an event rule which triggers when a build fails.onBuildStarted
(String id) Defines an event rule which triggers when a build starts.onBuildStarted
(String id, OnEventOptions options) Defines an event rule which triggers when a build starts.Defines an event rule which triggers when a build completes successfully.onBuildSucceeded
(String id, OnEventOptions options) Defines an event rule which triggers when a build completes successfully.Defines a CloudWatch event rule triggered when something happens with this project.onEvent
(String id, OnEventOptions options) Defines a CloudWatch event rule triggered when something happens with this project.onPhaseChange
(String id) Defines a CloudWatch event rule that triggers upon phase change of this build project.onPhaseChange
(String id, OnEventOptions options) Defines a CloudWatch event rule that triggers upon phase change of this build project.onStateChange
(String id) Defines a CloudWatch event rule triggered when the build project state changes.onStateChange
(String id, OnEventOptions options) Defines a CloudWatch event rule triggered when the build project state changes.Methods inherited from interface software.amazon.awscdk.services.ec2.IConnectable
getConnections
Methods inherited from interface software.constructs.IConstruct
getNode
Methods inherited from interface software.amazon.awscdk.services.iam.IGrantable
getGrantPrincipal
Methods inherited from interface software.amazon.awscdk.services.codestarnotifications.INotificationRuleSource
bindAsNotificationRuleSource
Methods inherited from interface software.amazon.awscdk.IResource
applyRemovalPolicy, getEnv, getStack
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getProjectArn
The ARN of this Project. -
getProjectName
The human-visible name of this Project. -
getRole
The IAM service Role of this Project.Undefined for imported Projects.
-
addToRolePolicy
- Parameters:
policyStatement
- This parameter is required.
-
enableBatchBuilds
Enable batch builds.Returns an object contining the batch service role if batch builds could be enabled.
-
metric
@Stability(Stable) @NotNull Metric metric(@NotNull String metricName, @Nullable MetricOptions props) - Parameters:
metricName
- The name of the metric. This parameter is required.props
- Customization properties.- Returns:
- a CloudWatch metric associated with this build project.
-
metric
- Parameters:
metricName
- The name of the metric. This parameter is required.- Returns:
- a CloudWatch metric associated with this build project.
-
metricBuilds
Measures the number of builds triggered.Units: Count
Valid CloudWatch statistics: Sum
Default: sum over 5 minutes
- Parameters:
props
-
-
metricBuilds
Measures the number of builds triggered.Units: Count
Valid CloudWatch statistics: Sum
Default: sum over 5 minutes
-
metricDuration
Measures the duration of all builds over time.Units: Seconds
Valid CloudWatch statistics: Average (recommended), Maximum, Minimum
Default: average over 5 minutes
- Parameters:
props
-
-
metricDuration
Measures the duration of all builds over time.Units: Seconds
Valid CloudWatch statistics: Average (recommended), Maximum, Minimum
Default: average over 5 minutes
-
metricFailedBuilds
Measures the number of builds that failed because of client error or because of a timeout.Units: Count
Valid CloudWatch statistics: Sum
Default: sum over 5 minutes
- Parameters:
props
-
-
metricFailedBuilds
Measures the number of builds that failed because of client error or because of a timeout.Units: Count
Valid CloudWatch statistics: Sum
Default: sum over 5 minutes
-
metricSucceededBuilds
Measures the number of successful builds.Units: Count
Valid CloudWatch statistics: Sum
Default: sum over 5 minutes
- Parameters:
props
-
-
metricSucceededBuilds
Measures the number of successful builds.Units: Count
Valid CloudWatch statistics: Sum
Default: sum over 5 minutes
-
notifyOn
@Stability(Stable) @NotNull INotificationRule notifyOn(@NotNull String id, @NotNull INotificationRuleTarget target, @NotNull ProjectNotifyOnOptions options) Defines a CodeStar Notification rule triggered when the project events emitted by you specified, it very similar toonEvent
API.You can also use the methods
notifyOnBuildSucceeded
andnotifyOnBuildFailed
to define rules for these specific event emitted.- Parameters:
id
- The logical identifier of the CodeStar Notifications rule that will be created. This parameter is required.target
- The target to register for the CodeStar Notifications destination. This parameter is required.options
- Customization options for CodeStar Notifications rule. This parameter is required.- Returns:
- CodeStar Notifications rule associated with this build project.
-
notifyOnBuildFailed
@Stability(Stable) @NotNull INotificationRule notifyOnBuildFailed(@NotNull String id, @NotNull INotificationRuleTarget target, @Nullable NotificationRuleOptions options) Defines a CodeStar notification rule which triggers when a build fails.- Parameters:
id
- This parameter is required.target
- This parameter is required.options
-
-
notifyOnBuildFailed
@Stability(Stable) @NotNull INotificationRule notifyOnBuildFailed(@NotNull String id, @NotNull INotificationRuleTarget target) Defines a CodeStar notification rule which triggers when a build fails.- Parameters:
id
- This parameter is required.target
- This parameter is required.
-
notifyOnBuildSucceeded
@Stability(Stable) @NotNull INotificationRule notifyOnBuildSucceeded(@NotNull String id, @NotNull INotificationRuleTarget target, @Nullable NotificationRuleOptions options) Defines a CodeStar notification rule which triggers when a build completes successfully.- Parameters:
id
- This parameter is required.target
- This parameter is required.options
-
-
notifyOnBuildSucceeded
@Stability(Stable) @NotNull INotificationRule notifyOnBuildSucceeded(@NotNull String id, @NotNull INotificationRuleTarget target) Defines a CodeStar notification rule which triggers when a build completes successfully.- Parameters:
id
- This parameter is required.target
- This parameter is required.
-
onBuildFailed
@Stability(Stable) @NotNull Rule onBuildFailed(@NotNull String id, @Nullable OnEventOptions options) Defines an event rule which triggers when a build fails.- Parameters:
id
- This parameter is required.options
-
-
onBuildFailed
Defines an event rule which triggers when a build fails.- Parameters:
id
- This parameter is required.
-
onBuildStarted
@Stability(Stable) @NotNull Rule onBuildStarted(@NotNull String id, @Nullable OnEventOptions options) Defines an event rule which triggers when a build starts.- Parameters:
id
- This parameter is required.options
-
-
onBuildStarted
Defines an event rule which triggers when a build starts.- Parameters:
id
- This parameter is required.
-
onBuildSucceeded
@Stability(Stable) @NotNull Rule onBuildSucceeded(@NotNull String id, @Nullable OnEventOptions options) Defines an event rule which triggers when a build completes successfully.- Parameters:
id
- This parameter is required.options
-
-
onBuildSucceeded
Defines an event rule which triggers when a build completes successfully.- Parameters:
id
- This parameter is required.
-
onEvent
Defines a CloudWatch event rule triggered when something happens with this project.- Parameters:
id
- This parameter is required.options
-- See Also:
-
onEvent
Defines a CloudWatch event rule triggered when something happens with this project.- Parameters:
id
- This parameter is required.- See Also:
-
onPhaseChange
@Stability(Stable) @NotNull Rule onPhaseChange(@NotNull String id, @Nullable OnEventOptions options) Defines a CloudWatch event rule that triggers upon phase change of this build project.- Parameters:
id
- This parameter is required.options
-- See Also:
-
onPhaseChange
Defines a CloudWatch event rule that triggers upon phase change of this build project.- Parameters:
id
- This parameter is required.- See Also:
-
onStateChange
@Stability(Stable) @NotNull Rule onStateChange(@NotNull String id, @Nullable OnEventOptions options) Defines a CloudWatch event rule triggered when the build project state changes.You can filter specific build status events using an event pattern filter on the
build-status
detail field:const rule = project.onStateChange('OnBuildStarted', { target }); rule.addEventPattern({ detail: { 'build-status': [ "IN_PROGRESS", "SUCCEEDED", "FAILED", "STOPPED" ] } });
You can also use the methods
onBuildFailed
andonBuildSucceeded
to define rules for these specific state changes.To access fields from the event in the event target input, use the static fields on the
StateChangeEvent
class.- Parameters:
id
- This parameter is required.options
-- See Also:
-
onStateChange
Defines a CloudWatch event rule triggered when the build project state changes.You can filter specific build status events using an event pattern filter on the
build-status
detail field:const rule = project.onStateChange('OnBuildStarted', { target }); rule.addEventPattern({ detail: { 'build-status': [ "IN_PROGRESS", "SUCCEEDED", "FAILED", "STOPPED" ] } });
You can also use the methods
onBuildFailed
andonBuildSucceeded
to define rules for these specific state changes.To access fields from the event in the event target input, use the static fields on the
StateChangeEvent
class.- Parameters:
id
- This parameter is required.- See Also:
-