Skip to main content

service_templates

Creates, updates, deletes or gets a service_template resource or lists service_templates in a region

Overview

Nameservice_templates
TypeResource
DescriptionDefinition of AWS::Proton::ServiceTemplate Resource Type
Idawscc.proton.service_templates

Fields

NameDatatypeDescription
arnstring

The Amazon Resource Name (ARN) of the service template.

descriptionstring

A description of the service template.

display_namestring

The name of the service template as displayed in the developer interface.

encryption_keystring

A customer provided encryption key that's used to encrypt data.

namestring
pipeline_provisioningstring
tagsarray

An optional list of metadata items that you can associate with the Proton service template. A tag is a key-value pair.

For more information, see Proton resources and tagging in the
Proton User Guide.

regionstringAWS region.

For more information, see AWS::Proton::ServiceTemplate.

Methods

NameResourceAccessible byRequired Params
create_resourceservice_templatesINSERTregion
delete_resourceservice_templatesDELETEIdentifier, region
update_resourceservice_templatesUPDATEIdentifier, PatchDocument, region
list_resourcesservice_templates_list_onlySELECTregion
get_resourceservice_templatesSELECTIdentifier, region

SELECT examples

Gets all properties from an individual service_template.

SELECT
region,
arn,
description,
display_name,
encryption_key,
name,
pipeline_provisioning,
tags
FROM awscc.proton.service_templates
WHERE
region = '{{ region }}' AND
Identifier = '{{ arn }}';

INSERT example

Use the following StackQL query and manifest file to create a new service_template resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.proton.service_templates (
Description,
DisplayName,
EncryptionKey,
Name,
PipelineProvisioning,
Tags,
region
)
SELECT
'{{ description }}',
'{{ display_name }}',
'{{ encryption_key }}',
'{{ name }}',
'{{ pipeline_provisioning }}',
'{{ tags }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

UPDATE example

Use the following StackQL query and manifest file to update a service_template resource, using stack-deploy.

/*+ update */
UPDATE awscc.proton.service_templates
SET PatchDocument = string('{{ {
"Description": description,
"DisplayName": display_name,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ arn }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.proton.service_templates
WHERE
Identifier = '{{ arn }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

Additional Parameters

Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:

ParameterDescription
ClientToken
A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.
A client token is valid for 36 hours once used.
After that, a resource request with the same client token is treated as a new request.
If you do not specify a client token, one is generated for inclusion in the request.
RoleArn
The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.
If you do not specify a role, a temporary session is created using your AWS user credentials.
TypeVersionId
For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used.

Permissions

To operate on the service_templates resource, the following permissions are required:

proton:CreateServiceTemplate,
proton:TagResource,
proton:GetServiceTemplate,
kms:CancelKeyDeletion,
kms:CreateAlias,
kms:CreateCustomKeyStore,
kms:CreateGrant,
kms:CreateKey,
kms:DeleteAlias,
kms:DeleteCustomKeyStore,
kms:DeleteImportedKeyMaterial,
kms:DescribeCustomKeyStores,
kms:DescribeKey,
kms:DisableKey,
kms:DisableKeyRotation,
kms:EnableKey,
kms:EnableKeyRotation,
kms:GenerateDataKey,
kms:GetKeyPolicy,
kms:GetKeyRotationStatus,
kms:GetParametersForImport,
kms:GetPublicKey,
kms:ListAliases,
kms:ListGrants,
kms:ListKeyPolicies,
kms:ListKeyRotations,
kms:ListKeys,
kms:ListResourceTags,
kms:ListRetirableGrants,
kms:PutKeyPolicy,
kms:RevokeGrant,
kms:ScheduleKeyDeletion,
kms:TagResource,
kms:UntagResource,
kms:UpdateAlias,
kms:UpdateCustomKeyStore,
kms:UpdateKeyDescription,
kms:UpdatePrimaryRegion