From 8bbdcf5c756f557652562eb03196d4a7da5ade36 Mon Sep 17 00:00:00 2001 From: Jeremy Lindblom Date: Mon, 23 Feb 2015 15:14:45 -0800 Subject: [PATCH] Added support for pipeline tagging via the AddTags and RemoveTags operations to the DataPipeline client. --- CHANGELOG.md | 4 +- src/Aws/DataPipeline/DataPipelineClient.php | 2 + .../Resources/datapipeline-2012-10-29.php | 166 ++++++++++++++++++ 3 files changed, 171 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 62c812f29b..e3a11aa30b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,13 +2,15 @@ ## Next Release +* `Aws\DataPipeline` - Added support for pipeline tagging via the `AddTags` and + `RemoveTags` operations. * `Aws\Route53` - Added support for the `GetHostedZoneCount` and `ListHostedZonesByName` operations. ## 2.7.19 - 2015-02-20 * `Aws\Ssm` - Added support for the **Amazon Simple Systems Management Service - (SSM)**. + (SSM)**. * `Aws\Sts` - Added support for regional endpoints. * `Aws\CloudFront` - Added support for origin paths in web distributions. * `Aws\Ecs` - Added support for specifying volumes and mount points. Also diff --git a/src/Aws/DataPipeline/DataPipelineClient.php b/src/Aws/DataPipeline/DataPipelineClient.php index 2e662907d2..06a01a8dff 100644 --- a/src/Aws/DataPipeline/DataPipelineClient.php +++ b/src/Aws/DataPipeline/DataPipelineClient.php @@ -28,6 +28,7 @@ * Client to interact with AWS Data Pipeline * * @method Model activatePipeline(array $args = array()) {@command DataPipeline ActivatePipeline} + * @method Model addTags(array $args = array()) {@command DataPipeline AddTags} * @method Model createPipeline(array $args = array()) {@command DataPipeline CreatePipeline} * @method Model deletePipeline(array $args = array()) {@command DataPipeline DeletePipeline} * @method Model describeObjects(array $args = array()) {@command DataPipeline DescribeObjects} @@ -38,6 +39,7 @@ * @method Model pollForTask(array $args = array()) {@command DataPipeline PollForTask} * @method Model putPipelineDefinition(array $args = array()) {@command DataPipeline PutPipelineDefinition} * @method Model queryObjects(array $args = array()) {@command DataPipeline QueryObjects} + * @method Model removeTags(array $args = array()) {@command DataPipeline RemoveTags} * @method Model reportTaskProgress(array $args = array()) {@command DataPipeline ReportTaskProgress} * @method Model reportTaskRunnerHeartbeat(array $args = array()) {@command DataPipeline ReportTaskRunnerHeartbeat} * @method Model setStatus(array $args = array()) {@command DataPipeline SetStatus} diff --git a/src/Aws/DataPipeline/Resources/datapipeline-2012-10-29.php b/src/Aws/DataPipeline/Resources/datapipeline-2012-10-29.php index abcb786a36..7168bd4673 100644 --- a/src/Aws/DataPipeline/Resources/datapipeline-2012-10-29.php +++ b/src/Aws/DataPipeline/Resources/datapipeline-2012-10-29.php @@ -120,6 +120,77 @@ ), ), ), + 'AddTags' => array( + 'httpMethod' => 'POST', + 'uri' => '/', + 'class' => 'Aws\\Common\\Command\\JsonCommand', + 'responseClass' => 'EmptyOutput', + 'responseType' => 'model', + 'parameters' => array( + 'Content-Type' => array( + 'static' => true, + 'location' => 'header', + 'default' => 'application/x-amz-json-1.1', + ), + 'command.expects' => array( + 'static' => true, + 'default' => 'application/json', + ), + 'X-Amz-Target' => array( + 'static' => true, + 'location' => 'header', + 'default' => 'DataPipeline.AddTags', + ), + 'pipelineId' => array( + 'required' => true, + 'type' => 'string', + 'location' => 'json', + 'minLength' => 1, + 'maxLength' => 1024, + ), + 'tags' => array( + 'required' => true, + 'type' => 'array', + 'location' => 'json', + 'maxItems' => 10, + 'items' => array( + 'name' => 'Tag', + 'type' => 'object', + 'properties' => array( + 'key' => array( + 'required' => true, + 'type' => 'string', + 'minLength' => 1, + 'maxLength' => 128, + ), + 'value' => array( + 'required' => true, + 'type' => 'string', + 'maxLength' => 256, + ), + ), + ), + ), + ), + 'errorResponses' => array( + array( + 'reason' => 'An internal service error occurred.', + 'class' => 'InternalServiceErrorException', + ), + array( + 'reason' => 'The request was not valid. Verify that your request was properly formatted, that the signature was generated with the correct credentials, and that you haven\'t exceeded any of the service limits for your account.', + 'class' => 'InvalidRequestException', + ), + array( + 'reason' => 'The specified pipeline was not found. Verify that you used the correct user and account identifiers.', + 'class' => 'PipelineNotFoundException', + ), + array( + 'reason' => 'The specified pipeline has been deleted.', + 'class' => 'PipelineDeletedException', + ), + ), + ), 'CreatePipeline' => array( 'httpMethod' => 'POST', 'uri' => '/', @@ -160,6 +231,28 @@ 'location' => 'json', 'maxLength' => 1024, ), + 'tags' => array( + 'type' => 'array', + 'location' => 'json', + 'maxItems' => 10, + 'items' => array( + 'name' => 'Tag', + 'type' => 'object', + 'properties' => array( + 'key' => array( + 'required' => true, + 'type' => 'string', + 'minLength' => 1, + 'maxLength' => 128, + ), + 'value' => array( + 'required' => true, + 'type' => 'string', + 'maxLength' => 256, + ), + ), + ), + ), ), 'errorResponses' => array( array( @@ -799,6 +892,64 @@ ), ), ), + 'RemoveTags' => array( + 'httpMethod' => 'POST', + 'uri' => '/', + 'class' => 'Aws\\Common\\Command\\JsonCommand', + 'responseClass' => 'EmptyOutput', + 'responseType' => 'model', + 'parameters' => array( + 'Content-Type' => array( + 'static' => true, + 'location' => 'header', + 'default' => 'application/x-amz-json-1.1', + ), + 'command.expects' => array( + 'static' => true, + 'default' => 'application/json', + ), + 'X-Amz-Target' => array( + 'static' => true, + 'location' => 'header', + 'default' => 'DataPipeline.RemoveTags', + ), + 'pipelineId' => array( + 'required' => true, + 'type' => 'string', + 'location' => 'json', + 'minLength' => 1, + 'maxLength' => 1024, + ), + 'tagKeys' => array( + 'required' => true, + 'type' => 'array', + 'location' => 'json', + 'items' => array( + 'name' => 'string', + 'type' => 'string', + 'maxLength' => 1024, + ), + ), + ), + 'errorResponses' => array( + array( + 'reason' => 'An internal service error occurred.', + 'class' => 'InternalServiceErrorException', + ), + array( + 'reason' => 'The request was not valid. Verify that your request was properly formatted, that the signature was generated with the correct credentials, and that you haven\'t exceeded any of the service limits for your account.', + 'class' => 'InvalidRequestException', + ), + array( + 'reason' => 'The specified pipeline was not found. Verify that you used the correct user and account identifiers.', + 'class' => 'PipelineNotFoundException', + ), + array( + 'reason' => 'The specified pipeline has been deleted.', + 'class' => 'PipelineDeletedException', + ), + ), + ), 'ReportTaskProgress' => array( 'httpMethod' => 'POST', 'uri' => '/', @@ -1319,6 +1470,21 @@ 'description' => array( 'type' => 'string', ), + 'tags' => array( + 'type' => 'array', + 'items' => array( + 'name' => 'Tag', + 'type' => 'object', + 'properties' => array( + 'key' => array( + 'type' => 'string', + ), + 'value' => array( + 'type' => 'string', + ), + ), + ), + ), ), ), ),