create_capability
async
¶
create_capability(
name: CapabilityName,
type: CapabilityType,
configuration: CapabilityConfiguration,
*,
config_overrides: Optional[Asyncb2biClientConfig] = None,
instructions_documents: Optional[InstructionsDocuments] = None,
client_token: Optional[str] = None,
tags: Optional[TagList] = None,
) -> CreateCapabilityResponse
Instantiates a capability based on the specified parameters. A trading capability contains the information required to transform incoming EDI documents into JSON or XML outputs.
Parameters:
-
name(CapabilityName) –Specifies the name of the capability, used to identify it.
-
type(CapabilityType) –Specifies the type of the capability. Currently, only
ediis supported. -
configuration(CapabilityConfiguration) –Specifies a structure that contains the details for a capability.
-
instructions_documents(Optional[InstructionsDocuments], default:None) –Specifies one or more locations in Amazon S3, each specifying an EDI document that can be used with this capability. Each item contains the name of the bucket and the key, to identify the document's location.
-
client_token(Optional[str], default:None) –Reserved for future use.
-
tags(Optional[TagList], default:None) –Specifies the key-value pairs assigned to ARNs that you can use to group and search for resources by type. You can attach this metadata to resources (capabilities, partnerships, and so on) for any purpose.
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 CreateCapability call
>>> await client.create_capability(name='b2biexample', type='edi', configuration={'edi': {'type': {'x12Details': {'transactionSet': 'X12_110', 'version': 'VERSION_4010'}}, 'inputLocation': {'bucketName': 'test-bucket', 'key': 'input/'}, 'outputLocation': {'bucketName': 'test-bucket', 'key': 'output/'}, 'transformerId': 'tr-9a893cf536df4658b'}}, instructions_documents=[{'bucketName': 'test-bucket', 'key': 'instructiondoc.txt'}], client_token='foo', tags=[{'Key': 'capabilityKey1', 'Value': 'capabilityValue1'}])
Source code in docs_src/capo_b2bi/_services/async_b2bi.py
860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 | |