From 763fbfd41d1fe42dabc7d7f8083980ff18736e45 Mon Sep 17 00:00:00 2001 From: Cam Date: Thu, 31 Oct 2019 14:06:36 -0700 Subject: [PATCH] Update ECS client and task defs --- agent/ecs_client/model/api/api-2.json | 10 ++++- agent/ecs_client/model/ecs/api.go | 38 +++++++++++++++++++ .../task-efs-vol-read/task-definition.json | 2 +- .../task-efs-vol-write/task-definition.json | 2 +- 4 files changed, 49 insertions(+), 3 deletions(-) diff --git a/agent/ecs_client/model/api/api-2.json b/agent/ecs_client/model/api/api-2.json index 7b4bba194fb..972cc69caae 100644 --- a/agent/ecs_client/model/api/api-2.json +++ b/agent/ecs_client/model/api/api-2.json @@ -1169,6 +1169,13 @@ "type":"list", "member":{"shape":"KeyValuePair"} }, + "EFSVolumeConfiguration": { + "type":"structure", + "members":{ + "fileSystemId":{"shape":"String"}, + "rootDirectory":{"shape":"String"} + } + }, "Failure":{ "type":"structure", "members":{ @@ -2322,7 +2329,8 @@ "members":{ "name":{"shape":"String"}, "host":{"shape":"HostVolumeProperties"}, - "dockerVolumeConfiguration":{"shape":"DockerVolumeConfiguration"} + "dockerVolumeConfiguration":{"shape":"DockerVolumeConfiguration"}, + "efsVolumeConfiguration":{"shape":"EFSVolumeConfiguration"} } }, "VolumeFrom":{ diff --git a/agent/ecs_client/model/ecs/api.go b/agent/ecs_client/model/ecs/api.go index 22a5e466c46..912406ab697 100644 --- a/agent/ecs_client/model/ecs/api.go +++ b/agent/ecs_client/model/ecs/api.go @@ -6982,6 +6982,36 @@ func (s *DockerVolumeConfiguration) SetScope(v string) *DockerVolumeConfiguratio return s } +type EFSVolumeConfiguration struct { + _ struct{} `type:"structure"` + + FileSystemId *string `locationName:"fileSystemId" type:"string"` + + RootDirectory *string `locationName:"rootDirectory" type:"string"` +} + +// String returns the string representation +func (s EFSVolumeConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EFSVolumeConfiguration) GoString() string { + return s.String() +} + +// SetFileSystemId sets the FileSystemId field's value. +func (s *EFSVolumeConfiguration) SetFileSystemId(v string) *EFSVolumeConfiguration { + s.FileSystemId = &v + return s +} + +// SetRootDirectory sets the RootDirectory field's value. +func (s *EFSVolumeConfiguration) SetRootDirectory(v string) *EFSVolumeConfiguration { + s.RootDirectory = &v + return s +} + // A failed resource. type Failure struct { _ struct{} `type:"structure"` @@ -12283,6 +12313,8 @@ type Volume struct { DockerVolumeConfiguration *DockerVolumeConfiguration `locationName:"dockerVolumeConfiguration" type:"structure"` + EfsVolumeConfiguration *EFSVolumeConfiguration `locationName:"efsVolumeConfiguration" type:"structure"` + // The contents of the host parameter determine whether your data volume persists // on the host container instance and where it is stored. If the host parameter // is empty, then the Docker daemon assigns a host path for your data volume, @@ -12317,6 +12349,12 @@ func (s *Volume) SetDockerVolumeConfiguration(v *DockerVolumeConfiguration) *Vol return s } +// SetEfsVolumeConfiguration sets the EfsVolumeConfiguration field's value. +func (s *Volume) SetEfsVolumeConfiguration(v *EFSVolumeConfiguration) *Volume { + s.EfsVolumeConfiguration = v + return s +} + // SetHost sets the Host field's value. func (s *Volume) SetHost(v *HostVolumeProperties) *Volume { s.Host = v diff --git a/agent/functional_tests/testdata/taskdefinitions/task-efs-vol-read/task-definition.json b/agent/functional_tests/testdata/taskdefinitions/task-efs-vol-read/task-definition.json index 35fd1657a63..2dd2039f8d1 100644 --- a/agent/functional_tests/testdata/taskdefinitions/task-efs-vol-read/task-definition.json +++ b/agent/functional_tests/testdata/taskdefinitions/task-efs-vol-read/task-definition.json @@ -5,7 +5,7 @@ "name": "task-efs-vol-read", "image": "127.0.0.1:51670/busybox:latest", "cpu": 10, - "command": ["sh", "-c", "while true; do sleep 1; [ -f /ecs/success ] && if grep -q 'can you read me' /ecs/success; then exit 42; fi done"], + "command": ["sh", "-c", "while true; do sleep 1; [ -f /ecs/success ] && if grep -q 'can you read me' /ecs/success; then exit 42; fi done"], "memory": 256, "memoryReservation": 128, "mountPoints": [ diff --git a/agent/functional_tests/testdata/taskdefinitions/task-efs-vol-write/task-definition.json b/agent/functional_tests/testdata/taskdefinitions/task-efs-vol-write/task-definition.json index 85594d6ad9d..ed9a81fbbca 100644 --- a/agent/functional_tests/testdata/taskdefinitions/task-efs-vol-write/task-definition.json +++ b/agent/functional_tests/testdata/taskdefinitions/task-efs-vol-write/task-definition.json @@ -5,7 +5,7 @@ "name": "task-efs-vol-write", "image": "127.0.0.1:51670/busybox:latest", "cpu": 10, - "command": ["sh", "-c", "echo 'can you read me'> /ecs/success; [ -f /ecs/success ] && exit 42 || exit 1"], + "command": ["sh", "-c", "echo 'can you read me' > /ecs/success; [ -f /ecs/success ] && exit 42 || exit 1"], "memory": 256, "memoryReservation": 128, "mountPoints": [