update_transformer
async
¶
update_transformer(
transformer_id: TransformerId,
*,
config_overrides: Optional[Asyncb2biClientConfig] = None,
name: Optional[TransformerName] = None,
status: Optional[TransformerStatus] = None,
file_format: Optional[FileFormat] = None,
mapping_template: Optional[MappingTemplate] = None,
edi_type: Optional[EdiType] = None,
sample_document: Optional[FileLocation] = None,
input_conversion: Optional[InputConversion] = None,
mapping: Optional[Mapping] = None,
output_conversion: Optional[OutputConversion] = None,
sample_documents: Optional[SampleDocuments] = None,
) -> UpdateTransformerResponse
Updates the specified parameters for a transformer. A transformer can take an EDI file as input and transform it into a JSON-or XML-formatted document. Alternatively, a transformer can take a JSON-or XML-formatted document as input and transform it into an EDI file.
Parameters:
-
transformer_id(TransformerId) –Specifies the system-assigned unique identifier for the transformer.
-
name(Optional[TransformerName], default:None) –Specify a new name for the transformer, if you want to update it.
-
status(Optional[TransformerStatus], default:None) –Specifies the transformer's status. You can update the state of the transformer from
inactivetoactive. -
file_format(Optional[FileFormat], default:None) –Specifies that the currently supported file formats for EDI transformations are
JSONandXML. -
mapping_template(Optional[MappingTemplate], default:None) –Specifies the mapping template for the transformer. This template is used to map the parsed EDI file using JSONata or XSLT.
This parameter is available for backwards compatibility. Use the Mapping data type instead.
-
edi_type(Optional[EdiType], default:None) –Specifies the details for the EDI standard that is being used for the transformer. Currently, only X12 is supported. X12 is a set of standards and corresponding messages that define specific business documents.
-
sample_document(Optional[FileLocation], default:None) –Specifies a sample EDI document that is used by a transformer as a guide for processing the EDI data.
-
input_conversion(Optional[InputConversion], default:None) –To update, specify the
InputConversionobject, which contains the format options for the inbound transformation. -
mapping(Optional[Mapping], default:None) –Specify the structure that contains the mapping template and its language (either XSLT or JSONATA).
-
output_conversion(Optional[OutputConversion], default:None) –To update, specify the
OutputConversionobject, which contains the format options for the outbound transformation. -
sample_documents(Optional[SampleDocuments], default:None) –Specify a structure that contains the Amazon S3 bucket and an array of the corresponding keys used to identify the location for your sample documents.
Raises:
-
AccessDeniedException–You do not have sufficient access to perform this action.
-
ConflictException–A conflict exception is thrown when you attempt to delete a resource (such as a profile or a capability) that is being used by other resources.
-
InternalServerException–This exception is thrown when an error occurs in the Amazon Web Services B2B Data Interchange service.
-
ResourceNotFoundException–Occurs when the requested resource does not exist, or cannot be found. In some cases, the resource exists in a region other than the region specified in the API call.
-
ServiceQuotaExceededException–Occurs when the calling command attempts to exceed one of the service quotas, for example trying to create a capability when you already have the maximum number of capabilities allowed.
-
ThrottlingException–The request was denied due to throttling: the data speed and rendering may be limited depending on various parameters and conditions.
-
ValidationException–Occurs when a B2BI object cannot be validated against a request from another object. This exception can be thrown during standard EDI validation or when custom validation rules fail, such as when element length constraints are violated, invalid codes are used in code list validations, or required elements are missing based on configured element requirement rules.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
Sample UpdateTransformer call
>>> await client.update_transformer(input_conversion={'fromFormat': 'X12', 'formatOptions': {'x12': {'transactionSet': 'X12_110', 'version': 'VERSION_4010'}}, 'advancedOptions': {'x12': {'splitOptions': {'splitBy': 'NONE'}, 'validationOptions': {'validationRules': [{'codeListValidationRule': {'elementId': '1234', 'codesToAdd': ['A', 'B', 'C'], 'codesToRemove': ['X', 'Y', 'Z']}}, {'elementRequirementValidationRule': {'elementPosition': 'NM1-01', 'requirement': 'MANDATORY'}}, {'elementLengthValidationRule': {'elementId': '5678', 'maxLength': 10, 'minLength': 2}}]}}}}, mapping={'templateLanguage': 'JSONATA', 'template': '{}'}, sample_documents={'bucketName': 'test-bucket', 'keys': [{'input': 'sampleDoc.txt'}]}, name='transformX12', status='inactive', transformer_id='tr-974c129999f84d8c9')
Source code in docs_src/capo_b2bi/_services/async_b2bi.py
2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 | |