@Generated(value="jsii-pacmak/1.63.2 (build a8a8833)", date="2022-08-08T20:48:11.564Z") @Stability(value=Stable) public interface IProject extends software.amazon.jsii.JsiiSerializable, IResource, IGrantable, IConnectable, INotificationRuleSource
Modifier and Type | Interface and Description |
---|---|
static interface |
IProject.Jsii$Default
Internal default implementation for
IProject . |
static class |
IProject.Jsii$Proxy
A proxy class which represents a concrete javascript instance of this type.
|
Modifier and Type | Method and Description |
---|---|
void |
addToRolePolicy(PolicyStatement policyStatement) |
BatchBuildConfig |
enableBatchBuilds()
Enable batch builds.
|
String |
getProjectArn()
The ARN of this Project.
|
String |
getProjectName()
The human-visible name of this Project.
|
default IRole |
getRole()
The IAM service Role of this Project.
|
Metric |
metric(String metricName) |
Metric |
metric(String metricName,
MetricOptions props) |
Metric |
metricBuilds()
Measures the number of builds triggered.
|
Metric |
metricBuilds(MetricOptions props)
Measures the number of builds triggered.
|
Metric |
metricDuration()
Measures the duration of all builds over time.
|
Metric |
metricDuration(MetricOptions props)
Measures the duration of all builds over time.
|
Metric |
metricFailedBuilds()
Measures the number of builds that failed because of client error or because of a timeout.
|
Metric |
metricFailedBuilds(MetricOptions props)
Measures the number of builds that failed because of client error or because of a timeout.
|
Metric |
metricSucceededBuilds()
Measures the number of successful builds.
|
Metric |
metricSucceededBuilds(MetricOptions props)
Measures the number of successful builds.
|
INotificationRule |
notifyOn(String id,
INotificationRuleTarget target,
ProjectNotifyOnOptions options)
Defines a CodeStar Notification rule triggered when the project events emitted by you specified, it very similar to `onEvent` API.
|
INotificationRule |
notifyOnBuildFailed(String id,
INotificationRuleTarget target)
Defines a CodeStar notification rule which triggers when a build fails.
|
INotificationRule |
notifyOnBuildFailed(String id,
INotificationRuleTarget target,
NotificationRuleOptions options)
Defines a CodeStar notification rule which triggers when a build fails.
|
INotificationRule |
notifyOnBuildSucceeded(String id,
INotificationRuleTarget target)
Defines a CodeStar notification rule which triggers when a build completes successfully.
|
INotificationRule |
notifyOnBuildSucceeded(String id,
INotificationRuleTarget target,
NotificationRuleOptions options)
Defines a CodeStar notification rule which triggers when a build completes successfully.
|
Rule |
onBuildFailed(String id)
Defines an event rule which triggers when a build fails.
|
Rule |
onBuildFailed(String id,
OnEventOptions options)
Defines an event rule which triggers when a build fails.
|
Rule |
onBuildStarted(String id)
Defines an event rule which triggers when a build starts.
|
Rule |
onBuildStarted(String id,
OnEventOptions options)
Defines an event rule which triggers when a build starts.
|
Rule |
onBuildSucceeded(String id)
Defines an event rule which triggers when a build completes successfully.
|
Rule |
onBuildSucceeded(String id,
OnEventOptions options)
Defines an event rule which triggers when a build completes successfully.
|
Rule |
onEvent(String id)
Defines a CloudWatch event rule triggered when something happens with this project.
|
Rule |
onEvent(String id,
OnEventOptions options)
Defines a CloudWatch event rule triggered when something happens with this project.
|
Rule |
onPhaseChange(String id)
Defines a CloudWatch event rule that triggers upon phase change of this build project.
|
Rule |
onPhaseChange(String id,
OnEventOptions options)
Defines a CloudWatch event rule that triggers upon phase change of this build project.
|
Rule |
onStateChange(String id)
Defines a CloudWatch event rule triggered when the build project state changes.
|
Rule |
onStateChange(String id,
OnEventOptions options)
Defines a CloudWatch event rule triggered when the build project state changes.
|
applyRemovalPolicy, getEnv, getStack
getGrantPrincipal
getConnections
bindAsNotificationRuleSource
@Stability(value=Stable) @NotNull String getProjectArn()
@Stability(value=Stable) @NotNull String getProjectName()
@Stability(value=Stable) @Nullable default IRole getRole()
Undefined for imported Projects.
@Stability(value=Stable) void addToRolePolicy(@NotNull PolicyStatement policyStatement)
policyStatement
- This parameter is required.@Stability(value=Stable) @Nullable BatchBuildConfig enableBatchBuilds()
Returns an object contining the batch service role if batch builds could be enabled.
@Stability(value=Stable) @NotNull Metric metric(@NotNull String metricName, @Nullable MetricOptions props)
metricName
- The name of the metric. This parameter is required.props
- Customization properties.@Stability(value=Stable) @NotNull Metric metric(@NotNull String metricName)
metricName
- The name of the metric. This parameter is required.@Stability(value=Stable) @NotNull Metric metricBuilds(@Nullable MetricOptions props)
Units: Count
Valid CloudWatch statistics: Sum
Default: sum over 5 minutes
props
- @Stability(value=Stable) @NotNull Metric metricBuilds()
Units: Count
Valid CloudWatch statistics: Sum
Default: sum over 5 minutes
@Stability(value=Stable) @NotNull Metric metricDuration(@Nullable MetricOptions props)
Units: Seconds
Valid CloudWatch statistics: Average (recommended), Maximum, Minimum
Default: average over 5 minutes
props
- @Stability(value=Stable) @NotNull Metric metricDuration()
Units: Seconds
Valid CloudWatch statistics: Average (recommended), Maximum, Minimum
Default: average over 5 minutes
@Stability(value=Stable) @NotNull Metric metricFailedBuilds(@Nullable MetricOptions props)
Units: Count
Valid CloudWatch statistics: Sum
Default: sum over 5 minutes
props
- @Stability(value=Stable) @NotNull Metric metricFailedBuilds()
Units: Count
Valid CloudWatch statistics: Sum
Default: sum over 5 minutes
@Stability(value=Stable) @NotNull Metric metricSucceededBuilds(@Nullable MetricOptions props)
Units: Count
Valid CloudWatch statistics: Sum
Default: sum over 5 minutes
props
- @Stability(value=Stable) @NotNull Metric metricSucceededBuilds()
Units: Count
Valid CloudWatch statistics: Sum
Default: sum over 5 minutes
@Stability(value=Stable) @NotNull INotificationRule notifyOn(@NotNull String id, @NotNull INotificationRuleTarget target, @NotNull ProjectNotifyOnOptions options)
You can also use the methods notifyOnBuildSucceeded
and
notifyOnBuildFailed
to define rules for these specific event emitted.
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.@Stability(value=Stable) @NotNull INotificationRule notifyOnBuildFailed(@NotNull String id, @NotNull INotificationRuleTarget target, @Nullable NotificationRuleOptions options)
id
- This parameter is required.target
- This parameter is required.options
- @Stability(value=Stable) @NotNull INotificationRule notifyOnBuildFailed(@NotNull String id, @NotNull INotificationRuleTarget target)
id
- This parameter is required.target
- This parameter is required.@Stability(value=Stable) @NotNull INotificationRule notifyOnBuildSucceeded(@NotNull String id, @NotNull INotificationRuleTarget target, @Nullable NotificationRuleOptions options)
id
- This parameter is required.target
- This parameter is required.options
- @Stability(value=Stable) @NotNull INotificationRule notifyOnBuildSucceeded(@NotNull String id, @NotNull INotificationRuleTarget target)
id
- This parameter is required.target
- This parameter is required.@Stability(value=Stable) @NotNull Rule onBuildFailed(@NotNull String id, @Nullable OnEventOptions options)
id
- This parameter is required.options
- @Stability(value=Stable) @NotNull Rule onBuildFailed(@NotNull String id)
id
- This parameter is required.@Stability(value=Stable) @NotNull Rule onBuildStarted(@NotNull String id, @Nullable OnEventOptions options)
id
- This parameter is required.options
- @Stability(value=Stable) @NotNull Rule onBuildStarted(@NotNull String id)
id
- This parameter is required.@Stability(value=Stable) @NotNull Rule onBuildSucceeded(@NotNull String id, @Nullable OnEventOptions options)
id
- This parameter is required.options
- @Stability(value=Stable) @NotNull Rule onBuildSucceeded(@NotNull String id)
id
- This parameter is required.@Stability(value=Stable) @NotNull Rule onEvent(@NotNull String id, @Nullable OnEventOptions options)
id
- This parameter is required.options
- @Stability(value=Stable) @NotNull Rule onEvent(@NotNull String id)
id
- This parameter is required.@Stability(value=Stable) @NotNull Rule onPhaseChange(@NotNull String id, @Nullable OnEventOptions options)
id
- This parameter is required.options
- @Stability(value=Stable) @NotNull Rule onPhaseChange(@NotNull String id)
id
- This parameter is required.@Stability(value=Stable) @NotNull Rule onStateChange(@NotNull String id, @Nullable OnEventOptions options)
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
and onBuildSucceeded
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.
id
- This parameter is required.options
- @Stability(value=Stable) @NotNull Rule onStateChange(@NotNull String id)
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
and onBuildSucceeded
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.
id
- This parameter is required.Copyright © 2022. All rights reserved.