CreateTemplate - Migration Hub Orchestrator

CreateTemplate

Creates a migration workflow template.

Request Syntax

POST /template HTTP/1.1 Content-type: application/json { "clientToken": "string", "tags": { "string" : "string" }, "templateDescription": "string", "templateName": "string", "templateSource": { ... } }

URI Request Parameters

The request does not use any URI parameters.

Request Body

The request accepts the following data in JSON format.

clientToken

A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Idempotency in the Smithy documentation.

Type: String

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

Pattern: [-a-zA-Z0-9]*

Required: No

tags

The tags to add to the migration workflow template.

Type: String to string map

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Key Pattern: (?!aws:)[a-zA-Z+-=._:/]+

Value Length Constraints: Minimum length of 0. Maximum length of 256.

Required: No

templateDescription

A description of the migration workflow template.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 250.

Pattern: .*

Required: No

templateName

The name of the migration workflow template.

Type: String

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

Pattern: [ a-zA-Z0-9]*

Required: Yes

templateSource

The source of the migration workflow template.

Type: TemplateSource object

Note: This object is a Union. Only one member of this object can be specified or returned.

Required: Yes

Response Syntax

HTTP/1.1 200 Content-type: application/json { "tags": { "string" : "string" }, "templateArn": "string", "templateId": "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.

tags

The tags added to the migration workflow template.

Type: String to string map

Key Length Constraints: Minimum length of 1. Maximum length of 100.

Key Pattern: [a-zA-Z0-9-_ ()]+

Value Length Constraints: Minimum length of 0. Maximum length of 100.

templateArn

The Amazon Resource Name (ARN) of the migration workflow template. The format for an Migration Hub Orchestrator template ARN is arn:aws:migrationhub-orchestrator:region:account:template/template-abcd1234. For more information about ARNs, see Amazon Resource Names (ARNs) in the AWS General Reference.

Type: String

templateId

The ID of the migration workflow template.

Type: String

Errors

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

AccessDeniedException

You do not have sufficient access to perform this action.

HTTP Status Code: 403

ConflictException

This exception is thrown when an attempt to update or delete a resource would cause an inconsistent state.

HTTP Status Code: 409

InternalServerException

An internal error has occurred.

HTTP Status Code: 500

ThrottlingException

The request was denied due to request throttling.

HTTP Status Code: 429

ValidationException

The input fails to satisfy the constraints specified by an AWS service.

HTTP Status Code: 400

See Also

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