Class FailActivity
- java.lang.Object
-
- com.azure.resourcemanager.datafactory.models.Activity
-
- com.azure.resourcemanager.datafactory.models.ControlActivity
-
- com.azure.resourcemanager.datafactory.models.FailActivity
-
public final class FailActivity extends ControlActivity
This activity will fail within its own scope and output a custom error message and error code. The error message and code can provided either as a string literal or as an expression that can be evaluated to a string at runtime. The activity scope can be the whole pipeline or a control activity (e.g. foreach, switch, until), if the fail activity is contained in it.
-
-
Constructor Summary
Constructors Constructor Description FailActivity()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
errorCode()
Get the errorCode property: The error code that categorizes the error type of the Fail activity.Object
message()
Get the message property: The error message that surfaced in the Fail activity.void
validate()
Validates the instance.FailActivity
withDependsOn(List<ActivityDependency> dependsOn)
Set the dependsOn property: Activity depends on condition.FailActivity
withDescription(String description)
Set the description property: Activity description.FailActivity
withErrorCode(Object errorCode)
Set the errorCode property: The error code that categorizes the error type of the Fail activity.FailActivity
withMessage(Object message)
Set the message property: The error message that surfaced in the Fail activity.FailActivity
withName(String name)
Set the name property: Activity name.FailActivity
withUserProperties(List<UserProperty> userProperties)
Set the userProperties property: Activity user properties.-
Methods inherited from class com.azure.resourcemanager.datafactory.models.Activity
additionalProperties, dependsOn, description, name, userProperties, withAdditionalProperties
-
-
-
-
Method Detail
-
withName
public FailActivity withName(String name)
Set the name property: Activity name.- Overrides:
withName
in classControlActivity
- Parameters:
name
- the name value to set.- Returns:
- the Activity object itself.
-
withDescription
public FailActivity withDescription(String description)
Set the description property: Activity description.- Overrides:
withDescription
in classControlActivity
- Parameters:
description
- the description value to set.- Returns:
- the Activity object itself.
-
withDependsOn
public FailActivity withDependsOn(List<ActivityDependency> dependsOn)
Set the dependsOn property: Activity depends on condition.- Overrides:
withDependsOn
in classControlActivity
- Parameters:
dependsOn
- the dependsOn value to set.- Returns:
- the Activity object itself.
-
withUserProperties
public FailActivity withUserProperties(List<UserProperty> userProperties)
Set the userProperties property: Activity user properties.- Overrides:
withUserProperties
in classControlActivity
- Parameters:
userProperties
- the userProperties value to set.- Returns:
- the Activity object itself.
-
message
public Object message()
Get the message property: The error message that surfaced in the Fail activity. It can be dynamic content that's evaluated to a non empty/blank string at runtime. Type: string (or Expression with resultType string).- Returns:
- the message value.
-
withMessage
public FailActivity withMessage(Object message)
Set the message property: The error message that surfaced in the Fail activity. It can be dynamic content that's evaluated to a non empty/blank string at runtime. Type: string (or Expression with resultType string).- Parameters:
message
- the message value to set.- Returns:
- the FailActivity object itself.
-
errorCode
public Object errorCode()
Get the errorCode property: The error code that categorizes the error type of the Fail activity. It can be dynamic content that's evaluated to a non empty/blank string at runtime. Type: string (or Expression with resultType string).- Returns:
- the errorCode value.
-
withErrorCode
public FailActivity withErrorCode(Object errorCode)
Set the errorCode property: The error code that categorizes the error type of the Fail activity. It can be dynamic content that's evaluated to a non empty/blank string at runtime. Type: string (or Expression with resultType string).- Parameters:
errorCode
- the errorCode value to set.- Returns:
- the FailActivity object itself.
-
validate
public void validate()
Validates the instance.- Overrides:
validate
in classControlActivity
- Throws:
IllegalArgumentException
- thrown if the instance is not valid.
-
-