Menu
AWS Data Pipeline
API Reference (API Version 2012-10-29)

ValidatePipelineDefinition

Validates the specified pipeline definition to ensure that it is well formed and can be run without error.

Request Syntax

{
   "parameterObjects": [ 
      { 
         "attributes": [ 
            { 
               "key": "string",
               "stringValue": "string"
            }
         ],
         "id": "string"
      }
   ],
   "parameterValues": [ 
      { 
         "id": "string",
         "stringValue": "string"
      }
   ],
   "pipelineId": "string",
   "pipelineObjects": [ 
      { 
         "fields": [ 
            { 
               "key": "string",
               "refValue": "string",
               "stringValue": "string"
            }
         ],
         "id": "string",
         "name": "string"
      }
   ]
}

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

parameterObjects

The parameter objects used with the pipeline.

Type: Array of ParameterObject objects

Required: No

parameterValues

The parameter values used with the pipeline.

Type: Array of ParameterValue objects

Required: No

pipelineId

The ID of the pipeline.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1024.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\n\t]*

Required: Yes

pipelineObjects

The objects that define the pipeline changes to validate against the pipeline.

Type: Array of PipelineObject objects

Required: Yes

Response Syntax

{
   "errored": boolean,
   "validationErrors": [ 
      { 
         "errors": [ "string" ],
         "id": "string"
      }
   ],
   "validationWarnings": [ 
      { 
         "id": "string",
         "warnings": [ "string" ]
      }
   ]
}

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

errored

Indicates whether there were validation errors.

Type: Boolean

validationErrors

Any validation errors that were found.

Type: Array of ValidationError objects

validationWarnings

Any validation warnings that were found.

Type: Array of ValidationWarning objects

Errors

For information about the errors that are common to all actions, see Common Errors.

InternalServiceError

An internal service error occurred.

HTTP Status Code: 500

InvalidRequestException

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.

HTTP Status Code: 400

PipelineDeletedException

The specified pipeline has been deleted.

HTTP Status Code: 400

PipelineNotFoundException

The specified pipeline was not found. Verify that you used the correct user and account identifiers.

HTTP Status Code: 400

Examples

Example 1

This example sets an valid pipeline configuration and returns success.

Sample Request


                
POST / HTTP/1.1
Content-Type: application/x-amz-json-1.1
X-Amz-Target: DataPipeline.ValidatePipelineDefinition
Content-Length: 936
Host: datapipeline.us-east-1.amazonaws.com
X-Amz-Date: Mon, 12 Nov 2012 17:49:52 GMT
Authorization: AuthParams

{"pipelineId": "df-06372391ZG65EXAMPLE",
 "pipelineObjects": 
  [
    {"id": "Default",
     "name": "Default",
     "fields": 
      [
        {"key": "workerGroup", 
         "stringValue": "MyworkerGroup"}
      ]
    }, 
    {"id": "Schedule",
     "name": "Schedule",
     "fields": 
      [
       {"key": "startDateTime", 
         "stringValue": "2012-09-25T17:00:00"}, 
        {"key": "type", 
         "stringValue": "Schedule"}, 
        {"key": "period", 
         "stringValue": "1 hour"}, 
        {"key": "endDateTime", 
         "stringValue": "2012-09-25T18:00:00"}
      ]
    },
    {"id": "SayHello",
     "name": "SayHello",
     "fields": 
      [
        {"key": "type", 
         "stringValue": "ShellCommandActivity"},
        {"key": "command", 
         "stringValue": "echo hello"},
        {"key": "parent", 
         "refValue": "Default"},
        {"key": "schedule", 
         "refValue": "Schedule"}
 
      ]
    }
  ]
}
                
            

Sample Response


                
x-amzn-RequestId: 92c9f347-0776-11e2-8a14-21bb8a1f50ef
Content-Type: application/x-amz-json-1.1
Content-Length: 18
Date: Mon, 12 Nov 2012 17:50:53 GMT

{"errored": false}
                
            

Example 2

This example sets an invalid pipeline configuration and returns the associated set of validation errors.

Sample Request


                
POST / HTTP/1.1
Content-Type: application/x-amz-json-1.1
X-Amz-Target: DataPipeline.ValidatePipelineDefinition
Content-Length: 903
Host: datapipeline.us-east-1.amazonaws.com
X-Amz-Date: Mon, 12 Nov 2012 17:49:52 GMT
Authorization: AuthParams

{"pipelineId": "df-06372391ZG65EXAMPLE",
 "pipelineObjects": 
  [
    {"id": "Default",
     "name": "Default",
     "fields": 
      [
        {"key": "workerGroup", 
         "stringValue": "MyworkerGroup"}
      ]
    }, 
    {"id": "Schedule",
     "name": "Schedule",
     "fields": 
      [
       {"key": "startDateTime", 
         "stringValue": "bad-time"}, 
        {"key": "type", 
         "stringValue": "Schedule"}, 
        {"key": "period", 
         "stringValue": "1 hour"}, 
        {"key": "endDateTime", 
         "stringValue": "2012-09-25T18:00:00"}
      ]
    },
    {"id": "SayHello",
     "name": "SayHello",
     "fields": 
      [
        {"key": "type", 
         "stringValue": "ShellCommandActivity"},
        {"key": "command", 
         "stringValue": "echo hello"},
        {"key": "parent", 
         "refValue": "Default"},
        {"key": "schedule", 
         "refValue": "Schedule"}
 
      ]
    }
  ]
}
                
            

Sample Response


                
x-amzn-RequestId: 496a1f5a-0e6a-11e2-a61c-bd6312c92ddd
Content-Type: application/x-amz-json-1.1
Content-Length: 278
Date: Mon, 12 Nov 2012 17:50:53 GMT

{"errored": true, 
 "validationErrors": 
  [
    {"errors": 
      ["INVALID_FIELD_VALUE:  'startDateTime' value must be a literal datetime value."], 
     "id": "Schedule"}
  ]
}
                
            

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: