Class Activity
Define a new Step Functions Activity.
Inherited Members
Namespace: Amazon.CDK.AWS.StepFunctions
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class Activity : Resource, IActivity, IResource, IActivityRef, IConstruct, IDependable, IEnvironmentAware
Syntax (vb)
Public Class Activity Inherits Resource Implements IActivity, IResource, IActivityRef, IConstruct, IDependable, IEnvironmentAware
Remarks
ExampleMetadata: infused
Examples
var activity = new Activity(this, "Activity");
var role = new Role(this, "Role", new RoleProps {
AssumedBy = new ServicePrincipal("lambda.amazonaws.com")
});
activity.Grant(role, "states:SendTaskSuccess");
Synopsis
Constructors
| Activity(Construct, string, IActivityProps?) | Define a new Step Functions Activity. |
Properties
| ActivityArn | The ARN of the activity. |
| ActivityName | The name of the activity. |
| ActivityRef | A reference to a Activity resource. |
| EncryptionConfiguration | The encryptionConfiguration object used for server-side encryption of the activity inputs. |
| PROPERTY_INJECTION_ID | Uniquely identifies this class. |
Methods
| FromActivityArn(Construct, string, string) | Construct an Activity from an existing Activity ARN. |
| FromActivityName(Construct, string, string) | Construct an Activity from an existing Activity Name. |
| Grant(IGrantable, params string[]) | Grant the given identity permissions on this Activity. |
| Metric(string, IMetricOptions?) | Return the given named metric for this Activity. |
| MetricFailed(IMetricOptions?) | Metric for the number of times this activity fails. |
| MetricHeartbeatTimedOut(IMetricOptions?) | Metric for the number of times the heartbeat times out for this activity. |
| MetricRunTime(IMetricOptions?) | The interval, in milliseconds, between the time the activity starts and the time it closes. |
| MetricScheduleTime(IMetricOptions?) | The interval, in milliseconds, for which the activity stays in the schedule state. |
| MetricScheduled(IMetricOptions?) | Metric for the number of times this activity is scheduled. |
| MetricStarted(IMetricOptions?) | Metric for the number of times this activity is started. |
| MetricSucceeded(IMetricOptions?) | Metric for the number of times this activity succeeds. |
| MetricTime(IMetricOptions?) | The interval, in milliseconds, between the time the activity is scheduled and the time it closes. |
| MetricTimedOut(IMetricOptions?) | Metric for the number of times this activity times out. |
Constructors
Activity(Construct, string, IActivityProps?)
Define a new Step Functions Activity.
public Activity(Construct scope, string id, IActivityProps? props = null)
Parameters
- scope Construct
- id string
- props IActivityProps
Remarks
ExampleMetadata: infused
Examples
var activity = new Activity(this, "Activity");
var role = new Role(this, "Role", new RoleProps {
AssumedBy = new ServicePrincipal("lambda.amazonaws.com")
});
activity.Grant(role, "states:SendTaskSuccess");
Properties
ActivityArn
The ARN of the activity.
public virtual string ActivityArn { get; }
Property Value
Remarks
Attribute: true
ActivityName
The name of the activity.
public virtual string ActivityName { get; }
Property Value
Remarks
Attribute: true
ActivityRef
A reference to a Activity resource.
public virtual IActivityReference ActivityRef { get; }
Property Value
Remarks
ExampleMetadata: infused
EncryptionConfiguration
The encryptionConfiguration object used for server-side encryption of the activity inputs.
public virtual EncryptionConfiguration? EncryptionConfiguration { get; }
Property Value
Remarks
Attribute: true
PROPERTY_INJECTION_ID
Uniquely identifies this class.
public static string PROPERTY_INJECTION_ID { get; }
Property Value
Remarks
ExampleMetadata: infused
Methods
FromActivityArn(Construct, string, string)
Construct an Activity from an existing Activity ARN.
public static IActivity FromActivityArn(Construct scope, string id, string activityArn)
Parameters
Returns
Remarks
ExampleMetadata: infused
FromActivityName(Construct, string, string)
Construct an Activity from an existing Activity Name.
public static IActivity FromActivityName(Construct scope, string id, string activityName)
Parameters
Returns
Remarks
ExampleMetadata: infused
Grant(IGrantable, params string[])
Grant the given identity permissions on this Activity.
public virtual Grant Grant(IGrantable identity, params string[] actions)
Parameters
- identity IGrantable
The principal.
- actions string[]
The list of desired actions.
Returns
Remarks
[disable-awslint:no-grants]
Metric(string, IMetricOptions?)
Return the given named metric for this Activity.
public virtual Metric Metric(string metricName, IMetricOptions? props = null)
Parameters
- metricName string
- props IMetricOptions
Returns
Remarks
Default: sum over 5 minutes
MetricFailed(IMetricOptions?)
Metric for the number of times this activity fails.
public virtual Metric MetricFailed(IMetricOptions? props = null)
Parameters
- props IMetricOptions
Returns
Remarks
Default: sum over 5 minutes
MetricHeartbeatTimedOut(IMetricOptions?)
Metric for the number of times the heartbeat times out for this activity.
public virtual Metric MetricHeartbeatTimedOut(IMetricOptions? props = null)
Parameters
- props IMetricOptions
Returns
Remarks
Default: sum over 5 minutes
MetricRunTime(IMetricOptions?)
The interval, in milliseconds, between the time the activity starts and the time it closes.
public virtual Metric MetricRunTime(IMetricOptions? props = null)
Parameters
- props IMetricOptions
Returns
Remarks
Default: average over 5 minutes
MetricScheduleTime(IMetricOptions?)
The interval, in milliseconds, for which the activity stays in the schedule state.
public virtual Metric MetricScheduleTime(IMetricOptions? props = null)
Parameters
- props IMetricOptions
Returns
Remarks
Default: average over 5 minutes
MetricScheduled(IMetricOptions?)
Metric for the number of times this activity is scheduled.
public virtual Metric MetricScheduled(IMetricOptions? props = null)
Parameters
- props IMetricOptions
Returns
Remarks
Default: sum over 5 minutes
MetricStarted(IMetricOptions?)
Metric for the number of times this activity is started.
public virtual Metric MetricStarted(IMetricOptions? props = null)
Parameters
- props IMetricOptions
Returns
Remarks
Default: sum over 5 minutes
MetricSucceeded(IMetricOptions?)
Metric for the number of times this activity succeeds.
public virtual Metric MetricSucceeded(IMetricOptions? props = null)
Parameters
- props IMetricOptions
Returns
Remarks
Default: sum over 5 minutes
MetricTime(IMetricOptions?)
The interval, in milliseconds, between the time the activity is scheduled and the time it closes.
public virtual Metric MetricTime(IMetricOptions? props = null)
Parameters
- props IMetricOptions
Returns
Remarks
Default: average over 5 minutes
MetricTimedOut(IMetricOptions?)
Metric for the number of times this activity times out.
public virtual Metric MetricTimedOut(IMetricOptions? props = null)
Parameters
- props IMetricOptions
Returns
Remarks
Default: sum over 5 minutes