Class IProject.Jsii$Proxy
- All Implemented Interfaces:
IResource
,IResource.Jsii$Default
,IProject
,IProject.Jsii$Default
,INotificationRuleSource
,INotificationRuleSource.Jsii$Default
,IConnectable
,IConnectable.Jsii$Default
,IGrantable
,IGrantable.Jsii$Default
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IConstruct.Jsii$Default
,software.constructs.IDependable
,software.constructs.IDependable.Jsii$Default
- Enclosing interface:
IProject
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.ec2.IConnectable
IConnectable.Jsii$Default, IConnectable.Jsii$Proxy
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default, software.constructs.IConstruct.Jsii$Proxy
Nested classes/interfaces inherited from interface software.constructs.IDependable
software.constructs.IDependable.Jsii$Default, software.constructs.IDependable.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.iam.IGrantable
IGrantable.Jsii$Default, IGrantable.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.codestarnotifications.INotificationRuleSource
INotificationRuleSource.Jsii$Default, INotificationRuleSource.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.codebuild.IProject
IProject.Jsii$Default, IProject.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.IResource
IResource.Jsii$Default, IResource.Jsii$Proxy
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal void
addToRolePolicy
(PolicyStatement policyStatement) final void
applyRemovalPolicy
(RemovalPolicy policy) Apply the given removal policy to this resource.bindAsNotificationRuleSource
(software.constructs.Construct scope) Returns a source configuration for notification rule.final BatchBuildConfig
Enable batch builds.final Connections
The network connections associated with this resource.final ResourceEnvironment
getEnv()
The environment this resource belongs to.final IPrincipal
The principal to grant permissions to.final software.constructs.Node
getNode()
The tree node.final String
The ARN of this Project.final String
The human-visible name of this Project.final IRole
getRole()
The IAM service Role of this Project.final Stack
getStack()
The stack in which this resource is defined.final Metric
final Metric
metric
(String metricName, MetricOptions props) final Metric
Measures the number of builds triggered.final Metric
metricBuilds
(MetricOptions props) Measures the number of builds triggered.final Metric
Measures the duration of all builds over time.final Metric
metricDuration
(MetricOptions props) Measures the duration of all builds over time.final Metric
Measures the number of builds that failed because of client error or because of a timeout.final Metric
metricFailedBuilds
(MetricOptions props) Measures the number of builds that failed because of client error or because of a timeout.final Metric
Measures the number of successful builds.final Metric
Measures the number of successful builds.final 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 toonEvent
API.final INotificationRule
notifyOnBuildFailed
(String id, INotificationRuleTarget target) Defines a CodeStar notification rule which triggers when a build fails.final INotificationRule
notifyOnBuildFailed
(String id, INotificationRuleTarget target, NotificationRuleOptions options) Defines a CodeStar notification rule which triggers when a build fails.final INotificationRule
notifyOnBuildSucceeded
(String id, INotificationRuleTarget target) Defines a CodeStar notification rule which triggers when a build completes successfully.final INotificationRule
notifyOnBuildSucceeded
(String id, INotificationRuleTarget target, NotificationRuleOptions options) Defines a CodeStar notification rule which triggers when a build completes successfully.final Rule
onBuildFailed
(String id) Defines an event rule which triggers when a build fails.final Rule
onBuildFailed
(String id, OnEventOptions options) Defines an event rule which triggers when a build fails.final Rule
onBuildStarted
(String id) Defines an event rule which triggers when a build starts.final Rule
onBuildStarted
(String id, OnEventOptions options) Defines an event rule which triggers when a build starts.final Rule
Defines an event rule which triggers when a build completes successfully.final Rule
onBuildSucceeded
(String id, OnEventOptions options) Defines an event rule which triggers when a build completes successfully.final Rule
Defines a CloudWatch event rule triggered when something happens with this project.final Rule
onEvent
(String id, OnEventOptions options) Defines a CloudWatch event rule triggered when something happens with this project.final Rule
onPhaseChange
(String id) Defines a CloudWatch event rule that triggers upon phase change of this build project.final Rule
onPhaseChange
(String id, OnEventOptions options) Defines a CloudWatch event rule that triggers upon phase change of this build project.final Rule
onStateChange
(String id) Defines a CloudWatch event rule triggered when the build project state changes.final Rule
onStateChange
(String id, OnEventOptions options) Defines a CloudWatch event rule triggered when the build project state changes.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
Jsii$Proxy
protected Jsii$Proxy(software.amazon.jsii.JsiiObjectRef objRef)
-
-
Method Details
-
getNode
@Stability(Stable) @NotNull public final software.constructs.Node getNode()The tree node.- Specified by:
getNode
in interfacesoftware.constructs.IConstruct
- Specified by:
getNode
in interfacesoftware.constructs.IConstruct.Jsii$Default
- Specified by:
getNode
in interfaceIProject.Jsii$Default
- Specified by:
getNode
in interfaceIResource.Jsii$Default
-
getEnv
The environment this resource belongs to.For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.
- Specified by:
getEnv
in interfaceIProject.Jsii$Default
- Specified by:
getEnv
in interfaceIResource
- Specified by:
getEnv
in interfaceIResource.Jsii$Default
-
getStack
The stack in which this resource is defined.- Specified by:
getStack
in interfaceIProject.Jsii$Default
- Specified by:
getStack
in interfaceIResource
- Specified by:
getStack
in interfaceIResource.Jsii$Default
-
getGrantPrincipal
The principal to grant permissions to.- Specified by:
getGrantPrincipal
in interfaceIGrantable
- Specified by:
getGrantPrincipal
in interfaceIGrantable.Jsii$Default
- Specified by:
getGrantPrincipal
in interfaceIProject.Jsii$Default
-
getConnections
The network connections associated with this resource.- Specified by:
getConnections
in interfaceIConnectable
- Specified by:
getConnections
in interfaceIConnectable.Jsii$Default
- Specified by:
getConnections
in interfaceIProject.Jsii$Default
-
getProjectArn
The ARN of this Project.- Specified by:
getProjectArn
in interfaceIProject
- Specified by:
getProjectArn
in interfaceIProject.Jsii$Default
-
getProjectName
The human-visible name of this Project.- Specified by:
getProjectName
in interfaceIProject
- Specified by:
getProjectName
in interfaceIProject.Jsii$Default
-
getRole
The IAM service Role of this Project.Undefined for imported Projects.
- Specified by:
getRole
in interfaceIProject
- Specified by:
getRole
in interfaceIProject.Jsii$Default
-
applyRemovalPolicy
Apply the given removal policy to this resource.The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.
The resource can be deleted (
RemovalPolicy.DESTROY
), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN
).- Specified by:
applyRemovalPolicy
in interfaceIProject.Jsii$Default
- Specified by:
applyRemovalPolicy
in interfaceIResource
- Specified by:
applyRemovalPolicy
in interfaceIResource.Jsii$Default
- Parameters:
policy
- This parameter is required.
-
bindAsNotificationRuleSource
@Stability(Stable) @NotNull public final NotificationRuleSourceConfig bindAsNotificationRuleSource(@NotNull software.constructs.Construct scope) Returns a source configuration for notification rule.- Specified by:
bindAsNotificationRuleSource
in interfaceINotificationRuleSource
- Specified by:
bindAsNotificationRuleSource
in interfaceINotificationRuleSource.Jsii$Default
- Specified by:
bindAsNotificationRuleSource
in interfaceIProject.Jsii$Default
- Parameters:
scope
- This parameter is required.
-
addToRolePolicy
- Specified by:
addToRolePolicy
in interfaceIProject
- Specified by:
addToRolePolicy
in interfaceIProject.Jsii$Default
- Parameters:
policyStatement
- This parameter is required.
-
enableBatchBuilds
Enable batch builds.Returns an object contining the batch service role if batch builds could be enabled.
- Specified by:
enableBatchBuilds
in interfaceIProject
- Specified by:
enableBatchBuilds
in interfaceIProject.Jsii$Default
-
metric
@Stability(Stable) @NotNull public final Metric metric(@NotNull String metricName, @Nullable MetricOptions props) - Specified by:
metric
in interfaceIProject
- Specified by:
metric
in interfaceIProject.Jsii$Default
- Parameters:
metricName
- The name of the metric. This parameter is required.props
- Customization properties.- Returns:
- a CloudWatch metric associated with this build project.
-
metric
-
metricBuilds
Measures the number of builds triggered.Units: Count
Valid CloudWatch statistics: Sum
Default: sum over 5 minutes
- Specified by:
metricBuilds
in interfaceIProject
- Specified by:
metricBuilds
in interfaceIProject.Jsii$Default
- Parameters:
props
-
-
metricBuilds
Measures the number of builds triggered.Units: Count
Valid CloudWatch statistics: Sum
Default: sum over 5 minutes
- Specified by:
metricBuilds
in interfaceIProject
-
metricDuration
Measures the duration of all builds over time.Units: Seconds
Valid CloudWatch statistics: Average (recommended), Maximum, Minimum
Default: average over 5 minutes
- Specified by:
metricDuration
in interfaceIProject
- Specified by:
metricDuration
in interfaceIProject.Jsii$Default
- 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
- Specified by:
metricDuration
in interfaceIProject
-
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
- Specified by:
metricFailedBuilds
in interfaceIProject
- Specified by:
metricFailedBuilds
in interfaceIProject.Jsii$Default
- 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
- Specified by:
metricFailedBuilds
in interfaceIProject
-
metricSucceededBuilds
@Stability(Stable) @NotNull public final Metric metricSucceededBuilds(@Nullable MetricOptions props) Measures the number of successful builds.Units: Count
Valid CloudWatch statistics: Sum
Default: sum over 5 minutes
- Specified by:
metricSucceededBuilds
in interfaceIProject
- Specified by:
metricSucceededBuilds
in interfaceIProject.Jsii$Default
- Parameters:
props
-
-
metricSucceededBuilds
Measures the number of successful builds.Units: Count
Valid CloudWatch statistics: Sum
Default: sum over 5 minutes
- Specified by:
metricSucceededBuilds
in interfaceIProject
-
notifyOn
@Stability(Stable) @NotNull public final 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.- Specified by:
notifyOn
in interfaceIProject
- Specified by:
notifyOn
in interfaceIProject.Jsii$Default
- 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 public final INotificationRule notifyOnBuildFailed(@NotNull String id, @NotNull INotificationRuleTarget target, @Nullable NotificationRuleOptions options) Defines a CodeStar notification rule which triggers when a build fails.- Specified by:
notifyOnBuildFailed
in interfaceIProject
- Specified by:
notifyOnBuildFailed
in interfaceIProject.Jsii$Default
- Parameters:
id
- This parameter is required.target
- This parameter is required.options
-
-
notifyOnBuildFailed
@Stability(Stable) @NotNull public final INotificationRule notifyOnBuildFailed(@NotNull String id, @NotNull INotificationRuleTarget target) Defines a CodeStar notification rule which triggers when a build fails.- Specified by:
notifyOnBuildFailed
in interfaceIProject
- Parameters:
id
- This parameter is required.target
- This parameter is required.
-
notifyOnBuildSucceeded
@Stability(Stable) @NotNull public final INotificationRule notifyOnBuildSucceeded(@NotNull String id, @NotNull INotificationRuleTarget target, @Nullable NotificationRuleOptions options) Defines a CodeStar notification rule which triggers when a build completes successfully.- Specified by:
notifyOnBuildSucceeded
in interfaceIProject
- Specified by:
notifyOnBuildSucceeded
in interfaceIProject.Jsii$Default
- Parameters:
id
- This parameter is required.target
- This parameter is required.options
-
-
notifyOnBuildSucceeded
@Stability(Stable) @NotNull public final INotificationRule notifyOnBuildSucceeded(@NotNull String id, @NotNull INotificationRuleTarget target) Defines a CodeStar notification rule which triggers when a build completes successfully.- Specified by:
notifyOnBuildSucceeded
in interfaceIProject
- Parameters:
id
- This parameter is required.target
- This parameter is required.
-
onBuildFailed
@Stability(Stable) @NotNull public final Rule onBuildFailed(@NotNull String id, @Nullable OnEventOptions options) Defines an event rule which triggers when a build fails.- Specified by:
onBuildFailed
in interfaceIProject
- Specified by:
onBuildFailed
in interfaceIProject.Jsii$Default
- Parameters:
id
- This parameter is required.options
-
-
onBuildFailed
Defines an event rule which triggers when a build fails.- Specified by:
onBuildFailed
in interfaceIProject
- Parameters:
id
- This parameter is required.
-
onBuildStarted
@Stability(Stable) @NotNull public final Rule onBuildStarted(@NotNull String id, @Nullable OnEventOptions options) Defines an event rule which triggers when a build starts.- Specified by:
onBuildStarted
in interfaceIProject
- Specified by:
onBuildStarted
in interfaceIProject.Jsii$Default
- Parameters:
id
- This parameter is required.options
-
-
onBuildStarted
Defines an event rule which triggers when a build starts.- Specified by:
onBuildStarted
in interfaceIProject
- Parameters:
id
- This parameter is required.
-
onBuildSucceeded
@Stability(Stable) @NotNull public final Rule onBuildSucceeded(@NotNull String id, @Nullable OnEventOptions options) Defines an event rule which triggers when a build completes successfully.- Specified by:
onBuildSucceeded
in interfaceIProject
- Specified by:
onBuildSucceeded
in interfaceIProject.Jsii$Default
- Parameters:
id
- This parameter is required.options
-
-
onBuildSucceeded
Defines an event rule which triggers when a build completes successfully.- Specified by:
onBuildSucceeded
in interfaceIProject
- Parameters:
id
- This parameter is required.
-
onEvent
@Stability(Stable) @NotNull public final Rule onEvent(@NotNull String id, @Nullable OnEventOptions options) Defines a CloudWatch event rule triggered when something happens with this project.- Specified by:
onEvent
in interfaceIProject
- Specified by:
onEvent
in interfaceIProject.Jsii$Default
- Parameters:
id
- This parameter is required.options
-- See Also:
-
onEvent
Defines a CloudWatch event rule triggered when something happens with this project. -
onPhaseChange
@Stability(Stable) @NotNull public final Rule onPhaseChange(@NotNull String id, @Nullable OnEventOptions options) Defines a CloudWatch event rule that triggers upon phase change of this build project.- Specified by:
onPhaseChange
in interfaceIProject
- Specified by:
onPhaseChange
in interfaceIProject.Jsii$Default
- Parameters:
id
- This parameter is required.options
-- See Also:
-
onPhaseChange
Defines a CloudWatch event rule that triggers upon phase change of this build project.- Specified by:
onPhaseChange
in interfaceIProject
- Parameters:
id
- This parameter is required.- See Also:
-
onStateChange
@Stability(Stable) @NotNull public final 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.- Specified by:
onStateChange
in interfaceIProject
- Specified by:
onStateChange
in interfaceIProject.Jsii$Default
- 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.- Specified by:
onStateChange
in interfaceIProject
- Parameters:
id
- This parameter is required.- See Also:
-