Skip to content
v2.278.0

FailureConditionsProperty Struct ​

The configuration that specifies the result, such as rollback, to occur upon stage failure.

For more information about conditions, see Stage conditions and How do stage conditions work? .

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_codepipeline as codepipeline } from 'aws-cdk-lib';

declare const configuration: any;
const failureConditionsProperty: codepipeline.CfnPipeline.FailureConditionsProperty = {
  conditions: [{
    result: 'result',
    rules: [{
      commands: ['commands'],
      configuration: configuration,
      inputArtifacts: [{
        name: 'name',
      }],
      name: 'name',
      region: 'region',
      roleArn: 'roleArn',
      ruleTypeId: {
        category: 'category',
        owner: 'owner',
        provider: 'provider',
        version: 'version',
      },
    }],
  }],
  result: 'result',
  retryConfiguration: {
    retryMode: 'retryMode',
  },
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_codepipeline as codepipeline

# configuration: Any

failure_conditions_property = codepipeline.CfnPipeline.FailureConditionsProperty(
    conditions=[codepipeline.CfnPipeline.ConditionProperty(
        result="result",
        rules=[codepipeline.CfnPipeline.RuleDeclarationProperty(
            commands=["commands"],
            configuration=configuration,
            input_artifacts=[codepipeline.CfnPipeline.InputArtifactProperty(
                name="name"
            )],
            name="name",
            region="region",
            role_arn="roleArn",
            rule_type_id=codepipeline.CfnPipeline.RuleTypeIdProperty(
                category="category",
                owner="owner",
                provider="provider",
                version="version"
            )
        )]
    )],
    result="result",
    retry_configuration=codepipeline.CfnPipeline.RetryConfigurationProperty(
        retry_mode="retryMode"
    )
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.codepipeline.*;

Object configuration;

FailureConditionsProperty failureConditionsProperty = FailureConditionsProperty.builder()
        .conditions(List.of(ConditionProperty.builder()
                .result("result")
                .rules(List.of(RuleDeclarationProperty.builder()
                        .commands(List.of("commands"))
                        .configuration(configuration)
                        .inputArtifacts(List.of(InputArtifactProperty.builder()
                                .name("name")
                                .build()))
                        .name("name")
                        .region("region")
                        .roleArn("roleArn")
                        .ruleTypeId(RuleTypeIdProperty.builder()
                                .category("category")
                                .owner("owner")
                                .provider("provider")
                                .version("version")
                                .build())
                        .build()))
                .build()))
        .result("result")
        .retryConfiguration(RetryConfigurationProperty.builder()
                .retryMode("retryMode")
                .build())
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.CodePipeline;

var configuration;

var failureConditionsProperty = new FailureConditionsProperty {
    Conditions = new [] { new ConditionProperty {
        Result = "result",
        Rules = new [] { new RuleDeclarationProperty {
            Commands = new [] { "commands" },
            Configuration = configuration,
            InputArtifacts = new [] { new InputArtifactProperty {
                Name = "name"
            } },
            Name = "name",
            Region = "region",
            RoleArn = "roleArn",
            RuleTypeId = new RuleTypeIdProperty {
                Category = "category",
                Owner = "owner",
                Provider = "provider",
                Version = "version"
            }
        } }
    } },
    Result = "result",
    RetryConfiguration = new RetryConfigurationProperty {
        RetryMode = "retryMode"
    }
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var configuration interface{}

failureConditionsProperty := &FailureConditionsProperty{
	Conditions: []interface{}{
		&ConditionProperty{
			Result: jsii.String("result"),
			Rules: []interface{}{
				&RuleDeclarationProperty{
					Commands: []*string{
						jsii.String("commands"),
					},
					Configuration: configuration,
					InputArtifacts: []interface{}{
						&InputArtifactProperty{
							Name: jsii.String("name"),
						},
					},
					Name: jsii.String("name"),
					Region: jsii.String("region"),
					RoleArn: jsii.String("roleArn"),
					RuleTypeId: &RuleTypeIdProperty{
						Category: jsii.String("category"),
						Owner: jsii.String("owner"),
						Provider: jsii.String("provider"),
						Version: jsii.String("version"),
					},
				},
			},
		},
	},
	Result: jsii.String("result"),
	RetryConfiguration: &RetryConfigurationProperty{
		RetryMode: jsii.String("retryMode"),
	},
}

Properties ​

conditionsoptionalIResolvable | IResolvable | CfnPipeline.ConditionProperty[]conditionsoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, ConditionProperty]]]conditionsoptionalIResolvableConditionsoptionalIResolvableConditionsoptionalinterface{} #
The conditions that are configured as failure conditions.
notes

For more information about conditions, see Stage conditions and How do stage conditions work? .

resultoptionalstringresultoptionalstrresultoptionalStringResultoptionalstringResultoptional*string #
The specified result for when the failure conditions are met, such as rolling back the stage.
retryConfigurationoptionalIResolvable | CfnPipeline.RetryConfigurationPropertyretry_configurationoptionaltyping.Union[IResolvable, RetryConfigurationProperty]retryConfigurationoptionalIResolvableRetryConfigurationoptionalIResolvableRetryConfigurationoptionalinterface{} #
The retry configuration specifies automatic retry for a failed stage, along with the configured retry mode.