- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
CreateServiceTemplateVersionCommand
Create a new major or minor version of a service template. A major version of a service template is a version that isn't backward compatible. A minor version of a service template is a version that's backward compatible within its major version.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { ProtonClient, CreateServiceTemplateVersionCommand } from "@aws-sdk/client-proton"; // ES Modules import
// const { ProtonClient, CreateServiceTemplateVersionCommand } = require("@aws-sdk/client-proton"); // CommonJS import
const client = new ProtonClient(config);
const input = { // CreateServiceTemplateVersionInput
clientToken: "STRING_VALUE",
templateName: "STRING_VALUE", // required
description: "STRING_VALUE",
majorVersion: "STRING_VALUE",
source: { // TemplateVersionSourceInput Union: only one key present
s3: { // S3ObjectSource
bucket: "STRING_VALUE", // required
key: "STRING_VALUE", // required
},
},
compatibleEnvironmentTemplates: [ // CompatibleEnvironmentTemplateInputList // required
{ // CompatibleEnvironmentTemplateInput
templateName: "STRING_VALUE", // required
majorVersion: "STRING_VALUE", // required
},
],
tags: [ // TagList
{ // Tag
key: "STRING_VALUE", // required
value: "STRING_VALUE", // required
},
],
supportedComponentSources: [ // ServiceTemplateSupportedComponentSourceInputList
"STRING_VALUE",
],
};
const command = new CreateServiceTemplateVersionCommand(input);
const response = await client.send(command);
// { // CreateServiceTemplateVersionOutput
// serviceTemplateVersion: { // ServiceTemplateVersion
// templateName: "STRING_VALUE", // required
// majorVersion: "STRING_VALUE", // required
// minorVersion: "STRING_VALUE", // required
// recommendedMinorVersion: "STRING_VALUE",
// status: "STRING_VALUE", // required
// statusMessage: "STRING_VALUE",
// description: "STRING_VALUE",
// arn: "STRING_VALUE", // required
// createdAt: new Date("TIMESTAMP"), // required
// lastModifiedAt: new Date("TIMESTAMP"), // required
// compatibleEnvironmentTemplates: [ // CompatibleEnvironmentTemplateList // required
// { // CompatibleEnvironmentTemplate
// templateName: "STRING_VALUE", // required
// majorVersion: "STRING_VALUE", // required
// },
// ],
// schema: "STRING_VALUE",
// supportedComponentSources: [ // ServiceTemplateSupportedComponentSourceInputList
// "STRING_VALUE",
// ],
// },
// };
CreateServiceTemplateVersionCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
compatibleEnvironmentTemplates Required | CompatibleEnvironmentTemplateInput[] | undefined | An array of environment template objects that are compatible with the new service template version. A service instance based on this service template version can run in environments based on compatible templates. |
source Required | TemplateVersionSourceInput | undefined | An object that includes the template bundle S3 bucket path and name for the new version of a service template. |
templateName Required | string | undefined | The name of the service template. |
clientToken | string | undefined | When included, if two identical requests are made with the same client token, Proton returns the service template version that the first request created. |
description | string | undefined | A description of the new version of a service template. |
majorVersion | string | undefined | To create a new minor version of the service template, include a To create a new major and minor version of the service template, exclude |
supportedComponentSources | ServiceTemplateSupportedComponentSourceType[] | undefined | An array of supported component sources. Components with supported sources can be attached to service instances based on this service template version. For more information about components, see Proton components in the Proton User Guide. |
tags | Tag[] | undefined | An optional list of metadata items that you can associate with the Proton service template version. A tag is a key-value pair. For more information, see Proton resources and tagging in the Proton User Guide. |
CreateServiceTemplateVersionCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
serviceTemplateVersion Required | ServiceTemplateVersion | undefined | The service template version summary of detail data that's returned by Proton. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
AccessDeniedException | client | There isn't sufficient access for performing this action. |
ConflictException | client | The request couldn't be made due to a conflicting operation or resource. |
InternalServerException | server | The request failed to register with the service. |
ResourceNotFoundException | client | The requested resource wasn't found. |
ServiceQuotaExceededException | client | A quota was exceeded. For more information, see Proton Quotas in the Proton User Guide. |
ThrottlingException | client | The request was denied due to request throttling. |
ValidationException | client | The input is invalid or an out-of-range value was supplied for the input parameter. |
ProtonServiceException | Base exception class for all service exceptions from Proton service. |