transformers
Creates, updates, deletes or gets a transformer resource or lists transformers in a region
Overview
| Name | transformers |
| Type | Resource |
| Description | Definition of AWS::B2BI::Transformer Resource Type |
| Id | awscc.b2bi.transformers |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
created_at | string | |
edi_type | object | |
file_format | string | |
input_conversion | object | |
mapping | object | |
mapping_template | string | This shape is deprecated: This is a legacy trait. Please use input-conversion or output-conversion. |
modified_at | string | |
name | string | |
output_conversion | object | |
sample_document | string | This shape is deprecated: This is a legacy trait. Please use input-conversion or output-conversion. |
sample_documents | object | |
status | string | |
tags | array | |
transformer_arn | string | |
transformer_id | string | |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
transformer_id | string | |
region | string | AWS region. |
For more information, see AWS::B2BI::Transformer.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | transformers | INSERT | Name, Status, region |
delete_resource | transformers | DELETE | Identifier, region |
update_resource | transformers | UPDATE | Identifier, PatchDocument, region |
list_resources | transformers_list_only | SELECT | region |
get_resource | transformers | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual transformer.
SELECT
region,
created_at,
edi_type,
file_format,
input_conversion,
mapping,
mapping_template,
modified_at,
name,
output_conversion,
sample_document,
sample_documents,
status,
tags,
transformer_arn,
transformer_id
FROM awscc.b2bi.transformers
WHERE
region = '{{ region }}' AND
Identifier = '{{ transformer_id }}';
Lists all transformers in a region.
SELECT
region,
transformer_id
FROM awscc.b2bi.transformers_list_only
WHERE
region = '{{ region }}';
INSERT example
Use the following StackQL query and manifest file to create a new transformer resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.b2bi.transformers (
Name,
Status,
region
)
SELECT
'{{ name }}',
'{{ status }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.b2bi.transformers (
EdiType,
FileFormat,
InputConversion,
Mapping,
MappingTemplate,
Name,
OutputConversion,
SampleDocument,
SampleDocuments,
Status,
Tags,
region
)
SELECT
'{{ edi_type }}',
'{{ file_format }}',
'{{ input_conversion }}',
'{{ mapping }}',
'{{ mapping_template }}',
'{{ name }}',
'{{ output_conversion }}',
'{{ sample_document }}',
'{{ sample_documents }}',
'{{ status }}',
'{{ tags }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: transformer
props:
- name: edi_type
value: null
- name: file_format
value: '{{ file_format }}'
- name: input_conversion
value:
from_format: '{{ from_format }}'
format_options: null
advanced_options:
x12:
split_options:
split_by: '{{ split_by }}'
validation_options:
validation_rules:
- null
- name: mapping
value:
template_language: '{{ template_language }}'
template: '{{ template }}'
- name: mapping_template
value: '{{ mapping_template }}'
- name: name
value: '{{ name }}'
- name: output_conversion
value:
to_format: '{{ to_format }}'
format_options: null
advanced_options: null
- name: sample_document
value: '{{ sample_document }}'
- name: sample_documents
value:
bucket_name: '{{ bucket_name }}'
keys:
- input: '{{ input }}'
output: '{{ output }}'
- name: status
value: '{{ status }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
UPDATE example
Use the following StackQL query and manifest file to update a transformer resource, using stack-deploy.
/*+ update */
UPDATE awscc.b2bi.transformers
SET PatchDocument = string('{{ {
"EdiType": edi_type,
"FileFormat": file_format,
"InputConversion": input_conversion,
"Mapping": mapping,
"MappingTemplate": mapping_template,
"Name": name,
"OutputConversion": output_conversion,
"SampleDocument": sample_document,
"SampleDocuments": sample_documents,
"Status": status,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ transformer_id }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
DELETE example
/*+ delete */
DELETE FROM awscc.b2bi.transformers
WHERE
Identifier = '{{ transformer_id }}' 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:
| Parameter | Description |
|---|---|
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 transformers resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
b2bi:CreateTransformer,
b2bi:TagResource,
b2bi:UpdateTransformer,
logs:CreateLogDelivery,
logs:CreateLogGroup,
logs:CreateLogStream,
logs:DescribeLogGroups,
logs:DescribeLogStreams,
logs:DescribeResourcePolicies,
logs:ListLogDeliveries,
logs:PutLogEvents,
logs:PutResourcePolicy
b2bi:GetTransformer,
b2bi:ListTagsForResource
b2bi:TagResource,
b2bi:UntagResource,
b2bi:UpdateTransformer
b2bi:DeleteTransformer,
logs:DeleteLogDelivery,
logs:ListLogDeliveries
b2bi:ListTransformers