-
Notifications
You must be signed in to change notification settings - Fork 17
/
CommonEcsRunTaskProps.go
72 lines (69 loc) · 2.52 KB
/
CommonEcsRunTaskProps.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
package awsstepfunctionstasks
import (
"github.com/aws/aws-cdk-go/awscdk/v2/awsecs"
"github.com/aws/aws-cdk-go/awscdk/v2/awsstepfunctions"
)
// Basic properties for ECS Tasks.
//
// Example:
// // 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"
// import "github.com/aws/aws-cdk-go/awscdk"
// import "github.com/aws/aws-cdk-go/awscdk"
//
// var cluster cluster
// var containerDefinition containerDefinition
// var taskDefinition taskDefinition
//
// commonEcsRunTaskProps := &CommonEcsRunTaskProps{
// Cluster: cluster,
// TaskDefinition: taskDefinition,
//
// // the properties below are optional
// ContainerOverrides: []containerOverride{
// &containerOverride{
// ContainerDefinition: containerDefinition,
//
// // the properties below are optional
// Command: []*string{
// jsii.String("command"),
// },
// Cpu: jsii.Number(123),
// Environment: []taskEnvironmentVariable{
// &taskEnvironmentVariable{
// Name: jsii.String("name"),
// Value: jsii.String("value"),
// },
// },
// MemoryLimit: jsii.Number(123),
// MemoryReservation: jsii.Number(123),
// },
// },
// IntegrationPattern: awscdk.Aws_stepfunctions.ServiceIntegrationPattern_FIRE_AND_FORGET,
// }
//
type CommonEcsRunTaskProps struct {
// The topic to run the task on.
Cluster awsecs.ICluster `field:"required" json:"cluster" yaml:"cluster"`
// Task Definition used for running tasks in the service.
//
// Note: this must be TaskDefinition, and not ITaskDefinition,
// as it requires properties that are not known for imported task definitions
// If you want to run a RunTask with an imported task definition,
// consider using CustomState.
TaskDefinition awsecs.TaskDefinition `field:"required" json:"taskDefinition" yaml:"taskDefinition"`
// Container setting overrides.
//
// Key is the name of the container to override, value is the
// values you want to override.
// Default: - No overrides.
//
ContainerOverrides *[]*ContainerOverride `field:"optional" json:"containerOverrides" yaml:"containerOverrides"`
// The service integration pattern indicates different ways to call RunTask in ECS.
//
// The valid value for Lambda is FIRE_AND_FORGET, SYNC and WAIT_FOR_TASK_TOKEN.
// Default: FIRE_AND_FORGET.
//
IntegrationPattern awsstepfunctions.ServiceIntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"`
}